Compare commits

...

4737 Commits

Author SHA1 Message Date
Terry Brady
cfc200f2c7 Update README.md 2018-06-22 14:33:35 -07:00
Andrea Bollini
211a9e215f Merge pull request #2066 from 4Science/DS-3915
DS-3915 RestResourceController hides not existing endpoints under other errors
2018-05-28 08:36:26 +02:00
Andrea Bollini
b248e3d1f3 Merge pull request #2061 from ppmdo/DS-3911
DS-3911 Endpoint to delete bitstreams
2018-05-28 08:29:51 +02:00
Andrea Bollini
41341eb9b9 DS-3915 proper handling of not existent subPaths 2018-05-20 21:13:20 +02:00
Andrea Bollini
3e76aa8972 DS-3915 Integration Test to expose the issue 2018-05-20 19:16:46 +02:00
Andrea Bollini
829ee0687a Merge pull request #2060 from Georgetown-University-Libraries/ds3650r3808
[DS-3808] Return 204 Status when return json object is empty
2018-05-20 18:29:17 +02:00
Andrea Bollini
36fbcb1b24 Better exception handling 2018-05-20 16:10:15 +02:00
Andrea Bollini
a4331dc4df Merge branch 'DS-3911' of https://github.com/ppmdo/DSpace into ppmdo-DS-3911 2018-05-20 12:30:45 +02:00
Andrea Bollini
75e1074123 Merge pull request #2053 from Georgetown-University-Libraries/ds3783a
[DS-3783] Change http return code when required parameter is missing
2018-05-20 11:44:27 +02:00
Andrea Bollini
a323bba76e Replaced Spring Param anno with our, add more test 2018-05-19 23:29:37 +02:00
Pablo Prieto
c66167e220 Changes based on review 2018-05-19 12:06:47 -05:00
Andrea Bollini
6225a353ef Merge branch 'ds3783a' of https://github.com/Georgetown-University-Libraries/DSpace into Georgetown-University-Libraries-ds3783a 2018-05-19 16:26:26 +02:00
Andrea Bollini
f10801ecca Merge pull request #2052 from tantz001/DS-3905
DS-3905; add a custom RestController
2018-05-18 22:14:52 +02:00
Andrea Bollini
fa11b172b7 Merge pull request #2057 from TAMULib/ds3777
DS-3777: Allow only POST on the authn/login endpoint.
2018-05-18 20:29:44 +02:00
Andrea Bollini
fe0a397548 Add IT for IdentifierRestController 2018-05-18 20:16:50 +02:00
Andrea Bollini
344459ad60 Fix checkstyle issue 2018-05-18 19:21:44 +02:00
Andrea Bollini
d2ff33da6d Fix endpoint registration in the root document 2018-05-18 19:13:12 +02:00
Andrea Bollini
17ad4050d2 Merge branch 'DS-3905' of https://github.com/tantz001/DSpace into tantz001-DS-3905 2018-05-18 17:25:25 +02:00
Andrea Bollini
2f06d6e7e6 POST is required for the login endpoint 2018-05-18 17:15:02 +02:00
Andrea Bollini
c2d2136e2c Fix test failures and add test for GET method 2018-05-18 17:14:29 +02:00
Andrea Bollini
0d4582484b Fix code style issues 2018-05-18 17:05:17 +02:00
Andrea Bollini
eee6529930 Merge branch 'ds3777' of https://github.com/TAMULib/DSpace into TAMULib-ds3777 2018-05-18 15:53:00 +02:00
Pablo Prieto
b26d8613e3 Rebase unchanged files 2018-05-17 23:36:25 -05:00
Pablo Prieto
263c867ced Integration Tests for Bitstreams DELETE endpoint. 2018-05-17 23:28:30 -05:00
Pablo Prieto
c4bfd5ef83 Half Integration Tests 2018-05-17 01:14:55 -05:00
Bill Tantzen
350f431eee removed unused imports; reorderd imports. 2018-05-16 11:03:22 -05:00
Bill Tantzen
f1cd0af629 remove <p> from license text blank line. 2018-05-15 14:37:17 -05:00
Terry W Brady
eb9d2d1f49 comment todo method 2018-05-15 12:22:52 -07:00
Terry W Brady
42d0a223d2 review suggestion 2018-05-15 12:04:38 -07:00
Terry W Brady
141be6e338 verify return structure of empty repos 2018-05-15 12:02:38 -07:00
Pablo Prieto
b6aa7308aa Draft Integration Tests 2018-05-15 13:49:45 -05:00
Terry W Brady
d4df6d12c6 Simplify cases where 204 is returned 2018-05-15 11:05:20 -07:00
Pablo Prieto
db512feb4e Fixed pom.xml 2018-05-14 22:20:47 -05:00
Pablo Prieto
edf4fc5669 Fixed pom.xml 2018-05-14 22:19:32 -05:00
Pablo Prieto
cd8c6b20ec Merge branch 'DS-3911' of https://github.com/ppmdo/DSpace into DS-3911 2018-05-14 22:16:28 -05:00
Pablo Prieto
14712be757 Removed local changes. 2018-05-14 22:15:41 -05:00
Pablo Prieto
92c01ebb66 No message 2018-05-14 22:09:55 -05:00
Pablo Prieto
6987ebb71d Removed local pom.xml modifications 2018-05-14 22:08:47 -05:00
Pablo Prieto
6bda178838 Removed application.properties local modifications 2018-05-14 22:07:33 -05:00
Pablo Prieto
67cc795026 Return 422 error code when trying to delete logo bitstreams. 2018-05-14 21:57:33 -05:00
Terry W Brady
5c95001c09 check req params 2018-05-14 15:42:48 -07:00
Terry W Brady
42253e7d6e force test pass 2018-05-14 14:04:59 -07:00
Terry W Brady
c32d21378a Update test cases for 204 change 2018-05-14 13:34:57 -07:00
Terry W Brady
e9083bdfa3 req param annotation 2018-05-14 13:12:24 -07:00
Terry W Brady
da1917539a 204 logic 2018-05-14 12:35:27 -07:00
Pablo Prieto
2d8a9fb315 Full working implementation.
TODO: Raise error when trying to delete logos
2018-05-14 14:20:10 -05:00
Pablo Prieto
e23076da09 Fixed UUID - id mapping bug of RestResourceController.
First DELETE implementation on bitstream endpoint.

TODO: Investigate why the endpoint triggers but doesn't end in the bitstream deletion.
2018-05-14 09:10:43 -05:00
Andrea Bollini
e806bd7727 Merge pull request #2051 from Georgetown-University-Libraries/ds3650
[DS-3650] Add subcommunities link to community object
2018-05-14 15:52:34 +02:00
James Creel
a59e15a2b3 Web Security ignores not-allowed methods on authn/login endpoint 2018-05-12 12:29:29 -05:00
James Creel
9e7a56954c New authn controller endpoint to intercept not allowed methods 2018-05-12 12:26:27 -05:00
James Creel
1d52ec86cd removing GET from allowed methods on authn/login controller endpoint 2018-05-12 11:53:53 -05:00
Bill Tantzen
a7d89fbb58 removed unecessary classes; changed from problematic{prefix}/{suffix} path to params-based path; changed response to 501 when IdentifierNotResolvable. 2018-05-11 15:21:59 -05:00
Bill Tantzen
195bc622e9 reformat to DSpace style guidelines. 2018-05-10 15:32:48 -05:00
Bill Tantzen
76d60c2e94 simplified method signature; converted DSpaceObject to DSpaceObjectRest; leveraged ControllerLinkBuilder.linkTo() to construct the redirect. 2018-05-10 11:53:31 -05:00
Terry W Brady
892667d623 handle improperly formatted parent param 2018-05-09 16:19:18 -07:00
Terry W Brady
d7739c376f missing parameter exception 2018-05-09 15:35:36 -07:00
Terry W Brady
3ab889670e rm unneeded decl 2018-05-09 15:05:47 -07:00
Terry W Brady
ed5c43226a change ret code for empty 2018-05-09 14:53:24 -07:00
Terry W Brady
48de581514 comment placeholder 2018-05-09 14:26:04 -07:00
Terry W Brady
c455c59df0 activate ignored test 2018-05-09 14:22:04 -07:00
kshepherd
8c9e6afa53 Merge pull request #2032 from mwoodiupui/DS-3795
[DS-3795] Update jackson-databind due to known vulnerabilities.
2018-05-10 08:58:21 +12:00
Terry W Brady
d29666d74f placeholder for 204 checks 2018-05-09 13:05:59 -07:00
Terry W Brady
6b983bfee9 format exception output 2018-05-08 16:31:42 -07:00
Terry W Brady
07e59b82a5 Add 422 return 2018-05-08 16:20:04 -07:00
Terry W Brady
69c62d33ca add initial exception 2018-05-08 15:55:41 -07:00
Bill Tantzen
e5641262ef DS-3905; add a custom RestController 2018-05-08 15:12:41 -05:00
Mark H. Wood
5cda7abed4 [DS-3795] Update zookeeper (even though not used) to address known vulnerabilities. 2018-05-08 12:28:55 -04:00
Mark H. Wood
a3fb9f5c3a [DS-3795] Update ant to address known vulnerabilities. 2018-05-08 12:28:55 -04:00
Mark H. Wood
310e5d8579 [DS-3795] Update jackson-databind due to known vulnerabilities. 2018-05-08 12:28:55 -04:00
Tim Donohue
598f35b267 Merge pull request #2050 from Georgetown-University-Libraries/ds3903m
[DS-3903] Port to master, Legacy Rest Jar Resolution
2018-05-08 11:01:00 -05:00
Tim Donohue
a5a3dda2fd Remove obsolete comment. Minor alignment fix 2018-05-08 09:01:27 -05:00
Terry W Brady
e5eb901065 clarify specific checks for desc objs 2018-05-07 15:54:53 -07:00
Terry W Brady
a7c81129f4 update based on review 2018-05-07 15:45:01 -07:00
Terry W Brady
d631f33d64 Handle empty child arrays 2018-05-07 15:38:53 -07:00
kshepherd
d64ebe2788 Merge pull request #2001 from minurmin/DS-3511-master
DS-3511: Fix HTTP 500 errors on REST API bitstream updates (7.0)
2018-05-08 09:39:02 +12:00
Terry W Brady
71281d2f09 mirror link.collections tests 2018-05-07 14:34:21 -07:00
Terry W Brady
cc48340fcc rem unnecessary ref 2018-05-07 10:48:36 -07:00
Terry W Brady
74ddde6c7a normalize endpoint link name 2018-05-07 09:44:13 -07:00
Terry W Brady
4dd3bcbbfd add converter 2018-05-07 09:30:27 -07:00
Terry W Brady
129a6a5d1f subcomm links 2018-05-07 09:08:09 -07:00
Terry W Brady
d3f150e2f9 pr port 2018-05-07 08:25:30 -07:00
Tim Donohue
b60fecbb0a Merge pull request #2047 from kshepherd/ds-2862_fix_legacy_embargo_checks_master_port
[DS-2862] Apply DSPR#2000 changes manually and fix style for master port
2018-05-03 10:59:31 -05:00
Kim Shepherd
c96e1598ec [DS-2862] Fix line length of comment on line 150 to conform to checkstyle rules 2018-05-03 19:12:29 +12:00
Kim Shepherd
da117687e8 [DS-2862] Apply DSPR#2000 changes manually and fix style for master port (cherry-pick resulted in conflicts due to other changes in master) 2018-05-03 18:42:58 +12:00
kshepherd
295da5e14a Merge pull request #2002 from KingKrimmson/DS-3877
DS-3877 Trim bitstream name during filter-media comparison
2018-05-03 17:51:35 +12:00
kshepherd
a6fd4c07f4 Merge pull request #2040 from kshepherd/ds-3734_last_modified_timestamp_master_port
DS-3734 Fixed missing trigger of item last modified date when adding …
2018-04-30 13:38:09 +12:00
Kim Shepherd
68cca2c11c [DS-3734] Fix checkstyle issues for master port 2018-04-30 11:59:20 +12:00
Christian Scheible
0f752b4f62 DS-3734 Fixed missing trigger of item last modified date when adding a bitstream. 2018-04-30 11:31:53 +12:00
kshepherd
c293756a45 Merge pull request #2037 from kshepherd/ds-3556_ds-3733_xalan_rollback_master_port
Ds 3556 ds 3733 xalan rollback master port
2018-04-26 08:37:48 +12:00
Per Broman
e445801de3 [DS-3556] Rollback of Xalan from 2.7.2 to 2.7.0 to fix DS-3556 and DS-3733 2018-04-25 19:53:27 +00:00
Ilja Sidoroff
426d21a1c6 Add option to select citation page format (LETTER or A4) 2018-04-24 01:14:52 +00:00
kshepherd
49185db7e9 Merge pull request #1997 from mwoodiupui/DS-3832
[DS-3832] Upgrade to GeoIP2.
2018-04-19 09:49:35 +12:00
Mark H. Wood
9d5910c010 [DS-3832] Don't spew stack traces for simple exceptions. 2018-04-18 16:42:38 -04:00
Tim Donohue
81b99a0619 Merge pull request #2023 from kshepherd/ds-3800_master_port
[DS-3800] master port of pull/1914
2018-04-16 09:14:22 -05:00
Kim Shepherd
36c7c678f6 [DS-3800] Port to master -- removed commented lines accidentally left in 2018-04-15 17:19:42 +12:00
Kim Shepherd
4a6d9ce11e [DS-3800] Port to master -- some changes by hand due to checkstyle differences 2018-04-15 17:16:51 +12:00
Tim Donohue
b00a914b8f Merge pull request #2022 from kshepherd/ds-3662_master_port
[DS-3662] DSpace 'logging in' without password or with non-existent e…
2018-04-13 08:40:37 -05:00
Kim Shepherd
04181ef271 [DS-3662] DSpace 'logging in' without password or with non-existent e-mail using Shib and Password authentication (master port) 2018-04-13 12:07:14 +12:00
kshepherd
8218b1ce24 Merge pull request #2019 from tdonohue/DS-3770-master-port
[DS-3770] always uncache item after performed curation task (port to master)
2018-04-13 09:55:51 +12:00
Tim Donohue
191f6ace28 [DS-3770] always uncache item after performed curation task for better performance 2018-04-12 15:24:03 +00:00
kshepherd
d30f455c23 Merge pull request #1912 from kardeiz/fix-workflow-sql
[DS-3788] drop indexes, update, recreate
2018-04-12 08:19:11 +12:00
kshepherd
1d2705bb0a Merge pull request #2015 from kshepherd/ds-3710_master_port
DS-3710 Fix ehcache config conflict (port to master)
2018-04-09 17:11:41 +12:00
Chris Herron
fd4608c9e0 DS-3710 Fix ehcache config conflict 2018-04-09 16:39:43 +12:00
kshepherd
b0d3a0f6c7 Merge pull request #1940 from mwoodiupui/DS-3694
[DS-3694] Clean up EHCache configuration mess
2018-04-09 15:44:48 +12:00
Tim Donohue
f203ddcd4c Merge pull request #1900 from jmarton/DS-3790
[DS-3790] include remote IP value in debug log for IP authentication
2018-04-03 10:51:56 -05:00
Jozsef Marton
4a4bd26479 [DS-3790] include remote IP and useProxies configuration value in debug log for IP authentication 2018-04-02 23:49:34 +02:00
Tim Donohue
68901a2319 Merge pull request #1991 from Georgetown-University-Libraries/ds3811m2
[DS-3811] port pr 1934 to master
2018-04-02 10:16:51 -05:00
Tim Donohue
b05c94d0b4 Merge pull request #2009 from Georgetown-University-Libraries/ds3880
[DS-3880] ignore .checkstyle
2018-03-29 13:51:52 -05:00
Mark H. Wood
79d11cbe5b [DS-3832] Clean up more references to v1 database. 2018-03-29 13:29:06 -04:00
Terry Brady
cfb8cbff91 move change to eclipse section 2018-03-29 10:04:38 -07:00
Mark H. Wood
d628ffee38 [DS-3832] Fetch and use GeoLite v2 City database. 2018-03-29 12:49:44 -04:00
Terry W Brady
dc61dc8a17 ignore .checkstyle 2018-03-28 21:26:06 -07:00
Terry W Brady
55b8826646 port pr to master 2018-03-28 21:21:55 -07:00
kshepherd
7d30cef57b Merge pull request #1804 from saiful-semantic/patch-1
Change Content-Type in OAI-PMH Response
2018-03-29 11:03:41 +13:00
Chris Herron
80337f8d6f DS-3877 Trim bitstream name during filter-media comparison (prevent duplicate bitstream generation) 2018-03-28 10:27:27 -04:00
Mark H. Wood
6b9cfec8c6 [DS-3832] Recast test support classes. 2018-03-27 21:14:49 -04:00
Miika Nurminen
22bb9a5751 DS-3511: Add context.complete() to updateBitstreamData and deleteBitstreamPolicy to prevent HTTP 500 response on REST updates 2018-03-27 20:56:43 +03:00
Mark H. Wood
074337f167 [DS-3832] Upgrade to GeoIP2. 2018-03-21 15:49:38 -04:00
Tim Donohue
0fb23c677e Merge pull request #1945 from tdonohue/latest_postgres_jdbc
DS-3854: Update to latest PostgreSQL JDBC driver
2018-03-21 13:47:57 -05:00
Tim Donohue
d44b9aa29d Merge pull request #1985 from mwoodiupui/DS-3868
[DS-3868] Missing Hibernate dependencies -- 'ant fresh_install' fails
2018-03-21 13:44:22 -05:00
Tim Donohue
c3d567c31e Merge pull request #1989 from Georgetown-University-Libraries/ds3704m
[DS-3704] port pr 1854 to master
2018-03-16 15:29:20 -05:00
Tim Donohue
b00dbd07d6 Merge pull request #1988 from Georgetown-University-Libraries/ds3714m
[DS-3714] port pr 1862 to master
2018-03-16 15:24:55 -05:00
Tim Donohue
8fb55e95f2 Merge pull request #1987 from Georgetown-University-Libraries/ds3783m
[DS-3713] Master port or PR 1863
2018-03-16 15:21:18 -05:00
Terry W Brady
5f5688e5fd port pr 1854 2018-03-16 12:43:28 -07:00
Terry W Brady
06e99ebfb7 fix checkstyle 2018-03-16 12:30:59 -07:00
Terry W Brady
8f689efc4e port pr 1862 2018-03-16 12:15:15 -07:00
Terry W Brady
2779205c0a port from 6x 2018-03-15 15:03:59 -07:00
Mark H. Wood
dff155a9d9 [DS-3868] Use a newer version of hibernate-validator*, symbolize version, move to parent. 2018-03-15 10:58:57 -04:00
Mark H. Wood
0a84b32b17 [DS-3868] Add dependencies needed in non-JEE environment. 2018-03-15 09:53:49 -04:00
Tim Donohue
b5f86ebb13 Merge pull request #1975 from tdonohue/code_style_for_unit_tests
Update Unit Tests to align with new Code Style
2018-03-09 10:34:12 -06:00
PTrottier
79f3c9e753 [DS-3841] REBASE enable CORS header for security controller (#1983)
* set current user on the context too

* enable cors on security configuration, add exposition of authorization header

* Address style and re add cors

* Fix cors() line

* Remove redundant code for setting eperson
2018-03-08 16:43:27 -06:00
Tim Donohue
4a5dfcff64 Per feedback, perform checkstyle *after* tests by chaning bind phase to verify. 2018-03-08 11:38:09 -06:00
Tim Donohue
47b9e04a36 Fix dspace-spring-rest unit tests to align with code style 2018-02-28 11:38:35 -06:00
Tim Donohue
5777acb743 Fix dspace-services unit tests to align with code style 2018-02-28 11:38:34 -06:00
Tim Donohue
2d425c4518 Fix dspace-oai unit tests to align with code style 2018-02-28 11:38:34 -06:00
Tim Donohue
3e45d113dc Fix dspace-api unit tests to align with code style 2018-02-28 11:38:22 -06:00
Tim Donohue
2063632bac Enable Checkstyle for Unit Test source code. Also enable suppression configuration to turn off indentation checks for unit tests 2018-02-28 10:49:29 -06:00
Tim Donohue
d7095844a8 Update to latest PostgreSQL JDBC driver 2018-02-26 20:28:09 +00:00
Tim Donohue
8019087c55 Merge pull request #1967 from mwoodiupui/DS-3852-7_x
[DS-3852] OAI indexer message not helpful in locating problems
2018-02-26 09:31:22 -06:00
Mark H. Wood
a2314579e9 [DS-3852] Give more information about the item just indexed, to help identify it in case of problems.
07b050c
2018-02-24 17:46:46 -05:00
Mark H. Wood
f765acf844 [DS-3694] Exclude problematic JAR pulled into lib/ by dspace-rest 2018-02-22 11:47:23 -05:00
Mark H. Wood
b1742340c3 [DS-3694] Replace an inappropriate system property with a local Hibernate/EHCache property 2018-02-22 11:47:23 -05:00
Mark H. Wood
033b023b81 [DS-3694] Remove huge blocks of commentary that obscure the settings.
This includes much sample configuration for distributed caching which
DSpace has never used, and documentation of EHCache itself.  If you
want to know more about EHCache, consult its own documentation sources.
2018-02-22 11:47:23 -05:00
Mark H. Wood
781a26b56d [DS-3694] Configure CacheManagers to suppress version check.
Don't set corresponding system property -- it's the wrong way to do
this in Servlet code, and anyway the manager is already initialized
before we can set it.
Remove fallback code that should never execute because injection is @Required.
2018-02-22 11:43:51 -05:00
Tim Donohue
b2f83303d6 Merge pull request #1955 from mwoodiupui/DS-3836
[DS-3836] dspace-rest old dependencies break command line
2018-02-22 10:27:58 -06:00
Tim Donohue
fa6dc2d07d Merge pull request #1952 from DSpace/code-style-fixes
Align Java code with new Code Style
2018-02-22 09:27:11 -06:00
Tim Donohue
ac0ef0594c Enable Checkstyle verification for all builds. 2018-02-21 15:23:59 -06:00
Tim Donohue
2d5b66df96 Minor bug fix for dspace-api updates 2018-02-21 15:23:59 -06:00
Tim Donohue
8a48f782ea Fix dspace-api module per new code style 2018-02-21 15:23:58 -06:00
Tim Donohue
8ffc97f7f9 Fix dspace-swordv2 module per new code style 2018-02-21 14:56:49 -06:00
Tim Donohue
9c5e9e8f4e Fix dspace-sword per new code style 2018-02-21 14:56:49 -06:00
Tim Donohue
1055dde94c Fix dspace-solr module per new code style 2018-02-21 14:56:49 -06:00
Tim Donohue
f1058802f2 Fix dspace-services module per new code style 2018-02-21 14:56:48 -06:00
Tim Donohue
e09d047227 Restore newlines at end of a few files. These were accidentally removed in previous commits and caused coveralls issues in Travis. 2018-02-21 14:56:48 -06:00
Tim Donohue
2c3ac0af7c Fix (legacy) dspace-rest module per new code style 2018-02-21 14:56:48 -06:00
Tim Donohue
3e5f3acd79 Fix dspace-rdf module per new code style 2018-02-21 14:56:47 -06:00
Tim Donohue
739d598f14 Fix dspace-oai module per new code style 2018-02-21 14:56:47 -06:00
Tim Donohue
de4e8bc3d1 Fix dspace-spring-rest module per new code style 2018-02-21 14:56:46 -06:00
Tim Donohue
14a29bb303 Updated version of Checkstyle and maven-checkstyle-plugin 2018-02-21 12:24:39 -06:00
Tim Donohue
fd28ccd5a8 Minor modifications per testing against codebase. Remove indentation exception for throws. Disable Javadocs test for public methods. 2018-02-21 12:24:39 -06:00
Tim Donohue
a6ef3ff10e Minor enhancements based on comments from others. 2018-02-21 12:24:39 -06:00
Tim Donohue
288a33a70d Initial version of CheckStyle configuration 2018-02-21 12:24:39 -06:00
kshepherd
112019f403 Merge pull request #1961 from hardyoyo/DS-3839-revised-master
[DS-3839] moved the autoorient IM op to the top of the operations list
2018-02-20 16:04:46 +13:00
Hardy Pottinger
4cc58b6764 [DS-3839] moved the autoorient IM op to the top of the operations list, where it belongs 2018-02-19 17:40:58 -06:00
Andrea Bollini
724e4cbc98 Merge pull request #1939 from atmire/DS-3817
DS-3817: Support the DSpace Cover page functionality in the bitstream endpoint
2018-02-16 17:54:28 +01:00
Andrea Bollini
dcc08406fc Merge pull request #1927 from Georgetown-University-Libraries/ds3764d
[DS-3764] Return Shibboleth SSO url when login fails, add re-direct to HAL login
2018-02-16 17:53:00 +01:00
Tim Donohue
25faee65c4 Merge pull request #1957 from hardyoyo/DS-3839-support-autoorient-for-imagemagick-thumbnails-dspace-master
[DS-3839] forward-porting DSPR#1956 for master branch
2018-02-16 09:30:53 -06:00
Hardy Pottinger
471adb44dd [DS-3839] forward-porting DSPR#1956 for master branch 2018-02-16 08:21:45 -06:00
Andrea Bollini
2a2fe0f352 Merge pull request #1898 from atmire/DS-3762_write-missing-tests
[DS-3762] fixed test for subCommunities
2018-02-15 17:57:22 +01:00
Andrea Bollini
5e9007015a remove final slash 2018-02-15 16:46:06 +01:00
Mark H. Wood
9d63206877 [DS-3836] Align jersey artifact versions through a property; upgrade jersey-spring3 to jersey-spring4. 2018-02-14 11:36:03 -05:00
Tim Donohue
8fa2aa34ba Merge pull request #1953 from mwoodiupui/DS-3524-2
[DS-3524] Align versions of Apache Poi artifacts using a property.
2018-02-14 09:58:47 -06:00
Mark H. Wood
b75e39db7c [DS-3524] Align versions of Apache Poi artifacts using a property.
I think that someone updated the Poi versions while I was converging
on the old versions.  Testing the branch can't find that, but testing
the merged trunk did.  We need to be more consistent in using symbolic
<version> values when related artifacts should be on the same version.
2018-02-14 10:28:31 -05:00
Mark H. Wood
022ef1866d Merge pull request #1936 from mwoodiupui/DS-3524
[DS-3524] Restore maven-enforcer-plugin on rest7
2018-02-14 08:27:23 -05:00
Tim Donohue
fb8eb032d8 Merge pull request #1950 from mwoodiupui/DS-3833
[DS-3833] Logging: remove Cocoon debris, merge Spring with main log
2018-02-09 09:25:20 -06:00
Mark H. Wood
0f72fe6a22 [DS-3833] Remove log appender A3; Spring will default to A1. 2018-02-08 09:41:55 -05:00
Mark H. Wood
29907299da Merge pull request #1933 from mwoodiupui/DS-3434-7
[DS-3434] DSpace fails to start when a database connection pool is supplied through JNDI
2018-02-07 14:19:50 -05:00
Mark H. Wood
a8cd35dd13 Merge pull request #1944 from mwoodiupui/DS-3720
[DS-3720] Remove all traces of ContiPerf.
2018-02-07 12:08:04 -05:00
Tim Donohue
c3a4eee031 Merge pull request #1930 from Georgetown-University-Libraries/ds3807a
[DS-3807 ] Get legacy /rest service running on master branch
2018-02-05 12:37:26 -06:00
Mark H. Wood
b001b21013 Merge pull request #1948 from mwoodiupui/DS-3803
[DS-3803] Remove db.jndi setting from dspace.cfg
2018-02-05 12:17:46 -05:00
Alan Orth
ed6b7b3e24 DS-3803 Remove db.jndi setting from dspace.cfg
As of DSpace 6.x this setting is no longer used and is not customizable
by the user. Now DSpace always looks for a pool named "jdbc/dspace" in
JNDI and falls back to creating a pool with the db.* settings located
in dspace.cfg.

See: https://wiki.duraspace.org/display/DSDOC6x/Configuration+Reference
See: dspace/config/spring/api/core-hibernate.xml
See: https://jira.duraspace.org/browse/DS-3434
2018-02-05 10:59:17 -05:00
Tim Donohue
974b409c38 Merge pull request #1943 from tdonohue/update-poi
DS-3795: Update Apache POI library to latest version
2018-02-02 10:08:37 -06:00
Mark H. Wood
a1aae4a82b [DS-3720] Remove all traces of ContiPerf. 2018-02-01 16:37:02 -05:00
Tim Donohue
3145cf6877 DS-3795: Update Apache POI library to latest version 2018-02-01 16:52:47 +00:00
Luigi Andrea Pascarelli
e2fdc751c1 Merge pull request #1929 from 4Science/DS-3755
[DS-3755] integration test for submission configuration endpoint
2018-02-01 17:40:03 +01:00
Terry W Brady
254cc413a9 Add int test 2018-01-31 16:42:27 -08:00
Luigi Andrea Pascarelli
ddd2fff23d DS-3755 introduce constant to define request mapping regex 2018-01-31 11:51:38 +01:00
Luigi Andrea Pascarelli
9e3e653906 DS-3755 remove try/catch to avoid unexpected NullPointerException 2018-01-31 11:28:14 +01:00
Luigi Andrea Pascarelli
77dab9c056 DS-3755 fix message 2018-01-31 11:09:38 +01:00
Luigi Andrea Pascarelli
6bf5019cdf DS-3755 minor changes 2018-01-30 19:22:02 +01:00
Luigi Andrea Pascarelli
51823d1a9e DS-3755 remove api class; add javadoc; 2018-01-30 19:18:49 +01:00
Luigi Andrea Pascarelli
34269359c4 DS-3755 rename method in differenceInSubmissionFields (was "diff") 2018-01-30 17:45:32 +01:00
Luigi Andrea Pascarelli
5f1e6705ab DS-3755 minor comment 2018-01-30 17:40:14 +01:00
Luigi Andrea Pascarelli
4a38057756 DS-3755 add javadoc 2018-01-30 17:09:43 +01:00
Luigi Andrea Pascarelli
13a36607d2 DS-3755 renamed class into RestAddressableModel (was DirectlyAddressableRestModel)
DS-3755 add missing interface declaration (RestAddressableModel) for the search rest class
2018-01-30 11:36:10 +01:00
Luigi Andrea Pascarelli
feb2709682 DS-3755 remove the dspace.ui configuration (maybe in a future PR a dspace.path or a dspace.rest.url could be introduced) 2018-01-29 20:51:38 +01:00
Luigi Andrea Pascarelli
d690e677b8 DS-3755 split method to cut down on a number of changes in the PR 2018-01-29 20:29:12 +01:00
Yana De Pauw
79208c777e DS-3817: DSpace citation cover page - small fixes 2018-01-29 15:31:34 +01:00
Yana De Pauw
028e72d1b6 DS-3817: Support the DSpace Cover page functionality in the bitstream content endpoint 2018-01-29 15:01:29 +01:00
Mark H. Wood
d0fe0349ee [DS-3524] Converge some common dependencies' versions. 2018-01-26 17:11:13 -05:00
Mark H. Wood
591ec33278 [DS-3524] Re-enable enforcement of dependency convergence. 2018-01-26 15:01:04 -05:00
Luigi Andrea Pascarelli
8630f12990 DS-3755 change response content for upload (now return the full object);
DS-3755 add links for the resource returned by the POST and PATCH method;
2018-01-26 18:08:21 +01:00
Luigi Andrea Pascarelli
4a615ec234 DS-3755 add missed link support for embedded object findrelation 2018-01-26 14:05:12 +01:00
Luigi Andrea Pascarelli
3a09cd5f46 DS-3755 add test to check links on embeddedpage when the resource is retrieved with findrel 2018-01-26 13:28:21 +01:00
Luigi Andrea Pascarelli
0cfa569b4e DS-3755 add missed link support 2018-01-26 11:54:28 +01:00
Terry W Brady
fe3a7722d1 remove methods that are not applicable 2018-01-25 15:29:45 -08:00
Mark H. Wood
e5b30f3398 [DS-3434] DSpace fails to start when a databse connection pool is supplied through JNDI 2018-01-25 13:59:31 -05:00
Tim Donohue
e4f579319d Adding in name of bean to comment. 2018-01-25 12:30:20 -06:00
Terry Brady
a0df98776b comment updated 2018-01-25 10:18:26 -08:00
Luigi Andrea Pascarelli
19f44661eb DS-3755 fix compilation errors 2018-01-25 17:21:35 +01:00
Luigi Andrea Pascarelli
a42ca56675 remove no sense context parameter 2018-01-25 17:21:02 +01:00
Luigi Andrea Pascarelli
87ddad01be Merge DS-3755 with master branch 2018-01-25 16:44:00 +01:00
Terry W Brady
815569b28f comment out bean due to service start issue 2018-01-24 14:32:06 -08:00
Terry Brady
04dd484357 Merge pull request #1907 from hardyoyo/DS-3455-remove-elastic-search-stats
[DS-3455] refactored out all mention of Elastic Search, code and configs,
2018-01-24 13:52:02 -08:00
Hardy Pottinger
9c71e4e2aa [DS-3455] added back accidentally-deleted comment at the request of Mark Wood 2018-01-24 14:33:49 -06:00
Luigi Andrea Pascarelli
c2a81a4c46 DS-3755 implemented integration test for submission configuration 2018-01-24 19:25:24 +01:00
Terry W Brady
96bb5eeca7 Update the description for loginPageURL 2018-01-24 10:22:56 -08:00
Terry W Brady
80f3df4740 Consolidate success handler 2018-01-24 10:13:31 -08:00
Terry W Brady
ec7781156c refine return url 2018-01-24 10:06:22 -08:00
Terry W Brady
dfba61fa87 referer target 2018-01-24 09:56:24 -08:00
Terry W Brady
2ac477e6af Update target return url 2018-01-24 09:38:47 -08:00
Terry W Brady
235b85e201 use loginPageURL 2018-01-24 09:16:22 -08:00
Terry W Brady
3d135a4114 Add redirect behavior 2018-01-23 16:36:59 -08:00
Terry W Brady
fa94297a80 fix location
Refine location path
2018-01-23 16:36:26 -08:00
Terry W Brady
a69bf2e21b Add location header
format location

Host vs Origin
2018-01-23 16:35:51 -08:00
Tim Donohue
cecf494428 Merge pull request #1909 from hardyoyo/DS-3795-bump-jackson-version
[DS-3795] bumped google-http-client-jackson2 to 1.23.0
2018-01-23 14:27:52 -06:00
Luigi Andrea Pascarelli
6cebabdc6d DS-3699 add implementation for "collections" linked entities endpoint 2018-01-23 19:51:39 +01:00
Tim Donohue
42894a5e39 Merge pull request #1921 from Georgetown-University-Libraries/ds3804
[DS-3804] Jar dependency issues running DSpace 7x REST
2018-01-23 11:10:48 -06:00
Hardy Pottinger
1605aebc95 [DS-3795] whoops, let's pick an actual version number for google-api-services-analytics, heh 2018-01-22 14:46:58 -06:00
Hardy Pottinger
a419ff7608 [DS-3795] bumped bumped other Google API dependencies to 1.23.0, as per suggestion of tdonohue 2018-01-22 14:29:09 -06:00
Tim Donohue
694f31cad1 Merge pull request #1908 from hardyoyo/bump-commons-fileupload-version
[DS-3795] increased version for commons-fileupload
2018-01-19 11:05:22 -06:00
Terry W Brady
00757b862c remove jackson exclusion per review comments 2018-01-19 08:47:14 -08:00
Terry W Brady
7a31731f2f Add comment per review 2018-01-19 08:34:43 -08:00
Terry Brady
4e156c6594 Merge pull request #1920 from atmire/DS-3542_REST-authentication-empty-request-error
DS-3542: Fix REST authentication error with empty request + test
2018-01-19 08:15:42 -08:00
Tim Donohue
72e441f55a Merge pull request #1924 from mwoodiupui/DS-3667-7
[DS-3667] Document fundamental persistence support classes.
2018-01-19 08:35:53 -06:00
Mark H. Wood
da0e2ba073 [DS-3667] Take up PR comments and document another class. 2018-01-18 15:53:36 -05:00
Mark H. Wood
f778467f82 [DS-3667] Document fundamental persistence support classes. 2018-01-18 15:49:36 -05:00
Terry W Brady
3c8744cc9a Add jackson version 2018-01-18 10:24:24 -08:00
Terry W Brady
e57b4fbe3b old ver of jackson in oai 2018-01-18 10:04:04 -08:00
Andrea Bollini
871acdf5bb Merge pull request #1923 from atmire/DS-3489_Fix-EmbeddedPage-links
DS-3489: Fix links of resources in embedded page
2018-01-18 18:02:48 +01:00
Tom Desair
36af89cbaa DS-3489: Make sure the HalLinkService also visits all elements inside an EmbeddedPage 2018-01-18 17:20:11 +01:00
Andrea Bollini
8d7c6bfbc1 Merge pull request #1881 from atmire/DS-3489_Read-only-Search-REST-endpoint
DS-3489: Read-only search rest endpoint
2018-01-18 12:24:06 +01:00
Terry W Brady
b643df8ed4 exclude logback 2018-01-17 15:50:09 -08:00
Terry W Brady
64443e0a45 jul-to-slf4j excl 2018-01-17 15:19:32 -08:00
Terry W Brady
8d663ba02a slf4j exclusion 2018-01-17 14:54:29 -08:00
Tom Desair
787473674d DS-3542: Fix REST authentication error with empty request + test 2018-01-17 11:00:51 +01:00
Jacob Brown
ac0e9e23eb drop indexes, update, recreate 2018-01-05 11:24:36 -06:00
Hardy Pottinger
e9396a9d05 [DS-3795] bumped google-http-client-jackson2 to 1.23.0 2018-01-03 12:00:16 -06:00
Hardy Pottinger
0a00367b0f increased version for commons-fileupload 2018-01-02 14:37:37 -06:00
Hardy Pottinger
8fb788dcc5 refactored out all mention of Elastic Search, code and configs,
removed ES dependency from the dspace-api pom.xml, added lucene-core 4.10.3 instead
2018-01-02 12:23:31 -06:00
Raf Ponsaerts
2250ae4efb [DS-3762] applied the requested changes 2017-12-19 17:40:37 +01:00
Luigi Andrea Pascarelli
af9ce48ffb fix delete READ policy if patch 2017-12-19 15:42:18 +01:00
Andrea Bollini
50d802f299 Merge pull request #1897 from 4Science/DS-3787
DS-3787 Impossible to retrieve the community or collection logo
2017-12-14 16:03:36 +01:00
Tom Desair
f6b7805b88 DS-3489: Fixes after rebase on master 2017-12-13 23:39:12 +01:00
Tom Desair
a45709ae90 DS-3489: Move link creation to HAL link factory 2017-12-13 20:52:47 +01:00
Tom Desair
5297c50eeb DS-3489: Update tests to new builders 2017-12-13 20:52:47 +01:00
Raf Ponsaerts
443757a6a8 [DS-3489] fixed some issues with the implementation and fixed the tests 2017-12-13 20:52:47 +01:00
Raf Ponsaerts
f76df428f4 [DS-3489] Applied the fixes with regards to the metadata field name in the sort options, the extra api/discover/search/facets endpoint, the removal of hasMore field and the rename of searchResults to objects 2017-12-13 20:52:47 +01:00
Tom Desair
a0433f72ef DS-3489: Added HAL link factories for AuthorityEntryResource and SubmissionSectionResource 2017-12-13 20:52:34 +01:00
Raf Ponsaerts
f9041df1c8 [DS-3489] added test for the hitHighlights to the DiscoverQueryBuilderTest class 2017-12-13 20:52:34 +01:00
Raf Ponsaerts
1dfec4d4e0 DS-3489: Made the next tests and fixed the hitHighlight implementation 2017-12-13 20:52:34 +01:00
Raf Ponsaerts
cd1a84210f DS-3489: Finished writing the tests for DiscoveryRestController and wrote commentary for them 2017-12-13 20:52:34 +01:00
Tom Desair
5e9e1c78f9 DS-3489: Added unit test for DiscoverQueryBuilder 2017-12-13 20:52:34 +01:00
Tom Desair
413a52aff5 DS-3489: Embedded facet entries should also expose links 2017-12-13 20:52:34 +01:00
Tom Desair
b75aa96a3a DS-3489: Embedded facet entries should also expose links 2017-12-13 20:52:33 +01:00
Tom Desair
89968e291e DS-3489: Fix sorting search results 2017-12-13 20:52:33 +01:00
Tom Desair
cc93b8a64b DS-3489: Fix date facet values results 2017-12-13 20:52:33 +01:00
Tom Desair
b1675c3aa8 DS-3489: Minor refactoring and code cleanup 2017-12-13 20:52:33 +01:00
Tom Desair
81b833c817 DS-3489: Do not expose content twice 2017-12-13 20:52:33 +01:00
Tom Desair
1799a59aa2 DS-3489: Fix facet search link 2017-12-13 20:52:33 +01:00
Tom Desair
c839c1ce03 DS-3489: Fix facet results pagination 2017-12-13 20:52:33 +01:00
Tom Desair
09fc4ee934 DS-3489: Refactor HAL Link factories and HALResource 2017-12-13 20:52:33 +01:00
Tom Desair
cf73560c9e DS-3489: Refactored HAL Link factories 2017-12-13 20:52:33 +01:00
Tom Desair
659a6f4cb2 DS-3489: Update search objects response document 2017-12-13 20:52:33 +01:00
Tom Desair
0a5e5f3052 DS-3489: Fix facet value pagination 2017-12-13 20:52:32 +01:00
Tom Desair
c96886b598 DS-3489: Move DSpaceResource links to LinkFactory 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
a6d8808c49 DS-3489: Implemented a REST API for the facets values 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
3d67337685 DS-3489 Started working on exposing the facet values 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
6d913aa05b [DS-3489] Wrote the tests and cleaned up the code 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
f85daef824 [DS-3489] Implemented the facet configuration in the rest API. Currently showing name and type in the list of facets 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
bc488316d7 [DS-3489] Wrote tests for the added classes. Tests which require a dspace kernel or spring are left out 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
b9f6334e8c [DS-3489] Made the implementation for REST with the factory methods included 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
978b3d75c9 DS-3489: Bugfixed the links in the root level of the rest API, included all files 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
548407fdd7 DS-3489: Added an @Override equals and hashCode function to rest classes 2017-12-13 20:52:32 +01:00
Raf Ponsaerts
ee34bb07e7 DS-3489: Added license headers for the build to pass and changed a test to be consistent with a new implementation 2017-12-13 20:52:31 +01:00
Raf Ponsaerts
fbbead6137 DS-3489: Bugfixed the links in the root level of the rest API 2017-12-13 20:52:31 +01:00
Raf Ponsaerts
324403b663 DS-3489: Wrote tests for the added classes. Tests which require a dspace kernel or spring are left out 2017-12-13 20:52:31 +01:00
Raf Ponsaerts
01a9d8507b DS-3489: Made the implementation for REST with the factory methods included 2017-12-13 20:52:31 +01:00
Tom Desair
53cdcddd8e DS-3489: Adding facet values to search result part 2
DS-3489: Added trace logging
2017-12-13 20:52:31 +01:00
Tom Desair
78d85140a9 DS-3489: Adding facet values to search result 2017-12-13 20:52:31 +01:00
Tom Desair
93bc51383a DS-3489: Correct the SearchFilterResolver and sorting validation
DS-3489: self-link fix
2017-12-13 20:52:31 +01:00
Tom Desair
9359244854 DS-3489 Use authority label when searching on authority ID 2017-12-13 20:52:31 +01:00
Tom Desair
7df6201fd4 DS-3489: Converting Discovery results to REST HAL objects part 2 2017-12-13 20:52:31 +01:00
Tom Desair
f37a7868ab DS-3489: Converting Discovery results to REST HAL objects part 1
DS-3696: Improve base REST url implementation

DS-3696: Calculate link outside loop
2017-12-13 20:52:31 +01:00
Tom Desair
7871b618c4 DS-3489: DiscoverQueryBuilder implementation part 1 2017-12-13 20:52:30 +01:00
Tom Desair
6b66f1282b DS-3489: Add discover link to Root links 2017-12-13 20:52:30 +01:00
Tom Desair
4299ff9ec3 DS-3489: Added DiscoveryRestController and custom SearchFilterResolver REST parameter resolver 2017-12-13 20:52:30 +01:00
Luigi Andrea Pascarelli
90c6ed1478 D4CRIS-339 first implementation to delete method support; added delete for workspaceitem 2017-12-13 20:30:47 +01:00
Luigi Andrea Pascarelli
151d45d0d0 D4CRIS-416 first implementation of the contract (missing bitstream move operation and replace operation on attribute at accessConditions level) 2017-12-13 20:11:41 +01:00
Raf Ponsaerts
a63dde05e0 [DS-3762] fixed test for subCommunities 2017-12-13 17:38:41 +01:00
Luigi Andrea Pascarelli
d521163760 D4CRIS-416 fix set declared field with reflection 2017-12-12 22:51:36 +01:00
Andrea Bollini
a76500937b Merge pull request #22 from atmire/DS-3787
DS-3787: Cleanup deleted bitstreams after test
2017-12-12 17:30:24 +01:00
Luigi Andrea Pascarelli
f6b07a316a D4CRIS-416 make accetanceDate readonly; change path and named operation to add/remove/replace license to be compliance with the new contract; 2017-12-12 17:28:49 +01:00
Luigi Andrea Pascarelli
8ee3257c28 D4CRIS-416 refactoring to accept "from" attribute from operation; 2017-12-12 15:52:57 +01:00
Luigi Andrea Pascarelli
2e215bfd17 D4CRIS-416 refactoring to accept "from" attribute from operation; introduce constants to discriminate patch operation implementation; finalize move operation for metadata; 2017-12-12 15:19:57 +01:00
Luigi Andrea Pascarelli
e8a17a0aac D4CRIS-416 introduce move operation for metadata (describe step and upload step) 2017-12-12 13:18:35 +01:00
Tom Desair
386327369f DS-3787: Cleanup deleted bitstreams after test 2017-12-12 10:22:25 +01:00
Andrea Bollini
ad5463a664 DS-3787 set a default name for unnamed bitstreams (logos) 2017-12-12 01:21:15 +01:00
Andrea Bollini
c56a459a65 DS-3787 add tests to show the bug 2017-12-12 01:20:22 +01:00
Andrea Bollini
f051b764b5 Merge pull request #1893 from atmire/DS-3762_write-missing-tests
DS-3762: Write integration tests for initial endpoints
2017-12-11 23:43:37 +01:00
Luigi Andrea Pascarelli
54288d241a D4CRIS-416 introduce model class to manage patch operation deserialization 2017-12-11 17:04:31 +01:00
Luigi Andrea Pascarelli
4ff9027190 D4CRIS-416 manage request to add last element 2017-12-11 16:30:42 +01:00
Raf Ponsaerts
1271eb2a3a [DS-3762] implemented requested changes 2017-12-11 14:41:33 +01:00
Raf Ponsaerts
e61e6e7a1e [DS-3762] implemented changes 2017-12-11 14:20:45 +01:00
Andrea Bollini
aaafc1887b Merge pull request #1894 from atmire/DS-3781_Only-check-Flyway-once
DS-3781: Make sure Flyway is only executed once
2017-12-09 16:02:55 +01:00
Luigi Andrea Pascarelli
bdc4a19ad0 D4CRIS-416 first implementation to respect rest contract 2017-12-08 20:53:23 +01:00
Luigi Andrea Pascarelli
94372e65af D4CRIS-416 add comment with example 2017-12-08 20:52:38 +01:00
Luigi Andrea Pascarelli
16999ed800 D4CRIS-416 add stub move patch operation for metadata 2017-12-08 20:52:21 +01:00
Luigi Andrea Pascarelli
a31fa62bbc D4CRIS-416 first implementation to manage add/remove/replace workspaceitem-data-metadata as rest contract (not tested yet) 2017-12-07 22:51:31 +01:00
Luigi Andrea Pascarelli
db9fea71cc D4CRIS-416 try to manage path including "files" 2017-12-07 22:50:09 +01:00
Luigi Andrea Pascarelli
58b97597f0 D4CRIS-416 implements shifting to right 2017-12-07 22:48:58 +01:00
Luigi Andrea Pascarelli
2af59d1047 D4CRIS-357 implement validations 2017-12-06 17:38:04 +01:00
Luigi Andrea Pascarelli
e34e0cda9a add missing license header 2017-12-06 17:37:16 +01:00
Luigi Andrea Pascarelli
cb4121539a try to handle rights exception 2017-12-06 16:33:58 +01:00
Luigi Andrea Pascarelli
787d8e4a6f start to manage exception errors codes as provided into the Rest Contract for DSpace 7 2017-12-06 16:18:21 +01:00
Tom Desair
2d537abd7e DS-3762: Added test for Context.close() in try-with-resources block 2017-12-06 00:47:50 +01:00
Tom Desair
707bbe7108 DS-3781: Added test for Context.updateDatabase 2017-12-06 00:39:46 +01:00
Luigi Andrea Pascarelli
cef912143a DS-3743 fix exposition of qualdropvalue 2017-12-05 17:28:53 +01:00
Raf Ponsaerts
f4c07c947d [DS-3762] cleaned up unneccesary code and comments 2017-12-05 17:21:00 +01:00
Tom Desair
1dde73f55b DS-3762: Correct @author tag 2017-12-05 15:30:25 +01:00
Tom Desair
a478867804 [DS-3762] Adjust tests to new Builder API 2017-12-05 15:10:57 +01:00
Raf Ponsaerts
e070c2bd79 [DS-3762] made the findAuthorized tests to assert that no values get returned 2017-12-05 14:51:59 +01:00
Raf Ponsaerts
37016e6e9c [DS-3762] Added tests on every endpoint that a findOne lookup with a wrong UUID fails with a 404 error message 2017-12-05 14:51:59 +01:00
Raf Ponsaerts
fa1f2993c8 [DS-3762] Added extra tests using the new builders 2017-12-05 14:51:58 +01:00
Jonas Van Goolen
50c8e08da6 [DS-3762] Author update, + CRUDService implementation pre-loading 2017-12-05 14:51:58 +01:00
Jonas Van Goolen
c97f8c4320 [DS-3762] Refactoring for 1 generalised Builder 2017-12-05 14:51:58 +01:00
Raf Ponsaerts
3c8533d607 [DS-3762] Merge of all the tests and fixed for the travis build 2017-12-05 14:51:31 +01:00
Raf Ponsaerts
eaaffd403b [DS-3762] made a test for site endpoint 2017-12-05 14:51:24 +01:00
Raf Ponsaerts
078b71010a [DS-3762] added a page check to the metadataschemas endpoint and finalized the tests 2017-12-05 14:51:23 +01:00
Raf Ponsaerts
907501c280 [DS-3762] added clause in the metadataschemamatcher and added a new, ignored, test 2017-12-05 14:51:23 +01:00
Raf Ponsaerts
9a1ab3e9f6 [DS-3762] added tests for metadataschemas and added license headers for previous test classes 2017-12-05 14:51:23 +01:00
Raf Ponsaerts
f90772cb4a [DS-3762] added page checks to the item tests, finalized the ItemRestRepository tests 2017-12-05 14:51:23 +01:00
Raf Ponsaerts
63a62b9c36 [DS-3762] added a page check to the metadatafield, finalized the metadatafield endpoint tests 2017-12-05 14:51:23 +01:00
Raf Ponsaerts
06cae1627e [DS-3762] finalized Eperson tests 2017-12-05 14:51:23 +01:00
Raf Ponsaerts
00d3e095fb [DS-3762] added more clauses to the metadatafield tests 2017-12-05 14:51:23 +01:00
Raf Ponsaerts
f4b6b5d480 [DS-3762] added extra clauses for the EPerson matcher 2017-12-05 14:51:23 +01:00
Raf Ponsaerts
70529b154c [DS-3762] Finalized community endpoint tests, added test for /search/top and /search/subCommunities, though the latter one is on ignore 2017-12-05 14:51:22 +01:00
Raf Ponsaerts
e9b8457289 [DS-3762] added a not empty check on the collections of the community 2017-12-05 14:51:22 +01:00
Raf Ponsaerts
759d987332 [DS-3762] added an extra clause on the dc.title metadata field for the communities 2017-12-05 14:51:22 +01:00
Raf Ponsaerts
033a734fb5 [DS-3762] finalized testing for the CollectionRestRepository 2017-12-05 14:51:22 +01:00
Raf Ponsaerts
81e91d7f54 [DS-3762] added an extra clause in the collection matcher 2017-12-05 14:51:22 +01:00
Raf Ponsaerts
7b002d93eb [DS-3762] added clauses to the bitstream matcher 2017-12-05 14:51:22 +01:00
Jonas Van Goolen
1a6100bce1 [DS-3762] Additional testing, taking into account that "Unknown" needs to exist 2017-12-05 14:51:22 +01:00
Jonas Van Goolen
20a3b03b4f [DS-3762] Commit before generalising AbstractBuilder to also include the "DSpaceCRUDService" 2017-12-05 14:51:07 +01:00
Jonas Van Goolen
e4b164dc9c [DS-3762] Tests for api/eperson/groups endpoint 2017-12-05 14:50:59 +01:00
Tom Desair
364b940ac2 DS-3762: Fixed and added bitstream tests 2017-12-05 14:50:59 +01:00
Raf Ponsaerts
d2a7824ebf [DS-3762] added license headers 2017-12-05 14:50:59 +01:00
Raf Ponsaerts
6cfdcd3923 [DS-3762] wrote tests for the items endpoint 2017-12-05 14:50:59 +01:00
Raf Ponsaerts
dd3df70b0d [DS-3762] added pagination test for the community endpoint 2017-12-05 14:50:58 +01:00
Raf Ponsaerts
043882d079 [DS-3762] wrote tests for the community endpoint, the /api/core/communities/search is still missing as there is no implementation for it 2017-12-05 14:50:58 +01:00
Raf Ponsaerts
13c3da82f9 [DS-3762] added pagination test for the collection endpoint 2017-12-05 14:50:58 +01:00
Raf Ponsaerts
3c408de9c5 [DS-3762] Wrote tests for the collection endpoint. /api/core/collections/search is not implemented yet and thus not tested 2017-12-05 14:50:49 +01:00
Raf Ponsaerts
37a4e05b77 [DS-3762] added pagination test for bitstreams endpoint 2017-12-05 14:50:49 +01:00
Raf Ponsaerts
e2ff7fa2e8 [DS-3762] wrote all possible, accepting, tests for the bitstreams endpoint. See comments for failures 2017-12-05 14:50:48 +01:00
Raf Ponsaerts
00638f1b68 [DS-3762] wrote test for metadatafield endpoint 2017-12-05 14:50:48 +01:00
Raf Ponsaerts
f6d3568eaa [DS-3762] added pagination test and license headers 2017-12-05 14:50:48 +01:00
Raf Ponsaerts
729b8cc9a8 [DS-3762] added tests for the eperson endpoint and created the logic to automatically delete objects that were build with the provided builders 2017-12-05 14:50:48 +01:00
Tom Desair
0fcc056c99 DS-3781: Restore DSpace 6 code and make sure Flyway is only executed once 2017-12-04 21:02:31 +01:00
Andrea Bollini
ec6449f0d6 Merge branch 'atmire-DS-3651_Range-Header-support' 2017-12-03 04:48:42 +01:00
Andrea Bollini
52782e0342 Merge branch 'DS-3651_Range-Header-support' of https://github.com/atmire/DSpace into atmire-DS-3651_Range-Header-support 2017-12-03 03:36:02 +01:00
Andrea Bollini
8311ae207d Merge pull request #1873 from atmire/POC_stateless_sessions
DS-3542: Stateless sessions authentication
2017-12-02 22:11:03 +01:00
Luigi Andrea Pascarelli
14a99945c5 DS-3699 fix exposition of authority for field with different valuepairs in different form definition 2017-12-01 19:19:06 +01:00
Luigi Andrea Pascarelli
53dd2c2d24 DS-3699 add language configuration for field in submission form 2017-12-01 17:43:02 +01:00
Luigi Andrea Pascarelli
5e55dfa58f fix setup of language element tag on inputform (fix the wrong behaviour to not permits to get a custom list but only common_iso_languages) 2017-12-01 17:37:19 +01:00
Tom Desair
71b0bc4cc1 DS-3651: Correct Atmire @author tag 2017-11-30 14:11:00 +01:00
Tom Desair
ad0187ff8a DS-3651: Close database connection during download/streaming 2017-11-30 09:26:39 +01:00
Tom Desair
41a59ce03c DS-3651: Remove unnecessary catch 2017-11-29 17:59:31 +01:00
Tom Desair
b0bb8ebf9e DS-3651: Correct ControllerAdvice exception handling + tests 2017-11-29 17:51:48 +01:00
frederic
9b65d72fed DS-3651 Throw exceptions instead of catching 2017-11-29 13:34:02 +01:00
frederic
22ced228e8 DS-3651 Exceptions with @ControllerAdvice 2017-11-29 13:34:02 +01:00
Tom Desair
14e9bce865 DS-3651: Fixing imports and authors 2017-11-29 13:34:02 +01:00
Tom Desair
8fe17da0cf DS-3651: Check bitstream authorizatoins + tests 2017-11-29 13:34:02 +01:00
Tom Desair
f9236d75f8 DS-3651: Fix imports 2017-11-29 13:34:02 +01:00
Tom Desair
df950ea475 DS-3651: Finished integration tests 2017-11-29 13:34:01 +01:00
Tom Desair
5165ab00d1 DS-3651: Adding integration tests 2017-11-29 13:33:59 +01:00
Tom Desair
26dfe8feba DS-3651: Update unit test 2017-11-29 13:33:05 +01:00
Tom Desair
fd4dde3c6f DS-3651: Log event when downloading bitstream via new REST API 2017-11-29 13:33:05 +01:00
frederic
39d202c4f7 DS-3651 Unit tests for MultipartFileSender 2017-11-29 13:33:05 +01:00
frederic
4c747a2a28 DS-3651 Fix If-Match implementation 2017-11-29 13:33:05 +01:00
frederic
40e6e955a1 DS-3651 Multirange fix 2017-11-29 13:33:05 +01:00
frederic
a02bda791f DS-3651 MultiPartFileSender testclass 2017-11-29 13:33:04 +01:00
Tom Desair
71f0dc5ca8 DS-3651: Call the event service on bitstream download 2017-11-29 13:33:04 +01:00
Tom Desair
91ae2e55d3 DS-3651: Small improvements 2017-11-29 13:33:04 +01:00
Tom Desair
a58e65025c DS-3651: Small refactoring 2017-11-29 13:33:04 +01:00
frederic
34e6676129 DS-3651 configurable buffer 2017-11-29 13:33:04 +01:00
frederic
db54bc12f2 DS-3651: several improvements 2017-11-29 13:33:04 +01:00
frederic
eb65a3fc73 DS-3651: Fixes and refactoring 2017-11-29 13:33:04 +01:00
frederic
4cedffc3be DS-3651: MultipartFileSender with inputstreams 2017-11-29 13:33:03 +01:00
Andrea Bollini
cea8ccd271 fix test failure due to the change in the name used for the embedded list on collection resource endpoints 2017-11-28 23:54:36 +01:00
Andrea Bollini
e9738d9353 fix compilation issues related to the Exception specialization 2017-11-28 19:13:27 +01:00
Hardy Pottinger
b578b03595 [DS-3757] increase default clamav socket timeout to 6 minutes (#1886) 2017-11-27 10:19:00 -06:00
Andrea Bollini
c639608ec2 Merge remote-tracking branch 'origin/master' into D4CRIS-338
# Conflicts:
#	dspace-api/src/main/java/org/dspace/app/util/SubmissionInfo.java
#	dspace-api/src/main/java/org/dspace/submit/model/SelectableMetadata.java
#	dspace-api/src/main/java/org/dspace/submit/step/DescribeStep.java
#	dspace-api/src/main/java/org/dspace/submit/step/SelectCollectionStep.java
#	dspace-api/src/main/java/org/dspace/submit/step/StartSubmissionLookupStep.java
2017-11-23 17:36:03 +01:00
Tom Desair
5b0c101b65 DS-3542 Code cleanup 2017-11-23 12:31:16 +01:00
Tom Desair
044e243802 DS-3542 Improve login form; Fix Flyway; Fix authn links 2017-11-23 00:03:43 +01:00
Tom Desair
ca37648417 Merge branch 'master' into POC_stateless_sessions 2017-11-22 18:03:52 +01:00
Tom Desair
430d074549 DS-3542 Authentication status link fixes 2017-11-22 17:44:18 +01:00
frederic
516aa41bf6 DS-3542 logout login bugfix 2017-11-22 16:22:32 +01:00
frederic
437d3bebc7 DS-3542 HAL browser Links for Authn 2017-11-22 14:01:57 +01:00
Luigi Andrea Pascarelli
b483e6f28d Merge branch 'D4CRIS-338' of https://github.com/4Science/DSpace into D4CRIS-338 2017-11-22 12:51:02 +01:00
frederic
69827e202d DS-3542 fixed test endpoints 2017-11-22 10:01:06 +01:00
Andrea Bollini
792fe8f9d1 improve the default configuration, renamed in the plural form 2017-11-22 09:12:41 +01:00
Andrea Bollini
064b4b853d improve the default configuration, renamed in the plural form 2017-11-22 09:10:38 +01:00
Luigi Andrea Pascarelli
d6b67c4bac D4CRIS-354 DS-3759 implemented move collection during submission (remove the metadata not anymore managed in the new submission form) 2017-11-21 20:04:10 +01:00
Luigi Andrea Pascarelli
8ec23cbb4f D4CRIS-354 manage empty path 2017-11-21 20:01:53 +01:00
frederic
8f92363110 DS-3542 move endpoints to authn 2017-11-21 18:07:04 +01:00
frederic
6d2e475577 DS-3542 more tests, improvements and comments 2017-11-21 17:56:54 +01:00
frederic
1c9ee80289 DS-3542 Testclasses 2017-11-21 14:06:11 +01:00
frederic
41691cbe0e DS-3542 Integration/unit tests + small changes 2017-11-21 14:05:35 +01:00
Luigi Andrea Pascarelli
b187c1d9fc enabling Cross Origin Requests for all methods 2017-11-20 16:10:47 +01:00
frederic
a14c4403a1 DS-3542 missing license header 2017-11-20 13:08:56 +01:00
frederic
0f393e7981 Merge branch 'POC_stateless_sessions' of github.com:atmire/DSpace into POC_stateless_sessions 2017-11-20 09:58:48 +01:00
frederic
80c26906e9 DS-3542 configurable encryption 2017-11-17 17:59:16 +01:00
Luigi Andrea Pascarelli
bb1f873489 expose subgroups as links relation 2017-11-17 17:58:48 +01:00
Tom Desair
e2169fb3ae DS-3542: Add support for testing with authentication 2017-11-17 17:13:53 +01:00
Luigi Andrea Pascarelli
56533d4c0f D4CRIS-338 change resource name for accesscondition to resourcepolicy 2017-11-17 16:28:02 +01:00
Luigi Andrea Pascarelli
6003012d40 D4CRIS-338 refactoring accesscondition to resourcepolicy; 2017-11-17 15:31:56 +01:00
frederic
a86f10cfd5 DS-3542 etra documentation signing key 2017-11-17 14:25:55 +01:00
Luigi Andrea Pascarelli
aa2bf54f39 D4CRIS-338 refactoring accesscondition to resourcepolicy; implemented add resourcepolicy PATCH; change remove PATCH index basis 2017-11-17 13:23:46 +01:00
marsaoua
5d507ed23b DS-3729: Set the Bitstream deletion flag in the database in case of an item deletion (#1874) 2017-11-16 13:46:02 -06:00
frederic
28eb61f42d DS-3542 fix size salt 2017-11-16 17:37:10 +01:00
Andrea Bollini
00ba22e0dd Merge pull request #1852 from 4Science/DS-3699
DS-3699 expose submission configuration over REST
2017-11-16 15:17:05 +01:00
Luigi Andrea Pascarelli
c5164b937d D4CRIS-338 rename dto accesscondition into dto resourcepolicy 2017-11-16 12:45:53 +01:00
Luigi Andrea Pascarelli
52ce4afe2a D4CRIS-338 add move patch operation; add license and author 2017-11-16 12:32:07 +01:00
Luigi Andrea Pascarelli
a23a4d1c93 D4CRIS-338 use constant to work with "ORIGINAL" bundle 2017-11-16 12:17:41 +01:00
Luigi Andrea Pascarelli
4870d75afa D4CRIS-338 refactoring to implement PATCH operation model; manage upload section operation; 2017-11-15 19:50:12 +01:00
frederic
bf8d63c1e3 DS-3542 JWT encryption and compression 2017-11-15 17:17:55 +01:00
frederic
2e650d8964 DS-3542 Pass by authorization header 2017-11-15 16:15:10 +01:00
Luigi Andrea Pascarelli
c9b4270af2 add support for rel/relid with minus and underscore 2017-11-15 11:39:40 +01:00
Luigi Andrea Pascarelli
3e77e73fc2 D4CRIS-338 save granted date into dcterms.accessRights (was dc.rights.date) 2017-11-15 11:39:13 +01:00
Luigi Andrea Pascarelli
7a3532993f Merge branch 'D4CRIS-338' of https://github.com/4Science/DSpace into D4CRIS-338
# Conflicts:
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/RestResourceController.java
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/submit/step/DescribeStep.java
2017-11-15 00:37:46 +01:00
Luigi Andrea Pascarelli
fc13ad5725 D4CRIS-338 add implementation to grant license 2017-11-15 00:31:30 +01:00
Luigi Andrea Pascarelli
1e1416143d D4CRIS-338 add implementation for save metadata; add stub logic for patch processing 2017-11-14 23:47:28 +01:00
Luigi Andrea Pascarelli
75cbe4d093 D4CRIS-338 add support for patch update [rfc6902] 2017-11-14 23:46:24 +01:00
Luigi Andrea Pascarelli
6505523477 Use stringutils to check empty/null string 2017-11-14 23:43:58 +01:00
Andrea Bollini
b82e9bbbf2 Merge branch 'D4CRIS-338' of https://github.com/4Science/DSpace into D4CRIS-338
# Conflicts:
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/RestResourceController.java
2017-11-14 18:40:01 +01:00
Andrea Bollini
84f0810fc7 separate the DirectlyAddressableRestModel from the base RestModel 2017-11-14 18:34:23 +01:00
Andrea Bollini
6e3395a997 D4CRIS-338 expose the metadata section in the upload as a link to a submissionForm 2017-11-14 18:33:31 +01:00
Luigi Andrea Pascarelli
7ef0d2992e D4CRIS-338 D4CRIS-345 add support for true/false status and error message; removed support for multifiles 2017-11-14 13:00:00 +01:00
Andrea Bollini
bd2ba93635 rename AccessCondition Link Repository 2017-11-13 20:52:39 +01:00
Andrea Bollini
4e54d528d8 fix camel case 2017-11-13 20:52:16 +01:00
Luigi Andrea Pascarelli
3fd4b01980 D4CRIS-338 fix name attribute 2017-11-13 19:54:48 +01:00
Luigi Andrea Pascarelli
781a567764 D4CRIS-338 D4CRIS-345 add first support for upload file; first implementation for upload bitstream during submission 2017-11-13 19:36:04 +01:00
Andrea Bollini
0e9d7521ab rename the DefaultAccessCondition classes in AccessCondition 2017-11-13 19:29:08 +01:00
Andrea Bollini
e386f0d49e allow to set the collection resource name also for not DSpaceRestResource 2017-11-13 18:31:18 +01:00
Andrea Bollini
4a0bd31483 fix wrong link creation in linked resources 2017-11-13 18:30:45 +01:00
Andrea Bollini
280d41fd3d Merge commit '8883cf874da22f3fe459c08b0dcf5bd173f1a4d8' into D4CRIS-338
# Conflicts:
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/converter/AccessConditionsConverter.java
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/model/CollectionRest.java
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/model/DefaultAccessConditionRest.java
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/model/hateoas/CollectionResource.java
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/model/hateoas/DefaultAccessConditionResource.java
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/repository/DefaultAccessConditionRestLinkRepository.java
2017-11-13 18:11:02 +01:00
Andrea Bollini
a4567e4297 cleanup the use of the LinkRestRepository 2017-11-13 15:49:37 +01:00
Tom Desair
561d577939 DS-3542 Fix salt reuse + Authorization header + licenses 2017-11-13 11:24:38 +01:00
frederic
3fb72221ca DS-3542 Reuse salt if not expired 2017-11-13 09:45:23 +01:00
Luigi Andrea Pascarelli
8883cf874d D4CRIS-338 add license 2017-11-10 23:18:45 +01:00
Luigi Andrea Pascarelli
bf04bcc9cf D4CRIS-338 refactoring 2017-11-10 23:16:10 +01:00
Luigi Andrea Pascarelli
f940cffd3e D4CRIS-338 move service to the api 2017-11-10 22:14:04 +01:00
Luigi Andrea Pascarelli
5a2666637b D4CRIS-338 refactoring object model for endpoint default access condition; implementation of upload section config endpoint 2017-11-10 20:58:03 +01:00
Luigi Andrea Pascarelli
9945617fd3 D4CRIS-338 implementation of endpoint for collection default access condition 2017-11-09 20:02:11 +01:00
Luigi Andrea Pascarelli
994da90f80 DS-3699 fix after change to isFieldPresent 2017-11-09 19:18:02 +01:00
Luigi Andrea Pascarelli
d409331f8c Add support for single linked object 2017-11-09 19:03:51 +01:00
frederic
dd8fbedf90 DS-3542 refresh token via login endpoint 2017-11-09 12:43:47 +01:00
Luigi Andrea Pascarelli
af27a978eb minor organize import 2017-11-09 12:17:01 +01:00
Luigi Andrea Pascarelli
53ab0e8d8e D4CRIS-338 implementation of endpoint for collection license 2017-11-09 12:16:29 +01:00
Luigi Andrea Pascarelli
3f04880ef5 introduce return single object from linkrepository method 2017-11-09 12:13:20 +01:00
Andrea Bollini
6b63b6ea41 DS-3699 Introduce a dedicated exception for the SubmissionConfigReader failures 2017-11-08 23:20:24 +01:00
Andrea Bollini
e6f68668fd DS-3699 Add comment about the scope of the SelectableMetadata class 2017-11-08 23:14:15 +01:00
Luigi Andrea Pascarelli
0886e1ed99 DS-3740 add license and java doc 2017-11-08 17:57:32 +01:00
Luigi Andrea Pascarelli
72afc3107a DS-3743 add java documentation 2017-11-08 17:57:13 +01:00
Luigi Andrea Pascarelli
f66228b42a Merge branch 'DS-3743' into DS-3740
# Conflicts:
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/repository/WorkspaceItemRestRepository.java
2017-11-08 17:38:04 +01:00
Luigi Andrea Pascarelli
a44034fc9c DS-3743 remove json ignore from "id" attribute 2017-11-08 17:26:05 +01:00
Luigi Andrea Pascarelli
83da4d9fe7 DS-3743 implement upload and license step section 2017-11-08 17:24:45 +01:00
frederic
79ada4ea0f DS-3542 token to Authorization header and hal browser login 2017-11-08 16:19:49 +01:00
frederic
2350c1e758 DS-3542 Fix eperson link 2017-11-08 14:25:03 +01:00
frederic
2dcfa28ae3 DS-3542 eperson embedded in status rest 2017-11-08 13:11:11 +01:00
Luigi Andrea Pascarelli
23c3f3ed58 DS-3743 implementation of findbysubmitter 2017-11-08 09:45:14 +01:00
Luigi Andrea Pascarelli
b54d0f09a9 DS-3743 metadata exposition key with dot separator; add @JsonAnyGetter annotation to remove serialization of metadata label 2017-11-08 09:30:09 +01:00
Luigi Andrea Pascarelli
7ac8722ce0 DS-3743 modify getdata now return serializable 2017-11-07 20:55:43 +01:00
Luigi Andrea Pascarelli
9b48854db7 DS-3743 fix initialize reader for submission config; add missing setcollection and setsubmissiondefinition into the converter for WSI 2017-11-07 19:32:26 +01:00
Luigi Andrea Pascarelli
0112af21bc DS-3740 refactoring method 2017-11-07 19:08:38 +01:00
Luigi Andrea Pascarelli
7be035f553 Merge branch 'DS-3743' into DS-3740 2017-11-07 19:05:37 +01:00
Luigi Andrea Pascarelli
20e4ca3617 DS-3740 reintroduce collection rest attribute in workspaceitem rest object model 2017-11-07 19:05:05 +01:00
Luigi Andrea Pascarelli
8c7685b987 Merge branch 'DS-3743' into DS-3740
# Conflicts:
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/model/WorkspaceItemRest.java
2017-11-07 19:02:28 +01:00
Luigi Andrea Pascarelli
d47f5a0334 DS-3743 add missing license 2017-11-07 19:00:49 +01:00
Andrea Bollini
0f4ccf2a46 fix mapping for entities with string ID 2017-11-07 18:59:18 +01:00
Andrea Bollini
7f84c4b082 avoid ambigous mapping when the id is digit-only with alphanumeric id 2017-11-07 18:59:08 +01:00
Luigi Andrea Pascarelli
595c0444eb DS-3743 introduce SectionData 2017-11-07 18:58:19 +01:00
Luigi Andrea Pascarelli
624258d159 DS-3740 stub implementation of update 2017-11-07 18:40:46 +01:00
frederic
a8582ea478 DS-3542 feedback fixes 2017-11-07 16:16:22 +01:00
Luigi Andrea Pascarelli
06d4c7270c DS-3740 add commit transaction on create method 2017-11-07 15:57:34 +01:00
Andrea Bollini
ddb545ee1a fix mapping for entities with string ID 2017-11-07 15:12:00 +01:00
Luigi Andrea Pascarelli
f7895619f4 DS-3740 move fake turnoff to create fake user 2017-11-07 13:15:49 +01:00
Luigi Andrea Pascarelli
8dcfebad10 DS-3740 add missed commit to save the fake user 2017-11-07 13:04:20 +01:00
Luigi Andrea Pascarelli
fcf57ed177 Merge branch 'D4CRIS-337' of https://github.com/4Science/DSpace into D4CRIS-337 2017-11-07 12:18:57 +01:00
Andrea Bollini
db33e62bc4 avoid ambigous mapping when the id is digit-only with alphanumeric id 2017-11-07 12:10:56 +01:00
Luigi Andrea Pascarelli
9139a8421e DS-3740 add missed set submission definition 2017-11-07 12:04:18 +01:00
frederic
89e3e9f720 Merge branch 'POC_stateless_sessions' of github.com:atmire/DSpace into POC_stateless_sessions 2017-11-07 12:03:10 +01:00
frederic
c77bcf5d8a DS-3542 extensible jwt claims 2017-11-07 12:02:55 +01:00
Luigi Andrea Pascarelli
6eab911779 DS-3740 refactoring use of the fake user move into rest 2017-11-07 11:56:51 +01:00
Luigi Andrea Pascarelli
1b278ec1dd DS-3740 the init of workspaceitem is demanded on external service 2017-11-07 11:55:53 +01:00
Luigi Andrea Pascarelli
0539c9246d DS-3740 remove method doPreProcessing (step have todo no operations in this phase) 2017-11-07 11:53:47 +01:00
Luigi Andrea Pascarelli
f3d09ee813 DS-3740 minor comment 2017-11-07 09:39:21 +01:00
Luigi Andrea Pascarelli
363320a38c DS-3740 introduced dry run with a fake user (NOTE this code is an experimental code to works without authorization) 2017-11-06 19:20:24 +01:00
Luigi Andrea Pascarelli
16108d2cf9 DS-3740 design preprocessing step method; implemented preprocessing into SelectCollectionStep 2017-11-06 19:19:19 +01:00
Luigi Andrea Pascarelli
d4cc4351d9 DS-3740 use standardize utility method 2017-11-06 18:27:58 +01:00
Luigi Andrea Pascarelli
f5215931dc DS-3740 implement POST method, add create workspaceitem by default 2017-11-06 17:45:11 +01:00
Tom Desair
c5d4f9d5b1 DS-3542: Build works locally, try again on Travis 2017-11-06 17:05:50 +01:00
Tom Desair
6249f3f08f DS-3542: Fixes after rebase 2017-11-06 14:50:24 +01:00
Tom Desair
8fa5394f9d DS-3542: Fix autowiring 2017-11-06 14:08:56 +01:00
Tom Desair
1c8de472e7 DS-3542: Cleanup SessionImpl 2017-11-06 14:08:55 +01:00
Tom Desair
eed50c363d DS-3542: Cleanup session service. TODO SessionImpl 2017-11-06 14:08:55 +01:00
Tom Desair
8dcdcb1ebd DS-3542: Refactoring and comments 2017-11-06 14:08:55 +01:00
frederic
e0b9f90aed DS-3542 Extra documentation and licenses 2017-11-06 14:08:55 +01:00
frederic
2cf4baf3ac DS-3542 remove use of sessions 2017-11-06 14:08:55 +01:00
frederic
3630c817e7 DS-3542 expiration time configurable 2017-11-06 14:08:43 +01:00
frederic
ec0be65d34 DS-3542 expiration time configurable 2017-11-06 14:08:01 +01:00
frederic
bc055f1612 DS-3542 More detailed status end point and other improvements 2017-11-06 14:06:35 +01:00
frederic
5f25ea2387 DS-3542 Logout endpoint and various improvements 2017-11-06 14:06:34 +01:00
frederic
02c2612889 DS-3542 status endpoint 2017-11-06 14:06:34 +01:00
frederic
3e366bf442 DS-3542: invalided sessions with salt 2017-11-06 14:06:30 +01:00
frederic
da3a941e0a DS-3542: first login with jwt concept 2017-11-06 14:06:20 +01:00
Luigi Andrea Pascarelli
b2b035ca09 DS-3740 comment in patch method; add rest step to define data exposure (getData) 2017-11-06 13:05:15 +01:00
Luigi Andrea Pascarelli
910dfcce80 DS-3740 remove old DTO class for submission process 2017-11-03 19:58:04 +01:00
Luigi Andrea Pascarelli
4716128ac3 Merge branch 'DS-3699' into DS-3740 2017-11-03 19:00:06 +01:00
Luigi Andrea Pascarelli
216d7481bb DS-3699 enhance wrapper to pass integration test;
DS-3484 catch generic Exception
2017-11-03 17:00:16 +01:00
Luigi Andrea Pascarelli
cdd9049b6b Merge branch 'master' into DS-3699 2017-11-03 11:15:42 +01:00
Luigi Andrea Pascarelli
8af7a74646 DS-3740 stub refactoring for processing step; 2017-11-03 10:59:25 +01:00
Luigi Andrea Pascarelli
6523b2faf7 Merge branch 'DS-3699' into DS-3740 2017-11-03 10:27:09 +01:00
Luigi Andrea Pascarelli
4014c317e3 DS-3699 minor adjust comment; add javadoc to tokenize and standardize utility method 2017-11-03 09:55:03 +01:00
Luigi Andrea Pascarelli
ea79d17df1 DS-3699 replace with the standardize method 2017-11-03 09:53:51 +01:00
Luigi Andrea Pascarelli
6bed6ac158 DS-3740 finalize fromModel converter method; start refactoring for processing step; 2017-11-03 09:19:11 +01:00
Luigi Andrea Pascarelli
d41ccfacc1 DS-3740 introduce findBySubmitter 2017-11-03 09:03:29 +01:00
Luigi Andrea Pascarelli
eb9b2b6010 stub: introduce PATCH try to manage as https://tools.ietf.org/html/rfc6902 2017-11-03 09:02:25 +01:00
Luigi Andrea Pascarelli
dcacb03993 format code 2017-11-03 09:00:41 +01:00
Andrea Bollini
716912f275 Merge pull request #1866 from atmire/DS-3484_Spring-mvc-test-REST-API
DS-3484: REST API integration tests with Spring MVC test
2017-11-03 08:31:57 +01:00
Luigi Andrea Pascarelli
03007a8f6a Merge branch 'DS-3740' of https://github.com/4Science/DSpace into DS-3740 2017-11-02 12:45:21 +01:00
Andrea Bollini
e71c036111 DS-3740 initial draft of the workspaceitems endpoint 2017-11-02 12:28:04 +01:00
Tom Desair
0aa663479b DS-3484: Improve ApplicationContext initialization 2017-11-02 11:19:13 +01:00
Tom Desair
84edb50afc DS-3484: Added pagination test + extra logging + Solr Service bug 2017-11-02 11:18:50 +01:00
Raf Ponsaerts
255b8a7e8e [DS-3484] Added tests for the BrowseEntryResourceIT controller 2017-11-02 11:18:50 +01:00
Tom Desair
6a7c60c121 DS-3484: Refactoring builders and extended Browse by title test 2017-11-02 11:18:50 +01:00
Tom Desair
9529e5634f DS-3484: Added SOLR integration for the REST integration tests 2017-11-02 11:18:49 +01:00
Tom Desair
876d0e9a82 DS-3484: Initial setup of Spring MVC test + RootRestResourceControllerTest 2017-11-02 11:18:49 +01:00
Luigi Andrea Pascarelli
f755f59d38 Merge pull request #19 from AlexanderS/DS-3699
DS-3724: Missing readonly in input-forms.dtd
2017-11-02 10:43:10 +01:00
Alexander Sulfrian
377fefbfe7 DS-3724: Missing readonly in input-forms.dtd 2017-11-01 18:40:13 +01:00
Tim Donohue
260e4178df Merge pull request #1865 from atmire/DS-3711_JaCoCo-code-coverage-maven-plugin
DS-3711: JaCoCo maven plugin
2017-11-02 01:22:36 +10:00
Luigi Andrea Pascarelli
779f561e68 DS-3699 use authorities.keySet() here and get rid of the authorityNames class field; replace logic into the makefield method in favour of Utils.standardize static method; 2017-10-31 21:14:47 +01:00
Luigi Andrea Pascarelli
f2c8574204 DS-3699 use stringutils 2017-10-31 21:13:22 +01:00
Luigi Andrea Pascarelli
3a96b940fb [DS-3699] change name of the DTD into submission-forms.xml test file 2017-10-25 17:13:26 +02:00
Luigi Andrea Pascarelli
22e9844987 [DS-3699] manage valuepairs and vocabulary authority both controlled and required configuration setup to true 2017-10-25 17:03:45 +02:00
Luigi Andrea Pascarelli
2f5d18ab04 [DS-3699] misc refactoring; fix typo; add logger; remove test configuration; 2017-10-25 11:59:13 +02:00
Luigi Andrea Pascarelli
5ce58f4f86 [DS-3699] renamed endpoint (remove the dash from the name) 2017-10-23 11:48:41 +02:00
Luigi Andrea Pascarelli
90b916f782 [DS-3699] renamed attibute submission section 2017-10-23 11:22:38 +02:00
Luigi Andrea Pascarelli
14808d7700 [DS-3699] remove model rest page for input form; add use of constant to match section type for submission-forms 2017-10-23 10:57:46 +02:00
Luigi Andrea Pascarelli
2770a13fa2 [DS-3699] change name to input-forms.dtd; replace all occurance of input-forms.xml in Java files; replace type for step definition (WAS input-form now submission-form is required) 2017-10-23 10:55:39 +02:00
Luigi Andrea Pascarelli
74539f3458 [DS-3699] finalizing refactoring; improved authority endpoint; 2017-10-20 15:53:39 +02:00
Luigi Andrea Pascarelli
94cf2bd1f0 [DS-3699] refactoring class name 2017-10-20 15:33:24 +02:00
Luigi Andrea Pascarelli
e7254cf62c DS-3699 auto register choice plugin for value-pairs and controlled vocabulary 2017-10-17 12:06:23 +02:00
Luigi Andrea Pascarelli
ba5ccb1099 DS-3699 changed file name (NOW submission-forms.xml WAS input-forms.xml) 2017-10-17 11:29:34 +02:00
Luigi Andrea Pascarelli
8df24f883d DS-3699 renamed endpoint and file for input-forms (now is called submission-forms); modified category for configuration service (WAS configuration NOW config) 2017-10-16 19:44:08 +02:00
Luigi Andrea Pascarelli
e5a97ff7f6 remove unused object 2017-10-16 10:53:19 +02:00
Luigi Andrea Pascarelli
fde9032ad3 fix throw exception 2017-10-16 10:26:42 +02:00
Luigi Andrea Pascarelli
b447f89c40 D4CRIS-342 enable authority for value-pairs common_types (for test scope); update input-form.xml (for test scope) 2017-10-13 19:07:09 +02:00
Luigi Andrea Pascarelli
114aad03f0 D4CRIS-342 control input-type with custom rule 2017-10-13 18:33:09 +02:00
Luigi Andrea Pascarelli
129824bdfa D4CRIS-342 cleanup item-submission; remove collection and complete required step; 2017-10-13 17:27:48 +02:00
Luigi Andrea Pascarelli
e3aeb3d35b D4CRIS-342 cleanup item-submission; add required attribute "id" into the step element 2017-10-13 16:18:48 +02:00
Luigi Andrea Pascarelli
88365ccd11 add comment in the gitignore to explain rebel.xml rule 2017-10-13 15:24:22 +02:00
Luigi Andrea Pascarelli
d941883ddb D4CRIS-342 change named link from panel to inputform (was input-form now is configuration) 2017-10-13 12:35:43 +02:00
Luigi Andrea Pascarelli
f875c33648 D4CRIS-342 change named endpoint from panel to submission-panel 2017-10-13 12:35:43 +02:00
Luigi Andrea Pascarelli
80236758fc D4CRIS-336 exposition of vocabulary as authority 2017-10-13 12:35:43 +02:00
Luigi Andrea Pascarelli
dbddc1f7f0 D4CRIS-342 finalize endpoint to expose link from panel to inputform 2017-10-13 12:35:43 +02:00
Luigi Andrea Pascarelli
0678b91f19 D4CRIS-342 start point to develop panel rest endpoint 2017-10-13 12:35:42 +02:00
Luigi Andrea Pascarelli
d0aee26ac7 D4CRIS-342 respect the new contract for submission definition and input form 2017-10-13 12:35:42 +02:00
Luigi Andrea Pascarelli
7b21429fc6 D4CRIS-336 refactoring endpoint to retrieve authority; finalize dynamic discovery of valuepairs and vocabulary as authority; exposition of relid; D4CRIS-342 improve selectablemetadata; add check on inputform converter to add authority only if authority have choice; 2017-10-13 12:35:42 +02:00
Luigi Andrea Pascarelli
e7c3c9d8bc D4CRIS-336 improving endpoint; Add wrapper for authority derived from valuepairs or vocabulary 2017-10-13 12:35:41 +02:00
Luigi Andrea Pascarelli
6a46863580 D4CRIS-336 remove requestbody parameter 2017-10-13 12:35:41 +02:00
Luigi Andrea Pascarelli
9545ed5afe D4CRIS-336 remove requestbody parameter 2017-10-13 12:35:41 +02:00
Luigi Andrea Pascarelli
6dc5e1953d D4CRIS-336 try to inject body request parameter 2017-10-13 12:35:41 +02:00
Luigi Andrea Pascarelli
e13b6fe35a D4CRIS-336 finalize authority rest resource; starting point for authority entry rest 2017-10-13 12:35:40 +02:00
Luigi Andrea Pascarelli
d890cbb44f Refactoring (create package and move annotation); fix typo 2017-10-13 12:35:40 +02:00
Luigi Andrea Pascarelli
424541fd01 D4CRIS-335 change naming convention to receive suggestion from abollini 2017-10-13 12:35:40 +02:00
Luigi Andrea Pascarelli
23eb15c1ad D4CRIS-336 add authority rest endpoint; add stub for retrieve authority entries 2017-10-13 12:35:39 +02:00
Luigi Andrea Pascarelli
a05f6a646a DS-3699 add community service with autowired 2017-10-13 12:35:38 +02:00
Luigi Andrea Pascarelli
3bc94a28f2 add rebel.xml to the gitignore 2017-10-13 12:35:38 +02:00
Andrea Bollini
2ef05eb448 DS-3699 embedding authority information in the inputform 2017-10-13 12:33:45 +02:00
Andrea Bollini
8c83c2d419 DS-3699 first implementation input-form endpoint 2017-10-13 12:33:45 +02:00
Andrea Bollini
d026d72017 DS-3699 add support for regex validation, page heading and mandatory flag 2017-10-13 12:33:45 +02:00
Andrea Bollini
2594415db7 DS-3699 code cleanup 2017-10-13 12:33:44 +02:00
Andrea Bollini
a42a18c4cb DS-3699 renamed getInputs in getInputsByCollection 2017-10-13 12:33:44 +02:00
Andrea Bollini
a54d0ba47e DS-3699 add findByCollection to the submission definition repository 2017-10-13 12:33:44 +02:00
Andrea Bollini
d9fc8bea05 DS-3699 flag the default submission config 2017-10-13 12:33:44 +02:00
Andrea Bollini
5247bc86e3 DS-3699 Expose the item-submission configuration over the new REST 2017-10-13 12:33:44 +02:00
Tom Desair
205ad24d3b DS-3711: Retrigger build after Coveralls 404 error 2017-10-13 10:06:08 +02:00
Tom Desair
6fa8832f8c DS-3711: Move aggregated reports to DSpace Assembly and Configuration module 2017-10-12 22:52:49 +02:00
Tom Desair
eea9993b8a DS-3711: Configured JaCoCo and Coveralls code coverage tools
DS-3711: Added and configured JaCoCo maven plugin for DSpace API module

DS-3711: Attempt to configure the Coveralls plugin

DS-3711: Updated coveralls-maven-plugin configuration for DSpace API

Added comment

Added dspace-oai coverage reporting + updated coveralls config to not run locally

DS-3711: Correct skip-coveralls configuration

DS-3711: Second attempt to correct skip-coveralls configuration

DS-3711: Attempt to aggregate JaCoCo reports for coverall

DS-3711: Second attempt to aggregate JaCoCo reports for coveralls

Fix maven dependencies

DS-3711: Attempt to fix coveralls No source found for error
2017-10-12 22:51:48 +02:00
Terry Brady
48aa148bf7 Merge pull request #1861 from tdonohue/add_error_prone_checks
DS-3712: Add Error Prone checks to catch common Java code mistakes
2017-10-11 13:13:33 -07:00
Andrea Bollini
0bc719eb7e Merge pull request #1843 from atmire/DS-3697_Autowire-DSpace-service-in-Spring-REST-webapp
DS-3697: Enable autowiring of DSpace Services in the Spring REST webapp
2017-10-11 13:47:49 +02:00
Andrea Bollini
a1c46a488e Merge pull request #1726 from 4Science/DS-3544
DS-3544 add support to search methods for repositories
2017-10-10 21:56:33 +02:00
Tim Donohue
3fceaf46c3 Bug fix to Unit Tests as reported by ErrorProne 2017-10-05 17:28:22 +00:00
Tim Donohue
74cff74c3e Bug fixes to OAI-PMH as reported by Error Prone 2017-10-05 17:05:31 +00:00
Tim Donohue
5edb6f4a7c Bug fixes to REST API as reported by Error Prone 2017-10-05 17:05:04 +00:00
Tim Donohue
22f7690a19 Bug fixes to Java API reported by ErrorProne 2017-10-05 17:04:31 +00:00
Tim Donohue
9ba039a51a Enable ErrorProne in POM 2017-10-05 17:04:16 +00:00
Tom Desair
e2d36236c0 DS-3697: More imports cleaning 2017-10-04 13:04:44 +02:00
Tom Desair
84c9341381 DS-3697: Restore DSpace Kernel startup on Servlet Context init + fix imports 2017-10-04 13:00:12 +02:00
Tom Desair
6628d872d8 DS-3697: Enable autowiring of DSpace Services in the Spring REST webapp 2017-10-04 12:37:14 +02:00
Andrea Bollini
5b2b2b6764 DS-3544 code cleanup 2017-09-30 14:43:24 +02:00
Andrea Bollini
5200b203ac DS-3544 fix repository methods return page instead than list 2017-09-30 14:43:03 +02:00
Andrea Bollini
4ead87a23a DS-3544 refactored the repository related code in an utils class 2017-09-30 14:42:03 +02:00
Andrea Bollini
5bd215c1cf DS-3544 add support for search methods that return a single instance 2017-09-30 11:53:29 +02:00
Andrea Bollini
e34375e6cb DS-3544 only expose the search endpoint if there are search methods 2017-09-30 11:53:12 +02:00
Andrea Bollini
31929bd2e0 DS-3544 fix (fake) pagination of top communities add subCommunities search method 2017-09-30 11:51:52 +02:00
Andrea Bollini
8f0be17158 DS-3544 add support for custom search methods signatures 2017-09-30 11:51:52 +02:00
Andrea Bollini
5adeadcdff DS-3544 add support to search methods for repositories 2017-09-30 11:51:52 +02:00
Pascal-Nicolas Becker
a786dd74c8 DS-3627: Cleanup utility leaves files in assetstore 2017-09-29 17:47:41 +02:00
Andrea Bollini
09d58f5e73 DS-3701 explicitly set the doi table name to lowercase 2017-09-27 09:04:19 +02:00
Tom Desair
ca63b4f3e1 DS-3698 Correct HAL browser context path 2017-09-26 21:11:56 +02:00
Tom Desair (Atmire)
0d6688e91b DS-3696: Absolute links in root resource (#1841)
* Return absolute URLs in the Links section of the ROOT resource

* DS-3696: Root context should return absolute URLs

* DS-3696: Improve base REST url implementation

* DS-3696: Calculate link outside loop
2017-09-26 19:16:58 +02:00
Andrea Bollini
83446ab8eb Merge pull request #1809 from DSpace/bitstream-retrieve-renamed
HAL link to the bitstream content renamed
2017-09-25 10:26:48 +02:00
Pascal-Nicolas Becker
bd0c458a19 DS-3680: Remove problematic unaching. Also see DS-3681 as follow-up. 2017-08-30 20:45:09 +00:00
Pascal-Nicolas Becker
5510415ab6 DS-3680: clarify that we need to dispatch events before committing 2017-08-30 20:44:58 +00:00
Pascal-Nicolas Becker
74b75d546a Revert "Events must be dispatched after commit() to ensure they can retrieve latest data from DB"
This reverts commit 646936a3d8.
2017-08-30 20:43:40 +00:00
Terry Brady
fd934e6e3b [DS-3602] Ensure Consistent Use of Legacy Id in Usage Queries (#1782)
* ensure that owning Item,Coll,Comm use legacy consistently

* scopeId query

* refine queries

* alter id query

* Commenting the behavior of the id / legacyId search

* Address duplicate disp for DSO w legacy and uuid stats
2017-08-17 13:56:24 +00:00
Tim Donohue
4b017e6d7d Replace dispatchEvents() call with an actual commit() to ensure changes are saved 2017-08-16 20:58:29 +00:00
Tim Donohue
058e0c7e39 Events must be dispatched after commit() to ensure they can retrieve latest data from DB 2017-08-16 20:58:18 +00:00
Tim Donohue
43b841fcee DS-3648: Don't uncache submitter and related groups. Also DS-3656: Flush changes before evict() 2017-08-16 20:54:52 +00:00
Mark H. Wood
dd1f64a1e3 Merge pull request #1827 from hardyoyo/DS-3674-provide-inputforms-config-for-plugin-test
[DS-3674] copied over input-forms.xml to the test config folder
2017-08-15 15:35:21 -04:00
Hardy Pottinger
293a1e15f9 [DS-3674] copied over input-forms.xml to the test config folder 2017-08-15 16:56:28 +00:00
Terry W Brady
981c126c74 Normalize space 2017-08-09 13:20:25 -07:00
Terry W Brady
64634be53f Port PR1817, Only request image info if color space 2017-08-09 13:20:03 -07:00
Alexander Sulfrian
388558792c DS-3660: Fix discovery reindex on metadata change
Stored objects may get evicted from the session cache and get into detached
state. Lazy loaded fields are inaccessible and throw an exception on access.

Before using objects they have to be reloaded (retrieved from the
database and associated with the session again).
2017-08-09 19:31:27 +00:00
Tim Donohue
342f190231 DS-3659: Ensure readonly connections can never rollback 2017-08-03 13:52:57 +00:00
Tim Donohue
e4cef702fe Merge pull request #1783 from 4Science/bitstream-retrieve
Add Bitstream /content endpoint
2017-07-14 23:54:29 +10:00
Andrea Bollini
56650ee49a remove old retrieve link name 2017-07-14 12:08:28 +02:00
Andrea Bollini
89050bea57 Keep in sync the HAL link name with the endpoint path
Keep in place also the old link name retrieve to be backward compatible
2017-07-14 12:06:35 +02:00
Andrea Bollini
bf304a6292 rename endpoint to retrieve the bitstream content in /content 2017-07-14 10:52:20 +02:00
Andrea Bollini
7d177168f7 add link to the logo from communities and collections and the link from the community to its collection 2017-07-14 10:52:20 +02:00
Andrea Bollini
8cdee35e1f initial draft to add the functionality to retrieve the bitstream content 2017-07-14 10:52:20 +02:00
Andrea Bollini
e4bc0f028e DS-3483 add support to embed linked resources collection in the HAL document
This is an initial draft that require further refinements. By default now all the collection properties
are embedded in response, linked entities listed in the LinksRest annotation of the repository are
included only if specified in the resource wrapper instantiation and supported for embedding by
the link repository (i.e the relation have suitable default or don't depend on additional parameters)
2017-07-14 10:52:20 +02:00
Andrea Bollini
0d21ce0c7d Merge pull request #1808 from tdonohue/travis-cleanup
Speed up Travis CI build by removing Mirage2 dependencies
2017-07-14 10:51:24 +02:00
Tim Donohue
e34b6980ec Speed up Travis CI build by removing installation of Mirage2 dependencies 2017-07-13 21:20:23 +00:00
Tim Donohue
c069ec0621 Pin versions of SASS and Compass that Travis uses 2017-07-13 17:01:06 +00:00
Tom Desair
f65f9ab2ea DS-3127: Update test assert descriptions of GoogleBitstreamComparatorTest 2017-07-11 21:02:30 +00:00
Tom Desair
bcc6ebd894 DS-3127: Prevent database updates when directly manipulating the bistream list of a bundle 2017-07-11 21:02:13 +00:00
Tom Desair
260f346a74 Fix IT tests 2017-07-11 20:42:03 +00:00
Tom Desair
fcb91d6771 DS-3127: Process review feedback and fix tests 2017-07-11 20:41:53 +00:00
frederic
0ffc3c9a27 ported DS-3558 from dspace 5 to dspace6 2017-07-11 20:41:38 +00:00
Tom Desair
5cb3bc81dc DS-3632: Prevent the use of the locate function as this seems to give inconsistent results 2017-07-11 20:32:20 +00:00
Tom Desair
d267857f59 DS-3632: Changed the update-handle-prefix script so that it does not change the handle suffix 2017-07-11 20:32:02 +00:00
Tim Donohue
78ef7f9243 DS-3431 : Fix broken tests by removing nullifying of global eperson 2017-07-11 16:37:35 +00:00
Pascal-Nicolas Becker
04ec199ff3 [DS-3431] Harden DSpace's BasicWorfklowService 2017-07-11 16:37:19 +00:00
Saiful Amin
0ceb003cd3 Change Content-Type in OAI-Response
As per OAI 2.0 spec (3.1.2.1) the response content type *must* be text/xml.
http://www.openarchives.org/OAI/openarchivesprotocol.html#HTTPResponseFormat

Our OAI client is rejecting the response from DSpace OAI server.
2017-07-11 21:02:05 +05:30
Tom Desair
b0ed059ab5 DS-3628: Check READ resouce policies for items return by REST find-by-metadata-field endpoint 2017-07-07 19:49:30 +00:00
Tim Donohue
fdb4780a3a DS-3619: AuthorizeService.getAuthorizedGroups(...) should check dates (cherry-picked from ef626b4 on dspace-6_x) 2017-07-07 19:42:03 +00:00
Tim Donohue
243e5e3371 Merge pull request #1729 from SophiaGoldberg/master
[DS-3397] Fix error when getting bitstream policies in REST API
2017-07-07 02:46:37 +10:00
Tim Donohue
54d9c799e1 Merge pull request #1797 from atmire/DS-3563-master_Missing-index-metadatavalue-resource-type-id
DS-3563: Fix Oracle Flyway migration error
2017-07-06 01:34:09 +10:00
Tim Donohue
1d884a6798 Merge pull request #1793 from tomdesair/DS-3579-master_Context-mode-and-cache-management-CLI-commands
DS-3579: Context mode and cache management for CLI commands
2017-07-06 01:10:39 +10:00
Tom Desair
50358e9b8e DS-3563: Fix Oracle Flyway migration error 2017-07-05 14:03:46 +02:00
Tom Desair
8a35828e1e DS-3579: Attempt to speed up the IT tests to prevent test failures due to average execution time exceeded the requirement. 2017-07-04 15:36:59 +02:00
Tom Desair
65ed7923c6 Update HibernateDBConnection to use Hibernate 5 API 2017-07-04 14:32:05 +02:00
Tom Desair
10e028918a Port DS-3579_Context-mode-and-cache-management-CLI-commands to master 2017-07-03 14:27:43 +02:00
Terry Brady
207a9e64be Merge pull request #1757 from rivaldi8/DS-3245-csv-linebreaks
DS-3245: CSV linebreaks not supported by Bulkedit
2017-06-28 15:46:42 -07:00
Mark H. Wood
08df09f778 Merge pull request #1708 from christian-scheible/DS-3568
DS-3568. UTF-8 characters are now supported in configuration files
2017-06-22 16:28:44 -04:00
Andrea Bollini
c087675025 Merge pull request #1775 from 4Science/browse
DS-3618 Expose the browse system over the new REST API
2017-06-21 12:45:57 +02:00
Andrea Bollini
05808b4d75 add missing license 2017-06-19 15:26:52 +02:00
Andrea Bollini
bedfd92cde DS-3618 fix items link in the BrowseEntryResource 2017-06-15 16:15:31 +02:00
Andrea Bollini
d04973efac move the spring-data-rest base path to root to avoid conflict with our rest controller
the spring-data-rest base path is currently used only by the HAL browser. It now responds to /browser/** so to avoid conflict with our /api/{apiCategory}/{model}/** mapping
2017-06-15 15:40:38 +02:00
Tom Desair
f148fb3de5 DS-3572: Renamed epersonInGroup to isEPersonInGroup 2017-06-13 15:56:01 +02:00
Tom Desair
59087eed9b DS-3572: Restored behaviour of GroupService.isMember and moved new behaviour to GroupService.isParentOf 2017-06-13 15:55:59 +02:00
Tom Desair
aeb3af9b2f DS-3572: Fix bug where normal group membership is ignored if special groups are present + added tests 2017-06-13 15:55:48 +02:00
Tom Desair
ff8923b315 Improve tests + make GroupService.isMember method more performant for special groups 2017-06-13 15:55:46 +02:00
Tom Desair
20736c2821 Fix DSpace AIP IT tests: Set correct membership for admin 2017-06-13 15:55:27 +02:00
Tom Desair
17c4d7ba9d Attempt to fix contstraint violation 2017-06-13 15:55:27 +02:00
Tom Desair
083eae3e9f Restore GroupServiceImpl.isMember logic + fix tests 2017-06-13 15:55:27 +02:00
Pascal-Nicolas Becker
4f03cbfe09 DS-3572: Adding simple unit test for DS-3572. 2017-06-13 15:55:26 +02:00
Pascal-Nicolas Becker
ff4b7f00fa DS-3572: Check authorization for a specified user instead of currentUser 2017-06-13 15:55:23 +02:00
Tim Donohue
56dcd2d915 Merge pull request #1769 from tdonohue/DS-3552-master
DS-3552: Port to "master" of read only context and hibernate improvements (#1694)
2017-06-12 09:44:53 -05:00
Tom Desair (Atmire)
1ccd6d1e13 Ds 3552 read only context and hibernate improvements (#1694)
* Refactor READ ONLY mode in Context and adjust hibernate settings accordingly

* Set Context in READ-ONLY mode when retrieving community lists

* Fix Hibernate EHCache configuration + fix some Hibernate warnings

* Cache authorized actions and group membership when Context is in READ-ONLY mode

* Set default Context mode

* Let ConfigurableBrowse use a READ-ONLY context

* Add 2nd level cache support for Site and EPerson DSpaceObjects

* Added 2nd level caching for Community and Collection

* Fix tests and license checks

* Cache collection and community queries

* Small refactorings + backwards compatibility

* Set Context to READ-ONLY for JSPUI submissions and 'select collection' step

* OAI improvements part 1

* OAI indexing improvements part 1

* OAI indexing improvements part 2

* DS-3552: Only uncache resource policies in AuthorizeService when in read-only

* DS-3552: Additional comment on caching handles

* DS-3552: Fix cache leakage in SolrServiceResourceRestrictionPlugin

* DS-3552: Clear the read-only cache when switching Context modes

* DS-3552: Correct Group 2nd level cache size

* DS-3552: Always clear the cache, except when going from READ_ONLY to READ_ONLY
2017-06-12 13:50:45 +00:00
Andrea Bollini
5e6fd80c9b DS-3618 Expose the browse system over the new REST API 2017-06-10 15:49:34 +02:00
Andrea Bollini
e41bacf892 DS-3618 introduced the LinkRestRepository concept 2017-06-10 15:38:34 +02:00
Andrea Bollini
55c20cf550 DS-3617 Pluralization of model not respected in the HAL _links and endpoints mapping 2017-06-10 15:35:08 +02:00
Tim Donohue
9f46a1b812 Merge pull request #1768 from tdonohue/DS-3406-master
Forward port of DS-3406 and DS-3599 (Collection/Community alpha sorting) to master
2017-06-09 13:38:21 -07:00
frederic
7f252b6289 DS-3406 unit tests for getCollection/getCommunity for different dspace objects 2017-06-09 19:49:57 +00:00
Tom Desair
4ae462041a Revert imports 2017-06-09 19:49:48 +00:00
Tom Desair
77e507d0b2 DS-3406: Remove unnecessary commit 2017-06-09 19:49:41 +00:00
Tom Desair
027a5a68f9 Fix integration tests. Remove Hibernate Sort annotations as a collection name can change and this breaks the Set semantics 2017-06-09 19:49:31 +00:00
Tom Desair
cc3342894b Fix bug so that comparator can be used for sets 2017-06-09 19:49:21 +00:00
Tom Desair
d39d8134d0 Fixing tests 2017-06-09 19:49:11 +00:00
Yana De Pauw
a588d42f5a DS-3406: Ordering sub communities and collections 2017-06-09 19:48:54 +00:00
Tom Desair
821678dae4 DS-3406: Resolve review feedback 2017-06-09 19:46:44 +00:00
Tom Desair
73e6724ac4 DS-3406: Sort communities and collections in-memory using a comparator 2017-06-09 19:46:34 +00:00
Alan Orth
27255735c4 DS-3517 Allow improved handling of CMYK PDFs
Allow ImageMagick to generate thumbnails with more accurate colors
for PDFs using the CMYK color system. This adds two options to the
dspace.cfg where the user can optionally specify paths to CMYK and
RGB color profiles if they are available on their system (they are
provided by Ghostscript 9.x).

Uses im4java's Info class to determine the color system being used
by the PDF.

See: http://im4java.sourceforge.net/docs/dev-guide.html
2017-06-08 00:11:52 +02:00
Tim Donohue
e16f6a80d5 Refactor BundleServiceImpl.setOrder() to be more failsafe. Update Tests to prove out (previously these new tests failed) 2017-06-06 23:19:53 +02:00
Tim Donohue
d3d8471756 Create a valid unit test for BundleServiceImpl.setOrder() method 2017-06-06 23:19:53 +02:00
kshepherd
95c983faef Merge pull request #1763 from Georgetown-University-Libraries/ds3563m
[DS-3563] Port PR to master
2017-06-06 12:36:57 +12:00
Tom Desair
02d6b57631 DS-3563: Conditional create index for Oracle 2017-06-02 13:26:03 -07:00
Tom Desair
8c734d99ba DS-3563 Added missing index on metadatavalue.resource_type_id 2017-06-02 13:24:13 -07:00
Alexander Sulfrian
f28c8ced67 DS-3281: Start workflow for REST submissions
If an item is submitted through the REST API (via POST on
/{collection_id}/items) the item should not be published immediately,
but should be approved via the defined workflow.
2017-05-31 20:53:52 +00:00
Terry Brady
5032daf297 Merge pull request #1758 from Georgetown-University-Libraries/ds3594m
[DS-3594] Unit Test Clean Up for PostGres
2017-05-31 11:11:59 -07:00
Terry Brady
b2e7c2039a Add comment for null check during sort 2017-05-31 09:04:55 -07:00
Terry Brady
9bd0a58342 Avoid NPE 2017-05-31 09:04:55 -07:00
Terry Brady
c29745d421 Make destroy more forgiving of test failures 2017-05-31 09:04:54 -07:00
Terry Brady
c5414e836e Avoid handle collision in persistent db 2017-05-31 09:04:11 -07:00
Terry Brady
c1844fe960 change parameter setting for db portability 2017-05-31 09:03:55 -07:00
Àlex Magaz Graça
d9175c3c38 DS-3245: CSV linebreaks not supported by Bulkedit
When a multiline field contained empty lines, the importer stopped
reading the file. This reverts a change in 53d387fed to stop when the
end of the file has been reached instead.

Fixes https://jira.duraspace.org/browse/DS-3245
2017-05-31 15:52:23 +02:00
Tim Donohue
7ab631f419 Merge pull request #1754 from 4Science/master
DS-3593 fix missing category for the metadata registries that prevent…
2017-05-25 10:28:38 -07:00
Andrea Bollini
28363680d5 DS-3593 fix missing category for the metadata registries that prevent the new REST app to start 2017-05-25 19:12:12 +02:00
Andrea Bollini
9eaed69d5f Merge pull request #1750 from 4Science/DS-3593
DS-3593 allow aggregation of endpoints by category / Include UUID in serialization
2017-05-25 18:29:56 +02:00
Tim Donohue
bc17a391cd Merge pull request #1662 from minurmin/DS-3463
[DS-3463] Fix IP authentication for anonymous users
2017-05-18 13:11:45 -07:00
Andrea Bollini
4c3793cf50 DS-3593 allow aggregation of endpoints by category
include UUID in the object serialization
2017-05-18 19:12:10 +02:00
Andrea Bollini
27809b5757 Merge pull request #1749 from 4Science/DS-3588
DS-3588 configuration of CORS headers for the API
2017-05-18 17:43:19 +02:00
Andrea Bollini
e32e900316 DS-3588 configuration of CORS headers for the API 2017-05-18 16:28:05 +02:00
Tim Donohue
6c192c53f7 Merge pull request #1742 from Frederic-Atmire/DS-3558-dspace7
DS-3558 Port from dspace 6 to dspace 7
2017-05-15 12:28:53 -07:00
frederic
a5851ce0db DS-3558 Port from dspace 6 to dspace 7 2017-05-05 11:32:00 +02:00
Tim Donohue
9f2121007d Merge pull request #1736 from cjuergen/DS-3585-master
Fix for DS-3585
2017-04-26 11:09:35 -07:00
cjuergen
cd7231a9f4 Fix for DS-3585 2017-04-26 17:39:59 +02:00
Tim Donohue
afe11d7ee2 Merge pull request #1728 from Georgetown-University-Libraries/ds3575m
[DS-3575] master port: Rename misguiding find method in ResourcePolicyService
2017-04-21 13:47:55 -07:00
Andrea Bollini
473311de5c Merge pull request #1719 from 4Science/DS-3577
DS-3577 Metadata Fields and Schemas READ-ONLY endpoints
2017-04-21 11:06:21 +02:00
Andrea Bollini
a5b182c924 Merge pull request #1722 from 4Science/DS-3578
DS-3578 Endpoints to retrieve EPerson and Groups
2017-04-21 11:05:44 +02:00
Sophia Goldberg
eb1d5cf0b5 [DS-3397] Add null checks to EPerson and Group 2017-04-20 21:11:27 +01:00
Pascal-Nicolas Becker
4b5eaf483b apply PR1714 to master 2017-04-20 12:19:59 -07:00
Mark H. Wood
2accc41fe7 Merge pull request #1725 from mwoodiupui/DS-3564-master
[DS-3564] Limit maximum idle database connections by default (port from dspace-6_x)

Copied from approved patch to dspace-6_x branch.
2017-04-20 14:53:55 -04:00
Andrea Bollini
5303785686 removed commented out code 2017-04-20 19:53:31 +02:00
Andrea Bollini
3cb40a1b7b DS-3578 prefer group name over eperson group 2017-04-20 19:46:21 +02:00
Mark H. Wood
80c2722c7e [DS-3564] Limit maximum idle database connections by default (port from dspace-6_x) 2017-04-20 13:03:36 -04:00
Tim Donohue
177ef1febf Merge pull request #1721 from Georgetown-University-Libraries/ds3516m
[DS-3516] master Port ImageMagick PDF Thumbnail class should only process PDFs
2017-04-20 06:57:18 -07:00
Andrea Bollini
0dcb02ee0c DS-3578 Endpoints to retrieve EPerson and Groups
implemented pagination in the eperson and group service
2017-04-20 01:12:59 +02:00
Alan Orth
dbb3f8d6d6 Port PR1709 to master 2017-04-19 14:50:36 -07:00
Andrea Bollini
44d821ae7e DS-3577 Metadata Fields and Schemas READ-ONLY endpoints 2017-04-19 23:07:41 +02:00
Tim Donohue
773e5a3653 Minor updates to README warning about DSpace 7
Correct links, add note welcoming contributors, etc.
2017-04-13 12:02:39 -05:00
Christian Scheible
e022835d75 DS-3568. UTF-8 characters are now supported in configuration files 2017-04-12 15:42:24 +02:00
Andrea Bollini
8af93d8375 Merge pull request #1680 from Georgetown-University-Libraries/rest7site
Add endpoints for the Site object
2017-04-02 15:07:42 +02:00
Terry W Brady
e4134ffa48 Apply review comments 2017-03-30 14:09:09 -07:00
Tim Donohue
54805a8318 Merge pull request #1622 from toniprieto/DS-2947-DIM-repeats-authority-and-confidence-fix
[DS-2947] DIM crosswalks repeats authority & confidence values in the metadata values
2017-03-24 11:15:40 -05:00
Tim Donohue
65139d5453 Update README.md
Add a warning about lack of UI on master
2017-03-23 17:04:26 -05:00
Tim Donohue
cf5bd04447 Merge pull request #1679 from DSpace/rest7
Merge the Rest7 branch back to the master
2017-03-23 11:38:27 -05:00
Andrea Bollini
aaa57dd4fa Merge pull request #1666 from Georgetown-University-Libraries/rest7ds3515
[DS-3515] REST 7 Pagination for items and bitstreams
2017-03-23 17:00:57 +01:00
Andrea Bollini
89cc7d7f01 Merge pull request #1678 from 4Science/DS-3513
DS-3513 Provide an entry endpoint that exposes the known endpoints via the HAL browser
2017-03-23 16:53:01 +01:00
Andrea Bollini
b66066ffb6 restore dspace-solr profile 2017-03-23 16:38:27 +01:00
Mark H. Wood
e51dfe1f6e [DS-1140] Add configuration data 2017-03-22 21:49:33 +00:00
Mark H. Wood
a8bf670261 [DS-1140] Add unit test. 2017-03-22 21:49:24 +00:00
Mark H. Wood
3e4af4ec4a [DS-1140] No need to treat old and new Word formats differently 2017-03-22 21:49:16 +00:00
Mark H. Wood
ec9cc6e038 [DS-1140] New POI-based MS Word extractor and some comment cleanup 2017-03-22 21:49:08 +00:00
Terry W Brady
d921a9c9f2 Add support for Site object 2017-03-20 14:48:20 -07:00
Andrea Bollini
62bd9ed80d DS-3513 proper setting of the initialized attribute 2017-03-17 12:50:40 +01:00
Andrea Bollini
a2dc17e7ae DS-3513 initial implementation of the Root Rest Controller 2017-03-16 23:38:38 +01:00
Andrea Bollini
b6a9b0b51d Merge pull request #1677 from 4Science/rest7-updated
Merge current master in the rest7
2017-03-16 23:10:56 +01:00
Andrea Bollini
b20ce90b60 Merge branch 'master' of https://github.com/DSpace/DSpace into rest7
Conflicts:
	dspace/modules/pom.xml
	dspace/modules/spring-rest/pom.xml
	pom.xml
2017-03-16 21:52:54 +01:00
Tim Donohue
4ab43d6097 Merge pull request #997 from rradillen/DS-2299
DS-2299 useProxies and X-Forwarded-FOR
2017-03-15 14:18:19 -05:00
Terry W Brady
172c0228c1 dao pagination support for item and bitstream 2017-03-13 11:53:24 -07:00
Tim Donohue
5a2fdabaaf Merge pull request #1675 from mwoodiupui/rest7
[DS-3482] Fix test failure and update dependencies
2017-03-10 10:40:04 -06:00
Mark H. Wood
22987c10b2 [DS-3482] Force all Ehcache users that I can find to use a shared CacheManager. 2017-03-10 10:38:20 -05:00
Mark H. Wood
697433085f [DS-3482] Accept any type of DBConnection.
DSpace.getSingletonService(Class) looks for a service of type Class
named Class.getName().  I don't see how this ever worked, since
DBConnection is an interface, and an implementation will have some
other name.  Instead request any service which is instanceof
DBConnection.  There should be only one.

This patch uncovers a slew of new NPEs in dspace-api tests, which are
happening in dspace-services.  We have multiple Ehcache CacheManager
instances for some reason, and newer versions of Ehcache throw a fit
when you try to create multiple managers with the same configuration.
2017-03-10 10:31:22 -05:00
Mark H. Wood
0248b1471d [DS-3423] Update a few dependencies and fix license headers 2017-03-09 15:30:00 -05:00
Terry Brady
424f01ed65 [DS-3348] Drop date check in EmbargoService (#1542)
* Drop date check in EmbargoService

* Revise comment per review
2017-03-08 12:28:25 -06:00
Terry Brady
e7fbbc44c8 Merge pull request #1543 from terrywbrady/ds3334
[DS-3334] Allow reverse-chronological sort of submitters
2017-03-08 09:03:49 -08:00
Andrea Bollini
ce801dfac9 Merge pull request #1661 from Georgetown-University-Libraries/rest7ds3488
[DS-3488] REST7: Create Item Converter
2017-03-05 10:05:27 +01:00
Andrea Bollini
52f284ea5a add awareness of the pagination 2017-03-02 14:16:29 -08:00
Andrea Bollini
ea41259274 exclude linked resources in the default serialization 2017-03-02 14:16:29 -08:00
Terry W Brady
7c081176c9 Add item, collection, community to rest7 2017-03-02 14:15:52 -08:00
Terry Brady
d3e62e4496 Update README.md 2017-03-02 10:13:34 -08:00
Miika Nurminen
314dddafc7 [DS-3463] Fix IP authentication for anonymous users
Added group membership check based on context even if no eperson is found. Affects file downloads in (at least) xmlui.
2017-03-01 19:43:48 +02:00
Terry W Brady
57be1ee8bf Simple item properties 2017-02-28 15:52:19 -08:00
Tim Donohue
5a26f17a3d Workaround for travis-ci/travis-ci#4629 2017-02-27 21:37:52 +00:00
Mark H. Wood
96db228d7b [DS-3378] Patch to restore lost indices, from Adan Roman 2017-02-23 16:36:11 -05:00
Mark H. Wood
a0f4cb734a Merge pull request #1596 from tomdesair/DS-3367_Configurable-Workflow-authorization-denied-error
DS-3367: Fix authorization error on claim by non-admin user
2017-02-23 16:02:56 -05:00
Tim Donohue
280dce2470 Merge pull request #1646 from 4Science/DS-3482
Add the spring-rest overlay to allow building of the new rest7
2017-02-23 10:34:40 -06:00
Terry Brady
1a1b765283 Merge pull request #1595 from tomdesair/DS-2952_SOLR-full-text-indexing-multiple-bitstreams
DS-2952 SOLR full text indexing multiple bitstreams
2017-02-22 08:10:40 -08:00
Tim Donohue
f7ce229c84 Merge pull request #1577 from helix84/DS-2302-license-headers-cleanup
DS-2302 license headers cleanup
2017-02-21 15:12:18 -06:00
Tim Donohue
6a70c9a3c1 Merge pull request #1648 from tdonohue/DS-3422
DS-3422 Remove XMLUI and JSPUI from the official distribution
2017-02-20 16:29:37 -06:00
Andrea Bollini
d6c25c57d9 DS-3422 Remove XMLUI and JSPUI from the official distribution 2017-02-20 21:39:09 +00:00
Bram Luyten
27cd68271e DS-2840 switch logging to debug
Changes INFO level sidebar facet transformer log entries to DEBUG
2017-02-18 14:18:54 +01:00
Andrea Bollini
dd7406b8ce Add the spring-rest overlay to allow building of the new rest7
temporary turn off mvn-enforcer dependency convergence
temporary turn off dspace-solr (to migrate to an external SOLR6)
2017-02-17 18:44:07 +01:00
Andrea Bollini
8786987fb6 Add support for resources that use Integer ID instead than UUID
The rest resource controller now have separate mapping for resources with Integer identifier and UUID identifier. Each mapping delegate to the same generic method handler.
Add information about the requested rels to the DSpaceResource wrapper so to allow future inclusion of lazy loaded reference
Better handling of 404 and catch of some NPE
2017-02-16 15:23:26 +01:00
Andrea Bollini
e911a11c42 fix the name of the new rest webapp 2017-02-16 15:18:22 +01:00
Tim Donohue
c8084a2594 Merge pull request #1553 from 4Science/DS-3356-v6
DS-3356 add turnoff authz system
2017-02-15 16:08:56 -06:00
Andrea Bollini
d6c5aafbff Add initial informations about the new REST webapp 2017-02-12 19:23:54 +01:00
Andrea Bollini
44d34b397f Add license header and initial javadoc to describe the classes 2017-02-12 17:32:15 +01:00
Andrea Bollini
b9e885ab98 remove jdk7 env as DSpace7 will use JAVA8 language features 2017-02-12 16:34:36 +01:00
Andrea Bollini
3a21c4b315 Utils is now a singleton. DSpaceResource automatically adds links to embedded resources 2017-02-12 16:29:03 +01:00
Andrea Bollini
b7ce0389db Allow DSpaceResource to automatically discover links to other resources 2017-02-12 16:24:24 +01:00
Andrea Bollini
e151d86421 add support to serve multiple core entities from the RestResourceController
managed 404 for unavailable endpoints
add self link to single resources in a collection
2017-02-12 16:24:23 +01:00
Andrea Bollini
e992e00080 Initial skeleton for Spring MVC + HATEOAS 2017-02-12 16:24:02 +01:00
Andrea Bollini
e5f9aa67b9 update spring and hibernate dependencies 2017-02-12 16:22:55 +01:00
Andrea Bollini
c9807df70e Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3422
# Conflicts:
#	dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/submission/submit/AccessStepUtil.java
#	dspace-xmlui/src/main/java/org/dspace/app/xmlui/objectmanager/ItemAdapter.java
2017-02-12 16:17:07 +01:00
Tim Donohue
be862676ac Merge pull request #1644 from Georgetown-University-Libraries/ds3436m
DS-3436 Sharding SOLR cores corrupts multivalued fields for master
2017-02-09 08:48:03 -06:00
Tom Desair
17fea3b22a Port PR 1613 2017-02-08 14:03:48 -08:00
Tim Donohue
505565f802 Merge pull request #1630 from idmgroup/log-beansexception-master
Add exception message in log when a bean cannot be loaded
2017-02-08 10:49:31 -06:00
Roeland Dillen
61b9a5ef7f add guard code in case no dot is present in bitsream name 2017-02-08 10:41:49 -06:00
Tim Donohue
e91b1e964c Merge pull request #1642 from cjuergen/DS-3479
DS-3479 prevent the import of empty metadata
2017-02-08 10:13:05 -06:00
Mark H. Wood
dd4ca00071 [DS-3469] virus scan during submission attempts to read uploaded bitstream as anonymous user, which fails (#1632)
* [DS-3469] Add the current session context to the curation task run.

* [DS-3469] Log how I/O failed, not just that it did.

* [DS-3469] Keep reference to Bundle from which we just removed the Bitstream instead of expecting the List of Bundle to be unaltered.

* [DS-3469] Finish switching from e.getMessage() to e

* [DS-3469] Note the side effect of calling curate() with a Context.
2017-02-08 10:00:59 -06:00
Terry Brady
90cb82922f [DS-3456 ] Fix Command Line Parameters for statistics import/export tools (master) (#1635)
* Migrate 6x patch to master

* whitespace normalize

* more whitespace
2017-02-08 09:44:10 -06:00
Tim Donohue
eb35470128 Merge pull request #1634 from Georgetown-University-Libraries/ds3457m
[DS-3457] Address tomcat hang when multiple solr shards exist (master)
2017-02-08 09:32:10 -06:00
Terry W Brady
268660b5d9 whitespace 2017-02-07 09:17:54 -08:00
Mark H. Wood
d48e4ed432 Merge pull request #1580 from arvoConsultores/DS-3410
Deleting columns drop indexes
2017-02-06 16:11:01 -05:00
Tim Donohue
ecb19a737c Merge pull request #1631 from idmgroup/junitignore-abstract-tests-master
annotate unit tests so they can be run directly from a Junit runner
2017-02-06 08:00:54 -06:00
Mark H. Wood
0553aa5aa8 Merge pull request #1579 from arvoConsultores/DS-3409
DS-3409 Handle of collections and communities are lost
2017-02-06 08:25:51 -05:00
cjuergen
c323310c27 DS-3479 prevent the import of empty metadata 2017-02-06 13:40:38 +01:00
Hardy Pottinger
7d7a8108a1 Merge pull request #1636 from hardyoyo/DS-3475-add-assetstore.dir-to-dspace.cfg
[DS-3475] added back assetstore.dir configuration to dspace.cfg
2017-02-01 15:05:18 -06:00
Tom Desair
41deb20043 DS-3446: Remove policies only after the bitstream has been updated (otherwise the current user has not WRITE rights) 2017-02-02 10:02:32 +13:00
Hardy Pottinger
4b9095ae80 [DS-3475] adding more guidance to example local.cfg as per suggestion of Tim Donohue 2017-02-01 20:19:35 +00:00
Hardy Pottinger
425caf5656 [DS-3475] added back assetstore.dir configuration to dspace.cfg 2017-02-01 19:40:53 +00:00
Terry W Brady
9e84117557 apply 6x commits 2017-02-01 08:59:56 -08:00
Terry W Brady
1af506d35f apply 6x commits 2017-02-01 08:57:26 -08:00
Bram Luyten
190cbd5d76 Adding stackoverflow support option 2017-02-01 10:51:39 +01:00
Colin Delacroix
a17bf59b9d annotate unit tests so they can be run directly from eclipse junit4 runner 2017-01-30 11:27:39 +01:00
Colin Delacroix
c7b22165aa Add exception message in log when a bean cannot be loaded 2017-01-30 10:42:55 +01:00
Terry Brady
305cd55f25 [DS-3468] Ignore bin directory created by eclipse (#1626)
* Exclude top level /bin directory built by Eclipse
2017-01-26 16:30:17 +01:00
Toni Prieto
6b23729b17 [DS-2947] DIM crosswalks repeats authority & confidence values in the metadata values 2017-01-19 22:34:43 +01:00
Tim Donohue
717fda5d0b Merge pull request #1620 from hardyoyo/DS-3445
DS-3445 Only add "ResultCode" if not default
2017-01-19 11:55:26 -06:00
Jonas Van Goolen
c2c98e886e DS-3445 Only add "ResultCode" if not default 2017-01-19 17:36:53 +00:00
helix84
ba23d25b22 Merge pull request #1618 from AndrewBennet/master
[DS-3460] Fix incorrect REST documentation
2017-01-17 21:26:38 +01:00
Andrew Bennet
cf2d2a4d37 [DS-3460] Fix incorrect REST documentation 2017-01-17 17:11:31 +00:00
Bram Luyten
2b764be9ca Merge pull request #1602 from cjuergen/DS-3440
Fix for DS-3440
2017-01-06 18:22:54 +01:00
cjuergen
d95902b680 Fix for DS-3440 replacing sword-server config reference with
swordv2-server in swordv2
2017-01-05 13:03:53 +01:00
Tim Donohue
740486cf1c Merge pull request #1599 from samuelcambien/DS-3435
DS-3435 possible nullpointerexception at AccessStepUtil$populateEmbar…
2017-01-04 14:38:20 -06:00
samuel
9cd511def4 DS-3435 possible nullpointerexception at AccessStepUtil$populateEmbargoDetail 2017-01-03 12:38:56 +01:00
Andrea Bollini
0421fb4d75 DS-3422 Remove XMLUI and JSPUI from the official distribution 2017-01-03 09:26:45 +01:00
Tom Desair
92b0a5b5a0 DS-3367: Fix authorization error when non-admin users claim a configurable workflow task 2017-01-02 14:02:36 +01:00
Tom Desair
f5e07ba956 DS-2952: Added missing license 2016-12-30 13:35:01 +01:00
Tom Desair
c50c3006dd DS-2952: Only prepend new line if we have an actual input stream 2016-12-30 00:43:53 +01:00
Tom Desair
df1f81bf9d DS-2952: Small improvements to FullTextContentStreams and added a unit test for it 2016-12-30 00:16:25 +01:00
Tom Desair
3b2d8f3669 DS-2952: Use a SequenceInputStream to add the content of multiple full text bitstreams to SOLR 2016-12-28 23:47:12 +01:00
Terry Brady
3ed55464e9 fix typo in comment 2016-12-14 08:28:52 -08:00
Terry Brady
e5211103ec First attempt to resort submitters 2016-12-14 08:28:14 -08:00
Mark H. Wood
1137d4562c Merge pull request #1575 from mwoodiupui/DS-2707
[DS-2707] Poor messaging when batch upload directory cannot be created
2016-12-14 10:16:35 -05:00
aroman
0f49cf29fb Extracted to file 2016-12-01 10:16:47 +01:00
aroman
f22cb7da91 Revert "Handle of collections and communities are lost"
This reverts commit 7defb4b6c9.
2016-12-01 10:12:36 +01:00
aroman
59fd980254 Extracted to external sql 2016-12-01 10:08:36 +01:00
aroman
5ee1f786ab Revert "Deleting collumns drop indexes"
This reverts commit f0e8afef54.
2016-12-01 10:08:09 +01:00
aroman
f0e8afef54 Deleting collumns drop indexes 2016-12-01 09:30:23 +01:00
aroman
7defb4b6c9 Handle of collections and communities are lost 2016-12-01 09:11:47 +01:00
Peter Dietz
e0bd496e64 DS-2302 Remove license information from config files
Also removed excess text
2016-11-24 15:35:31 +01:00
Peter Dietz
2eb63a54e2 Remove boiler license from xmlui.xconf, also trim the inline text 2016-11-24 15:29:55 +01:00
Mark H. Wood
1d3a20cfd4 [DS-2707] Throw an exception if a working directory cannot be created, report it in UI.
Add lots of debug logging, including duplication of some console
output that of course won't appear when running in a webapp.

Also realigned some nearby code that was hard to read.
2016-11-22 11:49:57 -05:00
helix84
462ed4437c Merge pull request #1559 from helix84/DS-3363-csv-import-error-messages
DS-3363 CSV import error says "row", means "column"
2016-11-14 18:24:38 +01:00
helix84
a60a1f61e8 Merge branch 'master' into DS-3363-csv-import-error-messages 2016-11-14 18:04:18 +01:00
helix84
030242a7ff DS-3386 Travis build on both Java 7 and 8 (#1571) 2016-11-14 10:57:50 -06:00
Tim Donohue
f2e7cbf8bc Merge pull request #1570 from helix84/DS-3384-travis-oraclejdk8
DS-3384 tell Travis CI to build using Oracle JDK 8
2016-11-14 10:29:42 -06:00
Ivan Masár
8383ad0228 DS-3384 tell Travis CI to build using Oracle JDK 8 2016-11-14 16:49:38 +01:00
helix84
288be9bbc6 Merge pull request #1569 from helix84/reenable-doclint
DS-3384 re-enable DocLint
2016-11-13 19:47:39 +01:00
Ivan Masár
f7c0577a7c revert doclint-java8-disable 2016-11-13 19:18:49 +01:00
Ivan Masár
cae5570643 whitespace per Coding Conventions 2016-11-13 19:18:23 +01:00
Ivan Masár
0b0fab6404 javadoc fixme, whitespace fixes 2016-11-13 19:18:13 +01:00
helix84
dfbaa9074e Merge pull request #1567 from mwoodiupui/DS-3308
Clean up remaining doclint errors and warnings.
2016-11-13 19:17:31 +01:00
Mark H. Wood
d1f321f345 Clean up remaining doclint errors and warnings.
Throughout dspace-sword I was baffled by the validation aspect, so
you'll see lots of "UNKNOWN.  PLEASE DOCUMENT." that I wrote just to
shut doclint up.  If you know how this works, please amend my
placeholders.
2016-11-11 11:48:17 -05:00
Ivan Masár
269af71afb javadoc (doclint) and whitespace fixes
includes whitespace fixes as per Coding Conventions
2016-11-10 13:34:37 +01:00
Ivan Masár
db1641cfa9 fix JavaDoc @author 2016-11-10 13:34:37 +01:00
Ivan Masár
c92b1d8009 typo: xforwarderfor -> xforwardedfor 2016-11-01 16:19:41 +01:00
Mark H. Wood
5ff4ccfedc After 6.0 release: move master to 7.0-SNAPSHOT 2016-10-28 10:15:54 -04:00
Pascal-Nicolas Becker
f53f3e45cc Revert "prepare for next development iteration"
This reverts commit 543d2098ca.
2016-10-24 17:30:24 +02:00
Pascal-Nicolas Becker
1cb94c2799 Revert "Also moving mirage2 module to 7.0-SNAPSHOT"
This reverts commit 5c4e7ac327.
2016-10-24 17:30:20 +02:00
Pascal-Nicolas Becker
75260e6d17 Revert "Revert "Also moving mirage2 module to 7.0-SNAPSHOT""
This reverts commit 661db4c484.
2016-10-24 17:11:43 +02:00
Pascal-Nicolas Becker
661db4c484 Revert "Also moving mirage2 module to 7.0-SNAPSHOT"
This reverts commit 5c4e7ac327.
2016-10-24 17:11:34 +02:00
Pascal-Nicolas Becker
5c4e7ac327 Also moving mirage2 module to 7.0-SNAPSHOT 2016-10-24 16:51:24 +02:00
Pascal-Nicolas Becker
543d2098ca prepare for next development iteration 2016-10-24 16:45:36 +02:00
Pascal-Nicolas Becker
c17f85e4b3 [maven-release-plugin] prepare for next development iteration 2016-10-24 14:40:29 +02:00
Pascal-Nicolas Becker
0fea174368 [maven-release-plugin] prepare release dspace-6.0 2016-10-24 14:40:21 +02:00
Ivan Masár
244ec0c214 DS-3363 CSV import error says "row", means "column" 2016-10-24 09:48:24 +02:00
Mark H. Wood
65b76da6e8 [maven-release-plugin] prepare for next development iteration 2016-10-14 13:19:39 -04:00
Mark H. Wood
37bd1743ed [maven-release-plugin] prepare release dspace-6.0-rc4 2016-10-14 13:19:33 -04:00
Mark H. Wood
12d05985ee Update third-party licenses 2016-10-14 12:35:07 -04:00
Mark H. Wood
a792d83b81 Merge pull request #1555 from 4Science/DS-3345
DS-3345 Add sql script from dspace 5.6
2016-10-12 12:51:23 -04:00
Mark H. Wood
f20a0cb562 Merge pull request #1557 from 4Science/DS-3357
DS-3357 rethrow AuthorizationException in the SubmissionControl
2016-10-12 12:14:02 -04:00
Pascal-Nicolas Becker
e70d1622a2 Merge pull request #1526 from lap82/DS-2604-porting-cc
DS-2604 port XMLUI's approach to query Creative Commons service (via REST) to JSPUI
2016-10-12 17:40:16 +02:00
Andrea Bollini
fdfcf04c29 DS-3357 rethrow AuthorizationException in the SubmissionControl 2016-10-10 17:14:56 +02:00
Andrea Bollini
5d4e7db302 DS-3345 Add sql script from dspace 5.6 2016-10-10 16:42:07 +02:00
Luigi Andrea Pascarelli
127f79f2ef DS-3356 add turnoff authz system 2016-10-07 13:24:35 +02:00
Pascal-Nicolas Becker
bab9c563d2 Merge pull request #1551 from pnbecker/jsp.quickfix.2
Quickfix for dspace-admin/batchimport.jsp
2016-10-05 22:13:55 +02:00
Pascal-Nicolas Becker
dc3ee219a5 Quickfix for dspace-admin/batchimport.jsp
Obvious fix for dspace-admin/batchimport.jsp
2016-10-05 21:56:00 +02:00
Pascal-Nicolas Becker
49584dc5fd Merge pull request #1550 from DSpace/jsp.quickfix.1
use BulkEditMetadataValue.getValue() instead of private field
2016-10-05 21:50:31 +02:00
Pascal-Nicolas Becker
34a3b1b729 use BulkEditMetadataValue.getValue() instead of private field 2016-10-05 21:37:18 +02:00
Tim Donohue
008ad12e71 Merge pull request #1540 from tuub/DS-3311-config
DS-3311: Changing default configuration of healthcheck
2016-09-29 09:42:03 -05:00
Pascal-Nicolas Becker
6b59c19ee9 DS-3311: Changing default configuration of healthcheck 2016-09-29 12:44:16 +02:00
Luigi Andrea Pascarelli
9e710912f3 Merge pull request #1539 from 4Science/DS-3346-for-6
DS-3346 change and remove deprecated setIgnoreAuthorization in favour…
2016-09-29 00:04:56 +02:00
Luigi Andrea Pascarelli
f577074e69 DS-3346 change and remove deprecated setIgnoreAuthorization in favour of turnOff/restore 2016-09-28 23:39:24 +02:00
Terry Brady
ebeda8cc29 Merge pull request #1536 from terrywbrady/ds3322
[DS-3322] Prevent concurrent modification exception in Undo Bulk Ingest

At +2, merging
2016-09-28 13:59:56 -07:00
Terry Brady
3afbff3b1b Merge pull request #1511 from terrywbrady/ds-3312
[DS-3312] Prevent mvn error on xsl override
2016-09-28 13:59:26 -07:00
Tim Donohue
d8b065e0c8 Merge pull request #1513 from isido/fix-healthcheck
[DS-3311] Fix healthcheck
2016-09-28 15:10:22 -05:00
Terry Brady
27e557bd83 Prevent concurrent modification exception 2016-09-28 10:21:21 -07:00
Pascal-Nicolas Becker
4607bb90a6 Merge pull request #1515 from atmire/DS-3315
DS-3315: update node dependencies
2016-09-28 18:05:01 +02:00
Pascal-Nicolas Becker
97db817ef6 Merge pull request #1534 from tdonohue/DS-3317
DS-3317: Don't autoRelease artifacts to Maven Central
2016-09-28 17:28:30 +02:00
Pascal-Nicolas Becker
c92e83e628 Merge pull request #1535 from tuub/DS-3112
DS-3122 Set handle.canonical.prefix to the ${dspace.url}/handle.
2016-09-28 17:21:59 +02:00
Pascal-Nicolas Becker
4a33ca5d6f DS-3122 Set handle.canonical.prefix to the ${dspace.url}/handle. 2016-09-28 17:01:00 +02:00
Tim Donohue
0f10f91e4c DS-3317: Don't autoRelease artifacts to Maven Central 2016-09-26 12:37:35 -05:00
Luigi Andrea Pascarelli
fe624f7f67 DS-2604 add some comment 2016-09-26 19:07:47 +02:00
Tim Donohue
d872f5db03 Merge pull request #1530 from samuelcambien/DS-3339
DS-3339 possible nullpointer in ResourcePolicy$hashCode
2016-09-26 10:07:24 -05:00
Tim Donohue
e158fb8436 Merge pull request #1524 from BrunoNZ/DS-3333
DS-3333 Fix exchanged params on Schema creation
2016-09-26 10:05:18 -05:00
Pascal-Nicolas Becker
026ee860ac Merge pull request #1527 from tdonohue/DS-3335
DS-3335: Update to latest version of PostgreSQL JDBC driver
2016-09-26 16:47:01 +02:00
samuel
b8c118a1fd DS-3339 possible nullpointer in ResourcePolicy$hashCode 2016-09-26 14:23:51 +02:00
Luigi Andrea Pascarelli
c8e49b5624 Merge branch 'DS-3335' into DS-2604-porting-cc 2016-09-26 11:32:33 +02:00
Luigi Andrea Pascarelli
332bca78ad Merge branch 'master' into DS-2604-porting-cc 2016-09-26 11:10:24 +02:00
Tim Donohue
688c6ab714 DS-3335: Update to latest version of PostgreSQL JDBC driver. Properly select driver based on JDK installed 2016-09-23 10:38:30 -05:00
Ivan Masár
6fc128476d fix typos 2016-09-23 12:55:28 +02:00
Luigi Andrea Pascarelli
8feb68024b DS-2604 fix setoptionselected for placeholder option (selectchange and nolicense options) 2016-09-22 23:38:37 +02:00
Luigi Andrea Pascarelli
5ba08ade7f DS-2604 add right way to manage selected value from CC dropdown, change admin button message for add/edit CC, fix resolution of conflict 2016-09-22 21:55:43 +02:00
Tim Donohue
fc99ffcc5a Merge pull request #1525 from tdonohue/DS-3310
README updates for SWORDv1 and a new README for SWORDv2
2016-09-22 14:11:02 -05:00
Tim Donohue
aea6f5df14 Remove an accidental newline 2016-09-22 13:18:08 -05:00
Tim Donohue
8e0994329d README updates for SWORDv1 and a new README for SWORDv2 2016-09-22 13:16:12 -05:00
Bruno Nocera Zanette
44f7d56724 DS-3333 Fix exchanged params on Schema creation 2016-09-22 14:57:53 -03:00
Luigi Andrea Pascarelli
9086a1ecf2 DS-2604 port from XMLUI to JSPUI the approach to reach the Creative Commons service (via REST API) 2016-09-22 18:02:37 +02:00
Art Lowel
291a62c161 fixed an issue where the automatic node download would fail on windows 2016-09-22 12:54:58 +02:00
Art Lowel
d8404f1b71 updated node and npm version in travis build 2016-09-22 09:27:46 +02:00
Art Lowel
029c7dfea0 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3315 2016-09-22 09:21:14 +02:00
Tim Donohue
4e1cad0109 Merge pull request #1476 from cwilper/DS-1929-safe-bitstream-embargo
DS-1929 Permit bitstream embargo edit only via Edit Policy
2016-09-21 15:56:25 -05:00
Terry Brady
58bbda6468 Fix pom syntax 2016-09-21 09:40:47 -07:00
Pascal-Nicolas Becker
98c3c92e22 Merge pull request #1509 from sedici/DS-3280
DS-3280 Fix HQL Syntax at HandleDAOImpl
2016-09-21 17:56:03 +02:00
Ilja Sidoroff
2ba757104f Add note on pre-3.0 functionality to embargo check error path 2016-09-21 09:38:44 +00:00
Ilja Sidoroff
7b146bb59f Add Pre-3.0 to embargo check name 2016-09-21 09:37:27 +00:00
FacundoAdorno
e761d0fbb4 DS-3280 Fix inconsistency after running 'update-handle-prefix'
The 'handle suffix' in the text_value DB column is lost
after running the 'update-handle-prefix'.
2016-09-19 14:24:47 -03:00
FacundoAdorno
baa7c56e46 Merge branch '4Science-DS-3280' into DS-3280 2016-09-19 12:47:05 -03:00
Luigi Andrea Pascarelli
fa87235ad9 Merge pull request #1433 from tuub/DS-3240
DS-3240: comm/coll admins misses some functions and a propper navbar.
2016-09-19 15:02:25 +02:00
Andrea Bollini
29496399da DS-3280 fix authorization and lazy proxy class cast issues 2016-09-18 16:33:12 +02:00
Andrea Bollini
69326c32f5 Merge branch 'DS-3280' of https://github.com/sedici/DSpace 2016-09-18 15:55:04 +02:00
FacundoAdorno
951a9ed18f DS-3280 Replace 'handle_id' by 'id' in HQL query
The HQL query was fixed to use the 'id' of the Hibernate entity
instead of the 'handle_id' DB column.
2016-09-15 17:27:18 -03:00
Art Lowel
1a37b271da DS-3315: update node dependencies 2016-09-14 14:47:46 +02:00
Pascal-Nicolas Becker
ea642d6c92 Merge pull request #1514 from helix84/DS-3313-fix-migration-from-DS-2775
DS-3313 fix migration script 6.0_2016.07.21__DS-2775.sql
2016-09-13 16:02:05 +02:00
Ivan Masár
c74dfe3642 DS-3313 fix migration script 6.0_2016.07.21__DS-2775.sql 2016-09-13 15:17:54 +02:00
Ilja Sidoroff
5061c0bb49 Removed deprecated search.dir-property; added null check for directory properties 2016-09-13 12:56:40 +00:00
Ilja Sidoroff
92b58c62c8 Include healthcheck configuration file; remove unsubstituted email properties 2016-09-13 10:49:30 +00:00
Ilja Sidoroff
174ac771b6 Merge remote-tracking branch 'upstream/master' 2016-09-13 09:54:58 +00:00
Terry Brady
3600427f5b Prevent mvn error on xsl override 2016-09-12 17:40:42 -07:00
helix84
560d280d9e Merge pull request #1508 from openaire/XOAI_OpenAIRE_3.0
DS-3017 Compliance with the OpenAIRE 3.0 guidelines for literature repositories
2016-09-12 16:50:56 +02:00
Ivan Masár
f6c8475cb2 fix typos 2016-09-12 15:09:29 +02:00
Andrea Bollini
76e52f230b Merge pull request #1510 from helix84/pdfbox-2.0.2
bump up to latest minor pdfbox version
2016-09-12 09:18:15 +02:00
Ilja Sidoroff
08b691624c Merge remote-tracking branch 'upstream/master' 2016-09-08 07:25:26 +00:00
Ivan Masár
f861bc7ac7 bump up to latest minor pdfbox version 2016-09-07 23:41:44 +02:00
Pascal-Nicolas Becker
161baecc49 [maven-release-plugin] prepare for next development iteration 2016-09-06 19:25:01 +02:00
Pascal-Nicolas Becker
7cceb2a9cc [maven-release-plugin] prepare release dspace-6.0-rc3 2016-09-06 19:23:50 +02:00
Pedro Principe
f04257887a Compliance with the OpenAIRE 3.0 guidelines for literature repositories 2016-09-02 17:11:31 +01:00
Chris Wilper
13c20333db DS-1929 Get bitstream embargo date using start date of first anonymous READ policy encountered for bitstream 2016-09-02 10:28:54 -04:00
Chris Wilper
a98c93b4b6 DS-1929 Permit bitstream embargo edit only via Edit Policy 2016-09-02 09:28:58 -04:00
Mark H. Wood
98ae2bd071 [DS-3097] Bitstreams of embargoed and/or withdrawn items can be accessed by anyone 2016-09-01 15:06:44 -04:00
Ilja Sidoroff
9a110152d5 Merge remote-tracking branch 'upstream/master' 2016-09-01 12:50:31 +00:00
Tim Donohue
ad4d1a8de3 Merge pull request #896 from tuub/DS-1814
DS-1814: Allow submitter to create new version of their items.
2016-08-31 15:49:08 -05:00
Tim Donohue
6b790a3c21 Merge pull request #1505 from tdonohue/fix_unit_test
Fix failing test from changes in PR#1495
2016-08-31 15:08:05 -05:00
Tim Donohue
6649263dd6 Fix failing test from changes in PR#1495 2016-08-31 14:52:16 -05:00
Tim Donohue
51d56cf654 Merge pull request #1495 from Georgetown-University-Libraries/DS-3286b1
[DS-3286] Remove clearCache() and allow uncacheEntity() on specific objects
2016-08-31 14:35:46 -05:00
Tim Donohue
4e8d76afe7 Merge pull request #1489 from tdonohue/DS-3233-handle-plugin
DS-3233: Update HandlePlugin to start/stop its own DSpaceKernel
2016-08-31 14:21:20 -05:00
Pascal-Nicolas Becker
4f28d59422 Change default configuration for submitterCanCreateNewVersion. 2016-08-26 14:07:57 +02:00
Ilja Sidoroff
ee1a31d7f9 Merge remote-tracking branch 'upstream/master' 2016-08-26 06:22:39 +00:00
Ilja Sidoroff
6404308d9d Merge branch 'citation-page-fix-temp-path' 2016-08-26 06:20:16 +00:00
Bill Tantzen
e278917bef replaced call to Boolean.getBoolean() (always returns false) with Boolean.valueOf()
Conflicts:
	dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/SendItemRequestAction.java
2016-08-25 17:29:07 +00:00
LuizClaudioSantos
053b19b637 Solving the issue DS-3193 2016-08-25 17:15:25 +00:00
Tim Donohue
1c1019c694 Merge pull request #1501 from isido/citation-page-fix-temp-path
[DS-3299] Fix temporary file path
2016-08-25 08:32:22 -05:00
Pascal-Nicolas Becker
30b21fec7b Merge pull request #1399 from Georgetown-University-Libraries/DS-3209
DS-3209 AIP Import: Extend accepted handles for supports()
2016-08-25 13:46:01 +02:00
Marsa Haoua
c2ef180ef8 DS-3240: comm/coll admins misses some functions and a propper navbar. 2016-08-25 13:21:57 +02:00
Pascal-Nicolas Becker
8321527f74 Merge pull request #4 from lap82/DS-1814
[DS-1814] remove deprecated ConfigurationManager in favour of Configu…
2016-08-25 10:16:00 +02:00
Andrea Bollini
9deb9ed57f Merge pull request #1488 from robintaylor/DS-2948
DS-2948 : Set Solr captureAttr to true when indexing full text
2016-08-24 18:51:43 +02:00
Luigi Andrea Pascarelli
0d3c7a586a DS-1814 fix merge 2016-08-24 18:29:23 +02:00
Luigi Andrea Pascarelli
a017c7ad82 Merge branch 'master' into DS-1814
# Conflicts:
#	dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java
2016-08-24 18:24:57 +02:00
Tim Donohue
0f7f1d96e9 Merge pull request #1493 from 4Science/DS-2895
DS-2895 authorization check for item not owned by collection
2016-08-24 10:42:30 -05:00
Tim Donohue
16a5bf5ea6 Merge pull request #1471 from tdonohue/DS-3269
DS-3269: Disable Flyway out of order migrations. Also cleanup of XML Workflow enabling.
2016-08-24 10:18:36 -05:00
Tim Donohue
fbb2a6049e Merge pull request #1479 from tdonohue/DS-3277
DS-3277 : Create new 'handle_id_seq' for handle_id column. Use 'handle_seq' to mint new handles.
2016-08-24 10:14:38 -05:00
Tim Donohue
9a7181b554 Merge pull request #1494 from lap82/DS-3292
[DS-3292] Delete the Item from EditItemServlet doesn't work well
2016-08-24 10:10:22 -05:00
Ilja Sidoroff
2e7d5978d9 Fix temporary file path 2016-08-23 11:36:16 +00:00
Tim Donohue
323fe1707b Merge pull request #1499 from 4Science/DS-3295
DS-3295 fix MultiFormatDateParserTest failure on not English VM
2016-08-22 08:55:43 -05:00
Luigi Andrea Pascarelli
adccc13d2c Merge branch 'DS-3292' into DS-1814 2016-08-20 20:29:49 +02:00
Luigi Andrea Pascarelli
b58c6cd106 [DS-1814] add deletion in case exist a workflowitem 2016-08-20 20:27:17 +02:00
Luigi Andrea Pascarelli
0db78afa2c [DS-1814] fix logic into for each iteration (remove the version from the identifier not the item self) 2016-08-20 20:26:31 +02:00
Luigi Andrea Pascarelli
2087ec2522 [DS-1814] move unbindhandle first, its fix stale exception due to the unbind identifier done after remove version (remove version itself unbind handle many times) 2016-08-20 20:23:55 +02:00
Andrea Bollini
3b56a9f85a DS-3295 fix MultiFormatDateParserTest failure on not English VM 2016-08-20 16:11:21 +02:00
Andrea Bollini
651b49e05a DS-28DS-2895 add unit test to expose the wrong behaviour
slightly renamed the method isAnInprogressSubmission in isInProgressSubmission to make it uniform with DSpace 5 and added to the service interface to allow testing and easy reuse
2016-08-20 15:41:29 +02:00
Mark H. Wood
bbe9f23ef9 Merge pull request #1492 from tdonohue/DS-3290
DS-3290: Revert yuicompressor back to v 2.3.6
2016-08-19 16:32:33 -04:00
Mark H. Wood
0a677235bc Merge pull request #1348 from tuub/DS-3122
DS-3122: Make DataCite XML namespace configurable.
2016-08-19 16:30:16 -04:00
Terry Brady
bd833dca25 Comment cache removal methods added in PR 2016-08-19 09:57:03 -07:00
Terry Brady
d7d858cea0 Make additional evict() calls to hibernate cache 2016-08-18 22:36:31 -07:00
Terry Brady
14a22e476c Add additional tests, set properties explicitly 2016-08-18 18:01:43 -07:00
Terry Brady
1a0b556040 remove unneeded decl 2016-08-18 17:50:13 -07:00
Terry Brady
6178597f02 bug 2016-08-18 17:22:38 -07:00
Terry Brady
17af928b05 Call uncache item 2016-08-18 17:15:48 -07:00
Terry Brady
d64722a628 Add evict method 2016-08-18 17:10:43 -07:00
Luigi Andrea Pascarelli
c8641e5ed6 [DS-1814] remove deprecated ConfigurationManager in favour of ConfigurationService 2016-08-17 22:45:56 +02:00
Tim Donohue
dc23c51340 Minor improvements to validation of 'migrate' command. Make sure if someone enters a number, they have a chance to exit. 2016-08-17 17:46:26 +00:00
Tim Donohue
855cbbcac3 DS-2713: Cleanup. Remove unnecessary "workflow.framework" config. Comment cleanup. Make easier to enable in Spring configs 2016-08-17 17:46:26 +00:00
Tim Donohue
977b49907a DS-3269 : Turn off out-of-order migrations. Fix SQL query that wouldn't work if migrations run out-of-order. 2016-08-17 17:46:26 +00:00
Tim Donohue
4334ffdd99 Merge pull request #1464 from tdonohue/DS-3266
DS-3266 : Fix AIP restore logic for restricted items and add Integration Tests
2016-08-17 12:36:38 -05:00
Luigi Andrea Pascarelli
8a2df22233 [DS-3292] no need to iterate the owner collection, delete item in one operation 2016-08-17 16:57:21 +02:00
Andrea Bollini
5ade3cb971 DS-2895 wrap the updateLastModified call inside an ignore authorization block / move the call after that the action has been performed 2016-08-17 13:57:23 +02:00
Terry Brady
351b03a87b Use handle.original.prefixes 2016-08-16 13:17:38 -07:00
Andrea Bollini
4d11e7fd29 DS-2895 authorization check for item not owned by collection 2016-08-16 21:28:09 +02:00
Terry Brady
c061898b07 Merge pull request #4 from Georgetown-University-Libraries/DS-3209A
use additional prefixes
2016-08-15 15:47:19 -07:00
Terry Brady
f5c4fbce69 Support additional prefixes 2016-08-15 15:31:02 -07:00
Tim Donohue
1578503a2d DS-3290: Revert yuicompressor back to v 2.3.6 2016-08-15 19:13:04 +00:00
helix84
28fd9a0533 Merge pull request #1490 from tdonohue/DS-3288
DS-3288: Fix CSV export to use valueSeparator between values instead of fieldSeparator
2016-08-15 16:27:27 +02:00
Bruno Nocera Zanette
b9d34144cb Fix: Bitstream's retrieval's response without filename
This adds bitstreams's filename to retrieval's response, and it fixes the bug that all bitstreams are downloaded using the same filename ("retrieve").
2016-08-15 16:21:11 +02:00
Tim Donohue
120c2fa6db DS-3288: Fix CSV export to use *valueSeparator* between values instead of *fieldSeparator* 2016-08-12 14:32:11 -05:00
Tim Donohue
8da4fb5bf7 DS-3233: Create a Windows version of 'start-handle-server' script 2016-08-12 11:49:54 -05:00
Tim Donohue
61d900d63d Update license headers & initial comments in all commandline scripts 2016-08-12 10:11:49 -05:00
Tim Donohue
fe1d908335 DS-3233: Update HandlePlugin to start/stop its own DSpaceKernel (needed for access to Services) 2016-08-11 16:24:18 -05:00
Robin Taylor
6dd2bda4cc DS-2948 : Set Solr captureAttr to true when indexing full text 2016-08-11 14:00:53 +01:00
helix84
daa0af54d5 Merge pull request #1392 from oooriii/DS-3206
DS-3206 Policy form merge field values when perform group search
2016-08-11 10:50:47 +02:00
Tim Donohue
5281d43fa2 Merge pull request #1483 from helix84/DS-2897-deprecate-elasticsearch-stats
DS-2897 deprecate ElasticSearch Statistics
2016-08-10 11:31:25 -05:00
Tim Donohue
3def2be17a AIP Integration Test stability improvements. Make sure tests use separate temp directories for AIPs, better NPE handling for AIP parsing. 2016-08-09 14:00:07 -05:00
Terry Brady
90655910d2 Merge pull request #3 from mwoodiupui/DS-3209
[DS-3209] Un-hack SpringServiceManager and use a child ApplicationCon…
2016-08-09 08:58:27 -07:00
helix84
64f72f9090 Merge pull request #1485 from tdonohue/DS-3153
DS-3153 : Move local.cfg.EXAMPLE to [src]/dspace/config/ directory.
2016-08-09 01:17:57 +02:00
Tim Donohue
ab90116268 DS-3153 : Move local.cfg.EXAMPLE to [src]/dspace/config/ directory. 2016-08-08 16:23:44 -05:00
Mark H. Wood
66332dd973 [DS-3209] Un-hack SpringServiceManager and use a child ApplicationContext to hold our testing Bean. 2016-08-08 17:07:22 -04:00
Tim Donohue
78f6b50dea Merge pull request #1482 from jonas-atmire/DS-3279-Anonymous-group-ID-retrieval
DS-3279: Retrieval of Anonymous group's UUID for read rights query
2016-08-08 15:16:25 -05:00
Terry Brady
d0180e6c02 Merge pull request #2 from mwoodiupui/DS-3209
Ds 3209 Merge Mark Wood's Patch to add testing support
2016-08-08 11:13:31 -07:00
Mark H. Wood
0785be55cb [DS-3209] Remove silly quotes from sample identifiers -- they cause mismatches. 2016-08-08 13:38:51 -04:00
Mark H. Wood
1a2aab04d9 [DS-3209] Tidy up the code 2016-08-08 13:38:07 -04:00
Tim Donohue
0659f1969d Merge pull request #1319 from KevinVdV/DS-2996-fix-hiearchical-community-retrieval
[DS-2996] Fix retrieval of hierarchical of communities from a collection
2016-08-08 12:07:20 -05:00
Tim Donohue
702c48f379 Merge pull request #1473 from mwoodiupui/DS-3270
[DS-3270] NoClassDefFoundError error when launching the instance OAI
2016-08-08 11:56:50 -05:00
Mark H. Wood
75fffa33ff [DS-3270] Also remove exclusions from modules/oai as aschweer noted. 2016-08-08 12:41:43 -04:00
Mark H. Wood
83498162c8 [DS-3209] First hack at a unit test suite for Handle IdentiferProviders. 2016-08-08 11:58:02 -04:00
Tim Donohue
70351b6777 Merge pull request #1484 from helix84/DS-3154-fix-javadoc
DS-3154 fix javadoc
2016-08-05 15:34:04 -05:00
FacundoAdorno
d09e8036a9 DS-3280 Fix HQL Syntax at HandleDAOImpl
Solved the error when executing ./dspace update-handle-prefix
in commandline. There were some errors in the HQL syntax at
HandleDAOImpl class when updating the HANDLE table.
2016-08-05 14:32:35 -03:00
Tim Donohue
f6ca2f3f1b Fix ITDSpaceAIP to no longer re-use AIPs between tests. Ensure all tests are standalone. 2016-08-05 12:31:28 -05:00
Tim Donohue
8fff41f8a9 Fix AIP restoration of item with no policies attached. Add Integration Test to prove. 2016-08-05 10:39:38 -05:00
Ivan Masár
9b94002426 DS-3154 fix javadoc 2016-08-05 13:55:42 +02:00
Ivan Masár
0f840a71f5 DS-2897 deprecate ElasticSearch Statistics 2016-08-04 12:11:36 +02:00
Tim Donohue
3c7d44caa1 Merge pull request #1462 from tdonohue/DS-2880-and-DS-3144
DS-2880 and DS-3144 : Fixing PubMed Import functionality
2016-08-03 16:00:55 -05:00
Tim Donohue
def2698c20 Merge pull request #1478 from tdonohue/DS-3233
DS-3233 : Hardcode log directory into start-handle-server script
2016-08-03 15:34:07 -05:00
Tim Donohue
d29e6239f5 Merge pull request #1468 from tdonohue/DS-3234
DS-3234 and DS-3268 : Upgrade to Flyway 4 and fix Ant migration issues
2016-08-03 15:26:48 -05:00
Tim Donohue
12df910e23 Merge pull request #1481 from dbs/initialize_ldap_context
DS-1518 : Initialize LDAP context object for anonymous searching
2016-08-03 14:39:57 -05:00
Tim Donohue
2dfaa4bf57 Enhance/clarify comments around 'db.cleanDisabled' setting 2016-08-03 13:39:35 -05:00
mjmarttila
f6bfc491d3 More restrictive handle definitions
As per request by pnbecker and tdonahue, reworking supports() method to
be more restrictive in its handle validation while also still allowing
support for multi-instance environments with derived handles. Now, if a
handle does not match one of the currently known DSpace handle provider
formats, it will be rejected.
2016-08-03 14:02:16 -04:00
Jonas Van Goolen
13a13a4d83 DS 3279 Retrieval of Anonymous group's UUID for read rights query 2016-08-02 10:07:19 +02:00
Dan Scott
063085741b Initialize LDAP context object for anonymous searching
In commit 7cf90d3db2 we added support for StartTLS in LDAP, but
opened up a path for a NullPointerException when anonymous searching of
the LDAP directory is in use.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
2016-07-29 15:47:16 -04:00
Tim Donohue
32806248e6 Merge pull request #1480 from tdonohue/DS-3075-ItemListConfig
DS-3075 : Replace parsing config by commas with getArrayProperty()
2016-07-29 10:42:06 -05:00
Tim Donohue
54d1bc1810 DS-3075 : Replace parsing config by commas with getArrayProperty() 2016-07-29 10:20:17 -05:00
Tim Donohue
becf15debf DS-3277 fixes : Update handle_id to use a new handle_id_seq. Mint new Handles using existing handle_seq. 2016-07-28 16:12:02 -05:00
Tim Donohue
99ec435a5c DS-2775 additional fixes. Missing migration for H2. Sync update-sequences files between Postgres and Oracle 2016-07-28 16:10:06 -05:00
Mark H. Wood
df8d9c7d68 Merge pull request #1472 from mwoodiupui/DS-2775
[DS-2775] Drop unused database SEQUENCEs and do not try to update them
2016-07-27 12:39:23 -04:00
Mark H. Wood
9f7a208f03 [DS-2775] Correct the link to the origin of our Oracle helper script. 2016-07-27 12:04:01 -04:00
Tim Donohue
3e79686005 DS-3233 : Hardcode log directory into start-handle-server script. Read DSPACEDIR from config. Minor cleanup 2016-07-25 16:37:24 -05:00
Tim Donohue
7c2cc224db Merge pull request #1474 from cwilper/DS-3275-editpolicy-duplicate-fix
DS-3275 Fix erroneous duplicate policy error on edit
2016-07-25 15:51:25 -05:00
helix84
7636185906 Merge pull request #1477 from cwilper/DS-3276-authority-indexing-npe-fix
DS-3276 Fix authority indexing NPE
2016-07-25 14:24:47 +02:00
helix84
e0292383f2 Merge pull request #1475 from cwilper/DS-3267-edit-collection-defaultread-fix
DS-3267 Add alt getCollectionDefaultRead method w/UUIDs
2016-07-25 12:43:54 +02:00
Chris Wilper
b5c77f7324 DS-3276 Fix authority indexing NPE 2016-07-24 10:25:36 -04:00
Chris Wilper
4041024f74 DS-3267 Add alt getCollectionDefaultRead method w/UUIDs 2016-07-23 16:14:32 -04:00
Chris Wilper
2076f68606 DS-3275 Fix erroneous duplicate policy error on edit 2016-07-23 11:00:47 -04:00
Mark H. Wood
2fcef3d94c [DS-3270] Un-exclude commons-lang3 and asm from dspace-api, whence dspace-oai is supposed to get them. 2016-07-22 16:23:05 -04:00
Mark H. Wood
1b232a6c50 [DS-2775] Remove sequence that was already dropped in a previous patch, and fix documentation. 2016-07-21 16:36:21 -04:00
Mark H. Wood
8e9b2b68df [DS-2775] Drop unused sequences. 2016-07-21 15:35:25 -04:00
Mark H. Wood
491efa8142 [DS-2775] Don't update sequences that we no longer use. 2016-07-21 15:35:10 -04:00
Tim Donohue
b544423a75 Merge pull request #1467 from tdonohue/DS-3154
DS-3154 : Disable 'doclint' checks by default when building with Java 8 or above
2016-07-20 15:25:32 -05:00
Tim Donohue
d1695521c5 DS-3234: Initialize database when Context first loads. Ensures starting Tomcat initializes database again. 2016-07-19 16:36:40 -05:00
Tim Donohue
7d63df81dc Return proper error status if issues found with database 2016-07-19 12:57:54 -05:00
Tim Donohue
5de418ad03 DS-3234 : Ensure test_database is called for updates. Change Ant log4j-console settings to WARN or above. 2016-07-19 12:43:42 -05:00
Tim Donohue
24e7a5a5ec DS-3234: No longer upgrade database from Ant. However the Ant 'database test' will now report DB issues PRIOR to upgrading your DB (see previous commit) 2016-07-19 12:07:34 -05:00
Tim Donohue
fe25840b64 DS-3234 : Enable new Flyway 4 option to disable 'clean' by default. Refactor commandline tools so 'test' also reports DB issues. 2016-07-19 12:05:51 -05:00
Tim Donohue
5a61d62100 DS-3234: Upgrade to Flyway 4.0.3. Fix minor upgrade issues with FlywayCallback classes. 2016-07-19 10:08:02 -05:00
Tim Donohue
aa582848a4 Add ability to "validate" a database by running Flyway validate directly. Makes for easier testing/validation 2016-07-19 10:07:26 -05:00
Tim Donohue
142136cfb1 Merge pull request #1466 from tdonohue/DS-3153
DS-3153: Include local.cfg.EXAMPLE and README.md in binary releases
2016-07-18 16:11:56 -05:00
Tim Donohue
fece1eed4d DS-3154: Replace invalid UTF-8 character in comment (reported by m-javadoc-p) 2016-07-18 15:46:21 -05:00
Tim Donohue
37e1a12731 DS-3154: Disable doclint for Java 1.8 by default 2016-07-18 15:46:03 -05:00
Tim Donohue
ac706583ff Fix for DS-3153. Include local.cfg.EXAMPLE and README.md in binary releases 2016-07-18 15:05:35 -05:00
Tim Donohue
1399f08138 Minor bug fixes to fix Travis Unit Test errors 2016-07-18 13:25:38 -05:00
Tim Donohue
a2704fe1f6 DS-3266: Refactor finishItem() to no longer replace/add policies EXCEPT for new Items (see installItem()) 2016-07-18 11:26:16 -05:00
Tim Donohue
a3854f54a8 DS-3266: Refactor 'for' loop in METSRightsCrosswalk to work properly and remove unused methods 2016-07-18 11:25:28 -05:00
Tim Donohue
127fd92481 DS-3266 : Add (currently failing) tests for restoring restricted objects 2016-07-18 11:24:40 -05:00
Tim Donohue
3650e5b90f Merge pull request #1396 from Georgetown-University-Libraries/DS-3140
DS-3140 METSRightsCrosswalk NPE During AIP Restore - No Anonymous Read
2016-07-15 10:25:00 -05:00
Tim Donohue
574b3f9077 Merge pull request #1458 from aschweer/DS-3264-fix-groupname-export
Ds 3264 fix groupname export
2016-07-15 10:07:36 -05:00
Tim Donohue
3c1c3c4305 Merge pull request #1424 from tuub/DS-3226
DS-3226: Avoid NPEs for wrong search URIs.
2016-07-14 15:34:47 -05:00
Tim Donohue
477f768970 Minor README corrections for publication-lookup.url 2016-07-14 20:05:58 +00:00
Tim Donohue
3f383018ee DS-3144: Use publication-lookup.url instead of less specific publication.url. 2016-07-14 19:09:00 +00:00
Jonas Van Goolen
fcfd7bacba DS-3144 Handlebars: inclusion in resource whitelist + mimetype update 2016-07-14 18:42:21 +00:00
Roeland Dillen
e443783473 fixing javadoc generation warnings and correctly attributing 2016-07-14 16:56:40 +00:00
Jonas Van Goolen
7886100e2a DS-3150 Docs: Enabling the framework 2016-07-14 16:56:40 +00:00
Jonas Van Goolen
21b31823ef DS-3150 Restructured packages 2016-07-14 16:56:40 +00:00
Jonas Van Goolen
d72b0849a2 Update of generalised docs class name 2016-07-14 16:56:40 +00:00
Jonas Van Goolen
67af1cedf9 DS-3150 Package-info updates + update of altered classname in javadoc 2016-07-14 16:56:40 +00:00
Roeland
528d26eec5 fix rogue assembly changes 2016-07-14 16:56:40 +00:00
Roeland Dillen
2a8e02faf9 license headers for package-info's 2016-07-14 16:56:40 +00:00
Bjorn Jaspers
d705849fc5 Added JavaDocs for the classes 2016-07-14 16:56:40 +00:00
Roeland Dillen
f881d0ff98 renaming for clarity 2016-07-14 16:56:40 +00:00
Roeland Dillen
eb13b4bc1d package infos 2016-07-14 16:56:40 +00:00
Roeland
b3a67e716c elaborating javadoc' 2016-07-14 16:56:40 +00:00
Jonas Van Goolen
8eafa4b3f1 Additional javadoc 2016-07-14 16:56:40 +00:00
Roeland
ed5c191dc2 adding javadoc 2016-07-14 16:56:40 +00:00
Roeland Dillen
5b1ff9264d partial method docs 2016-07-14 16:56:40 +00:00
Jonas Van Goolen
582f30b20d DS-2880 Spring bean/language config fix + additional commenting 2016-07-14 16:56:40 +00:00
Tim Donohue
c04b4cb5c4 Merge pull request #1455 from atmire/DS-3199
DS-3199
2016-07-14 09:19:01 -05:00
Tim Donohue
8f587dc6c6 Merge pull request #1406 from atmire/DS-3146
DS-3146 NPE when starting a new JSPUI submission with BTE metadata import enabled
2016-07-13 16:23:00 -05:00
Pascal-Nicolas Becker
c4ee71a800 DS-1814: Don't allow submitters to update all of their own items 2016-07-13 21:32:15 +02:00
Marsa Haoua
701d4ba6b1 DS-1814: Allow submitters to create new version of their items 2016-07-13 21:31:43 +02:00
Hardy Pottinger
e1c76b397d Merge pull request #1459 from tdonohue/DS-3262
Fixes for DS-3262 and DS-3263 (deleting or renaming/missing metadata fields)
2016-07-13 11:31:54 -05:00
Tim Donohue
1e344bed0f Merge pull request #1429 from tuub/DS-3229
DS-3229: JSPUI: Submission verify step ignores type binding
2016-07-13 10:40:26 -05:00
Pascal-Nicolas Becker
4826184f67 Merge pull request #1453 from tuub/DS-3256
DS-3256: Load webui.itemdisplay.default correctly.
2016-07-13 17:30:57 +02:00
Tim Donohue
97f5c468cb Merge pull request #1454 from tuub/DS-3259
[DS-3259] Prevent generation of resource policies with null values
2016-07-13 10:21:27 -05:00
Hardy Pottinger
5d0992efc2 Merge pull request #1449 from hardyoyo/DS-3217-fix-more-than-one-test
[DS-3217] fix more than one test
2016-07-13 10:14:48 -05:00
Tim Donohue
ae9ed9d446 Minor fix to broken Unit Test. Metadata values must be cleared before the field can be cleaned up / deleted. 2016-07-12 13:00:02 -05:00
Tim Donohue
09ad42eaec Fix bug in DSpaceObjectServiceImpl where MetadataValues were never being deleted, but just disassociated with objects. 2016-07-12 12:59:14 -05:00
Tim Donohue
3f98a52dd8 Fix DS-3263. Check for null MetadataField whenever using metadataFieldService.findByElement() 2016-07-12 11:38:51 -05:00
Tim Donohue
9495768ade Fix DS-3262. Check if a metadata field is in use before deleting 2016-07-12 11:37:24 -05:00
Andrea Schweer
4770070e75 Add missing licence header 2016-07-12 13:39:41 +12:00
Andrea Schweer
0ef6241f61 [DS-3264] Correctly disseminate group names 2016-07-12 13:30:20 +12:00
Andrea Schweer
9a036dcf3f Some basic tests for PackageUtils class 2016-07-12 13:28:48 +12:00
helix84
88cdf7a96e Merge pull request #1457 from cwilper/atmire-logo-update
Update logo (@mire -> Atmire)
2016-07-11 17:47:46 +01:00
Chris Wilper
b8a8104fe4 Update logo (@mire -> Atmire) 2016-07-11 12:29:28 -04:00
helix84
4386d216ca Merge pull request #1456 from cwilper/copyright-2016
Update copyright year to 2016
2016-07-08 20:29:39 +01:00
Chris Wilper
1a469f903d Update copyright year to 2016 2016-07-08 15:17:24 -04:00
philip Vissenaekens
ae1a6dd19a DS-3199 2016-07-06 17:46:44 +02:00
Marsa Haoua
1b68eb5716 prevent the generation of resource policy entry values in the database with null value for the dspace_object column 2016-07-05 14:56:39 +02:00
philip Vissenaekens
d88b37055a DS-3146 2016-07-05 12:01:50 +02:00
Pascal-Nicolas Becker
a18069f7ae DS-3256: Load webui.itemdisplay.<style> using getArrayProperty(...) 2016-07-04 13:16:58 +02:00
Tim Donohue
7806c6a688 Merge pull request #1444 from pgray64/DS-3249
DS-3249: applied alert-warning bootstrap class
2016-06-30 14:00:33 -05:00
Tim Donohue
e9f2f2de06 Merge pull request #1422 from tuub/DS-3225
Include the item's title in the request item e-mail just for xmlui
2016-06-30 12:08:37 -05:00
Hardy Pottinger
fec7d6d21d Merge pull request #1408 from terrywbrady/ds-3212
DS-3212: Consolidate logic for local schema file detection for ItemUpdate and ItemImport
2016-06-30 12:03:35 -05:00
Hardy Pottinger
fb878b1306 Merge pull request #1405 from terrywbrady/ds-3110
DS-3110 DSpace itemupdate does not read local schemas (only dublin_core.xml)
2016-06-30 11:59:24 -05:00
philip Vissenaekens
5c68166241 DS-3146 2016-06-30 17:58:51 +02:00
Marsa Haoua
d1a0b2b0c5 Include the item's title in the request item e-mail just for xmlui 2016-06-30 10:47:51 +02:00
Hardy Pottinger
2e96217e75 [DS-3217] modified DCDateTest and InstallItemTest to use Calendar instead of Date for getting a date value for testing, explicitly set the timezone of the new calendar object to UTC, thanks to LuizClaudioSantos and Helix84 for the hints 2016-06-29 23:09:04 +00:00
Tim Donohue
716fed1a1f Merge pull request #1391 from oooriii/DS-3205
DS-3205 : Mispelling in group search table name in xmlui - fixed
2016-06-29 14:48:48 -05:00
Tim Donohue
565bc05c34 Merge pull request #1437 from aschweer/DS-3246-cocoon-recycling-ds6
[DS-3246] Improve cleanup in recyclable components
2016-06-29 14:40:21 -05:00
Tim Donohue
91f5a5c557 Merge pull request #1447 from tdonohue/DS-3179-integration-tests
DS-3179 integration tests for Community/Collection Admin inherited delete permissions
2016-06-29 14:33:58 -05:00
Tim Donohue
24c40c32fd Merge pull request #1443 from atmire/DS-3179-jspui-remove-file
DS-3179 Collection admin, edit item no authorization to remove file (updated PR)
2016-06-29 14:33:13 -05:00
Hardy Pottinger
b53ac7c504 [DS-3217] trying the suggestion from LuizClaudioSantos, use Calendar and not Date 2016-06-29 15:21:49 +00:00
philip Vissenaekens
728d6c262c DS-3179 2016-06-29 10:07:50 +02:00
Tim Donohue
cd3d75ba35 Merge pull request #1426 from tmguimaraes/MatadataTypo
Fixed Typo "fullNameMatadata" to "fullNameMetadata"
2016-06-28 16:06:22 -05:00
Tim Donohue
993e4522bd DS-3179 : Add Integration Tests to validate Community / Collection Admin inherited delete permissions 2016-06-28 19:19:41 +00:00
Tim Donohue
6c22ac36b7 Fix Community hierarchy test, as it ran with Auth off. Add expunge test for Bitstream 2016-06-28 19:18:33 +00:00
Philippe Gray
81617276f6 applied alert-warning bootstrap class 2016-06-23 15:04:21 -04:00
Tim Donohue
b66c6b0bb3 Merge pull request #1432 from terrywbrady/DS-3237A
DS-3237 Eliminate Inclusion of Old Version of commons-lang3
2016-06-22 15:53:11 -04:00
Hardy Pottinger
499362f0ab Merge pull request #1442 from cti-gr/restapi-fix-expand
[DS-3248] REST api: expand parameter not working on find-by-metadata-field
2016-06-22 15:42:48 -04:00
Tim Donohue
13a8b22589 Merge pull request #1435 from DSpace/aschweer-gsa-patch
Add Google Search Appliance to list of crawlers
2016-06-22 15:40:06 -04:00
philip Vissenaekens
782e7d989b DS-3179 2016-06-20 17:47:38 +02:00
philip Vissenaekens
eeab1106db DS-3179 2016-06-20 16:49:53 +02:00
philip Vissenaekens
61664027a2 fixed merge conflict 2016-06-20 15:49:05 +02:00
philip Vissenaekens
b1e4d3980b Merge remote-tracking branch 'upstream/master' into DS-3179-jspui-remove-file
Conflicts:
	dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java
2016-06-20 15:48:12 +02:00
Pantelis Karamolegkos
acb29f7f78 expand parameter was not passed during new item creation when accessing find-by-metadata-field 2016-06-17 16:22:08 +03:00
Andrea Schweer
738f6eaca2 [DS-3246] Improve cleanup in recyclable components 2016-06-15 14:31:00 +01:00
Andrea Schweer
4df3966ef6 Add Google Search Appliance to list of crawlers
See https://groups.google.com/d/topic/dspace-tech/ox9MML6uiVE/discussion
2016-06-15 09:36:48 +01:00
Tim Donohue
764070205d [maven-release-plugin] prepare for next development iteration 2016-06-10 19:27:41 +00:00
Tim Donohue
39708d223d [maven-release-plugin] prepare release dspace-6.0-rc2 2016-06-10 19:27:36 +00:00
Tim Donohue
cf1425ace5 Add back in generic developers/contributors list, as required by release 2016-06-10 19:16:21 +00:00
Tim Donohue
8e679803a3 Revert "[maven-release-plugin] prepare release dspace-6.0-rc2"
This reverts commit a0d957e9e0.
2016-06-10 19:06:12 +00:00
Tim Donohue
76ccae0d56 Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit 43c2481d51.
2016-06-10 19:05:57 +00:00
Pascal-Nicolas Becker
43c2481d51 [maven-release-plugin] prepare for next development iteration 2016-06-10 17:35:33 +02:00
Pascal-Nicolas Becker
a0d957e9e0 [maven-release-plugin] prepare release dspace-6.0-rc2 2016-06-10 17:35:03 +02:00
Terry Brady
df08c08a77 No explicit dependency 2016-06-08 15:18:38 -07:00
Terry Brady
9b54081303 Correct group id 2016-06-08 15:17:10 -07:00
Terry Brady
52223acd46 Clean up commons-lang3 dependency 2016-06-08 15:15:48 -07:00
Hardy Pottinger
700db6b973 Merge pull request #1373 from terrywbrady/ds-3170a
[DS-3170] Allow Password Auth to be enabled for Rest Reports
2016-06-06 17:27:01 -05:00
helix84
4b4132e666 Merge pull request #1431 from tmguimaraes/DS-3231
DS-3231 fixed by using cc.license.jurisdiction
2016-06-06 16:28:28 +02:00
Tiago Guimarães
75d2b66a68 fixed DS-3231 by changing webui.submit.cc-jurisdiction to cc.license.jurisdiction 2016-06-06 14:39:19 +01:00
Pascal-Nicolas Becker
089666bf7f DS-2751: Check
DS-2751: Adds check for null to MetadataAuthorityISSNExtractor
2016-06-03 10:12:53 +02:00
mjmarttila
12649fe1fe Extend supported handles for supports() method
Updates the supports() method across the three relevant handle provider
classes to check if the identifier a) matches a valid handle starting
pattern or b) does not match a DOI starting pattern and does contain a
slash but is not an arbitrary URL.
2016-06-02 09:27:59 -04:00
Pascal-Nicolas Becker
ff8d59d022 JSP indentation problems. 2016-06-02 14:53:25 +02:00
Pascal-Nicolas Becker
8f6dfd8274 DS-3229: JSPUI submission verify step must respect type binds. 2016-06-02 14:47:58 +02:00
Pascal-Nicolas Becker
069de37cbd Merge pull request #1428 from tuub/DS-3167
DS-3167: empty list of metadataformats in JSPUI
2016-06-01 17:57:52 +02:00
Pascal-Nicolas Becker
40a4e4352d DS-3167: empty list of metadataformats in JSPUI 2016-06-01 16:17:53 +02:00
Pascal-Nicolas Becker
3106a48c89 Merge pull request #1427 from DylanMeeus/fix-npe-from-oai-pr
move initialisation to constructor
2016-06-01 16:10:52 +02:00
dylan
21b5b18031 move initialisation to constructor 2016-06-01 15:54:40 +02:00
Pascal-Nicolas Becker
306fbe708e Merge pull request #1326 from DylanMeeus/DS-3086-OAI-FIX
DS-3086 OAI Harvester is broken
2016-06-01 15:12:50 +02:00
Pascal-Nicolas Becker
ea30a3fa0f Merge pull request #1420 from jonas-atmire/DS-3152-JSPUI-item-display-files-table-fix
DS-3152 JSPUI Word breaking on long filenames/description
2016-05-31 19:19:36 +02:00
Terry Brady
dcc0122f69 Merge pull request #1421 from jonas-atmire/DS-3219-XMLUI-File-display-fix
DS-3219 -> Word breaking on long filenames/description (review/upload)
2016-05-31 09:51:29 -07:00
Tiago Guimarães
44961d6310 Fixed Typo "fullNameMatadata" to "fullNameMetadata" 2016-05-31 15:08:27 +01:00
Kevin Van de Velde
2d2943da94 Merge pull request #1425 from tuub/DS-3227
DS-3227: Use cal.add(...) instead of cal.roll(...) in CheksumHistoryDAOImplTest.
2016-05-31 15:02:01 +02:00
philip Vissenaekens
1aa496f20d DS-3146 2016-05-31 14:28:58 +02:00
Pascal-Nicolas Becker
8e5496d6af DS-3227: use cal.add instead of cal.roll() in CheksumHistoryDAOImplTest. 2016-05-31 14:19:13 +02:00
Pascal-Nicolas Becker
4fa62e12bb DS-3226: Avoid NPEs for wrong search URIs. 2016-05-31 11:42:50 +02:00
Jonas Van Goolen
0d620c3530 DS-3219 Additional word-break on edit item (bitstream) pages 2016-05-30 15:05:12 +02:00
philip Vissenaekens
dad5b325e1 DS-3146 2016-05-30 14:55:25 +02:00
Pascal-Nicolas Becker
484346632b Code Task: adds include to jsp that was hidden in another included jsp. 2016-05-27 15:44:49 +02:00
dylan
cae419ada7 fix serviceimpl 2016-05-27 13:16:24 +02:00
dylan
1771dd713a Fix method name 2016-05-27 13:16:24 +02:00
Tom Desair
cf77978603 3086: Commit after each item to increase performance 2016-05-27 13:16:24 +02:00
Tom Desair
a98fee0b5e DS-3086: Fixed bug that made the integration tests fail 2016-05-27 13:16:23 +02:00
Tom Desair
1d144f480c DS-3086: Fixed database scripts 2016-05-27 13:16:23 +02:00
Tom Desair
ec8eee1ba5 DS-3086: Fixed the unit tests 2016-05-27 13:16:23 +02:00
Tom Desair
8db0faed33 fix conflict 2016-05-27 13:16:23 +02:00
Tom Desair
b19189634d fix conflict 2016-05-27 13:15:47 +02:00
Tom Desair
c1b3c6aed7 Make sure that the metadata of an eperson is fetched from the database together with the eperson. 2016-05-27 13:15:47 +02:00
Tom Desair
0387a6f415 resolve cherry-pick issue 2016-05-27 13:15:47 +02:00
Tom Desair
bbb707358c DS-3086: Optimized query and entity caching 2016-05-27 13:15:46 +02:00
KevinVdV
b09594ed04 fix chery-pick conflict 2016-05-27 13:15:46 +02:00
dylan
0e70aec96c Harvester update 2016-05-27 13:15:46 +02:00
dylan
7a9c90e387 Harvester update 2016-05-27 13:15:46 +02:00
dylan
d916cc0cff Delete harvested collections 2016-05-27 13:15:46 +02:00
dylan
52b6b3375f Fixed typo 2016-05-27 13:15:46 +02:00
dylan
fd82899e7a Added null check before deletion 2016-05-27 13:15:46 +02:00
dylan
cd03d3a55f Delete item from harvested_item as well. 2016-05-27 13:15:46 +02:00
dylan
0f695096e0 Fixed NPE 2016-05-27 13:15:46 +02:00
dylan
931a1fda92 Removed unnecessary consumer (harvester) 2016-05-27 13:15:46 +02:00
dylan
8b0d59a66f Remove unused import 2016-05-27 13:15:45 +02:00
dylan
7d750ab280 Fixed NPE 2016-05-27 13:15:45 +02:00
dylan
bee3f00479 DS-3086-fix 2016-05-27 13:15:45 +02:00
Jonas Van Goolen
adadedb2ac DS-3219 Correct property for word-break 2016-05-27 12:16:21 +02:00
Jonas Van Goolen
f01cefa334 DS-3219 Correct property for word-break 2016-05-27 12:14:33 +02:00
Jonas Van Goolen
1a87d52358 DS-3219 Port of browser compatible CSS classes (from DS-3152) 2016-05-27 09:14:07 +02:00
Tim Donohue
ec6a4d2aaa Merge pull request #1417 from KevinVdV/DS-3165-fix-policy-adding
[DS-3165] Cannot assign a group READ policy in XMLUI
2016-05-26 17:15:08 -04:00
Pascal-Nicolas Becker
7917dc920e Merge pull request #1415 from KevinVdV/DS-3185-fix-special-group-rights
[DS-3185] Special group doesn't grant the right to submit
2016-05-26 15:21:16 +02:00
philip Vissenaekens
dac013dbff DS-3152 2016-05-26 11:11:26 +02:00
Tim Donohue
c20c368a42 Merge pull request #1410 from mwoodiupui/DS-3154-2
[DS-3154] Finish XMLUI fixup.
2016-05-25 15:56:00 -04:00
Tim Donohue
bf3d7e3b9b Merge pull request #1411 from tuub/DS-3214
Build the request response token link for in the Request item E-mail
2016-05-25 15:51:42 -04:00
Tim Donohue
e59d4dbf66 Merge pull request #1412 from atmire/DS-3151-log-dir-property-update
DS-3151 Update of non-existant log.dir retrieval property
2016-05-25 15:45:45 -04:00
Tim Donohue
93157f6468 Merge pull request #1416 from KevinVdV/DS-3178-items-in-workflow-jspui-fix
[DS-3178] Submission still in workflow not shown in submitters My DSpace
2016-05-25 15:22:45 -04:00
Tim Donohue
5ea9a91e8b Merge pull request #1418 from atmire/DS-3188
DS-3188 Switching language redirects to home page
2016-05-25 15:19:47 -04:00
Jonas Van Goolen
e03c50511f DS-3219 -> Word breaking on long filenames/description (review/upload) 2016-05-25 11:46:00 +02:00
Jonas Van Goolen
ec8dc8fb8f DS-3152 JSPUI -> Word breaking on long filenames/description 2016-05-25 11:10:21 +02:00
Hardy Pottinger
711649a3d4 Merge pull request #1419 from hardyoyo/DS-3217-add-rerun-failing-tests-count-to-travis.yml
[DS-3217] added -Dsurefire.rerunFailingTestsCount to .travis.yml
2016-05-24 14:18:16 -05:00
Hardy Pottinger
b00546b5cb [DS-3217] added -Dsurefire.rerunFailingTestsCount to .travis.yml 2016-05-24 16:45:39 +00:00
philip Vissenaekens
cbfa75648a DS-3188 2016-05-24 15:35:27 +02:00
KevinVdV
5f8cda9253 [DS-3165] Cannot assign a group READ policy in XMLUI 2016-05-24 13:09:30 +02:00
KevinVdV
f29355b5f9 [DS-3178] Submission still in workflow not shown in submitters My DSpace (JSPUI) 2016-05-24 12:19:23 +02:00
Hardy Pottinger
2ea70080de Merge pull request #1389 from atmire/DS-3175
Ds 3175 Testathon XMLUI VIEW14 RSS feeds are empty
2016-05-23 17:57:52 -05:00
mjmarttila
20a5743b07 Remove Unused NPE Try/Catch and Null Check Permissions Element
Remove legacy try/catch statement, validate that permissions element is
not null, and update log call.
2016-05-23 18:19:06 -04:00
KevinVdV
324f9a31da [DS-3185] Special group doesn't grant the right to submit 2016-05-23 12:37:23 +02:00
Jonas Van Goolen
3ce228a2fc DS-3151 Update of non-existant log.dir retrieval property 2016-05-20 16:13:53 +02:00
Pascal-Nicolas Becker
ff1905103a Merge pull request #1367 from tdonohue/DS-3095
DS-3095: Remove Sonatype's oss-parent from our parent POM
2016-05-20 16:13:47 +02:00
Marsa Haoua
de7afafc46 Build the request response token link for in the Request item E-mail 2016-05-20 11:34:42 +02:00
Tiago Guimarães
e991ee332e Fixed DS2751 by checking for null 2016-05-20 10:05:37 +01:00
Mark H. Wood
169b75a245 [DS-3154] Finish XMLUI fixup. 2016-05-19 17:25:52 -04:00
mjmarttila
05d85843e9 Comment clarity for <Permissions> element
Added comment clarifying that the code makes the assumption that a
<Context> element will only have one <Permissions> child element in a
DSpace objects METSRights file even though the specification says that
multiple permissions objects are technically possible. Thanks to
tdonohue for the recommendation.
2016-05-19 16:32:03 -04:00
Tim Donohue
6d409ee06c Merge pull request #1409 from atmire/DS-3194
DS-3144 Update port of baseURL for pagination-link creation
2016-05-19 15:08:11 -04:00
Roeland Dillen
39a1e6fa19 default value in dspace.cfg but not commented out 2016-05-19 11:41:58 +02:00
Roeland Dillen
bde4acf1e4 log message if useProxies is disabled and X-Forwarded-For is set 2016-05-19 11:37:34 +02:00
Mark H. Wood
b10fb8d255 Merge pull request #1401 from mwoodiupui/DS-3202
[DS-3202] OAI-PMH broken on demo.dspace.org
2016-05-18 14:53:12 -04:00
Mark H. Wood
dd35231a09 Merge pull request #1371 from mwoodiupui/DS-3166
[DS-3166] bin/make-handle-config script is broken
2016-05-18 14:39:26 -04:00
Tim Donohue
6348e854cf Merge pull request #1377 from tdonohue/DS-3154
DS-3154: Fix dspace-services Javadocs and some in dspace-api
2016-05-18 12:43:51 -04:00
Tim Donohue
6fd7b1b05e Merge pull request #1379 from mwoodiupui/DS-3154
[DS-3154] Maven release process fails when using Java 8 because of Javadocs errors
2016-05-18 12:40:19 -04:00
Terry Brady
e5194fb0cb Consolidate local schema filename test 2016-05-18 09:39:39 -07:00
Tim Donohue
dde5272fdc Merge pull request #1383 from ufal/DS-3201
[DS-3201] DIM crosswalk exports only dc metadata
2016-05-18 12:22:35 -04:00
Terry Brady
0e8bf5a1db Added comment per DSpace meeting review 2016-05-18 09:16:58 -07:00
Terry Brady
6dd5d45dcf Merge pull request #1387 from atmire/DS-2962
Ds 2962 Robots.txt disallows site /discovery but not /handle/*/disover
2016-05-18 09:06:57 -07:00
Tim Donohue
997e0c92e2 Merge pull request #1394 from atmire/DS-3162
DS-3162 all existing export displayed in every user home page
2016-05-18 11:56:42 -04:00
Tim Donohue
116fe784ef Merge pull request #1403 from atmire/DS-3191
DS-3191 CC license is not preserved when creating a version of an item
2016-05-18 11:26:15 -04:00
Jonas Van Goolen
1abdfd7282 DS-3144 Update port of baseURL for pagination-link creation 2016-05-18 16:52:00 +02:00
KevinVdV
5ebaf76eea [DS-3179] Collection admin, edit item no authorization to remove file in JSPUI: Additional fixes to fix the unit tests 2016-05-18 16:41:35 +02:00
Tim Donohue
95d402e1b3 Merge pull request #1393 from atmire/DS-3168
DS-3168 Embargo request Unknown Entity RequestItem
2016-05-18 09:45:21 -04:00
Pascal-Nicolas Becker
b81fa73843 Merge pull request #1407 from atmire/DS-3150
DS-3150: Form to request a copy of an embargoed item/bitstream throws error (JSPUI)
2016-05-18 12:43:59 +02:00
Terry Brady
9e25b82bc3 Read all metadata files 2016-05-17 16:53:58 -07:00
Tim Donohue
bf020b3dcc Merge pull request #1386 from atmire/DS-3189
DS-3189 XMLUI EP4 Can't find method error when unsubscribing from a collection
2016-05-17 17:26:55 -04:00
Tim Donohue
0e94eb1e03 Merge pull request #1404 from terrywbrady/ds-3192
DS-3192 Handle case of a community with no collections
2016-05-17 17:23:12 -04:00
Tim Donohue
06349e954c Merge pull request #1395 from atmire/DS-3196
DS-3196 Metadata export at community level ignores records in sub-communities
2016-05-17 17:09:19 -04:00
Tim Donohue
1ce82d677d Merge pull request #1376 from tuub/DS-3190
DS-3190: Refactor org.dspace.rdf.* to use spring.
2016-05-17 12:41:03 -04:00
Terry Brady
8f175d3aa4 Handle case of a community with no collections 2016-05-17 09:30:08 -07:00
philip Vissenaekens
1b05ec2ccf DS-3150 2016-05-17 16:55:47 +02:00
philip Vissenaekens
d253fef844 DS-3169 2016-05-17 13:22:02 +02:00
KevinVdV
e325a84b13 [DS-2996] Fix retrieval of hierarchical of communities from a collection. 2016-05-17 12:12:12 +02:00
Pascal-Nicolas Becker
f495d3d8ee Fix path in comment in dspace.cfg regarding assetstore. 2016-05-17 10:08:45 +02:00
Tim Donohue
4239abd2dd Merge pull request #1402 from tdonohue/DS-3094
Fix DS-3094 on master
2016-05-16 11:09:17 -04:00
Tim Donohue
48826b5164 Fix DS-3094 security vulnerability on master 2016-05-16 14:36:45 +00:00
Mark H. Wood
731dd48cbc [DS-3202] SolrDocument.getFieldValues() can return null, so defend! 2016-05-13 15:49:39 -04:00
mjmarttila
ab2f876155 Extend accepted handles for supports()
Add an additional supported handle format to the supports() method of
VersionedHandleIdentifierProvider to make behavior more in-line with the
DS 5.4 code.
2016-05-11 13:49:54 -04:00
Pascal-Nicolas Becker
4de01c4448 Merge pull request #1388 from KevinVdV/DS-3003-fix-private-service-constructors
[DS-3003] Make the constructors of 2 services protected instead of private
2016-05-11 19:06:54 +02:00
Pascal-Nicolas Becker
0cac0518eb Merge pull request #1397 from atmire/DS-3169
DS-3169: Move the discovery facets and sidebar text to the sidebar on the community page (JSPUI)
2016-05-11 18:56:23 +02:00
Pascal-Nicolas Becker
3f5d252b47 Merge pull request #1378 from mwoodiupui/DS-3184
[DS-3184] Adding a new bitstream format fails - JSPUI Test Plan Ref ADM18
2016-05-11 18:49:40 +02:00
Pascal-Nicolas Becker
d7f9bad5e5 Merge pull request #1374 from mwoodiupui/DS-3181
[DS-3181] Collection admin item mapping internal error - JSPUI Test Plan Ref COL11
2016-05-11 18:34:41 +02:00
Pascal-Nicolas Becker
8bf8280d38 Merge pull request #1375 from mwoodiupui/DS-3182
[DS-3182] Metadata Registry deletion of field - JSPUI Test Plan Ref MR1
2016-05-11 18:22:01 +02:00
Pascal-Nicolas Becker
012731a89b Merge pull request #1390 from mwoodiupui/DS-3171
[DS-3171] Subscription list not shown - JSPUI Test Plan Ref EP4
2016-05-11 17:58:28 +02:00
mjmarttila
b387bca5e5 Typo fix
Removed extra semicolons.
2016-05-10 16:30:13 -04:00
philip Vissenaekens
02c26c9619 DS-3169 2016-05-10 17:46:30 +02:00
philip Vissenaekens
079ec0aff0 DS-3196 2016-05-10 16:04:52 +02:00
philip Vissenaekens
6ed7a3646c DS-3162 2016-05-10 11:54:14 +02:00
philip Vissenaekens
b0fc34e053 DS-3168 2016-05-10 10:54:17 +02:00
KevinVdV
b2260c48e9 [DS-3179] Collection admin, edit item no authorization to remove file in JSPUI: Additional fixes to delete item as collection admin 2016-05-09 13:03:42 +02:00
oooriii
fc77231628 Fixed DS-3206 2016-05-09 08:44:09 +02:00
oooriii
e106f3c915 up to date 2016-05-09 08:41:03 +02:00
oooriii
5cb4b488bf DS-3205 fixed 2016-05-06 09:34:19 +02:00
Mark H. Wood
ebe5e0c791 [DS-3154] Stash more fixes. 2016-05-05 17:18:06 -04:00
Mark H. Wood
9f89b981cf [DS-3171] Request attribute's type changed, so cast it properly. 2016-05-04 15:32:52 -04:00
philip Vissenaekens
a7c917d867 DS-3175 2016-05-04 16:01:09 +02:00
KevinVdV
19ac5cf1b1 [DS-3003] Make the constructors of ChoiceAuthorityServiceImpl & LegacyPluginServiceImpl protected instead of private because else we cannot override the behavior of these services 2016-05-04 12:56:24 +02:00
philip Vissenaekens
1938c2c2a9 DS-2962 2016-05-04 12:07:39 +02:00
philip Vissenaekens
4faa5d2011 DS-3175 2016-05-04 11:53:21 +02:00
philip Vissenaekens
3a261f1ffc DS-2962 2016-05-04 11:23:02 +02:00
Mark H. Wood
5efe6b1272 [DS-3184] Never return null extensions List.
On further consideration, fix the problem at its source.  IMHO a
method returning Collection should *always* return a Collection, even
if it is empty.  Then there is no need to check for null before
iterating, etc.
2016-05-03 14:59:44 -04:00
Tim Donohue
2f01fe98bf Merge pull request #1384 from tdonohue/DS-3149
DS-3149: Fix SWORDv2 availability issues
2016-05-03 12:18:11 -05:00
Tim Donohue
ab0bb4f8b1 Merge pull request #1380 from mwoodiupui/DS-3197
[DS-3197] SWORD v1 service crashes at first request
2016-05-03 12:16:50 -05:00
philip Vissenaekens
5fc546a2b8 DS-3175 2016-05-03 17:14:02 +02:00
philip Vissenaekens
7e1acc7a67 DS-3189 2016-05-03 16:43:15 +02:00
Ondrej Kosarko
1b32001cee fix DS-3201 2016-05-03 13:57:50 +02:00
KevinVdV
20012c3081 [DS-3179] Collection admin, edit item no authorization to remove file in JSPUI: Fixing unit tests by ensuring the bundleBitstream link is cleared properly when deleting a bitstream 2016-05-03 12:23:38 +02:00
KevinVdV
1940e4e6a2 [DS-3179] Collection admin, edit item no authorization to remove file in JSPUI 2016-05-03 12:01:38 +02:00
Tim Donohue
f78e3e5c70 Fix NullPointerException in SwordDisseminatorFactory 2016-05-02 15:07:00 -05:00
Tim Donohue
75c95f8e36 DS-3149: Downgrade version of Axiom to be compatible with SWORDv2 2016-05-02 15:06:30 -05:00
Mark H. Wood
d0cb45d0b5 [DS-3197] Turn constructor back into init() code. 2016-05-02 14:22:44 -04:00
Mark H. Wood
8dec6d10ba [DS-3154] Stash more fixes. 2016-05-02 12:48:53 -04:00
Mark H. Wood
6a69bf7abf [DS-3154] First 100 errors, 100 warnings 2016-04-29 16:29:50 -04:00
Tim Donohue
f92fa6605d DS-3154: more dspace-api fixes, alphabetically through org.dspace.core 2016-04-29 13:00:13 -05:00
Tim Donohue
a87cf18b11 Fix minor spacing issue 2016-04-29 09:26:08 -05:00
Tim Donohue
ca78a45532 DS-3154: Fix some of the Javadocs errors in dspace-api 2016-04-29 09:06:54 -05:00
Tim Donohue
842f61999f DS-3154: Fix javadocs errors in dspace-services 2016-04-29 09:05:52 -05:00
Pascal-Nicolas Becker
90447ed0b1 DS-3190: Refactor org.dspace.rdf.* to use spring.
dspace-rdf was developed as standalone module. At the end of the
development most of it was moved to be included into dspace-api. Instead
of using Spring it used its own class that instantiated all necessary
classes. This PR solves the problem described in DS-3190 by refactoring
org.dspace.rdf to adapt patterns used in DSpace 6. It introduces
[dspace]/config/spring/api/rdf.xml to configure spring to instantiate
all necessary classes. org.dspace.rdf.RDFConfiguration was removed
completely, the configuration keys are centralised in
org.dspace.rdf.RDFUtil. Instead of org.dspace.rdf.RDFConfiguration and
DSpace's old ConfigurationManager the new ConfigurationService is now
used everywhere. Configuration properties shouldn't be hold in variables
anymore so that RDF profits from the new autoreload function from
DS-2654.
2016-04-29 14:49:55 +02:00
Mark H. Wood
12b4f702e2 [DS-3184] Skip building String list of extensions from null List 2016-04-28 20:43:49 -04:00
Mark H. Wood
57b0c2855b [DS-3184] Treat Lists as Lists and get rid of repetitive indexing 2016-04-28 20:13:15 -04:00
Mark H. Wood
423e6defab [DS-3184] Indent/format/wrap so I can read it. 2016-04-28 19:49:14 -04:00
Mark H. Wood
2841795052 [DS-3182] Field with no qualifier causes dereference of null on move or delete. 2016-04-28 16:20:31 -04:00
Mark H. Wood
44d224b2d8 [DS-3181] Page now receives UUIDs, needs to stringify them. 2016-04-28 12:29:09 -04:00
Terry Brady
f9fc64aaeb Reapply merged changes 2016-04-27 14:18:01 -07:00
Terry Brady
2e309a116f Merge pull request #1366 from terrywbrady/ds-3145
[DS-3145] Configure rootpath in REST Reports (/handle, /xmlui/handle, /jspui/handle)
2016-04-27 13:12:42 -07:00
Tim Donohue
54a169d249 Merge pull request #1372 from tdonohue/DS-2654-fix-solrauthority
DS-2654: Add necessary prefix to commented out config
2016-04-27 13:07:26 -05:00
Tim Donohue
1e37e50885 DS-2654: Add necessary prefix to commented out config 2016-04-27 17:35:46 +00:00
Mark H. Wood
cd75d02f2f [DS-3166] Resolve DSpace hostname to address. 2016-04-27 13:26:45 -04:00
Pascal-Nicolas Becker
7fa8e482d1 Merge pull request #1368 from mwoodiupui/DS-3158
[DS-3158] 'dspace dsprop' does not do property substitution
2016-04-27 19:22:40 +02:00
Mark H. Wood
b4f7a6465e [DS-3158] Fix reverse composition when -m is given 2016-04-27 13:09:52 -04:00
Terry Brady
95e381ec11 Set default to work on demo.dspace.org
Since any one of the 3 paths could be chosen, the default will be set to work in demo.dspace.org.
2016-04-27 08:54:24 -07:00
Mark H. Wood
e981ad0746 [DS-3158] Scripts need double-dash with long options now. 2016-04-27 11:52:48 -04:00
Mark H. Wood
d475b44b36 Merge pull request #1364 from mwoodiupui/DS-3104
[DS-3104] Filter log4j configs on fresh_install too
2016-04-27 11:07:50 -04:00
Mark H. Wood
be0d578ee7 [DS-3158] Move the command method somewhere less deprecated.
This code no longer has any connection with the deprecated class
Configurationmanager, so move it now before we lose it by accident.
2016-04-26 14:39:38 -04:00
Mark H. Wood
b644471da0 [DS-3158] Give user the option not to substitute properties in the output 2016-04-26 14:07:12 -04:00
Mark H. Wood
9187f769eb [DS-3158] Less fragile option parsing, with help 2016-04-26 13:56:32 -04:00
Mark H. Wood
3eb9efc14a [DS-3158] Switch to interpolating ConfigurationService method, and DRY up the code a bit. 2016-04-26 12:28:17 -04:00
Pascal-Nicolas Becker
96af7b0e6b DS-3122: Make DataCite XML namespace configurable. 2016-04-26 13:34:29 +02:00
Terry Brady
0fe9fa8431 Control rootpath 2016-04-25 15:14:20 -07:00
Tim Donohue
d289baf6aa Move plugin versions and default config to <pluginManagement>. Minor comment addition 2016-04-25 15:18:26 -05:00
Mark H. Wood
4db4e34439 [DS-3104] Clean up work directory. 2016-04-25 16:16:10 -04:00
Tim Donohue
568437939e Ensure latest version of maven-release-plugin 2016-04-25 14:50:41 -05:00
Tim Donohue
7ba4bcbc43 DS-3095: Update Parent POM to remove Sonatype 'oss-parent'. Fix alignment of tags. 2016-04-25 14:35:23 -05:00
Kevin Van de Velde
ddab04ee3e Merge pull request #1330 from leocsilva/patch-1
[DS-850] Fields with closed vocabulary are not saved
2016-04-25 12:11:25 +02:00
leocsilva
da2191a108 Fixing string closure 2016-04-23 17:03:31 -03:00
Mark H. Wood
211b241aa1 [DS-3104] Filter log4j configs on fresh_install too 2016-04-22 23:15:13 -04:00
Pascal-Nicolas Becker
a2724615b7 [maven-release-plugin] prepare for next development iteration 2016-04-22 21:01:18 +02:00
Pascal-Nicolas Becker
58389fa23f [maven-release-plugin] prepare release dspace-6.0-rc1 2016-04-22 21:01:00 +02:00
Pascal-Nicolas Becker
e285f6a3c4 Increment the language pack dependencies to require at least 6.0.0 2016-04-22 19:59:58 +02:00
Pascal-Nicolas Becker
1d278faa20 Merge pull request #1363 from tuub/DS-3107
DS-3107: NewsService should allow localized news files
2016-04-22 19:59:35 +02:00
LuizClaudioSantos
dc45980a5b Using dependency injection to get a instance of ConfigurationService 2016-04-22 18:29:32 +02:00
LuizClaudioSantos
60f245854d Adding the changes suggested by Pascal-Nicolas Becker and Claudia Jurgen. 2016-04-22 18:29:32 +02:00
LuizClaudioSantos
a82d0e5a1a Fix [DS-3107] - add all news locales files added in the local.cfg(webui.supported.locales) 2016-04-22 18:29:32 +02:00
Pascal-Nicolas Becker
aeb22c3534 Merge pull request #1197 from tuub/DS-2924
DS-2924: Fix DIM2DataCite crosswalk and update to DataCite Schema 3.1
2016-04-22 18:27:19 +02:00
Hardy Pottinger
d568b5da96 Merge pull request #932 from CICBA/DS-2553
Fixed problem in DS-2553 -'DCInputAuthority cannot return the label of a...
2016-04-22 11:15:06 -05:00
Hardy Pottinger
9a6e247cf5 Merge pull request #1174 from KevinVdV/DS-2900-thread-save-date-format-fix
[DS-2900] Java date format usage as static variable is not thread safe
2016-04-22 11:13:31 -05:00
Hardy Pottinger
81200bfafe Merge pull request #1200 from aschweer/DS-2925-sherpaservice-timeout
Ds 2925 sherpaservice timeout
2016-04-22 11:11:48 -05:00
Hardy Pottinger
5bc017c006 Merge pull request #1361 from KevinVdV/DS-3138-jspui-remove-member-from-group
[DS-3138] JSPUI Exception when a EPerson is removed from a Group
2016-04-22 11:02:59 -05:00
Hardy Pottinger
8504cfa64c Merge pull request #1360 from tdonohue/DS-3104
DS-3104: Fix log4j's issues with finding log directory via commandline
2016-04-22 10:56:55 -05:00
Tim Donohue
82263fbb75 Merge pull request #1362 from tdonohue/update-readme-licenses
Update README and LICENSES_THIRD_PARTY
2016-04-22 10:18:11 -05:00
Tim Donohue
7abd3fa5fd Merge pull request #1359 from mwoodiupui/DS-3139
[DS-3139] dspace-oai has conflicting, missing, unused dependencies
2016-04-22 10:14:23 -05:00
Tim Donohue
69780483dc Update LICENSES_THIRD_PARTY for DSpace 6 dependencies. Change year in LICENSE 2016-04-22 10:03:56 -05:00
Tim Donohue
c7387acf52 Update README and change to markdown format for GitHub 2016-04-22 10:03:37 -05:00
mjmarttila
c1b2772b31 METSRightsCrosswalk ingest(...) Policy Logic Refactoring
Consolidation/refactoring of the ingest() method logic to address NPEs
and incorrect behavior when importing certain objects (e.g. a collection
with an rpName and association to a non-Admin/non-Anonymous group).
2016-04-22 10:53:02 -04:00
KevinVdV
bb6d19f410 [DS-3138] JSPUI throws ConcurrentModificationException when a EPerson is removed from a Group 2016-04-22 10:50:37 +02:00
Tim Donohue
efa96af2fc Merge pull request #1192 from KevinVdV/DS-2918-fix-self-assigned-variable
[DS-2918] Fix self assigned variable in MetadataWebService
2016-04-21 15:42:45 -05:00
Tim Donohue
d756be2263 Stop loading all configurations for log4j initialization 2016-04-21 15:02:32 -05:00
Tim Donohue
eae20d38d1 Filter all log4j files via Ant. Move log.dir and other logging settings to log4j.properties, and similar. 2016-04-21 15:02:13 -05:00
Tim Donohue
1a46165c75 Merge pull request #1287 from helix84/DS-3052-pdfbox-improvements
DS-3052 improvements to PDFBox-based code
2016-04-21 12:23:53 -05:00
Pascal-Nicolas Becker
1bc28df1fb Merge pull request #1358 from tuub/DS-3136
DS-3136: Prevent the occurrence of internal server error while adding a bitstream to an item if the upload button is pressed without selecting a file
2016-04-21 18:06:10 +02:00
Pascal-Nicolas Becker
ccab58e0aa Merge pull request #1354 from DylanMeeus/DS-3123-privacy-settings-xmlui
DS-3123: Respect privacy settings in XMLUI
2016-04-21 17:58:47 +02:00
Mark H. Wood
cbc53cac75 [DS-3139] Fix double SLF4J backend, align other dependencies more closely with reality. 2016-04-21 11:56:21 -04:00
Mark H. Wood
5ab9a2e778 [DS-3139] Exclude dependency of dependency, that should have been declared test-scoped. 2016-04-21 11:54:11 -04:00
Hardy Pottinger
ab6fc2fc5c Merge pull request #1352 from KevinVdV/DS-3125-submitter-cannot-bitstreams
[DS-3125] Submitters cannot delete bistreams of workspaceitems
2016-04-21 10:49:25 -05:00
dylan
29935532b3 place removed comment back 2016-04-21 17:41:19 +02:00
Marsa Haoua
6d0251487d Solve the internal server error at a deeper level 2016-04-21 17:39:30 +02:00
dylan
5557bf2a49 Using DSpaceServicesFactory 2016-04-21 17:37:32 +02:00
dylan
d3a9236648 Update comments 2016-04-21 17:27:08 +02:00
Marsa Haoua
2436c6bd65 prevent the occurrence of internal server error while adding a bitstream to an item if the upload button is pressed without selecting a file 2016-04-21 15:36:51 +02:00
Pascal-Nicolas Becker
38791e705f Merge pull request #931 from tuub/DS-2552
DS-2552: Makes configurable whether handles or DOIs should be displayed in JSPUI
2016-04-21 14:14:54 +02:00
Pascal-Nicolas Becker
572c77879a Changing comment in dspace.cfg about webui.identifier.strip-prefixes 2016-04-21 13:45:41 +02:00
Pascal-Nicolas Becker
c4d63e74e5 Changing comment in dspace.cfg about webui.preferred.identifier 2016-04-21 13:28:29 +02:00
Tim Donohue
3d6c4b92e4 Merge pull request #1154 from helix84/DS-2871-mirage-chrome-warnings-2
DS-2871 remove Modernizer from Mirage; it's unused
2016-04-20 11:52:18 -05:00
Tim Donohue
d32056afd3 Merge pull request #1224 from KevinVdV/DS-1955-embargo-reason-length
DS-1955 embargo reason length
2016-04-20 11:39:13 -05:00
Tim Donohue
b1526930b1 Merge pull request #1328 from lap82/DS-2621-M
[DS-2621] adjust check to enable not mandatory collection via jsp
2016-04-20 11:30:29 -05:00
Tim Donohue
5623cfa6bd Merge pull request #1357 from jonas-atmire/DS-3133-Spider-matching-case-insensitive
DS-3133 Add case-insensitive flag in SpiderDetector
2016-04-20 11:11:01 -05:00
Jonas Van Goolen
f3843bba4b DS-3133 When matching for spiders, add a case insensitive flag
(so for example, spider, would match "Spider", "SPIDER", "spideR", etc)
2016-04-20 16:09:54 +02:00
Tim Donohue
51d0064d81 Merge pull request #1356 from atmire/DS-3131
DS-3131
2016-04-20 08:52:53 -05:00
philip Vissenaekens
3c94b1dc2c DS-3131 2016-04-19 17:11:35 +02:00
philip Vissenaekens
3405d806bc DS-3131 2016-04-19 16:43:22 +02:00
Tim Donohue
07244a55ff Merge pull request #1355 from tdonohue/DS-3130
DS-3130: Fix inconsistent logging of EventServiceImpl
2016-04-19 09:33:57 -05:00
Tim Donohue
0fa4a2011e DS-3130: Fix inconsistent logging. Remove incorrect comments. Change constructor method to private. 2016-04-18 15:05:14 -05:00
KevinVdV
f40422f0a8 [DS-3125] Submitters cannot delete bistreams of workspaceitems: Oracle sql migration script 2016-04-18 12:34:11 +02:00
KevinVdV
4af7466b8e [DS-3125] Submitters cannot delete bistreams of workspaceitems: Include delete rights for workflow members in the basic workflow 2016-04-15 13:09:47 +02:00
KevinVdV
bc9798c753 [DS-3125] Submitters cannot delete bistreams of workspaceitems 2016-04-15 13:00:37 +02:00
Mark H. Wood
7305af96f1 Merge pull request #1342 from mwoodiupui/DS-2805
[DS-2805] Improper Hibernate Date comparisons
2016-04-14 17:12:45 -04:00
Mark H. Wood
0018496c23 [DS-2805] Testing revealed an unrelated error: mismatch between query and setParameter. 2016-04-14 16:59:25 -04:00
Mark H. Wood
553439853c [DS-2805] Add a unit test to try this out. 2016-04-14 16:54:49 -04:00
dylan
b93991552a Respect privacy settings in xmlui 2016-04-14 16:36:36 +02:00
Tim Donohue
37f55fa8b1 Merge pull request #1346 from tdonohue/DS-3116
DS-3116 : Only log errors if service bean cannot be located.
2016-04-13 16:09:31 -05:00
Kevin Van de Velde
efbaa56154 Merge pull request #881 from tuub/DS-1348
DS-3109: Introduce a VersionedHandleIdentifierProvider that creates new handles for each version
2016-04-13 12:25:21 +02:00
Pascal-Nicolas Becker
fba613f2ae Update DIM2EZID.xsl as well. 2016-04-11 16:09:17 +02:00
Pascal-Nicolas Becker
24e18f082a Change datacite schema namespace in dspace.cfg. 2016-04-09 17:29:21 +02:00
Pascal-Nicolas Becker
025a1ea8f5 DS-2924: Fix DIM2DataCite crosswalk and update to DataCite Schema 3.1 2016-04-09 11:15:29 +02:00
Pascal-Nicolas Becker
a9bf72575b Merge pull request #1218 from mwoodiupui/DS-2949
[DS-2949] XSLT crosswalks should be parameterizable
2016-04-08 18:19:14 +02:00
Pascal-Nicolas Becker
54de1ac71d Add handles in canonical form to the metadata. 2016-04-07 15:39:13 +02:00
Pascal-Nicolas Becker
74664af84d Mention both VersionedHandleIdentifier in DSpace's spring config 2016-04-07 15:29:49 +02:00
Pascal-Nicolas Becker
f84f1dc283 Versioned Items should have one handle only, remove old ones before. 2016-04-07 15:29:49 +02:00
Pascal-Nicolas Becker
46c223d172 DS-2940: fixing metadata problems with canonical versioned handles. 2016-04-07 15:29:49 +02:00
Pascal-Nicolas Becker
bff93d6686 DS-1348: Removing the use of "canonical handles"
The previous VersionedHandleIdentifierProvider introduced "canonical
handles". The idea was to keep the current handle always linked to the
newest version of an item. The downside is that this limits the
versioning to version changes that do not derogate the citation of the
items (e.g. no changes in pagination of any bitstreams). This can be
used as a special feature to manually track metadata changes. In this
case administrators might want to show only the newest version publicly
and hide older versions.

Another way to use a versioning feature is to create new versions of an
item which may even change existing citations. The old versions should
be kept with there former handles so that citing a handle with a page
number still results in the same citation. A newer version should get a
new handle.

This commit introduces a VersionedHandleIdentifierProvider that does not
change the link between a handle and an item. A new version of an item
gets a new handle. This behaviour ensures that every version is always
citable even if a newer version will be release at any time.
2016-04-07 15:29:49 +02:00
Pascal-Nicolas Becker
0e34ed8d9d DS-1348: Rename the current VersionedHandleIdentifierProvider.
The current VersionedHandleIdentifierProvider introduced "canonical
handles". The idea is to keep the current handle always linked to the
newest version of an item. The downside is that this limits the
versioning to version changes that do not derogate the citation of an
item (e.g. no changes in pagination of any bitstreams). This can be
used as a special feature to manually track metadata changes. In this
case administrators might want to show only the newest version publicly
and hide older versions.

Another way to use a versioning feature is to create new versions of an
item which may even change existing citations. The older versions should
be kept with there former handles so that citing a handle with a page
number still results in the same citation. A newer version should get a
new handle.

This commit just moves the old VersionedHandleIdentifierProvider to a
new class so it still can be used if necessary. A new
VersionedHandleIdentifierProvider will be provided within the next
commit.
2016-04-07 15:29:49 +02:00
Kevin Van de Velde
85e096c4a9 Merge pull request #1268 from sedici/DS-2987
DS-2987 Solved metadata loss by qualdrop fields in DescribeStep
2016-04-07 12:34:22 +02:00
Mark H. Wood
4545c76859 Merge pull request #1015 from rradillen/DS-2702
DS-2702 set mail.extraproperties before obtaining session

Considering the +1 in the Jira ticket, this is at +2.
2016-04-06 12:34:00 -04:00
Tim Donohue
a6baf000f2 Merge pull request #1241 from jmarton/DS-2633
[DS-2633] Fix NPE during SAF format import with collection files
2016-04-06 10:54:26 -05:00
Tim Donohue
091c5a7398 Merge pull request #1252 from KevinVdV/DS-2995-jspui-community-breadcrumb-trail
[DS-2995] Wrong order in breadcrumb trail in collection display and item display
2016-04-06 10:50:41 -05:00
Tim Donohue
014163c5fc Merge pull request #1306 from helix84/DS-3021-upgrade-xerces
DS-3021 upgrade xerces
2016-04-06 10:40:23 -05:00
Tim Donohue
b9d375ee27 Merge pull request #1327 from DylanMeeus/DS-2941-fix
DS-2941 PasswordAuthentication getSpecialGroups empty exception catchblock
2016-04-06 10:34:18 -05:00
Kevin Van de Velde
3bf65edc10 Merge pull request #987 from akinom/DS-2650-JSPUI-Recent-Submission-header-only-when-needed
DS-2650: JSPUI Recent Submission header only when needed
2016-04-06 12:40:53 +02:00
kshepherd
bf66fb03b9 Merge pull request #1307 from helix84/DS-3020-upgrade-httpclient
DS-3020 upgrade httpclient
2016-04-06 08:47:45 +12:00
kshepherd
c79fe767a5 Merge pull request #1308 from helix84/DS-3067-upgrade-maven-plugins
DS-3067 upgrade Maven plugins
2016-04-06 08:25:23 +12:00
kshepherd
e6442fe788 Merge pull request #1309 from helix84/update-gson
DS-3071 update gson
2016-04-06 07:37:07 +12:00
kshepherd
28a46f4805 Merge pull request #1335 from isido/bump-jQuery-version
Bump jQuery version from 1.6.2 to 1.6.4 in XMLUI themes, excluding Mirage 2
2016-04-06 07:06:16 +12:00
Kevin Van de Velde
fd6b280b9e Merge pull request #1336 from KingKrimmson/DS-3102-fix-dspace-choice-lookup
DS-3102 Fix collection UUID in DSpaceChoiceLookup
2016-04-05 12:39:21 +02:00
Tim Donohue
5f094ebb5f Update comments to note Hibernate dependency 2016-04-04 16:38:18 -05:00
Tim Donohue
8d73880241 DS-3116 : Only log errors if service bean cannot be located. Provide INFO messages on status of finding bean by name. 2016-04-04 20:33:49 +00:00
Hardy Pottinger
63c28a0b0e Merge pull request #1345 from hardyoyo/DS-3114-add-tags-file-to-gitignore
[DS-3114] added tags to .gitignore
2016-04-04 10:03:44 -05:00
Hardy Pottinger
076a1c9ab7 [DS-3114] added tags to .gitignore 2016-04-04 14:39:53 +00:00
Kevin Van de Velde
4c8373d9bb Merge pull request #1232 from akotynski/bug/DS-2975
DS-2975 - remove item from dspace
2016-04-04 13:09:01 +02:00
Tim Donohue
884da21680 Merge pull request #1157 from helix84/DS-2874-xoai-missing-description-element
DS-2874 make XSD enforce missing Description element
2016-04-01 09:54:25 -05:00
KevinVdV
701cdd935c [DS-1955] Embargo reason field max input length: Fixing unit tests + renaming sql files 2016-04-01 12:47:54 +02:00
KevinVdV
08331c2916 [DS-1955] Embargo reason field max input length: Unit test migration 2016-04-01 12:20:17 +02:00
KevinVdV
2efe56d3bf [DS-1955] Embargo reason field max input length 2016-04-01 12:20:17 +02:00
Ivan Masár
f9fb20f796 DS-3071 update gson also in XMLUI POM 2016-04-01 09:14:02 +02:00
Hardy Pottinger
009392e367 Merge pull request #1118 from atmire/DS-2635-discovery-facets-configurable-ordering
DS-2635 discovery facets with configurable ordering
2016-03-31 13:31:45 -05:00
Kevin Van de Velde
f970c04f87 Merge pull request #976 from sedici/DS-2520
DS-2520: Modify XPath expression when retrieving a workflow step
2016-03-31 12:31:40 +02:00
Terry Brady
58e1bc7068 Merge pull request #949 from helix84/DS-2584-usage-events-loglevel
DS-2584 loglevel error -> info for usage events beyond admin's control
2016-03-30 14:15:13 -07:00
Mark H. Wood
8840b0d559 Merge pull request #1343 from ufal/DS-2616
[DS-2616] oai_dc crosswalk does not export format of bitstreams
2016-03-30 17:00:48 -04:00
Mark H. Wood
2ca3b62957 Merge pull request #1246 from terrywbrady/ds-2999
[DS-2999] Enhance REST reports to support collections with many items
2016-03-30 16:58:31 -04:00
Ivan Masár
dc7ab71dac DS-2584 loglevel error -> info for usage events beyond admin's control
* DNS reverse lookup
* Country, Continent lookup
2016-03-30 21:22:08 +02:00
Ondřej Košarko
94847cb571 format only for ORIGINAL bundle bitstreams 2016-03-30 18:16:41 +02:00
Ondřej Košarko
2b563a7145 correcting xpath for dc:format in oai_dc.xsl 2016-03-30 18:16:41 +02:00
Tim Donohue
c778a94b48 Merge pull request #1340 from tdonohue/DS-79-Fix-Ant-init_installation
DS-79: Remove creation of assetstore.dir from Ant.
2016-03-30 09:44:51 -05:00
Mark H. Wood
705ebe864a Merge pull request #1341 from mwoodiupui/DS-2981
[DS-2981] New migration for Oracle to create indexes on UUID columns
2016-03-29 17:09:19 -04:00
Mark H. Wood
dc42ead7c6 [DS-2805] Use setTimestamp for Date parameter. 2016-03-29 13:55:35 -04:00
Mark H. Wood
e8b6634472 [DS-2949] DataCiteConnector needs this too 2016-03-28 15:20:39 -04:00
Mark H. Wood
c723146392 [DS-2981] Fold index creation into original Hibernate migration.
We need the performance boost as quickly as possible during installation.
2016-03-24 13:06:27 -04:00
Mark H. Wood
ec49b8da3d [DS-2981] New migration to create indexes on UUID columns 2016-03-24 12:01:19 -04:00
Tim Donohue
b1e32fc1a7 Merge pull request #1283 from helix84/DS-3045-jdom
DS-3044 upgrade jdom to org.jdom 1.1.3
2016-03-23 16:09:45 -05:00
Ivan Masár
904e45dbd2 minor changes to address comments 2016-03-23 21:50:05 +01:00
Ivan Masár
09b3890bb9 convert mediafilter to conf. service; fix multiple filters per format 2016-03-23 21:49:57 +01:00
Tim Donohue
0d23502f45 DS-79: Remove creation of assetstore.dir from Ant. It's created by DSBitStoreService 2016-03-23 20:47:48 +00:00
Ivan Masár
2f8fc1087b refactor to reuse resizing 2016-03-23 21:42:40 +01:00
Ivan Masár
0d9493d2b4 PDF thumbnails (JPEG) 2016-03-23 21:42:40 +01:00
Ivan Masár
911dfae7fb DS-3035 PDFBox 2.0.0-RC3 -> 2.0.0 2016-03-23 21:05:17 +01:00
Ivan Masár
9d43d74d84 mem limit: hardcoded -> automatically adjusting 2016-03-23 21:05:17 +01:00
Ivan Masár
0776a2622f DS-3035 upgrade to PDFBox 2 (code builds, not tested) 2016-03-23 21:05:16 +01:00
Tim Donohue
e066cd53d8 Merge pull request #1331 from tdonohue/DS-2437
DS-2437:  Ensure all webapps unpack "additions" into their WEB-INF/classes
2016-03-23 14:57:30 -05:00
Tim Donohue
84105d5dd5 DS-2437: Use unpack-dependencies on org.dspace.modules.additions to unpack into WEB-INF/classes/ 2016-03-23 19:20:07 +00:00
Tim Donohue
7dbec94a75 Merge pull request #1339 from tdonohue/DS-2898-dependency-issues
Resolve dependency conflict complaints from maven-enforcer-plugin
2016-03-23 13:38:08 -05:00
Tim Donohue
00e6cbc57b Resolve dependency conflict complaints from maven-enforcer-plugin 2016-03-23 18:23:37 +00:00
Tim Donohue
b0eb3eb145 Merge pull request #1226 from KevinVdV/DS-2898-rest-all-authentication-methods
[DS-2898] Add support for all authentication methods in the rest api
2016-03-23 10:55:38 -05:00
Hardy Pottinger
d5232c96f0 Merge pull request #1322 from tomdesair/feature/DS-3004-isAdmin-performance-problems
Feature/DS-3004 isAdmin performance problems
2016-03-23 10:53:00 -05:00
Hardy Pottinger
ff1d48bbb1 Merge pull request #1225 from rradillen/DS-2962
DS-2962: Robots.txt disallows site /discovery but not /handle/*/discover
2016-03-21 15:42:00 -05:00
Pascal-Nicolas Becker
4d2afeff6b DS-2552: Makes configurable whether handles or DOIs should be displayed
Adds the configuration properties webui.preferred.identifier and
webui.identifier.strip-prefixes uses both in JSPUI item view.
2016-03-18 13:12:35 +01:00
Mark H. Wood
a589b015df [DS-2949] Set up JAXP components that can work properly together. 2016-03-17 10:09:57 -04:00
Mark H. Wood
b3438b5bb3 [DS-2949] Add main() for testing 2016-03-17 10:09:57 -04:00
Mark H. Wood
347d0e9c13 [DS-2949] Fix stack trace printing 2016-03-17 10:09:57 -04:00
Mark H. Wood
a4caeef8ff [DS-2949] Use a more flexible transformer and pass parameters to the transform. 2016-03-17 10:09:57 -04:00
Mark H. Wood
b6875cddaa Merge pull request #1010 from akinom/DS-2696-showJSP-catch-all-exceptions
DS-2696: JSPUI catch-all-exceptions
2016-03-16 15:56:40 -04:00
Peter Dietz
c0cbe7d8c7 Merge pull request #879 from tuub/DS-2490
DS-2490: adds org.dspace.identifier.VersionedDOIIdentifierProvider
2016-03-16 15:25:57 -04:00
Peter Dietz
7e9d5ab512 Merge pull request #1292 from KevinVdV/DS-3057-enforce-depenceny-versions
[DS-3057] Enable enforce versions to prevent dependency issues
2016-03-16 15:18:31 -04:00
Chris Herron
7f5849570f DS-3102 Fix collection UUID in DSpaceChoiceLookup 2016-03-16 08:28:03 -04:00
Ilja Sidoroff
05171ea2d9 Bump jQuery version from 1.6.2 to 1.6.4 in XMLUI themes excluding Mirage 2 2016-03-15 08:04:23 +00:00
Dylan Meeus
ec58a9b42b Merge branch 'master' into DS-2941-fix 2016-03-14 13:15:27 +01:00
dylan
b65da41c3f Removed unnecessary check 2016-03-14 13:11:30 +01:00
KevinVdV
49168d8461 [DS-2898] Add support for all authentication methods in the rest api: Fixing unit tests by removing obsolete User object 2016-03-11 09:04:37 +01:00
Tim Donohue
47075e535e Merge pull request #1313 from KevinVdV/DS-3062-fix-xml-workflow
[DS-3062] Fixing issues that prevented the xmlworkflow from being enabled
2016-03-09 09:17:59 -06:00
KevinVdV
89c74cd555 [DS-3057] Enable enforce versions to prevent dependency issues (Fixing jboss logging dependency) 2016-03-09 13:17:38 +01:00
KevinVdV
4a5f4f215b [DS-3057] Enable enforce versions to prevent dependency issues (Fixing dspace-parent & dspace pom.xml) 2016-03-08 15:04:16 +01:00
KevinVdV
346bd5bcd5 [DS-3057] Enable enforce versions to prevent dependency issues (Fixing oai) 2016-03-08 15:04:16 +01:00
KevinVdV
13f77a261e [DS-3057] Enable enforce versions to prevent dependency issues (Additional fixing for dspace-api, dspace-xmlui & fixing dspace-rdf, dspace-solr & dspace-sword(v2)) 2016-03-08 15:04:16 +01:00
KevinVdV
a2968c60a3 [DS-3057] Enable enforce versions to prevent dependency issues (Fixing dspace-api & dspace-xmlui) 2016-03-08 15:04:15 +01:00
KevinVdV
7e2b9304b5 [DS-3057] Enable enforce versions to prevent dependency issues 2016-03-08 15:04:15 +01:00
leocsilva
bf57a5244a Fixing string closure 2016-03-08 10:10:18 -03:00
KevinVdV
d93c069082 [DS-2918] Fix self assigned variable in MetadataWebService 2016-03-08 09:55:21 +01:00
KevinVdV
2ddb2abcb1 [DS-2918] Fix self assigned variable in MetadataWebService 2016-03-08 09:53:19 +01:00
KevinVdV
92f5e9e62e [DS-2918] Fix self assigned variable in MetadataWebService 2016-03-08 09:53:19 +01:00
Tim Donohue
fa68110524 Merge pull request #1317 from tdonohue/DS-3075
DS-3075: Comma-separated configurations now need to be loaded via getArrayProperty()
2016-03-04 11:38:48 -06:00
Tim Donohue
aff43e6193 Very minor code cleanup (after final review) 2016-03-04 11:22:49 -06:00
leocsilva
ef33e3f050 Fields with closed vocabulary are not saved
I have the same problem described in DS-850 bug (https://jira.duraspace.org/browse/DS-850). Investigating the problem noticed that the field has the property disabled = "disabled" which means that the data are not submitted. I propose to change readonly = "readonly".
2016-03-03 15:32:09 -03:00
Pascal-Nicolas Becker
225b1b4d9c Improves inheritability and logging, removes DOI.setResourceType() 2016-03-03 16:09:39 +01:00
Pascal-Nicolas Becker
3e2b97f93b IdentifierServiceImpl.reserve(ctx, dso) should mint and reserve 2016-03-03 16:09:39 +01:00
Pascal-Nicolas Becker
d665ac2d05 DOIConumser: Ignore Workspace and Workflow items, reduce logging 2016-03-03 16:09:39 +01:00
Pascal-Nicolas Becker
019e57832a DataCiteConnector: don't rely on handles.
While the DOIIdentifierProvider checks our database to ensure that a DOI
is not reserverd/registered for another DSpaceObject.
The DataCiteConnector was checking this again agains  the meta data we
send to DataCite. Within these meta data we are submitting the handle as
alternative identifier and used it to check whether a DOI is
reserved/registered for a specific DSpaceObject. This commit removes
the checks from the DataCiteConnector for the following reasons:
 * In case we want to completly replace handles by DOIs one day, we
   shouldn't rely on handles. Further ongoing: an IdentifierProvider
   shouldn't rely on other identifiers than the one he provides.
 * If Item Level Versioning is enabled the handles may change depending
   on the VersionedHandleIdentifier that is used. This makes handles
   unreliable for the checks we were using them before.
   handles.
2016-03-03 16:09:39 +01:00
Pascal-Nicolas Becker
3ae8dfcc4f DS-2490: Add versioned DOIs and adapt DOI support to service API 2016-03-03 16:09:39 +01:00
Tim Donohue
3fdd45b71b Merge pull request #1188 from KevinVdV/DS-2914-community-filiator-fix
[DS-2914] Community filiator script fix
2016-03-02 14:35:09 -06:00
Luigi Andrea Pascarelli
11aae8b2d8 fix typo 2016-03-02 12:16:21 +01:00
Luigi Andrea Pascarelli
a9811eefeb improve check for re-select the "upload zip file" (show optional collection message and file upload button) 2016-03-02 10:59:38 +01:00
Luigi Andrea Pascarelli
529f9044a8 adjust check and logic to enable collection not mandatory via jsp 2016-03-02 10:59:17 +01:00
Tim Donohue
61ac9371b2 Merge pull request #1202 from KevinVdV/DS-2933-fix-swordclient-xmlui
[DS-2933] Fix SwordClient in xmlui
2016-03-01 16:49:07 -06:00
Tim Donohue
35d8cfaf46 Merge pull request #924 from dbaker3/ds-2318
[DS-2318] Added img-thumbnail class to item-view and instances of 'No Th...
2016-03-01 16:40:40 -06:00
dylan
ebe1c70238 DS-2941-fix 2016-03-01 17:29:01 +01:00
Tim Donohue
13900300d5 Fix typo in config key 2016-03-01 09:07:55 -06:00
Ivan Masár
06b4aa14ff DS-3085 fix style in Mirage 2016-02-29 16:16:38 +01:00
helix84
88af96cfba Merge pull request #1324 from AmberPoo1/fix-sherpa/romeo-gray-submission-error
Correct Sherpa/Romeo ungraded journal (gray) error message
2016-02-29 16:16:06 +01:00
AmberPoo1
421865645b Correct Sherpa/Romeo ungraded journal (gray) error message
https://jira.duraspace.org/browse/DS-3085

Resolved: DSpace DS-3085 (Ticket in the Space Issue Tracker),
Sherpa/Romeo ungraded journal (gray) shows error
2016-02-29 09:59:18 -05:00
Kevin Van de Velde
58b221c9a4 Merge pull request #900 from tuub/DS-2497
DS-2497: Keep version numbers stable.
2016-02-29 12:41:53 +01:00
Tom Desair
14c9229156 DS-3004: Fixed unit tests, license check and unused parameters 2016-02-26 16:19:34 +01:00
Tim Donohue
5866947d0c Merge pull request #1320 from mateuszneumann/master
DS-3080 Counting withdrawn items (bugfix)
2016-02-26 08:40:49 -06:00
Tom Desair
acd80c232c DS-3004: Refactored Group2GroupCache queries so that they don't pass Entities as parameters. This allows better query caching. 2016-02-26 15:22:51 +01:00
Kevin Van de Velde
1fbf238642 Merge pull request #1321 from tomdesair/feature/DS-3081_Correct_permanent_groups_Oracle_script
DS-3081: Corrected permanent groups Oracle script
2016-02-26 15:22:29 +01:00
Tom Desair
e90f487618 DS-3004: Fixed small bug when submitting the policy form without selecting an action (found it during the testing of DS-3004) 2016-02-26 15:14:09 +01:00
Tom Desair
382d9421b7 DS-3004: Refactored GroupService so that it doesn't use dc.title anymore to search for a group by name 2016-02-26 14:52:56 +01:00
Tom Desair
5798f58410 DS-3004: Use the new name column on epersongroup when searching for groups and do not store the name in the metadata anymore. 2016-02-26 13:39:04 +01:00
Tom Desair
7ab4acf74c DS-3004: Enabled query caching for the metadata field and metadata schema queries 2016-02-26 10:37:56 +01:00
Tim Donohue
88f90c051f Fix more JSPUI classes using comma-separated configs (and ensure they all use getArrayProperty) 2016-02-25 16:50:14 -06:00
Tim Donohue
9317f341e1 Fix more API classes using comma-separated configs (and ensure they all use getArrayProperty) 2016-02-25 16:49:14 -06:00
Tom Desair
d2f7c2a4ec DS-3004: Corrected Oracle migration script 2016-02-25 17:23:48 +01:00
Tom Desair
2147ba8b62 DS-3081: Corrected permanent groups Oracle script 2016-02-25 16:52:11 +01:00
Tom Desair
7ee604fc01 DS-3081: Corrected permanent groups Oracle script 2016-02-25 16:48:28 +01:00
Mateusz Neumann
ba10d40385 DS-3080 Counting withdrawn items (bugfix) 2016-02-25 16:25:39 +01:00
Tom Desair
fccc5a6a63 DS-3004: Wrote Oracle SQL migration script 2016-02-25 15:55:08 +01:00
Mateusz Neumann
542a51d3c7 DS-3080 Counting withdrawn items (bugfix) 2016-02-25 15:35:00 +01:00
Tom Desair
b2da2ca612 DS-3004: Only check for admin override if the field is really hidden 2016-02-25 14:45:22 +01:00
Tom Desair
f4a7214bca DS-3004: Check group membership with one database call + cache the result in Hibernate. Also fixed a problem with the group2groupCache 2016-02-25 14:22:58 +01:00
Jonas Van Goolen
f652c6a36d DS-2635 Default sorting update for both filterPage and sidebar + reverting workflow config change 2016-02-25 13:08:06 +01:00
Tom Desair
257906f6a5 DS-3004: Added the PostgreSQL migration script to set the name on the epersongroup record 2016-02-25 10:50:08 +01:00
Jonas Van Goolen
3c4d600656 DS-2635 Usage of main div to add results to, fixing empty div problems 2016-02-25 08:40:40 +01:00
Jonas Van Goolen
0321bb4b22 DS-2635 Discovery facets splitting of sortOrder
The sidebar facets now use the correct sortOrdering (both in jspui and xmlui)

The was an improvement based on the following Jira ticket
https://jira.duraspace.org/browse/DS-263
2016-02-25 08:40:39 +01:00
Jonas Van Goolen
a693ff5d96 DS-2635 Configuration of sort order split into 2 parts
Originally, one sortOrder configured in the discovery.xml spring file would be used.
This had an impact on both the sidebar and view more pages
This commit splits this sortOrder to make it possible to have different sortOrder for the view more page and sidebar facet

This was an improvement based on the following Jira ticket
https://jira.duraspace.org/browse/DS-2635
2016-02-25 08:40:39 +01:00
Jonas Van Goolen
e20d006ee4 DS-2635 Configurable order by value/count per discovery facet
Modifications to the following files:
-searchFacetFilter.java
-SidebarFacetsTransformer.java
,enable the user to change what kind of sort order is used depending on what discovery facet is clicked

The was an improvement based on the following Jira ticket
https://jira.duraspace.org/browse/DS-2635
2016-02-25 08:40:39 +01:00
Pascal-Nicolas Becker
7ce7731aae Merge pull request #885 from tuub/DS-1349
DS-1349: Add configuration to hide submitter in item history (JSPUI).
2016-02-24 18:09:43 +01:00
Pascal-Nicolas Becker
8e38b13bc0 DS-1349: Add configuration to hide submitter in item history (JSPUI). 2016-02-24 17:55:40 +01:00
Tom Desair
845c1bae90 DS-3004: Added to group name as a column to the group entity and use to to find groups by name instead of searching in the metdata 2016-02-24 13:49:11 +01:00
Tim Donohue
f22a9fe6af Fix XMLUI classes that use comma-separated configs (and ensure they all use ConfigurationService). 2016-02-23 16:01:39 -06:00
Tim Donohue
3bcd24b35b Fix SWORDv2 classes that use comma-separated configs (and ensure they all use ConfigurationService). Correct insecure default value for "on-behalf-of.enable". 2016-02-23 16:01:20 -06:00
Tim Donohue
259b0f1a1b Fix SWORD classes that use comma-separated configs (and ensure they all use ConfigurationService) 2016-02-23 15:59:05 -06:00
Tim Donohue
4e9d6853db Fix JSPUI classes/jsps that use comma-separated configs (and ensure they all use ConfigurationService) 2016-02-23 15:58:35 -06:00
Tim Donohue
0e4db531cf Fix API classes using comma-separated configs (and ensure they all use ConfigurationService) 2016-02-23 15:57:31 -06:00
helix84
a8f6157d22 Merge pull request #1316 from helix84/DS-3076-revert-jackson
DS-3076 All REST API endpoints fail with Accept: application/json
2016-02-23 22:31:56 +01:00
Ivan Masár
bda61d79db DS-3076 All REST API endpoints fail with Accept: application/json
revert jackson upgrade 2.7.0 -> 2.5.3

http://stackoverflow.com/questions/34721851/spring-4-2-3-and-fasterxml-jackson-2-7-0-are-incompatible
2016-02-23 22:31:01 +01:00
Tim Donohue
2bd6b2d950 Merge pull request #1311 from bram-atmire/DS-3059
DS-3059 Replacing getProperty with getArrayProperty
2016-02-22 11:08:07 -06:00
KevinVdV
15c8cc1e26 [DS-3062] Fixing issues that prevented the xmlworkflow from being enabled. 2016-02-22 12:19:25 +01:00
Bram Luyten
3a9cfbb46c DS-3059 Replacing getProperty with getArrayProperty 2016-02-20 18:23:45 +01:00
helix84
0b80302624 Merge pull request #1251 from tdonohue/DS-2188-remove-db-browse
DS-2188 : Remove remaining artifacts/configs of DBMS Browse system
2016-02-20 00:29:43 +01:00
Tim Donohue
f047490211 Minor bug fixes to previous commit 2016-02-19 16:09:43 -06:00
Tim Donohue
24a3057d2d Recreate the old SolrBrowseCreateDAO functionality (necessary for 'metadata' indexes) as a SolrServiceIndexingPlugin 2016-02-19 15:50:08 -06:00
Tim Donohue
0cf9b35da2 Update Flyway migration to keep searching for browse index tables until three are not found 2016-02-19 15:49:13 -06:00
Tim Donohue
c5f7165f3f Flyway Java migration to remove all DBMS browse related tables, sequences and views 2016-02-19 14:23:57 -06:00
Tim Donohue
2368a648c9 Minor code cleanup. MigrationUtils should be moved and all its methods made protected (as they bypass Hibernate). Update description of 'repair' command in DatabaseUtils. 2016-02-19 14:23:55 -06:00
Tim Donohue
583970a994 Remove duplicative RecentSubmissions logic (artifact of DBMS queries) from XMLUI 2016-02-19 14:23:53 -06:00
Tim Donohue
b5c655f3e2 Remove obsolete DBMS browse configurations (including Spring ones). Update/clarify comments for other browse related configs 2016-02-19 14:22:47 -06:00
Tim Donohue
dfe2f2c822 Remove remaining DBMS Browse related classes (IndexBrowse, etc). Remove BrowseCreateDAO as it is not needed for Solr support. Refactor ItemCounter to remove methods which are no longer necessary for Solr support. 2016-02-19 14:22:45 -06:00
Tim Donohue
64fa0a20b3 Merge pull request #1277 from tdonohue/DS-3039
DS-3039 : Fix Community item counting logic. Also cleanup item counting elsewhere in code
2016-02-19 14:05:20 -06:00
Tim Donohue
36ff9e903a Merge pull request #1266 from Georgetown-University-Libraries/ds-3026
[DS-3026] REST Reports - Rely on Apache Commons to parse comma separated properties
2016-02-18 08:23:13 -06:00
Terry Brady
9690565285 Make String[] of MIME a const per feedback 2016-02-17 14:07:44 -08:00
Hardy Pottinger
f67b2e3c54 Merge pull request #1291 from hardyoyo/DS-3056-validate-all-xml-during-testing
[DS-3056] added and configured xml-maven-plugin to validate all XML
2016-02-17 15:19:15 -06:00
Mark H. Wood
066d23d0a5 Merge pull request #1265 from mwoodiupui/DS-3024
[DS-3024] "Administrator" and "Anonymous" groups can be renamed, which would cause them to no longer function in 6.x
2016-02-17 16:18:36 -05:00
Tim Donohue
d66765b8aa Merge pull request #1267 from LongsightGroup/DS-3027-item-import-collections
DS-3027 ItemImport fix to use the collections file
2016-02-17 14:57:24 -06:00
Mark H. Wood
f1a9280b46 Merge pull request #1282 from mwoodiupui/DS-2159
[DS-2159] Deprecate XPDF in DSpace 5, remove in DSpace 6
2016-02-17 14:53:54 -05:00
Tim Donohue
141fde54e8 Merge pull request #1301 from tuub/DS-3061
DS-3061: Use workflow.framework instead of workflow.workflow.framework
2016-02-17 12:32:09 -06:00
Ivan Masár
983730f516 update gson 2016-02-17 17:52:05 +01:00
Ivan Masár
4e9dee13b9 DS-3067 upgrade Maven plugins 2016-02-17 14:38:17 +01:00
KevinVdV
ebbc18221d [DS-3037] Fix completeStep workflow detection 2016-02-17 13:56:43 +01:00
Ivan Masár
e7baa1473a DS-3020 upgrade httpclient 2016-02-17 10:35:44 +01:00
Mark H. Wood
4e92643476 [DS-3024] Add tests. 2016-02-16 13:18:31 -05:00
Ivan Masár
fc6d022adc DS-3021 upgrade xerces 2016-02-16 16:44:33 +01:00
Andrea Bollini
e034ffb73e DS-3063 Ensure proper access to news files 2016-02-16 13:58:18 +01:00
Tim Donohue
56ef44b1b6 Merge pull request #1298 from tdonohue/DS-3058
DS-3058: Fix creating new resource policies. -1 MUST be passed as the policy ID
2016-02-15 11:37:21 -06:00
Tim Donohue
b4f26df9d2 Merge pull request #1299 from bram-atmire/master
DS-3059 retrieve all supported locales
2016-02-15 11:32:21 -06:00
Pascal-Nicolas Becker
93846805b5 DS-3061: Use workflow.framework instead of workflow.workflow.framework 2016-02-15 13:39:23 +01:00
Bram Luyten
de621e2089 DS-3059 retrieve all supported locales 2016-02-14 18:17:06 +01:00
Tim Donohue
a8f312e856 DS-3058: Fix creating new policies. -1 MUST be passed as the policy ID 2016-02-12 22:34:34 +00:00
Tim Donohue
a10e85c2b7 Merge pull request #1294 from atmire/DS-2887
DS-2887 AuthorizeException stacktrace shown instead of restricted access page
2016-02-12 13:35:05 -06:00
philip Vissenaekens
f3220cd34a Merge remote-tracking branch 'origin/DS-2887' into DS-2887
Conflicts:
	dspace-xmlui/src/main/java/org/dspace/app/xmlui/cocoon/BitstreamReader.java
2016-02-12 15:21:45 +01:00
philip Vissenaekens
f65ea56899 DS-2887 2016-02-12 15:14:16 +01:00
philip Vissenaekens
6239f66c2e DS-2887 2016-02-12 15:03:17 +01:00
helix84
b809153f67 Merge pull request #1293 from KevinVdV/DS-3046-service-init-ldap
[DS-3046] NPE upon first LDAP login with autoregistration
2016-02-12 12:42:08 +01:00
KevinVdV
28e16fe49b [DS-3046] NPE upon first LDAP login with autoregistration 2016-02-12 12:25:35 +01:00
Hardy Pottinger
a597804fa9 [DS-3056] suggestion by Andrea Schweer, add .xmap and .xconf extensions to the validation sets 2016-02-12 04:29:36 +00:00
Hardy Pottinger
0e10e280d2 [DS-3056] added and configured xml-maven-plugin to validate all XML and XSL files during the testing phase 2016-02-12 04:06:20 +00:00
helix84
29c352b728 Merge pull request #1274 from tim-atmire/full-config-migration
ported xmlui
2016-02-12 00:49:57 +01:00
helix84
c6cc3e14b3 Merge pull request #1290 from tdonohue/DS-3054
DS-3054: PDF Citation Page feature is not reading its configurations correctly
2016-02-12 00:18:53 +01:00
Ivan Masár
fc85a53b0f fix typos 2016-02-12 00:15:45 +01:00
helix84
08c67f88c3 Merge pull request #1288 from christian-scheible/DS-2820
[DS-2820] fixes XOAI Not filter
2016-02-12 00:06:11 +01:00
Tim Donohue
b3992c00bb Correct comment typo 2016-02-11 12:32:30 -06:00
Tim Donohue
288b0b58ce DS-3054: Use getArrayProperty() for all multivalued configs. Enhance/correct comments in citation-page.cfg 2016-02-11 12:27:52 -06:00
KevinVdV
4260dd051f [DS-2898] Add support for all authentication methods in the rest api 2016-02-11 10:46:05 +01:00
KevinVdV
7815f2a2f1 [DS-2898] Add support for all authentication methods in the rest api 2016-02-11 10:46:05 +01:00
Kevin Van de Velde
640aef21bb [DS-2898] Add support for all authentication methods in the rest api 2016-02-11 10:46:05 +01:00
helix84
faa88f700d Merge pull request #919 from tuub/DS-2547
DS-2547: Adds a label to access restricted bitstreams in JSPUI.
2016-02-10 17:58:56 +01:00
Christian Scheible
7cf90d3db2 [DS-1518] Support of StartTLS in LDAPAuthentication. 2016-02-10 16:50:19 +01:00
Christian Scheible
6b4b7396a6 [DS-2820] fixes XOAI Not filter 2016-02-10 10:52:51 +01:00
helix84
ca963c3378 Merge pull request #1286 from cjuergen/DS-3050
DS-3050 XOAI wrong URL encoding
2016-02-09 13:01:58 +01:00
Tim Donohue
81d2b7b60f Merge pull request #1285 from helix84/DS-3048-lower-config-reload-check
DS-3048 change config reload limit from 60 to 5 seconds
2016-02-08 15:24:51 -06:00
Ivan Masár
01c9976226 DS-3048 change config reload limit from 60 to 5 seconds 2016-02-08 21:00:54 +01:00
cjuergen
03739cafca Fix for DS-3050 2016-02-08 18:53:24 +01:00
Pascal-Nicolas Becker
294cd9d4be DS-2497: Keep version numbers stable. 2016-02-08 12:56:04 +01:00
Ivan Masár
2ed9085300 DS-3044 upgrade jdom to org.jdom 1.1.3 2016-02-07 15:12:12 +01:00
Mark H. Wood
82a26830d2 [DS-2159] Remove XPDF-based filters and configuration 2016-02-05 20:48:04 -05:00
Mark H. Wood
104f7d9256 [DS-3024] Use GroupService.setName, not Group.setName, to implement logic against renaming permanent groups. 2016-02-05 16:50:14 -05:00
Mark H. Wood
b1fe04128a Merge pull request #1279 from helix84/DS-3040-version-discovery
DS-3040 fix discovery detection in "dspace version"
+1 looks right, simple fix.
2016-02-05 15:31:02 -05:00
Ivan Masár
79a92eacbe DS-3040 also report when Discovery is not enabled 2016-02-05 21:26:59 +01:00
Mark H. Wood
2e826e1c29 [DS-3024] If the site has renamed the Anonymous and/or Administrator group, rename them back. 2016-02-05 12:45:53 -05:00
Tim Donohue
d2f5249378 Merge pull request #1247 from KevinVdV/DS-3003-protected-service-dao-constructor
[DS-3003] Ensure all service & DAO implementations have a protected constructor
2016-02-05 10:10:15 -06:00
helix84
3a547bd7e7 Merge pull request #1281 from helix84/DS-2619-rest-status-version
DS-2619 add DSpace version to /rest/status
2016-02-05 16:21:00 +01:00
Ivan Masár
d4cf1754e5 DS-2619 removed annotations from setters 2016-02-05 15:40:15 +01:00
Ivan Masár
f138e83abd DS-2619 add DSpace version to /rest/status 2016-02-05 15:40:15 +01:00
KevinVdV
c144aa1486 [DS-3003] Ensure all service & DAO implementations have a protected constructor 2016-02-05 15:06:39 +01:00
KevinVdV
9486a7def1 [DS-3003] Ensure all service & DAO implementations have a protected constructor 2016-02-05 15:06:39 +01:00
Kevin Van de Velde
8b99d79ab4 Merge pull request #1276 from terrywbrady/ds-2965d
DS-2965 - Allow cache clear during re-index (V2)
2016-02-05 13:31:21 +01:00
Ivan Masár
519655f6d6 DS-3040 fix discovery detection in "dspace version" 2016-02-05 10:12:29 +01:00
Hardy Pottinger
58864c68e4 Merge pull request #1278 from tdonohue/travis-memory-fixes
Ensure maven-failsafe-plugin uses same memory settings as maven-surefire-plugin
2016-02-04 17:16:14 -06:00
Mark H. Wood
66ab8b64ee Merge branch 'DS-3024' of github.com:mwoodiupui/DSpace into DS-3024 2016-02-04 18:15:52 -05:00
Tim Donohue
ea834997b9 Ensure maven-failsafe-plugin uses same memory settings as maven-surefire-plugin 2016-02-04 16:57:38 -06:00
Tim Donohue
1e174972e0 Refactor other classes affected by move of item counting from CommunityService to ItemService. Also cleanup horrible spacing/alignment in ItemCounter 2016-02-04 15:33:07 -06:00
Tim Donohue
3587661b6c Remove old CommunityService item count methods, which were inaccurate & slow. ItemService now handles this 2016-02-04 15:32:34 -06:00
Tim Donohue
dcf14a42bf Fix count of items in a Community by adding new methods to ItemDAO, ItemService. Also cleanup other count methods which are duplicative / badly named. 2016-02-04 15:31:05 -06:00
Tim Donohue
094820c12d Enhance unit/integration tests to also test for mapped items in ITCommunityCollection 2016-02-04 15:27:45 -06:00
Terry Brady
2a17303cac recreate pr 2016-02-04 10:11:48 -08:00
Mark H. Wood
e789ce90ad [DS-3024] Add all database migrations for defining the new EPersonGroup.permanent attribute. 2016-02-04 12:32:33 -05:00
Tim Donohue
2139b09353 Add a testCreateItems(). Decrease number of times we run testCountItems() 2016-02-04 10:34:56 -06:00
Tim Van den Langenbergh
f8c59cdf0a ported xmlui 2016-02-04 16:41:12 +01:00
Tim Donohue
ded72b5e28 Merge pull request #1271 from Georgetown-University-Libraries/ds-3032
[DS-3032] Integrate config service properties into ShibAuthentication
2016-02-04 09:21:04 -06:00
Terry Brady
2ae5b47f2a StringUtils.join for log 2016-02-03 15:15:26 -08:00
Terry Brady
bcfe75dbef handle another array prop 2016-02-03 15:07:00 -08:00
Terry Brady
7f5e444047 use config service for props 2016-02-03 14:29:36 -08:00
Terry Brady
492d474fb7 auth service allocation 2016-02-03 14:06:13 -08:00
helix84
8d12b313b5 Merge pull request #1264 from helix84/DS-3016-upgrade-dependencies_building-only
DS-3016 upgrade dependencies before 6.0 release (2)
2016-02-03 22:37:21 +01:00
Mark H. Wood
e20170e9a5 Merge pull request #1044 from mwoodiupui/DS-1837
[DS-1837] Create a separate Maven artifact for the MultiRemoteDSpaceRepositoryHandlePlugin

Note that DSpace/Remote-Handle-Resolver should be released *before* DSpace 6.
2016-02-03 15:46:35 -05:00
Mark H. Wood
836783b3b0 [DS-3024] Log denied rename attempt. 2016-02-03 13:35:44 -05:00
Mark H. Wood
65b6e7276e [DS-3024] Move permanence logic from entity class to its service class. 2016-02-03 13:35:44 -05:00
Mark H. Wood
b8a862bc1e [DS-3024] Exception on attempt to rename a permanent Group 2016-02-03 13:35:43 -05:00
Mark H. Wood
8fc324e9f3 [DS-3024] Add a 'permanent' attribute to Groups. 2016-02-03 13:35:43 -05:00
Hardy Pottinger
717e95eed1 Merge pull request #1269 from KevinVdV/DS-3031-remove-maven-warning
[DS-3031] Remove maven warning "Cannot include project artifact ..." in the assembly step
2016-02-03 12:15:45 -06:00
Terry Brady
1a99488733 remove semicolon from config prop 2016-02-03 10:03:45 -08:00
helix84
06236ffb20 Merge pull request #1270 from atmire/DS-3030
DS-3030 operations with bitstream policies fail in JSPUI
2016-02-03 18:18:52 +01:00
philip Vissenaekens
ba40ea2336 DS-3030 2016-02-03 15:59:26 +01:00
KevinVdV
8a4a775d99 [DS-3031] Remove maven warning "Cannot include project artifact ..." in the assembly step 2016-02-03 15:18:25 +01:00
helix84
f0e59a2df5 Merge pull request #1204 from atmire/DS-2851
DS-2851 Administrators cannot create a new user through JSPUI
2016-02-03 14:53:32 +01:00
Juan Manuel Catá
b071621251 DS-2987 Solved metadata loss by qualdrop fields in DescribeStep
I've modified DescribeStep and DCInputSet to avoid metadata loss
in type-binded qualdrop fields
2016-02-03 09:50:38 -03:00
Mark H. Wood
901506b1a9 [DS-3024] Exception on attempt to rename a permanent Group 2016-02-03 06:19:09 -05:00
Peter Dietz
4f9c1c3472 DS-3027 ItemImport fix to use the collections file collections if present 2016-02-02 23:58:13 -05:00
Terry Brady
2c30c20a14 use id field from /rest/hierarchy 2016-02-02 17:53:38 -08:00
Terry Brady
699fd029cc handle comma separated properties 2016-02-02 14:32:25 -08:00
Mark H. Wood
408fcc076e [DS-3024] Add a 'permanent' attribute to Groups. 2016-02-02 17:07:17 -05:00
helix84
7f6dbf0721 Merge pull request #1263 from Georgetown-University-Libraries/ds-3018
DS-3018 Remove unneeded declaration causing exception in /rest/reports
2016-02-02 22:54:06 +01:00
Ivan Masár
6304702841 DS-3016 revert failing upgrades: ehcache xerces httpclient junit h2 2016-02-02 22:06:06 +01:00
Ivan Masár
3a2c5c0524 DS-3016 upgrade dependencies before 6.0 release 2016-02-02 22:05:36 +01:00
Terry Brady
730f344a65 remove unneeded decl 2016-02-02 12:38:16 -08:00
Peter Dietz
501884d28a Merge branch 'akotynski-DS-2784-jersey2' 2016-02-02 12:43:38 -05:00
Peter Dietz
c195bf0695 Merge branch 'DS-2784-jersey2' of https://github.com/akotynski/DSpace into akotynski-DS-2784-jersey2
Conflicts:
	dspace-rest/src/main/java/org/dspace/rest/RestReports.java
2016-02-02 12:43:21 -05:00
Tim Donohue
064855c676 Merge pull request #1261 from helix84/DS-3014-escape-commas-in-config
DS-3014 LDAP authentication not working
2016-02-02 11:34:20 -06:00
helix84
ebf9cae93c Merge pull request #1105 from KevinVdV/DS-2807-fix-bundle2bitstream-order
[Task: DS-2807] Bundle bitstream ordering fix for hibernate
2016-02-02 17:15:59 +01:00
Pascal-Nicolas Becker
a0add10569 Merge pull request #1262 from tuub/DS-2879-XML
DS-2879/XmlWorkflow: keep the old behavior as default
2016-02-02 15:09:49 +01:00
Pascal-Nicolas Becker
cfedbea006 DS-2879/XmlWorkflow: keep the old behavior as default
This PR harmonizes the default behavior of the old workflow system and
XMLWorkflow system regarding whether notifications for tasks returned
to the task pool should be send or not.
2016-02-02 14:58:22 +01:00
Pascal-Nicolas Becker
9bf04335e6 DS-2547: Adds a label to access restricted bitstreams in JSPUI.
This feature is configurable (using configuration property
webui.itemdisplay.label.restricted.bitstreams).
2016-02-02 12:09:09 +01:00
Ivan Masár
fb0e6b879d DS-3014 LDAP authentication not working 2016-02-01 20:05:09 +01:00
Tim Donohue
53bf25fb3e Merge pull request #1259 from tim-atmire/master
DS-3015 Collection roles page needs updating
2016-02-01 11:33:17 -06:00
Tim Van den Langenbergh
db92cc44ca Merge pull request #2 from tim-atmire/XMLUI-AssignCollectionRoles-hotfix
Xmlui assign collection roles hotfix
2016-02-01 11:11:36 +01:00
Tim Van den Langenbergh
e71f4f8c1e Quick hotfix for the Collection roles render 2016-02-01 11:06:00 +01:00
helix84
a700357c3a Merge pull request #1240 from KevinVdV/DS-2989-fix-workspaceitem-view
[DS-2989] View workspace item broken in JSPUI
2016-02-01 10:55:25 +01:00
helix84
023cfed656 Merge pull request #1255 from KevinVdV/DS-2992-metadatafield-retrieval-order
[DS-2992] Selection list for metadata in edit item or item template is not sorted alphabetically anymore
2016-01-31 11:55:10 +01:00
helix84
80a7b0f8bd Merge pull request #1256 from KevinVdV/DS-3008-fix-metadata-order
[DS-3008] Fix metadata order storage
2016-01-31 02:31:13 +01:00
helix84
eca5c95cfc Merge pull request #848 from christian-scheible/DS-2426
[DS-2426] added possibility to use relative import in oai xslt transformations
2016-01-30 17:04:34 +01:00
Mark H. Wood
41bf1790e0 Merge pull request #1258 from mwoodiupui/DS-3010
[DS-3010] integrating DS-2654 uncovered some missed PluginManager conversion
2016-01-29 15:28:48 -05:00
Mark H. Wood
d0bca6c1bf [DS-3010] Correct configuration names. 2016-01-29 15:18:12 -05:00
Mark H. Wood
f9a3e737da [DS-3010] Fix a missed use of PluginManager 2016-01-29 15:00:35 -05:00
Mark H. Wood
f783cb4a4f Merge pull request #1104 from tdonohue/DS-2654-common-config
DS-2654: Enhanced Configurations via Apache Commons Configuration
2016-01-29 13:49:03 -05:00
Kevin Van de Velde
6c3ec361a1 Merge pull request #1221 from atmire/DS-2945
DS-2945 Submitting to a collection without any workflow as normal user ends in an Exception
2016-01-29 12:47:48 +01:00
KevinVdV
fc7ed3928a [DS-3008] Fix metadata order storage 2016-01-29 12:18:11 +01:00
Hardy Pottinger
204d139c90 Merge pull request #994 from ufal/DS-2659
DS-2659 new extensible platform health check reports with emailing
2016-01-28 16:55:03 -06:00
KevinVdV
543ed0d669 [DS-2992] Selection list for metadata in edit item or item template is not sorted alphabetically anymore 2016-01-28 12:27:45 +01:00
KevinVdV
7c45aad67c [DS-2995] Wrong order in breadcrum trail in collection display and item display (Small bugfix when you have multiple communities) 2016-01-28 12:15:20 +01:00
Mark H. Wood
44be2a56aa [DS-1837] Pull remote Handle resolver out of DSpace and into a separate project 2016-01-27 16:37:31 -05:00
helix84
e1072858e7 Merge pull request #947 from saiful-semantic/master
DS-1187 Full-text indexing of right-to-left PDF files
2016-01-27 16:45:00 +01:00
Mark H. Wood
9b7ee47b1a Merge pull request #1163 from atmire/DS-2880
DS-2880: Pubmed integration into XMLUI submission
2016-01-27 10:22:16 -05:00
Jonas Van Goolen
96e5d4177b DS-2880 "Reverting" localstorage + added additional check on DSpace var definition 2016-01-27 16:19:55 +01:00
Jonas Van Goolen
46a880db5f DS-2880 Usage of localstorage to store compiled templates 2016-01-27 16:19:55 +01:00
Jonas Van Goolen
3d0682a257 DS-2880 Licence header exclusion + lowercase change 2016-01-27 16:19:55 +01:00
Jonas Van Goolen
6656f853ed DS-2880 Pubmed docs + Mirage 1 integration 2016-01-27 16:19:55 +01:00
rradillen
7dd5a3d982 mirage 2 not as default theme 2016-01-27 16:19:55 +01:00
philip Vissenaekens
002b8783bf DS-2880: Pubmed integration into XMLUI submission 2016-01-27 16:19:55 +01:00
Mark H. Wood
2833907c0c Merge pull request #1160 from atmire/DS-2876
DS-2876 Framework for importing external metadata
2016-01-27 10:15:58 -05:00
Ondřej Košarko
9023196aec healthcheck command email template 2016-01-27 15:18:59 +01:00
Ondřej Košarko
6a30f62678 report all exceptions from EmbargoCheck 2016-01-27 15:18:59 +01:00
Ondřej Košarko
1ae2928147 generics 2016-01-27 15:18:49 +01:00
KevinVdV
e7db60a524 [DS-2995] Wrong order in breadcrum trail in collection display and item display 2016-01-27 13:09:14 +01:00
Kevin Van de Velde
38a4def647 Merge pull request #1244 from cjuergen/DS-2990
Fix for DS-2990
2016-01-26 12:51:37 +01:00
Jonas Van Goolen
42f057ad79 Addition of license headers 2016-01-26 08:54:20 +01:00
Roeland Dillen
039d7a62b2 fix link in readme 2016-01-26 08:54:20 +01:00
Roeland Dillen
216ea621e6 readme ameliorations 2016-01-26 08:54:20 +01:00
Roeland
c2b9d2a128 readme bte explanation 2016-01-26 08:54:20 +01:00
Roeland Dillen
33957ff82e further ameliorations to the readme 2016-01-26 08:54:20 +01:00
philip Vissenaekens
3a7b180143 29600: Document framework 2016-01-26 08:54:20 +01:00
philip Vissenaekens
c2b91a885a 29600: Document framework 2016-01-26 08:54:20 +01:00
philip Vissenaekens
e49e1323d6 29600: importer framework readme 2016-01-26 08:54:20 +01:00
philip Vissenaekens
e361a5bd96 29600: importer framework readme 2016-01-26 08:54:20 +01:00
philip Vissenaekens
8a0cda8536 29600: importer framework readme 2016-01-26 08:54:20 +01:00
philip Vissenaekens
09765723b2 29313: import citations framework integration into dspace6
29313: Integrate import citations framework into dspace6

29412: import external package refactoring

29412: import external package refactoring

more refactorying
2016-01-26 08:54:20 +01:00
Tim Donohue
10dfea2e6a Merge pull request #1235 from tdonohue/DS-2187-remove-lucene
DS-2187 : Remove Lucene search support
2016-01-25 16:18:17 -06:00
Tim Donohue
900cb68209 Remove ALL lucene references from JARs. (NOTE: Lucene will still get pulled into DSpace though via Solr) 2016-01-25 15:29:28 -06:00
Tim Donohue
198f33a52d Remove two more deprecated XMLUI Lucene classes (accidentally overlooked and unused) 2016-01-25 15:28:24 -06:00
Tim Donohue
f37fb83537 Rebase again, and add explanatory comments for new DSPR#801 config 2016-01-25 14:45:30 -06:00
Tim Donohue
c9333b9102 Bug fix from previous commit. Accidentally added back in a non-existing config file 2016-01-25 14:36:44 -06:00
Tim Donohue
b45194de37 Minor bug fixes. Ensure controlpanel settings are loaded property (PR #970), and fix 'dspace dsprop' command which is useful in testing. 2016-01-25 14:36:41 -06:00
Tim Donohue
cf18656b11 Update code changes from PR #970 to utilize PluginService and ConfigurationService 2016-01-25 14:36:39 -06:00
Tim Donohue
7ea74d8b0d Found an overlooked configuration needing renaming. "dspace.oai.url" is now simply "oai.url" in oai.cfg. Fixed references elsewhere & updated them to use ConfigurationService 2016-01-25 14:36:37 -06:00
Tim Donohue
eb2f1c8ace Refactor REST API and code from PR #1239 to use ConfigurationService and PluginService. Rename rest.cfg configs to use proper prefixing. 2016-01-25 14:36:34 -06:00
Tim Donohue
80cfa2001d Reenable Ant filtering of specific configs which cannot utilize Commons Config. Also fix/cleanup Solr's log4j configuration. 2016-01-25 14:36:32 -06:00
Tim Donohue
92df20eeee Re-enable web.xml filtering in Maven POMs. It's necessary for running/debugging webapps in IDEs 2016-01-25 14:36:29 -06:00
KevinVdV
cdfae97f11 Allow the local cfg to be filtered by maven 2016-01-25 14:36:27 -06:00
Tim Donohue
2538399c07 Minor bug fixes. Move bean definition to -services and ensure proper imports 2016-01-25 14:36:24 -06:00
KevinVdV
0d79a7109a Create factory to retrieve an instance of the "configurationService" object 2016-01-25 14:36:22 -06:00
Tim Donohue
85e27d5309 Fix comment 2016-01-25 14:36:19 -06:00
Tim Donohue
08d3e961be Configuration cleanup. Restore authentication.cfg. Add example of configuring AuthN to local.cfg. Move default logging settings to dspace.cfg. Uncomment all module configs 2016-01-25 14:36:17 -06:00
Tim Donohue
4f1df7bbd0 Remove unnecessary filtering 2016-01-25 14:36:14 -06:00
Tim Donohue
1afaadb89f Remove more filtering from POMs. No longer used. 2016-01-25 14:36:12 -06:00
Tim Donohue
ab52dfc3d0 Correct build.xml, make it backwards compatible with old versions 2016-01-25 14:36:10 -06:00
Tim Donohue
c75e5bc578 Ignore local.cfg by default. Provide an EXAMPLE. Make sure Maven assembly handles local.cfg. Make sure Ant build reads local.cfg 2016-01-25 14:36:08 -06:00
Tim Donohue
ab8960ad3f Add back in log4j initialization via a new LoggerServiceImpl which loads configs from Commons Configs 2016-01-25 14:36:06 -06:00
Tim Donohue
2f7e41d31f Stop filtering configs during Maven assembly or Ant build 2016-01-25 14:36:04 -06:00
Tim Donohue
d7d255d441 Correct missing license headers 2016-01-25 14:36:02 -06:00
Tim Donohue
628783fb9e Update Test Environment to use its own local.cfg INSTEAD OF dspace.cfg.more / merging multiple configs 2016-01-25 14:36:00 -06:00
Tim Donohue
9d2af78158 Update Hibernate configuration to load dynamic settings via Spring / ConfigurationService. Add default DB settings back to dspace.cfg 2016-01-25 14:35:57 -06:00
Tim Donohue
9851ff5f9e Remove build.properties and replace it with a "local.cfg" which can override configs as needed. 2016-01-25 14:35:55 -06:00
Tim Donohue
fbcd3634f4 Stop filtering properties in all POMs. With Commons Config, we'll load them dynamically 2016-01-25 14:35:53 -06:00
Tim Donohue
41e8685088 Implement dynamic property substitutions for our Spring Config files. 2016-01-25 14:35:51 -06:00
Tim Donohue
fadfa351dd Fix JSP reference to old PluginManager. Update comments referencing PluginManager. Remove old plugin.reusable.* configs as they are no longer needed 2016-01-25 14:35:49 -06:00
Tim Donohue
829ea782da Allow ScriptLauncher to run *without* ConfigurationManager. Requires tweaking how DSpaceConfigurationService 'discovers' the DSpace home directory (new unit tests added). 2016-01-25 14:35:46 -06:00
Tim Donohue
444e6e0cb3 Replace MockConfigurationManager with JMockit Expectations statements 2016-01-25 14:35:44 -06:00
Tim Donohue
9bbf81a1e2 Ensure dspace.dir system property also specified for Integration Tests 2016-01-25 14:35:42 -06:00
Tim Donohue
a1d3d98be1 Test needs access to Configs / Kernel 2016-01-25 14:35:40 -06:00
Tim Donohue
ed25cc0afe Create new AbstractDSpaceTest to initialize Kernel separate from Database. Some tests ONLY need the Kernel for configs, and not the full DB. 2016-01-25 14:35:38 -06:00
Tim Donohue
44a6baa0e8 Refactor several beans (and related classes) to use ConfigurationService on init once it is injected. 2016-01-25 14:35:36 -06:00
Tim Donohue
aef58ad9da Enhance error reporting 2016-01-25 14:35:34 -06:00
Tim Donohue
ad76b42080 Refactor ChoiceAuthorityServiceImpl to load necessary plugins on first use, NOT on initialization 2016-01-25 14:35:32 -06:00
Tim Donohue
3df18c68b8 Refactor PluginManager into PluginService and LegacyPluginServiceImpl. Add unit tests. 2016-01-25 14:35:30 -06:00
Tim Donohue
0466184350 Fix compilation error after rebase 2016-01-25 14:35:28 -06:00
Tim Donohue
1c8ed977c2 Update multivalued properties to use getArrayProperty from ConfigurationService. Update specific config names based on renamed config keys. 2016-01-25 14:35:25 -06:00
Tim Donohue
a428d5a24e Prepend all configs with module name (to ensure unique keys). Load all module configs from dspace.cfg via "include" statements. 2016-01-25 14:35:23 -06:00
Tim Donohue
73740e423a Refactor org.dspace.core.* classes to use new ConfigurationService. Helps pass more unit tests. 2016-01-25 14:35:21 -06:00
Tim Donohue
36359c8a37 Minor services tweaks. Enhance comments. Have SpringServiceManager use getArrayProperty() instead of getPropertyAsType() 2016-01-25 14:35:19 -06:00
Tim Donohue
cb98175792 More convienence methods to ConfigurationService. "hasProperty()" and "getArrayProperty()". Includes unit tests. 2016-01-25 14:35:17 -06:00
Tim Donohue
257248e362 Rewrite ConfigurationManager to wrap ConfigurationService. Removal of "dspace-config" and "dspace.configuration" system/servlet params 2016-01-25 14:35:15 -06:00
Tim Donohue
71cab949a2 Add a few more unit tests of reading properties of different types. Auto-trim all string values 2016-01-25 14:35:13 -06:00
Tim Donohue
c918cbd3ba Copy major convenience methods from ConfigurationManager to ConfigurationService. Add new Unit Tests to verify. 2016-01-25 14:35:11 -06:00
Tim Donohue
514915287d Fix loading of config-definition.xml in Unit Testing. Look for it on ClassPath if cannot be found elsewhere. 2016-01-25 14:35:08 -06:00
Tim Donohue
9afd1dda73 Add back in a few dynamically generated configurations which were previously removed during refactor 2016-01-25 14:35:06 -06:00
Tim Donohue
81b2ff2454 Remove completely unused constants and configurations. These are not used at all. 2016-01-25 14:35:03 -06:00
Tim Donohue
5d6b6827e5 Initial refactor commit. Swap out DSpaceConfig/ServiceConfig for Apache Commons Configuration 2016-01-25 14:35:00 -06:00
Tim Donohue
f549eedf7b Merge pull request #801 from TAMULib/5x_search_result_export_metadata
DS-1262 CSV export of search results in XMLUI
2016-01-25 14:21:07 -06:00
helix84
d40231014f Merge pull request #1249 from tdonohue/DS-3005
DS-3005: Ensure ItemService is initialized in all constructors
2016-01-25 18:42:56 +01:00
Tim Donohue
82cb76b1ed DS-3005: Ensure ItemService is initialized in all constructors 2016-01-25 11:23:41 -06:00
Ondřej Košarko
ec804f81e2 moving queries to DAOs 2016-01-25 18:04:46 +01:00
Terry Brady
e4f7b8a2e8 Refine logic to handle presence of restricted coll 2016-01-22 12:31:39 -08:00
Terry Brady
06e915b7c4 Incrementally apply filters to items in large collections 2016-01-22 11:41:30 -08:00
Terry Brady
05de93f59f Exclude eperson schema from field drop down 2016-01-22 11:40:57 -08:00
Terry Brady
0be738dfa1 Fix enum name to match title/logic 2016-01-22 11:40:39 -08:00
Mark H. Wood
e6ac38ecdd [DS-1837] Copy the JAR to the installer 'lib' directory. 2016-01-22 14:35:22 -05:00
William Welling
3288595895 Using query string instead of path. Some code improvement. 2016-01-22 11:55:32 -06:00
William Welling
4ea135cc27 Removed some dead code. 2016-01-22 10:29:45 -06:00
William Welling
b871a4fa7a Fixed search metadata export by passing query and filter to processQuery of AbstractSearch. 2016-01-22 10:03:43 -06:00
William Welling
dca9e898c6 Added CSVExportDiscoveryNavigation to apply tranform when pattern matching discovery. 2016-01-22 09:59:30 -06:00
helix84
be8af9a50e Merge pull request #1245 from AmberPoo1/correct-conformsTo-dcterm
Correct dcterm "dcterms.conformsTo" in registry configuration
2016-01-22 08:44:04 +01:00
William Welling
3d6a177f8b Just setting protected objectModel on simple search object. Removed public setter. 2016-01-21 17:02:53 -06:00
William Welling
074eb9feef Set object model on simple search through new setter on AbstractDSpaceTranformer 2016-01-21 16:52:42 -06:00
AmberPoo1
e036315353 Correct dcterm "dcterms.conformsTo" in registry configuration
Resolved: DSpaceDS-2998, Incorrect metadata element
"dcterms.comformsTo" in dspace registry configuration.
Ticket in the Space Issue Tracker: DS-2998
2016-01-21 17:22:55 -05:00
William Welling
c7e273fe1f Unable to autowire. Getting services from factory. 2016-01-21 15:18:59 -06:00
Tim Donohue
ca4999149d Merge pull request #970 from ufal/DS-2625
DS-2625 Extendable control panel
2016-01-21 13:47:17 -06:00
William Welling
7d3bbd7dc4 Autowired services to replace static method calls from refactored managers. 2016-01-21 11:35:25 -06:00
William Welling
fbfe388d11 Resolved merge conflicts from upstream fetch. 2016-01-21 11:03:54 -06:00
William Welling
9e764acdaf Consolidated duplicated code into prepareQuery method in AbstractSearch 2016-01-20 16:58:39 -06:00
Mark H. Wood
3b34ae04f4 Merge pull request #1019 from mwoodiupui/DS-2463
[DS-2463] iplists.com-non_engines.txt is outdated and slow
2016-01-20 15:55:03 -05:00
Tim Donohue
6a3d9a5ea0 Merge pull request #1201 from KevinVdV/DS-2879-xml-workflow
[DS-2879] Make it configurable if reviewers should be notified about return to pool: XmlWorkflow implementation
2016-01-20 13:50:46 -06:00
Mark H. Wood
88b0633cc4 Merge pull request #1205 from helix84/DS-2934-add-local-metadata-namespace
DS-2934 Add an empty "local" metadata namespace
2016-01-20 14:46:41 -05:00
Mark H. Wood
eb0489a5d3 Merge pull request #1219 from mwoodiupui/DS-2767
[DS-2767] Sites can no longer inject preconfigured connection pool using config/dspace.cfg:db.jndi
2016-01-20 14:31:40 -05:00
cjuergen
d5c8f43a4d Reversed to original the changes should not have been committed. 2016-01-20 13:05:30 +01:00
aleksanderkotbury
5360217536 Merge branch 'master' into DS-2784-jersey2
Conflicts:
	dspace-rest/src/main/java/org/dspace/rest/common/Item.java
	dspace-rest/src/main/webapp/WEB-INF/web.xml
2016-01-19 19:07:25 +01:00
Ondřej Košarko
b87cf2f723 fix LogAnalyser 2016-01-19 14:09:54 +01:00
Ondřej Košarko
ef8e245fbe refactoring for services api 2016-01-19 14:09:48 +01:00
Kevin Van de Velde
d375b9f128 Merge pull request #1243 from cjuergen/DS-2991
Fix for DS-2991
2016-01-19 12:25:06 +01:00
cjuergen
6a9de213a9 Fix for DS-2991 2016-01-18 17:06:03 +01:00
cjuergen
f72c2c729c Fix for DS-2990 2016-01-18 14:29:03 +01:00
Jozsef Marton
261dee4714 [DS-2633] Fix NPE during SAF format import (ItemImport) with collection files 2016-01-17 19:21:42 +01:00
jm
70a7e7d6d2 healthcehck formatting fixed 2016-01-16 23:19:26 +01:00
Ondřej Košarko
e6ddfbe93f added comment to the new pattern 2016-01-16 23:19:25 +01:00
jm
463a61759c fixing warn/exc count 2016-01-16 23:19:24 +01:00
jm
d92215d436 improving output formatting 2016-01-16 23:19:23 +01:00
jm
565d391eb8 improve formatting 2016-01-16 23:19:22 +01:00
Ondřej Košarko
aed0741fec adressing helix' comments to the DS-2659 PR 2016-01-16 23:19:21 +01:00
Jozef Misutka
d2f9fb5104 DS-2659 : introducing new extensible health check platform emailing reports on a regular basis 2016-01-16 23:14:52 +01:00
Ondřej Košarko
e0e77995dd improving control panel activity tracking 2016-01-16 20:50:22 +01:00
Ondřej Košarko
f00dd73c05 Extendable control panel 2016-01-16 20:49:46 +01:00
Hardy Pottinger
592207245c Merge pull request #1239 from terrywbrady/ds-2583v10
DS-2583: Quality Control Reporting via REST API (v6)
2016-01-15 17:05:33 -05:00
Terry Brady
a1fdf13db8 /rest/hierarchy normalized uuid to id field 2016-01-14 14:47:21 -08:00
Terry Brady
7f3d38836a Optimize hierarchy export, support hierarchy as json 2016-01-14 14:20:14 -08:00
KevinVdV
09d6255c66 [DS-2989] View workspace item broken in JSPUI 2016-01-14 16:07:52 +01:00
Kevin Van de Velde
67f5682cfc Merge pull request #1166 from tuub/DS-2888
DS-2888: JSPUI: Add language tags to submission edit metadata step
2016-01-14 12:52:56 +01:00
Terry Brady
d76f5696de Re-assemble pull request 2016-01-13 13:15:53 -08:00
Mark H. Wood
9f6cf4e7c7 Merge pull request #1178 from KevinVdV/DS-2905-format-bugs
[DS-2905] Fix format bugs with the EPerson CLI scripts & UUIDs
2016-01-13 15:09:29 -05:00
Hardy Pottinger
a61ea06637 Merge pull request #1173 from terrywbrady/ds-2894
DS-2894:REST Call to return Optimized Hierarchy
2016-01-13 14:58:28 -05:00
Terry Brady
c9f2072e7e Add additional endpoint to Rest Index 2016-01-13 09:52:19 -08:00
Mark H. Wood
12b41f7601 Merge pull request #1140 from Georgetown-University-Libraries/ds-2844
[DS-2844] Create index for all UUID fields and metadatavalue
2016-01-13 12:12:03 -05:00
Kevin Van de Velde
3c86288839 Merge pull request #1236 from KevinVdV/DS-2629-excel-media-filter
Ds 2629 excel media filter
2016-01-13 16:22:25 +01:00
Kevin Van de Velde
2e679fb833 Merge pull request #1238 from cwilper/DS-2985
DS-2985: Use correct arg name to make update-doi and delete-doi execute
2016-01-12 08:43:35 +01:00
Chris Wilper
b63e6d893f DS-2985: Use correct argument name to make update-doi and delete-doi execute 2016-01-11 15:44:23 -05:00
Mark H. Wood
87c6ce8463 Merge pull request #1159 from LongsightGroup/DS-79-s3-assetstore
DS-79 Assetstore to support different implementations, including S3
2016-01-08 17:02:31 -05:00
Peter Dietz
59f60bf086 Remove public constructor for MostRecentChecksum after rebase 2016-01-07 14:21:01 -05:00
Peter Dietz
5ca77254b2 Changed hibernate field for checker-emailer 2016-01-07 13:48:07 -05:00
Peter Dietz
dd73db74a1 Add bitstreamStorage.computeChecksum method, to replace checksum retrieve 2016-01-07 13:48:07 -05:00
Peter Dietz
0f5da46ebb Fix checksum history command by creating object first, then create 2016-01-07 13:48:07 -05:00
Peter Dietz
be4255a682 Move MostRecentChecksum logic to service 2016-01-07 13:48:07 -05:00
Peter Dietz
f642367463 Move assetstore configuration to bitstore service spring beans
Remove configuration of assetstore from dspace.cfg, or bitstore-s3.cfg,
and instead magically configure this through config/spring/api/bitstore.xml
2016-01-07 13:47:17 -05:00
Peter Dietz
d556d9ade5 Rename BitStore to BitStoreService, and DSBitStore, S3BitStore 2016-01-07 13:47:17 -05:00
Peter Dietz
059dcc1145 Log all exceptions from DSBitstore 2016-01-07 13:47:16 -05:00
Peter Dietz
5130e694be Disable s3storage from defaults 2016-01-07 13:47:16 -05:00
Peter Dietz
73b102a5a1 Fix DSBitstore register bitstream 2016-01-07 13:47:16 -05:00
Peter Dietz
efc7bd949c Update dspace.cfg with updated assetstore config 2016-01-07 13:47:16 -05:00
Peter Dietz
28400c1437 Fix checksum findBitstreams with not recent checksum 2016-01-07 13:47:16 -05:00
Peter Dietz
905445c864 DS-2863 Stop checksum checker from crashing 2016-01-07 13:47:16 -05:00
Peter Dietz
903a43c61b Change BitstreamStorageService to use BitStore interface, adding S3 storage 2016-01-07 13:12:03 -05:00
KevinVdV
e51ba3f5b6 [DS-2629] Add ability to filter Excel (xls and xlsx) files for full text searching small tweaks:
* Ensured compilation against latest master
* Removed the verbose print extracted text as it would really clutter the output
* Compressed the string to inputStream from 3 lines into a single one.
* Removed obsolete constructor call to the "ExtractorFactory"
* Removed a TODO that I verified
2016-01-07 12:27:45 +01:00
Ed Goulet
a052516b49 Include default config entries for ExcelFilter 2016-01-07 12:01:03 +01:00
Ed Goulet
2467d15fb3 DS-2629 mediafilter addition: ExcelFilter.java 2016-01-07 12:00:56 +01:00
Kevin Van de Velde
1ec396d4d9 Merge pull request #1233 from KevinVdV/DS-2976-protected-entity-constructor
[DS-2976] Ensure all database entities have a protected constructor
2016-01-06 08:45:55 +01:00
Tim Donohue
35e2242902 Remove all major Lucene configurations. 2016-01-05 16:30:23 -06:00
Tim Donohue
6f2a515208 Remove all Lucene API search classes (deprecated since 4.0) 2016-01-05 16:28:58 -06:00
Tim Donohue
a3cec584e4 Update JSPUI ControlledVocabularySearchServlet to use Discovery. Remove old Lucene search JSPs. Other minor updates 2016-01-05 16:27:53 -06:00
Tim Donohue
34676493f7 Remove XMLUI ArtifactBrowser and SearchArtifacts aspects (both Lucene based). Update OpenURLReader to use Discovery. Other minor cleanup 2016-01-05 16:26:28 -06:00
Tim Donohue
ce86b9c512 Remove Lucene launcher commands 2016-01-04 16:28:39 -06:00
Tim Donohue
3e93d6e55d Remove obsolete references to deprecated DSIndexer class 2016-01-04 16:27:52 -06:00
Ivo Prajer
501e40d87e Reapply DS-2218 fix (PR#929). Removed extra semicolon in the sql command, added check for "up-to-date", fix updating metadata values, basic logging to DSpace log and SQL exception handling. Changed, customized, added user message and repaired their order. Fixed return codes and some typos. Changed re-index engine from DSIndexer to Discovery and info text about manual re-indexing. Changes in SQL formatting and formatting of code. 2016-01-04 16:23:35 -06:00
Ivan Masár
9abbc2a0ed fix X-Forward-For -> X-Forwarded-For in dspace.cfg 2015-12-30 09:35:15 +01:00
Facundo Gabriel Adorno
52a3f62dc9 Modify XPath expression when retrieving a workflow step
When we have two workflows, W1 and W2, and W2 has a first
step with a ID equal to other step ID in W1, WorkflowFactory
retrieves erroneously the step in W1 when we ask about the
first step in W2.

To prevent this, the corresponding XPath expression was modified.
2015-12-28 13:58:50 -03:00
KevinVdV
69bdb15b3c [DS-2976] Ensure all database entities have a protected constructor 2015-12-24 15:28:26 +01:00
aleksanderkotbury
da507bd256 remove unused import. 2015-12-24 14:40:33 +01:00
aleksanderkotbury
2a775ca3a3 DS-2975 delete item using itemService 2015-12-24 14:37:41 +01:00
aleksanderkotbury
0934603e12 DS-2975 - remove item from dspace 2015-12-24 14:10:31 +01:00
aleksanderkotbury
89ed289214 Merge remote-tracking branch 'upstream/master' into DS-2784-jersey2
Conflicts:
	dspace-rest/src/main/java/org/dspace/rest/HandleResource.java
2015-12-24 13:49:27 +01:00
kshepherd
ee6b2f54a8 [DS-2187] Remove XMLUI AdvancedSearchUtils, StatisticsSearchResultTransformer, search-results.js and Statistics sitemap mappings
- Removed pattern matches for "search", "simple-search", "advanced-search", "handle/*/*/search", "handle/*/*/simple-search", "handle/*/*/advanced-search" in XMLUI Statistics sitemap.map and inserted comments to indicate this removal
(part of me wants to remap some discover stuff into /search since that's such an obvious/common URL pattern...)
- Removed StatisticsSearchResultTransformer transformer mapping from Statistics sitemap.xmap
- Removed dspace-xmlui\src\main\webapp\static\js\search-results.js
- Removed org.dspace.app.xmlui.aspect.statistics.StatisticsSearchResultTransformer
- Removed org.dspace.app.xmlui.aspect.artifactbrowser.AdvancedSearchUtils
2015-12-22 16:14:20 -06:00
Kim Shepherd
6348fc641e [DS-2187] More DSQuery usages: XMLUI OpenSearch, AdvancedSearch
DSQuery dependency (outside org.dspace.search) removal, continued:
====

Removing org.dspace.app.xmlui.opensearch.StandardOpenSearchGenerator:
 - Removed map:generator mapping for StandardOpenSearchGenerator in XMLUI sitemap.xmap
 - This generator was matched on pattern "open-search/" in XMLUI sitemap.xmap. I've remapped
that pattern to DiscoveryOpenSearchGenerator (also mapped on open-search/discovery) to try and
keep things working as smoothly as possible, and added a comment to that effect.
 - Removed org.app.xmlui.opensearch.StandardOpenSearchGenerator class

Removed (unused) import in org.dspace.app.xmlui.aspect.administrative.mapper.SearchItemForm

Removing org.dspace.app.xmlui.aspect.artifactbrowser.AbstractSearch and implementations:
 - AdvancedSearch and AdvancedSearchLoggerAction:
   - Removed mapping for pattern match "advanced-search" and "handle/*/*/advanced-search", added comments indicating removal, removed transformer mapping from ArtifactBrowser sitemap.xmap
   - Removed mapping for pattern match "advanced-search" (includes map:act for AdvancedSearchLoggerAction) and "handle/*/*/advanced-search" (also includes map:act for AdvancedSearchLoggerAction), added comments indicating removal, removed action mapping for AdvancedSearchLoggerAction, removed transformer mapping for AdvancedSearch from SearchArtifacts sitemap.xmap (I have a feeling SearchArtifacts as a whole should be pulled out now, but will revisit that later)

   - Note: I'm leaving i18n keys for xmlui.ArtifactBrowser.AdvancedSearch alone until I can be sure that they can be safely removed or moved without stuffing up anyone's UI
   - Removed org.dspace.app.xmlui.aspect.artifactbrowser.AdvancedSearch class
   - Removed org.dspace.app.xmlui.aspect.artifactbrowser.AdvancedSearchLoggerAction class
2015-12-22 16:11:51 -06:00
Tim Donohue
17ec3aaeb6 Remove DatabaseLegacyReindexer bean from Spring config 2015-12-22 16:08:35 -06:00
kshepherd
8fdd88594a [DS-2160] [DS-2187] Remove non-nested usages of DSIndexer and some easy non-nested usages of DSQuery
DSIndexer dependency (outside org.dspace.search) removal: (complete)
====
Removed (unused) java class import from MediaFilter
Removed ItemImport DSIndexer.setBatchProcessingMode references, removed java class import
Removed FlyWay allback to DatabaseLegacyReindexer, removed DatabaseLegacyReindexer class

DSQuery dependency (outside org.dspace.search) removal: (WIP)
====
Removed org.dspace.app.webui.search.LuceneRequestProcessor and dependencies/imports in:
 - its reference in dspace.cfg, JSPUI Discovery section, updated comments to reflect removal
 - (unused) class import in org.dspace.app.webui.servlet.AdvancedSearchServlet
 - (unused) class import in org.dspace.app.webui.servlet.OpenSearchServlet
 - (unused) class import in org.dspace.app.webui.servlet.SimpleSearchServlet
 - (unused) class import in org.dspace.app.webui.servlet.admin.ItemMapServlet

Removed org.dspace.xmlui.aspect.adminstrative.mapper.LuceneSearchRequestProcessor and its reference in dspace.cfg, XMLUI Discovery section, updated comments to reflect removal.

Notes: org.dspace.app.webui.search now only contains SearchRequestProcessor and
SearchProcessorException. SearchReqeuestProcessor is now only implemented by
org.dspace.app.webui.discovery.DiscoverySearchRequestProcessor. Would it make sense to move
these classes into org.dspace.app.webui.discovery and refactor references to
SearchProcessorException accordingly? Or is it safer for unknown customisations to leave as
is?

org.dspace.app.xmlui.opensearch.DiscoveryOpenSearchGenerator and
org.dspace.app.xmlui.opensearch.StandardOpenSearchGenerator had their summary comments mixed
up - I swapped these back around. No removal of StandardOpenSearchGenerator yet, needs closer
inspection of usage in sitemap, pattern mapping etc.
2015-12-22 16:07:53 -06:00
helix84
76c617e8c6 Merge pull request #1187 from KevinVdV/DS-2913-fix-community-statistics-logging
[DS-2913] Fix community parent logging infinite loop
2015-12-21 21:46:07 +01:00
rradillen
67cdd41846 DS-2962: Robots.txt disallows site /discovery but not /handle/*/disover 2015-12-21 13:56:20 +01:00
Pascal-Nicolas Becker
cfd1056e32 DS-2888: Support language tags as well for twobox fields. 2015-12-18 14:56:15 +01:00
Terry Brady
9ed74125c4 change class name from HierarchyRepository to HierarchySite 2015-12-16 18:52:18 -08:00
Terry Brady
f16a8b0cb7 change class name from HierarchyRepository to HierarchySite 2015-12-16 18:51:54 -08:00
Kevin Van de Velde
00c5485c42 Merge pull request #988 from christian-scheible/DS-2648
[DS-2648] Full text available sidebar facet for Discovery
2015-12-16 16:25:08 +01:00
philip Vissenaekens
b31496326c DS-2945 2015-12-16 11:50:13 +01:00
helix84
c2d15cb419 Merge pull request #1220 from bram-atmire/DS-2936-master
DS-2936 REST-API /handle endpoint broken
2015-12-16 00:56:17 +01:00
Bram Luyten
363b89985a DS-2936 REST-API /handle endpoint broken 2015-12-15 22:19:57 +01:00
Mark H. Wood
cc142cb321 [DS-2767] Try to look up a DataSource in JNDI, returning DSpace-configured DataSource if not found. 2015-12-14 16:39:34 -05:00
Bram Luyten
d08605dd91 Adding class to ensure REST API can register itself during startup 2015-12-11 21:13:52 +00:00
aleksanderkotbury
226c170f08 [DS-2784] schema update - legacy id removed 2015-12-11 19:39:04 +01:00
aleksanderkotbury
cc4dd7063f Merge branch 'master' into DS-2784-jersey2
Conflicts:
	dspace-rest/src/main/java/org/dspace/rest/BitstreamResource.java
2015-12-11 19:28:09 +01:00
helix84
ccfec39bb5 Merge pull request #1210 from kohts/DS-2315
DS-2315: export Simple Archive Format without bitstreams
2015-12-11 10:05:41 +01:00
Petya Kohts
6ca6d9060f logging item handle during export (when available) 2015-12-11 01:20:28 +03:00
helix84
e41f4d9853 Merge pull request #1013 from tuub/DS-2623
DS-2623: Add different file descriptions for multiple files after upload
2015-12-10 18:33:41 +01:00
helix84
df4f511beb Merge pull request #1213 from KevinVdV/DS-2942-fix-template-items-edit
[DS-2942] Fix (template) item metadata edit
2015-12-10 15:17:54 +01:00
KevinVdV
b6d409d402 [DS-2942] Fix (template) item metadata edit 2015-12-10 11:27:01 +01:00
Petya Kohts
104f6cacbd DS-2315: export Simple Archive Format without bitstreams 2015-12-07 17:43:43 +00:00
Ivan Masár
1ea7305eba fix invalid syntax of suggested SQL 2015-12-04 10:17:41 +01:00
Ivan Masár
c8761f253f DS-2934 Add an empty "local" metadata namespace 2015-12-04 09:41:48 +01:00
philip Vissenaekens
2231b5ccb2 DS-2851 2015-12-03 16:12:34 +01:00
helix84
9c6603aa44 Merge pull request #1203 from atmire/DS-2873
DS-2873 JSPUI: Group Edit Form doesn't show EPersons or Groups contained in the edited group
2015-12-03 15:53:02 +01:00
philip Vissenaekens
f4fd9a6b5f DS-2873 2015-12-03 14:59:34 +01:00
KevinVdV
4ec403ec86 [DS-2933] Fix SwordClient in xmlui 2015-12-03 12:39:31 +01:00
Terry Brady
5d18687db2 Conform error handling to match other Resource classes 2015-12-02 15:39:43 -08:00
Terry Brady
1d23379a0b get repo name from site object 2015-12-02 15:14:24 -08:00
Terry Brady
43c5be9c61 Support JSON and XML 2015-12-02 15:14:22 -08:00
Terry Brady
aee6c65856 fix header 2015-12-02 15:14:20 -08:00
Terry Brady
b69a8338b1 Check read auth 2015-12-02 15:14:18 -08:00
Terry Brady
967ec99a8a clean up var names, cleanup 2015-12-02 15:14:16 -08:00
Terry Brady
256c301d51 hierarchy command 2015-12-02 15:14:14 -08:00
Terry Brady
6a0dee2e2d additional typos 2015-12-02 11:34:54 -08:00
Terry Brady
6c5741ed2c typo in mig script 2015-12-02 10:33:08 -08:00
Terry Brady
ae5daf21dc Create index for all UUID fields and metadatavalue 2015-12-02 10:30:36 -08:00
helix84
c7b7241c3d Merge pull request #1170 from mwoodiupui/DS-2763
[DS-2763] EHCache throwing a NotSerializableException: org.dspace.content.CollectionServiceImpl
2015-12-02 13:04:43 +01:00
Kevin Van de Velde
b19d540d47 Merge pull request #1191 from atmire/DS-2916
DS-2916 BitstreamDAOImpl contains incorrect database linking
2015-12-01 13:46:33 +01:00
KevinVdV
67f7c7af2d [DS-2879] Make it configuarble if reviewers should be notified about tasks returned to the review pool: XmlWorkflow implementation 2015-12-01 12:46:45 +01:00
Kevin Van de Velde
6a8e48d289 Merge pull request #1161 from tuub/DS-2879
DS-2879: Adds configuration to suppress notifications on returned tasks.
2015-12-01 12:44:09 +01:00
Kevin Van de Velde
6fb45e5ca2 Merge pull request #1165 from tuub/DS-2885
DS-2885: Making sort option for metadata browse indexes configurable
2015-12-01 12:15:01 +01:00
Andrea Schweer
bcca15f05a Release connection in Sherpa service 2015-12-01 11:18:05 +13:00
Andrea Schweer
5d5105a273 Logging improvements Sherpa service
- add debug logging for timeouts
- log execptions as WARN not ERROR since work will actually continue
2015-12-01 11:18:05 +13:00
Andrea Schweer
994133ab2e [DS-2925] More intuitive use of sleepBetweenTimeouts setting 2015-12-01 11:18:05 +13:00
Andrea Schweer
ed598a5954 [DS-2925] Actually use timeout settings in Sherpa service 2015-12-01 11:15:17 +13:00
Tim Van den Langenbergh
b083f14c6d DS-2893
Quick fix for printing URLs.
2015-11-30 16:45:02 +01:00
Tim Donohue
50b8cfd77e Merge pull request #1180 from KevinVdV/DS-2907-fix-static-init-spider-flyway
[DS-2907] Fix incorrect lazy initialization and update of static field in SpiderDetector & flyway
2015-11-30 09:27:48 -06:00
helix84
f491398b26 Merge pull request #1179 from KevinVdV/DS-2906-remove-duplicate-null-check
[DS-2906] Remove duplicate null check
2015-11-30 10:30:01 +01:00
helix84
ed0a4429e9 Merge pull request #1185 from KevinVdV/DS-2911-fix-unused-variables
[DS-2911] Inspect and fix unused variables
2015-11-30 10:27:15 +01:00
helix84
6423016ea4 Merge pull request #1183 from KevinVdV/DS-2910-sherpa-timeout-fix
[DS-2910] SherpaService timeout variable has no default value
2015-11-30 10:18:42 +01:00
KevinVdV
0d9c319513 [DS-2911] Inspect and fix unused variables: Remove obsolete comment 2015-11-27 16:14:50 +01:00
Pascal-Nicolas Becker
def7525c0f Merge pull request #1196 from tuub/DS-2923
DS-2923: Update DataCite default configuration.
2015-11-27 12:38:13 +01:00
Pascal-Nicolas Becker
15f800d2c8 DS-2923: Update DataCite default configuration. 2015-11-27 12:34:41 +01:00
helix84
716f0dbcd5 Merge pull request #1195 from tuub/DS-2919
DS-2919: Remove unnecessary line of code from RDFizer.
2015-11-27 12:00:55 +01:00
Pascal-Nicolas Becker
e0881974d3 DS-2919: Remove unnecessary line of code from RDFizer. 2015-11-27 11:55:14 +01:00
helix84
e13ff5ef11 Merge pull request #1193 from mwoodiupui/DS-2921
[DS-2921] Item registration ignores bundles
2015-11-26 23:14:24 +01:00
Mark H. Wood
af20ba5c94 Merge pull request #1186 from KevinVdV/DS-2912-fix-sub-daily
[DS-2912] Sub daily script is broken
2015-11-25 15:17:26 -05:00
Mark H. Wood
bab6e4e6f0 [DS-2921] Register the bitstream in a specific bundle.
Also defend against blank-but-not-null bundle name.
Also the usual diamond cleanups.
2015-11-25 14:50:11 -05:00
Mark H. Wood
d005d68330 Merge pull request #1164 from mwoodiupui/DS-2883
[DS-2883] Resurrect TabFileUsageEventListener
2015-11-24 15:51:24 -05:00
Mark H. Wood
30244c0517 [DS-2883] Correct Spring config, more documentation, lazy init. 2015-11-24 14:37:17 -05:00
Jonas Van Goolen
7a4f095c3a DS-2916 BitstreamDAOImpl contains incorrect database linking
The implementation to find by Collection/Community/Item contains relations that don't exists between the database tables
2015-11-24 16:47:46 +01:00
helix84
d47a1a8d47 Merge pull request #1190 from DylanMeeus/master
Typo fix
2015-11-24 14:49:45 +01:00
KevinVdV
ed41bc17fb [DS-2905] Fix format bugs with the EPerson CLI scripts & UUIDs 2015-11-24 13:03:33 +01:00
dylan
8a09e6b723 Typo fix 2015-11-24 11:07:18 +01:00
Mark H. Wood
335f8dc931 Document the org.dspace.usage package. 2015-11-23 15:02:10 -05:00
Mark H. Wood
acdb1ae63b [DS-2763] Clean up JSPUI while I'm at it 2015-11-23 12:20:12 -05:00
Mark H. Wood
5033b69c5c [DS-2763] Clean up some other artifacts while I'm at it 2015-11-23 12:20:12 -05:00
Mark H. Wood
ac181bb31d [DS-2763] Latest version of FindBugs plugin 2015-11-23 12:17:49 -05:00
Mark H. Wood
03b807af0b [DS-2763] More serialization 2015-11-23 12:17:49 -05:00
Mark H. Wood
e7060bdc2d [DS-2763] More serialization 2015-11-23 12:17:48 -05:00
Mark H. Wood
3b123a05e0 [DS-2763] Continue cleaning up serialization bugs found by Findbugs 2015-11-23 12:17:48 -05:00
Mark H. Wood
e61352ef29 Clean up warnings, suggestions, and an unthrown and incorrect Throwable. 2015-11-23 12:17:48 -05:00
Mark H. Wood
6d2e3b3ea3 [DS-2763] Add much transience to make DSOs actually serializable 2015-11-23 12:13:36 -05:00
Mark H. Wood
ebf09a0d2e Merge pull request #1182 from KevinVdV/DS-2909-fix-eperson-netid-setter
[DS-2909] Fix EPerson netId setter
2015-11-23 11:57:15 -05:00
Mark H. Wood
2190bafeb2 Merge pull request #1181 from KevinVdV/DS-2908-exception-not-thrown
[DS-2908] Exception is created but not thrown in the CollectionServiceImpl
2015-11-23 11:55:19 -05:00
Hardy Pottinger
9d747c7c08 Merge pull request #1177 from KevinVdV/DS-2903-fix-nullpointers-from-findbugs
[DS-2903] Fix potential Nullpointer exceptions indicated by FindBugs
2015-11-23 11:38:36 -05:00
Mark H. Wood
21f8053a1f Merge pull request #1184 from KevinVdV/DS-2901-fix-broken-equals-methods-itemimport
[DS-2901] Fix broken equals methods found by FindBugs
2015-11-23 11:31:23 -05:00
KevinVdV
017ef54cc3 [DS-2914] Community filiator script fix 2015-11-23 12:42:53 +01:00
KevinVdV
332dc58331 [DS-2913] Fix community parent logging infinite loop 2015-11-23 12:33:08 +01:00
Mark H. Wood
9d481c2657 [DS-2883] more/better documentation, synchronize date formatting and I/O, tighten code, modernize configuration. 2015-11-20 10:44:42 -05:00
KevinVdV
b945f7214b [DS-2912] Sub daily script is broken 2015-11-20 16:21:44 +01:00
KevinVdV
3c8837ec78 [DS-2911] Inspect and fix unused variables 2015-11-20 13:21:46 +01:00
KevinVdV
d4af8cd56c [DS-2901] Fix broken equals methods found by FindBugs 2015-11-20 12:41:20 +01:00
KevinVdV
d30696dfbc [DS-2910] SherpaService timeout variable has no default value 2015-11-20 12:39:09 +01:00
KevinVdV
94c60a6224 [DS-2909] Fix EPerson netId setter 2015-11-20 12:34:36 +01:00
KevinVdV
c4e29eff7e [DS-2908] Exception is created but not thrown in the CollectionServiceImpl 2015-11-20 12:30:25 +01:00
KevinVdV
b2f275c794 [DS-2907] Fix incorrect lazy initialization and update of static field in SpiderDetector & flyway 2015-11-20 12:25:24 +01:00
KevinVdV
c9958b4ecc [DS-2906] Remove duplicate null check 2015-11-20 12:18:19 +01:00
KevinVdV
1504f166f4 [DS-2905] Fix format bugs with the EPerson CLI scripts & UUIDs 2015-11-20 11:09:03 +01:00
KevinVdV
01c98d508f [DS-2903] Fix potential Nullpointer exceptions indicated by FindBugs 2015-11-20 10:03:13 +01:00
Tim Donohue
440c26c861 Merge pull request #1175 from KevinVdV/DS-2901-fix-broken-equals-methods
[DS-2901] Fix broken equals methods found by FindBugs
2015-11-19 08:35:20 -06:00
Tim Donohue
171c64c858 Merge pull request #1176 from KevinVdV/DS-2902-duplicate-variable-declaration-fix
[DS-2902] Remove duplicate variable declaration when inheriting from an abstract class
2015-11-19 08:25:13 -06:00
KevinVdV
221ebeea81 [DS-2902] Remove duplicate variable declaration when inheriting from an abstract class 2015-11-19 14:30:25 +01:00
KevinVdV
dd8d0f1014 [DS-2901] Fix broken equals methods found by FindBugs 2015-11-19 12:44:00 +01:00
KevinVdV
8397fd35ef [DS-2900] Java date format usage as static variable is not thread safe 2015-11-19 12:29:58 +01:00
helix84
64d11d5664 Merge pull request #1128 from KevinVdV/DS-2818-metadata-for-all-migration-hibernate
[DS-2818] Fix upgrading from before DSpace 5
2015-11-16 18:18:57 +01:00
Pascal-Nicolas Becker
ea405aa4e5 Merge pull request #1169 from tuub/DS-2890
DS-2890: Prevent NPE in Util.getUUIDParameter(....).
2015-11-13 19:01:20 +01:00
Pascal-Nicolas Becker
0961246c81 DS-2890: Prevent NPE in Util.getUUIDParameter(....). 2015-11-13 18:47:19 +01:00
Tim Donohue
a35e2a34d9 Merge pull request #1168 from tdonohue/DS-2889
DS-2889: Fix AuthorizeException by getting a reference to logo prior to nullifying
2015-11-13 10:51:34 -06:00
Tim Donohue
133a30de4a Merge pull request #1167 from tdonohue/DS-2882
DS-2882: Fix ConcurrentModificationException
2015-11-13 10:46:23 -06:00
Tim Donohue
daf26a1137 DS-2889: Fix AuthorizeException by getting a reference to logo prior to nullifying 2015-11-13 16:38:38 +00:00
Tim Donohue
f6cc4797dd DS-2882: Fix ConcurrentModificationException 2015-11-13 16:30:10 +00:00
Marsa Haoua
9e80cbb16c JSPUI: Add language tags to submission edit metadata step.
This PR adds the posibility to define in input-forms.xml that language
tags should be added to selected metadata fields. This possibility is
limited to fields of the following input types: onebox, twobox and
textarea.
2015-11-13 16:04:36 +01:00
Pascal-Nicolas Becker
5b143b432b DS-2886: Making sort option for metadata browse indexes configurable 2015-11-13 12:50:16 +01:00
Mark H. Wood
165a4b9f3d [DS-2883] Resurrect TabFileUsageEventListener 2015-11-12 16:38:16 -05:00
Pascal-Nicolas Becker
90a075402a DS-2879: Adds configuration to suppress notifications on returned tasks. 2015-11-12 17:23:50 +01:00
Ivan Masár
2185d394f8 DS-2874 make XSD enforce missing Description element 2015-11-11 17:46:57 +01:00
Ivan Masár
87596fe296 typo fixes 2015-11-10 12:36:17 +01:00
Mark H. Wood
1c05b10a22 Merge pull request #1156 from cwilper/drop-unnecessary-repositories
DS-2872 Speed up builds; drop unnecessary repos
2015-11-09 11:25:09 -05:00
Chris Wilper
f882c980d4 DS-2872 Speed up builds; drop unnecessary repos 2015-11-06 13:17:31 -05:00
Peter Dietz
d36edc77d9 Merge pull request #1114 from arnodb/rest-dto-sanity
DS-2829 Add the logo setter to the Community DTO
2015-11-06 11:32:50 -05:00
Hardy Pottinger
dd66d81f32 Merge pull request #1117 from atmire/DS-2637-configurable-pagination-for-discovery
DS-2637 configurable pagination for discovery
2015-11-06 11:10:53 -05:00
Tim Donohue
6c695759d5 Merge pull request #1155 from tdonohue/DS-2869-master
DS-2869 : Refactor SolrServiceImpl to always specify a list of fields for Solr to return (master branch)
2015-11-06 10:10:38 -06:00
Mark H. Wood
f90f5b475f Merge pull request #1152 from helix84/DS-2871-mirage-chrome-warnings-1
DS-2871 fix viewport meta tag
2015-11-06 10:59:10 -05:00
Tim Donohue
c9f5ccbe42 DS-2869: Ensure all Solr queries specify fields to return. Refactor slightly to use global constants for objId fields. Add comments to DiscoverQuery.
Conflicts:
	dspace-api/src/main/java/org/dspace/discovery/SolrServiceImpl.java
2015-11-06 15:46:37 +00:00
Tim Donohue
eeed870fb2 Remove odd characters from search schema config 2015-11-06 15:32:00 +00:00
helix84
cc8a8e6c31 Merge pull request #1153 from helix84/DS-2871-mirage-chrome-warnings-3
DS-2871 mobile theme: correct order of imports
2015-11-06 12:15:15 +01:00
Ivan Masár
b9c3eac86a DS-2871 remove Modernizer from Mirage; it's unused 2015-11-06 12:05:34 +01:00
Ivan Masár
b7b5d17094 DS-2871 mobile theme: correct order of imports 2015-11-06 11:55:53 +01:00
Ivan Masár
5a04601251 DS-2871 fix viewport meta tag 2015-11-06 11:45:41 +01:00
Peter Dietz
50e4694a01 Merge pull request #1133 from Georgetown-University-Libraries/ds-2827
DS-2827: Fix parent/sub community mapping
2015-11-05 14:08:17 -05:00
Tim Donohue
581022b71e Merge pull request #1050 from cwilper/DS-1207-ResourceNotFound-on-Redirect
DS-1207: Stop throwing ResourceNotFoundException for redirects
2015-11-05 11:34:06 -06:00
aleksanderkotbury
47f1bdb517 [DS-2377] remove legacy ID 2015-11-05 17:19:08 +01:00
aleksanderkotbury
40f4499a4d Merge branch 'master' into DS-2784-jersey2 2015-11-05 17:04:44 +01:00
Peter Dietz
1a3484dc8b fix /{collection_id}/items to properly process offset parameter 2015-11-04 13:55:00 -05:00
Tim Donohue
735ccc527d Merge pull request #1107 from aschweer/DS-2699-improve-search
DS-2699 Only escape colon-space, not other characters
2015-11-04 12:28:28 -06:00
Tim Donohue
791e6899ca Merge pull request #1014 from DSpace/revert-451-DS-1821-bitstream-access-icon-i18n
Revert "DS-1821 Internationalize the bitstream access icon alt text"
2015-11-04 10:42:08 -06:00
Tim Donohue
c98019d0f1 DS-2737: Escape message keys which are passed in as url params 2015-11-04 17:26:33 +01:00
Tim Donohue
2518e0a762 DS-2736: Ensure all string parameters are escaped in results
Conflicts:
	dspace-jspui/src/main/webapp/search/discovery.jsp
2015-11-04 17:26:33 +01:00
Peter Dietz
9a4a1f6e43 Merge pull request #1134 from arnodb/DS-2831-database-connections-cleanup-master
DS-2831 connections cleanup, context reuse (master)
2015-11-04 11:14:47 -05:00
Peter Dietz
a8f860714c Merge pull request #1150 from arnodb/DS-2830-rest-authentication-safety-master
DS-2830 (Master) add proper synchronization in TokenHolder
2015-11-04 11:13:36 -05:00
Tim Donohue
108093d8f9 DS-2542: Fix bug for day granularity (from zuki's PR#912) 2015-11-04 16:10:03 +00:00
Pascal-Nicolas Becker
f23d5ba386 Merge pull request #1148 from tuub/DS-2867
DS-2867: Obvious fix for JSPUI edit item form
2015-11-04 14:36:55 +01:00
Pascal-Nicolas Becker
8c0bf38a1d DS-2867: Obvious fix for JSPUI edit item form 2015-11-04 14:10:00 +01:00
Tim Donohue
6c437da418 Merge pull request #1141 from aschweer/DS-2858-oai-remove-workaround
[DS-2858] Revert "DS-2424 workaround for bug in xoai library. changed…
2015-11-02 15:00:48 -06:00
Tim Donohue
f2b410ba0d Merge pull request #1142 from aschweer/DS-2865-upgrade-xoai
[DS-2865] Upgrade xoai dependency version & groupId
2015-11-02 14:24:44 -06:00
helix84
d1b836a80b Merge pull request #1144 from DylanMeeus/master
Fixed some spelling mistakes
2015-11-02 16:19:17 +01:00
dylan
fd22feada1 Fixed some spelling mistakes. 2015-11-02 15:58:53 +01:00
helix84
bef005bdfc Merge pull request #1143 from DylanMeeus/master
Fixed a typo
2015-11-02 14:36:54 +01:00
dylan
8aac1cee24 Fixed a typo 2015-11-02 12:25:36 +01:00
Andrea Schweer
e87bda47e8 [DS-2858] Revert "DS-2424 workaround for bug in xoai library. changed ref to red for Filter in Contexts"
This reverts commit 16b45601f1.

The workaround is no longer needed with xoai 3.2.10.x, where the parsing bug is no longer present.
2015-11-02 22:55:45 +13:00
Andrea Schweer
a819b6c071 [DS-2865] Upgrade xoai dependency version & groupId 2015-11-02 22:55:07 +13:00
Andrea Schweer
ade2f08ed2 Merge pull request #1049 from pmarrone/DS-2744-oai-base-url
[Ds-2744] Accept the dspace.oai.url as baseUrl for Dspace OAI
2015-11-02 22:28:15 +13:00
Pascal-Nicolas Becker
f9732c7546 Merge pull request #1139 from tuub/DS-2860
DS-2860: Fix startup of DataCiteConnector.
2015-10-30 17:42:13 +01:00
Pascal-Nicolas Becker
21d9f36ade DS-2860: Fix startup of DataCiteConnector. 2015-10-30 17:14:06 +01:00
KevinVdV
0c05f41868 [DS-2818] Fix upgrading from before DSpace 5: Fix license headers & rename files 2015-10-30 15:59:46 +01:00
KevinVdV
3e729eeb0b [DS-2818] Fix upgrading from before DSpace 5 2015-10-30 15:54:57 +01:00
Tim Donohue
693ec24c5e Merge pull request #1136 from tdonohue/DS-2856
DS-2856 : Stop autowiring statistics services. Instead only load them on demand (by name).
2015-10-30 08:48:27 -05:00
Pascal-Nicolas Becker
1bdd3e19f3 Merge pull request #1137 from tdonohue/DS-2857
DS-2857 : Update all Codehaus plugins to latest version in Maven central
2015-10-30 14:40:52 +01:00
Pascal-Nicolas Becker
3460276b7e DS-2833: Fixing a log message in case a request Parameter is null. 2015-10-30 12:45:40 +01:00
Tim Donohue
62531bd955 DS-2857 Update all Codehaus plugins to latest version in Maven central 2015-10-29 21:34:40 +00:00
Tim Donohue
304d7d3480 DS-2856 Stop autowiring statistics services. Instead only load them on demand (by name). 2015-10-29 16:19:07 -05:00
Pascal-Nicolas Becker
387ee1c1af Merge pull request #1135 from tuub/DS-2855
DS-2855: Remove unnecessary SOLR query during startup of SOLR Logger
2015-10-29 18:57:24 +01:00
Pascal-Nicolas Becker
37376f72a6 DS-2855: Remove unnecessary SOLR query during startup of SOLR Logger 2015-10-29 18:52:45 +01:00
aleksanderkotbury
f578ab406b [DS-2784] redundant annotation deleted 2015-10-29 17:33:00 +01:00
Pascal-Nicolas Becker
15408fae4a Merge pull request #1123 from tuub/DS-2833
DS-2833: UploadWithEmbargoStep didn't parse Bitstream UUID correctly
2015-10-29 15:52:03 +01:00
Arnaud de Bossoreille
f0adf320d0 DS-2830 add proper synchronization in TokenHolder 2015-10-29 14:34:47 +01:00
Pascal-Nicolas Becker
ce2522fbc7 Merge pull request #1089 from KevinVdV/DS-2779-fix-versioning-xmlui
[DS-2779] Fix versioning due to service api
2015-10-29 14:12:12 +01:00
Arnaud de Bossoreille
cb34855f20 DS-2831 connections cleanup, context reuse (master) 2015-10-29 13:51:06 +01:00
Terry Brady
1367485564 Fix parent/sub community mapping 2015-10-28 15:00:36 -07:00
Hardy Pottinger
868120dda4 Merge pull request #1012 from aschweer/DS-2698-browse-cache
DS-2698 Use all result info in browse page cache validity
2015-10-28 14:42:05 -05:00
Kevin Van de Velde
c97d64bd7e Merge pull request #1125 from akotynski/bug/DS-2836
[DS-2836] SolrLoggerUsageEventListener initialization fixed
2015-10-28 16:33:29 +01:00
Tim Donohue
64aabb1bf8 Merge pull request #1059 from wilee53/DS-2754
DS-2757 add left hand variable, 'fileDescription', to catch a value.
2015-10-28 10:31:20 -05:00
Tim Donohue
1b59cd7b3e Merge pull request #1043 from jonas-atmire/DS-2733
DS-2733 Erronous string comparing fix
2015-10-28 10:23:32 -05:00
Tim Donohue
77f696dad2 Merge pull request #1124 from tdonohue/DS-2832
DS-2832: Limit requiresIndexing() query to only returning the LAST_INDEXED_FIELD
2015-10-28 09:41:45 -05:00
Hardy Pottinger
9f17dbf158 Merge pull request #1130 from hardyoyo/DS-2826-use-bootstrap-glyphicon-arrows
[DS-2826] changed arrow characters for navigation to improve legibility,
2015-10-27 17:09:37 -05:00
Hardy Pottinger
904a6141f6 [DS-2826] changed arrow characters for navigation to improve legibility,
increased the navigation size to be .larger
2015-10-26 22:23:51 +00:00
aleksanderkotbury
2d8060f202 [DS-2836] changed the way to get an instance of SolrLoggerService 2015-10-26 16:59:18 +01:00
KevinVdV
e501a9f9ed [DS-2779] Fix versioning due to service api: Fixing supervised item unit test 2015-10-26 12:40:44 +01:00
aleksanderkotbury
88a3780657 Merge branch 'master' into DS-2784-jersey2 2015-10-25 15:33:10 +01:00
aleksanderkotbury
2b9e748493 [DS-2836] SolrLoggerUsageEventListener initialization fixed 2015-10-25 09:18:48 +01:00
Tim Donohue
d8b344be40 Limit requiresIndexing() query to only returning the LAST_INDEXED_FIELD 2015-10-23 21:01:19 +00:00
Pascal-Nicolas Becker
8100c4a606 DS-2833: UploadWithEmbargoStep didn't parse Bitstream UUID correctly 2015-10-23 12:28:11 +02:00
Pascal-Nicolas Becker
36a8fa76e2 DS-2623: Add different file descriptions for multiple files after upload
Resumable.js makes it possible to upload multiple files at once. This PR
adds a description field for every uploaded file so multiple
descriptions can be added if multiple files were uploaded using the
resumable upload in JSPUI.
2015-10-23 12:21:13 +02:00
Arnaud de Bossoreille
093228b3fa Add the logo setter to the Community DTO
That fixes potential deserialization issues.
This is covered by a test on the generated JAXB schema.
2015-10-22 21:48:16 +02:00
Mark H. Wood
432795ed9b Merge pull request #1001 from mwoodiupui/DS-2685
[DS-2685] Restore list item formatting when class='ds-ordered-list'
2015-10-21 13:44:48 -04:00
Tim Donohue
5c61481c3c Merge pull request #1003 from mwoodiupui/DS-2690
[DS-2690] Remove deprecated org.dspace.administer.DCType
2015-10-21 12:36:40 -05:00
Tim Donohue
92b3de56b7 Merge pull request #1096 from hardyoyo/DS-2706
[DS-2706] removed unused example lib folders from the Authority Solr config
2015-10-21 11:39:28 -05:00
Tim Donohue
46c32b167b Merge pull request #1106 from aschweer/DS-2809-change-search-operator
DS-2809 Set default search operator to AND
2015-10-21 11:31:11 -05:00
Tim Donohue
950239d275 Merge pull request #1110 from tuub/DS-2814
DS-2814: Fixes html5 file upload during workflow (if allowed by configuration).
2015-10-21 11:19:16 -05:00
Tim Donohue
f19a45d801 Merge pull request #1113 from tuub/DS-950
DS-950: OAI should respect metadata.hidden... config properties.
2015-10-21 11:16:34 -05:00
Tim Donohue
7542fa52f8 Merge pull request #1119 from KevinVdV/DS-2815-upload-step-bitstream-removal
[DS-2815] Unable to delete bitstream in submission UploadStep
2015-10-21 11:11:55 -05:00
Kevin Van de Velde
4f48e73b79 Merge pull request #5 from tuub/DS-2779-latest-version-notice
Seems logical, merging.
2015-10-20 13:08:33 +02:00
Pascal-Nicolas Becker
dbb1b333eb DS-2779: Fix notice about newer versions in JSPUI. 2015-10-20 12:55:53 +02:00
KevinVdV
5c47bcc2de [DS-2815] Unable to delete bitstream in submission UploadStep 2015-10-20 12:26:52 +02:00
Kevin Van de Velde
4e60beb8cb Merge pull request #4 from tuub/DS-2779
These fixes make sense, merging, thanks for the help @pnbecker.
2015-10-20 12:13:49 +02:00
Pascal-Nicolas Becker
e9f952e316 DS-2779: Fix versioning for JSPUI 2015-10-20 12:08:45 +02:00
Pascal-Nicolas Becker
cb58abb985 DS-2779: Fix config/spring/api/versioning-service.xml. 2015-10-20 12:08:45 +02:00
helix84
81a2ce64d1 Merge pull request #1101 from terrywbrady/ds-2798
Add indexes to expedite migration
2015-10-19 23:32:02 +02:00
Terry Brady
90ce538ed6 Re-add comment 2015-10-19 09:47:47 -07:00
Terry Brady
8679e60c3d Update per recommendation from helix84 2015-10-19 09:35:39 -07:00
Ivan Masár
36091a59d8 [DS-2813] fix due to migration of collection_id to uuid 2015-10-19 13:47:23 +02:00
helix84
9641da5846 Merge pull request #1108 from christian-scheible/DS-2813
[DS-2813] fixed NullPointer in submission lookup if pubmed is down.
2015-10-19 13:47:05 +02:00
Mark H. Wood
6183f97594 [DS-2463] Tidy up some suggestions. 2015-10-18 11:03:55 -04:00
Mark H. Wood
522c6fb696 [DS-2463] Escape pattern characters that are significant in regular expressions. 2015-10-18 11:01:21 -04:00
Mark H. Wood
014128bf2e [DS-2463] Remove stale spider file; don't poll to update it; extract interesting UA patterns. 2015-10-18 08:43:37 -04:00
Hardy Pottinger
423fc8c7df Merge pull request #953 from mwoodiupui/DS-2502
[DS-2502] Correct some dependencies to prevent pulling in servlet-api
2015-10-16 14:22:27 -05:00
Pascal-Nicolas Becker
d96bba5ebd DS-950: OAI should respect metadata.hidden... config properties. 2015-10-16 18:50:37 +02:00
helix84
c2cd31d7c1 Merge pull request #1112 from aschweer/DS-2591-respond-link
[DS-2591] Fix link to respond.min.js
2015-10-16 13:46:55 +02:00
Jonas Van Goolen
523bcdf92b Addition of spacing to fix gear icon sticking to results 2015-10-16 09:12:16 +02:00
helix84
ddbfe124d9 Merge pull request #1111 from aschweer/DS-2592-opensearch-link
[DS-2592] Fix OpenUrl description.xml link
2015-10-16 08:11:20 +02:00
Andrea Schweer
db13cfa0b3 [DS-2591] Fix link to respond.min.js 2015-10-16 11:44:14 +13:00
Andrea Schweer
cc0653c37f [DS-2592] Fix OpenUrl description.xml link 2015-10-16 11:39:04 +13:00
Tim Donohue
8d1abb8b79 Merge pull request #1109 from tdonohue/DS-2791
DS-2791 : Restore accidentally refactored out logic to Packager
2015-10-15 12:03:41 -05:00
Pascal-Nicolas Becker
a013dec552 Fixes html5 file upload during workflow (if allowed by configuration). 2015-10-15 17:58:40 +02:00
Tim Donohue
1bcbc3c2ad Restore accidentally refactored out logic to Packager 2015-10-15 14:49:34 +00:00
Christian Scheible
21df2bd090 [DS-2813] fixed NullPointer in submission lookup if pubmed is down. 2015-10-15 14:58:46 +02:00
Andrea Schweer
949f5bfdef DS-2699 Only escape colon-space, not other characters
Escaping all characters with special meaning in Solr query syntax prevents
users from doing advanced searches, including those with explicit operators
(AND/OR), range queries and NOT-type queries. The colon character quite
commonly occurs in titles of research publications, where it is typically
followed by a space. Unfortunately, it's regarded as a special character by
Solr and would normally need to be escaped when it's just part of a phrase
search (not part of a fielded search). Escaping the colon character _only_ when
it's followed by a space character still allows the user to manually enter
fielded queries (eg -fulltext:[* TO *] to find all items without fulltext). At
the same time, queries where someone pastes in a publication title containing
colon-space still "just work".
2015-10-15 10:11:34 +13:00
Andrea Schweer
53b77e7fde DS-2809 Set default search operator to AND
Setting Solr's default search operator to AND for the Discovery index leads to
search behaviour that's closer to what our users expect -- "do what Google
does". There is a configuration option for the search operator in dspace.cfg.
However, that setting is used only by the legacy DSQuery class for the now
deprecated Lucene-based search.
2015-10-15 09:55:27 +13:00
Christian Scheible
d3f897f456 [DS-2648] changed test for original bundle to match the new dspace api. 2015-10-14 14:24:58 +02:00
KevinVdV
85ca577ddd [Task: DS-2807] Bundle bitstream ordering fix for hibernate 2015-10-14 12:49:02 +02:00
helix84
2da95e543e Merge pull request #1103 from KevinVdV/DS-2778-configure-maxconnections
[DS-2778] Fix max connections configuration
2015-10-14 11:06:13 +02:00
Hardy Pottinger
3aa98651c2 Merge pull request #1095 from hardyoyo/DS-2790-remove-duplicate-log4j-config-for-solr
[DS-2790] removed duplicate log4j config lines for Solr
2015-10-13 09:12:21 -05:00
helix84
6b6f315748 Merge pull request #1097 from tdonohue/DS-2777-fix-oai
DS-2777 : Fix OAI-PMH to work with Service API refactor
2015-10-13 15:46:10 +02:00
KevinVdV
567655a218 [DS-2778] Fix max connections configuration: Fixing unit tests 2015-10-13 15:34:20 +02:00
KevinVdV
ab060b7647 [DS-2778] Fix max connections configuration 2015-10-13 10:50:00 +02:00
Tim Donohue
6b3080f77b Merge pull request #1087 from KevinVdV/DS-2778-datasource-config
[DS-2778] Properly configure BasicDataSource pool
2015-10-12 15:05:52 -05:00
Tim Donohue
a22b73eda2 Ensure Solr schema treats item ids as UUIDs 2015-10-12 19:37:28 +00:00
aleksanderkotbury
60a60e18f9 [DS-2784] dspace header added 2015-10-12 20:34:13 +02:00
Tim Donohue
1e8fa3f063 Fix bug in ItemDAOImpl where null sometimes passed as date. Compare dates as Timestamps 2015-10-12 17:44:11 +00:00
Tim Donohue
1a8ce0a63c Fix Postgres date comparison issues (where it thinks a date is a bytea) by using setDate() instead of setParameter() 2015-10-12 16:50:23 +00:00
Tim Donohue
6c5527f3fb Fix OAI CLI script to load necessary DSpace services via their factories 2015-10-12 16:50:14 +00:00
Tim Donohue
617432c014 Merge pull request #5 from helix84/DS-2777-fix-oai-2
fix "QuerySyntaxException: metadatavalue is not mapped"
2015-10-12 09:53:36 -05:00
Ivan Masár
93599b4432 fix "QuerySyntaxException: metadatavalue is not mapped" 2015-10-12 12:55:15 +02:00
aleksanderkotbury
9b2d5faa8b [DS-2784] dependency fix 2015-10-10 16:31:49 +02:00
aleksanderkotbury
0925f43308 [DS-2784] jersey update to 2.22 2015-10-10 16:24:40 +02:00
aleksanderkotbury
7abdb6dca6 jersey2 2015-10-10 15:31:06 +02:00
Terry Brady
f97b0a8c87 Add indexes for the other 4 legacy id columns 2015-10-09 13:30:12 -07:00
Terry Brady
f39855f7bf Add indexes to expedite migration 2015-10-09 11:31:15 -07:00
Tim Donohue
226b4fe741 Merge pull request #1099 from KevinVdV/DS-2794-increase-spring-failure-logging
[DS-2794] Increase logging if a bean retrieval fails or if the database connection is null
2015-10-09 10:21:22 -05:00
KevinVdV
84b3077366 [DS-2794] Increase logging if a bean retrieval fails or if the database connection is null 2015-10-09 16:13:23 +02:00
KevinVdV
dff26ae021 [DS-2794] Increase logging if a bean retrieval fails or if the database connection is null 2015-10-09 12:36:55 +02:00
Mark H. Wood
9b9109d189 [DS-1837] Fill out the POM a bit more. 2015-10-08 11:18:39 -04:00
Mark H. Wood
b2adb60463 [DS-1837] Oops forgot the new POM. 2015-10-08 11:18:39 -04:00
Mark H. Wood
ad521868d6 [DS-1837] Pull out to a separate artifact 2015-10-08 11:18:39 -04:00
helix84
368c0b58d1 Merge pull request #1098 from helix84/DS-2740-show-publisher-if-present
DS-2740 Conditionally show publisher for sherpa romeo, if present
2015-10-08 09:55:16 +02:00
Peter Dietz
87532c9d3c DS-2740 Conditionally show publisher for sherpa romeo, if present 2015-10-08 09:51:56 +02:00
Tim Donohue
feebea46bc Restore SetRepository classes (accidentally deleted in refactor). Add a new limit/offet option to CommunityService.findAll() 2015-10-07 16:29:08 -05:00
Tim Donohue
05fbfeac7a Don't inject HandleService, use its provided Factory 2015-10-07 16:28:12 -05:00
Tim Donohue
51bef940c9 Ensure OAI initializes DSpace using the same application context as other webapps 2015-10-07 16:27:13 -05:00
Mark H. Wood
4f428e7ae2 Merge pull request #1079 from mwoodiupui/DS-2397
[DS-2397] Sort out Unit vs. Integration tests, and run them separately
2015-10-07 13:45:14 -04:00
Hardy Pottinger
99ff4e5fe1 Merge pull request #1074 from bdewar/master
[DS-2792] Add dc.creator to the output of qdc.xsl
2015-10-07 12:39:49 -05:00
Mark H. Wood
6f997fbf10 [DS-2397] Move DSpaceAIPIntegrationTest to Failsafe. 2015-10-07 13:34:28 -04:00
Ivan Masár
3829e1f5ee fix typos in method signatures 2015-10-07 14:07:18 +02:00
Hardy Pottinger
981aeb1276 [DS-2706] removing configuration for more lib folders in authority solr config (dist and contrib) to match Discovery/search solr config 2015-10-06 19:38:08 +00:00
Hardy Pottinger
f25ac34ea9 [DS-2706] removing more unused lib configurations from authority solr config 2015-10-06 19:23:29 +00:00
Hardy Pottinger
4fd5ca1b4c [DS-2706] removing more unused lib configurations from authority solrconfig 2015-10-06 19:20:32 +00:00
Hardy Pottinger
f9ecd84e1a removed unused example lib folders from the Authority Solr config 2015-10-06 19:04:27 +00:00
Hardy Pottinger
5be4d8edb3 [DS-2790] removed duplicate log4j config lines for Solr 2015-10-06 10:40:52 -05:00
Christian Scheible
2e78ff10af Merge branch 'master' into DS-2648 2015-10-06 16:23:37 +02:00
Christian Scheible
ab878b95a6 [DS-2648] Refactored class name and field names for files available feature to reflect the operating priciple of the feature. 2015-10-06 15:50:55 +02:00
helix84
5b42c09129 Merge pull request #1093 from helix84/DS-2786-enforce-java-version
DS-2786 enforce Java version
2015-10-06 11:46:49 +02:00
Tim Donohue
d51d918d3c Merge pull request #1094 from tdonohue/DS-2366
DS-2366 : Correctly filter web.xml using filteringDeploymentDescriptors
2015-10-05 15:35:07 -05:00
Tim Donohue
fec2affb1e Merge pull request #1088 from KevinVdV/DS-2777-fix-webapps
[DS-2777] Fix startup issues with oai, sword & swordv2
2015-10-05 14:59:39 -05:00
Tim Donohue
c549176ec1 DS-2366 : Correctly filter web.xml using filteringDeploymentDescriptors 2015-10-05 14:44:28 -05:00
Ivan Masár
dc78fc8b35 DS-2786 enforce Java version 2015-10-05 18:29:18 +02:00
keithgilbertson
badc99965a Merge pull request #1092 from alawvt/DS-2783-edit-Discovery-messages
Ds 2783 edit discovery messages
2015-10-05 09:51:01 -04:00
KevinVdV
75b0ce5d29 [DS-2779] Fix versioning due to service api: Additional unit tests 2015-10-05 12:51:17 +02:00
Anne Lawrence
2bcf167c72 add Advanced Search definitions and instructions to overlay this file
add definitions to customize Advanced Search filters and facets
add the location to Maven overlay the file
2015-10-04 14:46:47 -04:00
Anne Lawrence
0666898c98 remove duplicate definitions for filter.author and filter.subject, fix typo
remove duplicate definitions for
<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.author">Author</message> and
<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.subject">Subject</message>
fix typo in line 41 <!--Site Level...
2015-10-04 14:44:29 -04:00
Chris Wilper
f1b48f0016 DS-1207 Stop throwing ResourceNotFoundException for redirects 2015-10-02 23:03:37 -04:00
Tim Donohue
4813565831 Merge pull request #1090 from KevinVdV/DS-2780
[DS-2780] Fix XMLUI advanced policies page
2015-10-02 11:58:32 -05:00
KevinVdV
c7d19a6758 [DS-2780] Fix XMLUI advanced policies page 2015-10-02 12:39:46 +02:00
KevinVdV
038e2c57c5 [DS-2779] Fix versioning due to service api 2015-10-02 12:20:12 +02:00
KevinVdV
ae5c479293 [DS-2777] Fix startup issues with oai, sword & swordv2 2015-10-02 12:09:06 +02:00
KevinVdV
fd9ac839d1 [DS-2778] Properly configure BasicDataSource pool 2015-10-02 12:05:33 +02:00
Tim Donohue
d69f00fe3e Merge pull request #1084 from tdonohue/master
Minor bug fix to fresh_install.
2015-10-01 15:12:11 -05:00
Tim Donohue
a117d1838e Minor bug fix. Ant target ordering is wrong. install_code must be before migrate_database 2015-10-01 20:07:10 +00:00
Mark H. Wood
f1f8669bf4 [DS-2397] Tell Travis to run integration tests 2015-10-01 14:08:16 -04:00
Mark H. Wood
9b6b581d98 [DS-2397] Run 2 integration tests; fix problems uncovered thereby.
This makes Failsafe run conditional on maven.test.skip, ensures that
the test environment is unpacked for that phase, and configures
Failsafe as Surefire is.  Two *Test.java classes were renamed IT*.java
so that Failsafe would run them and Surefire wouldn't.
2015-10-01 13:34:06 -04:00
Mark H. Wood
d4c4966535 [DS-2397] First pass at enabling Failsafe 2015-10-01 13:34:05 -04:00
Tim Donohue
e26b3f04fc Merge pull request #1083 from DSpace/DS-2701-service-api
DS-2701: Merge Service API refactor into "master" for 6.0
2015-10-01 12:20:58 -05:00
Tim Donohue
38adc068de Merge pull request #1077 from Georgetown-University-Libraries/DS-2772
Save collections to community object
2015-09-30 15:23:14 -05:00
Tim Donohue
a6994138b5 Merge pull request #1081 from tdonohue/DS-2701-service-api-flyway-cleanup
DS-2701: Bug fix, cleanup and pgcrypto checking
2015-09-30 15:17:44 -05:00
Tim Donohue
18269107d3 Merge pull request #1082 from KevinVdV/DS-2776-migrate-primitives
[DS-2776] Migrate primitives in sql
2015-09-30 15:12:50 -05:00
Tim Donohue
d45130450b Fix minor comment / error message typos 2015-09-30 08:55:38 -05:00
Tim Donohue
39697a6d5d Minor refactor. Move Postgres specific methods/logic into a PostgresUtils class, to avoid cluttering DatabaseUtils (as much) 2015-09-30 08:48:17 -05:00
KevinVdV
ab363a0ba7 [DS-2776] Migrate primitives in sql 2015-09-30 12:56:56 +02:00
Jonas Van Goolen
b0dd4e854d DS-2637 Retention of offset when changing the rpp
The offset which was obtained before changing the rrp is kept instead of snapping to first page

Based on the jira-ticket + comment
https://jira.duraspace.org/browse/DS-2637#comment-45376
2015-09-30 11:56:03 +02:00
Tim Donohue
0b873f5e62 Permissions checks for 'database clean'. Throw a useful error if clean will fail. If user is a superuser, let clean proceed 2015-09-29 16:05:06 -05:00
Tim Donohue
07cf8cf5b0 Guard against NPE. Don't return null, just return value found 2015-09-29 10:25:44 -05:00
Tim Donohue
0a9aead126 Auto-verify pgcrypto installed and up-to-date. Provide tips/hints via 'database info' command. 2015-09-29 10:07:39 -05:00
Tim Donohue
e73c7b47fe Leave a note in dspace.cfg about where database settings are now found 2015-09-28 15:23:45 -05:00
Tim Donohue
3c45c0d554 Fix 'dspace-installer' assembly build issues, caused by maven-assembly-plugin upgrade 2015-09-28 14:53:15 -05:00
Tim Donohue
1de42c9b21 Remove (again) unnecessary MVCC setting for H2. See PR #582 for info on why we don't need this 2015-09-28 11:19:06 -05:00
Tim Donohue
84f67cd771 Code cleanup and refactoring. Use try-with-resources in DatabaseUtils. Provide an easy way for Unit Tests to kick off Flyway migrations 2015-09-28 10:55:29 -05:00
Tim Donohue
8bdbd99ba3 Merge pull request #1078 from mwoodiupui/DS-2701-service-api
[DS-2701] Fix a timezone problem, and configure the unit in the test,
2015-09-28 10:24:43 -05:00
helix84
77e8c9a77c Merge pull request #1036 from aschweer/ds-1924-fix-current-locale-meta
DS-1924 Include current locale in calculating cache key
2015-09-28 12:48:54 +02:00
Jonas Van Goolen
a665e705d3 DS-2637 Possibility for users to configure the discovery browse page on the fly
Modifications to the following files:
-searchFacetFilter.java
-browse.js
-attribute-handles.xsl
-browse.xsl
,enable the user to change the pagination through the gear icon, as was already the case for other browse pages

The was an improvement based on the following Jira ticket
https://jira.duraspace.org/browse/DS-2637
2015-09-28 09:45:01 +02:00
Mark H. Wood
337f4ce613 [DS-2701] Fix a timezone problem, and configure the unit in the test,
avoiding a lot of mostly un-necessary infrastructure startup.

Also makes the test run much faster.
2015-09-25 14:59:09 -04:00
Tim Donohue
142441d37a Merge pull request #1076 from tdonohue/DS-2701-service-api-unit-tests
DS-2701: Fixes for Unit Tests
2015-09-25 13:03:43 -05:00
Tim Donohue
3c6c708dd3 Fix incorrect assertion in test (found by mhwood). A top-level community has no parents. 2015-09-25 12:12:04 -05:00
Tim Donohue
8704efa078 Fix Travis build command to ALWAYS build 'dspace' module, but to skip the memory intensive assembly 2015-09-25 11:07:54 -05:00
Tim Donohue
496181736a Fix unit testing framework. Upgrade to latest m-assembly-p. Remove custom hibernate spring config and use testEnvironment.properties. 2015-09-25 08:59:20 -05:00
Terry Brady
35783b7b53 Save collections to community object 2015-09-24 13:34:28 -07:00
Tim Donohue
db3de590aa Fix GroupTest.findAllNameSort() logic. It was using a Set which filtered duplicate names and caused a test failure 2015-09-24 10:42:46 -05:00
Tim Donohue
551282e49f Turn off TRACE logging for Hibernate by default. It's useful for debugging, but makes unit test logs MASSIVE 2015-09-24 10:41:58 -05:00
Tim Donohue
b9b231e226 Minor bug fix to WF Migration script for H2. Rename DatabaseUtils.findDbKeyword to getDbType and make public. 2015-09-24 08:50:33 -05:00
Tim Donohue
e6e275c279 Revert DatabaseUtils to using getSchemaName() again. Connection.getSchema() doesn't work for H2. 2015-09-23 16:41:01 -05:00
Tim Donohue
4ea67d5364 Merge pull request #1075 from tdonohue/DS-2701-service-api
Add missing license headers
2015-09-23 15:22:40 -05:00
Tim Donohue
c5e737ce50 Add missing license headers 2015-09-23 15:19:58 -05:00
Brad Dewar
58268445c6 Add dc.creator to qdc.xsl output 2015-09-23 16:42:25 -03:00
Brad Dewar
be6c536da0 Add dc.creator to qdc.xsl output 2015-09-23 16:14:56 -03:00
Tim Donohue
ec556186fc DS-2713: Enhance comment in 5.x migration script
Add details as to why this migration script is skipped in 6.x
2015-09-23 12:20:24 -05:00
Tim Donohue
33844ca2f0 Merge pull request #1048 from KevinVdV/DS-2713-fix-xml-workflow-migration
[DS-2713] Ensure that there can still be an xml workflow migration
2015-09-23 11:32:21 -05:00
Tim Donohue
efbc37a7ef Merge pull request #1068 from KevinVdV/DS-2701-service-api-jspui-admin
DS-2701 : Migrating the admin folder
2015-09-23 11:07:48 -05:00
Tim Donohue
0f3906be74 Merge pull request #1071 from tdonohue/DS-2452-pool2
DS-2452: Upgrade to Commons Pool v2
2015-09-23 10:58:35 -05:00
Tim Donohue
8a3be95fe1 Merge pull request #1070 from tdonohue/DS-2701-service-api-flyway-cleanup
DS-2701 : Flyway Upgrade
2015-09-23 10:52:14 -05:00
Tim Donohue
05d555c987 Merge pull request #1072 from KevinVdV/DS-2701-service-api-jspui-subscriptions
[DS-2701-service-api-jspui-subscriptions] Migrating the subscriptions jsp
2015-09-23 10:49:10 -05:00
Tim Donohue
6dcc765674 Merge pull request #1073 from KevinVdV/DS-2764-CollectionDAOImpl-params-switched
[DS-2764] CollectionDAOImpl - Parameters Switched
2015-09-23 10:47:32 -05:00
Kevin Van de Velde
d841999be3 Merge pull request #1040 from tuub/DS-2701-rdf-cleanup
DS-2701: cleanup or org.dspace.rdf
2015-09-23 12:30:54 +02:00
KevinVdV
07eb4cc019 [DS-2764] CollectionDAOImpl - Parameters Switched 2015-09-23 12:25:56 +02:00
KevinVdV
aa33dd2637 Migrating the admin folder (rebase for removal of BundleBitstream object 2015-09-23 12:21:18 +02:00
KevinVdV
65360a0cb6 Migrating the admin folder 2015-09-23 12:15:33 +02:00
Kevin Van de Velde
50d4df6c85 Merge pull request #1066 from mwoodiupui/DS-2701-service-api
[DS-2701] Repair /register/ and /search/.
2015-09-23 12:12:57 +02:00
KevinVdV
861e253d0c [DS-2701-service-api-jspui-subscriptions] Migrating the subscriptions jsp 2015-09-23 12:07:10 +02:00
Kevin Van de Velde
1582645e6a Merge pull request #1035 from KevinVdV/DS-2728-remove-bundle-bitstream-object
[DS-2728] Remove the BundleBitstream object & replace by JPA mapping
2015-09-23 12:03:20 +02:00
helix84
4018c67e66 Merge pull request #1069 from josekarvalho/patch-1
Update xoai.xml
2015-09-23 09:21:25 +02:00
Tim Donohue
77007a06ce Remove getSchemaName() method in favor of connection.getSchema() in commons dbcp2 2015-09-22 14:49:36 -05:00
Tim Donohue
5ad92a6ca3 Update to Commons Pool 2.4.2 and refactor EventServiceImpl to support it 2015-09-22 14:47:59 -05:00
José Carvalho
8352f6938c Update xoai.xml
Corrected the filter for Driver context and the prefix for OpenAIRE context
2015-09-22 18:31:03 +01:00
Mark H. Wood
5ac282a7f4 [DS-2701] Oops, multivalued request attributes are now List, not Array. 2015-09-22 12:41:08 -04:00
Mark H. Wood
c2b0b361ed [DS-2701] Get Community, Collection names more neatly; fix bad index. 2015-09-22 11:48:21 -04:00
KevinVdV
102f81b8b1 [DS-2713] Ensure that there can still be an xml workflow migration: DatabaseUtils migrate command takes care of migration 2015-09-22 12:33:56 +02:00
KevinVdV
af88d20952 [DS-2713] Ensure that there can still be an xml workflow migration: Oracle migration 2015-09-22 11:41:58 +02:00
KevinVdV
c5eb6b8255 [DS-2713] Ensure that there can still be an xml workflow migration: Support for group name matching with UUID. 2015-09-22 11:41:58 +02:00
KevinVdV
96bd0cc292 [DS-2713] Ensure that there can still be an xml workflow migration 2015-09-22 11:41:57 +02:00
KevinVdV
b4a495a484 [DS-2713] Ensure that there can still be an xml workflow migration 2015-09-22 11:41:57 +02:00
Tim Donohue
b999922312 Replace deprecated Flyway methods with new versions. Update comments in a few Flyway related classes. 2015-09-21 14:35:25 -05:00
Tim Donohue
3de01cee4f Add comment noting where database connection configs now reside 2015-09-21 12:32:28 -05:00
Tim Donohue
ffe6673116 Upgrade Flyway to latest version 2015-09-21 12:31:55 -05:00
Tim Donohue
130ecb9a75 Merge pull request #1067 from KevinVdV/DS-2758-database-cli-command
DS-2758 database cli command
2015-09-21 11:44:54 -05:00
KevinVdV
eeb58a8844 [DS-2758] Updating dbcp to dbcp2, upgraded the postgres driver to the latest version & fixed the database migration for unit tests. 2015-09-21 12:01:48 +02:00
KevinVdV
3918bac64b [DS-2758] Fixing the database setup so that migration depends on the DatabaseUtils commands. Migration will no longer occur on kernel init. 2015-09-21 12:01:48 +02:00
Mark H. Wood
835fef63e7 [DS-2701] Repair /search/, misc. fixes. 2015-09-18 16:10:09 -04:00
Mark H. Wood
856a9fddb8 [DS-2701] Repair /register/, fix misc. whitespace and stray tags. 2015-09-18 11:04:23 -04:00
Peter Dietz
6a945ea27b Merge pull request #1064 from KevinVdV/DS-2701-service-api-fix-legacy-id-support
[DS-2701-service-api-fix-legacy-id-support] Fix legacy identifier support for the community & removed some obsolete "getLegacyID()" methods
2015-09-18 10:32:22 -04:00
KevinVdV
97d1a425bb [DS-2728] Remove the BundleBitstream object & replace by JPA mapping: Fixing recently merged tools jsp 2015-09-18 16:25:32 +02:00
KevinVdV
10ebd3a653 [DS-2728] Remove the BundleBitstream object & replace by JPA mapping: Rebase for the REST & fixing a couple JSP issues 2015-09-18 16:23:34 +02:00
KevinVdV
6947c86ea2 [DS-2728] Remove the BundleBitstream object & replace by JPA mapping: Rebase for the JSPUI 2015-09-18 16:23:33 +02:00
KevinVdV
4d83b136e1 [DS-2728] Remove the BundleBitstream object & replace by JPA mapping: Rebase for the XOAI 2015-09-18 16:23:33 +02:00
KevinVdV
8b00170164 [DS-2728] Remove the BundleBitstream object & replace by JPA mapping: Revert unwanted xml_workflow_migration change 2015-09-18 16:23:33 +02:00
KevinVdV
ae19c42a7b [DS-2728] Remove the BundleBitstream object & replace by JPA mapping 2015-09-18 16:23:33 +02:00
Tim Donohue
f1060aac7b Merge pull request #1058 from KevinVdV/DS-2701-service-api-jspui-tools
[DS-2701-service-api-jspui-tools] Migrating the tools folder
2015-09-18 09:21:47 -05:00
Kevin Van de Velde
779f8f768e Merge pull request #1061 from mwoodiupui/DS-2701-service-api
[DS-2701] Correct login JSPs.
2015-09-18 14:55:36 +02:00
Kevin Van de Velde
77ba00fd9f Merge pull request #1065 from KevinVdV/DS-2701-rest-api-fixes
[DS-2701-rest-api-fixes] Small bugfixes for rest api
2015-09-18 12:29:56 +02:00
KevinVdV
8c0062354e [DS-2701-rest-api-fixes] Small bugfixes concerning comparing of objects, missing update call & ConcurrentModificationException 2015-09-18 12:28:09 +02:00
Kevin Van de Velde
79f882da11 Merge pull request #1026 from LongsightGroup/DS-2701-rest
[DS-2701] REST API
Merging, still a few issues remaining but I will create a separate pull request for these.
2015-09-18 12:21:39 +02:00
KevinVdV
0e33f71403 [DS-2701-service-api-fix-legacy-id-support] Fix legacy identifier support for the community & removed some obsolete "getLegacyID()" methods 2015-09-18 12:05:35 +02:00
Kevin Van de Velde
562b1defc8 Merge pull request #1060 from tdonohue/DS-2701-service-api-cleanup
DS-2701: Fix license headers and DB migration naming convention
2015-09-18 08:45:05 +02:00
Peter Dietz
0cc6ca8c99 Delete in loops to use iterator to avoid ConcurrentModification 2015-09-18 00:29:20 -04:00
Peter Dietz
f64026ca54 Compare object by ID 2015-09-18 00:28:28 -04:00
Peter Dietz
888921d68a Add back service.update after altering object to fire events 2015-09-18 00:27:01 -04:00
Peter Dietz
dc4b91effd Change REST ID's to string, we can look them up with findByIdOrLegacyId 2015-09-18 00:25:13 -04:00
Mark H. Wood
0e715acd80 [DS-2701] Correct login JSPs. 2015-09-17 16:25:49 -04:00
Tim Donohue
c0feeccac1 Ensure consistent naming convention for DB migration scripts. Add one missing license header 2015-09-17 15:07:22 -05:00
Tim Donohue
50663a5c2c Fix license headers for all SWORD (v1 and v2) classes 2015-09-17 15:06:55 -05:00
bill
3c77e33882 add left hand variable, 'fileDescription', to catch a value. 2015-09-17 10:20:22 -05:00
KevinVdV
521a482859 [DS-2701-service-api-jspui-tools] Migrating the tools folder 2015-09-17 12:37:57 +02:00
Peter Dietz
140fad8051 REST DSO ID is legacy int, UUID is named uuid 2015-09-16 13:55:21 -04:00
Peter Dietz
310a1649a9 Change token holder double hashmap to a Guava BiMap
- Can't hold an eperson in the set, since hibernate is lazy
2015-09-16 13:54:36 -04:00
Tim Donohue
322d25f3c7 Merge pull request #1057 from KevinVdV/DS-2701-service-api-jspui-search-browse
[DS-2701-service-api-jspui-search-browse] Migrating the search & brow…
2015-09-14 10:51:25 -05:00
Tim Donohue
877cd18ac0 Merge pull request #1055 from KevinVdV/DS-2701-service-api-jspui-submission
[DS-2701-service-api-jspui-submission] Submission jsp migration to service api
2015-09-14 10:50:21 -05:00
KevinVdV
a2a5f00251 [DS-2701-service-api-jspui-search-browse] Migrating the search & browse pages 2015-09-14 12:31:08 +02:00
KevinVdV
944f69e9e6 [DS-2701-service-api-jspui-submission] Submission jsp migration to service api (Additional jsp migration for worfklow + display of items, collections) 2015-09-14 12:21:17 +02:00
KevinVdV
f318254999 [DS-2701-service-api-jspui-submission] Submission jsp migration to service api 2015-09-14 08:49:38 +02:00
Tim Donohue
cc8be504ba Merge pull request #1053 from KevinVdV/DS-2701-service-api-fixes
[DS-2701-service-api] Initial bugfixing for the JSPUI
2015-09-11 14:52:11 -05:00
Peter Dietz
9573bb4529 Remaining refactor of REST API methods to use DSpace Services
REST compiles now. However, DSpace still doesn't boot, so its hard to verify
2015-09-11 15:42:50 -04:00
Peter Dietz
59652bf407 partial refactor of DSpace-REST to use DSpace-Services refactor
Breaking changes include some integer ID is now UUID ID.
2015-09-11 15:42:50 -04:00
Peter Dietz
d0e628178e Add itemService.countItems(Context, Community)
A convenience method to get community item count
2015-09-11 15:42:50 -04:00
KevinVdV
844138c0f5 [DS-2701-service-api] Initial bugfixing for the JSPUI 2015-09-11 13:01:18 +02:00
Kevin Van de Velde
db38e9a305 Merge pull request #1051 from abollini/DS-2701-service-api
I check the code & it is looking good, found a few small issues, but I will create a pull request to resolve these after I have merged it into our feature branch.

Thanks for the hard work @abollini
2015-09-11 12:45:24 +02:00
Andrea Bollini
9e4c9f3cf2 DS-2701 fix several jsp mydspace, community (list,view,edit), browse (no
results)
2015-09-11 00:52:16 +02:00
Andrea Bollini
d43f95af45 DS-2701 fix home page jsp 2015-09-10 23:53:05 +02:00
Andrea Bollini
6d932a71c3 fix sql error during initialization on postgres 8.4 2015-09-10 23:34:54 +02:00
a.bollini
9dad8d6a65 DS-2701 refactoring JSPUI custom tag library 2015-09-10 23:34:53 +02:00
Andrea Bollini
149501f396 DS-2701 completed refactoring of servlet/ submission business layer 2015-09-10 23:34:52 +02:00
Andrea Bollini
9817028ad0 DS-2701 refactored jspui request item
introduced authorize methods for check permission on generic users, as
for example anonymous (eperson = null)
2015-09-10 23:34:49 +02:00
Andrea Bollini
6693f284d3 DS-2701 JSPUI: initial refactoring
still missing JSP, tag library, submission controller/servelet and
administrative servlets
2015-09-10 23:34:49 +02:00
Patricio Marrone
9e1f527680 [DS-2744] Revert to default behaviour
This patch comments out the configuration line, so the current
behaviour is kept (i.e. the baseUrl is calculated from the request).

A convenient comment is added to the config/modules/oai.cfg file
explaining this.

Expected results:
- After an install, the line defining dspace.oai.url is commented out.
  The user is able to explicitly configure it as needed.
2015-09-10 14:59:41 -03:00
Patricio Marrone
db556d1d7a [DS-2744] Accept dspace.oai.url configuration paramenter as the oai baseUrl
This patch reintroduces the dspace.oai.url parameter to the configuration
file that was not being honored by the DSpaceRepositoryConfiguration class
when XOAI got introduced. The configuration parameter is still documented [1]

Now the DSpaceRepositoryConfiguration class fetches this parameter, and falls back
to the previous behavior when the dspace.oai.url parameter, with a
warning.

[1] https://wiki.duraspace.org/display/DSDOC6x/Configuration+Reference
2015-09-10 14:59:25 -03:00
Peter Dietz
8326e64e7b Merge pull request #1029 from KevinVdV/DS-2714-oracle-migration
[DS-2714] Oracle migration script for the service based api
2015-09-02 16:21:02 -04:00
Peter Dietz
986e3209ef Merge pull request #1037 from KevinVdV/DS-2729-siteservice-extends-dspaceobjectservice
[DS-2729] Ensure SiteService extends DSpaceObjectService
2015-09-02 16:15:31 -04:00
Jonas Van Goolen
4bea9b97df DS-2733 Erronous string comparing fix 2015-09-01 14:43:40 +02:00
Kevin Van de Velde
e7d1f75b39 Merge pull request #1024 from mwoodiupui/DS-2701-oai-main
[DS-2701] dspace-oai
2015-08-31 12:34:41 +02:00
Mark H. Wood
5d0fa8bc3d [DS-2701] oai remove even more database support. 2015-08-28 15:25:16 -04:00
Mark H. Wood
dd20b6a41a [DS-2701] oai remove many buildDatabaseQuery methods. 2015-08-28 15:07:21 -04:00
Pascal-Nicolas Becker
c3109e3be3 DS-2701: small cleanup for org.dspace.rdf. 2015-08-28 18:57:42 +02:00
KevinVdV
74e14c570f [DS-2729] Ensure SiteService extends DSpaceObjectService 2015-08-28 14:07:09 +02:00
KevinVdV
2467f43ec7 [DS-2729] Ensure SiteService extends DSpaceObjectService 2015-08-28 12:55:44 +02:00
Andrea Schweer
da606a711d DS-1924 Include current locale in calculating cache key
This ensures that the value of the 'current locale' page meta element reflects locale switches made by the user.
2015-08-28 22:31:37 +12:00
Pascal-Nicolas Becker
fbca4716a4 Merge pull request #1034 from tuub/DS-2701-rdf
DS-2701 dspace-rdf
2015-08-27 12:13:58 +02:00
Kevin Van de Velde
724eacf99d Merge pull request #1025 from aschweer/DS-2701-sword
DS-2701 Sword v1 and v2
2015-08-27 10:32:49 +02:00
Andrea Schweer
362cd97311 DS-2701 Use generic workflow/workflow item services 2015-08-27 09:51:28 +12:00
Andrea Schweer
eb63f024f0 DS-2701 Reformat code according to DSpace code conventions 2015-08-27 09:51:28 +12:00
Andrea Schweer
09270f922f DS-2701 Avoid ConcurrentModificationExceptions 2015-08-27 09:51:28 +12:00
Andrea Schweer
f893c7cfc0 DS-2701 Service API refactor: SWORDv2 module compiles 2015-08-27 09:51:27 +12:00
Andrea Schweer
caf6cdf2c1 DS-2701 Service API refactor: SWORD module compiles 2015-08-27 09:51:27 +12:00
Mark H. Wood
57eae53889 [DS-2701] correct a couple of queries 2015-08-26 14:32:52 -04:00
Pascal-Nicolas Becker
be0f9aa1ec Refactor dspace-rdf to integrate into DS-2701 (service API). 2015-08-26 20:13:42 +02:00
Tim Donohue
f413d462ca Merge pull request #1031 from KevinVdV/DS-2723-delete-collection-review-group
[DS-2723] Delete collection broken if a review group is attached in basic workflow
2015-08-26 11:11:34 -05:00
Tim Donohue
5aca3bb2e1 Merge pull request #1032 from KevinVdV/DS-2724-items-workflow-view
[DS-2724] Items in workflow view broken for basic workflow
2015-08-26 10:54:13 -05:00
Tim Donohue
4af126a794 Merge pull request #1033 from KevinVdV/DS-2725-workflow-review-assignment-broken
[DS-2725] Workflow review assignment broken
2015-08-26 10:53:39 -05:00
Tim Donohue
e3b65b9bce Merge pull request #1030 from KevinVdV/DS-2722-xmlui-login-as
[DS-2722] Login as broken on XMLUI
2015-08-26 08:58:56 -05:00
KevinVdV
7137dc644b [DS-2725] Workflow review assignment broken 2015-08-26 13:38:02 +02:00
KevinVdV
7071a80f54 [DS-2724] Items in workflow view broken for basic workflow 2015-08-26 13:16:12 +02:00
KevinVdV
c3db8d632d [DS-2723] Delete collection broken if a review group is attached in basic workflow 2015-08-26 13:07:01 +02:00
KevinVdV
d599bce0cb [DS-2722] Login as broken on XMLUI 2015-08-26 13:01:21 +02:00
Mark H. Wood
05effea7ed Merge branch 'DS-2701-service-api' of github.com:mwoodiupui/DSpace into DS-2701-oai-main 2015-08-25 14:48:47 -04:00
Mark H. Wood
bba5c5cc33 [DS-2701] oai Drop unused classes with DB code in them 2015-08-25 14:44:26 -04:00
Mark H. Wood
aca32d76ee [DS-2701] oai Rip out DB-based search, move general classes out of un-needed .database packages. 2015-08-25 13:41:02 -04:00
Mark H. Wood
b870a25dc6 [DS-2701] Documentation, clean out more old DB code 2015-08-25 10:13:28 -04:00
Mark H. Wood
b5da81f9cb [DS-2701] Documentation, change new horribleLongMethodName to another findAll variant. 2015-08-25 10:10:58 -04:00
KevinVdV
726e19498d [DS-2714] Oracle migration script for the service based api 2015-08-25 12:42:14 +02:00
Peter Dietz
5d97c7b82a Merge pull request #1027 from KevinVdV/DS-2712-databaseutils-fix
[DS-2712] Fix DatabaseUtils class, migration issues and altered the ant update fresh_install scripts to migrate database
2015-08-24 12:29:40 -04:00
Mark H. Wood
2726e88a2d [DS-2701] oai mostly finding oldest date in some metadata field 2015-08-21 16:31:43 -04:00
KevinVdV
0883d138a4 [DS-2712] Fix DatabaseUtils class, migration issues and altered the ant update fresh_install scripts to migrate database 2015-08-21 15:32:05 +02:00
Mark H. Wood
dd838ca5f5 [DS-2701] oai make commandline tool compile. 2015-08-20 16:18:25 -04:00
Mark H. Wood
021fba9d40 [DS-2701] dspace-oai 'the simple bits' 2015-08-19 16:43:23 -04:00
Tim Donohue
99cc639e58 Merge pull request #1023 from mwoodiupui/DS-2701-service-api
[DS-2701] Provide missing license headers in dspace-api
2015-08-19 10:07:07 -05:00
Mark H. Wood
dc96b2d3ee [DS-2701] Provide missing license headers in dspace-api 2015-08-19 11:04:25 -04:00
Mark H. Wood
758d8abdad Merge pull request #1021 from KevinVdV/dspace-service-api
DSpace refactored service api
2015-08-19 09:39:03 -04:00
KevinVdV
54222f3c1d DSpace refactored service api 2015-08-19 11:54:32 +02:00
Tim Donohue
fcb3717aad Merge pull request #1020 from robintaylor/DS-2701-service-api
DS-2124 Move LNI to a separate GitHub project
2015-08-18 10:21:06 -05:00
Robin Taylor
a3ffc3c82a DS-2124 Move LNI to a separate GitHub project 2015-08-18 15:21:43 +01:00
Roeland Dillen
9160073951 set mail.extraproperties before obtaining session 2015-08-13 14:15:17 +02:00
helix84
780b12fb34 Revert "DS-1821 Internationalize the bitstream access icon alt text" 2015-08-13 10:41:13 +02:00
Andrea Schweer
bf56b23da5 DS-2698 Use all result info in browse page cache validity
Stepping through the code in a debugger showed that the singleEntry arrays
typically hold three entries: the metadata value in [0], the authority key (if
present) in [1] and the frequency of this metadata value in the current browse
in [2]. The validity used to take into account only [0] and [1], probably from
the old lucene browse (which didn't include frequencies).

This change ensures that the cache validity object includes all entries in the
singleEntry arrays by avoiding to pick out individual array entries.
2015-08-12 16:58:58 +12:00
Robin Taylor
a7334c6d8b Merge pull request #1009 from robintaylor/DS-2695
DS-2695 Google Analytics not recording bitstream downloads correctly
2015-08-11 09:24:49 +01:00
Monika Mevenkamp
9af81d041b catch all exceptions in showJsp and turn into ServletException 2015-08-07 17:41:41 -04:00
Robin Taylor
c68d41ad88 DS-2695 Google Analytics not recording bitstream downloads correctly 2015-08-07 13:29:12 +01:00
Bram Luyten
b80ba111f9 Merge pull request #1005 from RomanticCat/patch-1
DS-2533 : update version for Eirslett - frontend-maven-plugin
2015-08-06 09:28:25 +02:00
RomanticCat
35a00a939e DS-2533 : update version for Eirslett - forntend-maven-plugin 2015-08-05 11:45:58 +12:00
Tim Donohue
5868e59b6a Merge pull request #1004 from mwoodiupui/DS-2694
[DS-2694] DSpace 5.3 Source Code Download Issue [corrupt images and other binaries]
2015-08-04 16:05:04 -05:00
Mark H. Wood
183470252d Make the assembly descriptor schema-valid. 2015-08-04 16:54:07 -04:00
Mark H. Wood
f41fe97384 [DS-2694] Avoid munging more binary types during release 2015-08-04 16:34:45 -04:00
Christian Scheible
b204a379f5 [DS-2679] Retain ordering of authors for Google Scholar metatags. 2015-08-04 13:11:35 +02:00
Mark H. Wood
1a7a011c4c [DS-2690] Drop long-deprecated DCType.java 2015-08-03 14:39:49 -04:00
Bram Luyten
d83a46c823 Merge pull request #1002 from jonas-atmire/DS-2672
DS-2672 Typos in constants in DOIIdentifierProvider
2015-08-03 14:16:21 +02:00
Mark H. Wood
f11ffa5352 Fix improper commenting syntax so that this actually works 2015-07-31 13:56:26 -04:00
Jonas Van Goolen
e8bea8cc79 DS-2672 Typos in constants in DOIIdentifierProvider 2015-07-31 15:47:15 +02:00
Mark H. Wood
574745d682 [DS-2685] Restore list item formatting when class='ds-ordered-list' 2015-07-30 17:10:50 -04:00
Hardy Pottinger
49d8ee2fae Merge pull request #998 from tdonohue/DS-2358
DS-2358: Preserves custom policy rules during versioning (UPDATED)
2015-07-28 11:39:34 -05:00
Tim Donohue
18f335bdf8 Minor fix. Since addBitstream() inherits polices, we need to first remove inherited custom policies 2015-07-24 17:09:43 +00:00
Pascal-Nicolas Becker
e08e65814b DS-2358: Preserves custom policy rules during versioning 2015-07-24 16:53:03 +00:00
Hardy Pottinger
9fed2a9023 Merge pull request #943 from aschweer/DS-2571-browse-jump
DS-2571 Fix jumping to value in descending browse
2015-07-23 14:26:53 -05:00
Tim Donohue
069d8b787b Merge pull request #941 from rradillen/patch-9
[DS-2527] Disable collection authorisation enumeration optimisation by default
2015-07-22 15:34:36 -04:00
Tim Donohue
f8a9369085 Merge pull request #961 from pablobuenaposada/fix_upper_pagination
fixed dots in upper pagination
2015-07-22 15:22:09 -04:00
Ondrej Kosarko
4c05d46859 fixes DS-2658 2015-07-22 14:15:53 -05:00
Tim Donohue
7787693f38 Merge pull request #982 from tdonohue/DS-2593
DS-2593 : Ensure a "tombstone" is left for withdrawn items in OAI-PMH. Fix other minor, obvious OAI bugs.
2015-07-22 15:08:52 -04:00
Tim Donohue
c343c40cdb Add a new DSpaceWithdrawnFilter in place of hardcoding in DSpaceAuthorizationFilter. Update configs, and fix bugs. 2015-07-16 11:02:19 -05:00
Tim Donohue
c847514e7e Merge pull request #975 from tuub/DS-2614
DS-2614: Ignore custom resource policies for unfinished items
2015-07-15 10:46:50 -04:00
Tim Donohue
e784364662 Merge pull request #981 from tdonohue/DS-2602
DS-2602 : Fix Title/Date browsing, also properly escape special characters in Solr
2015-07-15 10:14:33 -04:00
Christian Scheible
d337a47ef4 Added Discovery Facet to distinguish between items with and without full text. 2015-07-13 10:29:59 +02:00
Christian Scheible
1f439044c7 Added Discovery Facet to distinguish between items with and without full text. 2015-07-13 10:29:35 +02:00
Monika Mevenkamp
504096811a JSPUI: show Recent Submission header only iff there are recent submissions 2015-07-09 15:16:57 -04:00
Tim Donohue
044f1716af Escape special characters in JSPUI queries as well 2015-07-09 18:51:40 +00:00
Tim Donohue
82a200b7e4 Merge pull request #959 from sedici/DS-2603
DS-2603: now if the item doesn't have a primary bitstream the value o…
2015-07-07 12:33:32 -04:00
Pablo Buenaposada
ad715d47de closing more span tags
Missing closing more span tags
2015-07-07 08:25:23 +02:00
Tim Donohue
4d9adc7152 Merge pull request #933 from junwei1229/master
DS-2554: fix the oai index issue when submitter is null
2015-07-06 17:02:51 -04:00
Tim Donohue
a5b4f36d03 Update XSL stylesheet to display "deleted" status, and correct misspellings 2015-07-06 13:24:46 -05:00
Tim Donohue
db0c994e46 Fix DS-2593 : Withdrawn items are now given a "tombstone" in OAI-PMH. Also fix Context mgmt issues & authorization code. 2015-07-06 12:37:20 -05:00
Tim Donohue
edb0555924 Merge pull request #913 from cjuergen/DS-2543
Fix for DS-2543
2015-07-06 11:38:33 -04:00
Tim Donohue
b04b3f867d Also ensure query escaped in AbstractSearch 2015-07-02 21:19:35 +00:00
Tim Donohue
9390bdc9d9 Fix DS-2602 and DS-2461 by properly escaping user entered queries 2015-07-02 15:13:16 -05:00
Tim Donohue
1c1abf01ed Revert "DS-2461 Escape some colons in queries"
This reverts commit 2575d73b2d.
2015-07-02 15:10:35 -05:00
helix84
ae2a16b5de Merge pull request #978 from cubranic/master-authentication-cfg
Fix the name of the master authentication config file
2015-06-29 17:09:13 -04:00
Davor Cubranic
8145ded0d2 Fix the name of the master authentication config file
It's 'authentication.cfg', not 'authenticate.cfg'.
2015-06-29 13:09:43 -07:00
Pascal-Nicolas Becker
203d183933 DS-2614: Ignore custom resource policies for unfinished items 2015-06-24 18:07:26 +02:00
Pascal-Nicolas Becker
ecdc4edbbc Merge pull request #967 from nteike/patch-2
DS-2624: Adding CSS classes identifying each field by its metadata type.
2015-06-24 12:17:54 +02:00
nteike
29e5529817 Integrated Kevins proposal for the string comparison 2015-06-24 09:55:57 +02:00
Tim Donohue
1575481b55 Merge pull request #971 from helix84/DS-2628-use-travis-containers
DS-2628: test DSpace build on Travis container infrastructure
2015-06-23 09:41:33 -04:00
Ivan Masár
7efa4fa1c0 test DSpace build on Travis container infrastructure 2015-06-22 15:01:10 +02:00
Ondrej Kosarko
9c4aaa1256 typo in the word cocoon 2015-06-20 14:31:07 +02:00
nteike
35451c5456 Adding CSS classes identifying each field by its metadata type.
Adding CSS classes identifying each field by its metadata type. This allows unique layout changes for each metadata type in the detail view.
2015-06-18 16:18:01 +02:00
helix84
b0bdcc5a8a Merge pull request #952 from rivaldi8/DS-2594-long-file-names-overlap
DS-2594 Long file names overlap the second column of item metadata in…
2015-06-16 08:48:01 -04:00
helix84
82543dbc68 Merge pull request #964 from rradillen/DS-2618
DS-2618: Process mail.server.disabled in test-email
2015-06-16 08:43:54 -04:00
Roeland Dillen
99eea52593 remove the imports that confuse the issue 2015-06-16 14:25:51 +02:00
Roeland Dillen
cef1973767 Process mail.server.disabled in test-email 2015-06-16 14:08:58 +02:00
Pascal-Nicolas Becker
1ae0d9dc08 Use Group.ANONYMOUS_ID instead of static int 0. 2015-06-12 13:18:36 +02:00
Pablo Buenaposada
351dbba1dd Update discovery.jsp 2015-06-10 12:32:30 +02:00
pablobuenaposada
4874f11454 fixed dots in upper pagination 2015-06-10 12:16:11 +02:00
Hardy Pottinger
c78be1c0b9 Merge pull request #955 from Mini-Pillai/DS-2560
DS 2560 - Did you mean option missing in Mirage2
2015-06-09 12:03:15 -04:00
nicolasschwab
20357d9e02 DS-2603: now if the item doesn't have a primary bitstream the value of citation_pdf_url metadata will be a link to the first public bitstream according to the order established by the user. 2015-06-05 09:09:17 -03:00
helix84
1a9e7290c0 Merge pull request #956 from aschweer/DS-2598-oai-mets-available
DS-2598 Correct XPATH for available date in mets format xoai
2015-06-02 15:32:23 +02:00
Andrea Schweer
2efcf99f87 DS-2598 Correct XPATH for available date in mets format xoai
This ensures that dc.date.available is shown when using the mets metadata
format in OAI-PMH. Previously, the dateAvailable element was present but empty.
2015-06-02 12:45:07 +12:00
Mini
085b7e6257 Did you mean option missing in Mirage2 2015-05-29 09:32:45 -07:00
Mini
6d876cd1cd Did you mean option missing in Mirage2 2015-05-28 11:06:54 -07:00
Àlex Magaz Graça
63f1a6c791 DS-2594 Long file names overlap the second column of item metadata in Mirage 2 2015-05-27 12:58:44 +02:00
Mark H. Wood
59f07bd4da [DS-2590] Improved commentary about these obscure problems. 2015-05-26 14:25:31 -04:00
Mark H. Wood
5bbc89481e [DS-2590] Roll back problematic upgrade of maven-assembly-plugin 2015-05-26 14:25:31 -04:00
Mark H. Wood
8b13488635 [DS-2590] Fix multiple issues with distributed archives.
Include dspace/modules/*/src/main/webapps so build succeeds.
Avoid damaging a sample ZIP archive by munging "line endings".
Upgrade to maven-assembly-plugin 2.5.4 (which uncovered the line
ending problem).
2015-05-26 14:25:31 -04:00
helix84
d44fff996c Merge pull request #950 from ufal/DS-2587
DS-2587 Resource policies rptype is null after upgrading
2015-05-21 17:18:12 +02:00
Ondřej Košarko
fbb9d782c4 fixes DS-2587 2015-05-21 14:18:08 +02:00
Hardy Pottinger
1d7df6d245 Merge pull request #948 from tdonohue/DS-2582
Fix DS-2582: Remove all milliseconds from dates. Refactor code slightly.
2015-05-19 14:00:37 -05:00
Tim Donohue
e9cd9d49d1 Fix DS-2582: Remove all milliseconds from dates. Refactor code slightly. 2015-05-19 17:59:57 +00:00
Saiful Amin
5de8e54f8e Fix for DS-1187
Fixes https://jira.duraspace.org/browse/DS-1187

This fixes right-to-left full-text indexing for Arabic PDF documents. Already in production in multiple sites since DSpace 1.8.x.
2015-05-18 22:56:40 +05:30
Hardy Pottinger
6579c4448c Merge pull request #886 from kosarko/DS-2020
DS-2020 null check & turning _ to / in handles
2015-05-18 11:34:00 -05:00
Hardy Pottinger
3821605009 Merge pull request #899 from antoine-atmire/DS-2529
DS-2529 CSV import bugfix for fields under authority control with a language
2015-05-18 10:54:56 -05:00
Tim Donohue
cd8b3693b2 Merge pull request #946 from tdonohue/DS-2577
Fix for DS-2577 : Flyway Migration Error (constraint "metadatavalue_item_id_fkey" doesn't exist)
2015-05-15 14:16:48 -04:00
Hardy Pottinger
ffe56a2fb8 Merge pull request #918 from christian-scheible/DS-2546
[DS-2546] fixes problem in DateUtils parsing
2015-05-15 11:59:37 -05:00
Tim Donohue
28ecd839b8 Fix for DS-2577. Query for PostgreSQL constraint name. Surround with double quotes if value is $1 or similar. 2015-05-15 16:33:49 +00:00
Ivan Masár
41d86b9acb minor fix: remove extra colon in string 2015-05-15 10:06:35 +02:00
Christian Scheible
90040c4755 [DS-2546] added missing curly brackets 2015-05-15 07:32:03 +02:00
Andrea Schweer
d457048836 Merge pull request #692 from rivaldi8/DS-2186-request-item-copy-strategy
[DS-2186] Request item copy doesn't always use RequestItemAuthorExtractor
2015-05-15 16:36:45 +12:00
Andrea Schweer
5a520f17d8 Merge pull request #850 from atmire/DS-2131
[DS-2131] SWORDv2 ingestion fails with NullPointerException when submitting an in-progress item
2015-05-15 15:06:56 +12:00
Andrea Schweer
88d0ef2449 Merge pull request #914 from tuub/DS-1965
DS-1965: Adds date fields to the form used to edit policies (JSPUI).
2015-05-15 10:29:35 +12:00
Hardy Pottinger
3cae40089f Merge pull request #887 from ctu-developers/DS-2504
DS-2504: Method getLink() returns incorrect context path
2015-05-14 16:40:45 -05:00
Hardy Pottinger
3fab3478c3 Merge pull request #927 from tuub/DS-2551
DS-2551: JSPUI show thumbnails only if user has read permission
2015-05-14 16:30:32 -05:00
Tim Donohue
a7e47f5a39 Merge pull request #940 from TimothyXL/master
DS-2562, fix incorrect if statement.
2015-05-14 17:21:16 -04:00
rradillen
1a2fdb3a6a change default of findAuthorizedPerformanceOptimize
it is now false
2015-05-14 22:21:24 +02:00
rradillen
4da27c53d6 move Collection policy optimization property 2015-05-14 22:19:03 +02:00
helix84
d3fe868f31 Merge pull request #895 from ctu-developers/DS-2511
DS-2511: Repaired resource policy endpoints.
2015-05-14 16:18:16 +02:00
ctu-developers
6a797c8c10 Repaired creating ResourcePolicy with bitstream. 2015-05-14 12:07:49 +02:00
Andrea Schweer
6d524a3c72 Merge pull request #945 from aschweer/DS-2575-workflow-order
DS-2575 Ensure pooled/owned workflow task are listed in fixed order
2015-05-14 15:39:57 +12:00
Andrea Schweer
ece460b87d DS-2575 Ensure pooled/owned workflow task are listed in fixed order 2015-05-14 15:26:13 +12:00
Andrea Schweer
a848e52bf6 Merge pull request #944 from aschweer/DS-2461-discovery-colon
DS-2461 Escape some colons in queries
2015-05-14 11:10:58 +12:00
Andrea Schweer
2575d73b2d DS-2461 Escape some colons in queries
This allows searching for titles with colons while still allowing fielded searches
2015-05-14 10:46:33 +12:00
Hardy Pottinger
53c70cc1c7 Merge pull request #937 from tuub/DS-2545
DS-2545: Show collections the user can submits items to only.
2015-05-13 17:07:30 -05:00
Andrea Schweer
2df5b1f972 Merge pull request #917 from aschweer/DS-2544-imthumb-temp
[DS-2544] Improve temp file handling for IM thumbnailer
2015-05-14 08:48:09 +12:00
Andrea Schweer
3532eceef7 Merge pull request #922 from aschweer/DS-2549-oai-identifiers
[DS-2549] Render Repo identifier / Sample identifier on Identify page
2015-05-14 08:43:15 +12:00
Hardy Pottinger
7d5a39486e Merge pull request #907 from EKT/DS-2534
[DS-2534] Fix a bug in the "Jump to" browse feature
2015-05-13 15:39:55 -05:00
Andrea Schweer
2a488985c2 Merge pull request #939 from aschweer/ds-2449-mirage2-template-label
DS-2449 mirage2 template label
2015-05-14 08:28:31 +12:00
Mark H. Wood
59f78cd0ca Merge pull request #942 from mwoodiupui/DS-2379
[DS-2379] command usage output for dspace (from launcher.xml) is unsorted
2015-05-13 16:26:05 -04:00
Hardy Pottinger
3b67d8de0e Merge pull request #893 from aschweer/DS-2212-sharding-with-version
[DS-2212] Ignore _version_ field when sharding solr statistics
2015-05-13 15:10:51 -05:00
Christian Scheible
a5790a50cb [DS-2546] Added missing ZULU time zones where applicable 2015-05-13 08:50:33 +02:00
Andrea Schweer
d71e6f94bb DS-2571 Fix jumping to value in descending browse 2015-05-12 14:02:14 +12:00
Mark H. Wood
50ce5b33e9 [DS-2379] Lists returned by JDOM can't be sort()ed, so use a more cooperative class. 2015-05-07 15:21:48 -04:00
Mark H. Wood
308b4550c0 [DS-2379] Sort the list of commands by their names 2015-05-07 14:36:11 -04:00
Pascal-Nicolas Becker
8c1fb4057c Merge pull request #847 from christian-scheible/DS-2423
[DS-2423] Added possibility to create additional Filter for DSpace OAI-P...
2015-05-06 18:45:49 +02:00
Mini
2b1611f775 Did you mean option missing in Mirage2 2015-05-05 13:12:23 -07:00
Mini
817d9c3738 Revert "Did you mean option missing in Mirage2"
This reverts commit 2689e03753.
2015-05-05 10:21:30 -07:00
rradillen
5631b37172 [DS-2527] Disable collection authorisation enumeration optimisation
Disable collection authorisation enumeration optimisation so LDAP and Shibboleth may work out of the box.
2015-05-05 15:26:21 +02:00
Mini
2689e03753 Did you mean option missing in Mirage2 2015-05-01 14:13:07 -07:00
tmtvl
e394d92e24 DS-2562, fix incorrect if statement. 2015-05-01 19:03:47 +02:00
Andrea Schweer
ec01a5777d Remove box styling for file upload in Mirage 2 2015-05-01 11:06:26 +12:00
Andrea Schweer
9ff7dc034d DS-2449 Restore template item label for Mirage 2 2015-05-01 11:06:19 +12:00
Andrea Schweer
9f25afbea3 Merge pull request #905 from DSpace/DS-2486-Reindex-Solr
Ds 2486 reindex solr
2015-05-01 09:48:15 +12:00
Pascal-Nicolas Becker
471a7d96ff DS-2545: Show collections the user can submits items to only.
The JSPSelectColletionStep and JSPStartSubmissionLookupStep already set
the collections -the user can submit to- as request attribute. The JSPs
us these argument already. This commit lets the SelectCollectionTag use
this attribute too instead of looking for the collections on itself.
2015-04-30 17:39:17 +02:00
junwei1229
e0c7f0e046 fix the oai index issue when submitter is null
when submitter is null, it will cause NPE exception, so it will stop the OAI index process. eg. if using harvest, the submitter probably will be null in db.
2015-04-27 23:02:18 +08:00
Pascal-Nicolas Becker
05f3c7eceb Merge pull request #925 from tuub/DS-2550
DS-2550: fix ImageMagick/Ghostscript problems with transparent pdfs
2015-04-27 14:30:36 +02:00
Pascal-Nicolas Becker
325a527a41 DS-2550: fix ImageMagick/Ghostscript problems with transparent pdfs 2015-04-27 14:22:52 +02:00
Andrea Schweer
e6a15a293b [DS-2486] Increase robustness, improve directory delete behaviour
As suggested by Mark Wood, delete directories only when they were actually
created (and when --keep is not given).

Also refuse to go ahead with reindexing when it's obvious that there won't be
enough space, plus deal a little more gracefully with common errors (initial
export failing; -temp core still left from previous attempt).
2015-04-23 14:23:50 +12:00
facundo
3312f8c448 Fixed problem in DS-2553 -'DCInputAuthority cannot return the label of an authority key that isn't a number'. The #getLabel() method now can receive a 'key' parameter that is not a
number.
2015-04-22 16:40:07 -03:00
Mark H. Wood
88e4fc7b48 Merge pull request #923 from tdonohue/DS-1925
DS-1925: Remove odd default Google Analytics key from dspace-services API
2015-04-22 11:12:41 -04:00
helix84
b350d8d8f3 Merge pull request #929 from ctu-developers/DS-2218
DS-2218: Unable to use command "update-handle-prefix"
2015-04-22 11:27:31 +02:00
Andrea Schweer
72c16b64f9 DS-2544 Delete temp files when exception is encountered
As suggested by William Tantzen on Jira.
2015-04-22 15:07:04 +12:00
Ivo Prajer
7d07fa26c7 Removed extra semicolon in the sql command, added check for "up-to-date", fix updating metadata values, basic logging to DSpace log and SQL exception handling. Changed, customized, added user message and repaired their order. Fixed return codes and some typos. Changed re-index engine from DSIndexer to Discovery and info text about manual re-indexing. Changes in SQL formatting and formatting of code. 2015-04-21 23:45:37 +02:00
Pascal-Nicolas Becker
c73064b54a DS-2551: JSPUI show thumbnails only if user has read permission 2015-04-21 17:54:57 +02:00
David Baker
e7ace8c285 [DS-2318] Added img-thumbnail class to item-view and instances of 'No Thumbnail' thumbnail 2015-04-20 16:41:56 +00:00
Tim Donohue
5b84fef1ad Remove odd default Google Analytics key 2015-04-20 08:49:15 -05:00
helix84
b656a10df9 Merge pull request #888 from ctu-developers/DS-2418
DS-2418: Incompatible oracle sql method on collection.java
2015-04-20 10:42:35 +02:00
helix84
4cb0f7db85 Merge pull request #903 from ctu-developers/DS-2508-5x/master
DS-2508: Retrieve of collections by findAll() crash with SQL error
2015-04-20 10:41:56 +02:00
helix84
8638e46469 Merge pull request #873 from helix84/DS-2474-OAI-METS-authors
DS-2474 METS format in OAI includes only the first author
2015-04-20 09:43:36 +02:00
helix84
5b7c33e4ac Merge pull request #880 from helix84/DS-2491-oai-deletedRecord
DS-2491 set deletedRecord=transient in OAI Identify
2015-04-20 09:12:31 +02:00
helix84
fddfb2241f Merge pull request #901 from DSpace/DS-2531
DS-2531 New entries for the robots hostname list
2015-04-20 09:06:21 +02:00
Andrea Schweer
357bea59fc [DS-2549] Render Repo identifier / Sample identifier on Identify page 2015-04-20 15:40:44 +12:00
Andrea Schweer
26127e38e6 Disable version check when importing temporary stats data 2015-04-20 09:35:32 +12:00
helix84
b81d5fada4 Merge pull request #921 from dbaker3/ds-2318
DS-2318 Added class img-thumbnail for XMLUI Mirage2
2015-04-17 09:16:20 +02:00
David Baker
4a9af3fa7f DS-2318 Added class img-thumbnail for XMLUI Mirage2 2015-04-16 22:32:35 +00:00
Andrea Schweer
f17d446044 Make import/export of temporary core more robust 2015-04-17 09:57:00 +12:00
helix84
65798e77d4 Merge pull request #920 from cwilper/xsl-copyright-2015
Minor: fix year and capitalization in displayed copyright
2015-04-16 20:26:49 +02:00
Chris Wilper
54cf33f44f fix year and capitalization in displayed copyright 2015-04-16 13:01:10 -04:00
Andrea Schweer
0ee5dfdb7a Use stats component to get minimum date 2015-04-16 17:23:35 +12:00
Andrea Schweer
e7fb61f6c1 Export monthly batches to limit the number of docs to sort 2015-04-16 17:08:19 +12:00
Christian Scheible
b1adbf3c5d [DS-2546] fixes problem in DateUtils parsing 2015-04-15 11:04:10 +02:00
Andrea Schweer
4ab87f16e1 [DS-2544] Improve temp file handling for IM thumbnailer 2015-04-15 15:45:22 +12:00
Pascal-Nicolas Becker
e211d1190e DS-1965: Adds date fields to the form used to edit policies (JSPUI). 2015-04-14 16:23:27 +02:00
cjuergen
259e572172 Fix for DS-2543 cleans the cached OAI responses after doing a full item import with the -c option 2015-04-13 16:43:49 +02:00
Mark H. Wood
fb4db3ad44 Merge pull request #892 from mwoodiupui/DS-2518
[DS-2518] EZID DOI IdentityProvider doesn't set the location in metadata
2015-04-08 11:34:15 -04:00
Pascal-Nicolas Becker
8a5ecc0f08 Merge pull request #876 from cjuergen/DS-2482
Fix for DS-2482
2015-04-08 17:21:34 +02:00
Panagiotis Koutsourakis
80ddf18c2d Fix a bug in the "Jump to" browse feature
When computing the offset for the "jump to" feature at
SolrBrowseDAO.doOffsetQuery we should take into account if we are
browsing a subset of the items (e.g. we are viewing the items that have
a specific subject) and not all of them (e.g. by title).
2015-04-02 14:07:15 +03:00
Bram Luyten
f809f36b8f Merge pull request #902 from rradillen/patch-8
[DS-2532] botness of a visit is not properly logged when a location cannot be determined
2015-04-02 08:42:09 +02:00
Andrea Schweer
ab240a20aa DS-2486 Add Solr import/export to launcher.xml 2015-04-02 10:00:09 +13:00
Andrea Schweer
1b6f52c234 DS-2486 New scripts to export/clear/import solr indexes 2015-04-02 10:00:08 +13:00
Andrea Schweer
b07707874a DS-2486 Add UUID processing to CSV, JSON update handlers too 2015-04-02 09:59:37 +13:00
Ivo Prajer
dd46044361 Fix passing parameters LIMIT/OFFSET to sql query in the findAll() 2015-04-01 18:22:13 +02:00
rradillen
0b1210bb11 [DS-2532] botness of a visit is not properly logged when a location cannot be determined
Extract isBot from the location==null if in two places.
2015-04-01 16:52:11 +02:00
Bram Luyten
14a4850b0b DS-2531 New entries for the robots hostname list 2015-04-01 16:10:29 +02:00
Antoine Snyers
d111039c2e DS-2529 CSV import bugfix for fields under authority control with a language 2015-03-30 11:08:16 +02:00
Ivan Masár
bc28df4093 typos 2015-03-27 12:10:25 +01:00
Pascal-Nicolas Becker
6436e2dc60 Merge pull request #897 from tuub/DS-2403
DS-2403: Resolves DS-2403 and reduce logging of RDFConsumer.
2015-03-25 19:36:38 +01:00
Pascal-Nicolas Becker
9d2dc0562b DS-2403: Resolves DS-2403 and reduce logging of RDFConsumer. 2015-03-25 19:09:35 +01:00
ctu-developers
d76b7ba63e Repaired resource policy endpoints.
Repaired all endpoints in REST api. Added XML annotation in
ResourcePolicy. Repaired bug in Bitstream with expand field.
2015-03-23 17:04:10 +01:00
Andrea Schweer
2aa9bbb273 [DS-2212] Ignore _version_ field when sharding solr stats 2015-03-20 16:13:05 +13:00
Mark H. Wood
37888b362f Repair testing environment, enable real unit tests, add test of metadata crosswalking. 2015-03-18 14:40:53 -04:00
Mark H. Wood
0ac233541c Add location metadata so that the DOI actually resolves properly. 2015-03-18 14:40:33 -04:00
helix84
8f631d2b18 Merge pull request #890 from aschweer/ds-2513-multipart-headers
[DS-2513] Improve multipart header parsing
2015-03-18 10:52:41 +01:00
helix84
8115e47cac Merge pull request #891 from minusdavid/DS-2514
DS-2514 Packaged version of html5shiv.js is missing "main" element
2015-03-18 10:18:25 +01:00
David Cook
780d5e0270 DS-2514 Packaged version of html5shiv.js is missing "main" element
Added "main" element to html5shiv.js, which should bring it inline
with the 3.6.2pre distribution from aFarkas's Github repo:
https://raw.githubusercontent.com/aFarkas/html5shiv/
3.6.2pre/dist/html5shiv.js

This can be verified by unminifying html5shiv.js in the above link
and html5shiv.js in DSpace master, and comparing them in any merge
program like vimdiff or WinMerge.

Without this patch, IE 8 self-closes the "main" element, and pushes
its child DIVs after it instead of nesting them within itself, which
has repercussions when styling the JSPUI with CSS.

With this patch, IE 8 comprehends the "main" element, and nests the
DIVs correctly.
2015-03-18 10:21:45 +11:00
Andrea Schweer
af1a21d503 [DS-2513] Improve multipart header parsing
The original code broke when files were uploaded whose name contains
the semicolon-space sequence.
2015-03-17 12:10:15 +13:00
Ivan Masár
c3900cfae7 Updated README.md 2015-03-16 18:58:36 +01:00
Ivan Masár
6f45627f10 Updated README.md 2015-03-16 15:17:53 +01:00
ctu-developers
863ff23624 Updated README.md 2015-03-16 15:02:00 +01:00
Ivo Prajer
6815e25dbe Fix passing parameters LIMIT and OFFSET to sql query in the method getItems() for oracle 2015-03-15 00:54:54 +01:00
ctu-developers
19f2e2e740 Removed unnecessary changes from previous commit. 2015-03-14 14:42:07 +01:00
ctu-developers
9c942d7f54 Fix of getLink() by returning servlet context.
Added static method to Resource.java and using it in DSpaceObject.java
2015-03-14 14:34:47 +01:00
Ivo Prajer
11ba6ee94e Quick fix of getLink() 2015-03-12 20:52:48 +01:00
Hardy Pottinger
54ee54ba4d Merge pull request #846 from christian-scheible/DS-2424
DS-2424 workaround for bug in xoai library. changed ref to red for Filter in Contexts
2015-03-11 10:45:04 -05:00
Ondřej Košarko
54ac0c3b08 DS-2020 null check & turning _ to / in handles 2015-03-11 14:59:38 +01:00
helix84
c61fb22522 Merge pull request #884 from helix84/DS-2501-rest-fix-find-by-metadata-field
DS-2501 fix SQL in REST /items/find-by-metadata-field
2015-03-09 22:34:51 +01:00
Ivan Masár
a9cf2bd9d2 DS-2501 fix SQL in REST /items/find-by-metadata-field 2015-03-09 22:16:51 +01:00
Mark H. Wood
ed6b64322f [DS-2502] Correct some dependencies to prevent pulling in servlet-api 2015-03-09 17:04:41 -04:00
helix84
60f428de5f Merge pull request #883 from rivaldi8/DS-2493-view-more-link
[DS-2493] "View more" link is shown even when there aren't more items.
2015-03-06 13:53:12 +01:00
Àlex Magaz Graça
acda3b03f6 [DS-2493] "View more" link is shown even when there aren't more items. 2015-03-06 13:01:53 +01:00
Tim Donohue
26ab46e641 Merge pull request #877 from DSpace/tdonohue-DS-2483
DS-2483 : Fix mispelling of "sword.compatibility"
2015-03-05 15:31:09 -06:00
Ivan Masár
a2e753c5f1 DS-2491 set deletedRecord=transient in OAI Identify 2015-03-05 15:41:06 +01:00
Pascal-Nicolas Becker
f55fb75179 Merge pull request #878 from tuub/DS-2485
DS-2485: DefaultItemVersionProvider hides an IdentifierException
2015-03-04 18:43:07 +01:00
Pascal-Nicolas Becker
6bfcd303cf DS-2485: DefaultItemVersionProvider hides an IdentifierException 2015-03-04 18:36:09 +01:00
Tim Donohue
683a2fdb83 DS-2483 : Fix mispelling of "sword.compatibility"
https://jira.duraspace.org/browse/DS-2483
2015-03-03 14:34:34 -06:00
cjuergen
682c05b723 Fix for DS-2482 adds the attribute dspace.community or dspace.collection to the search and browse request if we browse or search a community or collection 2015-03-03 17:53:48 +01:00
helix84
9014692145 Merge pull request #875 from helix84/DS-2478-update-GA
DS-2478 update Google Analytics tracking JS snippet
2015-03-03 09:09:35 +01:00
helix84
40be894c01 Merge pull request #874 from tdonohue/DS-2477
DS-2477 : Ensure distribution packages always get created with Unix (LF) line endings
2015-02-27 17:45:52 +01:00
Ivan Masár
9b79e7e939 DS-2478 update Google Analytics tracking JS snippet 2015-02-27 17:30:09 +01:00
Tim Donohue
0f82021c86 DS-2477 : Ensure distribution packages alwasy get created with Unix (LF) line endings 2015-02-27 10:02:47 -06:00
Ivan Masár
1ca85a1076 DS-2474 METS format in OAI includes only the first author 2015-02-25 18:01:14 +01:00
Tim Donohue
8db8a66b2f Merge pull request #865 from lap82/DS-2044
[DS-2044] HTML not stripped from Discovery search form in JSPUI
2015-02-23 14:25:49 -06:00
Hardy Pottinger
229396da59 Merge pull request #861 from tdonohue/DS-2278
DS-2278 : Fix two issues in XMLUI which block proper 404 error pages from displaying for some URL patterns
2015-02-23 12:43:18 -06:00
helix84
0db8178d70 Merge pull request #870 from royopa/patch-2
removed word duplicated
2015-02-23 18:14:17 +01:00
Rodrigo Prado
e398471b13 removed word duplicated 2015-02-23 14:11:10 -03:00
Hardy Pottinger
612f098821 Merge pull request #843 from cjuergen/DS-2419
Fix for DS-2419 JSP UI ignores authorization.admin.usage.
2015-02-22 15:40:15 -06:00
Hardy Pottinger
abbf757b23 Merge pull request #844 from mwoodiupui/DS-1265
[DS-1265] Don't close the current sitemap if we never opened one
2015-02-22 15:39:59 -06:00
Tim Donohue
f2a6be23df DS-2448 - Fix for JSPUI path traversal issue from Pascal-Nicolas Becker 2015-02-20 22:37:01 +00:00
Luigi Andrea Pascarelli
ed7d2980e2 [DS-2044] fix cross-site scripting vulnerability and minor related issue
(verbose error output, avoid NPE on JSP during an attack)
2015-02-20 22:05:57 +01:00
Tim Donohue
322ed825db Add in missing imports from previous commit 2015-02-20 20:18:12 +00:00
Luigi Andrea Pascarelli
5aa9ce16f0 DS-1702 add code to prevent XSS attach on recent submission 2015-02-20 18:58:16 +00:00
Hardy Pottinger
4537a8e56a Merge pull request #793 from wilee53/DS-2355-spider
DS-2355 : SpiderDetector added synchronization for ArrayLists: agents and domains
2015-02-20 12:22:48 -06:00
Tim Donohue
db9a1ecba4 XMLUI path bug fixes and security fixes for DS-2445 DS-2130 DS-1896 2015-02-20 16:45:43 +00:00
Hardy Pottinger
2eaaf84810 Merge pull request #863 from hardyoyo/DS-2034-handle-emptystring
[DS-2034] added emptystring handling to the notnull method in ControlPanel
2015-02-17 14:38:27 -06:00
Hardy Pottinger
17860aab20 clarified the test expression, as a kindness to future generations 2015-02-17 19:26:06 +00:00
Hardy Pottinger
c9da7f2aad added back null handling, which I inadevertently dropped in favor of emptystring handling 2015-02-17 19:20:33 +00:00
Hardy Pottinger
e718f9d996 [DS-2034] refactored notnull method to notempty, at the suggestion of mhwood 2015-02-13 23:03:11 +00:00
Hardy Pottinger
67310950bf [DS-2034] added emptystring handling to the notnull method in ControlPanel.java 2015-02-13 22:40:54 +00:00
Tim Donohue
b00956215a DS-2278 : Fix two issues in XMLUI which block proper 404 Page Not Found pages from displaying for some URL patterns 2015-02-11 16:18:30 -06:00
Tim Donohue
8bb6bbdbf0 Add back in missing "canonicalize()" for Oracle 2015-02-11 21:59:26 +00:00
Tim Donohue
fa3ebb36a3 Fix DS-2427 for 5.1 by consolidating problematic code into DatabaseUtils.getSchemaName() so that it can be replaced easily in future. Also cleaned up config comments 2015-02-11 21:59:15 +00:00
helix84
2c0d2d150a Merge pull request #855 from christian-scheible/DS-2438
[DS-2438] fixed problem with immense metadata values for oai solr core
2015-02-04 10:05:16 +01:00
Christian Scheible
dcd9b2534c [DS-2438] fixed problem with immense metadata values for oai solr core 2015-02-04 08:40:17 +01:00
Pascal-Nicolas Becker
ff5de4721d Merge pull request #852 from tuub/DS-640
DS-640: Fixes Internal System Error if browse index is missing in JSPUI
2015-02-03 15:22:48 +01:00
Pascal-Nicolas Becker
5e6a640ce6 Merge pull request #853 from tuub/DS-2435
DS-2435: JSPUI send 400 Bad Request for non-existent browse index
2015-02-03 15:22:31 +01:00
Pascal-Nicolas Becker
1bd7e06239 DS-640: Fixes Internal System Error if browse index is missing in JSPUI. 2015-02-03 15:20:33 +01:00
Pascal-Nicolas Becker
ade3ceb994 DS-2435: JSPUI send 400 Bad Request for unexisting browse index. 2015-02-03 15:19:19 +01:00
Christian Scheible
6e896c822e [DS-2423] Added oai overlays to classpath to ensure that oai command line tools work (like clean-cache) 2015-02-02 14:23:25 +01:00
Christian Scheible
52b804f83e [DS-2423] changed arcitecture of DSpace filters. Removed need for @Autowire because filters are not handled by spring. 2015-01-29 15:57:34 +01:00
Tim Donohue
5b6819cefe Fix broken link 2015-01-28 15:23:06 -06:00
Tim Donohue
f8e430065e Fix broken link 2015-01-28 15:22:33 -06:00
Hardy Pottinger
3d61404dbf Merge pull request #712 from ctu-developers/master
DS-2201: Unable to complete installation of DSpace with non-empty variable "db.schema" configuration file "build.properties"
2015-01-28 09:31:49 -06:00
KevinVdV
54c7f5a3bd [DS-2131] SWORDv2 ingestion fails with NullPointerException when replacing a non archived item 2015-01-28 16:25:14 +01:00
helix84
518861a26b Merge pull request #849 from atmire/DS-2429
added info about git
2015-01-28 14:10:20 +01:00
Art Lowel
49316f5b75 added info about git, also removed redundant 'on windows' mention from the headers of every windows install section 2015-01-28 11:41:18 +01:00
helix84
5480ee2dde Merge pull request #845 from christian-scheible/DS-2425
[DS-2425] fixed typos in xoai.xml
2015-01-27 11:44:32 +01:00
Christian Scheible
5066df7b0b [DS-2423] changed tests for OAI-interface to autowire the Filters. 2015-01-27 08:18:13 +01:00
Christian Scheible
37a9804483 [DS-2426] added possibility to use relative import in oai xslt transformers 2015-01-26 17:38:37 +01:00
Christian Scheible
8a407b7175 [DS-2425] fixed typos in xoai.xml 2015-01-26 16:57:11 +01:00
Christian Scheible
16b45601f1 DS-2424 workaround for bug in xoai library. changed ref to red for Filter in Contexts 2015-01-26 16:54:24 +01:00
Christian Scheible
c567547b39 [DS-2423] Added possibility to create additional Filter for DSpace OAI-PMH interface 2015-01-26 16:35:11 +01:00
Mark H. Wood
a043338207 Don't close the current sitemap if we never opened one 2015-01-24 16:46:15 -05:00
cjuergen
c8909501aa Fix for DS-2419 JSP UI ignores authorization.admin.usage. Just an incomplete name for the configuration parameter which determines the accessibility of usage statistics. 2015-01-23 18:20:59 +01:00
Mark H. Wood
a003b5f955 Corrected path to migration scripts 2015-01-21 15:00:42 -05:00
Mark H. Wood
cb2bf810b8 Corrected path to migration scripts 2015-01-21 14:59:59 -05:00
helix84
307871370b Merge pull request #839 from vidiecan/DS-2412
[DS-2412] resumptionToken link for other verbs
2015-01-20 16:36:42 +01:00
Ivan Masár
71613f096c [maven-release-plugin] prepare for next development iteration 2015-01-20 15:15:42 +01:00
Hardy Pottinger
e40c996875 [maven-release-plugin] prepare for next development iteration 2015-01-16 11:04:07 -06:00
Hardy Pottinger
cdf8378320 [maven-release-plugin] prepare release dspace-5.0 2015-01-16 11:04:01 -06:00
Hardy Pottinger
c970fb784d Merge pull request #840 from helix84/typos
typos
2015-01-16 10:04:46 -06:00
Ivan Masár
3dc71439b0 fix typos in method signatures 2015-01-16 16:31:46 +01:00
Hardy Pottinger
f809946f12 Merge pull request #837 from tdonohue/third-party-licenses
Update LICENSES_THIRD_PARTY to use a DSpace-specific template
2015-01-16 08:52:07 -06:00
Ondřej Košarko
18c3d05537 ResumptionToken link for other verbs 2015-01-16 14:30:03 +01:00
Ivan Masár
0571386370 fix typos and comments 2015-01-16 13:05:41 +01:00
Tim Donohue
50074f8cf6 Update LICENSES_THIRD_PARTY to use a DSpace-specific template 2015-01-15 16:50:37 -06:00
Hardy Pottinger
f71b9c5424 Merge pull request #836 from tdonohue/third-party-licenses
Add a way to easily manage "LICENSES_THIRD_PARTY" using codehaus license-maven-plugin
2015-01-15 16:16:36 -06:00
Tim Donohue
4c2e29cee2 Add a way to easily manage "LICENSES_THIRD_PARTY" using codehaus license-maven-plugin 2015-01-15 15:35:27 -06:00
Tim Donohue
7603aa3981 Merge pull request #835 from tdonohue/DS-2411
DS-2411: Fix memory issues by storing just a reference to ingested objects' handles
2015-01-15 10:43:21 -06:00
Tim Donohue
97d752d265 Fix DS-2411 by storing just a reference to ingested objects' handles 2015-01-15 10:20:44 -06:00
Hardy Pottinger
87b43abbea extending copyright range to 2015 2015-01-15 09:53:48 -06:00
Hardy Pottinger
869896b711 Merge pull request #820 from tdonohue/DS-2040
DS-2040: Fix AIP restore so that it works with cross-mapped Items & add AIP Integration Tests
2015-01-14 16:09:45 -06:00
Tim Donohue
1ba3d951e4 Merge pull request #822 from KevinVdV/DS-2396
[DS-2396] Checksum checker and bitstream.user_format_description
2015-01-14 15:39:19 -06:00
Tim Donohue
815adfbbc5 Merge pull request #834 from tdonohue/DS-2352
DS-2352 : Fix for when Solr index files exist, but index has no content
2015-01-14 15:32:02 -06:00
Tim Donohue
5448c540a0 Ensure we check for a valid index (with segment files) but which actually has no content in it. 2015-01-14 15:15:46 -06:00
helix84
94821554ba Merge pull request #819 from mwoodiupui/DS-2395
[DS-2395] ItemDAO* still uses bundle.name (now moved to metadatavalue)
2015-01-14 17:33:33 +01:00
helix84
798f13f144 Merge pull request #832 from christian-scheible/DS-2407
[DS-2407] fixes wrong redirect if xmlui.force.ssl is enabled.
2015-01-14 13:57:18 +01:00
helix84
7640cff2ec Merge pull request #833 from christian-scheible/DS-1810
[DS-1810] prevent exception for XMLUI language switch and loss of Query ...
2015-01-14 13:49:43 +01:00
Christian Scheible
1f0bec087b [DS-1810] prevent exception for XMLUI language switch and loss of Query String in Mirage theme. 2015-01-14 13:02:04 +01:00
Christian Scheible
77990627b8 [DS-2407] fixes wrong redirect if xmlui.force.ssl is enabled. 2015-01-13 17:18:32 +01:00
helix84
2684a6a6fa Merge pull request #831 from christian-scheible/DS-2406
[DS-2406] Fixes default sort option was always selected in XMLUI if set...
2015-01-13 16:54:02 +01:00
Christian Scheible
f5abc4051c [DS-2406] Fixes sefault sort option was allways selected in XMLUI if set in discovery.xml 2015-01-13 16:04:26 +01:00
Christian Scheible
26690d241e [DS-2344] Response date of the xoai header was not converted to ZULU time before formatting 2015-01-13 15:20:50 +01:00
Christian Scheible
7435660af0 [DS-2343] adds missing character encoding information to the response header of the OAI-Interface 2015-01-13 15:20:47 +01:00
Christian Scheible
5d9a767ac8 [DS-2342] fixes wrong validity object for opensearch responses (was valid for multiple years in every case) 2015-01-13 15:20:42 +01:00
Christian Scheible
a1438dd8ae [DS-2345] Fixes wrong start index starting at 0 instead of 1 for OpenSearch 2015-01-13 15:20:39 +01:00
Mark H. Wood
4def2dfdd9 Merge pull request #830 from helix84/DS-2405-fix-oai-javascript
Looks right, trivial change.
2015-01-13 09:11:59 -05:00
Ivan Masár
ce041f7b20 DS-2405 fix minor JS problems in OAI 2015-01-13 14:46:56 +01:00
helix84
64b2aa7c19 Merge pull request #829 from tuub/DS-2402
DS-2402 Adding to empty lines to fix ant problems
2015-01-13 12:54:35 +01:00
Pascal-Nicolas Becker
28157db070 DS-2402: Adding to empty lines to fix ant problems. 2015-01-13 12:33:13 +01:00
Pascal-Nicolas Becker
7f9939b7b0 Changing a copy and paste comment. 2015-01-13 12:32:53 +01:00
Hardy Pottinger
c035037ce4 Merge pull request #828 from KevinVdV/DS-2400
[DS-2400] Item validity in XMLUI only uses dublin core metadata schema
2015-01-12 11:27:31 -06:00
KevinVdV
8bfd317218 [DS-2400] Item validity in XMLUI only uses dublin core metadata schema 2015-01-12 16:25:25 +01:00
Mark H. Wood
7da7a84b56 Merge pull request #823 from mwoodiupui/DS-2379
[DS-2379] Sort config/launcher.xml by command name, which should result in sorted help output.
2015-01-12 09:59:39 -05:00
Mark H. Wood
2efbf6bf48 [DS-2379] Sort config/launcher.xml by command name, which should result in sorted help output. 2015-01-10 22:34:52 -05:00
Bram Luyten
7b196cf631 Merge pull request #821 from KevinVdV/DS-2282
[DS-2282] JSPUI submission remove author fails when SolrAuthority is enabled
2015-01-10 15:12:52 +01:00
Mark H. Wood
21a6c9ec1f [DS-2395] Limit lifetime of query strings within that of the instance's Context.
In theory, the value of a metadata field's ID could change at runtime.
2015-01-09 15:51:11 -05:00
Tim Donohue
7fae1f3840 Minor comment corrections / clarifications 2015-01-09 09:53:54 -06:00
KevinVdV
e1c5ededc5 [DS-2396] Checksum checker and bitstream.user_format_description on version 5.0.rc02 2015-01-09 16:15:35 +01:00
KevinVdV
e4b4809457 [DS-2282] JSPUI submission remove author fails when SolrAuthority is enabled 2015-01-09 15:22:04 +01:00
Tim Donohue
74241a4c94 Fix DS-2040 bug by ensuring recursive methods in AbstractPackageIngester / AbstractPackageDisseminator keep track of packages processed. Add enhanced integration tests to DSpaceAIPIntegrationTest which specifically test for restoration of a Mapped Item (see testRestoreMappedItem(), etc) 2015-01-08 16:33:39 -06:00
Tim Donohue
a4d382d46b AIP and METS disseminator/ingester plugins should NOT cache their instances by default. Doing so means global instance variables are never RESET properly for each individual import/export. 2015-01-08 16:28:37 -06:00
Tim Donohue
912a59bea8 Make MockConfigurationManager configurable as to whether it initializes itself from dspace.cfg or just as an empty property set. Needed for enhanced AIP integration testing 2015-01-08 16:27:29 -06:00
Tim Donohue
75d35ba172 Ensure AbstractMETSDisseminator logs all dissemination packages created, similar to how AbstractMETSIngester logs all packages parsed. 2015-01-08 16:24:17 -06:00
Mark H. Wood
650597bb3a [DS-2395] Fix Oracle syntax problems 2015-01-08 15:12:39 -05:00
Mark H. Wood
2141711e1c [DS-2395] Fix missing close parenthesis, replace subquery with the value it always returns 2015-01-08 13:53:45 -05:00
Tim Donohue
64798d47fc Merge pull request #655 from TexasDigitalLibrary/mirage2-handle-fix
[DS-2191] Fixed bug where + wouldn't expand or collapse the hidden <div> for Mirage2 Community List
2015-01-07 14:34:38 -06:00
Mark H. Wood
e149c0369f Merge pull request #803 from mwoodiupui/DS-1775
[DS-1775] Increase robustness of SolrServiceImpl date format guessing
2015-01-07 14:49:21 -05:00
Mark H. Wood
c962f736ca [DS-2395] First pass at reforming the SQL.
JOIN the Metadatavalue table and pick out the "title" for matching.
2015-01-07 13:50:15 -05:00
helix84
231e9a627b Merge pull request #818 from atmire/DS-2392
Fixed a bug with the positioning of discovery facet labels on discovery ...
2015-01-06 11:53:33 +01:00
Art Lowel
10eec1cd49 Fixed a bug with the positioning of discovery facet labels on discovery pages without a scope dropdown 2015-01-06 11:04:28 +01:00
helix84
d6a69087d7 Merge pull request #817 from antoine-atmire/DS-2374
DS-2374 authority indexing matching metadata by value
2015-01-05 16:31:54 +01:00
helix84
d2a6de890c Merge pull request #815 from lyncodev/DS-2276
DS-2276 removing dots from the html IDs
2015-01-05 16:00:21 +01:00
Ivan Masár
58a712faaf fix typos 2015-01-05 02:15:33 +01:00
Ivan Masár
52bcc60944 fix typo 2015-01-04 22:10:55 +01:00
Tim Donohue
07e5666129 Enhanced Item AIP tests...now with a test Bitstream too 2015-01-02 16:38:12 -06:00
Tim Donohue
cb6fde57cd Add more working integration tests for Community / Collection / Item restoration and replacement 2015-01-02 15:31:42 -06:00
Tim Donohue
91217421ef Merge pull request #814 from tdonohue/dspace_cfg_cleanup
Minor comment cleanup in dspace.cfg
2015-01-02 14:00:55 -06:00
Joao de Melo
7a4c505152 Fixed DS-2276 by removing dots from the html IDs 2015-01-02 18:26:15 +00:00
Tim Donohue
e2d380a90e Minor comment cleanup in dspace.cfg 2015-01-02 18:20:40 +00:00
helix84
296e1a006a Merge pull request #813 from lyncodev/DS-1959-fix
DS-1959 Upgraded xoai dependency version to 3.2.9
2014-12-29 14:17:38 +01:00
helix84
84ba424387 Merge pull request #812 from lyncodev/oai-qdc-issue
DS-2386 Created test and fixed issue
2014-12-29 14:16:09 +01:00
Joao Melo
617dfc41b1 Upgraded xoai version to 3.2.9 2014-12-29 12:34:32 +00:00
Joao Melo
1cc80df394 Added license headers 2014-12-29 12:01:21 +00:00
Joao Melo
d76a309a9f Moving xml matchers dependency to test scope 2014-12-29 11:45:40 +00:00
Joao Melo
d2c06535be Created test and fixed DS-2386 2014-12-29 11:04:23 +00:00
Tim Donohue
5a66e49573 Initial basic AIP Integration Tests which test restoration/replacement of an object hierarchy 2014-12-23 16:24:55 -06:00
Mark H. Wood
91a917356c Merge pull request #5 from hardyoyo/add-launcher-to-803
added a launcher configuration for the multi-format date parser
2014-12-22 11:30:55 -05:00
Hardy Pottinger
a994d7a084 added a launcher configuration for the multi-format date parser 2014-12-22 15:42:46 +00:00
Antoine Snyers
b50efa6a5a DS-2374 authority indexing matching metadata by value 2014-12-22 12:05:26 +01:00
Antoine Snyers
bdd0f3e7d3 DS-2374 authority indexing matching metadata by value 2014-12-22 10:00:04 +01:00
Tim Donohue
9fd6928e15 [maven-release-plugin] prepare for next development iteration 2014-12-19 13:12:35 -06:00
Tim Donohue
0950a07dcd [maven-release-plugin] prepare release dspace-5.0-rc3 2014-12-19 13:12:24 -06:00
Tim Donohue
b25f53ac85 Merge pull request #521 from zuki/DS-1974
DS-1974 Fixed bugs related to setting default filter queries
2014-12-19 12:29:45 -06:00
Hardy Pottinger
5e159f5c14 Merge pull request #783 from atmire/DS-2347-clean
DS-2347 ShibAuthentication fix to work with metadata for all - clean
2014-12-19 11:57:45 -06:00
Tim Donohue
1d58b52131 Merge pull request #809 from tdonohue/DS-2313-IE-breadcrumb
DS-2313 - Revert to compiling Mirage2 styles with SASS 3.3.14 for better IE compatibility
2014-12-19 11:09:35 -06:00
Tim Donohue
21210d4186 Cleanup of warnings in README 2014-12-19 10:50:37 -06:00
Mark H. Wood
92ccfaa16c [DS-1775] Some formats that DSpace has accepted in the past, not found in the SO article. 2014-12-19 11:34:32 -05:00
Mark H. Wood
33bcdaccda [DS-1775] Oops, handle mixed-case month names using case-insensitive match. 2014-12-19 11:33:48 -05:00
Tim Donohue
f03c14f306 Updates and reformatting/cleanup of Mirage2 README 2014-12-19 16:13:43 +00:00
Antoine Snyers
67b957841e DS-2374 authority indexing matching metadata by value 2014-12-19 09:01:39 +01:00
Tim Donohue
6a50c4945e DS-2313 - Revert to compiling with SASS 3.3.14, since bootstrap-sass has
a minor IE breadcrumb incompatibility with SASS 3.4
2014-12-18 20:59:35 +00:00
Mark H. Wood
9810b91268 [DS-1775] Add command-line code for testing dates manually 2014-12-18 11:32:50 -05:00
Tim Donohue
f424ac4b39 Merge pull request #808 from tdonohue/DS-1936-cleanup
DS-1936 followup formatting fixes for robots.txt
2014-12-18 09:10:06 -06:00
William Welling
eb428ebec0 Added caching back to discovery Navigation 2014-12-18 07:44:42 -06:00
helix84
d0ad39ce4b Merge pull request #663 from tdonohue/DS-1781
DS-1781 : Ensure LDAP "email_field" is not ignored entirely
2014-12-18 00:11:06 +01:00
Tim Donohue
68d4edabf2 Cleanup formatting of robots.txt so there are no blank lines in a group
record
2014-12-17 21:50:23 +00:00
Tim Donohue
c43f050265 Merge pull request #764 from bram-atmire/DS-2335
DS-2335 Add more default blocks for certain spiders in robots.txt
2014-12-17 15:25:49 -06:00
Mark H. Wood
6a1cafb3d4 Merge pull request #4 from atmire/DS-1775
Adding unit test for the date parser
2014-12-17 15:18:55 -05:00
helix84
f0e7c4c102 Merge pull request #807 from atmire/DS-2042
[DS-2042] Discovery/Solr is improperly indexing the "dc.description.provenance" field
2014-12-17 20:25:19 +01:00
Tim Donohue
e5032643ac Merge pull request #585 from aschweer/DS-2076-withdrawn-browse
DS-2076 withdrawn browse
2014-12-17 11:30:22 -06:00
helix84
15e4421321 Merge pull request #531 from vidiecan/DS-1993
DS-1993, return null instead of throwing exception
2014-12-17 18:25:54 +01:00
Tim Donohue
d583852757 Merge pull request #570 from rivaldi8/DS-2063-sword-keep-on-fail
DS-2063 SWORD keep-package-on-fail doesn't work for RuntimeExceptions.
2014-12-17 11:25:34 -06:00
Tim Donohue
3e8aca152b Merge pull request #544 from rivaldi8/DS-2015-ORE-data-duplicated
DS-2015 ORE data is duplicated when an item is updated through a harvest.
2014-12-17 11:14:55 -06:00
Keiji Suzuki
b253a3d8f6 DS-1599 I18nUtil.getMessage() does not return the intended language's message 2014-12-17 17:44:33 +01:00
helix84
c1a5736305 Merge pull request #715 from helix84/DS-2230-Mirage2-coll-strengths
DS-2230 Mirage2 collection strengths not displayed
2014-12-17 17:38:39 +01:00
Tim Donohue
f082b60bdf Merge pull request #248 from KevinVdV/DS-1597
[DS-1597] Browse subjects by collection count bug
2014-12-17 10:22:20 -06:00
KevinVdV
3647b825c6 Adding unit test for the date parser 2014-12-17 16:56:09 +01:00
Mark H. Wood
eec038f0bb [DS-1775] Re-add the Spring configuration and some name changes. 2014-12-17 10:54:10 -05:00
Mark H. Wood
3320a827d3 Revert "[DS-1775] Switch from configuration by injection to a CSV file in config/"
This reverts commit 63fdc64047.

KevinVdV points out that Spring defaults to a LinkedHashMap, which
preserves entry order.
2014-12-17 08:55:54 -05:00
Kevin Van de Velde
30f83addbe Merge pull request #776 from atmire/DS-2346
DS-2346 LogAnalyser fix to work with metadata for all
2014-12-17 11:50:35 +01:00
KevinVdV
aa2facd14d DS-2346 LogAnalyser fix to work with metadata for all 2014-12-17 11:27:43 +01:00
KevinVdV
02ff2d874f [DS-2042] Discovery/Solr is improperly indexing the "dc.description.provenance" field. Added the default configuration settings to the SpellIndexPlugin to ensure that the ignored metadata is not indexed in any way. 2014-12-17 10:42:44 +01:00
William Welling
74688020b4 Modified Context option Export Search Metadata 2014-12-16 16:12:14 -06:00
William Welling
8398f82eb1 Removed if(true) 2014-12-15 12:42:00 -06:00
William Welling
4aff290502 Context option link for Search Export Metadata 2014-12-15 08:21:41 -06:00
Mark H. Wood
6e79e04040 Clean up, fix license headers 2014-12-15 07:23:53 -05:00
William Welling
aeafa7212f ExportMetadata method now in SearchMetadataExportReader. Cleaned up code. Added some comments. 2014-12-14 19:35:39 -06:00
Mark H. Wood
dca692f771 Minimal unit test 2014-12-14 14:14:12 -05:00
Mark H. Wood
63fdc64047 [DS-1775] Switch from configuration by injection to a CSV file in config/
Silly thinko:  Spring would inject a Map, which potentially destroys
the order in which the patterns were written.  Rather than expanding
the XML enormously with enclosed beans, just read a CSV file.  This
preserves the written order.

Also push OpenCSV version up to dspace-parent since we now use it in
two projects:  dspace-api and dspace-xmlui.
2014-12-14 14:10:05 -05:00
William Welling
430b89b841 Fixed minor bug with null scope 2014-12-14 09:48:42 -06:00
William Welling
7807fbb1dd Include scope in search 2014-12-13 23:46:24 -06:00
William Welling
34011181f8 Redesign - much better and working correctly 2014-12-13 21:05:59 -06:00
Mark H. Wood
3551ca80e8 Finish moving parser, fix up license, catch another place we should use this. 2014-12-13 15:00:15 -05:00
Mark H. Wood
38110c7196 Moved parser out to a utility package since it is quite general. 2014-12-13 14:56:54 -05:00
William Welling
2d211e500b Free static query result if not in discovery 2014-12-13 13:27:51 -06:00
William Welling
5744ab26a8 Improved metadata export from search 2014-12-13 12:18:44 -06:00
Mark H. Wood
27f80a8148 [DS-1775] Increase robustness of SolrServiceImpl date format guessing
Replace switch on length of input with a table of regular expressions
and formats.
2014-12-12 16:00:54 -05:00
Hardy Pottinger
c417798a79 Merge pull request #798 from antoine-atmire/DS-2330
DS-2330 bug fix: lost authors when using ORCID column
2014-12-12 14:49:44 -06:00
Peter Dietz
2b1f27a84e Merge pull request #789 from aschweer/master
[DS-2354] Transfer bitstream metadata when creating new version
2014-12-11 18:24:49 -05:00
Hardy Pottinger
ef01634e53 Merge pull request #791 from LongsightGroup/DS-2350-oracle-submissions
DS-2350 XMLUI My Submissions fix for Oracle DB
2014-12-11 16:47:59 -06:00
Mark H. Wood
3faec3eb99 Merge pull request #772 from EKT/DS-2289
DS-2289: Keep NULL field language while importing items
+1
2014-12-11 15:55:34 -05:00
William Welling
a102c22349 XMLUI - export metadata from search results 2014-12-11 14:38:40 -06:00
Bill Tantzen
ffc62bb844 fixed formatting 2014-12-11 13:02:12 -06:00
Bill Tantzen
c70f99895c added synchroniztion for ArrayLists: agents and domains 2014-12-11 12:39:33 -06:00
bill
845532b29d DS-2355 uncaught NPE resulting in loss of statistic 2014-12-11 15:08:23 +01:00
Antoine Snyers
53d387fed2 DS-2330 bug fix: lost authors when using ORCID column 2014-12-11 13:39:03 +01:00
Ed Goulet
2d4200971f [DS-2333] catch OOM error on large files, continue processing 2014-12-11 10:46:30 +01:00
Peter Dietz
8ab085e3f0 Merge pull request #778 from LongsightGroup/DS-2309-scholar-author
DS-2309 Allow repeated citation keys for Scholar
2014-12-10 23:02:01 -05:00
Andrea Schweer
9a2de02968 [DS-2354] Copy across all bitstream metadata when creating version 2014-12-11 16:58:46 +13:00
Peter Dietz
a4ba3f740d DS-2350 Using Oracle rownum way to limit results 2014-12-10 22:50:14 -05:00
Peter Dietz
2cb060f7bd DS-2350 Fix My Submissions to support oracle for "Archived Submissions" 2014-12-10 22:22:22 -05:00
Peter Dietz
2e9b7ca9df DS-2309 Change mapping config from authors to author
Forgot to commit/push this change earlier
2014-12-10 22:13:15 -05:00
Andrea Schweer
ef56a640a1 [DS-2354] Copy over standard bitstream metadata 2014-12-11 14:39:31 +13:00
Andrea Schweer
594cd9a8bd [DS-2354] Avoid NPE when bitstream name is null 2014-12-11 14:39:31 +13:00
Peter Dietz
8201f6058c Merge pull request #777 from ctu-developers/REST-improvement
DS-2348 REST Bitstreams should be only in original bundle.
2014-12-10 17:27:26 -05:00
ctu-developers
fe6960a0a7 Bundles length check repair. 2014-12-10 16:45:16 +01:00
helix84
c97ac098e7 Merge pull request #785 from tdonohue/DS-2352
DS-2352: IndexVersion.java attempts (and fails) to update and maintain empty indexes
2014-12-09 20:18:53 +01:00
Tim Donohue
a2f157d212 Fix DS-2352 : If an index directory is empty, it's obviously compatible with any version of Lucene. 2014-12-09 11:24:36 -06:00
ctu-developers
084d02f83b Added missing bracket. 2014-12-08 12:17:54 +01:00
ctu-developers
4f26ab3e33 Replace finding original bundle.
Replace finding original bundle by getBundles("ORIGINAL").
2014-12-08 11:59:37 +01:00
philip Vissenaekens
191d9b68bb DS-2347 ShibAuthentication fix to work with metadata for all - clean 2014-12-08 11:13:38 +01:00
Peter Dietz
b03ffc90e5 Merge pull request #748 from rradillen/DS-2296
DS-2296 Lucene-based search throws linkage error
2014-12-05 15:24:07 -05:00
helix84
6c3dee2cd0 Merge pull request #754 from helix84/DS-2310-ldap-props
DS-2310 JSPUI uses outdated LDAP config properties
2014-12-05 16:48:08 +01:00
helix84
f2265197e8 Merge pull request #745 from helix84/DS-1447-login-as-redirect
DS-1447 Login as User redirecting to wrong page
2014-12-05 16:45:56 +01:00
Peter Dietz
8d74cca725 Merge pull request #759 from helix84/DS-2277-stats-link-labels
DS-2277 Double link to usage statistics
2014-12-05 10:44:28 -05:00
helix84
2ed29df3ba Merge pull request #780 from atmire/DS-2225
[DS-2225] Error logging/preventing in the authority script
2014-12-05 16:29:34 +01:00
KevinVdV
2efad2f2d2 [DS-2225] Error logging/preventing in the authority script 2014-12-05 15:55:35 +01:00
bert
07de2067aa [DS-2225] Error logging/preventing in the authority script 2014-12-05 14:19:19 +01:00
Peter Dietz
2a727267ae DS-2309 Allow repeated citation keys for Scholar
Google Scholar would prefer the citation_author is each on a separate line
So that has been done for author.
2014-12-04 12:14:07 -05:00
ctu-developers
cedb7de0e4 Removed copy-paste error 2014-12-04 17:20:43 +01:00
ctu-developers
09b42b8be6 DS-2348 REST Bitstreams should be only in original bundle.
Better logic at adding bitstream to bundle. It checks if bundle original
exists.
2014-12-04 17:03:20 +01:00
philip Vissenaekens
f2213f06ad DS-2346 LogAnalyser fix to work with metadata for all 2014-12-04 16:21:07 +01:00
helix84
7195851aa1 Merge pull request #775 from atmire/DS-2313
DS-2313: Mirage2 svg logo fix for ie10
2014-12-04 14:15:28 +01:00
philip Vissenaekens
6e447d18a1 DS-2313: Mirage2 svg logo fix for ie10 2014-12-04 13:55:53 +01:00
helix84
6ff76ea5dc Merge pull request #773 from rradillen/DS-2338
DS-2338 add classes artifact to dspace-rest
2014-12-04 12:03:53 +01:00
Mark H. Wood
ed16e897bb Merge pull request #774 from mwoodiupui/DS-2328
[DS-2328] Remove 'below' from input form hints
2014-12-03 14:44:05 -05:00
Mark H. Wood
73ed8ebf3b [DS-2328] Remove 'below' from input form hints 2014-12-03 13:43:13 -05:00
Bram Luyten
6f54c77084 Merge pull request #751 from rivaldi8/DS-2300-authors-visualisation-mirage2
[DS-2300] Different visualisation of author fields in Mirage 2
2014-12-03 17:52:27 +01:00
Peter Dietz
8fd1d3f552 Merge pull request #765 from EKT/DS-2336
DS-2336: Some enhancements regarding UI Batch Import (JSPUI)
2014-12-02 18:25:26 -05:00
Roeland Dillen
ae8d931067 add classes artifact to dspace-rest 2014-12-02 10:31:50 +01:00
Kostas Stamatis
422cfdafec bug fix: take care the first time the batch import page is displayed 2014-12-01 14:00:23 +02:00
Kostas Stamatis
2f026f3544 when batch import fails, pass to JSP the old values in order to display them again 2014-12-01 13:40:27 +02:00
Kostas Stamatis
b36b0f262a display other collections select box only if owning collection is already selected 2014-12-01 12:48:05 +02:00
Kostas Stamatis
1fed188491 change order of batch import type selection options (first SAF local upload and then SAF remote) 2014-12-01 12:18:21 +02:00
Kostas Stamatis
898173a154 style error stacktrace message in import history for failed imports 2014-12-01 12:14:26 +02:00
Kostas Stamatis
604e90cf24 change styling of info message in batch import success 2014-12-01 11:00:42 +02:00
Kostas Stamatis
0ee94cb4f0 fix typo in message properties 2014-11-28 15:59:06 +02:00
Kostas Stamatis
3f6d87101e leave the language to a null value, if so, while importing items 2014-11-28 15:53:30 +02:00
Kostas Stamatis
7707a29190 fix bug with import resuming 2014-11-28 14:09:37 +02:00
Kostas Stamatis
2691bbc806 fix order of imports display in history 2014-11-28 13:18:15 +02:00
Kostas Stamatis
c1ab32d39f for erroneous imports, stacktrace is displayed in email sent to user + in the import log history 2014-11-28 12:56:33 +02:00
Kostas Stamatis
d90fdec1e1 fix problem with a localized message that appears as literal 2014-11-28 10:17:57 +02:00
Kostas Stamatis
0900bdc60d bug fix: add missing javascript function to show/hide items div 2014-11-27 15:01:23 +02:00
Kostas Stamatis
f336d8277c add missing message properties 2014-11-27 15:00:51 +02:00
Kostas Stamatis
6078adc285 revise some message properties keys 2014-11-27 14:49:23 +02:00
Kostas Stamatis
8f6612c777 display item handles (with links) in batch import report 2014-11-27 13:35:01 +02:00
Kostas Stamatis
e383ab86ef display a more explanatory message in batch import success with a link to where the user can see his batch imports 2014-11-27 13:04:05 +02:00
Bram Luyten
5c3eb75149 jspui fix simple search 2014-11-27 11:48:03 +01:00
Kostas Stamatis
7a3365cf62 support batch import of Simple Archive Format via upload file 2014-11-27 12:46:35 +02:00
Bram Luyten
f3d5caaed5 Locking the door for bad behaving bots 2014-11-27 11:43:08 +01:00
helix84
bdbff389a9 Merge pull request #763 from antoine-atmire/DS-2334
[DS-2334] Mirage 2 forms styling bugfix
2014-11-25 15:08:18 +01:00
Antoine Snyers
4f2787e425 [DS-2334] Mirage 2 forms styling bugfix 2014-11-25 10:09:04 +01:00
Pascal-Nicolas Becker
193418bd95 Content Negotiation should be switched off by default. 2014-11-21 12:03:31 +01:00
Ivan Masár
ebc01743bf DS-2277 Double link to usage statistics 2014-11-21 09:31:41 +01:00
helix84
d507fc4d1d Merge pull request #758 from mwoodiupui/DS-2248
DS-2248 XMLUI Delete Community doesn't work
2014-11-20 21:42:30 +01:00
helix84
0f827a3b9c Merge pull request #757 from rivaldi8/DS-2317-hide-elements-from-print
[DS-2317] Some elements shouldn't appear when printing a page
2014-11-20 20:27:43 +01:00
Àlex Magaz Graça
7f08baffed [DS-2317] Some elements shouldn't appear when printing a page 2014-11-20 13:34:43 +01:00
Roeland
7b39a2b59e change hidden noop to error log 2014-11-20 12:00:39 +01:00
Mark H. Wood
bca1b2cf0e DS-2248 Ensure that DSpaceObject subclasses create typed TableRows when instantiated. 2014-11-19 17:11:57 -05:00
Mark H. Wood
257dfe544d DS-2248 Test deletion of contained Item when deleting Community. Fix
failure.
2014-11-19 17:10:03 -05:00
Mark H. Wood
47140ea8cc DS-2248 Correct dependencies for direct use of Hamcrest 2014-11-19 17:05:50 -05:00
Tim Donohue
58f7734400 Merge pull request #749 from tdonohue/DS-2297
DS-2297: Auto upgrade Solr indexes
2014-11-19 09:56:16 -06:00
Ivan Masár
eac26b8330 DS-2310 JSPUI uses outdated LDAP config properties 2014-11-19 01:09:34 +01:00
Tim Donohue
72ae84e144 Bug fix to previous commit. Removing 'authority' index from Solr check
as it seems problematic if index is not initialized. Also ensure
Discovery reindex isn't triggered multiple times if an error occurs.
2014-11-18 22:34:06 +00:00
Tim Donohue
0c166a937a Update to check Discovery & new Authority indexes in 'ant update_solr_indexes'. Also corrected auto-reindexing of Discovery in Flyway logic, as it needs to both overwrite existing index AND recreate the spellchecker index. 2014-11-18 10:09:45 -06:00
helix84
dce6563dc0 Merge pull request #746 from atmire/DS-2295
[DS-2295] Index authority script malfunctions
2014-11-18 15:40:28 +01:00
KevinVdV
59ebb18a6a [DS-2295] Index authority script improvement for large database indexing 2014-11-18 14:42:44 +01:00
Roeland Dillen
99d3a04720 update LuceneMatchVersion to 'Current' 2014-11-18 09:18:34 +01:00
Roeland
4eb7cb6390 prevet dependency management from dspace-parent pom to override solr dependency on lucene 4.10.2 2014-11-18 09:13:35 +01:00
Tim Donohue
747ba5fbcb Refactor logic to work with Lucene API v4.10.2. Also ensure we don't download latest Lucene JAR, as it is already on our classpath. 2014-11-17 16:31:31 -06:00
Tim Donohue
84caaa9abf Improved error handling. Ensure "ant help" also lists update_solr_indexes" 2014-11-17 14:42:03 -06:00
Tim Donohue
68e531d4e9 Minor spelling correction 2014-11-17 14:41:58 -06:00
Tim Donohue
e7adb08d7a DS-2297: Add "IndexVersion" commandline script, and "ant update_solr_indexes" to auto-update our indexes as needed. 2014-11-17 14:41:55 -06:00
Peter Dietz
6700d77de9 Merge pull request #752 from LongsightGroup/DS-2301-bump-lucene-es
DS-2301 Bump Lucene to 4.10.2 and ElasticSearch to 1.4.0
2014-11-17 15:32:26 -05:00
Peter Dietz
b4d4f56beb DS-2301 Bump Lucene to 4.10.2 and ElasticSearch to 1.4.0
We don't need to have inconsistent lucene versions lying around
2014-11-17 13:13:46 -05:00
Àlex Magaz Graça
8d84c16fbe [DS-2300] Different visualisation of author fields in Mirage 2 2014-11-17 12:33:28 +01:00
Peter Dietz
4db2698bee Merge pull request #747 from atmire/DS-2217
[DS-2217] Removing SSL ignore option for the rest connector
2014-11-14 14:04:06 -05:00
KevinVdV
35492a9166 [DS-2217] Removing SSL ignore option for the rest connector since it was linked to a nonexistent orcid.cfg file. 2014-11-14 16:09:11 +01:00
KevinVdV
1b127d3515 [DS-2295] Index authority script malfunctions 2014-11-14 14:29:53 +01:00
Ivan Masár
f7e6377b01 DS-1447 Login as User redirecting to wrong page 2014-11-13 10:51:18 +01:00
helix84
c93a50cfcb Merge pull request #743 from LongsightGroup/DS-2275-mathjax-error
DS-2275 XMLUI Error Page onclick errors
2014-11-12 19:29:58 +01:00
Peter Dietz
9f29cab98e DS-2275 Fix browser support for error page link to show stack error
The link to show the stack trace, uses a javascript call, this should be
an onclick, not a href, otherwise a browser like firefox opens a js console
To make this work, I had to extend xref to have an onclick attribute.
2014-11-11 23:36:38 -05:00
Peter Dietz
9c85d9487b DS-2275 Not render MathJax in error page exception 2014-11-11 23:31:04 -05:00
Hardy Pottinger
16621310ca [maven-release-plugin] prepare for next development iteration 2014-11-10 22:49:16 +00:00
Hardy Pottinger
7dcd770812 [maven-release-plugin] prepare release dspace-5.0-rc2 2014-11-10 22:49:10 +00:00
Peter Dietz
ef15bbd4c0 Merge pull request #742 from LongsightGroup/DS-2274-log4j-delete-success
DS-2274 Only report error if the log CAN'T be deleted
2014-11-10 16:03:15 -05:00
Peter Dietz
752c0100c9 DS-2274 Only report error if the log CAN'T be deleted 2014-11-10 15:59:23 -05:00
Peter Dietz
b95b3c304c Merge pull request #741 from peterdietz/itemimport-cleanup
DS-2204 Consolidate/Clean Batch Import UI code
2014-11-10 15:55:13 -05:00
Ivan Masár
8a56f67c27 DS-2270 5.0rc1 won't build with Mirage2 2014-11-08 12:36:10 +01:00
Ivan Masár
718bfa4b62 fix typos 2014-11-08 11:59:44 +01:00
Hardy Pottinger
978ec2f152 [maven-release-plugin] prepare for next development iteration 2014-11-07 22:42:47 +00:00
Hardy Pottinger
884519a9f3 [maven-release-plugin] prepare release dspace-5.0-rc1 2014-11-07 22:42:43 +00:00
Peter Dietz
b1033bdd01 Merge pull request #3 from EKT/itemimport-cleanup
Some ItemImport clean up
2014-11-07 17:31:52 -05:00
Hardy Pottinger
453177b0fc increment lang pack version number for dspace-xmlui-lang as well 2014-11-07 16:23:35 -06:00
Hardy Pottinger
b8c4e1a50a [maven-release-plugin] rollback the release of dspace-5.0-rc1 2014-11-07 22:20:16 +00:00
Hardy Pottinger
031f9c7b20 [maven-release-plugin] prepare for next development iteration 2014-11-07 22:17:30 +00:00
Hardy Pottinger
26e9035ac6 [maven-release-plugin] prepare release dspace-5.0-rc1 2014-11-07 22:17:21 +00:00
Hardy Pottinger
6f094a9eec [maven-release-plugin] rollback the release of dspace-5.0-rc1 2014-11-07 22:00:53 +00:00
Hardy Pottinger
75da65b5ee [maven-release-plugin] prepare for next development iteration 2014-11-07 21:55:27 +00:00
Hardy Pottinger
917aff3f8d [maven-release-plugin] prepare release dspace-5.0-rc1 2014-11-07 21:55:21 +00:00
Hardy Pottinger
a7c5764e70 update language pack ranges in preparation for the release of DSpace 5.0 2014-11-07 15:43:07 -06:00
Hardy Pottinegr
6d7075bf66 [maven-release-plugin] rollback the release of dspace-5.0-rc1 2014-11-07 21:33:41 +00:00
Hardy Pottinegr
f5dc0a604a [maven-release-plugin] prepare for next development iteration 2014-11-07 21:15:00 +00:00
Hardy Pottinegr
d138359f92 [maven-release-plugin] prepare release dspace-5.0-rc1 2014-11-07 21:14:52 +00:00
Peter Dietz
ddd4214dce Merge pull request #740 from LongsightGroup/DS-2267-solr-export
DS-2267 SOLR usage statistics to export to common format
2014-11-07 15:33:14 -05:00
Peter Dietz
64d6aedb25 Solr usage event export to handle previous version data
DSpace pre-3.0 only tracked view/download usage events. When DSpace 3 introduced workflow/search tracking, these older usage events didn't get converted. This commit adds a query to find them too.
2014-11-07 14:41:32 -05:00
Peter Dietz
3531e9cef5 SOLR export, change bad IP addresses 2014-11-07 14:41:23 -05:00
Peter Dietz
f57619d726 Export SOLR Usage Statistics data to intermediate format
bin/dspace stats-util --export
2014-11-07 14:41:13 -05:00
Peter Dietz
a2d513e59e Merge pull request #739 from LongsightGroup/DS-2269-es-schema-file
DS-2269 Move Elastic Search schema to a resources file, and out of java
2014-11-07 14:38:25 -05:00
Peter Dietz
b3ed29d521 Merge pull request #730 from LongsightGroup/DS-2111-noindex-media-filter
DS-2111 Remove lucene index operation at end of media filter run
2014-11-07 14:31:01 -05:00
Peter Dietz
9f622b457c Merge pull request #527 from peterdietz/DS-1976-rest-unlisted-items
REST to not show unlisted items in Collection item list, fixes DS-1976
2014-11-07 14:30:19 -05:00
Tim Donohue
d17f1b4699 Ensure all modules listed in release profile and alphabetize them. 2014-11-07 19:23:24 +00:00
Peter Dietz
0f612d7edb DS-2269 Move Elastic Search schema to a resources file, and out of java 2014-11-07 14:20:30 -05:00
Mark H. Wood
829239f999 Merge pull request #732 from rradillen/DS-2253
DS-2253: bumping solr version
2014-11-07 13:20:06 -05:00
Roeland Dillen
8e2f87e755 add docvalues to docvalue capable fields for better facet performance 2014-11-07 17:08:41 +01:00
helix84
c630b656ac Merge pull request #738 from atmire/DS-2264
DS-2264 locked Mirage2 version numbers
2014-11-07 15:12:25 +01:00
helix84
b35cf6f48c Merge pull request #737 from atmire/DS-2265
DS-2265 Publisher information header in uploadstep
2014-11-07 15:05:58 +01:00
philip Vissenaekens
488d37e826 DS-2264 locked Mirage2 version numbers 2014-11-07 14:49:48 +01:00
philip Vissenaekens
e7576cefc8 DS-2265 Publisher information header in submissions will only be shown when there is information available to show 2014-11-07 14:10:02 +01:00
rradillen
7320c85dde Merge pull request #2 from LongsightGroup/DS-2253-es-bump
DS-2253 Also bump Lucene and Elastic Search
2014-11-07 11:37:29 +01:00
helix84
ba1596dd05 Merge pull request #735 from mwoodiupui/DS-2258
[DS-2258] Ask the objects for their names and Handles
2014-11-07 00:40:08 +01:00
Tim Donohue
59a962ce3e Merge pull request #736 from tdonohue/flyway-migrations-to-jar
DS-2259 : Move all Flyway SQL migrations to 'dspace-api.jar' to discourage running them manually
2014-11-06 17:16:17 -06:00
Peter Dietz
f9074ed263 Removing unneeded Elasticsearch imports from JSPUI 2014-11-06 18:12:40 -05:00
Tim Donohue
e281dc8f1c Fix license headers in SQL files. 2014-11-06 16:56:06 -06:00
Peter Dietz
47a62ae9b5 Bump Elastic Search version from 0.90.3 to 1.3.4 2014-11-06 17:35:24 -05:00
Peter Dietz
dad7ba730b Bump lucene version from 4.4.0 to 4.9.1 2014-11-06 17:35:05 -05:00
Tim Donohue
0e80b5488b Minor bug fix for H2 / Unit Testing 2014-11-06 16:25:59 -06:00
Tim Donohue
9bfa417f18 Move all Flyway SQL migrations to 'dspace-api.jar' to discourage running them manually. 2014-11-06 15:52:10 -06:00
Mark H. Wood
a2ce3fbdbf [DS-2258] Ask the objects for their names and Handles 2014-11-06 16:44:21 -05:00
Tim Donohue
5fb04adec9 Merge pull request #731 from tdonohue/flyway_oracle_fixes
Flyway fixes for Oracle (DS-2244, DS-2250, DS-2251)
2014-11-06 13:19:37 -06:00
Tim Donohue
9ecd3ff710 Minor cleanup of System.out messages so they mostly fit in 80 char lines 2014-11-06 12:56:35 -06:00
Ivan Masár
0865ca4bda DS-2230 Mirage2 collection strengths not displayed 2014-11-06 19:41:19 +01:00
Tim Donohue
ad319b9372 Minor spelling fix. 2014-11-06 17:23:21 +00:00
Hardy Pottinger
ef78eca2a1 Merge pull request #721 from hardyoyo/DS-2201-add-oracle-schema-advice
[DS-2201] added config advice to warn oracle users against using schema
2014-11-06 11:02:22 -06:00
Tim Donohue
059a426deb Fix bug where sequence_name wasn't being canonicalized in
sequenceExists(). This caused issues on Postgres
2014-11-06 16:53:21 +00:00
Mark H. Wood
e8563c716b Merge pull request #734 from mwoodiupui/DS-2119
[DS-2119] Add a modified transform to meet EZID requirements.
2014-11-06 11:16:30 -05:00
Mark H. Wood
1812209ed6 Add a modified transform to meet EZID requirements.
The EZID provider depends on the registrar to generate and return the
identifier, so it cannot supply one in the request. But the DataCite
XML schema requires an "identifier" element. A new transform is
offered, which generates an empty "identifier" element, satisfying
EZID.
2014-11-06 11:11:59 -05:00
Mark H. Wood
33abc10c11 Merge pull request #621 from umd-lib/ezid-metadata-mapping
DS-2119. EZID IdentifierProvider Metadata Mapping.
In the interest of time, merging this despite a problem with the transform, for which I already have a solution.  A separate PR will provide that solution.
2014-11-06 11:08:45 -05:00
Roeland Dillen
12415eda5b licence problem 2014-11-06 09:54:49 +01:00
Roeland
32e096fd3d excluding jetty and bumping lucene match version 2014-11-06 07:59:37 +01:00
Tim Donohue
4f01a83fea More refactoring. Fix an infinite migration loop caused by "dspace database migrate [version]" accidentally recalling DatabaseManager.initialize() (required moving MigrationUtils). Also add detailed warnings to this hidden migrate option. 2014-11-05 16:39:05 -06:00
Roeland
f6c83e451c missed some lucene references 2014-11-05 22:23:45 +01:00
Roeland
007524b821 solr version bump pt 1 2014-11-05 22:02:50 +01:00
Tim Donohue
af7ba8a41a Refactor Flyway DatabaseUtils to properly search by Oracle "Schema" (i.e. User), see getSchemaName()
Also add a (hidden) ability to initialize an *old* version of a DSpace DB for testing purposes.
2014-11-05 14:09:24 -06:00
Peter Dietz
8aeeffc4ac DS-1976 Don't list private items in new REST endpoints
Private items are listable to admin, not to other users
These are new endpoints from REST CRUD
2014-11-05 13:17:22 -05:00
Peter Dietz
0da2c9d6b8 REST to not show unlisted items in Collection item list, fixes DS-1976
This also introduces ItemService.isItemListedForUser, a service method that
can be a central piece of code that checks if Item is READ, and listed
2014-11-05 12:12:25 -05:00
Bram Luyten
14a06c692e Merge pull request #729 from atmire/DS-2252
DS-2252 Discovery search results fix back-button cross browser support
2014-11-05 18:08:13 +01:00
Peter Dietz
947bb110bb DS-2111 Remove lucene index operation at end of media filter run 2014-11-05 11:45:28 -05:00
Art Lowel
c2d1ca1463 Fixed an issue where discovery form elements would break after you returned to a search results page using the back button 2014-11-05 17:38:48 +01:00
Mark H. Wood
b2a729aead Merge pull request #723 from mwoodiupui/DS-2240
[DS-2240] EZID IdentifierProvider doesn't handle non-Items gracefully
2014-11-05 09:42:50 -05:00
helix84
93e245b3fb Merge pull request #728 from tuub/DS-2245
DS-2245: Missing name argument for the html select tag.
2014-11-05 15:32:50 +01:00
Pascal-Nicolas Becker
aab6a66586 DS-2245: Missing name argument for the html select tag. 2014-11-05 15:19:21 +01:00
helix84
7e811de65a Merge pull request #725 from rivaldi8/DS-2228-ore-harvested-no-bitstreams-links-mirage2-alt
[DS-2228] ORE-harvested items don't show links to files in Mirage 2 - alternative
2014-11-05 14:28:56 +01:00
Pascal-Nicolas Becker
41f068ae06 Merge pull request #726 from tuub/DS-2246
DS-2246: Simple obvious bugfix.

This PR is so simple and important that I merge it directly.
2014-11-05 12:35:38 +01:00
Pascal-Nicolas Becker
65e6fa4d06 Simple obvious bugfix for DS-2246. 2014-11-05 12:27:51 +01:00
Kostas Stamatis
0bbddc3bf5 merge two different methods that handle UI requests for batch import + enhance unzip method 2014-11-05 13:15:46 +02:00
Àlex Magaz Graça
20d25dc514 Remove unused template.
It's never called.
2014-11-05 10:40:16 +01:00
Àlex Magaz Graça
b07ece81b7 [DS-2228] ORE-harvested items don't show links to files in Mirage 2 2014-11-05 10:40:16 +01:00
Tim Donohue
b4291c274f Merge pull request #724 from tdonohue/DS-2243
DS-2243: Rework/Refactor XMLWorkflow migration so that it works properly with Flyway
2014-11-04 14:00:39 -06:00
Tim Donohue
c4bb99a2a7 Rework/Refactor XMLWorkflow migration so that it works properly with Flyway and can be enabled via a configuration flag. Also replace DatabaseManger.loadSql() with DatabaseUtils.executeSql() as ALL SQL should be run via Flyway parser now. 2014-11-04 11:54:00 -06:00
helix84
c45aca9e97 Merge pull request #697 from atmire/DS-2196
[DS-2196] License files do not support UTF-8 characters
2014-11-04 09:12:32 +01:00
Mark H. Wood
46a608dd21 [DS-2240] Handle all types of DSOs, not just Items 2014-11-03 17:00:25 -05:00
Pascal-Nicolas Becker
5147e32037 Merge pull request #722 from tuub/DS-1798
DS-1798: Reenabling the XSLTDissemination crosswalk.
2014-11-03 19:39:01 +01:00
Mark H. Wood
71b57be1ac Merge pull request #671 from mwoodiupui/DS-1750
[DS-1750] Git clone is becoming slow
2014-11-03 13:07:45 -05:00
Pascal-Nicolas Becker
3386ad5761 Reenabling the XSLTDissemination crosswalk. 2014-11-03 19:04:58 +01:00
Mark H. Wood
cd428fc4d1 Merge pull request #711 from grahamtriggs/master
DS-2222 FindBugs fix of OAIHarvester fall-through switch statement, if paused
2014-11-03 13:04:58 -05:00
Ivan Masár
801eb3fb2f DS-1798 commenting out the plugin caused syntax error 2014-11-03 18:22:10 +01:00
rradillen
18deabb4a3 DS-1820 Introduction of URL validators in SolrServiceImpl breaks .local urls 2014-11-03 16:46:10 +01:00
Hardy Pottinegr
92f5f345da [DS-2201] added config advice to warn oracle users against using the schema configuration 2014-11-03 15:44:00 +00:00
Peter Dietz
17ede9cf1b Merge pull request #716 from LongsightGroup/DS-2231-create-administrator-password
DS-2231 Don't echo create-administrator password
2014-11-03 10:21:11 -05:00
Mark H. Wood
0e0823f69d Merge pull request #719 from mwoodiupui/DS-2237
[DS-2237] DS-1883 missed DCValues in JSP code
Well, the omission was an obvious blunder, once noticed.  The fix is to just replace DCValue with Metadatum throughout JSP code, where it went un-noticed by NetBeans' automagical refactoring.
2014-11-03 08:24:42 -05:00
helix84
8b14e1f548 Merge pull request #720 from rradillen/patch-7
Update Metadatum.java
2014-11-03 10:11:52 +01:00
rradillen
2221bd02f2 Update Metadatum.java
getfield comments were above the copy method.
2014-11-03 09:50:41 +01:00
Bram Luyten
06358d17f8 Merge pull request #630 from atmire/DS-2134
DS-2134 missing configuration properties for mirage2
2014-10-31 23:40:36 +01:00
Mark H. Wood
4e096e467c [DS-2237] DS-1883 missed DCValues in JSP code 2014-10-31 16:06:19 -04:00
Mark H. Wood
c3d64ef956 Merge pull request #673 from mwoodiupui/DS-1883
[DS-1883] Rehabilitate DCValue
2014-10-31 15:25:46 -04:00
Mark H. Wood
3b210df0d8 Update to stay in sync. with merged PRs 2014-10-31 15:10:38 -04:00
Mark H. Wood
f1a36d74ce Update to stay in sync. with merged PRs 2014-10-31 14:48:24 -04:00
Mark H. Wood
1963282d54 Update to stay in sync. with merged PRs 2014-10-31 14:48:24 -04:00
Mark H. Wood
e440e64739 [DS-1883] Un-deprecate DCValue and rename it.
It seems that the reason for deprecation was objection to the *name*,
since it is not strictly for DC anymore.
2014-10-31 14:48:24 -04:00
Tim Donohue
a5d077b708 Remove obsolete upgrade scripts and clean-database.sql. Related to
DS-2167
2014-10-31 17:04:03 +00:00
Mark H. Wood
8f2fe3abf0 Merge pull request #686 from tdonohue/DS-2167_flyway
DS-2167: Add Flyway automatic database upgrades to DSpace
2014-10-31 10:46:42 -04:00
Tim Donohue
ed9725e397 Fixes to the Oracle 1.4 migration. Needs to update metadata sequences inline (after migrating from dctyperegistry to metadataschemaregistry) 2014-10-31 14:17:47 +00:00
Tim Donohue
4dd979c150 Improved error handling. Catch any FlywayExceptions and translate to SQLException 2014-10-31 14:17:47 +00:00
Tim Donohue
41b7eb3e3f Fix for Oracle startup problems. The Flyway "schema_version" table is ALWAYS lowercase. 2014-10-31 14:17:46 +00:00
Tim Donohue
efbb639cdd Bug fix for default Group initialization. Fixes Group update error with upgrading. 2014-10-31 14:17:46 +00:00
Tim Donohue
46ccc954ca Report db.url before most 'database' commands 2014-10-31 14:17:46 +00:00
Tim Donohue
d51c39134e Improve 'clean' command for Oracle. Minor cleanup of commandline output, etc. 2014-10-31 14:17:45 +00:00
Tim Donohue
37351c5391 More fixes for Oracle. Cannot update sequences mid-upgrade. Will create a post-upgrade script for sequence updates 2014-10-31 14:17:45 +00:00
Tim Donohue
9f4c030fed More fixes for fresh_install. Don't create initial Groups in SQL
migrations, instead create them after DB is initialized
2014-10-31 14:17:45 +00:00
Tim Donohue
82016403d7 Fixes to fresh_install process for Flyway. Ensure registries are updated once registry tables exist 2014-10-31 14:17:44 +00:00
Hardy Pottinegr
f24e6cbb73 fixed minor syntax complaints to keep oracle happy 2014-10-31 14:17:44 +00:00
Tim Donohue
6907c33e53 Add DB version guess to "database info" command. Also look for 5.0
compatible databases
2014-10-31 14:17:44 +00:00
Tim Donohue
418688d2f2 Ensure reindexing only gets called once by properly synchronizing calls 2014-10-31 14:17:43 +00:00
Tim Donohue
53cd83feb0 Minor tweaks to help info for 'dspace database' commands 2014-10-31 14:17:43 +00:00
Tim Donohue
3b2cb74ce2 Fork off new thread to perform Discovery reindexing 2014-10-31 14:17:43 +00:00
Tim Donohue
496e35d60f Don't try to cleanup old Browse tables on *every* migration. It only needs to be done once. Also use ConfigurationManager, since Kernel is sometimes null. 2014-10-31 14:17:42 +00:00
Tim Donohue
93f4124cfb Refactor for commandline tools. Ensure Flyway is NOT kicked off during test connections. Refactor DatabaseManager to move commandline tools to DatabaseUtils 2014-10-31 14:17:42 +00:00
Tim Donohue
f2771f6fda Fix auto-reindexing of Solr. Solr will reindex on first access 2014-10-31 14:17:41 +00:00
Tim Donohue
78c2a10bb9 Fixes to startup post-db-migration. XMLUI & JSPUI now should startup.
Scaffolding for auto-reindexing in Solr
2014-10-31 14:17:41 +00:00
Tim Donohue
c27ed73783 Disable DatabaseReindexer. It's problematic as DSpace Kernel doesn't yet exist and Solr isn't running when DB migration runs. 2014-10-31 14:17:41 +00:00
Tim Donohue
c868cb20db Bug fix in determining if a Format Registry entry already exists. Also check for short description. 2014-10-31 14:17:40 +00:00
Tim Donohue
5674474c2c Add a check for DSpace 1.7.x. Minor cleanup as we were checking for 1.4 twice. 2014-10-31 14:17:40 +00:00
Tim Donohue
eec093c0fc Initial version of DSpace database version checks 2014-10-31 14:17:40 +00:00
Tim Donohue
d02e4e618c Support case-insensitive table name searches to determine DSpace version 2014-10-31 14:17:39 +00:00
Tim Donohue
460644d66a Initial Oracle migration scripts from 1.2 -> 4.0 2014-10-31 14:17:39 +00:00
Tim Donohue
e164e4f79a H2 migration scripts from DSpace 1.2 -> 4.0 2014-10-31 14:17:39 +00:00
Tim Donohue
9dc5a5290b Rework Postgres migrations slightly to drop constraints via Java
migrations (which is needed for other DB types)
2014-10-31 14:17:38 +00:00
Tim Donohue
28e5418479 Refactor common migration methods into MigrationUtils to support easier to built Java migrations 2014-10-31 14:17:38 +00:00
Tim Donohue
98a8a0d24c Adding database migrations for PostgreSQL back to 1.1 2014-10-31 14:17:38 +00:00
Tim Donohue
3ea35fa055 Update launcher to use DatabaseUtils (Flyway) for database setup/clean commands 2014-10-31 14:17:37 +00:00
Tim Donohue
5d87c70b5f Refactoring. Adding callbacks to auto-update registry & auto-index post migrations. Updates to Unit Tests and code to use those callbacks. Cleanup of Ant build process based on changes 2014-10-31 14:17:37 +00:00
Tim Donohue
55dd906250 Fix broken ItemTest.testMove() (fails on PostgreSQL). Also fix broken/backwards logic in Collection.removeItem() 2014-10-31 14:17:37 +00:00
Tim Donohue
62d106edc5 Fix DatabaseManagerTest to work for different DB types (Postgres, Oracle or H2) 2014-10-31 14:17:36 +00:00
Tim Donohue
ccad925b1a Tweak MockDatabaseManager to allow Unit Testing against a PostgreSQL or Oracle DB (for easier DB migration testing). Fix problematic H2 migration. 2014-10-31 14:17:36 +00:00
Tim Donohue
b1bf32528f Remove old database_schema.sql from Unit testing 2014-10-31 14:17:35 +00:00
Tim Donohue
71279b4d63 README and NOTICE updates/enhancements. Changing them all to be markdown format for easier viewing on GitHub 2014-10-31 14:17:35 +00:00
Tim Donohue
f64c93943d Add missing license headers 2014-10-31 14:17:35 +00:00
Tim Donohue
07839fb53a Updates to fix Unit Testing in H2. Unfortunately requires H2 having its own custom migration scripts, and some rework of how DatabaseManager initializes 2014-10-31 14:17:34 +00:00
Tim Donohue
e7f12da265 Fixes so that Unit Tests just use Flyway DB as well 2014-10-31 14:17:34 +00:00
Tim Donohue
4c74dbe774 Improved initialization logic so that it also handles "fresh_install" scenario 2014-10-31 14:17:34 +00:00
Tim Donohue
aaa31c0eb8 Reworking XMLWorkflow migration into a Flyway Java migration (which only changes DB when enabled). DB script cleanup. 2014-10-31 14:17:33 +00:00
Tim Donohue
63b05bf996 Create a new "migrations" directory for flyway. Remove all manual
migration scripts.
2014-10-31 14:17:33 +00:00
Tim Donohue
ef4ff511be Configure DSpace DatabaseManager to use Flyway DB to auto-migrate DB schemas 2014-10-31 14:17:33 +00:00
Robin Taylor
cd902ca4b5 Merge pull request #549 from terrywbrady/DS-2027
DS-2027 Update bitstream-ordering.js
2014-10-31 13:57:06 +00:00
Hardy Pottinger
7d0d68960a Merge pull request #718 from mwoodiupui/DS-2195
[DS-2195] importing AIPs with DSpace:master throws an NPE
2014-10-30 23:46:39 -05:00
Hardy Pottinger
854a9f9406 Merge pull request #717 from LongsightGroup/DS-2232-oracle-pom
DS-2232 Update Oracle pom to latest: 11.2.0.4.0
2014-10-30 23:44:12 -05:00
Mark H. Wood
dee30c48ed [DS-2195] Ensure that a found Group's TableRow is typed.
DatabaseManager.querySingle returns an untyped TableRow.  We can't use
querySingleTable because the row contains columns not found in the
required type.  Just force the row to have a type anyway, since it
does contain all of the columns required for that type.  Otherwise the
Group is not update()able.
2014-10-30 11:52:21 -04:00
Peter Dietz
4a5511a6f6 DS-2232 Update Oracle pom to latest: 11.2.0.4.0 2014-10-29 18:13:37 -04:00
Peter Dietz
1790687bab DS-2231 Use console.readPassword to not echo create-administrator password 2014-10-29 15:29:27 -04:00
helix84
31c084fd53 Merge pull request #714 from rradillen/DS-2229
DS-2229: User agent is not saved if the location of a hit cannot be determined
2014-10-29 14:49:28 +01:00
rradillen
cfb91f2533 Merge pull request #1 from bram-atmire/DS-2229
indentation fix
2014-10-29 14:42:41 +01:00
Bram Luyten
7a9bd499bb indentation fix 2014-10-29 14:17:13 +01:00
Roeland Dillen
06f5d5b8b9 Log user agent if no location can be determined (ie always) 2014-10-29 13:58:51 +01:00
Mark H. Wood
b34240e8d5 Merge pull request #701 from helix84/DS-1227-JSPUI-tagcloud
DS-1227: Tag cloud for any browse index or Discovery facet (JSPUI only)
2014-10-29 08:24:17 -04:00
Ivan Masár
ee49efbb60 fix typos 2014-10-29 00:15:35 +01:00
Kostas Stamatis
87228ab827 Separate UI from API (add classes to tag cloud so as to configure appearance from style files and not the configuration ones) 2014-10-29 00:15:34 +01:00
Kostas Stamatis
b07cb70864 Remove GreekNameComparator (as never used) and revert facet limit for subject facet 2014-10-29 00:15:34 +01:00
Kostas Stamatis
2aecd04575 minor change in configuration comments 2014-10-29 00:15:34 +01:00
Kostas Stamatis
753d182324 add comments + configure browse tag cloud 2014-10-29 00:15:34 +01:00
Kostas Stamatis
5c10a0eedf url encode tag cloud's links (again!) 2014-10-29 00:15:34 +01:00
Kostas Stamatis
788c73e7ed url encode tag cloud's links 2014-10-29 00:15:34 +01:00
Kostas Stamatis
15b16b0040 enable tag cloud in browsing 2014-10-29 00:15:34 +01:00
Kostas Stamatis
0365b342a5 resolve some fixes regarding the discovery configuration in tag cloud 2014-10-29 00:15:34 +01:00
Kostas Stamatis
cf5011016d move tag cloud html code to a separate file 2014-10-29 00:15:34 +01:00
Kostas Stamatis
43f9816c00 parameterize tag cloud + enable it in community and collection home 2014-10-29 00:15:33 +01:00
Kostas Stamatis
2bc6e63e45 Initial support for tag cloud 2014-10-29 00:15:33 +01:00
helix84
43b4af88a6 Merge pull request #707 from EKT/DS-2162
DS-2162: Per item configurable visual indicators for browse and search results (JSPUI only)
2014-10-29 00:13:37 +01:00
ctu-developers
c1220456fd Add canonicalize for "db.schema" property
DS-2201: Unable to complete installation of DSpace with non-empty variable "db.schema" configuration file "build.properties"
2014-10-28 21:09:36 +01:00
Peter Dietz
052e1632fa Merge branch 'tdonohue-DS-2103' 2014-10-28 03:48:18 -04:00
Tim Donohue
3b367be1a9 DS-2103: Reordering/Reorganizing of Administrative menu 2014-10-28 03:32:27 -04:00
Peter Dietz
e26ed04982 Merge pull request #661 from LongsightGroup/DS-682-osu-select-collection
DS-682 Optimize Select Collection Performance
2014-10-28 02:31:19 -04:00
Peter Dietz
7e893ffb38 Allow for select-collection optimization to be disabled
Since there could be a potential edge case where the optimization falters
We'll provide a simple fallback to revert to using the original query
2014-10-28 01:50:42 -04:00
Peter Dietz
c0d9805096 Merge pull request #678 from LongsightGroup/DS-2175-pdf-coverpage
DS-2175 PDF Citation Coverpage
2014-10-28 01:31:18 -04:00
Peter Dietz
adaa2e6271 Clean up PDFBOX pom's to reuse existing, and upgrade existing 2014-10-28 01:16:09 -04:00
Peter Dietz
1213e47569 Remove extra log statements from Citation PDF generator 2014-10-28 01:13:08 -04:00
Peter Dietz
30b770f2b5 Make citation PDF text configurable: header, metadata fields, footer 2014-10-28 01:13:08 -04:00
Peter Dietz
25c97a7900 Simplify adding coverpage code logic, formatting tweaks 2014-10-28 01:13:08 -04:00
Peter Dietz
4815095e01 Wordwrap all fields for citation PDF 2014-10-28 01:13:08 -04:00
Peter Dietz
6fd565becf Make title wordwrap 2014-10-28 01:13:08 -04:00
Peter Dietz
3c2314bbb1 Add PDF citation information as a table, other formatting improvements 2014-10-28 01:13:08 -04:00
Peter Dietz
930241474e Add elements/metadata to PDFBOX citation document 2014-10-28 01:13:08 -04:00
Peter Dietz
c43f59d1cd Hello World, get cover page working with PDFBOX 2014-10-28 01:13:08 -04:00
Peter Dietz
2c0595d5ca DS-2175 Citation PDF initial implementation 2014-10-28 01:13:08 -04:00
Mark H. Wood
5cb2bf7ee3 Merge pull request #498 from tdonohue/DS-1936
DS-1936 - Update robots.txt to include a Sitemap entry
2014-10-27 21:59:15 -04:00
Peter Dietz
03e2f89edc Merge pull request #632 from LongsightGroup/DS-2138-discovery-ipauth
DS-2138 Discovery should get user's special groups (i.e. IPAuth)
2014-10-27 18:39:03 -04:00
Peter Dietz
112392ac2b Merge pull request #679 from LongsightGroup/DS-2180-my-archived-submissions
DS-2180 Fix sorting by date accessioned in xmlui My Archived Submissions
2014-10-27 18:37:53 -04:00
Graham Triggs
6a0bcf5297 Fix fall-through switch in OAIHarvester which would have stopped it if pause was issued. 2014-10-27 14:44:26 +00:00
Peter Dietz
d4057ee461 Merge pull request #710 from grahamtriggs/master
DS-2221 Add a profile and dependencies for running FindBugs
2014-10-27 10:19:40 -04:00
Kostas Stamatis
34cc462b7f check for null values (in order to avoid NPEs due to incorrect configuration) 2014-10-27 14:22:29 +02:00
Graham Triggs
55b65c96aa Add a profile and dependencies for running FindBugs as part of the build process (requires Maven 3+) 2014-10-27 11:31:26 +00:00
Robin Taylor
456f673b3c Merge pull request #518 from zuki/DS-1968
[DS-1968] Select the collection already selected in the previous operation (JSPUI)
2014-10-27 09:44:46 +00:00
Kostas Stamatis
02bbcd2b8a fix issues and recommendations based on @zuki @lap82 comments 2014-10-27 09:13:33 +02:00
Kostas Stamatis
1e5f4f0a18 fix comments and typos 2014-10-27 08:40:14 +02:00
Peter Dietz
8ad0eca0b1 Add missing license to OptimizeSelectCollection 2014-10-26 19:30:42 -04:00
Peter Dietz
16f560d9ae Select Collection Optimize, add in community admin to check 2014-10-26 19:30:42 -04:00
Peter Dietz
252ab5e879 Enable optimized selectcollection logic and add tests
You can run a standalone test via:
/dspace/bin/dspace dsrun org.dspace.app.util.OptimizeSelectCollection
2014-10-26 19:30:41 -04:00
Peter Dietz
bbe9ef6f3c Adding Collection.findAuthorizeOptimized
Based on Ohio State University code
2014-10-26 19:30:41 -04:00
Bram Luyten
f76b057f65 Merge pull request #423 from bram-atmire/DS-1823
DS-1823 move dspace.url to build.properties
2014-10-25 16:28:21 +02:00
Bram Luyten
47c1a69da7 adding erroneously removed baseurl again 2014-10-25 14:31:03 +02:00
Bram Luyten
30c138801f introducing dspace.ui in build.properties 2014-10-25 13:54:36 +02:00
Bram Luyten
b49180f1f0 Merge pull request #694 from akonczak/master
JSPUI - Fix to avoid db connection pool exhaustion for slow downloads and big files
2014-10-25 13:34:02 +02:00
Kostas Stamatis
1f862e6d43 fix compilation error after changes in master 2014-10-24 14:37:50 +03:00
Kostas Stamatis
e3799d2547 add configurable visual indicators per item in browse and search results 2014-10-24 14:37:42 +03:00
Peter Dietz
f62a8d3704 Merge pull request #620 from tuub/DS-2113
Fixes DS-2113: JSPUI HTML5 upload should store Bitstreams...
2014-10-24 06:25:00 -04:00
Keiji Suzuki
63ea504c5e Applied selectcollection jsptag to select-collection.jsp 2014-10-24 10:27:14 +09:00
Bram Luyten
16fbdba00d Merge pull request #2 from rradillen/patch-6
updating test configuration to reflect build.properties
2014-10-23 10:57:01 +02:00
rradillen
e8e45bae72 Update build.properties
keep referring to baseUrl by default but allow override in build.properties
2014-10-23 10:03:07 +02:00
rradillen
c97799db6b Update testEnvironment.properties
to fix the configuration load fail
2014-10-23 10:00:26 +02:00
Tim Donohue
69f217a4b6 Merge pull request #432 from coelhoe/DS-1838
DS-1838 - add context to  two methods  to have monthly statistics local...
2014-10-22 12:56:34 -05:00
Tim Donohue
1a4e045049 Merge pull request #640 from helix84/DS-2147-oai-bitstream-description
DS-2147 XOAI add bitstream description to xoai metadata format
2014-10-22 11:44:07 -05:00
Ivan Masár
de321c5e74 fix db upgrade script name 2014-10-22 11:22:04 +02:00
helix84
9fd80d2e53 Merge pull request #703 from LongsightGroup/DS-2206-rest-bug-fixes
DS-2206 REST - Fix statistics write context abort, and comm.getsubcom
2014-10-22 10:50:33 +02:00
Peter Dietz
fe41471009 Merge pull request #608 from mwoodiupui/DS-2107
[DS-2107] Provide a place for third-party plugins
2014-10-21 17:22:10 -04:00
Peter Dietz
0bec704949 Merge pull request #685 from mwoodiupui/DS-1222
[DS-1222] Alternative Metrics - Framework, Integration of AltMetric and PlumX
2014-10-21 16:36:29 -04:00
Peter Dietz
cbd595e782 REST writeStats to reuse existing context 2014-10-21 10:17:06 -04:00
Peter Dietz
334d7197f0 Move XMLElement of community.subcommunities to getter to prevent errors 2014-10-21 10:15:25 -04:00
Ivan Masár
fd1f914ec1 Add PlumX 2014-10-21 14:26:55 +02:00
Mark H. Wood
25166c8cf5 Make identifier metadata field name configurable 2014-10-21 14:26:25 +02:00
Mark H. Wood
bb1072a5b7 Switch to direct use of dc.identifier.uri metadata 2014-10-21 14:26:25 +02:00
Mark H. Wood
f994b25449 Rename module configuration to be a little less generic 2014-10-21 14:26:25 +02:00
Ivan Masár
e33e90fbed fix display: declare the confman namespace used here 2014-10-21 14:26:25 +02:00
Mark H. Wood
dc0daa6b37 Add Altmetric.com badging 2014-10-21 14:26:25 +02:00
Mark H. Wood
dc328d9c07 Put the Item's persistent identifiers into the DRI document. 2014-10-21 14:26:24 +02:00
aroman
059a83220c DS-2193 Correct browsing for exact metadata 2014-10-21 13:21:22 +02:00
helix84
2864d3edbc Merge pull request #702 from zuki/DS-2205
DS-2205: Fixed bugs in the position of parameter setting
2014-10-21 11:18:16 +02:00
Keiji Suzuki
5b3d29c662 Fixed bugs in the position of parameter setting 2014-10-21 17:51:26 +09:00
Peter Dietz
7051650e16 Rename ItemImport methods to indicate which version it is 2014-10-21 00:40:47 -04:00
Peter Dietz
cdaba26cc2 Reuse the unzip(File) method in Item Import 2014-10-21 00:35:52 -04:00
Ivan Masár
0f66539ee4 remove one of two lang menus; add l10n message 2014-10-21 01:11:30 +02:00
jpiscanc
182e79ea96 Update navbar-default.jsp 2014-10-21 00:47:41 +02:00
jpiscanc
07433aa5b9 Update navbar-default.jsp 2014-10-21 00:47:41 +02:00
jpiscanc
2c38a12266 New Language Menu 2014-10-21 00:47:40 +02:00
jpiscanc
7a316175a0 New Language Menu 2014-10-21 00:47:40 +02:00
Peter Dietz
938eec3068 Merge pull request #680 from LongsightGroup/DS-635-mathjax
DS-635 Render scientific formulas in XMLUI using MathJax
2014-10-20 18:33:55 -04:00
helix84
4e1c740f89 Merge pull request #612 from atmire/DS-2049-proper
DS-2049: DSpace ORCID (proper pull request)
2014-10-21 00:23:37 +02:00
Peter Dietz
31a1b74d84 Merge pull request #591 from LongsightGroup/DS-1641-batchimportUI
DS-1641 Batch ItemImport from XMLUI
2014-10-20 18:22:42 -04:00
Peter Dietz
f65499eb8a Human friendly error message for invalid md field
Also clean up the code log/print spit this out
2014-10-20 17:59:24 -04:00
Peter Dietz
5d05ffd8cd Cleanup errored item import, by deleting remnant of errored item
Conflicts:
	dspace-api/src/main/java/org/dspace/content/Item.java

Conflicts:
	dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
2014-10-20 17:59:05 -04:00
Peter Dietz
d1a540a2f1 Fix rebase, since mapOut is a static 2014-10-20 17:55:16 -04:00
helix84
ecb30786ec Merge pull request #615 from robintaylor/DS-2108
DS-2108 Add an XMLUI aspect to report Google Analytics stats
2014-10-20 23:54:07 +02:00
Peter Dietz
12e36fa8bd BatchItemImport through UI to use addItemsAtomic - all or nothing
In case of an exception during addItems / i.e. ItemImport, revert the
partially imported subset of items.
2014-10-20 17:42:19 -04:00
Peter Dietz
ad71752230 DS-1641 Better exception handling on import, display to user 2014-10-20 17:42:19 -04:00
Peter Dietz
eac4114bce DS-1641 Have the map file have name of uploaded zip 2014-10-20 17:31:17 -04:00
Peter Dietz
cf617e07b7 DS-2071 Handle short depth files, and longer depth files 2014-10-20 17:31:17 -04:00
Peter Dietz
5dafc899ee Print mapFile output to confirm screen, also use batchimport temp dir 2014-10-20 17:31:17 -04:00
Peter Dietz
44cd6c0fde Add select-a-collection to batch upload UI 2014-10-20 17:27:59 -04:00
Peter Dietz
0cbfdbe3a8 Initial Batch Import ZIP from XMLUI 2014-10-20 17:27:58 -04:00
Peter Dietz
63e960b785 Fix DSpace Import to accept zip, adding subfolder to sourceDir 2014-10-20 17:26:58 -04:00
Ivan Masár
d288e5851e Merge branch 'DS-2177-JSPUI-batchimport' into master 2014-10-20 23:12:33 +02:00
Peter Dietz
35d9fffa6c Merge pull request #683 from EKT/DS-2183
Version bump for Biblio Transformation Engine
2014-10-20 17:02:49 -04:00
Peter Dietz
2ff0ef92d6 Merge pull request #666 from ctu-developers/master
DS-2168: New REST api with CRUD operations.
2014-10-20 12:02:24 -04:00
Robin Taylor
20f1d9911e DS-2108 upgrade Google Analytics jars 2014-10-20 16:03:34 +01:00
KevinVdV
4860e1ed02 Adding Mirage 2 support for ORCID lookup box 2014-10-20 14:27:43 +02:00
KevinVdV
b88ca8fd11 Adding missing configuration file 2014-10-20 13:54:34 +02:00
KevinVdV
b32a54516a Rebasing fixes due to metadata for all pull request. 2014-10-20 13:54:34 +02:00
Antoine Snyers
52f4a16c35 add readme to org.dspace.authority package 2014-10-20 13:54:34 +02:00
KevinVdV
a46e248db6 Fixing a small issue with the javascript popup box used by ORCID 2014-10-20 13:54:33 +02:00
KevinVdV
e0b7b4609e Contribution by University of Missouri in collaboration with @mire under the ORCID Adoption and Integration program funded by the Alfred P. Sloan Foundation. 2014-10-20 13:54:33 +02:00
Robin Taylor
87345aa463 DS-2108 Move messages into main messages.xml file 2014-10-20 12:48:47 +01:00
Kevin Van de Velde
9a777004fa Merge pull request #700 from atmire/DS-2172
DS-2172 Mirage 2: grunt-contrib-handlebars set to latest version
2014-10-20 13:47:24 +02:00
Robin Taylor
672b922373 DS-2108 fix conflict in Jackson dependencies 2014-10-20 11:46:38 +01:00
Robin Taylor
42565df86d DS-2108 templates.js was interfering with google-stats-dates.js, so move the latter 2014-10-20 11:43:11 +01:00
Robin Taylor
99028d8a3f DS-2108 Improve the ordering method of the results 2014-10-20 11:43:11 +01:00
Robin Taylor
a8a2b934bb DS-2108 Small correction to the instructions 2014-10-20 11:43:11 +01:00
Robin Taylor
27ee88bc1d DS-2108 Give the Service Account permission to read your GA data 2014-10-20 11:43:11 +01:00
Robin Taylor
67bf1bcbe9 DS-2108 Correct license headers 2014-10-20 11:43:11 +01:00
Robin Taylor
7914522c51 DS-2108 Hopefully improved the instructions in google-analytics.cfg 2014-10-20 11:43:11 +01:00
Robin Taylor
acb688ff05 DS-2108 trivial change to move a comment 2014-10-20 11:43:11 +01:00
Robin Taylor
6101bc8cdb DS-2108 Add an XMLUI aspect to report Google Analytics stats
Conflicts:
	dspace-api/pom.xml
2014-10-20 11:42:18 +01:00
ctu-developers
94af415f72 Added missing license header.
Added missing license header in Status.java.
2014-10-20 12:35:04 +02:00
ctu-developers
e4b804b344 Merge pull request #2 from peterdietz/rest-crud-cz
REST API status and collection pagination
2014-10-20 12:08:54 +02:00
Peter Dietz
50a2b54ded REST collections resource to use dspace-api to do limit/offset 2014-10-19 01:04:01 -04:00
Peter Dietz
5f2460f86a REST Login shouldn't attempt to set password. 2014-10-19 01:03:47 -04:00
Peter Dietz
b164c82d67 Add logging to REST login/logout, add status endpoint 2014-10-19 01:03:35 -04:00
philip Vissenaekens
b2d88e4b94 DS-2135 changed the import url for bootstrap in _main.scss 2014-10-17 12:52:10 +02:00
helix84
2d639a3a96 Merge pull request #682 from robintaylor/DS-2182
DS-2182 Make the LNI module an optional build
2014-10-16 13:13:07 +02:00
Peter Dietz
8b5866288a Merge pull request #649 from olli-gold/tubhh
DS-2151: makes CC module work via HTTPS
2014-10-15 13:22:55 -04:00
Peter Dietz
c2e7ccb90f Merge pull request #568 from pnbecker/dspace-rdf
DS-2061: Linked (Open) Data support for DSpace
2014-10-15 12:38:02 -04:00
Bram Luyten
b2324e4f16 Merge pull request #699 from TexasDigitalLibrary/mirage2-href-fix
Mirage2 - fixed bug where clicking on a + or - in community-list made the browser jump to top of page
2014-10-15 17:32:37 +02:00
Gad Krumholz
d1be8c8561 Fixed bug where clicking on a + or - in community-list made the browser jump up to the top of the page because of href="#" 2014-10-15 09:01:08 -05:00
Bram Luyten
f56733e4ec Merge pull request #698 from atmire/DS-2197
[DS-2197] removed deprecated template for rows in the full item view page
2014-10-15 15:37:54 +02:00
Art Lowel
900b9f076d removed deprecated template for rows in the full item view page 2014-10-15 15:30:56 +02:00
KevinVdV
d17fc2fa32 [DS-2196] License files do not support UTF-8 characters 2014-10-15 15:17:35 +02:00
helix84
9eded55fd8 Merge pull request #669 from atmire/DS-2053
[DS-2053] XMLUI compatibility for SHERPA/RoMEO lookup during item submission
2014-10-15 13:24:06 +02:00
KevinVdV
e28595dac3 [DS-2053] Adding missing license header 2014-10-15 11:30:45 +02:00
Bram Luyten
0af994cfcc Merge pull request #681 from rivaldi8/DS-2181-mirage2-fix-favicon
[DS-2181] The favicon is not shown in Mirage 2.
2014-10-14 16:26:07 +02:00
Ivan Masár
dfc1c6c10b run optipng -o9 on all PNGs 2014-10-14 14:52:44 +02:00
Àlex Magaz Graça
b014a9730d [DS-2181] The favicon is not shown in Mirage 2. 2014-10-14 14:52:20 +02:00
Bram Luyten
6bea9795c4 Merge pull request #696 from atmire/DS-2194
[DS-2194] Fixes an issue where checkboxes in tables are positioned much too low
2014-10-14 14:39:23 +02:00
Bram Luyten
26dd898def Merge pull request #676 from rivaldi8/DS-2178-mirage2-incorrect-cc-logo
[DS-2178] Mirage 2: incorrect use of Creative Commons logo.
2014-10-14 14:33:59 +02:00
Bram Luyten
cb78364cbb Merge pull request #689 from rivaldi8/DS-2184-rss-section-header
[DS-2184] RSS section header style doesn't match the rest in Mirage 2
2014-10-14 14:32:24 +02:00
Art Lowel
c761997a86 Fixes an issue where checkboxes in tables are positioned much too low 2014-10-14 14:27:46 +02:00
Artur Konczak
b76bc50e93 Fix to avoid connection pool exhaustion for slow downloads and big files 2014-10-13 14:05:24 +01:00
ctu-developers
0759e0af3b Repaired little write bug. 2014-10-13 12:05:21 +02:00
ctu-developers
29b1d28566 Added method for proccessing finally statements.
Resource.writeStats should not throw exception, because it is not
important to abort method by writings statistic. But must abort own
context.
Added method for processing all finally statements.
Moved return to end of methods.
Repaired some bugs.
2014-10-13 11:39:09 +02:00
Hardy Pottinger
93c024bf89 Merge pull request #687 from atmire/DS-2179
[DS-2179] Shibboleth (and probably LDAP) logins fail after merge of Metadata For All
2014-10-10 12:12:50 -05:00
Àlex Magaz Graça
f54a8a9a4b [DS-2186] Request item copy doesn't always use RequestItemAuthorExtractor 2014-10-10 12:29:41 +02:00
Oliver Goldschmidt
dbc49c8b5b Merge branch 'master' into tubhh 2014-10-10 11:20:02 +02:00
Mark H. Wood
237ce5313a Merge pull request #593 from kohts/DS-2082
DS-2082: do not pollute provenance when adding several bitstreams
2014-10-09 16:29:58 -04:00
ctu-developers
57e72004be Repaired finally statements and community.
Repaired all finally statements. It was rewrited from context.abort to
if condition with check if context is valid. In community was changed
back name of subcommunities.
2014-10-09 21:40:47 +02:00
Peter Dietz
e0d664b31a Merge pull request #688 from atmire/DS-2164
[DS-2164] Metadata4All Bug with EPerson email
2014-10-09 10:15:51 -04:00
Mark H. Wood
a81b488378 Merge pull request #690 from kohts/DS-2070
DS-2070: remove postgres schema creation (with mhwood)
2014-10-08 16:00:16 -04:00
Petya Kohts
ca8fd83f71 DS-2070: remove postgres schema creation (with mhwood) 2014-10-08 19:13:27 +00:00
Àlex Magaz Graça
e57119c8c9 [DS-2184] RSS section header style doesn't match the rest in Mirage 2 2014-10-08 16:34:09 +02:00
KevinVdV
6e0142dd19 [DS-2053] Adding Mirage 2 support & added support for retrying sherpa romeo requests in the SherpaService 2014-10-08 16:26:52 +02:00
KevinVdV
7f7452a9fc [DS-2164] Metadata4All Bug with EPerson email 2014-10-08 13:54:57 +02:00
KevinVdV
4ea9051c12 [DS-2179] Shibboleth (and probably LDAP) logins fail after merge of Metadata For All 2014-10-08 12:42:01 +02:00
ctu-developers
12b83b3697 Merge pull request #1 from LongsightGroup/rest-crud-cz
Quick fixes for REST Read endpoints
2014-10-07 23:00:43 +02:00
Peter Dietz
6b83de1b51 Remove extra context.aborts in various rest helpers 2014-10-06 20:41:20 -04:00
Peter Dietz
1c6ab765ba Change /rest/bitstreams/:id/retrieve to @GET, post didn't make sense to me 2014-10-06 20:40:34 -04:00
Peter Dietz
9477551d37 Shrink writeStats signature, DSO type constant unneccessary 2014-10-06 17:58:15 -04:00
Peter Dietz
66292597ae Remove context abort for all REST createContext
Adding all the finally context.aborts, was one too many
All requests had aborted contexts, which errored always
Also a spelling fix
2014-10-06 17:53:46 -04:00
Panagiotis Koutsourakis
953ad6240e Version bump for Biblio Transformation Engine 2014-10-06 17:07:37 +03:00
Kostas Stamatis
c51da34540 add missing license header 2014-10-06 14:08:30 +03:00
Robin Taylor
f6d26f5ffd DS-2182 Make the LNI module an optional build 2014-10-06 11:38:20 +01:00
Peter Dietz
699eca5ba2 DS-635 Add MathJax to Mirage2 theme 2014-10-05 11:34:16 -04:00
Peter Dietz
6e792e9e17 DS-635 Add scientific formula rendering with MathJax
Available in Mirage 1 theme when render-scientific-formulas is true
Also, set it so that on show-full-metadata view the renderer is disabled
2014-10-05 10:58:52 -04:00
Peter Dietz
8f000fa6bd DS-2180 Fix findBySubmitterDateSorted to work in metadata4all 2014-10-05 00:54:57 -04:00
Peter Dietz
0862d27fee XMLUI My Archived Submissions to sort using DB rather than array loop 2014-10-05 00:37:48 -04:00
Àlex Magaz Graça
fdd8c2aca8 [DS-2178] Mirage 2: incorrect use of Creative Commons logo. 2014-10-03 12:35:35 +02:00
Kostas Stamatis
c5436f3f35 code refactoring 2014-10-03 10:26:34 +03:00
Pascal-Nicolas Becker
b87aa949a4 Adds content negotiation to XMLUI. 2014-10-02 17:34:39 +02:00
Pascal-Nicolas Becker
dfa5ade578 Repackaging: moved everything into dspace-api except the webapp.
The modules dspace-rdf contains the webapp to provide the converted data
as rdf serialization only. Everything else (classes for conversion,
storage, content negotiation, ...) moved into dspace-api so it can be
used easily by every other part of DSpace.
2014-10-02 16:36:14 +02:00
Mark H. Wood
22204131aa Adjust README to point to online documentation instead of removed PDF 2014-10-02 10:19:00 -04:00
Pascal-Nicolas Becker
9594c2b31a Merge pull request #670 from kohts/DS-2070
DS-2070: acknowledge db.schema configuration property (Postgres)
2014-10-02 16:15:25 +02:00
Petya Kohts
bc4e736a91 DS-2070: create public schema if it doesn't exist (with pbecker) 2014-10-02 13:33:02 +00:00
Kostas Stamatis
1efcb064ca merge batch metadata import (via BTE) with batch import via Simple Archive Format 2014-10-02 15:41:12 +03:00
ctu-developers
52469fb9a1 Formated source and better method for finding item.
All source is formated by DSpace code formater. Better method for
searching item by metadata field. Changed to SQL select, because is more
faster.
2014-10-02 12:56:44 +02:00
Kostas Stamatis
b437af876f some fixes and new display messages 2014-10-02 11:06:04 +03:00
Mark H. Wood
53066bc9d5 Drop DSpace-Manual.pdf which is unmaintained 2014-10-01 16:37:41 -04:00
Petya Kohts
356be457d8 DS-2070: acknowledge db.schema configuration property (Postgres) 2014-10-01 19:51:59 +00:00
Mark H. Wood
af4b514b29 Add sample configuration and document it 2014-10-01 13:55:00 -04:00
KevinVdV
e8933ffc79 [DS-2053] XMLUI compatibility for Sherpa/Romeo lookup during item submission 2014-10-01 14:45:03 +02:00
Panagiotis Koutsourakis
147ec45266 Fixed NullPointer exception in batch import 2014-10-01 14:58:03 +03:00
Kostas Stamatis
344f93bf0e fix issue with closed contexts 2014-10-01 14:57:52 +03:00
Kostas Stamatis
42ad868ee0 ui support for batch import delete/resume 2014-10-01 14:57:39 +03:00
Kostas Stamatis
f8318c9083 close mapfile 2014-10-01 14:57:29 +03:00
Kostas Stamatis
790ca36408 display batch imports in myDspace 2014-10-01 14:57:21 +03:00
Kostas Stamatis
4ebd5f5d20 more on ui batch import 2014-10-01 14:57:09 +03:00
Kostas Stamatis
e4aa641a59 ui support for native batch import 2014-10-01 14:56:59 +03:00
Panagiotis Koutsourakis
c61ed134f8 Added some documentation 2014-10-01 14:56:20 +03:00
Panagiotis Koutsourakis
c5747c4127 Resume --resume or -R can now be used with bte import 2014-10-01 14:56:13 +03:00
Panagiotis Koutsourakis
bf3915880d BTE option for import works for per item collection list
A new version of BTE (0.9.2.5) needed to be released. This release fixes
some minor bugs in DSpaceOutputGenarator and adds the collection per
item handling.
2014-10-01 14:56:08 +03:00
Panagiotis Koutsourakis
29599adfd4 Bug fix for multiple import
If a collection could not be resolved the logic would add the item in
the same collections it added the previous item.
2014-10-01 14:56:03 +03:00
Panagiotis Koutsourakis
4b92fdd91b Added code to handle edge case
If one of the 'collections' files contains a handle or an id that cannot
be resolved to a collection, the specific item is skipped but the
procedure continues with subsequent items.
2014-10-01 14:55:55 +03:00
Panagiotis Koutsourakis
5c8cbf2c05 Batch import into multiple collections
If no -c argument is given ItemImport checks if a file named
'collections' exists inside the directory of each item.

This file must contain either the handles or the numeric ids of the
collections, one per line. The item is added to all those
collections. The collection specified in the first line is the owning
collection.
2014-10-01 14:55:27 +03:00
ctu-developers
ca7f6b4dd9 Added finally statements.
Added finally statements with context.abort() to cover all exception.
2014-09-30 17:45:36 +02:00
ctu-developers
ffe9dd4740 Added lincense headers.
Added lincense headers.
2014-09-30 07:29:08 +02:00
ctu-developers
df35f5c775 Repaired compilation bug annouced by CI.
Removed only one line with import of non exsiting class.
2014-09-30 06:08:07 +02:00
ctu-developers
1637dbd543 HTTPS
Change from HTTP access to HTTPS method.
2014-09-29 20:07:02 +02:00
ctu-developers
eb399686c5 New REST api
New REST api with CRUD operations over community, collections, items,
bitstreams.
2014-09-29 19:36:12 +02:00
Pascal-Nicolas Becker
70c359f6bb Changed the CLI help for conformance with launcher script name. 2014-09-29 13:28:41 +02:00
Tim Donohue
b3647121cb Fix for DS-1781. Also, log a warning if email cannot be determined, but still set to netid. 2014-09-26 14:54:46 -05:00
Tim Donohue
27fe6808c9 Merge pull request #662 from tdonohue/DS-2097
DS-2097: Obvious boolean logic fix. Should be boolean AND, not boolean OR
2014-09-26 14:33:19 -05:00
Tim Donohue
7855203f0f Obvious boolean logic fix. Should be boolean AND, not boolean OR 2014-09-26 19:30:43 +00:00
Tim Donohue
61ba1393df Merge pull request #605 from royopa/patch-1
DS-2097 : Request copy w/ dc.title qualified term
2014-09-26 14:27:07 -05:00
Mark H. Wood
07d83f7bff Merge pull request #654 from atmire/DS-1582-proper
Support Metadata On All DSpaceObjects
2014-09-26 11:26:31 -04:00
Tim Donohue
389551fdfc Merge pull request #658 from tdonohue/DS-1596-mirage2
DS-1596 fixes for Mirage 2 theme
2014-09-25 16:29:49 -05:00
Tim Donohue
f8d0d09c4d DS-1596 fixes for Mirage 2 theme. Minor rework of shared
exception2dri.xslt (which has been tested on other themes)
2014-09-25 19:52:00 +00:00
Mark H. Wood
bf0e2678ed Merge pull request #657 from mwoodiupui/DS-2128
[DS-2128] Fix 'ant fresh_install' breakage
2014-09-25 12:51:53 -04:00
Mark H. Wood
d8ab904184 Don't set validation query until we know what it should be. 2014-09-25 11:55:51 -04:00
Tim Donohue
54123bbaae Merge pull request #459 from tdonohue/DS-1596
DS-1596 fix : Display error messages in your XMLUI theme
2014-09-25 10:43:15 -05:00
Tim Donohue
7da27af8b7 Add I18N for Error page. Add ability to display underlying errorstack.
Some styling additions.
2014-09-25 15:11:30 +00:00
Mark H. Wood
9b8be34b72 Add a method to return 'DSpace internal' DBMS names from a controlled vocabulary 2014-09-25 11:09:42 -04:00
KevinVdV
f1f7c2afba Support Metadata On All DSpaceObjects: Fixing an issue where password was still retrieved using the old getMetadata method 2014-09-25 09:03:58 +02:00
Gad Krumholz
9fb80d41bc Fixed bug where + wouldn't expand or collapse the hidden <div> in community-list when a DSpace has a handle prefix configured with a '.' in it (example handle prefix: 2346.1) 2014-09-24 10:47:07 -05:00
KevinVdV
87cd7145c9 Support Metadata On All DSpaceObjects 2014-09-24 16:16:06 +02:00
Tim Donohue
ca090a8e8a Merge pull request #653 from tdonohue/master-build-fixes
Fix build issues on 'master' from DS-2133 fixes
2014-09-22 13:51:28 -05:00
Tim Donohue
4b9b28ec66 Fix build issues on 'master'. Ensure new profiles are enabled properly.
Update Travis CI settings to skip building of 'dspace-installer'.
2014-09-22 18:06:41 +00:00
Pascal-Nicolas Becker
fc324dba54 Uses DSpace Repository Ontology from digital-repositories.org. 2014-09-22 18:08:53 +02:00
Mark H. Wood
e7ea8e45ca Merge pull request #635 from mwoodiupui/DS-2128
[DS-2128] Eliminate dspace.cfg:db.name
2014-09-19 13:46:13 -04:00
Mark H. Wood
5cf1f31888 Merge pull request #475 from mwoodiupui/DS-1577
[DS-1577] 'commons-httpclient' is End-of-Life
2014-09-19 13:02:15 -04:00
Tim Donohue
25983e9e5b Merge pull request #606 from royopa/DS-1858
DS-1858 : Added key Browse Items by: of navbar in messages.properties
2014-09-19 11:18:13 -05:00
Mark H. Wood
286f2b82f6 Merge pull request #643 from mwoodiupui/DS-2003
[DS-2003] WorkflowManager.notifyOfArchive() discards reason for email failure
2014-09-19 10:53:59 -04:00
Mark H. Wood
0e3691c040 Merge pull request #634 from mwoodiupui/DS-1926
[DS-1926] return key instead of null in I18nUtil.getMessage
2014-09-19 10:19:24 -04:00
Tim Donohue
ba9e3fc7bf Merge pull request #648 from tdonohue/travis_fixes
More Travis CI build fixes related to DS-2133
2014-09-18 12:23:44 -05:00
Tim Donohue
599931f520 Default to giving Unit Tests 512MB of memory. Provide a -Dsurefire.argLine
option to pass a different setting to m-surefire-p.
2014-09-18 16:49:31 +00:00
Tim Donohue
98acddd6c2 Move assembly of 'dspace-installer' into a default profile so that it
can be disabled as needed for TravisCI
2014-09-18 15:13:11 +00:00
Kevin Van de Velde
a3b4173397 Merge pull request #651 from antoine-atmire/DS-2154
[DS-2154] fixes: metadata authority and confidence lost in new version creation
2014-09-18 14:15:49 +02:00
Antoine Snyers
dbc64c6e4b [DS-2154] fixes: metadata authority and confidence lost in new version of item 2014-09-18 13:03:09 +02:00
Oliver Goldschmidt
7ffb5c41d2 makes CC module work via HTTPS 2014-09-16 13:28:30 +02:00
Tim Donohue
217aea08c3 Travis CI fixes. Run all Unit Tests first, THEN assemble DSpace +
Mirage2
2014-09-15 19:08:29 +00:00
Tim Donohue
1c0bce9cab Merge pull request #645 from tdonohue/unit-test-cleanup
Ensure all Unit Tests nullify any created resources, related to DS-2080
2014-09-15 11:50:26 -05:00
Tim Donohue
c3967261ac Merge pull request #644 from tdonohue/mirage2-pom-cleanup
Mirage2 POM cleanup/refactoring, related to DS-2052
2014-09-12 16:06:25 -05:00
Tim Donohue
c0cf542d0d Ensure all Unit Tests nullify any created resources, thus forcing JUnit to clean them up from memory 2014-09-12 15:11:37 -05:00
Tim Donohue
86d771cecb Mirage2 POM cleanup/refactoring. Avoid duplication of plugin version numbers, and make it easier to change dependency versions. 2014-09-12 15:05:20 -05:00
Mark H. Wood
648e5b364b [DS-2003] Mention why mail did not go out.
Also clean up message formatting.
2014-09-12 16:01:27 -04:00
Pascal-Nicolas Becker
a44813989f Enhanced the dspace-rdf command line interface.
Added the RDFizer to the launcher.xml configuration.
Added a command --convert-all.
Prints help if no options were given instead of starting reconvertion of
all content (which may take a lot of time).
2014-09-11 16:59:51 +02:00
cjuergen
ec3f993dc2 XOAI add bitstream description to xoai metadata format 2014-09-11 16:58:58 +02:00
cjuergen
d267f8bf9c Misplaced exclamation marks in dspace.bat 2014-09-11 16:14:01 +02:00
Tim Donohue
fe47530f7d Merge pull request #637 from tdonohue/DS-2133-new
DS-2133 : Update Travis to install Mirage2 prerequisites and build Mirage2
2014-09-11 09:08:10 -05:00
Pascal-Nicolas Becker
f254b21973 Repaired the build process after rebasing.
The dspace rdf war project wasn't build anymore as the activation of the
modules changed with the Mirage 2 contribution.
2014-09-11 14:51:53 +02:00
Pascal-Nicolas Becker
dfe6c7460b The DSpace Matadata Mapping vocabulary moved to digital-repositories.org 2014-09-11 14:51:51 +02:00
Pascal-Nicolas Becker
3d8acfedea Uses all possible identifiers to generate URIs.
This commit enables dspace-rdf to use all PersistentIdentifiers minted
by DSpace and not only handles. It makes advantage of the changes
introduced to DSpace by DS-1990. Persistent Identifers should and will
be used as fully functional http URIs only (e.g. a DOI will be used in
the form http://dx.doi.org/<doi> and not as doi:<doi>).
2014-09-11 11:49:41 +02:00
Pascal-Nicolas Becker
4b250862fc Enhanced and renamed the DSORelationsConverterPlugin into SimpleDSOR...
Renamed the DSORelationsConverterPlugin into
SimpleDSORelationsConverterPlugin.
Overhault the Plugin: it can be configured now and it can create
multiple links per DSO Relation.
2014-09-11 11:42:36 +02:00
Pascal-Nicolas Becker
fd8626bbac RDFConfiguration: added a method to load comma separated config values. 2014-09-11 11:42:36 +02:00
Pascal-Nicolas Becker
be1247719b Uses jena version 2.12.0 and removes workaround for bug JENA-663. 2014-09-11 11:42:36 +02:00
Keiji Suzuki
301b17b9c3 rdfの文字化けを修正 2014-09-11 11:42:36 +02:00
Pascal-Nicolas Becker
c3f05df7fe Export the repository's contents as RDF into the Semantic Web.
This commits adds a module dspace-rdf. The module will convert the
metadata stored in DSpace into RDF. The converted data will be provided
over a webinterface and a SPARQL endpoint.
2014-09-11 11:42:36 +02:00
Tim Donohue
8b53258b5e Minor POM reorganization. Ensure plugins related to Unit Testing are
only enabled when Unit Testing is enabled.
2014-09-10 21:16:10 +00:00
Tim Donohue
bd98997dd6 Enable a quick version of 'mvn install' for Travis CI 2014-09-10 19:58:18 +00:00
Tim Donohue
d4d63083bb Improve memory management in Unit Tests. Add a cleanupContext() method
for better context management.
2014-09-10 19:33:07 +00:00
Mark H. Wood
3b1a92b890 Merge pull request #633 from mwoodiupui/DS-2078
[DS-2078] Missing DSpaceWebapp in dspace-oai module
2014-09-10 15:30:49 -04:00
Peter Dietz
efca59f2e5 Merge pull request #603 from Georgetown-University-Libraries/ImageMagickThumbnails-clean
DS-2105: Create Thumbnails Using ImageMagick
2014-09-10 15:25:28 -04:00
Tim Donohue
a0f44f6182 Update Travis to install Mirage2 prerequisites and build Mirage2 2014-09-10 18:21:25 +00:00
Tim Donohue
942e1b43a4 Merge pull request #626 from tdonohue/DS-2125
DS-2125 Fix possible NPEs in Context object commit/complete/abort
2014-09-10 11:13:55 -05:00
Pascal-Nicolas Becker
3d9d027c00 Merge pull request #537 from tuub/DS-1990
DS-1990: Events should contain all identifiers, not only handles.
2014-09-10 18:08:30 +02:00
Pascal-Nicolas Becker
45593e2682 Merge pull request #627 from tuub/DS-2127
DS-2127: Upgrade commons-codec to version 1.9.
2014-09-10 18:03:28 +02:00
antoine-atmire
ea36245c40 Update dspace.cfg
prefer the label of a bitstream and then its title for the link on the item page
2014-09-10 13:48:44 +02:00
antoine-atmire
fabd0b9a14 Update item-view.xsl
skip zero-length titles and labels
2014-09-10 13:46:17 +02:00
Tim Donohue
0f071fb7d8 Add logging for abort() and complete() when they are called on an invalid/closed Context 2014-09-09 15:12:58 -05:00
Mark H. Wood
bd65b62d1b Correct license header in test module 2014-09-08 15:23:57 -04:00
Mark H. Wood
dfcf5a2491 Ensure that DBMS brand is detected before using the knowledge. Begin adding unit tests. 2014-09-05 19:55:35 -04:00
Mark H. Wood
9db6331337 [DS-1926] Add a few unit tests. 2014-09-05 13:46:23 -04:00
Mark H. Wood
4200a0487a [DS-1926] Move the fix to getMessage(String, Locale).
I noticed that getMessage(String) and getMessage(String, Context)
delegate to getMessage(String, Locale), so that is the proper place to
fix this.

Adjusted the log message as agreed, then added the name of the locale.
2014-09-05 13:42:54 -04:00
Monika Mevenkamp
bafdaea9c4 return key in I18nUtil.getMessage instead of null when no setting 2014-09-05 11:44:34 -04:00
Mark H. Wood
ccc4838006 [DS-2078] Adopted Christian Scheible's code. 2014-09-05 10:58:30 -04:00
Pascal-Nicolas Becker
8c6a9df40c DSpaceObject.getIdentifier(Context) should never return null.
If an DSO does not have any identifiers (including handle) this method
should return an empty string array. G.e. an item during submission
(workspace item) has no identifiers at all. This commits prevents NPE in
event handling classes.
2014-09-05 16:08:00 +02:00
Mark H. Wood
82c0664587 Merge pull request #617 from mwoodiupui/DS-2112
[DS-2112] fix NPE if filter.org.dspace.app.mediafilter.publicPermission is undefined
2014-09-05 10:05:35 -04:00
Peter Dietz
2b1a1928c5 DS-2138 Discovery should get user's special groups (i.e. IPAuth) 2014-09-04 18:35:04 -04:00
Robin Taylor
dbaeb73ddd Merge pull request #631 from atmire/DS-2135
DS-2135 changed the import url for bootstrap in _main.scss
2014-09-04 14:41:04 +01:00
philip Vissenaekens
69cf504268 DS-2135 changed the import url for bootstrap in _main.scss 2014-09-04 11:17:28 +02:00
Antoine Snyers
db5fe37383 DS-2134 missing configuration properties for mirage2 2014-09-04 10:50:26 +02:00
Pascal-Nicolas Becker
bd105d1006 Asynchronous IdentifierProvider should call DSO.resetIdentifierCache.
Adds a note to the javadoc of DOIIdentifierProvider to reset the
identifiers cache in case of asynchronous identifier registration.
Adds a call to reset identifiers cache to DOIIdentifierProvider which
uses asynchronous registration.
2014-09-01 15:55:10 +02:00
Mark H. Wood
69291af2d8 [DS-2128] Initial commit 2014-08-29 16:14:19 -04:00
Pascal-Nicolas Becker
ecd4073d96 DS-2127: Upgrade commons-codec to version 1.9. 2014-08-29 11:41:02 +02:00
Hardy Pottinger
eee57e0d4e Merge pull request #625 from hardyoyo/DS-2126-tweak-oracle-scripts
[DS-2126] changed invalid datatype of TEXT dropped transaction
2014-08-28 17:13:13 -05:00
Tim Donohue
a73e5bf004 DS-2125 Fix possible NPEs in Context object commit/complete/abort. Also add Unit Tests for Context object 2014-08-28 17:04:56 -05:00
Hardy Pottinger
90e7b91eec [DS-2126] changed invalid datatype of TEXT to VARCHAR2(2000), dropped transaction/commit block 2014-08-28 21:48:11 +00:00
Pascal-Nicolas Becker
3fdc76c8ea Enhancing the PR for DS-1990.
Adds a cache to the Identifier array in the DSpaceObject class.
Renames the method from lookupIdentifiers into getIdentifiers.
2014-08-28 18:32:35 +02:00
Pascal-Nicolas Becker
8fee9f8f63 Merge pull request #624 from tuub/DS-2120
DS-2120: Reduce logging in IdenitifierServiceImpl.resolve(...).
2014-08-28 18:11:50 +02:00
Pascal-Nicolas Becker
ec421bc766 DS-2120: Reduce logging in IdenitifierServiceImpl.resolve(...). 2014-08-28 16:54:50 +02:00
Tim Donohue
260f2d219a Merge pull request #618 from atmire/mirage2-usemin-issue
[DS-2116] Mirage 2 build fails without including maven clean target
2014-08-28 09:51:53 -05:00
Pascal-Nicolas Becker
446c7efc31 Bitstreams should set identfiers to Events as well. 2014-08-28 11:47:44 +02:00
Pascal-Nicolas Becker
17e56988b2 Fixes typo in a javadoc comment. 2014-08-28 11:47:44 +02:00
Pascal-Nicolas Becker
b1e822a87f DS-1990: Events should contain all identifiers, not only handles. 2014-08-28 11:47:44 +02:00
Pascal-Nicolas Becker
2dec016ed2 Merge pull request #623 from tuub/DS-2120
DS-2120: IdentifierServiceImpl should log less aggressive
2014-08-28 11:44:51 +02:00
Pascal-Nicolas Becker
7d7df5610d DS-2120: IdentifierServiceImpl should log less aggressive
The IdentifierProvider API uses exceptions to state that an Identifier
for a specific DSO cannot be found. These exceptions shoudln't get
logged as error.
2014-08-28 11:28:36 +02:00
Terry Brady
437ecbef0e Java 7, re-enable getReaderFileSuffixes 2014-08-27 14:15:57 -07:00
Terry Brady
14e8ede2ed Update config comments for filter plugins 2014-08-27 14:14:35 -07:00
Mark H. Wood
c2f945a5cb Merge pull request #622 from mwoodiupui/DS-2034
[DS-2034] Problem in [Control Panel]->[Dspace Configuration] - org.dspace.app.xmlui.wing.WingInvalidArgument: The 'characters' parameter is required for list items.
2014-08-27 16:04:32 -04:00
Mark H. Wood
77db25cc25 [DS-2034] Check for null (unset) properties and replace with an indicator 2014-08-27 15:36:26 -04:00
Mohamed Mohideen Abdul Rasheed
7dd3e5f979 Added DataCite XML based metadata mapping option for EZIDIdentifierProvider module. 2014-08-26 10:11:52 -04:00
Mark H. Wood
498d0e4e2e Merge pull request #365 from mwoodiupui/DS-1738
[DS-1738] Support NUMERIC columns in database query result sets.
2014-08-25 16:13:53 -04:00
Pascal-Nicolas Becker
b4cef05a4f Fixes DS-2113: JSPUI HTML5 upload should store Bitstreams... 2014-08-25 19:13:04 +02:00
Hardy Pottinger
2a73c05ae8 Merge pull request #619 from hardyoyo/DS-2118
fixes DS-2118, adds assetstore.dir to the testing dspace.cfg.more
2014-08-25 09:42:35 -05:00
Hardy Pottinger
a2d1ee0a7b fixes DS-2118, adds assetstore.dir to the testing dspace.cfg.more fileweaver overlay 2014-08-25 14:25:51 +00:00
Mark H. Wood
237a7150a0 [DS-2112] fix NPE if org.dspace.app.mediafilter.MediaFilterManager.processBitstream is undefined
Also take a few IDE hints to tidy up the region.
2014-08-22 13:04:22 -04:00
Mark H. Wood
46dd0d51d3 Code cleanup 2014-08-22 12:41:27 -04:00
Art Lowel
2ed31e23b6 fixed an issue where running mvn package without clean would break the usemin step of the grunt build 2014-08-22 18:05:13 +02:00
Tim Donohue
7ce674eec0 Merge pull request #616 from atmire/mirage2-webapp
[DS-2052] Mirage 2 separate webapp fix
2014-08-22 10:16:22 -05:00
Art Lowel
476b519bb6 fixed an issue where a separate webapp would be created in the dspace install folder 2014-08-22 14:45:18 +02:00
Tim Donohue
c32042c995 Merge pull request #613 from tdonohue/travis-tweaks
Travis CI tweaks
2014-08-21 16:20:54 -05:00
Tim Donohue
7002dc17f9 Travis tweaks. Speed things up by skipping 'install'. Give Maven more
memory.
2014-08-21 20:34:36 +00:00
Terry Brady
72b301d8cf Static methods for reuse by curation system 2014-08-20 15:13:31 -07:00
Peter Dietz
024f7dd4f8 Merge pull request #586 from aschweer/DS-2077-sort-collection-dropdown
Ds 2077 sort collection dropdown
2014-08-20 17:36:56 -04:00
Terry Brady
2ceb9fe657 class rename 2014-08-20 14:00:40 -07:00
Terry Brady
15bc9e7033 Rm LIT files, name change req in DSpace Tech mtg 2014-08-20 13:52:27 -07:00
Terry Brady
5aecf88a90 Clarify messages, improve label checks 2014-08-20 12:59:53 -07:00
Terry Brady
da3d680297 Migrate LIT filters to IM filter
Per DSpace PR discussions
2014-08-19 18:18:21 -07:00
Mark H. Wood
af4a60525a Proper license header for new test module 2014-08-19 11:57:32 -04:00
Mark H. Wood
26b1b61005 [DS-1738] Reflect changes in MockDatabaseManager too. Provide unit tests. 2014-08-19 11:57:32 -04:00
Mark H. Wood
7b1c072bb1 [DS-1738] Support NUMERIC columns in database query result sets.
NUMERIC and DECIMAL results are now converted to BigDecimal, not
Integer resp. Long.
2014-08-19 10:52:51 -04:00
Robin Taylor
88846c0766 Merge pull request #610 from robintaylor/DS-2088
DS-2088 Record bitstream downloads as Google Analytics events
2014-08-19 12:06:43 +01:00
Robin Taylor
981de3074e Merge pull request #587 from atmire/mirage2-contribution
[DS-2052] @mire Mirage 2 Contribution
2014-08-19 09:25:34 +01:00
Terry Brady
55805966aa Default settings for ImageMagick Thumbnail Filters 2014-08-18 10:42:39 -07:00
Robin Taylor
584747ecb8 DS-2088 Record bitstream downloads as Google Analytics events 2014-08-18 13:58:55 +01:00
Mark H. Wood
5a6d8a6dfe Correct loading from JAR. 2014-08-17 19:20:50 -04:00
Mark H. Wood
bb0c6dc88e Add test of loading from a JAR. 2014-08-17 19:19:53 -04:00
Mark H. Wood
e52bcf93aa Factor the loader out of PluginManager, and provide a minimal unit test. 2014-08-17 13:21:31 -04:00
Mark H. Wood
7a97ce846f First pass at a third-party plugins directory 2014-08-16 00:20:32 -04:00
Hardy Pottinger
39f0e8a6a4 disabled IRC notification from travis-ci
It appears that the Travis-CI IRC bot reports build sucess/failure for forks of dspace, which is not very interesting.
2014-08-15 16:39:32 -05:00
Tim Donohue
f631a3d824 Merge pull request #600 from tdonohue/DS-2080
DS-2080 Cleanup bad/broken tests, and upgrade to latest JUnit and JMockit, also fixes DS-2086
2014-08-15 15:39:34 -05:00
Tim Donohue
059556034d Minor fix. Replace getParentCommunity() call with parent variable. 2014-08-15 15:13:04 -05:00
Hardy Pottinger
56c8e42f68 enabled notifications via the TravisCI IRC bot 2014-08-15 14:53:44 -05:00
Tim Donohue
0aa39100a9 DS-2086 fix. Corrects the logic to deleting Communities & Collections such that hierarchical deletion test now succeeds. Also corrects minor permissions error in a different unit test. 2014-08-15 13:48:03 -05:00
Roeland Dillen
4ad62c71fd Added missing filtering for the dependencies included install.
Removed accidentally committed mirage2 as default xmlui.xconf
Removed references to removed Mirage2 aspect.
2014-08-15 20:43:06 +02:00
Mark H. Wood
47f351a03c [DS-1577] Harmonize with DS-2091, catch missing dependency on httpcore. 2014-08-15 14:06:15 -04:00
Mark H. Wood
7c4bdc3e07 Last httpcomponents conversion 2014-08-15 13:47:58 -04:00
Mark H. Wood
aa209d1508 Some more httpclient fixes 2014-08-15 13:47:58 -04:00
Mark H. Wood
24d3e415c0 Switch some classes to HttpComponents 2014-08-15 13:47:58 -04:00
Tim Donohue
13fdf18b85 Merge pull request #536 from KevinVdV/DS-2005
[DS-2005] Discovery hit highlighting issue with abstracts/fulltext
2014-08-15 10:20:09 -05:00
Tim Donohue
45813c3b58 Merge pull request #571 from rivaldi8/DS-2064-sword-file-missing-in-zip
DS-2064 METS ingester doesn't check if the files in the zip exist.
2014-08-15 10:04:41 -05:00
Tim Donohue
0cf9543990 Merge pull request #576 from rivaldi8/DS-2067-rend-not-processed
DS-2067 DRI rend attribute not processed in side bar items.
2014-08-15 10:02:34 -05:00
Andrea Schweer
2a506b4215 Merge pull request #607 from aschweer/DS-2104-disappearing-metadata
DS-2104 Only clear metadata for qualifiers actually present
2014-08-15 18:02:14 +12:00
Andrea Schweer
5cf94b6768 DS-2077 Sort collections by full path
This commit fixes the order of collection drop-down entries when starting a
submission and when editing e-mail subscriptions such that the community
hierarchy is taken into account as well as the collection name. The change in
CollectionDropDown makes the same mechanism re-usable in other places where
this might be required.
2014-08-15 17:06:47 +12:00
Andrea Schweer
3e7362e7c7 DS-2104 Only clear metadata for qualifiers actually present
This is a bug fix for an issue where metadata values could disappear during
submission or in the workflow when a qualdrop input item is placed on a
different page from another input item for the same schema+element. The
previous version of this code processed a page by removing all metadata values
from the item for fields listed on that page. For qualdrop inputs, metadata
values for all qualifiers (including no qualifier) were removed rather than
just those qualifiers actually listed in the qualdrop. This bugfix changes the
code to use the qualifiers from the value pairs of the qualdrop.
2014-08-15 15:59:38 +12:00
Rodrigo
f5bcc96cb0 DS-1858 : Added key to 'Browse Items by:' of navbar in messages.properties 2014-08-14 20:33:28 -03:00
Peter Dietz
5e7cb5e10a Update database_schema_3-4.sql
Found version mismatch text inside the postgres 3 to 4 upgrade command, mentioned 18to3
2014-08-14 11:34:19 -04:00
helix84
52329e1b17 Merge pull request #477 from helix84/DS-1917-JSPUI-validity-fixes
DS-1917 JSPUI validity fixes (several non-controversial fixes)
2014-08-14 15:30:18 +02:00
helix84
a1dffc6a2e Merge pull request #516 from zuki/junii2-3-1
DS-2100 junii2 OAI crosswalk version 3.1
2014-08-14 15:28:38 +02:00
Roeland Dillen
f2786d963a Merge branch 'mirage2-contribution' of https://github.com/atmire/DSpace into mirage2-contribution 2014-08-14 13:46:03 +02:00
Roeland Dillen
5d1ec91f4f move mirage2 messages and dynamically fill theme name in sitemap 2014-08-14 13:45:19 +02:00
Art Lowel
5c69ce69ce Fixed a typo 2014-08-13 17:17:57 +02:00
Art Lowel
4791abcc5e Added sections on customisation and using multiple themes 2014-08-13 17:16:51 +02:00
Roeland Dillen
792c304958 name change 2014-08-13 16:12:58 +02:00
Rodrigo Prado
42d7f978cc Update SendItemRequestAction.java 2014-08-13 07:11:27 -03:00
Rodrigo Prado
e9ce6fdb9a DS-2097 : Request copy w/ dc.title qualified term
https://jira.duraspace.org/browse/DS-2097 
Enable the Request Copy function for items without dc.title (unqualified dc term) but with dc.title.anything (qualified dc term)
2014-08-13 06:49:00 -03:00
Terry Brady
78604eccd4 Adding license per travis build errors 2014-08-12 15:35:43 -07:00
Terry Brady
2f9c6e6994 Image Magick Thumbnail Creator 2014-08-12 15:28:33 -07:00
Mark H. Wood
5138c6a3be Merge pull request #497 from mwoodiupui/DS-1230
[DS-1230] Aging tool to discover disused accounts
2014-08-12 15:45:34 -04:00
Mark H. Wood
60d0854f4f [DS-1230] turn off AUTHZ properly. 2014-08-12 15:13:27 -04:00
Mark H. Wood
bb226385f8 [DS-1230] Replace system properties with proper commandline options 2014-08-12 15:13:27 -04:00
Mark H. Wood
425f7450a1 [DS-1230] Add 'pretend' option to the log loader 2014-08-12 15:13:27 -04:00
Mark H. Wood
4c5969e4c9 [DS-1230] Fix column name, iterator control. 2014-08-12 15:13:27 -04:00
Mark H. Wood
3fc0b9b179 [DS-1230] Better date handling, give example date.
Thanks to Pascal-Nicholas Becker for bug spotting and suggesting the
example, and Ivan Masár for suggesting how to generate the localized
sample.
2014-08-12 15:13:27 -04:00
Mark H. Wood
aefd0f3d36 Further tidying 2014-08-12 15:13:27 -04:00
Mark H. Wood
84ad1eadbf Clean up, document code 2014-08-12 15:13:27 -04:00
Mark H. Wood
e6487fe27b Display last-active date too, and change errant space to tab 2014-08-12 15:13:26 -04:00
Mark H. Wood
5d48f00769 Make stdout clean TSV 2014-08-12 15:13:26 -04:00
Mark H. Wood
bd01bdb048 Commandline operation to list or delete disused accounts 2014-08-12 15:13:26 -04:00
Mark H. Wood
f44946ecd6 [DS-1230] Add a tool to load last-login dates from dspace.log.* 2014-08-12 15:13:26 -04:00
Tim Donohue
56fda36375 Fix bad test permissions. Add a new test to check Community Admins can edit items under their Community 2014-08-12 12:59:47 -05:00
Tim Donohue
56fab73fe4 Minor reformatting of PostgreSQL schema (similar to Oracle schema in previous commit), just for consistency. 2014-08-12 12:19:50 -05:00
Tim Donohue
d1e48ca692 Configure H2 to use Oracle's schema for initialization. Minor cleanup/reformatting of Oracle schema to support H2 (including reordering some specified constraints) 2014-08-12 12:17:58 -05:00
Art Lowel
56d1945c9a fixed an issue where the thumbnail placeholder wouldn't be shown in discovery results 2014-08-12 18:26:31 +02:00
Tim Donohue
09c732f5c9 Remove unnecessary and unused MockConfigurationManager 2014-08-12 10:57:24 -05:00
Tim Donohue
d59eb8deb7 Remove unnecessary and unused MockBrowseCreateDAOOracle 2014-08-12 10:49:39 -05:00
Tim Donohue
7151b36538 Fix expectations syntax for latest JMockit. Other minor test cleanup 2014-08-12 10:48:33 -05:00
Tim Donohue
b1bd51a84a Remove reference to a "mock" that doesn't exist and isn't needed 2014-08-12 10:47:11 -05:00
Tim Donohue
79d91e9439 Fix exception validation. Fix expectations syntax for latest JMockit 2014-08-12 09:52:26 -05:00
Tim Donohue
347a2dc6eb Doesn't need to extend AbstractUnitTest as this test class is 100% standalone 2014-08-12 09:51:05 -05:00
Tim Donohue
fe99e84b56 Minor cleanup. Update to use AbstractUnitTest context instead of creating a new one 2014-08-12 09:50:20 -05:00
Tim Donohue
a345832905 Fixe expectations syntax for latest JMockit. Minor test cleanup. 2014-08-11 16:56:05 -05:00
Tim Donohue
ed71e7a752 Refactor AbstractUnitTest and MockDatabaseManager to simplify initialization and avoid mocking *all* of DatabaseManager. 2014-08-11 16:54:00 -05:00
Tim Donohue
d2c60e086b Remove commented out methods 2014-08-11 16:46:30 -05:00
Tim Donohue
b4d29095ab Ensure EPersonTest extends AbstractUnitTest instead of doing its own thing 2014-08-11 16:44:44 -05:00
Tim Donohue
ceaed128ba Minor fix for H2-database (unit testing) friendliness. Treat "Types.BOOLEAN" as a boolean field. 2014-08-11 16:41:52 -05:00
Tim Donohue
ee81d01205 Fixed expectations syntax for latest JMockit. Made delete tests independent. New testDeleteHierachyAuth currently fails. 2014-08-11 16:37:59 -05:00
Tim Donohue
4db984b921 Fix the deletion tests by ensuring they are more independent 2014-08-11 16:29:19 -05:00
Hardy Pottinger
81eab8bc15 Merge pull request #599 from mwoodiupui/DS-1992
[DS-1992] License checker should not run in dspace/modules/*
2014-08-11 10:43:28 -05:00
Mark H. Wood
3dfa7f96e5 [DS-1992] License checker should not run in dspace/modules/* 2014-08-11 10:57:42 -04:00
Tim Donohue
eba5f87f57 Fixed expectations syntax for latest JMockit. 2014-08-11 09:55:44 -05:00
Art Lowel
2d7f0436d5 cleanup after multiple mirage 2 versions addition 2014-08-11 14:42:54 +02:00
Art Lowel
6fd373a1c5 added support for multiple mirage 2 versions - for deps included mode 2014-08-11 14:42:48 +02:00
Art Lowel
a7d6b9f7d5 added support for multiple mirage 2 versions 2014-08-11 14:42:40 +02:00
Robin Taylor
bb15b6fbc3 Merge pull request #596 from robintaylor/DS-2091
DS-2091 Upgrade HttpComponents to 4.3.5
2014-08-11 09:27:37 +01:00
Peter Dietz
e56a8aff09 Merge pull request #543 from peterdietz/DS-740-public-thumbnails
DS-740 Public derivative thumbnails of restricted original bitstreams
2014-08-08 18:01:21 -04:00
Peter Dietz
aa58d733f9 Merge pull request #530 from peterdietz/DS-1945-requestitem-helpdesk
DS-1945 RequestItem to have Helpdesk be contacted instead of author
2014-08-08 17:38:39 -04:00
Tim Donohue
f8f84b735e Fixed expectations syntax for latest JMockit. Ensure any delete/remove methods are independent. 2014-08-08 16:12:28 -05:00
Tim Donohue
0b28592a1b Fixed expectations syntax for latest JMockit. Make testDelete() independent 2014-08-08 16:03:53 -05:00
Tim Donohue
0ac682cc4d Fixed mock/expectations syntax for latest JMockit 2014-08-07 16:49:06 -05:00
Tim Donohue
b810b99c89 Upgrade to latest JUnit, JMockit and H2. 2014-08-07 15:58:46 -05:00
Robin Taylor
26f8531232 DS-2091 Wee code change resulting from HttpComponents upgrade 2014-08-07 09:11:41 +01:00
Robin Taylor
9590a1571c DS-2091 Upgrade HttpComponents to 4.3.5 2014-08-07 09:09:37 +01:00
Pascal-Nicolas Becker
dc82633cf3 Merge pull request #595 from tuub/DS-1994
Adds configuration property for DS-1994.
2014-08-06 18:45:05 +02:00
Pascal-Nicolas Becker
1a321f439f Adds configuration property for DS-1994. 2014-08-06 18:42:38 +02:00
Pascal-Nicolas Becker
c211f50fc6 Merge pull request #594 from tuub/DS-2093
DS-2093: Remove dependency of dspace-api on backport-util-concurrent.
2014-08-06 18:35:48 +02:00
Pascal-Nicolas Becker
8ba387447a DS-2093: Remove dependency of dspace-api on backport-util-concurrent. 2014-08-06 18:18:25 +02:00
Pascal-Nicolas Becker
0807eabc06 Merge pull request #551 from tuub/DS-1994
DS-1994: Use HTML5 to upload files in Submission Process of JSPUI.
2014-08-06 18:05:29 +02:00
Pascal-Nicolas Becker
b104907519 Merge pull request #553 from tuub/DS-2012
Bugfix for DS-2012: commit after login to store last_active field.
2014-08-06 14:56:56 +02:00
rradillen
6651b2453e Update general.xsl
missed some debugging code
2014-08-04 12:55:50 +02:00
Tim Donohue
790f4829d7 Refactor/streamline DOI unit tests. They were ignoring setup already done in AbstractUnitTest, creating a secondary context obj, and sending all new items through workflow approval. 2014-07-31 15:53:16 -05:00
Tim Donohue
5cfc8089d9 Unit test framework cleanup, minor refactoring & enhanced comments. Removed a few surefire settings which are not needed. 2014-07-31 15:01:59 -05:00
Petya Kohts
d0bc58caa5 DS-2082: do not pollute provenance when adding several bitstreams 2014-07-31 00:49:15 +04:00
Tim Donohue
31b25d3316 Merge pull request #592 from tdonohue/DS-2080
DS-2080 Fix unit tests
2014-07-30 08:54:00 -05:00
roeland
a59672f2c3 build with dependencies included now default 2014-07-30 11:22:21 +02:00
Tim Donohue
82c287f989 Don't throw out error stacktrace, as it masks underlying error 2014-07-29 21:40:11 +00:00
Tim Donohue
585912d412 Fix unit tests, ensure name is reset so later tests work consistently 2014-07-29 19:09:19 +00:00
Bram Luyten
03ffdbe250 Merge pull request #590 from bram-atmire/DS-2079
[DS-2079] output bitstream to be processed in verbose mode
2014-07-29 19:17:18 +02:00
roeland
d77a3736cb fixed slow build 2014-07-29 11:40:10 +02:00
Petya Kohts
3a91559bb4 output bitstream to be processed in verbose mode 2014-07-28 21:46:04 +02:00
Pascal-Nicolas Becker
1410dd5672 Use html5 upload only if supported by the browser. Fallback is default.
The old upload should be the default upload. HTML5 upload should be used
only if it is supported by the browser. This commits repairs the use of
the old upload and makes it the default.

A severe bug was found and fixed by this commit: The first version of
this feature was not thread safe as it used a instance variable were it
shouldn't. This commit fixes this bad behavior.

The message to inform the user, that its browser does not support
enhanced upload can be translated now.
2014-07-28 18:06:38 +02:00
Marsa Haoua
990cfdb812 DS-1994: Use HTML5 to upload files in Submission Process of JSPUI. 2014-07-28 12:21:05 +02:00
Tim Donohue
55568426e7 Merge pull request #588 from tdonohue/DS-1408
DS-1408 : Increase database lock timeout to avoid lock errors
2014-07-25 13:46:17 -05:00
Tim Donohue
44bae8c4cf Increase database lock timeout to avoid lock errors 2014-07-25 18:22:50 +00:00
Tim Donohue
849effb507 Merge pull request #582 from tdonohue/DS-1408
DS-1408 - revert unnecessary  MVCC setting for H2 database
2014-07-25 12:27:20 -05:00
Tim Donohue
1d776e7414 Merge pull request #584 from tdonohue/DS-2075
DS-2075 : Decrease number of log messages for Travis CI & our sanity
2014-07-25 11:40:09 -05:00
KevinVdV
0fdc0630c5 [DS-2052] @mire Mirage 2 Contribution
[DS-2052] @mire Mirage 2 Contribution
2014-07-25 18:21:21 +02:00
Andrea Schweer
275556e96f Small tweaks transferred from ConfigurableBrowse
The three classes (ConfigurableBrowse, WithdrawnItems, PrivateItems) should
probably be refactored one day to use less duplication. In the meantime, this
commit cleans up a little bit.
2014-07-25 16:02:03 +12:00
Andrea Schweer
07f2d88adf [DS-2076] Same changes for PrivateItems as for WithdrawnItems 2014-07-25 16:01:18 +12:00
Andrea Schweer
f7151a2852 [DS-2076] Fix jump to browse for withdrawn items 2014-07-25 16:01:18 +12:00
Andrea Schweer
6df0196ea7 [DS-2076] Fix withdrawn items page title/trail 2014-07-25 16:01:17 +12:00
Tim Donohue
9a9fa9bcdf Tell TravisCI to cache ~/.m2 directory for our builds 2014-07-24 21:53:56 +00:00
Tim Donohue
b55001ac7e Put detailed test logs in *-output.txt files instead of stdout 2014-07-24 21:35:57 +00:00
Tim Donohue
294e6aba0a Merge pull request #575 from tdonohue/DS-2066
DS-2066 : Maven plugin updates and general POM cleanup
2014-07-24 14:35:58 -05:00
Tim Donohue
6512718272 Fix broken test. Don't assume Item of ID=1 exists 2014-07-24 18:34:01 +00:00
Tim Donohue
ab14cabea5 Fix broken test. Don't reuse cache name from another test. 2014-07-24 18:32:33 +00:00
Tim Donohue
ca3bba9fea Revert "Fix DS-1408 based on hints at http://stackoverflow.com/questions/4162557/timeout-error-trying-to-lock-table-in-h2"
This reverts commit 4f808e7236.
2014-07-24 17:29:56 +00:00
Tim Donohue
c1c761860e Merge pull request #535 from thanosk/DS-2002
OAI DC multilingual metadata support (ingestion)
2014-07-24 08:54:03 -05:00
Tim Donohue
2ccfc3755b Merge pull request #581 from dbs/coverage_typo
DS-2073 - Fix "covarage" typo in XSL transforms (OAI-PMH Crosswalks)
2014-07-24 08:49:37 -05:00
Dan Scott
c72c574a0d Fix "covarage" typo in XSL transforms
To the best of my knowledge, no actual XML format requires the
"covarage" typo as an element or attribute, and no site should be
entering a "covarage" metadata field.

Signed-off-by: Dan Scott <dan@coffeecode.net>
2014-07-23 16:27:54 -04:00
Tim Donohue
6ef03eadd3 Merge pull request #577 from tdonohue/DS-2068
DS-2068 - Tell Travis CI to retry a failed build
2014-07-18 14:17:17 -05:00
Tim Donohue
fa704734c3 Fix minor POM warning that ${artifact} is deprecated. 2014-07-18 16:58:21 +00:00
Tim Donohue
9884575467 Fix DS-2068 Tell Travis CI to retry a failed build 2014-07-18 15:11:47 +00:00
Mark H. Wood
8a89922f61 Revert "[DS-1718] Add config parameter webui.submit.upload.ajax to dspace.cfg?"
This reverts commit 2903af5d3c.

There is some uncertainty about whether this should exist.  See the Issue.
2014-07-18 10:37:13 -04:00
Àlex Magaz Graça
868584c2e3 DS-2067 DRI rend attribute not processed in side bar items. 2014-07-18 13:05:47 +02:00
Tim Donohue
437d68f6f3 DS-2066 : Maven plugin updates and general POM cleanup 2014-07-17 21:10:25 +00:00
Mark H. Wood
2903af5d3c [DS-1718] Add config parameter webui.submit.upload.ajax to dspace.cfg?
Just document it in dspace.cfg, with commented example.
2014-07-17 09:50:21 -04:00
Bram Luyten
1fa0673c07 Merge pull request #572 from KevinVdV/DS-1958
[DS-1958] Discovery OutOfMemoryError when indexing Large Bitstreams
2014-07-17 08:29:35 +02:00
Tim Donohue
895b0084d2 Merge pull request #493 from helix84/DS-1928-OAI-identify
DS-1928 use the oai-identifier schema in <description>
2014-07-16 16:46:15 -05:00
Tim Donohue
cdc3d8eaae Merge pull request #507 from misilot/patch-4
DS-1947: Remove reference to missing file
2014-07-16 13:17:35 -05:00
Tim Donohue
45db75f6ae Merge pull request #552 from antoine-atmire/DS-2035
[DS-2035] fixes: dim crosswalk is missing values for metadatafields with...
2014-07-16 12:58:08 -05:00
Àlex Magaz Graça
8b2c55883b DS-2064 METS ingester doesn't check if the files in the zip exist. 2014-07-16 14:25:17 +02:00
Àlex Magaz Graça
01e8719365 DS-2063 SWORD keep-package-on-fail doesn't work for RuntimeExceptions.
https://jira.duraspace.org/browse/DS-2063
2014-07-15 09:43:29 +02:00
KevinVdV
2d33d178c4 [DS-1958] Discovery OutOfMemoryError when indexing Large Bitstreams 2014-07-14 14:49:21 +02:00
Bram Luyten
364dfd8704 Merge pull request #566 from KevinVdV/DS-2060
[DS-2060] Extended SOLR commit duration due to SpellCheckComponent ("Did you mean")
2014-07-13 16:52:49 +02:00
Peter Dietz
2b9decafcc Merge pull request #561 from peterdietz/rest-context
DS-1986 REST to use new context for each request
2014-07-10 14:16:32 -04:00
KevinVdV
d5716e56d1 [DS-2060] Extended SOLR commit duration due to SpellCheckComponent ("Did you mean") 2014-07-10 13:42:00 +02:00
Bram Luyten
c9943d2cea Merge pull request #564 from bram-atmire/DS-2038
DS-2038 Oracle DB Schema minor error
2014-07-09 21:55:43 +02:00
Bram Luyten
091f871be4 DS-2038 Oracle DB Schema minor error 2014-07-09 21:54:26 +02:00
Mark H. Wood
1d90e1b4b1 Merge pull request #563 from mwoodiupui/DS-2056
[DS-2056] Syntax errors in configurable workflow SQL scripts for Oracle
2014-07-09 15:51:49 -04:00
Tim Donohue
8ad8b31d1c Merge pull request #513 from rivaldi8/DS-1805
[DS-1805] Maven filtering broken for SOLR artifact.
2014-07-09 14:45:29 -05:00
Tim Donohue
03d7ddd2cc Merge pull request #500 from helix84/DS-1919-jspui-empty-filterquery
DS-1919 Solr Search Empty FilterQuery bug
2014-07-09 14:38:56 -05:00
Mark H. Wood
ee7c2a84ae Fix a few typo.s. 2014-07-09 10:37:04 -04:00
Mark H. Wood
764a2b536c Merge pull request #514 from rradillen/patch-4
I'm going to merge this, as the changes appear correct.  But further, unrelated changes are needed to make the scripts run.
2014-07-09 10:19:20 -04:00
Peter Dietz
859e69285f DS-1986 Get new context each time, close in finally, for all REST methods 2014-07-03 15:39:12 -04:00
Peter Dietz
9db37af66c Close context at end of REST request to community
- Following advice from Richard Rodgers at OR14
2014-07-03 15:39:01 -04:00
Peter Dietz
0725215d06 remove html output from rest 2014-07-03 15:38:51 -04:00
Hardy Pottinger
ec06834491 Merge pull request #469 from tuub/DS-1906
DS-1906: Adds configurable option to reconvert shibboleth attributes.
2014-07-03 14:15:38 -05:00
Tim Donohue
8d4a3d96e4 Update JSPUI/XMLUI robots.txt to include SiteMaps and update Ant build process to use fill it out. 2014-07-03 18:22:13 +00:00
Mark H. Wood
aa18bfd9e2 [DS-1985] Comment in SolrBrowseCreateDAO doesn't match desired behaviour
https://jira.duraspace.org/browse/DS-1985
2014-07-02 13:41:48 -04:00
Tim Donohue
e9800cb4d2 Merge pull request #555 from tdonohue/DS-2024
Fix DS-2024 by commenting out invalid sample configs
2014-06-30 15:54:02 -05:00
Tim Donohue
689ed282b5 Fix DS-2024 by commenting out invalid sample configs 2014-06-30 20:29:25 +00:00
Ivan Masár
46a63583cf fix typos 2014-06-27 13:32:12 +02:00
Kevin Van de Velde
4e2780ce50 Merge pull request #554 from KevinVdV/DS-2036
[DS-2036] DSpace upgrade with oracle database, no discovery results
2014-06-27 09:34:42 +02:00
KevinVdV
322972152e [DS-2036] DSpace upgrade with oracle database, no discovery results 2014-06-27 08:55:59 +02:00
Mark H. Wood
8c9362763f Merge pull request #525 from akinom/GROUP.Anonymous_Admin-Constants
DS-1982 define Group.ANONYMOUS_ID and Group.ADMIN_Id and use instead of 0,1
2014-06-25 15:46:13 -04:00
KevinVdV
4d85f7c34c [DS-2036] DSpace upgrade with oracle database, no discovery results 2014-06-24 16:43:57 +02:00
Pascal-Nicolas Becker
5d3584a0aa Bugfix for DS-2012: commit after login to store last_active field. 2014-06-24 16:41:36 +02:00
Antoine Snyers
2c930c597b [DS-2035] fixes: dim crosswalk is missing values for metadatafields with more than one value for the same language 2014-06-24 13:20:57 +02:00
Kevin Van de Velde
bcdba61a7a Merge pull request #453 from BavoVanGeit/master
DS-1886 Delete obsolete spring-dspace-addon-discovery-configuration-services.xml
2014-06-23 14:52:38 +02:00
Terry Brady
a2be05b731 Update bitstream-ordering.js
Found an additional scenario in which a javascript error occurs while re-ordering bitstreams.

Create an item with 3 original bitstreams.

Go to the edit bitstream screen and hit the down arrow on the second item.  An error will be thrown revealing a row without an id attribute.
2014-06-18 14:38:10 -07:00
Terry Brady
2e321852c6 Update bitstream-ordering.js
There is a bad JQuery selector in the following code. This causes a submit to take place each time an up or down arrow is clicked. It is difficult to see the error in the javascript console because the submit takes place immediately. 

Due to the page refresh delay, this is confusing to users when a large number of bitstreams are present. 

Note that "$^=" is not a valid selector. 

http://api.jquery.com/category/selectors/
2014-06-18 11:50:51 -07:00
Tim Donohue
49593e225e Merge pull request #2 from misilot/patch-5
Added a / in the context path for the Go Home Button
2014-06-05 10:55:34 -05:00
Thomas Misilo
b47159fd60 Added a / in the path for the Go Home Button
The link being generated was for the current page, and not the home page.
2014-06-05 11:14:59 -04:00
Mark H. Wood
73a14a5c76 Merge pull request #541 from helix84/DS-2013-ItemDAOOracle
DS-2013 implement ItemDAOOracle to fix thumbnails in browse
Tested in JSPUI.
2014-06-04 16:28:40 -04:00
Hardy Pottinger
ddf2a8d9da Merge pull request #520 from EKT/DS-1971
DS-1971 Updated bte dependency to v0.9.2.4
2014-06-03 17:02:52 -05:00
Mark H. Wood
c0da1eda59 Merge pull request #542 from mwoodiupui/DS-1961
[DS-1961] Use HTTPS with oss.sonatype.org repository
2014-05-29 16:24:56 -04:00
Mark H. Wood
a7cecb311b Merge pull request #545 from mwoodiupui/DS-1943
[DS-1943] Language Selection _ Turkish Option
2014-05-29 15:22:59 -04:00
Mark H. Wood
920a8cab24 Language Selection _ Turkish Option 2014-05-29 14:48:16 -04:00
Àlex Magaz Graça
6cec55c08a DS-2015 ORE data is duplicated when an item is updated through a harvest. 2014-05-29 14:35:08 +02:00
Peter Dietz
c233545a19 DS-740 default the public thumbnails of restricted objects to off 2014-05-28 15:17:25 -04:00
Peter Dietz
884ba64162 DS-740 Allow media filter to set public-read permissions on thumbnails 2014-05-28 15:15:51 -04:00
Mark H. Wood
54e0e644f5 Merge pull request #515 from atmire/DS-1958
DS-1958 Fix SolrLogger Memory Error
2014-05-22 13:56:33 -04:00
Mark H. Wood
77a8929c72 [DS-1961] Use HTTPS with oss.sonatype.org repository 2014-05-22 13:18:24 -04:00
Denis Fdz
4832ba3ffc DS-2013 implement ItemDAOOracle to fix thumbnails in browse 2014-05-22 12:23:03 +02:00
Mark H. Wood
375b8af8a8 Merge pull request #534 from helix84/DS-1998-cli-classpath
DS-1998 fix the "dspace classpath" CLI command
2014-05-21 15:48:17 -04:00
helix84
b78ed8ae54 Merge pull request #540 from keithgee/clean_database_update
Update clean-database to drop additional tables
2014-05-19 18:17:02 +02:00
keithgee
61e7db6a2f Update clean-database to drop additional tables
Updates clean-database.sql file to drop tables recently added to the
DSpace project:

-  webapp, webapp_seq
- requestitem, requestitem_seq;
2014-05-19 11:37:48 -04:00
Peter Dietz
9806160282 For request-item move the you can login Button before the request item para 2014-05-15 15:05:20 -04:00
KevinVdV
73a93b26af [DS-2005] Discovery hit highlighting issue with abstracts/fulltext 2014-05-15 16:03:31 +02:00
Mark H. Wood
8f311956af Merge pull request #517 from pnbecker/DS-1966
Simulate a remove event at the site on deletion of a top level community
2014-05-14 15:23:05 -04:00
Thanos Kyritsis
33704efe8f Enable OAI DC multilingual metadata support for the Ingestion Crosswalk class
Fix for [DS-2002] https://jira.duraspace.org/browse/DS-2002
2014-05-14 16:08:37 +03:00
Peter Dietz
397118bfc6 Restricted Item request form, add link to login page for members 2014-05-12 09:14:58 -04:00
Ivan Masár
0384a4754d DS-1998 fix the "dspace classpath" CLI command 2014-05-11 20:27:00 +02:00
Peter Dietz
76cb046280 DS-1945 Add license headers for requestitem changes 2014-05-10 08:37:33 -04:00
Peter Dietz
21cb0e0520 DS-1945 Add request_message to requestitem DB table
Also, refactored requestitem to be a dspace-api "model", moved all DB logic
from XMLUI regarding this module to the dspace-api model.

Add the requestitem.request_message to display in the contact-author form,
so they can see what the original request message was.
2014-05-10 08:20:11 -04:00
Peter Dietz
ce4dea172d DS-1945 RequestItem Helpdesk has options to contact requester, and author 2014-05-09 21:04:57 -04:00
jm
ce6417289b DS-1993, return null instead of throwing exception 2014-05-02 15:57:07 +02:00
Peter Dietz
0bf866b0d6 Add RequestItemHelpdeskStrategy, that can be enabled with Spring DI
Cleans up Sam's "hard coded" approach
2014-05-02 01:16:07 -04:00
Sam Ottenhoff
f85b711d28 DS-1945 refactor to move code into dspace-api 2014-05-02 01:11:55 -04:00
Sam Ottenhoff
81d7b8e770 DS-1945 New override property request.item.helpdesk.override to have all email requests sent to the helpdesk instead of the item submitter 2014-05-02 01:11:55 -04:00
Monika Mevenkamp
7fe95b7312 define Group.ANONYMOUS_ID and Group.ADMIN_Id and use instead of 0,1 2014-04-23 09:52:26 -04:00
Keiji Suzuki
3bf90abf72 Fixed bugs related to setting default filter queries 2014-04-20 14:43:57 +09:00
Panagiotis Koutsourakis
c17ce9517f Updated bte dependence to v0.9.2.4
See the relevant discussion here: https://jira.duraspace.org/browse/DS-1971
2014-04-18 11:06:22 +03:00
Mark Diggory
a54d3140a6 Remove Commented out line. 2014-04-17 08:40:49 -07:00
Hardy Pottinger
454061ff71 Merge pull request #519 from rradillen/patch-5
DS-1970 to many open files exception
2014-04-15 09:41:23 -05:00
rradillen
9dc9235a9b DS-1970 to many open files exception
when update lucene index
2014-04-15 15:32:00 +02:00
Keiji Suzuki
e3fbba61c6 Select the collection already selected in the previous operation 2014-04-11 02:57:50 +00:00
Pascal-Nicolas Becker
fe16267d8f Simulate a remove event at the site on deletion of a top level community
Fixes DS-1966
2014-04-09 18:52:35 +02:00
Keiji Suzuki
1828d968a3 edited for junii2 version 3.1 2014-04-04 10:02:15 +09:00
Mini
20fb12cb01 Fix SolrLogger Memory Error 2014-04-02 13:05:41 -07:00
Mark H. Wood
fb61ed0597 Merge pull request #492 from mwoodiupui/DS-1909
[DS-1909] EZID IdentifierProvider broken by recent change to EZID service
2014-04-02 14:36:23 -04:00
rradillen
89d7c76c68 DS-1957 xml workflow script incorrect for oracle 2014-04-01 14:49:15 +02:00
Bram Luyten
12faf442a8 Merge pull request #510 from antoine-atmire/DS-1584
[DS-1584] Fixes the broken the browse by "jump links" after changing bro...
2014-03-28 11:27:39 +01:00
Mark H. Wood
a17eda1dfb Merge pull request #508 from mwoodiupui/DS-1935
[DS-1935] POM enforces wrong Java version, does not enforce Maven version
2014-03-27 14:24:16 -04:00
Mark H. Wood
efaa1edad8 Merge pull request #506 from mwoodiupui/DS-1939
[DS-1939] JMockit 0.994 is too old for Java 1.7
2014-03-27 14:22:49 -04:00
Àlex Magaz Graça
9024ff79a1 [DS-1805] Maven filtering broken for SOLR artifact.
Enable filtering of dspace-solr's web.xml.
2014-03-27 14:04:25 +01:00
Mark H. Wood
12738a4cbc Merge pull request #512 from mwoodiupui/DS-1411-master
[DS-1411] Handle multiple-file patterns (-m) in the current directory.
2014-03-26 17:08:30 -04:00
Mark H. Wood
b82daa1873 [DS-1411] Handle multiple-file patterns (-m) in the current directory.
If there is not at least a relative path (dir/patt.ern) then
File.getParentFile() returns null.
2014-03-26 17:05:47 -04:00
Antoine Snyers
f7482b3c19 [DS-1584] Fixes the broken the browse by "jump links" after changing browse index 2014-03-26 10:28:40 +01:00
Ivan Masár
68842442a5 remove duplicate strings from messages.xml 2014-03-20 09:42:35 +01:00
Mark H. Wood
95f94de73c Upgrade to Java 1.7 and require Maven 3.0 2014-03-13 14:49:22 -04:00
Thomas Misilo
d082c3ef62 DS-1947: Remove reference to missing file
The missing file, seems to be an Institution specific file. 

The missing file in question m-tweaks.js
2014-03-12 22:20:48 -04:00
Mark H. Wood
aaf608ceae [DS-1946] Solr floods catalina.out with unwanted messages
https://jira.duraspace.org/browse/DS-1946
2014-03-12 16:33:11 -04:00
Hardy Pottinger
ca8b69312c [DS-1944] remove extra close paren
This is a simple one-character deletion, making it via the github edit interface.
2014-03-12 15:31:56 -05:00
Mark H. Wood
228b181cc9 Upgrade to JMockit 1.1, needed for use with Java 7 2014-03-12 13:47:19 -04:00
helix84
006c556707 Merge pull request #503 from tdonohue/DS-1940
Fix for DS-1940. Windows doesn't like the "/*" in an Ant target name.
2014-03-10 18:44:04 +01:00
Tim Donohue
b62e7fb6f5 Fix for DS-1940. Windows doesn't like the "/*" in an Ant target name. 2014-03-10 12:05:38 -05:00
Denis Fdz
ea791a12fd DS-1919 Solr Search Empty FilterQuery bug 2014-03-07 00:27:31 +01:00
Pascal-Nicolas Becker
c6016c8304 Reconvert shibboleth attribute only if it is neither null nor empty. 2014-03-06 16:15:41 +01:00
helix84
daffdb20f3 Merge pull request #494 from rradillen/patch-3
DS-1930 default encoding differs between cli and webui
2014-03-03 11:04:23 +01:00
rradillen
383d7625c4 DS-1930
default encoding differs between cli and webui
2014-02-28 15:23:29 +01:00
rradillen
296e65df2e DS-1930
default encoding differs between cli and webui
2014-02-28 15:21:14 +01:00
Ivan Masár
396b4fb303 DS-1928 use the oai-identifier schema in <description> 2014-02-28 14:36:43 +01:00
Mark H. Wood
229f1de088 Merge pull request #484 from mwoodiupui/DS-1795
[DS-1795] When run command dspace "dspace stat-initial"
2014-02-26 14:14:15 -05:00
helix84
e610bb12b3 Merge pull request #480 from aschweer/DS-1907-hit-highlighting
DS-1907 Hit highlighting not working, no abstracts for search results
2014-02-21 16:49:32 +01:00
kshepherd
a03f59b1ea Merge pull request #485 from kshepherd/DS-1779
[DS-1779] - Pagination link error in JSPUI discovery search
2014-02-21 10:34:12 +13:00
Kim Shepherd
5093751e17 [DS-1779] - Pagination link error in JSPUI discovery search 2014-02-21 09:53:51 +13:00
Mark H. Wood
79b984f19b Constrain the subquery to 'dc' fields 2014-02-20 12:36:14 -05:00
Mark H. Wood
467ba7c18e Merge pull request #476 from mwoodiupui/DS-1798
[DS-1798] Distributed dspace.cfg causes noise about unconfigured XSLTDisseminationCrosswalk
2014-02-20 08:14:49 -05:00
helix84
c9dfc7dbab Merge pull request #483 from helix84/DS-1863-jspui-selection-theme
DS-1863 JSPUI eperson and group selection should use the new theme
2014-02-20 12:18:28 +01:00
Ivan Masár
edc662d33d DS-1863 JSPUI eperson and group selection should use the new theme 2014-02-20 12:16:07 +01:00
Andrea Schweer
16a9a0da5c DS-1907 Hit highlighting not working, no abstracts for search results 2014-02-20 10:59:10 +13:00
Hardy Pottinger
8799f31e9b Merge pull request #474 from KevinVdV/DS-1912
[DS-1912] Discovery facets do not always use the authority identifier
2014-02-19 15:30:52 -06:00
Luigi Andrea Pascarelli
0432f67a40 Merge pull request #478 from lap82/DS-1918
[DS-1918] added size for URL column
2014-02-18 23:20:15 +01:00
Pascarelli Luigi Andrea
e576ebc96d DS-1918 added size for URL column 2014-02-18 22:50:22 +01:00
Ivan Masár
ecb266c558 DS-1917 JSPUI validity fixes (several non-controversial fixes) 2014-02-18 15:46:26 +01:00
Ivan Masár
c211b8b00a DS-1916 Error in update-sequence script in 4.0 2014-02-18 15:17:52 +01:00
helix84
95ff5c780a Merge pull request #433 from KevinVdV/DS-1848
[DS-1848] OAI harvest issues when starting from control panel/command line
2014-02-18 10:17:02 +01:00
helix84
c160a6e1ff Merge pull request #430 from KevinVdV/DS-1834
[DS-1834] Collection content source harvesting test does not check sets properly
2014-02-17 15:23:27 +01:00
helix84
a9ebb5a6ba Merge pull request #467 from tuub/DS-1860
Fixes DS-1860 to show all collections and communities in community list.
2014-02-17 14:57:38 +01:00
KevinVdV
f35b959cb5 [DS-1912] Discovery facets do not always use the authority identifier 2014-02-14 14:35:27 +01:00
helix84
e134c1a1bc Merge pull request #466 from lyncode/OAI_v2.1
OAI 2.1
2014-02-14 10:24:27 +01:00
Mark H. Wood
cac35267fe [DS-1798] Comment out XSLTDisseminationCrosswalk.
It lacks configuration and thus causes error messages whenever the DisseminationCrosswalk list is walked.
2014-02-12 15:24:19 -05:00
Mark H. Wood
057b31083a Implement EZID_PATH and use it 2014-02-12 12:10:56 -05:00
Pascal-Nicolas Becker
7e6b805e32 DS-1906: Adds configurable option to reconvert shibboleth attributes. 2014-02-07 19:11:29 +01:00
Mark H. Wood
93fc28277e Merge pull request #458 from mwoodiupui/DS-1889
[DS-1889] Build DSpace into a standard directory to better support install automation
2014-02-07 08:45:48 -05:00
helix84
16744a3f95 Merge pull request #451 from helix84/DS-1821-bitstream-access-icon-i18n
DS-1821 Internationalize the bitstream access icon alt text
2014-02-07 09:43:59 +01:00
Mark H. Wood
8c4862fc12 Merge pull request #464 from mwoodiupui/DS-1531
[DS-1531] bug in current DSpace (3.1) with log importing
2014-02-05 16:54:29 -05:00
Mark H. Wood
0bc01a8015 Merge pull request #305 from rivaldi8/DS-1536
DS-1536 having a DOT in handle prefix causes identifier.uri to be cut of...
2014-02-05 16:13:40 -05:00
Marsa Haoua
aaacf61c35 Fixes DS-1860 to show all collections and communities in community list. 2014-02-05 12:16:03 +01:00
João Melo
2e9d18eba4 Fixed license header. 2014-02-05 00:38:09 +00:00
João Melo
403d7fbee5 h1. OAI v2.1
h2. Bug fixes:

* Default context without restricted items
* Solr Timezone
* Compilable with 1.6
* DS-1902
* DS-1898

h2. New Features:

* Operators over filters (combination of filters) - foundation work for OpenAIRE guidelines v3.
* Redesigned interface
* Root context (/oai) now displays the list of available contexts

h2. Other:

Using new XOAI 3.2.7 core
2014-02-05 00:21:50 +00:00
João Melo
049eb50e6e h1. OAI v2.1
h2. Bug fixes:

* Default context without restricted items
* Solr Timezone
* Compilable with 1.6
* DS-1902
* DS-1898

h2. New Features:

* Operators over filters (combination of filters) - foundation work for OpenAIRE guidelines v3.
* Redesigned interface
* Root context (/oai) now displays the list of available contexts

h2. Other:

Using new XOAI 3.2.7 core
2014-02-05 00:20:45 +00:00
Tim Donohue
ea3dcd9d94 DS-1596 fix for "mobile" theme 2014-02-04 20:12:18 +00:00
Tim Donohue
b998366352 Fix DS-1596 for 'template' theme. 2014-02-04 20:11:52 +00:00
Tim Donohue
a431880d0a DS-1596 fix for "Kubrick" theme 2014-02-04 19:50:10 +00:00
Tim Donohue
3f81689924 DS-1596 fix for "Classic" theme 2014-02-03 22:36:55 +00:00
Tim Donohue
7aaf418e86 DS-1596 fix for "Reference" theme 2014-02-03 17:53:11 +00:00
Tim Donohue
8f35788a2e Merge pull request #442 from tdonohue/DS-1873
DS-1873: Minor fixes for Checksum Checker Daily Report Emailer.
2014-01-31 13:59:37 -08:00
Mark H. Wood
c6d8baba07 Merge pull request #439 from mwoodiupui/DS-1746
[DS-1746] Remove strange, redundant pool validation from DBMS layer
See the Jira ticket for my analysis.  We should consider those concerns, but the code here does not address them properly.
2014-01-31 11:16:41 -08:00
Mark H. Wood
c9a72a4043 Rename install directory, removing version number 2014-01-31 14:03:48 -05:00
Mark H. Wood
5ef301c00b Remove all traces of metadataStorageInfo.
The field is never set in SolrLogger, so getMetadataStorageInfo always
returns null.  Attempts to dereference the Map supposedly returned
should thus always terminate abruptly.
2014-01-31 13:31:02 -05:00
Mark H. Wood
bd3d5eccf6 Tidy up some warnings and hints 2014-01-31 11:47:05 -05:00
helix84
bdb1b826d6 Merge pull request #463 from EKT/DS-1857
Change BTE version to 0.9.2.3 for DS-1857
2014-01-31 07:21:25 -08:00
Andrea Bollini
689e64e0bc Merge branch 'dspace-4_x' 2014-01-31 15:46:55 +01:00
Andrea Bollini
1f67d597e4 DS-1899 - Spellchecking is not enabled by default on the whole site 2014-01-31 15:46:09 +01:00
Panagiotis Koutsourakis
21a952d95a Change BTE version to 0.9.2.3 2014-01-31 12:58:55 +02:00
Andrea Bollini
d3d141b6a5 Merge branch 'dspace-4_x' 2014-01-30 23:53:18 +01:00
Andrea Bollini
68be0c2f04 DS-1897 Upload Progress bar only doesn't show progress 2014-01-30 23:52:34 +01:00
KevinVdV
fa13004936 [DS-1833] Collection content source harvesting test does not work with ORE 2014-01-30 12:12:19 +01:00
helix84
f8f76b2e10 Merge pull request #429 from KevinVdV/DS-1833
[DS-1833] Collection content source harvesting test does not work with ORE
2014-01-30 03:11:47 -08:00
helix84
ea580f617f Merge pull request #454 from rradillen/patch-1
DS-1887 assembly descriptor namespace
2014-01-30 03:04:56 -08:00
KevinVdV
18c2d72ea9 [DS-1893] Get page refresh after adding a value in the submission forms clears all metadata in XMLUI 2014-01-30 11:53:08 +01:00
helix84
28ee7688da Merge pull request #461 from KevinVdV/DS-1893
[DS-1893] Get page refresh after adding a value in the submission forms clears all metadata in XMLUI
2014-01-30 02:52:31 -08:00
KevinVdV
207d5abce1 [DS-1893] Get page refresh after adding a value in the submission forms clears all metadata in XMLUI 2014-01-30 11:32:38 +01:00
KevinVdV
7f9bbad94a [DS-1848] OAI harvest issues when starting from control panel/command line 2014-01-30 10:47:37 +01:00
João Melo
b233f24d58 Fixed typos 2014-01-29 21:52:07 +00:00
Mark H. Wood
7cf0466f00 Exclude Bootstrap from license check, restore stock notices 2014-01-29 16:00:59 -05:00
Panagiotis Koutsourakis
8ce6efa92f Update dependency to the latest BTE release 2014-01-29 21:38:43 +01:00
Kostas Stamatis
2220874490 addBTEItems rethrows BTE exceptions 2014-01-29 21:38:40 +01:00
Panagiotis Koutsourakis
df166341c1 Fix a bug that brings down the webapp container.
Instead of using System.exit() the method addItems now throws an
exception that can be handled higher in the calling stack, or will
terminate the thread.
2014-01-29 21:38:34 +01:00
Kostas Stamatis
e5c2fb4f0e change default BTE configuration for CSV and TSV data loaders 2014-01-29 21:38:30 +01:00
Mark H. Wood
f07efbc2e8 Merge pull request #449 from mwoodiupui/DS-1835
[DS-1835] Invalid bootstrap CSS
2014-01-29 12:38:28 -08:00
Kostas Stamatis
aeeba40bfb throw missing exception when batch importing using BTE via admin UI 2014-01-29 21:38:25 +01:00
helix84
74ba039546 Merge pull request #446 from EKT/DS-1857
DS-1857 Unhandled exception in BTE batch import when uploading CSV files with misconfiguration options
2014-01-29 12:32:55 -08:00
João Melo
8e6c09bf0c Added cglib, a runtime dependency for spring mvc 2014-01-29 19:38:48 +00:00
Tim Donohue
1133283d0b DS-1596 fix for Mirage Theme only. 2014-01-29 18:47:44 +00:00
helix84
f849c49cb9 Merge pull request #424 from misilot/patch-1
DS-1817: Improvement of Collection Dropdown on Move Item Page
2014-01-29 04:32:34 -08:00
rradillen
645af0e4ec DS-1890 correct scope logging of searches
logged scopeId and scopeType properly.
2014-01-29 10:12:24 +01:00
helix84
75e901cb61 Merge pull request #455 from rradillen/patch-2
DS-1890 correct scope logging of searches
2014-01-29 01:10:55 -08:00
rradillen
981abdc0a1 DS-1890 correct scope logging of searches
logged scopeId and scopeType properly.
2014-01-29 09:55:11 +01:00
João Melo
96d143e6eb Fixed broken tests (my bad). Dependencies changes to resolve some conflicts with older versions of spring. 2014-01-29 08:53:21 +00:00
João Melo
b736767501 Fixed a database issue. Thanks to UMINHO which is testing against a real scenario. 2014-01-29 01:57:12 +00:00
Tim Donohue
25f4f5c141 Fix for DS-1867. Ensure native2ascii call uses 'root.basedir' and not 'basedir', so that it also works from submodules (e.g. [src]/dspace). Also some minor cleanup of POM. 2014-01-28 20:18:31 +00:00
Tim Donohue
f1c212c017 Merge pull request #443 from tdonohue/DS-1867
Fix for DS-1867 - Maven build issues from [src]/dspace/
2014-01-28 12:16:51 -08:00
Andrea Schweer
51a0b07091 DS-1879 Do not require ADMID for bundles in METS 2014-01-28 19:44:05 +00:00
Tim Donohue
178bf530d2 Merge pull request #452 from aschweer/DS-1879-mets-admid
DS-1879 Do not require ADMID for bundles in METS
2014-01-28 11:39:42 -08:00
rradillen
89141d84e9 DS-1887 assembly descriptor namespace
assembly descriptor uses the wrong namespace
updated namespace
2014-01-28 15:56:28 +01:00
BavoVanGeit
7614c8bbdb Delete spring-dspace-addon-discovery-configuration-services.xml 2014-01-28 13:23:58 +01:00
Andrea Schweer
fbfea0c0cd DS-1879 Do not require ADMID for bundles in METS 2014-01-28 12:01:21 +13:00
Ivan Masár
c83e94567e DS-1821 Internationalize the bitstream access icon alt text 2014-01-27 17:32:06 +01:00
Ivan Masár
b1a75fa617 DS-1816 add missing DSO type to DRI (focus.containerType) 2014-01-27 14:29:39 +01:00
Adán Román Ruiz
d85725c3b8 DS-1881 Remove filter button in XMLUI Discovery filters deletes all "New filters" 2014-01-27 14:29:24 +01:00
helix84
9fc0e06794 Merge pull request #450 from helix84/DS-1816-containerType
DS-1816 add missing DSO type to DRI (focus.containerType)
2014-01-27 02:03:25 -08:00
Ivan Masár
ef83d8ebf5 DS-1816 add missing DSO type to DRI (focus.containerType) 2014-01-27 11:01:08 +01:00
helix84
03d4701c0c Merge pull request #397 from zuki/DS-1797
DS-1797 Add a new oai format 'junii2'
2014-01-27 01:08:51 -08:00
Mark H. Wood
0f63107b6c Merge pull request #440 from mwoodiupui/DS-1862
[DS-1862] Too many ROMEs
2014-01-25 11:50:18 -08:00
Mark H. Wood
7d5feb73dd Merge pull request #438 from mwoodiupui/DS-1861
[DS-1861] Replace DSpace-packaged JMockit with official artifacts
2014-01-25 11:37:54 -08:00
Mark H. Wood
df00d25ad1 Merge pull request #437 from mwoodiupui/DS-1842
[DS-1842] Use geoip and dnsjava official artifacts at Maven Central
2014-01-25 11:35:44 -08:00
Mark H. Wood
dc407d6a8a Exclude Bootstrap from license check, restore stock notices 2014-01-24 21:24:45 -05:00
helix84
4e1830e233 Merge pull request #448 from muelle/DS-1881
DS-1881 Remove filter button in XMLUI Discovery filters deletes all "New filters"
2014-01-24 07:14:08 -08:00
Adán Román Ruiz
31af670e54 DS-1881 fix 2014-01-24 14:15:12 +01:00
Panagiotis Koutsourakis
116adadfb8 Update dependency to the latest BTE release 2014-01-24 13:28:58 +02:00
Kostas Stamatis
10883a5f03 addBTEItems rethrows BTE exceptions 2014-01-24 13:26:42 +02:00
Panagiotis Koutsourakis
56515633c9 Fix a bug that brings down the webapp container.
Instead of using System.exit() the method addItems now throws an
exception that can be handled higher in the calling stack, or will
terminate the thread.
2014-01-24 13:26:16 +02:00
Kostas Stamatis
ea7f660458 change default BTE configuration for CSV and TSV data loaders 2014-01-24 13:26:04 +02:00
Kostas Stamatis
13b0cbc03b throw missing exception when batch importing using BTE via admin UI 2014-01-24 13:25:52 +02:00
Ivan Masár
e7eee24908 DS-1878 make search URL recognize Lucene/Discovery in mobile theme 2014-01-23 12:15:46 +01:00
helix84
2f5066d2c1 Merge pull request #444 from helix84/DS-1878-mobile-theme-search
DS-1878 make search URL recognize Lucene/Discovery in mobile theme
2014-01-23 03:14:43 -08:00
Ivan Masár
bc73eb57a1 DS-1878 make search URL recognize Lucene/Discovery in mobile theme 2014-01-23 12:12:55 +01:00
Thomas Misilo
7c400d34d6 DS-1756 Wrongly aligned text on mobile theme
Removed margin-left: -35px; which pushes "There are no files associated with this item." over to the right. I tested this in firebug.
2014-01-23 11:07:17 +01:00
helix84
8b1615b54e Merge pull request #436 from misilot/patch-3
DS-1756 Wrongly aligned text on mobile theme
2014-01-23 02:06:00 -08:00
Thomas Misilo
0696100e52 DS-1757 Missing images in mobile theme
Removed link to mobile-default-thumbnail.png and changed to default-thumbnail.png which already existed.
Added contextPath
2014-01-22 21:45:30 +01:00
KevinVdV
ab851b8ba8 [DS-1832] Proxy configuration set in system properties if empty 2014-01-22 21:43:32 +01:00
Mark H. Wood
93f9b3f9fc [DS-1744] Upgrade to latest log4j 2014-01-22 21:42:16 +01:00
helix84
2afe11c53e Merge pull request #435 from misilot/patch-2
DS-1757 Missing images in mobile theme
2014-01-22 12:36:58 -08:00
Tim Donohue
4185f3f811 Fix for DS-1867. Ensure native2ascii call uses 'root.basedir' and not 'basedir', so that it also works from submodules (e.g. [src]/dspace). Also some minor cleanup of POM. 2014-01-21 22:32:06 +00:00
Tim Donohue
a27d40c3b2 Minor fixes for Checksum Checker Daily Report Emailer. Ensure it only sends an email if there's a possible issue. Also include DSpace hostname in email subject. 2014-01-21 20:44:59 +00:00
João Melo
75fda5ce67 Adding set spec filter. 2014-01-19 21:34:19 +00:00
João Melo
08d0fdd5d3 Using default filter. 2014-01-19 21:30:48 +00:00
João Melo
f231ff5308 OAI 2.1 2014-01-19 21:03:45 +00:00
Mark H. Wood
7e3f3de7dd [DS-1862] consolidate Rome versions 2014-01-14 16:54:37 -05:00
Mark H. Wood
25383e60ce [DS-1746] Obliterate sqlOnBorrow 2014-01-14 15:54:15 -05:00
Mark H. Wood
f380fc7e06 [DS-1861] Replace DSpace-packaged JMockit with official artifacts 2014-01-14 15:10:00 -05:00
Thomas Misilo
31f01277ac Added contextPath
Added context path per helix84.
2014-01-08 14:59:01 -05:00
Thomas Misilo
7d64e998ec DS-1756:Wrongly aligned text on mobile theme
Removed margin-left: -35px; which pushes "There are no files associated with this item." over to the right. I tested this in firebug.
2014-01-08 14:45:40 -05:00
Thomas Misilo
fd2a95f4fc DS-1757:Missing images in mobile theme
Removed link to mobile-default-thumbnail.png and changed to default-thumbnail.png which already existed.
2014-01-08 14:27:36 -05:00
Bram Luyten
38a7f17758 Merge pull request #428 from KevinVdV/DS-1832
[DS-1832] Proxy configuration set in system properties if empty
2013-12-21 03:11:25 -08:00
Mark H. Wood
f9948565b0 [DS-1744] Upgrade to latest log4j 2013-12-20 13:14:16 -05:00
KevinVdV
3f5214e58b [DS-1834] Collection content source harvesting test does not check sets properly 2013-12-20 16:49:01 +01:00
Mark H. Wood
6f0eaf722c Update master branch to next major release 2013-12-17 20:50:44 -05:00
Mark H. Wood
60ff043296 [DS-1842] Use geoip and dnsjava official artifacts at Maven Central 2013-12-16 16:59:58 -05:00
Mark H. Wood
532f58ee49 [maven-release-plugin] prepare for next development iteration 2013-12-16 15:08:02 -05:00
Mark H. Wood
d34e7b89a3 [maven-release-plugin] prepare release dspace-4.0 2013-12-16 15:07:58 -05:00
Mark H. Wood
56d2413858 Update documentation 2013-12-16 14:50:09 -05:00
Eliana de M.P.Coelho
42e3e9f390 add context to two methods parameters to have monthly statistics localised 2013-12-13 12:31:23 -05:00
Mark H. Wood
77f72c8b87 Merge pull request #431 from hardyoyo/DS-1841-add-examples-for-spider-filtering-by-domain-and-agent
DS-1841 adding example files for agent and domain-based spider filtering
2013-12-13 05:51:35 -08:00
Hardy Pottinger
4f5846f2b8 DS-1841: adding example files for agent and domain-based spider filtering, borrowed from OSU Libraries, with much thanks 2013-12-12 23:17:52 +00:00
KevinVdV
b6bfedd5c7 [DS-1834] Collection content source harvesting test does not check sets properly 2013-12-11 14:38:01 +01:00
KevinVdV
e8446e1dc8 [DS-1833] Collection content source harvesting test does not work with ORE 2013-12-11 13:16:00 +01:00
KevinVdV
84d6833192 [DS-1832] Proxy configuration set in system properties if empty 2013-12-11 10:40:47 +01:00
Mark H. Wood
e1ad056a99 [maven-release-plugin] prepare for next development iteration 2013-12-06 18:25:22 -05:00
Mark H. Wood
456c3d1804 [maven-release-plugin] prepare release dspace-4.0-rc3 2013-12-06 18:24:59 -05:00
Mark H. Wood
be93931bf0 Update documentation for RC3 2013-12-06 17:47:25 -05:00
Tim Donohue
ee0c3c1cf6 Merge pull request #426 from mwoodiupui/DS-1826
[DS-1826] dspace-rest artifact naming doesn't follow pattern, and other small POM tweaks
2013-12-06 12:58:58 -08:00
Hardy Pottinger
3dadff5709 Merge pull request #427 from tdonohue/DS-1759
DS-1759 possible fix
2013-12-06 12:27:13 -08:00
Tim Donohue
d67c258535 Default Recent Submissions to 5 on homepage, but page by 20 in browse-by 2013-12-06 19:58:38 +00:00
Mark H. Wood
858636e6fc Address a spelling issue, and further polishing. 2013-12-06 13:54:13 -05:00
Mark H. Wood
27c4fe0137 Merge pull request #425 from abollini/DS-1789
DS-1789 Deprecate Lucene Java classes
2013-12-06 10:51:24 -08:00
Mark H. Wood
80fda2669e Use same final artifact name as the rest of DSpace, for consistency 2013-12-06 11:57:09 -05:00
Mark H. Wood
04471e2f1d Remove compiler, plugin versions that should be supplied by parent for consistency. 2013-12-06 11:56:06 -05:00
Tim Donohue
7ec418b56d Merge pull request #409 from jsnshrmn/master
use better image downscaling method for XPDF media-filter
2013-12-06 08:04:30 -08:00
Andrea Bollini
029b140995 Merge pull request #422 from lap82/DS-1716
[DS-1716] Display select value without hexcode entities, add escape using JavaScri...
2013-12-06 06:38:06 -08:00
Andrea Bollini
6df811dbcb DS-1789 Deprecate Lucene Java classes 2013-12-06 15:31:09 +01:00
Thomas Misilo
00a6692683 DS-1817: Improvement of Collection Dropdown on Move Item Page
Adds the CollectionPath to the Move Item page
2013-12-05 11:54:40 -05:00
Bram Luyten
bd7be6b94e DS-1823 move dspace.url to build.properties
dspace.url is now independent from baseUrl
2013-12-05 17:10:54 +01:00
Kostas Stamatis
a282bf103a Merge pull request #392 from zuki/DS-1790
DS-1790 A new dataloader for CiNii article
2013-12-04 22:22:07 -08:00
Keiji Suzuki
d321d7e010 fixed conflicts 2013-12-05 10:32:07 +09:00
Pascarelli Luigi Andrea
6bfdb698b0 Display select value without hexcode entities, add escape using JavaScript String rules for fullname/email instead replace single quote, add code to prevent xss attach 2013-12-05 01:17:40 +01:00
Luigi Andrea Pascarelli
a0f87cd921 Merge pull request #416 from lap82/DS-1716
[DS-1716] Improvements for JSPUI new layout
2013-12-04 16:04:23 -08:00
Tim Donohue
a8eae2d9a8 Merge pull request #421 from tdonohue/DS-1733-improvement
DS-1733: Improvements to changes made in PR#364.
2013-12-04 15:24:07 -08:00
Tim Donohue
928267a220 Improvements to changes in PR#364. Ensure withdrawn items are still exported to CSV. Improve error logging on export. 2013-12-04 22:59:09 +00:00
Pascarelli Luigi Andrea
25b8680276 Re-arrange methods signature to put 'required' parameter in the more appropriate position 2013-12-04 23:37:33 +01:00
kstamatis
d3bde03849 cinii online data loader: add publisher in detail list 2013-12-05 00:00:04 +02:00
Keiji Suzuki
81a82303f2 Edited CiNii related files to adapt DS-1813 2013-12-04 23:50:35 +02:00
Keiji Suzuki
dfb38f89b7 Reset fast to searchProvider of CiNii which are reverted accidentally 2013-12-04 23:49:56 +02:00
Keiji Suzuki
b3ecc8f8d7 Added a new dataloader for CiNii Article 2013-12-04 23:49:56 +02:00
Tim Donohue
7a8054d646 Merge pull request #372 from bram-atmire/DS-1448
DS-1448 Harmless broken pipe stack traces
2013-12-04 13:19:29 -08:00
Tim Donohue
943d84cdcb Merge pull request #403 from KevinVdV/DS-1803
[DS-1803] Configurable workflow migration script fails if collection workflow group has been renamed
2013-12-04 13:14:06 -08:00
Tim Donohue
484ae9ff9d Merge pull request #417 from KevinVdV/DS-1819
[DS-1819] Discovery filters encoding
2013-12-04 13:11:51 -08:00
Tim Donohue
d4785ec4e3 Merge pull request #404 from tuub/DS-1804
DS-1804
2013-12-04 13:10:19 -08:00
Tim Donohue
93cf01d9f2 Merge pull request #341 from rivaldi8/DS-1524
DS-1524 Incorrect use of Creative Commons corporate logo.
2013-12-04 13:04:40 -08:00
Tim Donohue
85a5c7e6af Merge pull request #410 from bram-atmire/DS-1590
[DS-1590] Mirage: thumbnail dimensions are not enforced in listings
2013-12-04 12:56:42 -08:00
Andrea Bollini
00f1df31ba Merge pull request #415 from abollini/DS-1768
DS-1768 Add a default navigation-bar when no one is requested to allow minimal brand and navigation
2013-12-04 12:47:26 -08:00
Tim Donohue
c828a32fa1 Merge pull request #377 from aschweer/DS-951-log-timezone
DS-951 Time calculations when parsing log files
2013-12-04 12:37:16 -08:00
Tim Donohue
32231d8f0e Merge pull request #188 from helix84/DS-1485
DS-1485 fix for the Mirage theme
2013-12-04 12:29:35 -08:00
Tim Donohue
94e54d9d74 Merge pull request #364 from LongsightGroup/DS-1733
DS-1733 check to see if item is in archive and valid before trying to add it to the CSV
2013-12-04 11:57:40 -08:00
Tim Donohue
0a4ec51717 Merge pull request #366 from helix84/DS-1739-ldap-null-in-username
DS-1739 fix LDAP auth appending "null" to username
2013-12-04 11:54:44 -08:00
Tim Donohue
6705fdacbc Merge pull request #388 from sti-mwhite/DS-1740
DS-1740 XOAI producing invalid uketd_dc OAI-PMH output
2013-12-04 11:52:31 -08:00
Andrea Bollini
d58e1e6042 Merge pull request #371 from kstamatis/dspace-rest-fixes
[DS-1743] REST API misses to expose some attributes of communities and collections
2013-12-04 11:47:18 -08:00
Andrea Bollini
8c7bb7b647 Merge pull request #411 from EKT/DS-1813
[DS-1813] Unify configurations regarding SubmissionLookup step
2013-12-04 11:26:21 -08:00
Andrea Bollini
60303dcf2b Merge pull request #413 from EKT/DS-1132
[DS-1132]: ItemImport BitStream Registration does not properly set the Description
2013-12-04 11:09:18 -08:00
Mark H. Wood
0021220390 Merge pull request #418 from mwoodiupui/DS-1502
Revert "[DS-1502] Don't let XSL-T decode entities that we wrote inside <...
2013-12-04 10:19:56 -08:00
Mark H. Wood
e87722d1b5 Revert "[DS-1502] Don't let XSL-T decode entities that we wrote inside <script> tags"
This reverts commit 1d8838baa0.

That commit produces invalid Javascript.  Multiple layers of XML
processing makes it extremely difficult to shepherd a left broket
through the entire pipeline.  Give up on XHTML correctness for now and
revisit some other day.
2013-12-04 13:07:55 -05:00
KevinVdV
0151385d73 [DS-1819] Discovery filters encoding 2013-12-04 15:03:22 +01:00
Andrea Bollini
cdf3772102 Merge pull request #412 from EKT/DS-1322
[DS-1322] Item without Title inaccessible via the UI unless for the admin via ID or Handle
2013-12-04 05:07:43 -08:00
Andrea Bollini
a5b040ae48 Merge pull request #414 from abollini/DS-1771
DS-1771 Make showing of logo for listed communities and collections configurable
2013-12-04 05:05:09 -08:00
Mark H. Wood
b509b0a05f [maven-release-plugin] prepare for next development iteration 2013-12-03 12:47:33 -05:00
Mark H. Wood
1bf3ead92e [maven-release-plugin] prepare release dspace-4.0-rc2 2013-12-03 12:47:30 -05:00
Mark H. Wood
886dc8695e Update manual for RC2 2013-12-03 12:23:19 -05:00
Mark H. Wood
47a8afd5b1 Merge pull request #330 from mwoodiupui/DS-1502
[DS-1502] Invalid XHTML in Javascript generated by Mirage theme
2013-12-03 08:44:08 -08:00
Pascarelli Luigi Andrea
560e2fc4fb Use css to automatically add asterisk to required form inputs 2013-12-02 23:20:41 +01:00
Pascarelli Luigi Andrea
2c06cb99c2 Add Communities & Collections link in admin menu 2013-12-02 23:18:57 +01:00
Pascarelli Luigi Andrea
e8508e6cfb Fix display when no item in recent submission 2013-12-02 23:18:11 +01:00
Pascarelli Luigi Andrea
17e82b9e23 Change label admin for communities/collection, reduce label on remove button to fix wrong behaviour on google chrome 2013-12-02 23:16:50 +01:00
kstamatis
abfba37243 untitled items: rewrite code to be more readable 2013-12-02 19:01:22 +02:00
Keiji Suzuki
2e75f4db2f Edited CiNii related files to adapt DS-1813 2013-12-02 11:07:04 +09:00
Keiji Suzuki
c8c5febd75 Reset fast to searchProvider of CiNii which are reverted accidentally 2013-12-02 09:40:22 +09:00
Keiji Suzuki
d4f1f41b65 Added a new dataloader for CiNii Article 2013-12-02 09:35:58 +09:00
Andrea Bollini
cc8eff7c3a DS-1768 Add a default navigation-bar when no one is requested to allow minimal brand and navigation 2013-12-02 01:16:30 +01:00
Andrea Bollini
7b1c96ca44 DS-1771 Make showing of logo for listed communities and collections configurable 2013-12-02 00:51:09 +01:00
Andrea Bollini
c1dfbc0199 DS-1811 Removing a collection fails if non-Solr DAO has been used before for item count 2013-12-02 00:26:43 +01:00
kstamatis
33def6dab6 remove isDiscoverable flag from the browse list tag 2013-12-01 20:10:25 +02:00
kstamatis
5fd0aceb5e submission lookup: replace misplaced exception 2013-12-01 19:36:31 +02:00
kstamatis
cdc3fa3ab0 itemimport: set bitstream description read from contents file 2013-12-01 19:29:08 +02:00
kstamatis
d0aa915791 make items with no title accessible via the itemlist (browse or search) 2013-12-01 17:10:21 +02:00
kstamatis
4b001ce63a submission lookup: remove unwanted config file 2013-12-01 09:29:34 +02:00
kstamatis
09f0609982 unify submission lookup service configs 2013-12-01 09:28:31 +02:00
Kostas Stamatis
7e113df658 Merge pull request #386 from zuki/DS-1777
DS-1777 Bugs and inadequate configs for "Bibliographic import and lookup in Submission" and a new modifier
2013-11-30 21:07:25 -08:00
Bram Luyten
fa273284de [DS-1590] Mirage: thumbnail dimensions are not enforced in listings
adding the max thumbnail width from cfg to thumbnail-wrapper divs
2013-11-28 17:00:08 +01:00
Pascal-Nicolas Becker
892f7fdee1 Changed DIM2DataCite.xsl to not discover provenance information.
dc.descritption.provenance contains personal information. Removed it
from DIM2DataCite.xsl to not discover it.
2013-11-28 11:51:53 +01:00
kstamatis
da07880b01 remove warning in LanguageCodeModifier 2013-11-28 17:28:05 +09:00
kstamatis
149db9bf8a fix 'BTE to DSpace' configuration 2013-11-28 17:28:05 +09:00
kstamatis
970a5f87fe fix crossref BTE configuration 2013-11-28 17:28:05 +09:00
kstamatis
9e4fe8635b fix pubmed BTE configuration 2013-11-28 17:28:05 +09:00
kstamatis
e14dd787c0 fix arxiv BTE configuration 2013-11-28 17:28:05 +09:00
zuki
8552d0ef08 Fixed a typo 2013-11-28 17:28:05 +09:00
Keiji Suzuki
1c7f7e6e3c Fixed a wrong conditional expression 2013-11-28 17:28:05 +09:00
Keiji Suzuki
791ce57784 Added a new modifier LanguageCondeModifier 2013-11-28 17:28:04 +09:00
Keiji Suzuki
2cce9abc97 Fixed bugs and edited inadequate configs 2013-11-28 17:28:04 +09:00
Jason Sherman
3dbb69d783 Update XPDF2Thumbnail.java
Remove a bit of commented cruft.
2013-11-27 16:19:41 -06:00
Mark H. Wood
8bdc0ee8fb Merge pull request #407 from mwoodiupui/DS-1530
[DS-1530] create-administrator and skipping the email field
2013-11-27 12:09:41 -08:00
Mark H. Wood
420435b536 [DS-1530] Insist on a nonblank email address 2013-11-27 11:46:06 -05:00
Andrea Bollini
d4f87ffeb6 Merge pull request #369 from EKT/DS-1741
[DS-1741] Batch import UI - only the File DataLoaders should appear in the drop down
2013-11-27 02:50:08 -08:00
Andrea Bollini
5d5e5c2131 Merge pull request #394 from zuki/DS-1792
DS-1792 Submitter is not set to the item in BTE
2013-11-27 02:43:50 -08:00
Andrea Bollini
be113eca90 Merge pull request #406 from lap82/DS-1809
[DS-1809] Fix bug moving button out of the div
2013-11-27 02:41:40 -08:00
Andrea Bollini
5010c171be DS-1773 Bootstrap JSPUI - In the Discover column on the Home page some boxes do not have room to display the total number 2013-11-27 11:33:52 +01:00
Pascarelli Luigi Andrea
ff06384285 Fix bug moving button out of the div 2013-11-27 00:48:03 +01:00
Hardy Pottinger
3548d6da78 Merge pull request #405 from hardyoyo/DS-1410
applying patch from DS-1410, merging with changes from DS-1503 / PR #196
2013-11-26 12:35:13 -08:00
Hardy Pottinger
0e8df4e7ab applying patch from DS-1410, merging with changes from DS-1503/PR-196 2013-11-26 19:43:11 +00:00
Pascal-Nicolas Becker
8c701394ae Bugfix: Changed modifiers in DataCiteConnector.
Set the modifier of some variables and methods from private to
protected. This makes it easier to extend the DataCiteConnector.
2013-11-26 14:17:16 +01:00
Pascal-Nicolas Becker
164dc8e5d3 Bugfix: DataCiteConnector ignored the configured scheme. 2013-11-26 14:15:31 +01:00
Luigi Andrea Pascarelli
6c391256cc Merge pull request #389 from EKT/DS-1780
Fix the bug DS-1780
2013-11-25 15:30:33 -08:00
Mark H. Wood
a075de5136 Merge pull request #398 from mwoodiupui/DS-1621
[DS-1621] Search in Item mapper don't work without lucene search provider
2013-11-25 09:42:54 -08:00
Mark H. Wood
753d2a4273 Merge pull request #379 from aschweer/DS-1483-citation_pdf_url
DS-1483 Generate citation_pdf_url in more cases
2013-11-25 09:07:38 -08:00
Mark H. Wood
265be32754 Merge pull request #399 from mwoodiupui/DS-1788
[DS-1788] Rename Indexing scripts for clarity
2013-11-25 08:47:56 -08:00
Andrea Bollini
5e58013acf Merge pull request #395 from lap82/DS-1793-DS-1794
[DS-1793][DS-1794] Redesing embargo advanced form
2013-11-25 08:42:16 -08:00
Pascarelli Luigi Andrea
3f1516bfc4 Add message embargo in review section for bitstream 2013-11-25 17:39:51 +01:00
Andrea Bollini
7c63d65272 Merge pull request #400 from DSpace/DS-1774
DS-1774 move hardcoded text to i18n
2013-11-25 08:21:19 -08:00
Pascal-Nicolas Becker
6e2ba1296e Bugfix for DOI support using DataCite.
The DOIIdentifierProvider checked whether a DOI is reserved or
registered at the registration agency already. This should be done by
the DOIConnector if it is necessary at all.
2013-11-25 16:23:27 +01:00
Andrea Bollini
d9f630c405 Merge pull request #402 from abollini/DS-1676-simply
[DS-1676] Upload file step wrong navigation feel
2013-11-25 05:41:03 -08:00
Andrea Bollini
4fafcdfb52 Fix misuse of previous button to avoid file upload when required (noted by lap82) 2013-11-25 14:38:00 +01:00
Pascal-Nicolas Becker
1dbe77b654 Bugfix: Renamed static final int in DOIIdentifierException.
Renamed DOIIdentifierException.REGISTER_FIRST to
DOIIdentifierException.RESERVE_FIRST.
2013-11-25 14:15:21 +01:00
KevinVdV
769aca6085 [DS-1803] Configurable workflow migration script fails if collection workflow group has been renamed 2013-11-25 13:05:56 +01:00
Andrea Bollini
c4c5ff57c0 Add missing image for sherpa/romeo 2013-11-25 12:36:09 +01:00
Andrea Bollini
032444e8f0 DS-1676 Impossible to cancel/save or go back in the upload step with upload progress bar enabled 2013-11-25 12:35:45 +01:00
Pascarelli Luigi Andrea
ef7f2babc6 Changed way to retrieve object from submission map to request attribute, remove code to show number of policies setting in the case of simple embargo form 2013-11-25 02:24:07 +01:00
Pascarelli Luigi Andrea
aa53d07961 Change way to retrieve data 2013-11-25 02:21:57 +01:00
Pascarelli Luigi Andrea
0c682daaf2 Change from submission attribute to request attribute 2013-11-25 02:19:35 +01:00
Pascarelli Luigi Andrea
795a109b5a Move the retrieve resource policies and other info to the servlet 2013-11-25 02:18:50 +01:00
Andrea Bollini
bd32eb4726 Consistent use of bootstrap + use of EL to avoid escape quote issue in taglibrary with tomcat7 2013-11-24 00:30:46 +01:00
Keiji Suzuki
a2d33ee049 edit comments 2013-11-23 23:59:00 +01:00
Keiji Suzuki
e029ba2d28 display error screen when no workspace item exists or no workspace item is selected 2013-11-23 23:58:59 +01:00
Andrea Bollini
5b17a6548b DS-1774 move hardcoded text to i18n 2013-11-23 15:37:45 +01:00
Andrea Bollini
35c5deedcf Layout cleanup, harmonize browsers behaviour 2013-11-23 12:50:03 +01:00
Andrea Bollini
070f4ee65c DS-1772 Bootstrap JSPUI - When editing an item there is an extra empty row at the bottom of the table resulting in a partial border 2013-11-23 12:25:43 +01:00
Andrea Bollini
f2b4700a3b DS-1770 Bootstrap JSPUI - When viewing a 'full item' the top border of the last row 'Appears in Collections' should continue until the end of the column 2013-11-23 01:19:26 +01:00
Andrea Bollini
63b82ba4ab DS-1800 Bootstrap: Home page - sidebar news doesn't fill all the available space 2013-11-23 01:12:47 +01:00
Mark H. Wood
6beeb445e4 [DS-1788] Update command names and descriptions 2013-11-21 13:24:14 -05:00
Mark H. Wood
7bca28b1e4 [DS-1621] First stab at configurable search for Item mapper 2013-11-21 12:24:23 -05:00
Jason Sherman
65e2f00afb Update XPDF2Thumbnail.java
Bringing XPDF thumbnails up to par with the regular JPEG thumbnails.
2013-11-19 10:44:50 -06:00
Keiji Suzuki
79bf0f641e Added a new oai format 'junii2' 2013-11-19 16:00:32 +09:00
Pascarelli Luigi Andrea
19f0bbd2b2 Move code into more appropriate jsp, manage submission when embargo feature is off 2013-11-16 21:29:02 +01:00
Pascarelli Luigi Andrea
2a80f6c8fc jspui bootstrap layout minor tweak 2013-11-16 20:44:45 +01:00
Pascarelli Luigi Andrea
db1dc85ce9 Add support in review page for access settings 2013-11-16 20:18:21 +01:00
Pascarelli Luigi Andrea
151d7ffeeb Minimal redesing to uniform to the xmlui, add datepicker js on embargo date, limit policy name field to maxlength=30 2013-11-16 16:55:08 +01:00
Keiji Suzuki
19057fcf70 Fixed a bug the submitter is not set to the item in BTE 2013-11-15 11:57:42 +09:00
Mark H. Wood
c2ad18ce4c Merge pull request #391 from helix84/javadoc2
JavaDoc for statistics converter/importers
2013-11-14 07:31:46 -08:00
Mark H. Wood
45cd3e4b6f Merge pull request #390 from helix84/typos-squashed
fix a bunch of typos
2013-11-14 07:30:32 -08:00
Ivan Masár
cfc18c57e4 JavaDoc for statistics converter/importers 2013-11-13 23:05:30 +01:00
Ivan Masár
6877ab67a6 fix a bunch of typos 2013-11-13 23:01:50 +01:00
Panagiotis Koutsourakis
db168cd840 Fix the bug DS-1780
The batch import would go into an infinite loop when loading from a
pubmed, arxiv or crossref XML file. This was due to the fact that the
respective data loaders open the file each time getRecords() is called
coupled with the complicated logic of TransformationEngine.

The bug was fixed by checking if offset is greater than zero in
getRecords(DataLoadingSpec) (which is equivalent to the condition that
the file has already been read) and if so the method returns an empty
RecordSet signaling the TransformationEngine that the input has ended.
2013-11-13 17:26:15 +02:00
Michael White
71018938e7 Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

	modified:   uketd_dc.xsl
2013-11-12 16:07:09 +00:00
Michael White
bc4bf93887 On branch DS-1740
Changes to be committed:
   (use "git reset HEAD <file>..." to unstage)

	modified:   xoai.xml

 Changes not staged for commit:
   (use "git add <file>..." to update what will be committed)
   (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   metadataFormats/uketd_dc.xsl
2013-11-12 16:04:08 +00:00
Mark H. Wood
9566760346 Merge pull request #380 from mwoodiupui/DS-449
[DS-449] Command line utility org.dspace.app.harvest.Harvest -S throws AuthorizeException
2013-11-11 13:17:32 -08:00
Mark H. Wood
ea774c9f3d Merge pull request #385 from mwoodiupui/DS-1751
[DS-1751] Request a copy of the document page has 'Mensaje:' (should be message?)
2013-11-11 13:14:10 -08:00
Mark H. Wood
be060337d6 [DS-1778] Wrong test for non-empty title in ItemRequestForm 2013-11-11 10:00:17 -05:00
Mark H. Wood
d750c8a320 [DS-1751] Small adjustments of punctuation and word order. 2013-11-08 14:43:01 -05:00
Andrea Bollini
229c3e376a Use a more appropriate sample DOI 2013-11-08 09:58:13 +01:00
Andrea Bollini
1da7091851 Merge branch 'DS-1755' 2013-11-08 09:32:35 +01:00
Andrea Bollini
e900b914a7 DS-1755 Fix no collections selected message, reordering accordion in a more friendly way, minor UI tweeks 2013-11-08 09:31:53 +01:00
Mark H. Wood
87b71e4fdc [DS-1751] Can't use <i18n:text> inside <xsl:attribute> but adding another attribute "attr" magically fixes it. 2013-11-07 16:01:31 -05:00
Mark H. Wood
f56f47bba2 [DS-1751] Some edited English message texts 2013-11-07 14:41:19 -05:00
Mark H. Wood
25c47ebab2 Merge pull request #382 from aschweer/DS-1709-Access-Step-UI
DS-1709 Make wording work for simple form
2013-11-07 06:51:22 -08:00
Andrea Bollini
ef86938fc3 Merge branch 'DS-1755' of https://github.com/zuki/DSpace into DS-1755 2013-11-07 15:43:42 +01:00
Mark H. Wood
98f57271a7 Merge pull request #381 from aschweer/DS-1766-simple-embargo
DS-1766 Use simple access step by default
2013-11-07 05:40:19 -08:00
Keiji Suzuki
6eb00f4286 fixed DS-1755 2013-11-07 11:45:02 +09:00
Andrea Schweer
2a6c18a0ab DS-1766 Use simple access step by default
Also added some documentation around the option, re-ordered access step
options, normalised whitespace and commented them out by default. The JSPUI and
XMLUI code already use a default value of 'false', so no code changes needed.
2013-11-07 12:28:59 +13:00
Andrea Schweer
34b24291e4 DS-1709 Make wording work for simple form 2013-11-07 11:43:05 +13:00
Andrea Schweer
4e75c809c3 DS-1483 Generate citation_pdf_url in more cases
Google Scholar uses the citation_pdf_url header tag on item pages to determine
which of an item's bitstreams to link to (if any). Standard DSpace behaviour is
to include this link only if the item has exactly one bitstream in the ORIGINAL
bundle and if this item is of type application/pdf. The desired behaviour for
the LCoNZ IRRs is this:
 - if the item has only one bitstream in the ORIGINAL bundle, link to this one
 - if the item has a primary bitstream in the ORIGINAL bundle, link to this one
   (regardless of how many bitstreams there are in total in the ORIGINAL bundle).
Additionally, the bitstream link should only appear when the bitstream selected
according to the rules above is publicly visible.
The mimetype of the bitstream is not taken into account, as per Google Scholar
feedback that this is no longer as important to them.
2013-11-07 08:17:04 +13:00
Mark H. Wood
e4fac3864e Squash a deprecation warning 2013-11-06 11:39:38 -05:00
Mark H. Wood
a343a86a47 Squash a deprecation warning 2013-11-06 11:37:58 -05:00
Mark H. Wood
1fcd660d05 [DS-449] Read harvester.eperson from the correct configuration, and use it 2013-11-06 10:42:35 -05:00
Mark H. Wood
bf65050fc0 Clean up whitespace so I can read the code 2013-11-06 10:32:51 -05:00
Andrea Schweer
e692901707 Merge pull request #378 from aschweer/DS-992-encode-utf8
DS-992 encode utf8
2013-11-05 16:15:17 -08:00
Andrea Schweer
672a07ebda DS-992 Specify encoding scheme for URL encode (XMLUI) 2013-11-06 11:28:04 +13:00
Andrea Schweer
3022f718ce DS-992 Specify encoding scheme for URL encode (JSPUI) 2013-11-06 11:27:59 +13:00
Andrea Schweer
6f0c9b518f Time calculations when parsing log files 2013-11-06 10:56:35 +13:00
Andrea Schweer
81e343c9a3 Merge pull request #376 from aschweer/DS-1761-derived-extension
DS-1761 Allow extensions of more than 3 characters for derived bitstreams
2013-11-05 13:44:20 -08:00
Andrea Schweer
4cfbf4b03d DS-1761 Allow extensions of more than 3 characters' length for derived bitstreams 2013-11-06 10:40:31 +13:00
Andrea Schweer
a3297ac6cd Merge pull request #375 from aschweer/DS-1754
DS-1754 Use canonical not absolute path
2013-11-04 17:21:21 -08:00
Andrea Schweer
66414dda73 DS-1754 Use canonical not absolute path
Using the canonical path when determining the location of the undo information
leads to consistent behaviour when using "." as the source vs using eg an
absolute path. This also adds the name of the directory to the error message in
case the directory cannot be created, to help with troubleshooting.
2013-11-05 14:14:35 +13:00
Andrea Schweer
e16b9b4f12 Fix config default value / docs: directory not URL
Ensure that the suggested default setting for the "failed package directory" is
actually a directory (as expected by the code that uses this setting) and
matches the value of this setting in the official DSpace documentation. Both
for v1 and v2 of the SWORD server.
2013-11-04 17:26:34 +13:00
Andrea Schweer
4d82a662e5 Fix accidental duplication of access step config 2013-11-04 15:34:34 +13:00
Mark H. Wood
4a9fe6f8a4 [maven-release-plugin] prepare for next development iteration 2013-11-01 14:58:34 -04:00
Mark H. Wood
4745985383 [maven-release-plugin] prepare release dspace-4.0-rc1 2013-11-01 14:58:17 -04:00
Mark H. Wood
05bee72d33 Update documentation for 4.0-rc1 2013-11-01 14:37:44 -04:00
Tim Donohue
6388f19c3f Merge pull request #374 from misilot/patch-1
DS-1472 Capitalization of Workflow in Submissions & Workflow
2013-11-01 09:55:22 -07:00
Thomas Misilo
00cf8acb59 DS-1472 Capitalization of Workflow in Submissions & Workflow
This is a title, which means it should be capitalized.

This was committed to dspace-3_x (PR#184), however not to master. It is listed as fixed in 4_x on the release notes.
2013-11-01 11:04:45 -04:00
Tim Donohue
c43c224eda Merge pull request #373 from tdonohue/DS-1745
DS-1745: DSpace should no longer assign "dc.date.issued=[today]" when date field is missing
2013-10-31 13:45:56 -07:00
kstamatis
9a626efd9c rest: add logo in the expand list for collection + set licence when in expand list 2013-10-31 22:38:30 +02:00
kstamatis
6763ac206f Merge branch 'master' into dspace-rest-fixes 2013-10-31 22:22:26 +02:00
Tim Donohue
90c301c587 Merge pull request #353 from aschweer/DS-1709-Access-Step-UI
[DS-1709] Access step UI
2013-10-31 12:20:44 -07:00
Tim Donohue
405cf2104c DS-1745 : Backwards compatibility for Initial Questions. If item is "unpublished" and no issued date, set it to today's date. 2013-10-31 17:50:38 +00:00
Tim Donohue
0e4b0f39e2 DS-1745 : Change logic in InstallItem so that dc.date.issued MUST be specified to be set. Add an option to set dc.date.issued="today" to auto-apply today's date. Also add unit tests for new logic 2013-10-31 17:49:56 +00:00
kstamatis
613d99a32f remove collection provenance exposure from REST response 2013-10-31 19:29:39 +02:00
kstamatis
e94be7237d Merge branch 'master' into dspace-rest-fixes 2013-10-31 19:28:11 +02:00
kstamatis
4664dd0062 delete unnecessary comments 2013-10-31 19:25:17 +02:00
Tim Donohue
89f7798450 Normalize incorrect line endings in two files 2013-10-31 14:32:27 +00:00
Bram Luyten
1a3f673198 DS-1448 Harmless broken pipe stack traces
Improved error catching for file downloads that are being cancelled
before completion
2013-10-31 12:24:02 +01:00
Kostas Stamatis
e6e2123604 Merge branch 'master' into dspace-rest-fixes 2013-10-31 08:40:46 +02:00
Andrea Bollini
32de6ff835 Merge pull request #361 from DSpace/final-tweaks-jspui4
Final tweaks jspui4
2013-10-30 15:47:56 -07:00
Andrea Bollini
01f750a065 Unbalanced div 2013-10-30 23:44:07 +01:00
Andrea Bollini
cfc7110604 Merge pull request #368 from lap82/solr-commit-issue
Revert autocommit configuration (as is in DSpace 3.x)
2013-10-30 14:41:57 -07:00
Andrea Bollini
2b5145c888 Merge pull request #360 from DSpace/private-items
DS-1711 DS-1712 DS-1466 Implement consistent definition of Private items
2013-10-30 14:38:57 -07:00
Andrea Bollini
efaac8162c Merge pull request #367 from zuki/private-items
Added item.update() to set discoverable flag
2013-10-30 13:46:48 -07:00
Kostas Stamatis
e023da2f26 batch import UI - display only applicable data loaders 2013-10-30 15:31:00 +02:00
Kostas Stamatis
5869d51b65 Merge branch 'master' into dspace-rest-fixes 2013-10-30 14:25:09 +02:00
Kostas Stamatis
851c6ed3dd fix new line at the end problem 2013-10-30 14:16:30 +02:00
Pascarelli Luigi Andrea
ea8db02202 Revert autocommit configuration (as is in DSpace 3.x) 2013-10-30 12:20:36 +01:00
Keiji Suzuki
4be9eea411 Added item.update() to set discoverable flag 2013-10-30 15:25:37 +09:00
Ivan Masár
88b9d8fe78 DS-1739 fix LDAP auth appending "null" to username 2013-10-29 23:03:11 +01:00
Andrea Bollini
d0162f86b9 Improve layout of edit item authorization 2013-10-29 18:54:02 +01:00
Andrea Bollini
4b554eed91 Fix request copy radio buttons doesn't shown in IE 2013-10-29 18:22:37 +01:00
Mark H. Wood
9f55480440 Remove an errant trailing comma 2013-10-29 13:17:07 -04:00
Mark H. Wood
25077540be Remove an errant trailing comma 2013-10-29 13:15:37 -04:00
Andrea Bollini
c0de83ee2a Unbalanced div in main.jsp cause wrong footer rendering in IE 2013-10-29 17:32:18 +01:00
Andrea Bollini
c12730b018 DS-1736 Impossible remove the Creative Commons in JSPUI / jump using the progress bar
also restylish CCLicenseStep using bootstrap
2013-10-29 17:13:13 +01:00
Sam Ottenhoff
db42ffcf58 DS-1733 check to see if item is in archive and valid before trying to add it to the CSV 2013-10-29 10:55:55 -04:00
Kostas Stamatis
a9b307bdc6 add collection metadata (provenance, copyright, short description) in the collection response 2013-10-29 15:51:53 +02:00
Kostas Stamatis
11bb440fea add short description in the community response 2013-10-29 13:17:55 +02:00
Peter Dietz
eb1902ae7f Merge pull request #356 from AnjaLeBlanc/DS-1719
DS-1719 Added statistics recording to Jersey-REST API
2013-10-28 13:58:49 -07:00
Anja Le Blanc
f5027c3bcb Added usage events for collections view and communities view 2013-10-28 15:29:30 +00:00
Anja Le Blanc
4d46c3a505 corrected 'items' and 'parentCommunityList' in return. 2013-10-28 14:08:09 +00:00
Andrea Bollini
1ace7bb07a Merge pull request #254 from zuki/DS-1600
[DS-1600] Variable "style" is defined twice in ItemTag.java and are used by error in its render() method
2013-10-27 09:53:43 -07:00
Andrea Bollini
655d779df0 Merge pull request #355 from zuki/DS-1724
DS-1724 Can't edit any locale specific news text in the current master version
2013-10-27 09:44:25 -07:00
Andrea Bollini
e6fc657d50 DS-1729 move the inline styling to the dspace-theme.css / replace the cineca logo with an official trasparent one 2013-10-27 16:38:26 +01:00
Andrea Bollini
2946e91a97 Merge branch 'master' of https://github.com/DSpace/DSpace into final-tweaks-jspui4 2013-10-27 16:09:20 +01:00
Andrea Bollini
f38ba4c532 Add missing i18n key for Request copy using metadata strategy to discovery corresponding author 2013-10-27 16:03:07 +01:00
Andrea Bollini
eeb3061c42 DS-1655 Disable "Initial Questions" page in Submission UI by default 2013-10-27 15:53:12 +01:00
Andrea Bollini
c5e3b7150a Avoid exposure of private items over OAI-PMH 2013-10-27 15:15:19 +01:00
Andrea Bollini
a1d77d1b63 Add browse private items link for administrators 2013-10-26 20:18:28 +02:00
Andrea Bollini
ba011ea346 DS-1711 DS-1712 DS-1466 implement consistent definition of private item 2013-10-26 20:17:55 +02:00
Andrea Bollini
f2773ae651 Improve performance and avoid strange issue with failing fq with not value for the read field 2013-10-26 20:15:45 +02:00
bram-atmire
c48a1eb563 Merge pull request #325 from bram-atmire/DS-1559
DS-1559 Empty dc fields causes page layout issues
2013-10-26 08:18:29 -07:00
Andrea Bollini
bbf9c3ce52 Merge pull request #354 from EKT/DS-1252-bugs
[DS-1723] Bugs regarding BTE integration in batch import and submission lookup process
2013-10-26 01:46:27 -07:00
Robin Taylor
064463f694 Merge pull request #359 from robintaylor/DS-1714
DS-1714 Fix new Bootstrap choose-file.jsp to work browers other than Firefox
2013-10-24 08:05:51 -07:00
Robin Taylor
447f117529 Fix new Bootstrap choose-file.jsp to work browers other than Firefox 2013-10-24 15:12:21 +01:00
Kostas Stamatis
b4ccdaf037 Merge pull request #15 from lap82/DS-1252-bte
Fix not empty dtolist for each request
2013-10-23 22:09:49 -07:00
Pascarelli Luigi Andrea
561d3fd701 New manage of the map converter modifiers (use spring bean init method and configurationservice to retrieve the exact path), revert assembly.xml to previous version 2013-10-24 01:11:23 +02:00
Pascarelli Luigi Andrea
3b1ced5f4d Fix not empty dtolist for each request 2013-10-24 01:06:05 +02:00
Tim Donohue
9c99d78ec8 Merge pull request #352 from DSpace/DS-1722
DS-1722 Fix filtering of all DSpace configs in test environment (In progress)
2013-10-23 14:31:46 -07:00
Tim Donohue
25f01bfff5 Merge pull request #358 from tdonohue/master
Several Unit test fixes (related to DS-1722)
2013-10-23 14:30:26 -07:00
helix84
05ed59ee46 Merge pull request #347 from helix84/DS-1679-xmlui-mobile-theme-1.1
DS-1679 XMLUI mobile theme 1.1 (fixes)
2013-10-23 13:52:09 -07:00
helix84
6d009a4c9f Merge pull request #349 from helix84/KevinVdV-DS-1188-xmlui-collection-view
DS-1188 Collection view doesn't show content by default
2013-10-23 13:46:39 -07:00
helix84
014d7e4d22 change Recent Submissions "View More" link CSS to font-size:100% 2013-10-23 22:42:42 +02:00
helix84
d0d59a20bd Merge pull request #345 from helix84/DS-1514-AIP-import-simple-embargo
DS-1514 AIP import simple embargo
2013-10-23 13:20:28 -07:00
Tim Donohue
1182c54b72 More improvements to fail() messages (add primary error msg) 2013-10-23 14:55:15 -05:00
Tim Donohue
82a413511c Several Unit test fixes. Add a Mock Indexer for Solr. Add a language for primary test Eperson. Do better context cleanup. Improve fail messages with actual errors. 2013-10-23 13:58:10 -05:00
Kostas Stamatis
341238cc39 Merge pull request #14 from lap82/DS-1252-bte
Added comment to debug feature on localhost for IE10
2013-10-23 11:37:52 -07:00
Pascarelli Luigi Andrea
1cef086e78 Added comment to debug feature on localhost for IE10 2013-10-23 20:05:26 +02:00
Hardy Pottinger
66af01a3f3 Merge pull request #357 from hardyoyo/DS-1746-bamboo-ify-travis-config
specified the test build command in .travis.yml to match Bamboo (note incorrect ticket number in branch name, please disregard, it's DS-1726)
2013-10-23 08:45:00 -07:00
Hardy Pottinger
f9b6d9ffa9 specified the test build command in .travis.yml to match the build command used by Bamboo 2013-10-23 09:45:13 -05:00
Anja Le Blanc
a591a52081 added licence header 2013-10-23 14:44:17 +01:00
Anja Le Blanc
6d8417c9af Added statistics recording to API
(required changes in DSpace API!)

Also some changes to make REST API work better with XML output.
Added Checksum and sequenceId to Bitstream.
2013-10-23 14:17:01 +01:00
Kostas Stamatis
51997572c3 Merge pull request #13 from lap82/DS-1252-bte
Fix extend feature metadata
2013-10-23 02:33:46 -07:00
Pascarelli Luigi Andrea
c7823a3239 Fix extend feature metadata 2013-10-23 11:17:48 +02:00
Keiji Suzuki
22cce1a0a3 Fixed a bug not to edit locale specific news text 2013-10-23 15:04:24 +09:00
Kostas Stamatis
3ed8707cf2 Merge branch 'master' into DS-1252-bugs
Conflicts:
	dspace-api/pom.xml
2013-10-23 08:56:26 +03:00
Kostas Stamatis
3638d9a706 Merge pull request #12 from lap82/DS-1252-bte
Some minor changes, fix retrieve data from crossref response
2013-10-22 22:29:37 -07:00
Andrea Schweer
6fcafbecd6 [DS-1706] Add review section for Access Step 2013-10-23 17:20:32 +13:00
Andrea Schweer
600a4e0944 [DS-1707] Limit length of policy name 2013-10-23 17:20:32 +13:00
Andrea Schweer
d10534ea5b [DS-1709] Improve clarity of access step UI
Clarify/fix default group selection

Show trail on access step
2013-10-23 17:20:32 +13:00
helix84
d76ebbdb0b Merge pull request #351 from DSpace/DS-1408
DS-1408: Add explicit "update()" calls to ensure Collection is saved before using later in Test code
2013-10-22 14:24:16 -07:00
Tim Donohue
bb0c35c0e9 Fix filtering of all DSpace configs in test environment 2013-10-22 16:18:11 -05:00
Tim Donohue
4f808e7236 Fix DS-1408 based on hints at http://stackoverflow.com/questions/4162557/timeout-error-trying-to-lock-table-in-h2 2013-10-22 16:02:08 -05:00
Tim Donohue
78f8e973b5 More minor cleanup. Add another update(). 2013-10-22 16:00:33 -05:00
Tim Donohue
416b8b53f2 Add explicit "update()" calls to ensure Collection is saved before using. Seems to resolve DS-1408. 2013-10-22 15:09:41 -05:00
Mark H. Wood
1d8a146a94 Remove duplicate dependency on backport-util-concurrent 2013-10-22 15:43:34 -04:00
Ivan Masár
69db8ba6f6 make policy import also work for bundles 2013-10-22 21:22:02 +02:00
Ivan Masár
5d8a420f6d DS-1514 make AIP import support simple embargo (start/end date in ResourcePolicy) 2013-10-22 21:22:01 +02:00
Pascarelli Luigi Andrea
4cd8b8f31b Some minor changes, fix retrieve data from crossref response 2013-10-22 20:22:23 +02:00
Mark H. Wood
2b84dbf14e Merge pull request #350 from mwoodiupui/DataCite
[DS-1678] EZID DOI provider
2013-10-22 10:35:37 -07:00
Mark H. Wood
9b228f6422 Move EZID Spring configuration to config/spring and comment out by default. 2013-10-22 13:31:58 -04:00
Mark H. Wood
7d675dc861 Comment all remaining tests and supply a dummy to keep JUnit happy. 2013-10-22 13:30:07 -04:00
Pascarelli Luigi Andrea
d89555720b Merge branch 'DS-1252-bugs' of https://github.com/EKT/DSpace into DS-1252-bte 2013-10-22 18:43:50 +02:00
Pascarelli Luigi Andrea
fee39a913e Added specific configuration file for submission lookup 2013-10-22 18:43:26 +02:00
Kostas Stamatis
f5c3271b44 Merge branch 'DS-1252-bugs' of https://github.com/EKT/DSpace into DS-1252-bugs 2013-10-22 14:35:35 +03:00
Kostas Stamatis
6040f8be8b Use properties files for map converters 2013-10-22 14:34:41 +03:00
Panagiotis Koutsourakis
772874b637 The temp file is now unique and the file is correctly deleted
The temporary file is created using the File.createTempFile method to
avoid the potential overwriting if more than one users try to upload a
file simultaneously. Also the file is now deleted in a finally clause
to delete it even if an exception is thrown.
2013-10-22 14:30:57 +03:00
Kostas Stamatis
614de3d36d Merge pull request #11 from lap82/DS-1252-bte
Code formatted with DSpace conventions
2013-10-22 03:51:33 -07:00
Pascarelli Luigi Andrea
6c2fb7a781 Code formatted with DSpace conventions 2013-10-22 12:37:50 +02:00
KevinVdV
ce8800d84a [DS-1188] Collection view doesn't show content by default (disabled by default) 2013-10-22 12:32:58 +02:00
KevinVdV
0292cee4c8 [DS-1188] Collection view doesn't show content by default 2013-10-22 12:32:56 +02:00
Kostas Stamatis
02dd97da40 Merge pull request #10 from lap82/DS-1252-bte
Cleaned code and refactoring
2013-10-22 02:44:07 -07:00
Pascarelli Luigi Andrea
8c445b0dd7 Cleaned code and refactoring 2013-10-22 11:31:40 +02:00
Kostas Stamatis
cfd6749387 resolve problem with referencing old class 2013-10-22 12:14:56 +03:00
Kostas Stamatis
cd774d2941 Merge pull request #9 from lap82/DS-1252-bte
Move serialize/deserialize json to use google gson library, and remove abandoned code
2013-10-22 01:27:37 -07:00
Kostas Stamatis
4ecf95ca47 add missing images for new providers in the submission lookup process 2013-10-22 11:23:26 +03:00
Pascarelli Luigi Andrea
7e151b96e2 merge with ekt branch 2013-10-22 10:14:57 +02:00
Kostas Stamatis
3754fba9e6 Merge Spring XMLs for BTE services (batch import and submission lookup) to avoid duplicate beans declarations 2013-10-22 10:40:47 +03:00
Peter Dietz
d595481467 Merge pull request #323 from peterdietz/rest-jersey
[DS-1696] DSpace REST API built in JERSEY
2013-10-21 19:40:40 -07:00
Ivan Masár
b08132f5de DS-1679 XMLUI mobile theme 1.1 (fixes) 2013-10-22 03:18:34 +02:00
Andrea Bollini
eae6fc6a50 Merge pull request #324 from helix84/DS-1475-collection-dropdown
DS-1475 Improvement of Collection Dropdown
2013-10-21 17:43:44 -07:00
Ivan Masár
5710f37c62 fix import 2013-10-22 02:40:10 +02:00
Andrea Bollini
c49c09c82c Make subscription registration works also from the subscription-list 2013-10-22 02:40:10 +02:00
Ivan Masár
f5425cf7c7 JSPUI support for collection dropdown 2013-10-22 02:40:10 +02:00
Ivan Masár
b6c58218c8 address most Andrea's comments 2013-10-22 02:40:10 +02:00
Ivan Masár
5664dfc2cf DS-1475 Improvement of Collection Dropdown 2013-10-22 02:40:10 +02:00
Andrea Bollini
5c6ad22b89 Merge pull request #339 from helix84/DS-842-xmlui-language-switch
DS-842 XMLUI language switch
2013-10-21 17:33:17 -07:00
Ivan Masár
7e9d29ebd9 fix missing context path 2013-10-22 02:23:42 +02:00
Ivan Masár
60f204305c DS-842 from trail to user box; add to all themes; keep URI when changing language 2013-10-22 02:23:42 +02:00
Ivan Masár
3133250e12 DS-842 XMLUI language switching links 2013-10-22 02:23:28 +02:00
Andrea Bollini
b6e7e68dc2 Merge branch 'DS-1637-2' of https://github.com/tuub/DSpace into DS-1637-2
Conflicts:
	dspace/config/dspace.cfg
2013-10-22 02:11:30 +02:00
Andrea Bollini
933fe518c8 Merge pull request #196 from LongsightGroup/DS-1503
DS-1503 ShibAuthentication depends on use of non-recommended Apache UseHeaders setting
2013-10-21 16:59:13 -07:00
Andrea Bollini
a0ca656081 Merge pull request #343 from DSpace/DS-824
DS-824 request copy for JSP UI and XML UI
2013-10-21 16:19:55 -07:00
Andrea Bollini
940d744ff4 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-824
Conflicts:
	dspace-api/src/main/resources/Messages.properties
2013-10-22 01:05:53 +02:00
Pascarelli Luigi Andrea
37da01b000 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-1252-bte 2013-10-22 01:04:54 +02:00
Pascarelli Luigi Andrea
a009cf0db6 Changed name to linear workflow phase one (collision with linear workflow in bte.xml) 2013-10-22 01:03:47 +02:00
Andrea Bollini
f51a3425c8 Merge branch 'DS-824' of https://github.com/DSpace/DSpace into DS-824 2013-10-22 01:01:56 +02:00
Andrea Bollini
4176e6a903 Allow use of request copy following the dspace.cfg configuration 2013-10-22 01:01:43 +02:00
Ivan Masár
a557e3b0de add requestitem table and seq table to schema 2013-10-22 00:33:28 +02:00
Hardy Pottinger
a4cf2a2a67 updating clean-database.sql with new tables, fixing oracle/database_schema.sql 2013-10-21 17:20:01 -05:00
Hardy Pottinger
485cac6100 adding required Oracle SQL for DS-284, some other miscelaneous Oracle-related cleanup to the 3-4 migration sql and the database_schema sql 2013-10-21 17:20:00 -05:00
Pascarelli Luigi Andrea
784f22a821 Delete flexjson, use only google json 2013-10-22 00:13:28 +02:00
Andrea Bollini
6be6cc6fd3 Merge pull request #346 from EKT/DS-1252-bte
[DS-1252] Integrate external bibliographic services in DSpace submission process - Integration with BTE
2013-10-21 15:13:10 -07:00
Peter Dietz
5cbe8f16b0 Don't expand collections.all list 2013-10-21 18:12:27 -04:00
Peter Dietz
96809b7770 Fix collections.all paging bug 2013-10-21 18:11:56 -04:00
Peter Dietz
4f684e25ad Make context's static, and autoCommit for remainders 2013-10-21 18:09:41 -04:00
Mark H. Wood
bc53c3794e Merge pull request #344 from mwoodiupui/DataCite
[DS-1678] EZID DOI provider
2013-10-21 14:09:34 -07:00
Mark H. Wood
7b18a89afa Test module itself was broken.
Improved through (I hope) a better understanding of how to create
Items.  However this module is still not quite right.  For now,
commenting out the guts of it.
2013-10-21 17:02:57 -04:00
Andrea Bollini
e4fb7cc258 Allow preview of email response in XMLUI 2013-10-21 22:23:55 +02:00
Panagiotis Koutsourakis
2ae9110b05 added missing licences 2013-10-21 21:08:26 +03:00
Luigi Andrea Pascarelli
f1409cf8a5 Merge with ekt, add management of the file uploaded in submission 2013-10-21 18:32:02 +02:00
Luigi Andrea Pascarelli
c9abc626a7 Fix bug for chrome and refactoring 2013-10-21 18:23:03 +02:00
Andrea Bollini
a4bf89d32c Make the responser of the request copy configurable 2013-10-21 18:18:18 +02:00
Mark H. Wood
b932400752 Merge pull request #308 from mwoodiupui/DataCite
[DS-1678] EZID DOI provider
2013-10-21 08:02:26 -07:00
Mark H. Wood
396f738a12 Merge pull request #303 from rivaldi8/single-search-box
Single search box
2013-10-21 07:50:44 -07:00
helix84
a0e9d91de9 Merge pull request #340 from bram-atmire/DS-433
DS-433 Adding DCTerms Schema
2013-10-21 07:47:25 -07:00
Andrea Bollini
29a9c3bda3 Removed unused class (now in org.dspace.email package) 2013-10-21 16:28:23 +02:00
Panagiotis Koutsourakis
0553239760 Changed the handling of temp files
Added code that creates a temp directory, and creates unique filenames
using the File.createTempFile in that directory. If the temp directory
cannot be created for any reason, it tries to use the system defined
temporary directory (usually "/tmp" in unix and "C:\\WINNT\\TEMP" in
windows).
2013-10-21 17:26:29 +03:00
Andrea Bollini
9fdf7ce9e2 Fix license 2013-10-21 16:26:20 +02:00
Andrea Bollini
8ce8707426 Merge pull request #318 from EKT/DS-1688
[DS-1688] Add UI support for BTE batch metadata import
2013-10-21 07:13:57 -07:00
Ivan Masár
f25d539e28 fix config option name 2013-10-21 15:47:43 +02:00
Andrea Bollini
320ae5133b Restore preview of response email / cleanup / layout adjustments for bootstrap 2013-10-21 15:46:15 +02:00
Richard Jones
a7f18df129 Merge pull request #342 from richard-jones/master
add licence statements for new SWORDv2 files
2013-10-21 06:38:11 -07:00
Richard Jones
a2588d50e1 add licence statements 2013-10-21 14:36:26 +01:00
Richard Jones
e2ba8d5f69 Merge pull request #331 from richard-jones/master
SWORDv2 version for DSpace4
2013-10-21 06:04:45 -07:00
Kostas Stamatis
3d3c6d2653 message properties changes 2013-10-21 14:27:20 +03:00
Kostas Stamatis
11b535109c change input mapping in data loaders 2013-10-21 14:19:32 +03:00
Andrea Bollini
c108fcb263 Upgrading the original JSPUI request copy addon 2013-10-21 12:39:57 +02:00
Minho University Documentation Services
91df47764e Initial commit of Request Copy addon
This is a first commit of the contribution as it looks in v3 of the Addon
for DSpace 1.8.2.
http://projecto.rcaap.pt/index.php/lang-pt/consultar-recursos-de-apoio/remository?func=fileinfo&id=358
2013-10-21 12:39:42 +02:00
Kostas Stamatis
c70405a5a6 Merge pull request #7 from lap82/DS-1252-bte
Fix message and added file for the multipart form
2013-10-21 03:32:23 -07:00
Luigi Andrea Pascarelli
348eb75ee4 Apply license 2013-10-21 12:30:13 +02:00
Àlex Magaz Graça
7541b64eaf DS-1524 Incorrect use of Creative Commons corporate logo.
Now, the Creative Commons logo specific to the license the item has
assigned is shown.
2013-10-21 12:25:00 +02:00
Kostas Stamatis
4e030ee717 add missing licence headers 2013-10-21 13:19:41 +03:00
Luigi Andrea Pascarelli
364b06c7bf Fix message and added file for the multipart form 2013-10-21 12:10:13 +02:00
Kostas Stamatis
be21bd6574 fixes 2013-10-21 12:07:24 +03:00
Panagiotis Koutsourakis
69d8b1433b Merge branch 'master' into DS-1252-bte
Conflicts:
	dspace-api/pom.xml
	dspace-api/src/main/resources/Messages.properties
2013-10-21 10:34:52 +03:00
Kostas Stamatis
e5e62c9378 pubmed, crossref, arxiv file data loaders added 2013-10-21 10:12:20 +03:00
Andrea Bollini
778d76640b Merge pull request #334 from helix84/DS-1409-ItemCountDAOSolr
DS-1409 add ItemCountDAOSolr, make it default
2013-10-20 10:43:51 -07:00
Andrea Bollini
7e469d7a37 Allow use of a single Solr query to get the strenghts of all communities and collections 2013-10-20 19:08:16 +02:00
Andrea Bollini
39fecd0f5e Make XMLUI aware of webui.strengths.show and turn on caching by default 2013-10-20 18:41:11 +02:00
Andrea Bollini
618710eb57 Throw exception to alert user about *_item_count tables not being used in ItemCountDAOSolr 2013-10-20 18:37:37 +02:00
Andrea Bollini
4e57ad7d21 Merge branch 'DS-824-request-copy-muelle-rebased' of https://github.com/helix84/DSpace into DS-824 2013-10-20 18:26:22 +02:00
helix84
ab5bfe069f Merge pull request #333 from helix84/DS-1492-ehcache-skip-update-check
DS-1492 don't display EhCache update notice in log
2013-10-20 07:22:09 -07:00
kstamatis
e2827ff612 minor refactoring 2013-10-20 13:34:09 +03:00
Peter Dietz
fee4188716 Only fetch the bitstream bundle for an Item, (coll, comm logo's exempt)
Otherwise, I was getting NPE
2013-10-19 22:30:59 -04:00
Ivan Masár
e1adc5b684 fixes due to rebase 2013-10-20 04:12:14 +02:00
aroman
46f634164e Removed OID from database schema 2013-10-20 04:09:21 +02:00
aroman
93bf43e267 License was wrong 2013-10-20 04:08:50 +02:00
aroman
08bd2929b6 Mails lowercased and underscored. 2013-10-20 04:08:50 +02:00
aroman
96c93bdbfd Added sequence to update-sequences.sql 2013-10-20 04:08:48 +02:00
aroman
aab28e68a8 Renamed database schema 2013-10-20 04:07:46 +02:00
aroman
4116e6a35b License head 2013-10-20 04:04:23 +02:00
aroman
b24588022e Request copy of protected item. 2013-10-20 04:04:20 +02:00
helix84
930136a10d Merge pull request #337 from abollini/DS-1683-JSPUI
DS-1683 Porting of spellcheck functionality to the JSPUI
2013-10-19 17:23:19 -07:00
Andrea Bollini
e99a5e8c00 DS-1683 Porting of spellcheck functionality to the JSPUI 2013-10-20 00:42:02 +02:00
Kostas Stamatis
c7414c3341 Merge pull request #6 from lap82/DS-1252-bte
Fix for IE10, add fuuid to send all itemlookup uuid
2013-10-19 12:55:31 -07:00
Pascarelli Luigi Andrea
25adc7c7a4 Fix for IE10 2013-10-19 21:35:14 +02:00
kstamatis
66adf4358b support file upload data loaders 2013-10-19 14:35:05 +03:00
Kostas Stamatis
c09780746e Merge pull request #5 from lap82/DS-1252-bte
Add UI support for the upload file in submission lookup
2013-10-18 21:10:00 -07:00
Pascarelli Luigi Andrea
51e5f6e45f Add UI support for the upload file in submission lookup 2013-10-19 02:18:37 +02:00
Peter Dietz
994935082e Add auth-check to look-up by Handle 2013-10-18 17:07:33 -04:00
Peter Dietz
8900a83f39 Add expands for Bitstream, to get to its parentDSO
Note: ParentDSO is either Item or Comm/Coll as logo
2013-10-18 16:53:37 -04:00
Mark H. Wood
3bccc1c7c0 [DS-1647] Don't confuse maven with multiple versions of the same dependency.
Also declare httpcore dependency to satisfy dependency:analyze.
2013-10-18 16:36:01 -04:00
Mark H. Wood
57c8f98de8 Revert "Revert "Merge pull request #294 from richardrodgers/DS-1647-MDWebService""
This reverts commit 45689b7280.
2013-10-18 16:33:37 -04:00
Andrea Bollini
7d6bd427a1 Merge pull request #317 from EKT/DS-1686
[DS-1686] Support new version of Biblio-Transformation-Engine for the batch import
2013-10-18 12:26:51 -07:00
kstamatis
566bb592ef Fix conflict 2013-10-18 21:48:18 +03:00
kstamatis
8445c1a7af Merge with master 2013-10-18 21:38:57 +03:00
kstamatis
5dc7ab0f1c Merge with master 2013-10-18 21:19:14 +03:00
Andrea Bollini
c8719e451f Merge pull request #319 from lap82/porting-versioning-jspui
[DS-1687] Porting Item Versioning to the JSPUI
2013-10-18 10:30:00 -07:00
Peter Dietz
8c0511e05c Item metadata is array of MetadataEntry, not wrapped in a metadata wrapper. 2013-10-18 13:07:16 -04:00
Peter Dietz
645e491c81 Clean up Collection, Community, Item regarding getting to parent and expand 2013-10-18 13:05:55 -04:00
Peter Dietz
98ee886687 Add REST support for limit / offset to page through comm.collections and collection.items, and item list 2013-10-18 13:04:51 -04:00
Peter Dietz
5eee997e7a Support limit/offset paging of Collections and Collection.Items
new method: Collection[] Collection.findAll(limit, offset)
new method: ItemIteractor Collection.getItems(limit, offset)
2013-10-18 12:56:18 -04:00
Peter Dietz
987e835e5e Each of these "READ" endpoints should "autocommit", which prevents transaction abort issues (atleast with postgres).
If you got an error, (i.e. negative limit is bad), then PG will barf always.
current transaction is aborted, commands ignored until end of transaction block
2013-10-18 12:50:34 -04:00
Pascarelli Luigi Andrea
1e43695835 Move versioning table on top of creative commons section, removed
unnecessary if, restyling jsp
2013-10-18 18:22:59 +02:00
Ivan Masár
a03ebe92dc JSPUI: add abstract do Recent Submissions display 2013-10-18 17:33:07 +02:00
Panagiotis Koutsourakis
0a67e84376 Changed the pom to have the latest version of BTE 2013-10-18 18:23:20 +03:00
Ivan Masár
d40d2e8dbc JSPUI: fix collection strength display on home page 2013-10-18 16:17:58 +02:00
Kostas Stamatis
8bb44db9b5 add missing headers 2013-10-18 15:23:37 +03:00
Kostas Stamatis
06f864fab7 Merge pull request #4 from lap82/DS-1252-bte
Restyling lookup submission jsp, fix bug to fill data authors in dto, mo...
2013-10-18 05:15:45 -07:00
Kostas Stamatis
fb19b6a50e bug fix: search providers not working 2013-10-18 15:07:14 +03:00
Pascarelli Luigi Andrea
c147f429cc Merge from ekt branch 2013-10-18 13:51:50 +02:00
Kostas Stamatis
a037bd6ed7 add logging + bug fixes 2013-10-18 14:17:31 +03:00
Pascarelli Luigi Andrea
f14456126f Restyling lookup submission jsp, fix bug to fill data authors in dto, moved utils methods 2013-10-18 12:58:33 +02:00
Panagiotis Koutsourakis
9cc756f1fa OAI-PMH data loader support bug fixes 2013-10-18 13:47:26 +03:00
Panagiotis Koutsourakis
70d441bf5d Removed dependency from bte v0.8.2 introduced by mistake 2013-10-18 10:56:38 +03:00
Panagiotis Koutsourakis
40952db644 Merge branch 'master' into DS-1688
Resolved a conflict in dspace-api/pom.xml
2013-10-18 10:52:11 +03:00
Kostas Stamatis
b91ae3ea68 fixes from lap82 2013-10-18 09:19:19 +03:00
Ivan Masár
928c4b2da2 DS-1409 add ItemCountDAOSolr, make it default 2013-10-18 02:37:49 +02:00
Ivan Masár
f542729867 DS-1492 don't display EhCache update notice in log 2013-10-18 01:20:15 +02:00
Ivan Masár
0c180b9601 add missing license header in #314 / DS-1683 2013-10-18 01:13:34 +02:00
Ivan Masár
45689b7280 Revert "Merge pull request #294 from richardrodgers/DS-1647-MDWebService"
This reverts commit d9590e3d65, reversing
changes made to b98637afc7.
2013-10-18 00:37:10 +02:00
kstamatis
ff1c20c8b2 minor fixes 2013-10-17 23:35:51 +03:00
Mark H. Wood
258a03958e Silly whitespace cleanups 2013-10-17 15:30:30 -04:00
Mark H. Wood
c7ee293786 Merge pull request #314 from KevinVdV/DS-1683
[DS-1683] Add spell checker to discovery
2013-10-17 12:05:06 -07:00
Mark H. Wood
f67e8bf791 Merge pull request #309 from terrywbrady/master
DS-1697: Output policy data to METSRIGHTS only if a policy is effect (by date)
2013-10-17 11:56:47 -07:00
Mark H. Wood
d9590e3d65 Merge pull request #294 from richardrodgers/DS-1647-MDWebService
[DS-1647] Adds MetadataWebService curation task
2013-10-17 11:22:02 -07:00
kstamatis
1d5fa8c9ce bug fixes + remove unnecessary imports + small aditions 2013-10-17 20:45:36 +03:00
Panagiotis Koutsourakis
1e41afad2f Support for OAI-PMH data loader 2013-10-17 18:06:40 +03:00
Kostas Stamatis
23c3c70290 integrate 2nd phase of BTE (not working!) 2013-10-17 16:22:03 +03:00
Panagiotis Koutsourakis
1dfcbc92c3 Added data loader and modifiers for second phase 2013-10-17 15:21:23 +03:00
Kostas Stamatis
e4acaf8006 bug fix 2013-10-17 14:27:58 +03:00
Kostas Stamatis
0e8568a681 remove properties files + bug fixes 2013-10-17 14:15:08 +03:00
Kostas Stamatis
dc489d3e49 bug fixes 2013-10-17 12:07:26 +03:00
Andrea Bollini
b98637afc7 Merge pull request #287 from abollini/DS-1106
DS-1106 Solr search accent insensitive (ICU Transliteration)
2013-10-16 22:14:20 -07:00
Bram Luyten
58ec299121 DS-433 Adding DCTerms Schema
Including a new DCTerms schema as part of the default installation
2013-10-16 23:48:23 +02:00
kstamatis
28a6b3d0e8 bug fixes 2013-10-17 00:18:54 +03:00
Andrea Bollini
a33b0781b3 Updated ICU4j / Restored SnowballPorterFilter 2013-10-16 21:58:53 +02:00
Andrea Bollini
aade3ea9f5 Updated the lucene analyzer artifactId as required by lucene 4.4 2013-10-16 21:58:53 +02:00
Andrea Bollini
5c63f97b02 DS-1106 Solr search accent insensitive (ICU Transliteration) 2013-10-16 21:58:52 +02:00
kstamatis
312061f70a Resolve rebase conflicts 2013-10-16 20:51:24 +03:00
kstamatis
bb4b208088 remove unnecessary files + add licence in new files 2013-10-16 20:46:55 +03:00
Panagiotis Koutsourakis
de3aa60b44 Added SubmissionLookupOutputGenerator 2013-10-16 20:46:54 +03:00
Panagiotis Koutsourakis
c13b245263 Refactored the ItemSubmissionLookupDTO to use a list of Records internally 2013-10-16 20:46:54 +03:00
Kostas Stamatis
e0bd8716e2 cleanup SubmissionLookupService 2013-10-16 20:46:54 +03:00
kstamatis
18dafb9dff add modifiers + support record extension on MultipleDataLoader 2013-10-16 20:46:54 +03:00
Kostas Stamatis
325c862ef2 bte in submission workflow 2013-10-16 20:46:54 +03:00
Pascarelli Luigi Andrea
f5c57d1a44 Added style 2013-10-16 20:46:53 +03:00
Pascarelli Luigi Andrea
45985adf18 Added license 2013-10-16 20:46:53 +03:00
Pascarelli Luigi Andrea
edbb4ed7a4 Add i18n message 2013-10-16 20:46:53 +03:00
Pascarelli Luigi Andrea
fb2d9e3570 Update js function to jquery.1.10.x, added logo external bib service image, added mapconverter and configuration 2013-10-16 20:46:53 +03:00
Pascarelli Luigi Andrea
eacbe9a458 Added license 2013-10-16 20:46:53 +03:00
Andrea Bollini
067b9ef79b Bibliographic external database feature on submission - DS-1252 2013-10-16 20:46:05 +03:00
kstamatis
f257633ea3 remove unnecessary files + add licence in new files 2013-10-16 20:19:15 +03:00
Panagiotis Koutsourakis
65a3002ed1 Added SubmissionLookupOutputGenerator 2013-10-16 19:21:23 +03:00
Mark H. Wood
8ea030ed72 Spelling 2013-10-16 11:31:16 -04:00
Panagiotis Koutsourakis
e5702966bc Refactored the ItemSubmissionLookupDTO to use a list of Records internally 2013-10-16 18:25:29 +03:00
Mark H. Wood
06a5834fb1 Back to old commons-httpclient for compatibility with other dspace-api code 2013-10-16 10:29:15 -04:00
Mark H. Wood
b03a1d942a Rename DataCiteIdentifierProvider to EZIDIdentifierProvider to better reflect its role and disentangle from another DataCite provider in development. 2013-10-16 10:29:15 -04:00
Mark H. Wood
7ba9088bb3 Don't upchuck an NPE if a metadata value is null 2013-10-16 10:29:15 -04:00
Mark H. Wood
39702c923f Default publication year to the current year 2013-10-16 10:29:15 -04:00
Mark H. Wood
7a9e7703e1 Define a default publisher for unpublished Items, since DataCite requires a publisher. 2013-10-16 10:29:15 -04:00
Mark H. Wood
3ecc873071 Document EZID provider's configuration. 2013-10-16 10:29:15 -04:00
Mark H. Wood
9dbfc26e26 Make EZIDRequest more forgiving w.r.t. trailing slash on shoulder, or none, and add some debug logging. 2013-10-16 10:29:15 -04:00
Mark H. Wood
b8cc7ff79e Add a map of value transformers to the crosswalk, for data which must be rewritten to fit the service's schema. 2013-10-16 10:24:55 -04:00
Mark H. Wood
62c8d98747 Preserve causation chain in InstallItem 2013-10-16 10:24:55 -04:00
Mark H. Wood
b8ebcb2d1f Fixes from testing 2013-10-16 10:24:55 -04:00
Mark H. Wood
41fdee0feb Begin debugging recent changes. 2013-10-16 10:23:05 -04:00
Mark H. Wood
bea4ed34a1 Split off EZID operations from DSpace provider 2013-10-16 10:23:05 -04:00
Mark H. Wood
fac970d4e5 More EZID factoring 2013-10-16 10:21:45 -04:00
Mark H. Wood
6c2630d028 Factor out basic EZID operations 2013-10-16 10:21:45 -04:00
Mark H. Wood
8724183a11 Document the IdentifierProvider interface 2013-10-16 10:17:26 -04:00
Mark H. Wood
78442e810e Start an IdentifierProvider for DataCite EZID 2013-10-16 10:14:33 -04:00
Mark H. Wood
fcfbd89229 Merge pull request #312 from tuub/DS-1535
DS-1535: DOI support for dspace-api
2013-10-16 07:04:59 -07:00
Pascal-Nicolas Becker
4d2600c5ce Bugfix DIM2DataCite: Change how to handle language codes. 2013-10-16 15:37:35 +02:00
Marsa Haoua
ada63be883 Dois with status value: NULL, are deleted in Database. We don't need to send an online delete. 2013-10-16 15:37:35 +02:00
Kostas Stamatis
cf0d5b39fa cleanup SubmissionLookupService 2013-10-16 15:22:20 +03:00
Panagiotis Koutsourakis
ca96421b53 Merge pull request #3 from lap82/DS-1688
[DS-1688] Merge with new look&feel for JSPUI
2013-10-16 03:58:04 -07:00
Richard Jones
d8210a74a6 fix description string in web.xml 2013-10-16 11:01:41 +01:00
Richard Jones
cdba10a28e port latest swordv2 version to DSpace 2013-10-16 10:34:50 +01:00
Pascal-Nicolas Becker
62e5b6f2f8 Enhanced DOIOrganiser.
Added options to delete and update all DOIs, queued for the specified
process.
Enhanced output of list option.
Small changes on some message (f.e. on help message).
2013-10-16 09:27:21 +02:00
Pascal-Nicolas Becker
ee9f80a1ba Add a DOIConsumer to update doi metadata when item metadata changes. 2013-10-16 09:27:21 +02:00
Pascal-Nicolas Becker
066c4a4223 Add metadata after DOI registered at registration agency.
Add DOI to metadata of an item not before it is registered at
registration agency. After registration was successfull a new
DOI should be resolvable within a few minutes.

Don't change deleted DOIs. Added DOIIdentifierException.DELETED as new
error code. It will be thrown if someone tries to regsiter or reserve
a DOI that was deleted before.
2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
5fbca5c763 DIM2DataCite.xsl: Changed how to find DOIs in metadata.
When we changed DOIIdentifierProvider to add DOIs to item metadata as
operable URLs, we forgot to change DIM2DataCite.xsl accordingly.
2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
3504fb73de Added DOI.RESOLVER instead of using "http://dx.doi.org" everywhere. 2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
1dd5538d3b Typos. 2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
9e123dc4cf Unit test for DOIIdentifierProvider. 2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
b99e010173 Add DOI in form of an operable URL to Item metadata.
We add DOIs as dc.identifier.uri like it is done with handles.
2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
f3e3242099 Added method to extract DOI out of external format. 2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
7c15561650 DOIIdentifierException use default message if no message is set. 2013-10-16 09:27:20 +02:00
Marsa Haoua
69233ef4ba Fix delete from DOIOrganiser 2013-10-16 09:27:20 +02:00
Marsa Haoua
7d68f9936a Add delete option. Delete DOI on command line 2013-10-16 09:27:20 +02:00
Marsa Haoua
0251a02190 Add update status values for DOI table 2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
c76e2c4a6a Add table DOI to database while update from DSpace 3 to 4. 2013-10-16 09:27:20 +02:00
Pascal-Nicolas Becker
a081da4333 Bug fixing DOIIdentifierProvider.
If an Item had more then one DOI delete(Context, DSpaceObject) didn't
delete all of them.
If supports(null) or supports("") was called a IllegalArgumentException
was thrown. No it returns false as expected.
2013-10-16 09:21:28 +02:00
Marsa Haoua
cd2f2feffa Added license header to DOIIdentifierException. 2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
cbc0efd090 Don't use DOI support per default. 2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
35ba75cb50 Set default values for missing mandatory fields in DIM2DataCite crosswalk. 2013-10-16 09:21:28 +02:00
Marsa Haoua
6faaf76bf3 New command line option to turn the command line output off 2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
72dde37ace DOIOrganiser uses --help as default. Changed launcher.xml
DOIOrganiser prints help, if no options were used.
DOIOrganiser can be called by [dspace-install]/bin/dspace doi-organiser
now.
2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
cc396c7269 Code review of DataCiteConnector.
* Coding Conventions
 * use of reserveDOI for updateMetadata instead of code duplication
 * some less important simplifications
2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
407627e9d2 Check if a DOI is reserved before it get registered. 2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
f036847a0b Changed DOI status from int to Integer.
DatabaseManager.queryTable(Context, String, String, Object[]) uses the
toString() method. So we use Integer instead of ints for the status of a
DOI.
2013-10-16 09:21:28 +02:00
Marsa Haoua
8590258bb7 Some Exception Handling and change value from DOI status from DOI table 2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
075ec63470 DataCiteConnector: remove cache.
We introduced the cache to get better performance while reserving and
registering DOIs. To be able to process new submissions independently
from the status of the registration agency API we introduced a cron job
that registers and reserves doi. It is not important if the cronjob is
some seconds faster or not. The cache brought some new problems and
makes the code more complicated. As it is not needed any more I removed
it.
2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
e10fac21f0 Continued refactoring of DOIOrganiser. 2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
3dd5e6df5f Fix typo in method name. 2013-10-16 09:21:28 +02:00
Pascal-Nicolas Becker
dc4e53b10e Added method to DOIOrganiser to send alert mails. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
bd92496a7d Started Refactoring of DOIOrganiser. Code cleanup. 2013-10-16 09:21:27 +02:00
Marsa Haoua
13f35891d4 Little Convention Code 2013-10-16 09:21:27 +02:00
Marsa Haoua
7fa57d84ca Perform some conventions code and fixed little bugs 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
404bc1c6bf Simpliefied code of DOIIdentifierProvider. Enhanced Exception handling. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
66c99dfae0 Use DOIIdentifierException in org.dspace.identifier.DOI. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
9b3e23efb0 Do not return booleans on several DOI actions.
Booleans returned on reserving, registering, updating metadata and
deleting of a doi where used to signal a problem with metadata
convertion. This should be done with the enhanced Exception handling.
2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
fdf19de9a0 Add some more error codes and a method to get the error code. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
6b611a721a Started to enhance exception handling. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
37fe97c6cb Created DOIIdentifierException to enhance exception handling. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
f249644495 Moved DOIIdentifierProvier.formatIdentifier to DOI.formatIdentifier. 2013-10-16 09:21:27 +02:00
Marsa Haoua
edc4ceaa28 Update metadata for a given DOI Identifier or an Item or a Handle 2013-10-16 09:21:27 +02:00
Marsa Haoua
66be510a64 We build a cron Job for Doi identifier reservation and registration. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
d44320305c Code cleanup. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
ba906ddaba Little change on some comments and a log message. 2013-10-16 09:21:27 +02:00
johlton
4bc7b2e58c Reviewed comments and messages. Corrected typos and grammar. 2013-10-16 09:21:27 +02:00
Pascal-Nicolas Becker
f27fe22f62 Remove stub EZIDConnector and old test class. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
08416a3009 Repaird method to delete DOIs. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
0dcc241e29 Documented spring settings for DOIIdentifierProvider.
Added comments so that DOIIdentifierProvider will be used only when needed.
2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
fbc1deedea Added proderties for DOIIdentifierProvider. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
ee5f1b17de Changed DIM2DataCite.xsl.
Now it fills the optional fields of DataCite too.
2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
e9516b4f3a Some more clean up. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
86af008796 Changed ExceptionHandling in DOIIdentifierProvider.
DOIIdentifierProvider and DataCiteConnector will throw more
IdentifierExceptions and less other Exceptions, like RuntimeException,
IllegalArgumentException or IllegalStateExceptions.
IdentifierServiceImpl catches IdentifierException but not the other
ones. If IdentifierServicesImpl catches an IdentiferException it may go
on with the next IdentifierProvider and not the complete user action
will stop.
2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
8adbec5538 Added method to register DOIs. Added Debug information. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
a367c9ca6a Removes stub method to purge cache out ouf EZIDConnector. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
b3e6caffc8 Changed handling of cache in DataCiteConnector.
The cache don't need to be purged manually. It will be purged
automatically after some time. The cache holding time can be configured
the default is set to 120 sec.
2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
b57baab397 Added a method to delete metadata of a DOI. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
0b3ad8456f Added method to reserve a DOI. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
188a018653 DOIIdentifierProvider loads prefix out of dspace.cfg. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
a4fc1ae4b2 Enhanced DIM2DataCite.xsl (dissemination crosswalk). 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
63a5ae626b DataCiteConnector.sendMetadataPostRequest(...) implemented. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
8a006faf4a Added method to check if a DOI is reserved. 2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
9ef0319c19 Adds method to send http delete to DataCite.
Cleanedup code to eleminate code duplication: Added a method to send
HTTP requests and to parse the response into a DataCiteResponse object.
The request speficie methods creates the request and uses the new
message to send them to Datacite.
2013-10-16 09:21:26 +02:00
Pascal-Nicolas Becker
b8752e0ddc Implements methods to connect to DataCite.
Refactored the method to send get requests to DataCite so it can be used
for the metadata and the doi api.
Implemented a method to send a post request to the doi api.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
04863a996e Cleanup DOI extension. 2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
40af20407b Repair broken merge.
Forgot to merge the dependency to org.apache.httpcomponents.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
3f87ed2535 Restructured DOI extension.
Renamed DOIDataCiteIdentifierProvider into DOIIdentifierProvider.
Added interface org.dspace.identifier.doi.DOIConnector to be able to
support different registration agencies.
Moved spring configuration into
dspace/config/spring/api/identifier-service.xml.
Began development of org.dspace.identifier.doi.DataCiteConnector.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
8695a69228 Adds method resolveUrltoHandle to HandleManager.
Simple method to get the handle to a url constructed by the
HandleManager before.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
b97a80804f Continued implementation of DOIDataCiteIdentifierProvider.
Implemented isDOIRegistered(...).
Change the API a littlebit as some protected methods needs more
arguments like a DSpace Context.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
264de565ca Continued work on DOIDataCiteIdentifier.
* Added a lot of functionality to DOIDataCiteIdentifierProvider.
 * Added a table Doi to the database.
 * Added use of Database table doi to DOIDataCiteIdentifierProvider.
 * Moved DOIDataCiteIdentifierProvider.DOIToExternalForm(String) to DOI.DOIToExterenalForm.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
1ceeee1d4f Reconsidered concept for DOIDataCiteIdentifierProvider.
Copied DOIIdentifierProvider to DOIDataCiteIdentifierProvider and worked
it over.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
84bd4fbcef Fix: forgotten to change logger while renaming DOIIdentifierProvider to
EZIDRegistrationAgency.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
ca243984d2 Set the DOIRegistrationAgency by spring dependency injection. 2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
9cf851b48d First version of DataCiteRegistrationAgency. 2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
08bba54d9a First version of DIM2DataCite crosswalk. 2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
3a32f688ea Removed crosswalk from abstract RegistrationAgency as it is an
implementation detail and not something we should manage in an
interace. Added it to EZIDRegistrationAgency where it belongs to.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
57db5a8ff3 Added javadoc documentation. 2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
a9ea5bdb00 The registrationAgency DOIIdentifierProvider will use can be configured
in dspace.cfg now. I did not use spring dependcy injection as I wanted
the registrationAgency to be configured by dspace.cfg instead of a
spring configuration file.

Changed some javadoc too.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
54713c81e2 Clarified API: every DOI exchanged between DOIIdentifierProvider and any
RegistrationAgency should be in the following format: doi:10.123/456.
Methods from DOIIdentifier accepts DOIs as string attribute in the
following formats: as naked DOIs (f.e. 10.123/456), DOIs in external
format (f.e. http://dx.doi.org/10.123/456) and in the format described
above (doi:10.123/456).

Removed CFG_SHOULDER from DOIIdentifier, EZIDRegistrationAgency has to
care about the format an identifier needs for the EZID API. A DOI always
has a prefix (f.e. 10.123) and a suffix (f.e. 456)!
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
708464fd72 Moved configurationService and parentService from EZIDRegistrationAgency
to RegistrationAgency as probably every registration agency has to read
some configuration properties.

Added the right license header.
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
867969dade There are several DataCite members that can be used as DOI registration
agency. EZID is only one of them. Started refactoring of
org.dspace.identifier.DataCiteIndentifierProvider. Created
org.dspace.idenfitifer.DOIIdentifierProvider, the abstract class
org.dspace.identifier.doi.RegistrationAgency and moved all EZID specific
code to org.dspace.identifier.doi.EZIDRegistration Agency.
The refactoring is not finished yet! It still misses autowiring of the
registration Agency and some smaller changes. Use
org.dspace.identifier.DataCiteIdentifierProvider as long as the
refactoring is not finished.

Conflicts:
	dspace-api/src/main/java/org/dspace/identifier/IdentifierProvider.java
2013-10-16 09:21:25 +02:00
Pascal-Nicolas Becker
864bd83c82 Package org.dspace.identifier.ezid should be renamed to org.dspace.identifier.doi. Until refactoring is finished both packages will exist. Copied files from org.dspace.identifier.ezid to org.dspace.identifier.doi. 2013-10-16 09:21:24 +02:00
Mark H. Wood
a76718850c More javadoc cleanup 2013-10-16 09:21:24 +02:00
Mark H. Wood
d11c3cf29f License headers 2013-10-16 09:21:24 +02:00
Mark H. Wood
1d6aa272db Cleanup and document a bit 2013-10-16 09:21:24 +02:00
Mark H. Wood
e41eb134ed Fixes from testing
Conflicts:
	dspace-api/src/main/java/org/dspace/identifier/DataCiteIdentifierProvider.java
	dspace-api/src/test/java/org/dspace/identifier/DataCiteIdentifierProviderTest.java
2013-10-16 09:21:24 +02:00
Mark H. Wood
98ee2d7e43 Begin debugging recent changes.
Conflicts:
	dspace-api/src/main/java/org/dspace/identifier/ezid/EZIDResponse.java
2013-10-16 09:21:24 +02:00
Mark H. Wood
ab684edfc0 Split off EZID operations from DSpace provider
Conflicts:
	dspace-api/src/main/java/org/dspace/identifier/DataCiteIdentifierProvider.java
	dspace-api/src/main/java/org/dspace/identifier/ezid/EZIDRequest.java
2013-10-16 09:21:24 +02:00
Mark H. Wood
5cd1d361a7 More EZID factoring
Conflicts:
	dspace-api/src/main/java/org/dspace/identifier/DataCiteIdentifierProvider.java
	dspace-api/src/main/java/org/dspace/identifier/ezid/EZIDRequest.java
2013-10-16 09:21:24 +02:00
Mark H. Wood
edf12bd3e9 Use ServiceManager to get configured test instances 2013-10-16 09:21:24 +02:00
Mark H. Wood
907154bb23 start making the tests work 2013-10-16 09:21:24 +02:00
Mark H. Wood
1f663effde Externalize defaults some more 2013-10-16 09:21:24 +02:00
Mark H. Wood
d79038101c Externalize defaults 2013-10-16 09:21:24 +02:00
Mark H. Wood
4a6df74a2f Flesh out the DOI code 2013-10-16 09:21:24 +02:00
Mark H. Wood
b8207ea8f5 Document the IdentifierProvider interface
Conflicts:
	dspace-api/src/main/java/org/dspace/identifier/IdentifierProvider.java
2013-10-16 09:21:24 +02:00
Mark H. Wood
e5d53f8f43 Add initial code 2013-10-16 09:21:24 +02:00
kstamatis
bcb48cec70 add modifiers + support record extension on MultipleDataLoader 2013-10-15 23:45:46 +03:00
Mark H. Wood
4ebe7217d9 Merge pull request #320 from helix84/DS-1690-ldap-group-from-attr
DS-1690 assign DSpace group based on LDAP attribute value
2013-10-15 11:04:25 -07:00
Mark H. Wood
1d8838baa0 [DS-1502] Don't let XSL-T decode entities that we wrote inside <script> tags 2013-10-15 12:58:13 -04:00
Mark H. Wood
3361142045 Merge pull request #232 from mwoodiupui/DS-1456
[DS-1456] "dspace version" command-line script
2013-10-15 08:55:59 -07:00
Mark H. Wood
4e98c4cbe2 Too many doublequotes in oracle update-sequences patch (by visual inspection). 2013-10-15 11:51:57 -04:00
Pascarelli Luigi Andrea
3372386ffb Modified success message 2013-10-15 16:56:09 +02:00
Pascarelli Luigi Andrea
2c20c7c2c7 Restyling jsp for new jspui 2013-10-15 16:54:49 +02:00
Pascarelli Luigi Andrea
666de4c17e Merge with master and add bte feature to main admin menu 2013-10-15 16:27:09 +02:00
Mark H. Wood
bd102728b7 Inherit SLF4J version 2013-10-15 09:55:57 -04:00
Mark H. Wood
33215bb18f Merge remote-tracking branch 'upstream/master' into DS-1456 2013-10-15 09:27:30 -04:00
Kostas Stamatis
4f861cb02c bte in submission workflow 2013-10-15 15:46:56 +03:00
Pascarelli Luigi Andrea
7886088060 Merge with master and restyling versioning jsp 2013-10-15 12:24:20 +02:00
Peter Dietz
87c427b903 Clean up README 2013-10-14 12:05:55 -04:00
Andrea Bollini
d1f9b49772 Merge pull request #321 from CILEA/bootstrap
[DS-1675]  New JSPUI look & feel
2013-10-14 07:24:29 -07:00
Andrea Bollini
73912ff1b7 Use proper style for hint in collection creation wizard 2013-10-13 18:20:01 +02:00
Andrea Bollini
339dc7f014 Switch to the new bootstrap theme by default 2013-10-13 18:11:06 +02:00
Andrea Bollini
f83c0ef64f Move old template files in a legacy subfolder for backup 2013-10-13 18:04:53 +02:00
Andrea Bollini
e76a2ddc88 Allow action button to fill all the space / unvalided message is a danger alert 2013-10-13 17:59:53 +02:00
Andrea Bollini
978e7334a7 Simplified styling of Sherpa Romeo 2013-10-13 17:54:50 +02:00
Andrea Bollini
3e3e9ca736 Fix layout for controlled vocabulary 2013-10-13 17:16:38 +02:00
Andrea Bollini
ab193adafa Use proper style for hints 2013-10-13 16:59:59 +02:00
Andrea Bollini
a440235d29 Merge branch 'bootstrap' of https://github.com/CILEA/DSpace into bootstrap 2013-10-13 16:43:13 +02:00
Andrea Bollini
b13f6837cb Add style to the export button 2013-10-13 16:42:52 +02:00
Andrea Bollini
23bc970a03 Restylish browse control panel 2013-10-13 16:42:24 +02:00
Pascarelli Luigi Andrea
255ee71b5e Adjust metadata schema jsp 2013-10-13 01:35:13 +02:00
Pascarelli Luigi Andrea
9a1a484282 Adjust profile jsp 2013-10-13 01:27:33 +02:00
Pascarelli Luigi Andrea
52606952df Restyling item-map tools 2013-10-13 00:30:09 +02:00
Pascarelli Luigi Andrea
829a20f8e0 Adjust edit item form 2013-10-12 23:17:50 +02:00
Pascarelli Luigi Andrea
f004990abc Restyling error file upload in submission 2013-10-12 22:45:12 +02:00
Pascarelli Luigi Andrea
5c992f4b5f Adjust romeo/sherpa sidebar element in submission 2013-10-12 22:41:13 +02:00
Andrea Bollini
0be23df21e Improved layout when authority control is enabled 2013-10-12 16:43:49 +02:00
Andrea Bollini
b90c7724f8 Restylish input type list 2013-10-12 15:26:43 +02:00
Andrea Bollini
81badab9c2 Remove empty help message 2013-10-12 07:04:15 +02:00
Andrea Bollini
01a77be30a Restylish confirm delete community page 2013-10-12 07:03:47 +02:00
Andrea Bollini
703e813124 Bug fix: wrong name for delete button 2013-10-12 07:03:23 +02:00
Andrea Bollini
7667e8abe6 Added icon to actions button 2013-10-12 06:57:04 +02:00
Andrea Bollini
7bd35f8e7e Uniform markup for action button 2013-10-12 06:42:54 +02:00
Andrea Bollini
7fcc4e3f11 Improved TwoBox layout and fix unbalanced <div> 2013-10-12 06:14:01 +02:00
Andrea Bollini
c268c99015 Merge pull request #291 from terrywbrady/patch-1
See https://jira.duraspace.org/browse/DS-1644
2013-10-11 14:23:37 -07:00
Andrea Bollini
121b449c71 Merge pull request #246 from zuki/DS-1212
[DS-1212] Export all collections of a community recursively in ItemExport
2013-10-11 14:20:13 -07:00
Andrea Bollini
b217397d9e Make collection creation wizard more uniform 2013-10-11 20:05:38 +02:00
Andrea Bollini
db49abe445 Fix NPE when there are subcommunities 2013-10-11 20:05:01 +02:00
Andrea Bollini
2ca2eae5cd Fix creation community layout 2013-10-11 19:46:46 +02:00
Andrea Bollini
71073e4c78 Removing unnecessary center and fix layout on IE 2013-10-11 19:38:42 +02:00
Andrea Bollini
b960f5ebe0 Resized input to the right size for username/password 2013-10-11 19:29:10 +02:00
Pascarelli Luigi Andrea
13b8136315 Adjust layout submission with authority control field 2013-10-11 16:50:24 +02:00
Mark H. Wood
7d21f49c42 Merge pull request #307 from tuub/DS-1677
DS-1677 While registering a specified identifier IdentifierServiceImpl doesn't check if an IdentifierProvider supports it
2013-10-11 07:50:06 -07:00
Mark H. Wood
cab7ba1250 Merge pull request #301 from mwoodiupui/DS-1667
[DS-1667] Remove deprecated LoadDSpaceLNIConfig servlet
2013-10-11 07:40:32 -07:00
Pascarelli Luigi Andrea
96c268f2fb Adjust login form pages 2013-10-11 11:53:55 +02:00
Andrea Bollini
1612022e72 Improved group-list 2013-10-11 11:06:04 +02:00
Pascarelli Luigi Andrea
010d84db0e Restyling curate jsp 2013-10-10 15:15:56 +02:00
Pascarelli Luigi Andrea
23a8e9f5a1 Restyling embargo jsp and tag class 2013-10-10 13:48:19 +02:00
Pascarelli Luigi Andrea
72c6b001de Fix wrong layout on twobox 2013-10-10 12:57:36 +02:00
Pascal-Nicolas Becker
c65f07d9a1 Enhanced the MultiRemoteDSpaceRepositoryHandlePlugin.
Removed dependency from dspace.core.ConfigurationManager.
Implemented property file containing the URLs of DSpace handleresolver.
Load the handle prefix from handle resolver instead of duplicating
configuration.
2013-10-10 11:55:46 +02:00
Andrea Bollini
f2ee5454ee Draft: Multi remote DSpace Repositories plugin for handle storage 2013-10-10 11:55:46 +02:00
Andrea Bollini
5e4aec7464 DS-1637 JSPUI implementation and small improvements (config / error code) 2013-10-10 11:55:46 +02:00
Pascal-Nicolas Becker
8434594700 Simplified API of handleresolver. 2013-10-10 11:55:10 +02:00
Pascal-Nicolas Becker
e7b6bc95c5 Adds version header to org.dspace.app.xmlui.aspect.handle.HandleResolverReader 2013-10-10 11:55:10 +02:00
Pascal-Nicolas Becker
3b3dca0b0c Serve information about handles as json over xmlui. 2013-10-10 11:55:10 +02:00
Pascarelli Luigi Andrea
5756157bcc Add css rules to show confidence icon 2013-10-10 11:53:01 +02:00
Pascarelli Luigi Andrea
a61b421bc7 Fix tag closure in edit-metadata submission 2013-10-10 09:39:36 +02:00
Hardy Pottinger
d429cdbfbb Merge pull request #302 from mwoodiupui/DS-1666
[DS-1666] RoleDisseminator fails to check for possible null email
2013-10-09 11:51:09 -07:00
Pascarelli Luigi Andrea
7722d987b3 Restyling suggest and edit-item jsp 2013-10-09 16:50:00 +02:00
Pascarelli Luigi Andrea
0109a06224 Added css custom rules for autoheight input file 2013-10-09 14:37:49 +02:00
Pascarelli Luigi Andrea
3eb54952ff Restyling collection wizard creation jsp 2013-10-09 13:20:07 +02:00
Pascarelli Luigi Andrea
41755075c5 Restyling all admin feature jsp 2013-10-09 11:34:24 +02:00
Pascarelli Luigi Andrea
3a6eb1b5f0 Restyling list-metadata-field jsp 2013-10-09 11:00:58 +02:00
Kostas Stamatis
ad810ee93a Merge branch 'DS-1688' of https://github.com/EKT/DSpace into DS-1688 2013-10-09 08:58:33 +03:00
kstamatis
50eaae0fda Support BTE batch import from administrative UI 2013-10-09 08:55:27 +03:00
Kostas Stamatis
4be888b087 Support for Endnote data loader 2013-10-09 08:44:32 +03:00
Kostas Stamatis
5624c97301 Fix typo 2013-10-09 08:36:50 +03:00
Pascarelli Luigi Andrea
4cd4b3ec38 Restyling authorize and metadata registry/field/format jsp 2013-10-08 17:18:45 +02:00
Pascarelli Luigi Andrea
7844485366 Restyling authorize community/collection jsp 2013-10-08 12:23:15 +02:00
Pascarelli Luigi Andrea
fda7ab3c8d Restyling eperson group confirm deletion jsp 2013-10-08 11:07:40 +02:00
Pascarelli Luigi Andrea
8922bbcb16 Restyling eperson and group jsp 2013-10-08 10:56:28 +02:00
Bram Luyten
8a37fc22b4 DS-1559 Empty dc fields causes page layout issues
Fixing a number of issues caused by empty metadata fields in Mirage
2013-10-08 08:45:10 +02:00
Andrea Bollini
90cb456909 Merge branch 'bootstrap' of https://github.com/CILEA/DSpace into bootstrap 2013-10-08 08:00:17 +02:00
Andrea Bollini
300f5aa9e8 Improved footer layout and i18n 2013-10-08 07:59:35 +02:00
Andrea Bollini
4596e41a9e Restylish edit community / i18n improvements 2013-10-08 07:50:14 +02:00
Andrea Bollini
9c72db30fa Improved item page layout 2013-10-08 06:49:45 +02:00
Peter Dietz
746e3de99f Remove module dependency on dspace-rest.jar, as per Anja's advice
Travis builds were failing due to missing org.dspace:dspace-rest:jar:classes:4.0-SNAPSHOT
2013-10-07 23:37:57 -04:00
Peter Dietz
3337434c85 Bitstream extends DSpaceObject. Also adding the mimeType to response 2013-10-07 23:23:35 -04:00
Peter Dietz
153c4cbdda Remove un-needed license file from dspace-rest path 2013-10-07 23:23:04 -04:00
Peter Dietz
33d7153f62 For handle lookup, return a (comm, coll, item, ...) instead of plain DSO
Also takes ?expand param too
2013-10-07 22:31:39 -04:00
Peter Dietz
a399cae31d Minor tweak to DSO to fix it to serialize to xml 2013-10-07 22:13:40 -04:00
Peter Dietz
6881e88fc5 Bump Jersey version from 1.8 to 1.17.1 2013-10-07 22:11:01 -04:00
Peter Dietz
2e678c11f1 Add DSpace license to code header 2013-10-07 21:50:46 -04:00
Peter Dietz
1b1f423011 Changed DSO ID to lowercase id, so we don't get duplicate id and ID when serialized 2013-10-07 20:55:39 -04:00
Hardy Pottinger
4b8768c735 Merge pull request #322 from tdonohue/DS-1528
Fix for DS-1528. Use 'maven-antrun-plugin' and native2ascii to encode UTF-8 chars before filtering
2013-10-07 15:10:03 -07:00
Peter Dietz
23e6ed2e8b Add some markdown to the REST readme 2013-10-07 17:32:22 -04:00
Peter Dietz
3759f31014 Update README with endpoint information 2013-10-07 17:19:37 -04:00
Tim Donohue
83b6629dd1 Fix for DS-1528. Use 'maven-antrun-plugin' and native2ascii to encode UTF-8 characters before filtering 2013-10-07 21:17:50 +00:00
Peter Dietz
d5e77e9f01 Cursory attempt at looking up object by its handle.
/rest/handle/1811/12345 returns a "DSpaceObject" with basic attributes,
client needs to follow the "link" to the real object...
2013-10-07 15:57:59 -04:00
Peter Dietz
45f58129a5 REST index "/" links out to some sample endpoints 2013-10-07 15:37:24 -04:00
Peter Dietz
cb4268bb45 Create a base DSO class that others extend, to DRY up some code... 2013-10-07 15:36:57 -04:00
Pascarelli Luigi Andrea
eb63f8fa9c Added missed license 2013-10-07 20:12:23 +02:00
Pascarelli Luigi Andrea
63241d5e88 Restyling eperson admin jsp 2013-10-07 17:51:27 +02:00
Pascarelli Luigi Andrea
14dd286b00 Restyling eperson main, metadata import 2013-10-07 17:28:30 +02:00
Andrea Bollini
1c6607eb45 Unbalanced div 2013-10-07 16:46:23 +02:00
Ivan Masár
e41d5818df DS-1690 assign DSpace group based on LDAP attribute value 2013-10-07 16:33:21 +02:00
Andrea Bollini
de9ff7c1c0 Merge branch 'bootstrap' of https://github.com/CILEA/DSpace into bootstrap 2013-10-07 16:03:10 +02:00
Pascarelli Luigi Andrea
ea9e073ecc Restyling curate admin page and index admin page 2013-10-07 15:49:10 +02:00
Pascarelli Luigi Andrea
4e3c73e698 Restyling all supervisor jsp 2013-10-07 15:09:14 +02:00
Andrea Bollini
4463a0c069 Merge branch 'bootstrap' of https://github.com/CILEA/DSpace into bootstrap 2013-10-07 14:50:42 +02:00
Andrea Bollini
b6645a489b Reorder registred user menu 2013-10-07 14:50:15 +02:00
Andrea Bollini
8433ec522b Fix btn width in edit collection 2013-10-07 14:47:58 +02:00
Pascarelli Luigi Andrea
a9a213d23f Restyling admin jsp 2013-10-07 14:47:34 +02:00
Andrea Bollini
22f2311ab3 Tools for collection management 2013-10-07 14:47:12 +02:00
Andrea Bollini
21930264c3 Restylish edit group 2013-10-07 14:46:02 +02:00
Andrea Bollini
98d13b204b Fix unbalanced div in community home 2013-10-07 14:45:21 +02:00
Pascarelli Luigi Andrea
c9c3fdb5b5 Restyling navbar-admin 2013-10-07 12:21:21 +02:00
Peter Dietz
0822c85863 Restricting sensitive metadata from view, i.e. provenance. 2013-10-06 15:01:02 -04:00
Peter Dietz
905ae72c87 Do authorization checks for collections, items, and bitstreams 2013-10-06 14:30:28 -04:00
Andrea Bollini
8b14da260d Minor twicks 2013-10-06 19:26:02 +02:00
Andrea Bollini
16545a6731 Minor twicks 2013-10-06 19:04:08 +02:00
Andrea Bollini
e9bb997fd7 Restylish submission last steps 2013-10-06 19:03:23 +02:00
Andrea Bollini
d4e4cb646f Restylish mydspace 2013-10-06 19:01:30 +02:00
Andrea Bollini
28255d8b4c Minor layout twicks 2013-10-06 19:00:25 +02:00
Peter Dietz
d241f26341 Authorization checks for Community, only show comms this user can see 2013-10-06 12:20:23 -04:00
Andrea Bollini
dc126c448d Restylish submission first steps 2013-10-05 19:45:53 +02:00
Andrea Bollini
cd102b983b Restylish submission first steps 2013-10-05 19:44:57 +02:00
Pascarelli Luigi Andrea
c96d3a3c53 Revert message bundle to fix erroneous entry and add versioning message 2013-10-05 19:36:19 +02:00
kstamatis
1ca34f7806 Support BTE batch import from administrative UI 2013-10-05 20:19:44 +03:00
Pascarelli Luigi Andrea
25de8a1b79 Finalize porting item version level from xmlui to jspui 2013-10-05 19:10:10 +02:00
kstamatis
c9041fceaf Support v0.9 of BTE 2013-10-04 23:30:57 +03:00
Peter Dietz
a5a7efe9a4 Item exposes its bitstreams 2013-10-04 08:08:00 -04:00
KevinVdV
7dbd71543b [DS-1683] Add spell checker to discovery 2013-10-04 10:26:38 +02:00
Andrea Bollini
77606cac4d Restylish community list 2013-10-04 01:32:57 +02:00
helix84
3db23c0987 Merge pull request #300 from MinDogger/DS-1510
Remove check for license in DIM-Handler and unneccessary if statement in...
2013-10-03 13:08:16 -07:00
helix84
c7b28e8dfd Merge pull request #313 from tdonohue/DS-1682
Fix for DS-1682 - Mirage theme header is hardcoded into XSLT.
2013-10-03 12:29:24 -07:00
Tim Donohue
163731f14a Fix for DS-1682 - Mirage theme header is hardcoded into XSLT. 2013-10-03 19:14:13 +00:00
Andrea Bollini
660dee921e Restylish the community home page 2013-10-03 09:24:39 +02:00
Andrea Bollini
9312d1c39e Bug fix: instance variable must be cleaned in doEndTag 2013-10-03 09:23:19 +02:00
Andrea Bollini
5db3f7231e Restyling collection pages 2013-10-03 06:53:00 +02:00
Andrea Bollini
1d04d4dd25 Make the discovery facet layout parametrizable 2013-10-03 06:37:32 +02:00
Andrea Bollini
95d54d355f Use local copy of DSpace logo 2013-10-03 06:35:15 +02:00
Peter Dietz
f58073ded7 Items have Bitstreams 2013-10-02 17:53:42 -04:00
Peter Dietz
08b99f62c4 Add a "link" element so that client, can follow to resource endpoint.
Still needs to include the contextPath i.e. /rest/
2013-10-02 15:50:37 -04:00
Peter Dietz
ca9b24805a Collection presents its list of Items 2013-10-02 11:05:44 -04:00
Terry Brady
9ef6bf6717 Included date values and effective flag on Context element 2013-10-01 12:11:25 -04:00
Terry Brady
e3653224ac Output policy data to METSRIGHTS only if a policy is effect (by date)
Test cases
1. No date present
2. Start date and end date present
3. Start date only present
4. End date only present
2013-10-01 10:12:52 -04:00
Andrea Bollini
0794666343 Switch to table class from bootstrap 2013-09-30 23:03:49 +02:00
Andrea Bollini
5376bd0b83 Basic layout for password-login 2013-09-30 22:52:29 +02:00
Andrea Bollini
6e69ebdc89 Draft community home revisted 2013-09-30 20:03:14 +02:00
Andrea Bollini
ac15a40573 Fix plaholder text for browse menu heading 2013-09-30 20:03:13 +02:00
Andrea Bollini
4b3d5ce849 Use local copy of jquery/jquery-ui 2013-09-30 20:03:13 +02:00
Andrea Bollini
86b3968dc6 Fix header padding 2013-09-30 20:03:11 +02:00
Andrea Bollini
5678ae6e34 Stylish the search form 2013-09-30 20:03:10 +02:00
Andrea Bollini
905feb344c Cleanup discovery search: results & facets 2013-09-30 20:03:10 +02:00
Andrea Bollini
262a1ec85b Bootstrap template improvements:
support for sidebar
add a banner
add an extra dspace-theme.css
2013-09-30 20:03:09 +02:00
Andrea Bollini
0c5c4cfe03 Better support for sidebar in layout tag 2013-09-30 20:03:08 +02:00
Andrea Bollini
b042056e91 Modern JSPUI template with bootstrap - home page 2013-09-30 20:03:08 +02:00
Andrea Bollini
de042228dc Enabling basic use of different template 2013-09-30 20:03:07 +02:00
Pascarelli Luigi Andrea
94a756bf4f Mapping servlet, first version of history servlet 2013-09-29 23:16:40 +02:00
Pascarelli Luigi Andrea
28c3086ee6 Added i18n message 2013-09-29 22:03:32 +02:00
Andrea Bollini
923695579b Merge pull request #274 from abollini/DS-1620
DS-1620 Facet date range is sometimes incorrect
2013-09-29 12:51:06 -07:00
Andrea Bollini
1837f1c013 Manage date < 1000 in date facet range and autocomplete 2013-09-29 21:32:37 +02:00
Andrea Bollini
45c2e4cf64 Enable indexing of date < 1000 2013-09-29 21:32:36 +02:00
Andrea Bollini
3c1b3b647d Merge pull request #289 from lap82/DS-1623
[DS-1623] Upgrade DSpace-SOLR to SOLR 4
2013-09-29 11:00:10 -07:00
Peter Dietz
d49342e2fa Add metadata keys to org.dspace.content.Community, and use those instead of strings 2013-09-29 11:41:54 -04:00
Peter Dietz
4cb6d2e02b Fix adding subComms, subColls to a Community. Add ?expand=all 2013-09-29 11:41:12 -04:00
Peter Dietz
ad6e12894c Adding "Lite" versions, i.e. LiteCollection, LiteCommmunity, for easy nest 2013-09-29 11:39:14 -04:00
Pascarelli Luigi Andrea
40939f8554 Start JSPUI porting of XMLUI Versioning, create servlet and start jsp 2013-09-29 00:30:52 +02:00
Terry Brady
a474722e77 Merge pull request #1 from mwoodiupui/patch-1-mark
Patch 1 amended with changes from Mark Wood
2013-09-27 10:34:43 -07:00
Peter Dietz
fa2765f540 Getting /community and /community/:id to output json/xml 2013-09-27 12:20:55 -04:00
Pascal-Nicolas Becker
7d831f9190 Check if an IdentifierProvider supports a specified identifier. 2013-09-27 18:07:22 +02:00
Pascarelli Luigi Andrea
65d9955168 Added style 2013-09-27 11:19:03 +02:00
Pascarelli Luigi Andrea
c88663c097 Added license 2013-09-27 09:19:37 +02:00
Pascarelli Luigi Andrea
45811ea3a5 Add i18n message 2013-09-27 00:15:07 +02:00
Pascarelli Luigi Andrea
8ca1f0cfe3 Update js function to jquery.1.10.x, added logo external bib service image, added mapconverter and configuration 2013-09-27 00:04:46 +02:00
Mark H. Wood
1f180e8a7b Consolidate all knowledge of whether a session is authenticated into AuthenticationUtil.
Catch all other XMLUI uses of session attribute "dspace.current.user.id"
(which is only set in JSPUI).

Factor testing of "dspace.user.effective" into a new static method to
deduplicate logic and encapsulate the meaning of this session attribute.
2013-09-26 16:25:10 -04:00
Pascarelli Luigi Andrea
4ab2a318f8 Added license 2013-09-26 21:50:41 +02:00
Andrea Bollini
9977b15550 Bibliographic external database feature on submission - DS-1252 2013-09-26 21:49:22 +02:00
Àlex Magaz Graça
45d702c42f DS-1536 having a DOT in handle prefix causes identifier.uri to be cut off when being created. 2013-09-26 16:29:05 +02:00
Andrea Bollini
159590c570 Merge pull request #283 from abollini/DS-1633
DS-1633 Sherpa/Romeo integration in the submission upload step
2013-09-26 06:09:44 -07:00
Andrea Bollini
08c365ccde Update the sherpa romeo response to the full response versions schema
Introduced support for publicher policies and restrictions about the pdf version
2013-09-26 12:59:08 +02:00
Andrea Bollini
3b6be9741f Renamed the sherpa/romeo activation parameter
Renamed to webui.xxx so to avoid configuration changes when the features will
become available also in XMLUI
2013-09-26 12:59:02 +02:00
Andrea Bollini
da364ac92d DS-1633 Sherpa/Romeo integration in the submission upload step 2013-09-26 12:58:56 +02:00
helix84
380a0be82c Merge pull request #296 from LongsightGroup/DS-1422
DS-1422 surround the file name with quotes
2013-09-25 14:02:40 -07:00
Àlex Magaz Graça
ae94bc4cba Rename aspects to avoid confusion about their responsibilities. 2013-09-24 13:23:07 +02:00
Àlex Magaz Graça
cdd4f36684 Remove the center search box in the home page for the XMLUI Lucene search aspect. 2013-09-24 13:23:07 +02:00
Àlex Magaz Graça
4b6322d361 Remove the center search box in the home page for the XMLUI Discovery aspect. 2013-09-24 13:23:06 +02:00
Mark H. Wood
9666b3bd42 Must also deal with null EPerson names when disseminating Groups. 2013-09-23 17:02:33 -04:00
Mark H. Wood
2eab4b0f8d [DS-1667] Remove deprecated LoadDSpaceLNIConfig servlet 2013-09-23 15:48:55 -04:00
Andrea Bollini
4a29536a8e Merge pull request #292 from abollini/DS-1639-jquery-iframe
DS-1639 AJAX progress bar for file upload in JSPUI
2013-09-21 08:26:17 -07:00
Andrea Bollini
1517e6f507 Enabling upload progress bar in UploadWithEmbargoStep 2013-09-21 17:11:41 +02:00
Andrea Bollini
f1120d7de5 renamed configuration parameter to switch off upload progress bar 2013-09-21 17:11:01 +02:00
Andrea Bollini
0a45c3038b DS-1639 AJAX progress bar for file upload in JSPUI 2013-09-21 16:44:40 +02:00
Andrea Bollini
b98b0f522a Merge pull request #298 from abollini/DS-1360
DS-1360 Porting advanced embargo function to JSPUI
2013-09-21 07:30:10 -07:00
Peter Dietz
366d14d618 Add shortcut "business" logic to get the key of a metadata field 2013-09-21 01:10:13 -04:00
Peter Dietz
436cd1ef23 Add name,archive-status, owningCollection to /items/:id, 2013-09-21 01:09:40 -04:00
Peter Dietz
95eefa7d6b Use modern route to set dspace.cfg and such 2013-09-21 01:08:45 -04:00
Peter Dietz
c0a2bc2459 Change REST to use current dspace-parent, not some maven import 2013-09-21 00:40:16 -04:00
Peter Dietz
ad17878325 Add /items/:id, thus far it has the metadata 2013-09-21 00:39:28 -04:00
Mark H. Wood
b7d34d03fe Don't emit an EMAIL element if EPerson has a null email 2013-09-20 15:30:22 -04:00
Peter Dietz
b8b9df5fbc Move pieces of Collection data into a "metadata" element:name, license, handle 2013-09-19 16:21:36 -04:00
Peter Dietz
b01c56fb36 Use contextPath to link out 2013-09-19 16:20:30 -04:00
Peter Dietz
4e0b10da75 Rest index links to available endpoints 2013-09-19 16:19:56 -04:00
Peter Dietz
c5445f84ba Renamed HelloWorld to RestIndex 2013-09-19 16:19:26 -04:00
Brian Freels-Stendel
e37add5771 Remove check for license in DIM-Handler and unneccessary if statement in DIM-Handler and collection-view. 2013-09-19 12:43:34 -06:00
Peter Dietz
b66428ae69 Add some install instructions to the DSpace-Rest readme 2013-09-19 13:42:20 -04:00
Peter Dietz
7425038360 Wire up dspace-rest to build a webapp 2013-09-19 13:36:06 -04:00
Peter Dietz
6ac5842e0a Add dspace-rest, using Jersey, light support for Collection / Community 2013-09-19 13:35:40 -04:00
Keiji Suzuki
03dc077c23 added a license header 2013-09-19 18:23:00 +09:00
Andrea Bollini
508597302a Avoid advanced form to repropose the first embargo policy after any confirm & add 2013-09-18 23:47:10 +02:00
Andrea Bollini
e3227af3cf Organize import, wrong header for end date column 2013-09-18 23:45:37 +02:00
Andrea Bollini
e647b72495 Renamed xmlui.submission.restrictstep.* configuration parameters to webui.submission.restrictstep.* 2013-09-18 23:44:34 +02:00
Sam Ottenhoff
9bb1a80a0e DS-1422 surround the file name with quotes 2013-09-16 11:46:15 -04:00
Andrea Bollini
051dfbaeec Renamed xmlui.submission.restrictstep.* configuration parameters to webui.submission.restrictstep.* 2013-09-16 10:48:35 +02:00
Andrea Bollini
e5deffc66d Merge remote-tracking branch 'helix84/zuki-embargo3-rebased' into DS-1360
Conflicts:
	dspace-api/src/main/resources/Messages.properties
	dspace-jspui/src/main/webapp/styles.css
2013-09-16 09:11:42 +02:00
Andrea Bollini
84e9f8e718 Merge pull request #286 from abollini/DS-1622
DS-1622 Porting of the Login As feature to JSPUI
2013-09-14 08:28:26 -07:00
Andrea Bollini
acbb9d9e4b Logout from a loginAs user will relogin the previous user 2013-09-14 17:13:53 +02:00
Andrea Bollini
9736723c91 Cleanup: this jsp is not an errorPage 2013-09-14 17:10:52 +02:00
Andrea Bollini
f60b8d86fd Merge pull request #1 from lap82/DS-1622
[DS-1622] Uniform property xmlui/jspui in webui.user.assumelogin
2013-09-08 08:04:49 -07:00
Pascarelli Luigi Andrea
6531068fed Add one error jsp with only a message, remove i18n for authorize exception message 2013-09-06 22:17:13 +02:00
Andrea Bollini
15ed2fb52c Merge pull request #241 rebased 2013-09-06 10:36:33 +02:00
KevinVdV
b3aca64759 [DS-1489] Back button in Discovery broken in Firefox 2013-09-05 18:10:53 +02:00
helix84
90c86da2ac Merge pull request #258 from rivaldi8/oai_dc-export-fix
DS-1602 fix
2013-09-05 02:37:54 -07:00
Pascarelli Luigi Andrea
00e929764b Add link to return at epeople admin page, Add throw only authorizeexception, Show custom errorpage in the case of superadmin loginas superadmin 2013-09-05 00:10:24 +02:00
helix84
167f069ade Merge pull request #255 from rradillen/DS-1235
DS-1235 IP authentication configuration does not apply netmask and CIDR ranges correctly
2013-09-04 13:42:58 -07:00
Richard Rodgers
3ae7117ec2 Adds MetadataWebService curation task 2013-09-03 14:45:18 -04:00
Andrea Bollini
10f031bfc7 Merge pull request #293 from lap82/DS-1646
[DS-1646] Resource Restriction Plugin typo "read" should be "read:"
2013-09-02 03:34:29 -07:00
Pascarelli Luigi Andrea
de92924783 Fix bug resource restriction query admin 2013-09-02 11:53:39 +02:00
Terry Brady
9fdbbf790d See https://jira.duraspace.org/browse/DS-1644
Replace the session variable being queried to determine if a forced redirect to https is needed.
2013-08-29 12:24:06 -04:00
Pascarelli Luigi Andrea
41981be0cf Fix npe on requiresIndexing 2013-08-27 22:47:31 +02:00
Pascarelli Luigi Andrea
2d116ad42f Fix context parameter log4j.configuration in solr web.xml 2013-08-25 16:27:09 +02:00
Andrea
ee18b8e85b Merge pull request #2 from KevinVdV/DS-1623
Logging mechanism fix
2013-08-25 07:14:31 -07:00
Pascarelli Luigi Andrea
09964593d4 Turn xmlui/jspui.user.assumelogin property to the new webui.user.assumelogin, add custom jsp error to show no loginas action reason 2013-08-24 03:01:31 +02:00
Pascarelli Luigi Andrea
df76e80570 Updated solrj version by get it from solr.version property 2013-08-23 23:32:17 +02:00
Mark H. Wood
1b1cdd0b7e [DS-1610] Don't keep Cocoon logs forever
Drop rotated logs after 14 rotations (two weeks).
2013-08-23 11:34:52 -04:00
bram-atmire
f039ee334a Merge pull request #154 from jsnshrmn/master
Improved thumbnail and branded preview filters as discussed in DS-1259
2013-08-23 08:04:44 -07:00
KevinVdV
448c1f1d30 Logging mechanism fix 2013-08-23 16:20:27 +02:00
Andrea
bbae8b04e1 Merge pull request #1 from KevinVdV/DS-1623
Fixing usage statistics logging by adding update chain for uid
2013-08-23 04:07:42 -07:00
KevinVdV
d219466277 Fixing usage statistics logging by adding update chain for uid 2013-08-23 12:51:35 +02:00
Pascarelli Luigi Andrea
b2f2fa82ac Update elasticsearch references to new version 2013-08-23 02:39:14 +02:00
Pascarelli Luigi Andrea
013f3f6f45 Update modules to solr4 2013-08-23 02:37:40 +02:00
Pascarelli Luigi Andrea
6458a2133d Update to new solr server object 2013-08-23 02:37:01 +02:00
Pascarelli Luigi Andrea
e0225e9467 Exception surrounded modified in solr4 2013-08-23 02:35:56 +02:00
Pascarelli Luigi Andrea
4679024bd6 Migrate statistics to solr4 2013-08-23 02:32:36 +02:00
Pascarelli Luigi Andrea
67fecc49a0 Migrate search to lucene 4 2013-08-23 02:31:16 +02:00
Pascarelli Luigi Andrea
19619fd855 Migrate discovery to solr4 2013-08-23 02:29:33 +02:00
Pascarelli Luigi Andrea
571587bc4b From version 4.3.0 aims for complete logging flexibility, it don't include logging jars in the .war file, so we provide them with the inclusion of commons-logging 2013-08-23 02:25:43 +02:00
Pascarelli Luigi Andrea
7fbb35a2e3 Add standalone lucene-queryparser (before went with core), added specific solr.version property, update elasticsearch to avoid references to lib <lucene4 2013-08-23 02:19:35 +02:00
Pascarelli Luigi Andrea
6e444a40d5 Migrate solr config files to solr4, add standalone log4j configuration (use log4j daily appender logger) for solr and reference it in web.xml, merge web.xml custom dspace with web.xml solr4 default 2013-08-23 02:12:00 +02:00
Mark H. Wood
782ba93946 Merge pull request #279 from mwoodiupui/DS-803
[DS-803] Make 'bin/dspace harvest -g' actually function.
2013-08-22 11:36:11 -07:00
Andrea Bollini
11081306e2 Merge pull request #288 from abollini/DS-1561
DS-1561 build.properties breaks alert.recipient
2013-08-21 14:28:59 -07:00
Andrea Bollini
7d6665fa61 DS-1561 build.properties breaks alert.recipient 2013-08-21 23:08:01 +02:00
Mark H. Wood
67614e2467 Merge pull request #210 from mwoodiupui/DS-1269
[DS-1269] EmailService to encapsulate the sending of mail
2013-08-21 13:05:09 -07:00
Ivan Masár
6139b828f8 DS-1119 clarify message: wildcard tool works on items and bitstreams 2013-08-21 21:21:07 +02:00
bram-atmire
7931f713f1 DS-1636 ignoring overlay directories generated by IntelliJ 2013-08-21 18:34:21 +02:00
Pascarelli Luigi Andrea
153737f777 DS-1622 Porting of the Login As feature to JSPUI 2013-08-21 14:42:42 +02:00
Pascarelli Luigi Andrea
eb38c78650 DS-1624 Porting reset password admin UI tool to JSPUI 2013-08-21 12:27:46 +02:00
Andrea Bollini
ca58b047e4 Fix service initialization and behaviour when authentication is required 2013-08-19 11:03:10 -04:00
Hélder Silva
55ed758507 DS-1634 XOAI OpenAire dc.relation filter is incorrect 2013-08-19 16:23:44 +02:00
helix84
a0124643e7 Merge pull request #281 from LongsightGroup/DS-1632
DS-1632 adding missing abstract into to XOAI QDC crosswalk
2013-08-19 02:03:05 -07:00
Andrea Bollini
9aeafac9ab DS-402 Performance and UI improvements for itemmap
This commit remove hardcoded reference to the author index for both discovery
and lucene provider. The admin is now able to perform a generic search or choose
from one of the customized indices or filters.
A very simple pagination, only next and previous buttons, has been introduced to
avoid performance issues with large result set.
Finally has been introduced optimization to perform the "Not owning collection"
check and, limitly to discovery, authorization check directly as part of the
search.
2013-08-18 19:50:37 +02:00
Keiji Suzuki
b94dc47aea DS-402 enable itemmap to search with both Lucene and Discovery 2013-08-18 19:50:18 +02:00
Keiji Suzuki
4d15b1c584 DS-402 changed item mapper search to case insesitive 2013-08-18 19:49:44 +02:00
Andrea Bollini
7613292b25 Fix security hole: any registred user was able to execute curation tasks
As the curation servlet is mapped on both paths tools and dspace-admin a smart
user could take advantage of the form parameters reserved to the main admin
console and redirect the request to the tools path. The main admin console need
to enforce security directly without rely only on the administrator filter
2013-08-17 15:17:18 +02:00
Keiji Suzuki
c1b54cd9b3 sort chaged messages 2013-08-17 15:52:11 +09:00
Keiji Suzuki
c31779a5a3 fix conflict 2013-08-17 15:42:46 +09:00
Keiji Suzuki
87a7c6fa0a move url from /dspace-admin to /tools for community/collection/item 2013-08-17 15:22:39 +09:00
Keiji Suzuki
74550d4b92 added a license notice 2013-08-17 11:37:03 +09:00
Keiji Suzuki
04384e6cb3 moved the variable result to the include file 2013-08-17 11:37:03 +09:00
Keiji Suzuki
c8945a641d extracts the common codes to a file and includes it. 2013-08-17 11:37:03 +09:00
Keiji Suzuki
291941aada [DS-1613] Porting curation task administrative UI to JSPUI 2013-08-17 11:37:03 +09:00
Sam Ottenhoff
272c0981e9 DS-1632 adding missing abstract into to XOAI QDC crosswalk 2013-08-16 11:08:14 -04:00
Mark H. Wood
640f0b4018 More silly whitespace 2013-08-15 17:01:18 -04:00
Mark H. Wood
35cf357951 [DS-803] Make 'bin/dspace harvest -g' actually function.
And my usual whitespace cleanup.
Also make org.dspace.harvest.OAIHarvester.verifyOAIHarvester more rugged.
2013-08-15 17:01:18 -04:00
abollini
3903d379f2 Merge pull request #280 from zuki/DS-831-2
[DS-831] Recent items addon : Listing of most recently added items to DSpace
2013-08-15 10:13:30 -07:00
Mark H. Wood
f70c72893e Add some imports lost in conflict resolution after rebasing 2013-08-15 10:56:30 -04:00
Mark H. Wood
0b16ea03a5 Remove imports no longer used 2013-08-15 10:30:33 -04:00
Mark H. Wood
4c40b3980a Make DSpace actually use EmailService 2013-08-15 10:29:30 -04:00
Mark H. Wood
c3ce713da2 Add configuration setting to name the mail Session object to be sought from JNDI 2013-08-15 10:27:57 -04:00
Mark H. Wood
c4e6a6ecd1 Get tests to run 2013-08-15 10:27:56 -04:00
Mark H. Wood
3c01798c33 Clean up unused imports 2013-08-15 10:27:56 -04:00
Mark H. Wood
3374491d2f Copy service code from abandoned DS-1182 attempt. 2013-08-15 10:27:56 -04:00
Alan Orth
e8b0dcce3c [DS-1629] Incorrect Java Vendor string in XMLUI Control Panel 2013-08-15 13:32:30 +02:00
Keiji Suzuki
a90f8cf61a add a plugin comment for Lucene 2013-08-15 11:14:01 +09:00
zuki
287367e865 Merge pull request #2 from abollini/DS-831
removed unnecessary configuration options and move topcommunties in a separate processor
2013-08-14 18:44:43 -07:00
Jason Sherman
160eb19d45 Update BrandedPreviewJPEGFilter.java
Working to address failed to convolve bug.
2013-08-14 17:01:29 -05:00
Jason Sherman
5ea7fc0891 Update JPEGFilter.java
Working to address failed to convolve bug.
2013-08-14 16:59:53 -05:00
Mark H. Wood
44f53a2e38 Merge pull request #213 from mwoodiupui/DS-1390
[DS-1390] stage 1: move license, email texts, news out of ConfigurationManager
2013-08-14 13:17:18 -07:00
Andrea Bollini
b9858f2f74 DS-1627 Ability to turn off TopCommunities list in site home page 2013-08-14 12:52:35 +02:00
Andrea Bollini
74dfa640b6 Removing unnecessary configuration options 2013-08-14 12:52:18 +02:00
Keiji Suzuki
86375a3030 re-implement the functionarity to display recent submission on site home 2013-08-14 11:08:58 +09:00
Tim Donohue
a263ba72cb Merge pull request #277 from KevinVdV/DS-1625
[DS-1625] Non public LNI broken when using password authentication
2013-08-13 12:02:31 -07:00
Mark H. Wood
5b4d3830c5 Merge pull request #276 from mwoodiupui/DS-792
[DS-792] When 'mail.server.disabled = true' put text of email in log file
2013-08-13 05:47:39 -07:00
Mark H. Wood
8cbfd30b4e [DS-1618] dspace-parent POM needs cleanup.
Added an empty parent.relativePath to silence bogus parent-mismatch warnings.

Added a description, so that we don't inherit a confusing unrelated one from org.sonatype.oss:oss-parent.
2013-08-13 08:43:05 -04:00
KevinVdV
f136628b27 Merge pull request #278 from zuki/DS-1626
[DS-1626] Duplicate dependency causes NoClassDefFoundError
2013-08-13 01:11:14 -07:00
Keiji Suzuki
989a42b157 delete a duplicate dependency 2013-08-13 17:07:45 +09:00
KevinVdV
30ac59eb3c [DS-1625] Non public LNI broken when using password authentication 2013-08-13 10:03:45 +02:00
Tim Donohue
1fc5eac3c6 Merge pull request #275 from mwoodiupui/DS-1569
[DS-1569] Don't try to emit a password if there is none.
2013-08-12 09:45:49 -07:00
Mark H. Wood
cdf300c2c5 Merge pull request #228 from mwoodiupui/DS-1563
[DS-1563] ConfigurationService recognize -Ddspace.configuration= as ConfigurationManager does.

No comments for three months, and it's a trivial change.
2013-08-12 07:11:58 -07:00
Raul Ruiz
6f087b1ba7 DS-1571 DSpace discovery CRITICAL bug when date facet produce range 2013-08-12 14:21:33 +02:00
Keiji Suzuki
5a04e9bad9 DS-1188 add itemlist to collection home page 2013-08-12 11:34:45 +02:00
abollini
babc80bc5d Merge pull request #273 from abollini/DS-1617
DS-1617 Switch to SOLRBrowseDAOs implementation as default in DSpace 4.0
2013-08-10 05:37:10 -07:00
Andrea Bollini
027072068a DS-1619 Unable to remove items after enabling SOLRBrowseDAOs 2013-08-10 14:21:27 +02:00
Mark H. Wood
6a1973e207 Merge pull request #267 from KevinVdV/DS-1612
[DS-1612] Merge DSpace/dspace-solr project into DSpace/DSpace
2013-08-09 07:17:55 -07:00
Andrea Bollini
3b063ca673 DS-1617 Switch to SOLRBrowseDAOs implementation as default in DSpace 4.0 2013-08-08 16:46:12 +02:00
abollini
dcbddcff5a Merge pull request #272 from abollini/DS-1611
DS-1611 Enable Discovery By Default in JSPUI
2013-08-08 07:19:59 -07:00
Andrea Bollini
ebae6c52f4 DS-1611 Enable Discovery By Default in JSPUI 2013-08-08 16:15:22 +02:00
abollini
98ad4cad5d Merge pull request #271 from abollini/DS-1616
DS-1616 Localhost is not longer supported as a valid Solr server URL
2013-08-08 06:24:20 -07:00
abollini
57f6b35dee Merge pull request #269 from abollini/DS-1586
DS-1586 Fix SLF4J and JCL Bridge version incompatibility
2013-08-08 06:20:58 -07:00
Andrea Bollini
42b502ac21 DS-1616 Localhost is not longer supported as a valid URL Solr
Replaced the deprecated org.apache.commons.validator.UrlValidator with the new
version from apache import org.apache.commons.validator.routines.UrlValidator
enabling local urls (localhost and internal names like mymachine, etc.)
2013-08-08 14:35:52 +02:00
Andrea Bollini
86ca5d74c1 DS-1586 Fix SLF4J and JCL Bridge version incompatibility: move up to dspace-parent POM 2013-08-07 23:41:22 +02:00
KevinVdV
ba5ff43c52 [DS-1612] Merge DSpace/dspace-solr project into DSpace/DSpace (Adding missing license headers) 2013-08-07 23:26:21 +02:00
Mark H. Wood
22f50511f8 Actually commit the attachment code. 2013-08-07 15:01:04 -04:00
Mark H. Wood
a67f7e2ee4 [DS-792] When mail sending is disabled, log the entire message instead.
Since this should only occur during debugging or testing, I thought it
expedient to just build the MimeMessage normally and then extract the
composed headers from it.  This is slightly inefficient, but greatly
simplified the code.

Attachments will not be logged, since they might be anything and of
any size.  Instead, a list of their names will be inserted below the
headers and above the message body.
2013-08-07 14:51:14 -04:00
Mark H. Wood
ef71ef40d5 Merge pull request #268 from mwoodiupui/DS-1460
[DS-1460] Add SOLR logging config file
This merely adds a log4j appender for Solr's logging which will be used by the next release of dspace-solr.
2013-08-07 07:44:51 -07:00
KevinVdV
9ebce7947c [DS-1612] Merge DSpace/dspace-solr project into DSpace/DSpace 2013-08-05 12:50:14 +02:00
KevinVdV
7310043e56 Add 'dspace-solr/' from commit 'bd02640bc5d871bd9da6bc73ff70a44ebbc659cf'
git-subtree-dir: dspace-solr
git-subtree-mainline: 53716c0f29
git-subtree-split: bd02640bc5
2013-08-05 12:20:40 +02:00
Peter Dietz
53716c0f29 Merge pull request #231 from mwoodiupui/DS-790
[DS-790] SOLR - Spider detection to match on hostname or useragent
2013-08-02 22:02:50 -07:00
Mark H. Wood
9df23659a8 Merge pull request #221 from mwoodiupui/DS-888
[DS-888] Fix obvious error:  store fetched request parameter
After two months, only one positive comment.  A one-line fix.
2013-08-01 11:55:37 -07:00
Keiji Suzuki
7cbb96509f added a license notice 2013-08-01 16:47:11 +09:00
Keiji Suzuki
81a0818598 moved the variable result to the include file 2013-08-01 16:38:26 +09:00
Keiji Suzuki
3ab26e6926 extracts the common codes to a file and includes it. 2013-08-01 16:22:52 +09:00
Keiji Suzuki
a6f30db81e [DS-1613] Porting curation task administrative UI to JSPUI 2013-08-01 11:39:02 +09:00
Mark H. Wood
e2cf4fd9fc After discussion, raise loglevel and set a default limit on number of logs retained. 2013-07-31 17:07:34 -04:00
Mark H. Wood
bd02640bc5 Merge pull request #3 from mwoodiupui/DS-1460
[DS-1460] Add SOLR logging config file
2013-07-31 13:59:36 -07:00
Mark H. Wood
c066178caa Merge pull request #218 from KevinVdV/DS-1272
[DS-1272] Enable Discovery By Default for the XMLUI
2013-07-31 13:19:32 -07:00
Mark H. Wood
4abf138cc3 [DS-1460] Add a new file for Solr messages to the log4j configuration 2013-07-31 10:39:59 -04:00
Mark H. Wood
b244fc9896 Merge pull request #4 from mwoodiupui/DS-1606
[DS-1606] Bring dspace-solr up-to-date with current development environment
2013-07-30 06:36:53 -07:00
Ivan Masár
cdfdfe4ce5 DS-1554 one more fix
Thanks, Keiji!
2013-07-30 09:50:38 +02:00
Mark H. Wood
56d7d8bcb4 Also add Travis configuration 2013-07-29 09:28:38 -04:00
Mark H. Wood
71468f669c Also add Travis configuration 2013-07-29 09:25:01 -04:00
Ivan Masár
cf5061fed8 DS-1554 fix again (first fix was wrong)
Thanks, Keiji!
2013-07-29 10:19:27 +02:00
Mark H. Wood
6f831f06ee Replace 'dspace-pom', now deprecated 2013-07-26 15:54:04 -04:00
Mark H. Wood
23b88bf4a0 Add a .gitattributes 2013-07-26 15:51:31 -04:00
Mark H. Wood
c3be797f70 License header updates also needed to build 2013-07-26 15:49:10 -04:00
Mark H. Wood
4db8fb4cf8 Add a .gitignore 2013-07-26 15:49:10 -04:00
Mark H. Wood
79b6b2295a Harmonize with current dspace-pom so it will build. 2013-07-26 15:49:10 -04:00
Mark H. Wood
1d1fcc7b36 Replace 'dspace-pom', now deprecated 2013-07-26 13:47:06 -04:00
Mark H. Wood
61a33b66e4 Provide a filterable default path to the logging configuration 2013-07-26 13:46:36 -04:00
Hardy Pottinger
2724839ccd Merge pull request #264 from helix84/DS-1605
DS-1605 add .travis.yml for Travis-CI integration
2013-07-24 15:34:56 -07:00
Ivan Masár
4436ad96bb DS-1605 add .travis.yml for Travis-CI integration 2013-07-25 00:31:31 +02:00
Jason Sherman
e42d7b5ec3 Update JPEGFilter.java
Addressed transparency issues.
2013-07-24 15:38:17 -05:00
Jason Sherman
8ca80dce23 Update BrandedPreviewJPEGFilter.java
Addressed transparency issues
2013-07-24 15:37:21 -05:00
Tim Donohue
f4b26bc7eb Ensure dspace-lni-client has dspace-lni as a dependency. Also disable 'regenerate-wsdl' profile by default. Related to DS-1550 2013-07-24 11:03:01 -05:00
Tim Donohue
03276502d6 Merge pull request #261 from hardyoyo/DS-1603-fix_profile_fields_in_jspui
DS-1603 - added Coverity security library, and used it to harden profile fields in JSPUI
2013-07-23 12:38:54 -07:00
Hardy Pottinger
ebe398fe25 added coverity security library, used addentities throughout to harden profile form fields in JSPUI 2013-07-23 14:11:30 -05:00
Àlex Magaz Graça
2a775253ac Update metadata.hide.dc.description.provenance option comment.
This option no longer affects OAI-PMH.
2013-07-22 12:10:14 +02:00
Àlex Magaz Graça
8cb30da110 Don't export dc.description.provenance.
The default is to hide this metadata (see
metadata.hide.dc.description.provenance option in dspace.cfg).
2013-07-22 12:10:14 +02:00
Àlex Magaz Graça
c15b29c7b7 Ensure all metadata fields are exported through OAI with oai_dc.
Some fields were not exported which can be a problem when harvesting
from another repository.
2013-07-22 12:10:14 +02:00
Robin Taylor
bfbd0586da Merge pull request #206 from robintaylor/DS-1527
DS-1527 Remove filtering of FORWARD and INCLUDE requests
2013-07-22 02:14:57 -07:00
Ivan Masár
0464894169 DS-1554 fix and related preventive fixes
* make SWORD use upload.temp.dir
* Also make sure that it's not null
* if upload dir is not specified, use java.io.tmpdir
2013-07-17 23:48:34 +02:00
helix84
d2df021c00 Merge pull request #257 from helix84/DS-1537
DS-1537: Invalid bitstream URL in OAI
2013-07-17 14:27:53 -07:00
Ivan Masár
7988e4b07e DS-1537: Invalid bitstream URL in OAI 2013-07-17 23:25:22 +02:00
helix84
d9163595b9 Merge pull request #219 from lyncode/oai-with-custom-descriptions
DS-1479 : Oai with custom descriptions
2013-07-17 14:08:06 -07:00
Ivan Masár
aba1518c45 DS-1554 redefine hardcoded SWORD upload dir 2013-07-17 22:21:41 +02:00
Mark H. Wood
21e3dc8f86 Tiny comment tidy 2013-07-16 14:56:05 -04:00
Mark H. Wood
a5e86912fe Tidy up mocks after testing. 2013-07-16 14:07:12 -04:00
Mark H. Wood
ba7ba2ea43 Add method to test client identity from strings, not request attributes, for processing statistical cases and other recorded events. 2013-07-16 14:01:00 -04:00
Mark H. Wood
271a96f6bf Remove unused Spring loader and test 2013-07-16 11:54:32 -04:00
roeland
bfc045f5f0 DS-1235 IP authentication configuration does not apply netmask and CIDR ranges correctly 2013-07-12 14:46:15 +02:00
Keiji Suzuki
a788856c57 fixed the wrong use of the local variable style 2013-07-12 11:21:58 +09:00
bram-atmire
7519d68e9d Merge pull request #252 from bram-atmire/auth-color
DS-1598 Authority Control values show up in red
2013-07-10 13:36:56 -07:00
Bram Luyten
215943d48d DS-1598 Authority Control values show up in red
Removing specific color for authority controlled authors
2013-07-10 17:34:12 -03:00
KevinVdV
81bb553687 [DS-1597] Browse subjects by collection count bug 2013-07-08 12:11:31 +02:00
Keiji Suzuki
2b4633a87c Export all collections of a community recursively 2013-07-07 11:07:42 +09:00
KevinVdV
28502b115c Merge pull request #245 from tdonohue/DS-1593
Fix for DS-1593 : Ensure discovery.cfg uses 'solr.server' setting instead of hardcoding its own URL
2013-07-01 23:27:13 -07:00
Tim Donohue
c79e5a2b78 Fix for DS-1593 : Ensure discovery.cfg uses 'solr.server' setting 2013-07-01 12:35:46 -05:00
Tim Donohue
7c59009f8a DS-1592 : Remove debug printout 2013-07-01 11:53:34 -05:00
Mark H. Wood
f53b6df7a4 Display the source of the configuration to the context's log. 2013-06-27 16:14:43 -04:00
Mark H. Wood
ced6e9652c Add code to configure log4j from a file that can be specified by a context parameter. 2013-06-27 15:19:47 -04:00
Mark H. Wood
ad7e1e959a LocalHostRestrictionFilter creates a logger but never uses it. If we
remove it, we can get rid of the Commons Logging dependency.

Also add some direct dependencies drawn in by our modified FacetComponent.
2013-06-27 10:46:57 -04:00
Mark H. Wood
5442153457 Replace J.U.L. logging with log4j. 2013-06-27 10:24:26 -04:00
Mark H. Wood
14f33bb713 License header updates also needed to build 2013-06-26 16:14:09 -04:00
Mark H. Wood
9e32854ad4 Add a .gitignore 2013-06-26 15:48:27 -04:00
Mark H. Wood
b6d77c32bd Harmonize with current dspace-pom so it will build. 2013-06-26 15:45:31 -04:00
Mark H. Wood
a5e5aa925f Declare use of slf4j-api. 2013-06-25 15:51:36 -04:00
Mark H. Wood
b165134114 When listing webapp.s, delete records for any not found living.
This sends a HEAD request to the registered URL for the webapp and
assumes that the app is dead if result is not 200.

This change caused a cascade of changes to the treatment of the
database table, because the DBMS layer insists that a table's primary
key be INTEGER.  It was necessary to introduce a new column for the
purpose.  This also means you can have more than one running instance
of the same UI, if you wish.  But it also means that the sequence
required by the new column will overflow after about 2 billion starts.
2013-06-25 15:10:55 -04:00
bram-atmire
c22cdc9c75 Merge pull request #220 from bram-atmire/DS-1552
DS-1552 adding luceneMatchVersion to oai and statistics SOLR configs
2013-06-22 05:41:49 -07:00
bram-atmire
789dab6609 Merge pull request #239 from KevinVdV/DS-1489
[DS-1489] SolrJ-3.3.0 dependency in OAI
2013-06-22 05:36:15 -07:00
Mark H. Wood
1bb3cbc4e5 Update testing for new features; remove Spring-based configuration. 2013-06-21 15:31:55 -04:00
Mark H. Wood
b0fbceed01 Start adding DNS pattern matching. 2013-06-20 16:12:48 -04:00
Mark H. Wood
81f24f1aa0 Add matching of User-Agent header, for well-behaved bots with
ever-expanding address pools.

While we're at it, stop punting DNS names found in the IP address
files.  Note that this is *not* DNS *pattern* matching; it only resolves
individual host names to IP addresses at load time.
2013-06-20 15:16:43 -04:00
Ivan Masár
08390036cf DS-1581: fix last commit 2013-06-20 09:25:36 +02:00
KevinVdV
db27179ead [DS-1489] SolrJ-3.3.0 dependency in OAI 2013-06-19 22:29:47 +02:00
helix84
fab314fe04 Merge pull request #238 from aschweer/DS-1581-restrictionmessage
DS-1581 Prevent double-up of restriction message
2013-06-19 00:49:38 -07:00
Andrea Schweer
579f3aee09 DS-1581 Prevent double-up of restriction message 2013-06-19 17:43:25 +12:00
Mark H. Wood
029353b0fc [DS-1550] relativePath was not re-corrected. 2013-06-17 16:21:38 -03:00
LifeH2O
803f70342f DS-1576 fix names of LDAP configuration properties 2013-06-17 13:00:26 +02:00
Ivan Masár
6e9f3e36f3 correct some strings and comments 2013-06-17 11:16:56 +02:00
Keiji Suzuki
cb719b5ae5 Porting advanced embargo function to JSPUI
Fixed some codes as the code reviews by helix84

reverted the api of BrowseItem to its original

revert build.properties

Porting advanced embargo function to JSPUI, revised version
2013-06-17 10:41:50 +02:00
Hardy Pottinger
d026d69f02 Merge pull request #233 from hardyoyo/DS-1565-make-debug-logging-safer
let Maven filter log4j.properties, added new loglevel properties
2013-06-14 14:38:19 -07:00
Hardy Pottinger
c83e5031b2 let Maven filter log4j.properties, added new loglevel properties to control loglevel 2013-06-14 15:18:14 -05:00
Mark H. Wood
f60b6c3497 More informative message when an Identifier cannot be created
Tag the IdentifierException onto the new RuntimeException instead of ignoring it.
2013-06-14 16:22:12 -03:00
Mark H. Wood
de9a3d73b4 Remove added context parameters no longer used. 2013-06-14 10:37:56 -04:00
Mark H. Wood
83b605deaa MXBean approach didn't pan out, so remove (most of) the code. 2013-06-14 10:32:12 -04:00
Mark H. Wood
9b26731c83 Record 'isUI' in database; add code to 'dspace version' to consume the table. 2013-06-14 10:20:44 -04:00
Mark H. Wood
e0fb4367f6 Reorganize, refactor, implement an alternative MBean approach for trial. 2013-06-13 11:41:46 -04:00
Mark H. Wood
5cd4a7f176 Replace kooky URL calculation with fetching it from the configuration. 2013-06-12 10:36:54 -04:00
Mark H. Wood
da4dfb1314 [DS-1456] Make webapp.s register in a new database table when started, so we can
list them later.
2013-06-07 15:28:27 -04:00
helix84
21bab5a336 Merge pull request #185 from helix84/dbname_dspace-info.pl
fix hardcoded db name in dspace-info.pl
2013-06-05 13:06:10 -07:00
Mark H. Wood
263613e81b [DS-1569] Don't try to emit a password if there is none.
Issue #DS-1569 - RoleDisseminator fails to check for possible null password
2013-06-04 14:38:41 -04:00
Mark H. Wood
556352f105 Merge pull request #163 from mwoodiupui/DS-1083
[DS-1083] Create new users from the command line
[DS-1567] Stream multiple commands into one invocation of bin/dspace
2013-05-30 06:54:17 -07:00
Mark H. Wood
2a86c63188 [DS-1563] ConfigurationService recognize -Ddspace.configuration= as ConfigurationManager does 2013-05-28 11:46:53 -04:00
Mark H. Wood
591b6c9072 Manually re-merge UTF-8 changes lost in rebase.
See c4c493c4cf.
See 802cce856f.
2013-05-28 06:38:43 -04:00
Mark H. Wood
6c89fb1ac0 Reintroduce factored-out methods as @deprecated wrappers, so we don't
break third-party code.

These should *not* be mirrored in ConfigurationService.
2013-05-28 05:55:12 -04:00
Mark H. Wood
2b56480842 IDE failed to refactor references embedded in JSPs. 2013-05-28 05:55:12 -04:00
Mark H. Wood
e0d803cc2d getConfigurationFile cannot return null anymore. 2013-05-28 05:55:12 -04:00
Mark H. Wood
e930def354 Clean up comments and unused imports. 2013-05-28 05:55:12 -04:00
Mark H. Wood
02e718b694 Oops, missing license headers. 2013-05-28 05:55:12 -04:00
Mark H. Wood
ed9149608d [DS-1390] stage 1: move license, email texts, news out of Configuration Manager. 2013-05-28 05:55:12 -04:00
helix84
96cc0d5bd4 Merge pull request #226 from helix84/javadoc
added some Javadoc
2013-05-25 04:12:11 -07:00
Ivan Masár
268bc7dde8 javadoc for AuthorizeManager 2013-05-25 13:09:21 +02:00
Ivan Masár
12632f67c5 fix Resourcepolicy JavaDoc 2013-05-25 13:09:20 +02:00
Ivan Masár
6746387f35 javadoc for Bitstream 2013-05-25 13:09:20 +02:00
Ivan Masár
2a70ea08c9 comment-only change - fix format of some authors 2013-05-25 13:09:20 +02:00
Ivan Masár
3f9aa46f9e javadoc for the bulkedit package 2013-05-25 13:09:20 +02:00
Ivan Masár
5876dfcbf6 javadoc for the util package 2013-05-25 13:09:20 +02:00
Ivan Masár
6e94a8846c javadoc for SFXFileReader 2013-05-25 13:09:20 +02:00
Mark H. Wood
8a02466391 rebased 2013-05-23 15:24:48 -04:00
Mark H. Wood
4fc9a01614 Stop abusing Spring and do the list merging we'd hoped it would do. 2013-05-23 13:21:02 -04:00
Mark H. Wood
54f6b4e1f2 Add missing license text 2013-05-23 13:21:01 -04:00
Mark H. Wood
6aaccc5e3b Apply patch extracted from old SVN development tree 2013-05-23 13:21:01 -04:00
Mark H. Wood
20d4668f75 Fix obvious error: store fetched request parameter 2013-05-22 09:41:56 -04:00
Bram Luyten
fca7eb434c DS-1552 adding luceneMatchVersion to oai and statistics SOLR configs
This property becomes mandatory in SOLR 4.0
2013-05-20 13:14:45 +02:00
João Melo
f484a843db Merge branch 'oai-with-custom-descriptions' of https://github.com/lyncode/DSpace into oai-with-custom-descriptions 2013-05-20 03:06:13 +01:00
João Melo
069b34d86c XOAI version upgraded to 3.0.0 2013-05-20 03:04:55 +01:00
lyncodev
40e029fde0 Now a new version of the xoai toolkit must be released 2013-05-20 03:04:00 +01:00
Mark H. Wood
ff1ec212d6 Merge pull request #217 from mwoodiupui/DS-1456
DS-1456 "dspace version" command-line script.
This looks like two committer approvals, so in it goes.  I added the commit number as requested.
2013-05-17 12:17:35 -07:00
Mark H. Wood
b8f6f91bcb Fix badly broken .gitignore, include new scm.properties template.
I fumbled a rebase and hadn't cleaned up properly.  Including recent
changes to .gitignore from others also means that I don't need to
exempt the .properties files in this work anymore.
2013-05-17 15:09:28 -04:00
Mark H. Wood
da53991b6b Merge branch 'DS-1456' of github.com:mwoodiupui/DSpace into DS-1456
Conflicts:
	.gitignore
2013-05-17 14:34:04 -04:00
Mark H. Wood
913577eaf1 Add SCM revision number (= git commit hash) and branch name (but the
build-number plugin doesn't get that from git yet).
2013-05-17 14:31:30 -04:00
Mark H. Wood
6b240897ea Add a launcher command 2013-05-17 14:31:30 -04:00
Mark H. Wood
d4a4068d28 Test for Discovery/Lucene search 2013-05-17 14:31:30 -04:00
Mark H. Wood
657c441219 Fix .gitignore to not ignore maven.properties 2013-05-17 14:31:30 -04:00
Mark H. Wood
003c86ce4f Add the Version class to report on DSpace's version, build environment, and runtime environment. 2013-05-17 14:27:30 -04:00
Mark H. Wood
879856b8ac Add SCM revision number (= git commit hash) and branch name (but the
build-number plugin doesn't get that from git yet).
2013-05-17 14:20:06 -04:00
KevinVdV
5ac655e61c [DS-1272] Enable Discovery By Default 2013-05-17 13:52:36 +02:00
Mark H. Wood
8c228d3a73 Merge pull request #216 from tdonohue/DS-1550
DS-1550: Reattach dspace-lni-client so that it is built whenever dspace-lni gets built
2013-05-16 13:54:32 -07:00
Tim Donohue
7e4b21440f DS-1550: Reattach dspace-lni-client so that it is built whenever dspace-lni gets built 2013-05-16 14:44:39 -05:00
Hardy Pottinger
b8fce4800e Merge pull request #214 from hardyoyo/DS-1546
DS-1546 fix logic error in findMultipleHeaders method of ShibAuthentication plugin; also fix config advice in ShibAuthentication plugin.
2013-05-14 19:39:57 -07:00
Hardy Pottinger
e2d38cbcd8 re: #736, fix logic error in handling multiple values in SHIB-SCOPED-AFFILIATION header, also make minor revisions to help messages to correct for suggested syntax and config file location 2013-05-14 17:17:10 -05:00
helix84
64e16567d6 Merge pull request #211 from helix84/DS-1544
DS-1544 display feedback.recipient on contacts page
2013-05-10 00:27:08 -07:00
Hardy Pottinger
bed56b14aa Merge pull request #114 from richardrodgers/readonlyctx
Adds support for read-only contexts that bypass internal DSO cache
2013-05-08 13:17:23 -07:00
Ivan Masár
e37872a2c3 DS-1544 display feedback.recipient on contacts page 2013-05-06 15:16:07 +02:00
helix84
4e3a4154a3 Merge pull request #103 from helix84/DS-1336
[DS-1336] Creative Commons Locale
2013-05-02 04:25:15 -07:00
Tim Donohue
5283b0f90d Merge pull request #209 from tdonohue/master
DS-1540 - Fix .gitignore to only ignore custom *.properties in root folder
2013-04-30 09:39:33 -07:00
Tim Donohue
129a85c1b5 DS-1540 : Fix .gitignore to only ignore custom *.properties in the root source folder. 2013-04-30 11:22:24 -05:00
Robin Taylor
8847d07421 Merge pull request #199 from tuub/ds-1469
Read config, email and license files UTF-8 encoded, fixes DS-1469 partly
2013-04-19 01:36:32 -07:00
robintaylor
219a02fbe2 DS-1527 Remove filtering of FORWARD and INCLUDE requests 2013-03-27 13:21:37 +00:00
lyncodev
f4558dd3a4 Now a new version of the xoai toolkit must be released 2013-03-06 15:29:49 +00:00
helix84
df795413c2 Merge pull request #201 from lyncode/DS-1507-4.x
DS-1507 Issue fixed and tested (4.x)
2013-03-06 06:36:06 -08:00
lyncodev
14a2fc58da Issue fixed and tested 2013-03-06 14:31:51 +00:00
Pascal-Nicolas Becker
c4c493c4cf Also read license files UTF-8 encoded.
Close Reader an InputStreams after using them.
2013-03-05 17:32:37 +01:00
mah-rob
802cce856f Forcing dspace.cfg and email files to be read in UTF-8 2013-03-05 17:31:35 +01:00
Sam Ottenhoff
b68042dac4 DS-1503 use getAttribute first before attempting to check getHeader for
the user value. ShibUseHeaders is not enabled by default in Apache.
2013-02-28 18:45:21 -05:00
Ivan Masár
9e24d11d10 authentication-ldap.cfg comment about slash in URL 2013-02-25 15:57:13 +01:00
Mark H. Wood
24f7e55177 Merge pull request #165 from helix84/DS-1085
[DS-1085] EPerson last_active field is defined but never filled

Tested, appears to work.  No negative reviews after several weeks.
2013-02-14 11:43:21 -08:00
Ivan Masár
9f2a67c0aa add 'test_database' target to ant command help 2013-02-13 13:09:58 +01:00
Ivan Masár
184e474d59 DS-1485 fix for the Mirage theme 2013-02-12 10:54:07 +01:00
helix84
bcf415c986 Merge pull request #187 from MinDogger/DS-1123
Resurrected build.xml's help menu item 'clean_backups'
2013-02-07 14:56:41 -08:00
Brian Freels-Stendel
e56ae53c27 Resurrected build.xml's help menu item 'clean_backups' 2013-02-07 12:07:15 -07:00
Mark H. Wood
34ce3d1ecd Update version from 11-year-old commons-cli 1.0 to latest 1.2 2013-02-06 15:21:30 -05:00
Mark H. Wood
7857c0184f Recreate OptionGroups each time they are used.
It's not obvious from the Commons CLI documentation, but an
OptionGroup stores command state, specifically which of its member
options was given.  This causes mysterious exceptions when you reuse
an OptionGroup.

I suspect that Option objects also contain command state, but haven't
run into trouble with that yet.
2013-02-06 15:09:10 -05:00
Mark H. Wood
c00bcffb99 Add missing license reference, handle blank lines 2013-02-06 15:06:59 -05:00
Mark H. Wood
dfafcf657f Don't call System.exit() in a launcher step; throw something instead.
At least don't use exit() for a normal completion.  That prevents
streaming multiple commands.
2013-02-06 12:45:33 -05:00
Mark H. Wood
3acfcaba2b Email addresses need at-symbol to be a word character when tokenizing 2013-02-06 12:44:04 -05:00
Mark H. Wood
aa419fa5df Context is not valid if there was no understandable verb 2013-02-05 16:09:47 -05:00
Mark H. Wood
163060c6d8 Add a launcher command 2013-02-04 17:05:57 -05:00
Mark H. Wood
0940898092 Test for Discovery/Lucene search 2013-02-04 16:51:37 -05:00
Ivan Masár
a9a6c15233 fix hardcoded db name in dspace-info.pl 2013-01-31 19:02:10 +01:00
Mark H. Wood
61b2ad8bc2 [DS-286] Remove unmaintained Bash script.
The AIP export/import tools may also be useful replacements for this.
2013-01-31 10:03:23 -05:00
Hardy Pottinger
461e5c5987 reverting 8e6217a, not necessary to increment the lang pack version 2013-01-30 11:30:46 -06:00
Hardy Pottinger
8e6217aab7 require lang packs version 3.0.2 2013-01-30 10:15:56 -06:00
KevinVdV
d1759671e6 Merge pull request #177 from KevinVdV/DS-1407
[DS-1407] Refactor SOLR Statistics to use OpenCSV
2013-01-30 00:28:12 -08:00
mushashu
dfd0172cf3 [DS-1417] Thumbnails in discovery search results do not point to the item 2013-01-30 01:34:02 +01:00
Mark H. Wood
7a535fc404 Fix .gitignore to not ignore maven.properties 2013-01-28 16:50:19 -05:00
helix84
0fd85092c6 Merge pull request #179 from KevinVdV/DS-1416
[DS-1416] NPE when removing roles from Collection workflow steps
2013-01-28 13:22:39 -08:00
helix84
db1ef2131f Merge pull request #178 from KevinVdV/DS-1449
[DS-1449] Fixing related items retrieval
2013-01-25 05:13:25 -08:00
KevinVdV
645141bff3 [DS-1416] NPE when removing roles from Collection workflow steps 2013-01-24 22:50:42 +01:00
KevinVdV
ecb14db96b [DS-1449] Fixing related items retrieval 2013-01-24 22:33:17 +01:00
KevinVdV
a1c28957fb [DS-1407] Refactor SOLR Statistics to use OpenCSV 2013-01-24 17:20:34 +01:00
KevinVdV
a5cec688ee [DS-1407] Refactor SOLR Statistics to use OpenCSV 2013-01-24 17:11:50 +01:00
helix84
f98212d1a7 Merge pull request #176 from bram-atmire/DS-1464
Adding a return statement when no reports are present
2013-01-24 05:02:29 -08:00
Bram Luyten
c655b5ec62 Adding a return statement when no reports are present 2013-01-24 13:26:32 +01:00
helix84
cc2d4597f2 Merge pull request #175 from tuub/master
Bugfix for DS-1459
2013-01-23 07:20:37 -08:00
Pascal-Nicolas Becker
974da7dc55 Bugfix: use printStackTrace to print a sack trace. 2013-01-23 16:03:29 +01:00
Ivan Masár
b0117cb67b DS-1459 Testing of dissemination crosswalks 2013-01-22 16:42:32 +01:00
João Melo
5b47e43aa1 Merge pull request #173 from misilot/DS-1457
DS-1457 In OAI src for jquery uses an http only
2013-01-22 05:47:57 -08:00
João Melo
604c845af0 Merge pull request #169 from helix84/DS-1455
DS-1455 In OAI DOCTYPE tag is displayed on Firefox
2013-01-22 05:46:23 -08:00
helix84
b4e97190da Merge pull request #168 from helix84/DS-1454
DS-1454 Missing type-bind in input-forms.dtd
2013-01-22 00:35:18 -08:00
Mark H. Wood
5c1f99d038 Add the Version class to report on DSpace's version, build environment, and runtime environment. 2013-01-18 19:48:07 -05:00
Hardy Pottinger
332a6d31ea Merge pull request #171 from akonczak/master
[DS-1435] fix for oracle db
2013-01-18 15:00:40 -08:00
misilot
81079c09bb DS-1457 change jquery source to googleapis
Change the source to ajax.googleapis.com, which allows either http or https source.

URL Syntax is from: https://developers.google.com/speed/libraries/devguide#jquery
2013-01-18 08:09:35 -05:00
akonczak
ce9ca80080 [DS-1435] fix for empty schema name for oracle db 2013-01-17 22:09:37 +00:00
Ivan Masár
ee4778bcf8 DS-1455 In OAI DOCTYPE tag is displayed on Firefox 2013-01-17 18:23:53 +01:00
Ivan Masár
34fc835885 DS-1454 Missing type-bind in input-forms.dtd 2013-01-17 14:10:57 +01:00
helix84
44cd50d2e2 Merge pull request #166 from lyncode/OAI-ORE-fix
ORE metadata format fix (4.0)
2013-01-16 01:16:11 -08:00
lyncodev
f5f71e85b9 ORE metadata format fix 2013-01-15 16:16:06 +00:00
Mark H. Wood
0d948ae708 [DS-1085] Apply patch (slightly updated) from Jira ticket 2013-01-11 18:05:09 +01:00
Mark H. Wood
7d16c10aa3 Inadvertently named the batch-input command 'run' rather than 'read' 2013-01-11 10:49:34 -05:00
Mark H. Wood
853d81d600 Make command reparsing work properly, and general cleanup 2013-01-11 10:15:32 -05:00
Mark H. Wood
318d696943 Used the wrong reference to test command and got an NPE 2013-01-11 10:10:53 -05:00
Mark H. Wood
6f43cfde0f Normalize some naming, implement --modify verb. 2013-01-10 13:58:06 -05:00
Mark H. Wood
5ed660a5f3 Factor that looong 'if' into one function per operation (add etc.) 2013-01-09 14:07:15 -05:00
Mark H. Wood
113f287e14 Give feedback when an EPerson is created or destroyed 2013-01-09 13:26:26 -05:00
Mark H. Wood
61f0a30bd7 Factor runManyCommands() out to a new class, so that 'read' can be an ordinary command 2013-01-09 12:20:14 -05:00
Mark H. Wood
6bd7a1d6af Add 'read' command to execute a file of commands. 2013-01-09 10:31:31 -05:00
Mark H. Wood
0bafa3a159 [DS-1083] Command line tool for manipulating EPersons 2013-01-07 14:50:44 -05:00
Ivan Masár
a0714564b7 warn about removing properties from build.properties 2012-12-20 13:58:20 +01:00
helix84
576316079b Merge pull request #156 from akonczak/master
DS-1425 - OAI - ORACLE DB
2012-12-17 11:31:03 -08:00
helix84
9dfdb000b0 Merge pull request #155 from tuub/master
Fixes DS-1424
2012-12-14 05:20:36 -08:00
KevinVdV
5f3ae013eb Merge pull request #158 from aschweer/browse-sort-options
DS-1427 Keep sort options in order
2012-12-13 22:05:08 -08:00
Andrea Schweer
f625cfed84 Merge pull request #157 from aschweer/solrlogger-improve-efficiency
DS-1426 SolrLogger performance
2012-12-13 19:43:01 -08:00
Andrea Schweer
9e08472fd5 DS-1427 Keep sort options in order 2012-12-14 12:04:02 +13:00
Andrea Schweer
7b2624c112 DS-1426 Improve SolrLogger performance
Apply the patch to the right file for master
Fix whitespace issues
2012-12-14 09:46:32 +13:00
akonczak
c2d4c50f9a DS-1425 - OAI improved support for Oracle DB 2012-12-13 18:05:35 +00:00
Pascal-Nicolas Becker
3a8ac91631 Declare method register(Context,DspaceObject, String) of
org.dspace.identifier.IdentifierProvider to throw an
IdentifierException. Fixes DS-1424.
2012-12-13 14:39:07 +01:00
Jason Sherman
4e2142d0d2 Update dspace-api/src/main/java/org/dspace/app/mediafilter/BrandedPreviewJPEGFilter.java
fixed a variable name typo.  it didn't hurt functionality, just consistency.
2012-12-07 12:45:19 -06:00
jsnshrmn
f7051593aa Merge pull request #1 from lyncodev/master
Authoring changes
2012-12-07 08:39:21 -08:00
Lyncode
deaa912605 Authoring 2012-12-07 16:17:55 +00:00
jsnshrmn
d05824caa9 Update dspace/config/dspace.cfg
Added blur and scaling options to enable better quality thumbnails and previews.
2012-12-07 08:52:11 -06:00
jsnshrmn
f10e327d84 Update dspace-api/src/main/java/org/dspace/app/mediafilter/JPEGFilter.java
Adds high quality scaling and blurring options for thumbnails.  Boolean options thumbnail.blurring and thumbnail.hqscaling need to be added to dspace.cfg for behavior to change.
2012-12-07 08:30:17 -06:00
jsnshrmn
dd8c7f02d2 Update dspace-api/src/main/java/org/dspace/app/mediafilter/BrandedPreviewJPEGFilter.java
Adds high quality scaling and blurring options for branded previews.  Boolean options webui.preview.blurring and webui.preview.hqscaling need to be added to dspace.cfg for behavior to change.
2012-12-07 08:23:46 -06:00
helix84
945b0283c9 Merge pull request #117 from zuki/submission
Porting document type-based submission to JSPUI
2012-12-07 01:48:24 -08:00
João Melo
8ed3829c62 Merge pull request #150 from lyncode/DS-1415
DS-1415: Harvesting configurations added [master]
2012-12-06 17:39:14 -08:00
Lyncode
529919a34d Harvesting configurations added 2012-12-06 17:38:50 +00:00
João Melo
9606767639 Merge pull request #147 from lyncode/xoai
DS-1414
2012-12-06 07:18:51 -08:00
lyncodev
d6dee1929c MetadataExistsFilter changed to allow then 'field' key parameter 2012-12-06 14:53:38 +00:00
lyncodev
c28a31000a xoai.xml file corrected for MetadataExistsFilter 2012-12-06 14:43:53 +00:00
Tomas Cohen Arazi
c1ba9369d6 DS-1336 - Introduce a property for defining CC locale
This patch introduces a new property into dspace.cfg: cc.license.locale
and uses it.

Sponsored-by: Universidad Nacional de Córdoba
2012-12-05 16:55:20 +01:00
Tomas Cohen Arazi
c6c532142d DS-1336 - Honour CC 1.5 API
There's no mention on the currently used by DSpace API (v1.5) (or the dev one) to the /classes call:

http://api.creativecommons.org/docs/readme_15.html#locale-xx
http://api.creativecommons.org/docs/readme_dev.html#locale-xx

Looks like they belong to some legacy support.

Sponsored-by: Universidad Nacional de Córdoba
2012-12-05 16:55:16 +01:00
Juan Corrales Correyero
3cdeaab2db [DS-1336] modify method call, too 2012-12-05 16:54:29 +01:00
Juan Corrales Correyero
ba003132bd [DS-1336] Creative Commons Locale 2012-12-05 16:54:29 +01:00
Mark H. Wood
5ab2ef106d Update DSpace module versions (and adjust a little whitespace) 2012-12-03 15:30:58 -05:00
Ivan Masár
3bfe6b471a typo fixes and comment changes in dspace.cfg 2012-12-03 09:38:35 +01:00
Ivan Masár
53d11015ff fix dspace.cfg comment 2012-12-03 09:36:09 +01:00
Hardy Pottinger
5221f92ce4 [maven-release-plugin] prepare for next development iteration 2012-11-30 11:12:42 -06:00
Hardy Pottinger
b05e67a50d [maven-release-plugin] prepare release dspace-3.0 2012-11-30 11:12:31 -06:00
Tim Donohue
fde129026f Adding 3.0 Release final PDF 2012-11-30 09:49:42 -06:00
Tim Donohue
f18b2e0721 Update dependencies in LICENSES_THIRD_PARTY for 3.0 release 2012-11-29 10:04:46 -06:00
Mark H. Wood
32cc6002d2 Merge pull request #125 from mwoodiupui/javadoc
Javadoc cleanup (get rid of scads of WARNINGs)
2012-11-28 12:48:10 -08:00
Robin Taylor
407507ce31 Merge pull request #146 from hardyoyo/DS-1379
DS-1379 revised 18-3 update SQL script with correct Oracle syntax
2012-11-28 12:23:50 -08:00
Mark H. Wood
b53314d62f Merge remote-tracking branch 'origin/master' into javadoc 2012-11-28 10:32:46 -05:00
KevinVdV
4e0587ca36 Merge pull request #144 from bram-atmire/DS-1397 2012-11-28 01:34:43 -08:00
Hardy Pottinger
86e7ad4971 DS-1379 revised 18-3 update SQL script with suggestions from Artur Konczak, reviewed and blessed by our Oracle DBA 2012-11-27 16:08:55 -06:00
helix84
465b979c2b Merge pull request #145 from hardyoyo/DS-1370
DS-1370 fixes SQL scripts/adds missing tables and sequences to cleanup
2012-11-27 10:12:31 -08:00
Hardy Pottinger
50f1f19d0c DS-1370 revise SQL scripts to deal with various Oracle issues, also add missing tables and sequences to clean-database.sql 2012-11-27 02:00:05 -06:00
Robin Taylor
1bb933b414 Merge pull request #139 from atmire/DS-1345
Ds 1345,DS-1346 Bugfix for the fact that all versions where searchable/browsable
2012-11-26 01:37:31 -08:00
Robin Taylor
d8a59006d7 Merge pull request #140 from atmire/DS-1284
[DS-1284] Facet name (research field subject) too long for discovery box
2012-11-23 14:14:50 -08:00
abollini
375305560b Merge pull request #130 from abollini/DS-944
DS-944 Authority Control Bug
tested on FF16, IE7, IE8, IE9, Chrome 23
2012-11-23 06:52:40 -08:00
Bram Luyten
bc106e0b87 Improving DRI error condition for composite fields 2012-11-23 09:35:52 +01:00
Ivan Masár
fc0e4996fa update comments in xmlui.xconf 2012-11-22 15:53:07 +01:00
helix84
3749a2ad64 Merge pull request #141 from atmire/DS-1395
[DS-1395] Hit highlighting not operational
2012-11-22 05:01:21 -08:00
Robin Taylor
4eaba3ffb2 Merge pull request #138 from atmire/DS-1333
[DS-1333] Versioning an Item causes some metadata values to be lost
2012-11-21 12:18:59 -08:00
helix84
ce99dfad3f Merge pull request #131 from atmire/DS-1363
[DS-1363] Unable to create new version when previous version was deleted in workspace
2012-11-21 12:11:13 -08:00
Robin Taylor
d00a325abc Merge pull request #143 from tdonohue/DS-972
Fix for DS-972 - get the "More Results" button to work for Authority Control in XMLUI
2012-11-21 11:47:47 -08:00
Tim Donohue
404a004840 Fix for DS-972. Had to avoid disabling button via DRI (for some reason jQuery can never re-enable it). Also cleaned up code in choice-support.js to ensure that "More Results" button works properly. I've tested this heavily with LC Author Authority & it seems to work well now. 2012-11-21 12:13:55 -06:00
helix84
f4b7304bbe Merge pull request #142 from robintaylor/DS-1373
DS-1373 Correct the string name for the ES Navigation view option
2012-11-21 07:39:12 -08:00
robintaylor
42875f2669 Correct the string name for the ES Navigation view option 2012-11-21 15:30:46 +00:00
KevinVdV
7eeb042a36 [DS-1395] Hit highlighting not operational 2012-11-21 11:40:46 +01:00
KevinVdV
195c96c552 [DS-1284] Facet name (research field subject) too long for discovery box 2012-11-21 11:16:31 +01:00
KevinVdV
6bdb98f5d7 [DS-1345, DS-1346] Item Level Versioning, all versions are searchable & recent submission list in collections shows all the versions (removed unused import) 2012-11-21 10:54:03 +01:00
KevinVdV
d9df145a4e [DS-1345, DS-1346] Item Level Versioning, all versions are searchable & recent submission list in collections shows all the versions 2012-11-21 10:51:39 +01:00
helix84
3d5668392b Merge pull request #133 from steveswinsburg/master
DS-1391 build should check for ant version 1.8.0+
2012-11-21 00:51:39 -08:00
Robin Taylor
a2a8dffd44 Merge pull request #132 from tdonohue/DS-1392
DS-1392 fix: Add a new "root.basedir" property to every POM.
2012-11-20 01:09:07 -08:00
helix84
560acce24f Merge pull request #137 from hardyoyo/DS-1174
DS-1174: added e.printStackTrace to exception handler in itemUpdate.java
2012-11-19 14:38:30 -08:00
helix84
75e6c76ccc Merge pull request #136 from hardyoyo/DS-1389
DS-1389- removing all lines that mention the admin URL
2012-11-19 14:36:26 -08:00
Hardy Pottinger
a300ea755c DS-1174: added e.printStackTrace to exception handling in itemUpdate.java 2012-11-19 14:33:52 -06:00
Hardy Pottinger
e38ebadbcc DS-1389- removing all lines that mention the admin URL, as per suggestion by Andrea Schweer 2012-11-19 14:22:39 -06:00
Tim Donohue
a3ddb78925 Merge pull request #134 from tdonohue/master
Fix DS-1341 and DS-1388 (disable Versioning & Elastic Search aspects)
2012-11-19 11:14:37 -08:00
Tim Donohue
06863c787d Fix DS-1341 and DS-1388 (disable Versioning & Elastic Search aspects). Also cleanup formatting of the "xmlui.xconf" file in general, adding some extra explanatory comments, etc. 2012-11-19 13:11:06 -06:00
Steve Swinsburg
1d82f59465 DS-1391 build should require ant version 1.8.0 or greater 2012-11-19 12:14:00 +11:00
Tim Donohue
e98a1fdea6 Add a new "root.basedir" property to every POM. This property always specifies the relative path to the root [dspace-src] directory. It is used to reference the path to the LICENSE_HEADER & build.properties file from each submodule. 2012-11-16 15:59:49 -06:00
KevinVdV
9961c0a990 [DS-1363] Unable to create new version when previous version was deleted in workspace 2012-11-16 13:59:57 +01:00
Tim Donohue
6e6e26b442 Merge pull request #126 from robintaylor/DS-1365
DS 1365 - Reinstate runtime filtering of dspace.dir to allow developers to specify dspace.dir during build
2012-11-15 08:33:59 -08:00
Andrea Bollini
48d694fbad DS-944 Authority Control Bug 2012-11-14 23:05:32 +01:00
Andrea Bollini
b696147515 DS-1378 fix lookup authority feature in edit-item 2012-11-14 22:56:49 +01:00
Andrea Bollini
cf7157034c DS-1381 Javascript errors in all pages 2012-11-14 22:46:14 +01:00
Robin Taylor
c871e7123c Merge pull request #127 from atmire/DS-1291
[DS-1291] Statistics no longer working.
2012-11-13 02:08:26 -08:00
João Melo
d70faeb6d3 Merge pull request #128 from sedici/DS-1372
DS-1372: Change OAI2.0 DSpaceMetadataExistsFilter to check for one or more fields
2012-11-10 07:02:21 -08:00
Andrea Bollini
b49027bbe1 DS-1297 renamed the LuceneSearchProcessor 2012-11-10 11:47:06 +01:00
KevinVdV
acca49e228 Merge pull request #129 from lyncode/dspace-xoai
[DS-1380] XOAI: DSpaceAtLeastOneMetadataFilter with operator STARTS_WITH always fails
2012-11-10 01:11:48 -08:00
Lyncode
c1a34a3929 DS-1380 2012-11-10 02:56:27 +00:00
Ariel
eb9d43fa3c Merge pull request #1 from lyncodev/DS-1372
Just meta changes, contributors list changed.
2012-11-09 08:08:40 -08:00
Lyncode
1b270b1121 Just meta changes, contributors list changed. 2012-11-09 14:19:17 +00:00
Ariel J. Lira
f75f901cde DS-1372: Change OAI2.0 DSpaceMetadataExistsFilter to check for one or
more fields

Change to org.dspace.xoai.filter.DSpaceMetadataExistsFilter to accept
multiple fields, where at least one is required to accept an item.
2012-11-08 21:21:46 -03:00
KevinVdV
77393e42e2 [DS-1291] Statistics no longer working. 2012-11-08 14:48:17 +01:00
robintaylor
cbf7cab08f Fix so that the testing framework also uses the new property dspace.install.dir 2012-11-08 09:26:56 +00:00
robintaylor
00448864ef Rename the property default.dspace.dir to dspace.install.dir 2012-11-07 09:42:28 +00:00
helix84
459d0d1068 Merge pull request #122 from helix84/DS-1364
DS-1364 checker-emailer ignores advanced mail configuration
2012-11-06 05:44:38 -08:00
robintaylor
2e39070bd9 Reinstate the variable default.dspace.dir to allow filtering of dspace.dir in dspace.cfg at runtime 2012-11-06 10:57:53 +00:00
Mark H. Wood
6a195231fb Revert a little more reindentation 2012-11-05 16:07:41 -05:00
Mark H. Wood
5c78c2ef15 Delete leftover debugging output 2012-11-05 15:32:42 -05:00
Mark H. Wood
96a577dbfd Undo overzealous reindentation.
I went overboard while trying to make things more readable.  That can
wait for another time.  Some minor rewrapping, punctuation, etc. of
comments stands.
2012-11-05 15:26:24 -05:00
Mark H. Wood
96b39c81af Clean up doc comments in SWORD, XOAI, and one more in XMLUI 2012-11-05 11:47:54 -05:00
Mark H. Wood
80fd26f8bc Clean up doc comments in JSPUI, XMLUI 2012-11-02 16:58:08 -04:00
Mark H. Wood
255288a367 Clean up dspace-api doc comment warnings 2012-11-02 16:08:00 -04:00
Hardy Pottinger
5f30ed24d0 [maven-release-plugin] prepare for next development iteration 2012-11-02 10:33:27 -05:00
Ariel J. Lira
3aa695cadc DS-1364 checker-emailer ignores advanced mail configuration 2012-11-01 14:45:54 +01:00
Keiji Suzuki
07c756c7b4 Porting document type-based submission to JSPUI 2012-10-30 15:09:59 +09:00
Richard Rodgers
4a42776bc8 Adds support for read-only contexts that bypass internal DSO cache 2012-10-25 14:59:15 -04:00
KevinVdV
bf492d1dca [DS-1333] Versioning an Item causes some metadata values to be lost 2012-10-23 17:56:30 +02:00
Mark Diggory
213a1dd1ae [maven-release-plugin] prepare for next development iteration 2012-07-06 17:52:24 -07:00
Mark Diggory
dfb1180629 [maven-release-plugin] prepare release dspace-solr-parent-3.5.0.1 2012-07-06 17:52:17 -07:00
Mark Diggory
fad288fb66 Must use snapshot to properly release. Last time... 2012-07-06 17:51:29 -07:00
Mark Diggory
9179df8de5 Must use snapshot to properly release. 2012-07-06 17:50:21 -07:00
Mark Diggory
841800efa9 Must use snapshot to properly release. 2012-07-06 17:49:34 -07:00
Mark Diggory
94a3d01fc3 Merge pull request #2 from atmire/dspace-solr-parent-3.5.0.1
[DS-1181] Upgrade to solr 3.5.0 (Fixing SOLR-1709)
2012-07-06 17:38:46 -07:00
KevinVdV
1b3d4761fb [DS-1181] Upgrade to solr 3.5.0 (Fixing SOLR-1709) 2012-07-03 14:17:10 +02:00
Mark Diggory
e708c6ffaa [maven-release-plugin] prepare for next development iteration 2012-06-07 22:44:09 -07:00
Mark Diggory
206d25916c [maven-release-plugin] prepare release dspace-solr-parent-3.5.0.0 2012-06-07 22:44:02 -07:00
Mark Diggory
78e1f7939b Adjust SCM locations yet again 2012-06-07 22:43:18 -07:00
Mark Diggory
912a5ca26c [maven-release-plugin] rollback the release of dspace-solr-parent-3.5.0.0 2012-06-07 22:42:29 -07:00
Mark Diggory
135baf4da1 [maven-release-plugin] prepare release dspace-solr-parent-3.5.0.0 2012-06-07 22:39:36 -07:00
Mark Diggory
749d332a4b Reset Release Again 2012-06-07 22:31:21 -07:00
Mark Diggory
926366f846 [maven-release-plugin] rollback the release of dspace-solr-parent-3.5.0.0 2012-06-07 22:29:16 -07:00
Mark Diggory
fc23bfdb5c was using old information 2012-06-07 22:26:50 -07:00
Mark Diggory
6ba94d0bea Trying again 2012-06-07 22:23:59 -07:00
Mark Diggory
5d8f8161a1 [maven-release-plugin] rollback the release of dspace-solr-parent-3.5.0.0 2012-06-07 22:22:33 -07:00
Mark Diggory
563b544c20 fix incorrect URL 2012-06-07 22:20:48 -07:00
Mark Diggory
509874c745 [maven-release-plugin] rollback the release of dspace-solr-parent-3.5.0.0 2012-06-07 22:20:09 -07:00
Mark Diggory
dcce7c8cc5 [maven-release-plugin] prepare release dspace-solr-parent-3.5.0.0 2012-06-07 22:19:16 -07:00
Mark Diggory
2d50acf127 [maven-release-plugin] prepare release dspace-solr-parent-3.5.0.0 2012-06-07 22:14:02 -07:00
Mark Diggory
33e4ae3f04 further pom adjustments 2012-06-07 22:11:42 -07:00
Mark Diggory
4d36b53921 adjust version number for snapshot testing. 2012-06-07 22:10:00 -07:00
Mark Diggory
d19ff8f44e Correcting SCM location for Release 2012-06-07 22:06:33 -07:00
Mark Diggory
1bda3546a0 Merge pull request #1 from atmire/dspace-solr-parent-3.5.0.0
[DS-1181] Upgrade to solr 3.5.0
2012-06-07 17:23:07 -07:00
KevinVdV
51566e71a2 [DS-1181] Upgrade to solr 3.5.0 2012-05-30 09:33:24 +02:00
Tim Donohue
9deabbcbc8 [maven-release-plugin] prepare for next development iteration 2011-08-12 17:11:09 +00:00
Tim Donohue
1c499ce8c7 [maven-release-plugin] prepare release dspace-solr-parent-3.3.0.0 2011-08-12 17:11:01 +00:00
Tim Donohue
98cc9bf3e6 [DS-980] Update 'dspace-solr' Trunk to Solr 3.3.0. Also update it to be a WAR Overlay of the default 'solr' WAR in Maven Central (so that it no longer needs a copy of all of the Solr webapp's source code). 2011-08-11 18:27:44 +00:00
Mark Diggory
bf8f8c5ef1 [maven-release-plugin] prepare for next development iteration 2011-03-25 00:43:28 +00:00
Mark Diggory
2cadcd9050 [maven-release-plugin] prepare release dspace-solr-parent-1.4.1.1 2011-03-25 00:43:22 +00:00
Mark Diggory
6aa08af420 [maven-release-plugin] rollback the release of dspace-solr-parent-1.4.1.1 2011-03-25 00:40:04 +00:00
Mark Diggory
ee23f38357 [maven-release-plugin] prepare release dspace-solr-parent-1.4.1.1 2011-03-25 00:38:52 +00:00
Mark Diggory
adc22e7019 [maven-release-plugin] rollback the release of dspace-solr-parent-1.4.1.1 2011-03-25 00:30:34 +00:00
Mark Diggory
58df9bcaa0 [maven-release-plugin] prepare for next development iteration 2011-03-25 00:29:33 +00:00
Mark Diggory
f8c1eefd09 [maven-release-plugin] prepare release dspace-solr-parent-1.4.1.1 2011-03-25 00:29:27 +00:00
Mark Diggory
6be28bed02 Correct Sonatype Deployment Location 2011-03-25 00:28:28 +00:00
Mark Diggory
337197794f [maven-release-plugin] rollback the release of dspace-solr-parent-1.4.1.1 2011-03-25 00:25:50 +00:00
Mark Diggory
b493c2a13c [maven-release-plugin] prepare for next development iteration 2011-03-25 00:21:47 +00:00
Mark Diggory
f3d4adc9ed [maven-release-plugin] prepare release dspace-solr-parent-1.4.1.1 2011-03-25 00:21:42 +00:00
Mark Diggory
9f4eb0e4ad Suppress relicensing Apache works 2011-03-25 00:20:46 +00:00
Mark Diggory
5f24630d9b Improvements to build and release for dspace-solr 2011-03-25 00:16:24 +00:00
Mark Diggory
bc8090cad5 Correct Ordering of Servlet Filters. 2011-03-16 22:07:37 +00:00
Ben Bosman
ca73e39a4e Renamed package and artifact name 2010-10-21 15:20:03 +00:00
Ben Bosman
0a2da1235a correction 2010-10-21 15:00:22 +00:00
Ben Bosman
664326eafb correction 2010-10-21 14:55:46 +00:00
Ben Bosman
ad6aa02e9b 2010-10-21 14:53:45 +00:00
Ben Bosman
6db29f04da Inclusion of LocalHostRestrictionFilter 2010-10-21 14:36:11 +00:00
Ben Bosman
6fed1ac82a Clean solr webapps commit 2010-10-21 14:33:37 +00:00
Ben Bosman
374721c891 Remove external 2010-10-21 14:31:37 +00:00
Mark Diggory
42372e24f6 [maven-release-plugin] prepare for next development iteration 2010-10-18 19:55:55 +00:00
Mark Diggory
376772f355 [maven-release-plugin] copy for tag dspace-solr-parent-1.4.1.0 2010-10-18 19:55:53 +00:00
Mark Diggory
59401322a0 [maven-release-plugin] prepare release dspace-solr-parent-1.4.1.0 2010-10-18 19:53:03 +00:00
Mark Diggory
23b159b21e [DSCR-13] Release DSpace Solr 1.4.1 webapplication overlay for discovery and statistics. 2010-10-18 19:51:11 +00:00
Mark Diggory
cdad467cf3 [maven-release-plugin] prepare for next development iteration 2010-06-16 17:32:14 +00:00
Mark Diggory
8573646810 [maven-release-plugin] copy for tag dspace-solr-parent-1.4.0.1 2010-06-16 17:32:10 +00:00
Mark Diggory
2fb65485ab [maven-release-plugin] prepare release dspace-solr-parent-1.4.0.1 2010-06-16 17:32:05 +00:00
Mark Diggory
d15ce96aa7 Tuning Up build process for dspace-solr, uses separate directories now for applying patches. 2010-02-25 13:18:46 +00:00
Mark Diggory
50468a1af7 Drop old code from trunk 2010-02-12 19:18:49 +00:00
Mark Diggory
718c28e0ba Upgrade SLF4J to 1.5.6 2010-02-12 19:18:13 +00:00
Mark Diggory
09c9c0335c release management 2009-11-30 22:27:46 +00:00
Mark Diggory
20a0486d17 release management 2009-11-30 22:27:05 +00:00
Mark Diggory
acd7076bfe Solr 1.4.0 release build process: Add Test dir 2009-11-30 21:19:32 +00:00
Mark Diggory
e02e0e8136 Solr 1.4.0 release build process: Process SCM locations 2009-11-30 20:53:54 +00:00
Mark Diggory
49f79d3a43 Solr 1.4.0 release build process: Process SCM locations 2009-11-30 20:48:57 +00:00
Mark Diggory
7bb5c88898 Solr 1.4.0 release build process: Add SVN externals 2009-11-30 20:28:42 +00:00
Mark Diggory
3734ded0fe Solr 1.4.0 release build process. 2009-11-30 20:13:59 +00:00
Mark Diggory
01a28b3198 Make room for new solr 1.4.0 build process. 2009-11-30 19:45:57 +00:00
Mark Diggory
a8b2f1dc26 Begin porting to Solr 1.4.0. 2009-11-19 09:32:45 +00:00
Mark Diggory
c54ea6f3a6 Begin porting to Solr 1.4.0. 2009-11-19 09:30:56 +00:00
Mark Diggory
8228d5ccff [maven-release-plugin] prepare for next development iteration 2009-11-18 01:09:15 +00:00
Mark Diggory
bda403706e [maven-release-plugin] prepare release dspace-solr-1.3.0.2 2009-11-18 01:09:07 +00:00
Mark Diggory
0adb89cc1f Use latest release plugin. 2009-11-18 01:07:57 +00:00
Mark Diggory
2dac260bd8 [maven-release-plugin] rollback the release of dspace-solr-1.3.0.2 2009-11-18 01:05:12 +00:00
Mark Diggory
6814266e65 [maven-release-plugin] prepare release dspace-solr-1.3.0.2 2009-11-18 01:01:39 +00:00
Mark Diggory
956304c1bb Change numbering scheme, focus on solr version primarily 2009-11-18 01:01:05 +00:00
Mark Diggory
6d4f4834be [maven-release-plugin] rollback the release of dspace-solr-1.3.0.1 2009-11-18 00:59:08 +00:00
Mark Diggory
83ab6f5f7f [maven-release-plugin] prepare release dspace-solr-1.3.0.1 2009-11-18 00:56:05 +00:00
Mark Diggory
7659edd3b7 [maven-release-plugin] rollback the release of dspace-solr-1.3.0.1 2009-11-18 00:54:27 +00:00
Mark Diggory
4aaf026783 [maven-release-plugin] prepare release dspace-solr-1.3.0.1 2009-11-18 00:53:42 +00:00
Mark Diggory
f238037bd1 Format License Text 2009-11-18 00:53:04 +00:00
Mark Diggory
0da56ecbbd Add return statement to stop further processinf of filter. 2009-11-18 00:46:31 +00:00
Mark Diggory
36cff3417c [DS-247] License Cleanup in solrstatistics. 2009-10-06 19:49:24 +00:00
Mark Diggory
77f3494409 [DS-247] License Cleanup in solrstatistics. 2009-10-06 19:49:10 +00:00
Mark Diggory
0cd02aeaa6 [DS-247] License Cleanup in solrstatistics. 2009-10-06 19:48:36 +00:00
Mark Diggory
be93878df3 [maven-release-plugin] prepare for next development iteration 2009-10-05 21:41:11 +00:00
Mark Diggory
dd858eac35 [maven-release-plugin] prepare release dspace-solr-2.0.0-alpha 2009-10-05 21:41:05 +00:00
Mark Diggory
bcf0df5177 [DS-247] Cleanup Solr base webapp, simplify deployment. 2009-10-05 21:35:18 +00:00
Mark Diggory
748ad79bc0 DS-247 DS-243 Improved Solr Installation process. Retain dspace.dir parameterization. 2009-09-12 00:04:59 +00:00
Mark Diggory
b15cb71253 DS-247 DS-243 Improved Solr Installation process. 2009-09-12 00:02:15 +00:00
Mark Diggory
3eb8f4c783 [DS-247] [DS-243] [DSB-37] Correct Errors in Solr directory initialization. 2009-07-25 20:51:44 +00:00
Mark Diggory
9047b21f18 prematurely commit. 2009-07-07 22:54:20 +00:00
Mark Diggory
0c47cc5e8c [#DS-247] Contribution of @MIRE Solr Based Statistics Engine to DSpace. Restriction Filter to stop non-localhost access to Solr (can be disabled in web.xml). 2009-07-07 22:44:57 +00:00
Mark Diggory
25a3dcea6c [#DS-247] Contribution of @MIRE Solr Based Statistics Engine to DSpace : clean up project details. 2009-07-07 20:47:05 +00:00
Mark Diggory
2f988ac8b6 DSpace Solr: retain statistics specific configuration in statistics core 2009-07-07 06:53:58 +00:00
Mark Diggory
707c67f270 DSpace Solr: Initialize as multicore so as to support both general search and statistics in separate lucene instances. 2009-07-07 03:23:40 +00:00
Mark Diggory
795d0e8666 Drop JSON Query result example in to solr homepage. 2009-07-03 17:28:42 +00:00
Mark Diggory
5127ecd90d [maven-release-plugin] prepare for next development iteration 2009-07-02 18:52:47 +00:00
Mark Diggory
9eacd2cf55 [maven-release-plugin] prepare release dspace-solr-1.0 2009-07-02 18:52:42 +00:00
Mark Diggory
842e95918f Test 2009-07-02 04:29:49 +00:00
Mark Diggory
d98b9d666f DSpace Solr: Correct SVN locations to do release of 1.0 2009-07-02 04:07:38 +00:00
Mark Diggory
b71fce0ba7 DSpace Solr: correct locations of home page and icon 2009-07-02 03:50:08 +00:00
Mark Diggory
f749ba90ee DSpace Solr: correct locations of home page and icon 2009-07-02 03:49:47 +00:00
Mark Diggory
9fe9cd8a52 svn:ignore 2009-07-02 03:45:47 +00:00
Mark Diggory
0031325b8b Sharing project "dspace-solr" into "https://scm.dspace.org/svn/repo/modules" 2009-07-02 03:44:12 +00:00
Mark Diggory
b0be4c2d45 Sharing project "dspace-solr" into "https://scm.dspace.org/svn/repo/modules" 2009-07-02 03:30:23 +00:00
Mark Diggory
2f4f434798 Sharing project "dspace-solr" into "https://scm.dspace.org/svn/repo/modules" 2009-07-02 03:28:55 +00:00
3584 changed files with 268221 additions and 367426 deletions

25
.gitignore vendored
View File

@@ -1,16 +1,22 @@
## Ignore the MVN compiled output directories from version tracking
target/
## Ignore tags index files created by Exuberant Ctags
tags
## Ignore project files created by Eclipse
.settings/
/bin/
.project
.classpath
.checkstyle
## Ignore project files created by IntelliJ IDEA
*.iml
*.ipr
*.iws
.idea/
overlays/
## Ignore project files created by NetBeans
nbproject/private/
@@ -20,8 +26,19 @@ dist/
nbdist/
nbactions.xml
nb-configuration.xml
META-INF/
## Ignore all *.properties file, EXCEPT build.properties (the default)
*.properties
!build.properties
## Ignore all *.properties file in root folder, EXCEPT build.properties (the default)
## KEPT FOR BACKWARDS COMPATIBILITY WITH 5.x (build.properties is now replaced with local.cfg)
/*.properties
!/build.properties
# Ignore a local.cfg file in root folder, if it exists
/local.cfg
# Also ignore it under dspace/config
/dspace/config/local.cfg
##Mac noise
.DS_Store
##Ignore JRebel project configuration
rebel.xml

44
.travis.yml Normal file
View File

@@ -0,0 +1,44 @@
language: java
sudo: false
env:
# Give Maven 1GB of memory to work with
- MAVEN_OPTS=-Xmx1024M
jdk:
# DS-3384 Oracle JDK 8 has DocLint enabled by default.
# Let's use this to catch any newly introduced DocLint issues.
- oraclejdk8
## 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
## https://github.com/travis-ci/travis-ci/issues/3259#issuecomment-130860338
#addons:
# apt:
# 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
# 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
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"

View File

@@ -1,7 +1,7 @@
DSpace source code license:
Copyright (c) 2002-2012, DuraSpace. All rights reserved.
Copyright (c) 2002-2016, DuraSpace. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

View File

@@ -1,112 +1,424 @@
DSpace uses third-party libraries which may be distributed under different
licenses. We have attempted to list all of these third party libraries and
their licenses below (however the most up-to-date information can be found
via Maven, see NOTE #2 at bottom of this page).
licenses. We have listed all of these third party libraries and their licenses
below. This file can be regenerated at any time by simply running:
mvn clean verify -Dthird.party.licenses=true
You must agree to the terms of these licenses, in addition to the DSpace
source code license, in order to use this software.
--------------------------------------------------
Third party Java libraries listed by License type
[Format: Name (Maven Project) - URL]
--------------------------------------------------
---------------------------------------------------
Third party Java libraries listed by License type.
Apache Software License, Version 2.0 (http://opensource.org/licenses/apache2.0)
* Ant-Contrib Tasks (ant-contrib:*) - http://ant-contrib.sourceforge.net/
* Apache Abdera (org.apache.abdera::*) - http://projects.apache.org/projects/abdera.html
* Apache Ant (org.apache.ant:*) - http://ant.apache.org/
* Apache Axis (axis:*) - http://axis.apache.org/axis/
* Apache Cocoon (org.apache.cocoon:*) - http://cocoon.apache.org/2.2/license.html
* Apache Commons CLI (commons-cli:*) - http://commons.apache.org/cli/license.html
* Apache Commons Codec (commons-codec:*) - http://commons.apache.org/codec/license.html
* Apache Commons Collections (commons-collections:*) - http://commons.apache.org/collections/license.html
* Apache Commons DBCP (commons-dbcp:*) - http://commons.apache.org/dbcp/license.html
* Apache Commons Discovery (commons-discovery:*) - http://commons.apache.org/discovery/license.html
* Apache Commons FileUpload (commons-fileupload:*) - http://commons.apache.org/fileupload/license.html
* Apache Commons HTTP Client (commons-httpclient:*) - http://commons.apache.org/httpclient/license.html
* Apache Commons IO (commons-io:*) - http://commons.apache.org/io/license.html
* Apache Commons JXPath (commons-jxpath:*) - http://commons.apache.org/jxpath/license.html
* Apache Commons Lang (commons-lang:*) - http://commons.apache.org/lang/license.html
* Apache Commons Logging (commons-logging:*) - http://commons.apache.org/logging/license.html
* Apache Commons Pool (commons-pool:*) - http://commons.apache.org/pool/license.html
* Apache Commons Validator (commons-validator:*) - http://commons.apache.org/validator/license.html
* Apache Jakarta ORO (oro:*) - http://svn.apache.org/repos/asf/jakarta/oro/trunk/LICENSE
* Apache log4j (log4j:*) : http://logging.apache.org/log4j/
* Apache Lucene (org.apache.lucene:*) - http://lucene.apache.org/
* Apache PDFBox (org.apache.pdfbox:*) - http://pdfbox.apache.org/
* Apache POI (org.apache.poi:*) - http://poi.apache.org/
* Apache Solr (org.apache.solr:*) - http://lucene.apache.org/solr/
* Apache Xerces (xerces:*) - http://xerces.apache.org/
* Apache XML Commons (xml-apis:*) - http://xerces.apache.org/xml-commons/licenses.html
* Apache XML Project (xalan:*) - http://xml.apache.org/xalan-j/#license
* Databene ContiPerf (org.databene:contiperf) - http://databene.org/contiperf
* Rome (net.java.dev.rome:*, org.rometools:*, rome:*) - http://rometools.org/
* Spring Framework (org.springframework:*) - http://www.springsource.org/spring-framework
* SWORD Libraries (org.swordapp:*) - http://mvnrepository.com/artifact/org.swordapp/server/2.0
PLEASE NOTE: Some dependencies may be listed under multiple licenses if they
are dual-licensed. This is especially true of anything listed as
"GNU General Public Library" below, as DSpace actually does NOT allow for any
dependencies that are solely released under GPL terms. For more info see:
https://wiki.duraspace.org/display/DSPACE/Code+Contribution+Guidelines
---------------------------------------------------
BSD License (http://www.opensource.org/licenses/BSD-3-Clause)
* DNSJava (org.dspace.dnsjava:dnsjava)- http://www.xbill.org/dnsjava/dnsjava-current/README
* Foresite Toolkit (com.googlecode.foresite-toolkit:*) - http://code.google.com/p/foresite-toolkit/
* Jaxen (jaxen:*) - http://jaxen.codehaus.org/license.html
* YUI (com.yahoo.platform.yui:*) - http://yuilibrary.com/license/
Apache Software License, Version 2.0:
Common Development and Distribution License (CDDL) v1.0 (http://www.opensource.org/licenses/CDDL-1.0)
* JavaBeans Activation Framework (javax.activation:*) - http://www.opensource.org/licenses/CDDL-1.0
* Java Mail (javax.mail:*) - http://www.opensource.org/licenses/CDDL-1.0
* JAX-RPC (javax.xml:jaxrpc-api) - http://java.net/projects/jax-rpc/
* Ant-Contrib Tasks (ant-contrib:ant-contrib:1.0b3 - http://ant-contrib.sourceforge.net)
* Code Generation Library (cglib:cglib:2.2.2 - http://cglib.sourceforge.net/)
* AWS SDK for Java - Core (com.amazonaws:aws-java-sdk-core:1.10.50 - https://aws.amazon.com/sdkforjava)
* AWS Java SDK for AWS KMS (com.amazonaws:aws-java-sdk-kms:1.10.50 - https://aws.amazon.com/sdkforjava)
* AWS Java SDK for Amazon S3 (com.amazonaws:aws-java-sdk-s3:1.10.50 - https://aws.amazon.com/sdkforjava)
* HPPC Collections (com.carrotsearch:hppc:0.5.2 - http://labs.carrotsearch.com/hppc.html/hppc)
* metadata-extractor (com.drewnoakes:metadata-extractor:2.6.2 - http://code.google.com/p/metadata-extractor/)
* Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.5.4 - http://github.com/FasterXML/jackson)
* Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.7.0 - http://github.com/FasterXML/jackson)
* Jackson-core (com.fasterxml.jackson.core:jackson-core:2.5.4 - https://github.com/FasterXML/jackson)
* Jackson-core (com.fasterxml.jackson.core:jackson-core:2.7.0 - https://github.com/FasterXML/jackson-core)
* jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.5.4 - http://github.com/FasterXML/jackson)
* jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.7.0 - http://github.com/FasterXML/jackson)
* Jackson-JAXRS-base (com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.5.4 - http://wiki.fasterxml.com/JacksonHome/jackson-jaxrs-base)
* Jackson-JAXRS-JSON (com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.5.4 - http://wiki.fasterxml.com/JacksonHome/jackson-jaxrs-json-provider)
* Jackson-module-JAXB-annotations (com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.5.4 - http://wiki.fasterxml.com/JacksonJAXBAnnotations)
* Google APIs Client Library for Java (com.google.api-client:google-api-client:1.21.0 - https://github.com/google/google-api-java-client/google-api-client)
* Google Analytics API v3-rev123-1.21.0 (com.google.apis:google-api-services-analytics:v3-rev123-1.21.0 - http://nexus.sonatype.org/oss-repository-hosting.html/google-api-services-analytics)
* FindBugs-jsr305 (com.google.code.findbugs:jsr305:3.0.1 - http://findbugs.sourceforge.net/)
* Gson (com.google.code.gson:gson:2.6.1 - https://github.com/google/gson/gson)
* Guava: Google Core Libraries for Java (com.google.guava:guava:14.0.1 - http://code.google.com/p/guava-libraries/guava)
* Guava: Google Core Libraries for Java (com.google.guava:guava:19.0 - https://github.com/google/guava/guava)
* Guava: Google Core Libraries for Java (JDK5 Backport) (com.google.guava:guava-jdk5:17.0 - http://code.google.com/p/guava-libraries/guava-jdk5)
* Google HTTP Client Library for Java (com.google.http-client:google-http-client:1.21.0 - https://github.com/google/google-http-java-client/google-http-client)
* Jackson 2 extensions to the Google HTTP Client Library for Java. (com.google.http-client:google-http-client-jackson2:1.21.0 - https://github.com/google/google-http-java-client/google-http-client-jackson2)
* Google OAuth Client Library for Java (com.google.oauth-client:google-oauth-client:1.21.0 - https://github.com/google/google-oauth-java-client/google-oauth-client)
* ConcurrentLinkedHashMap (com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.2 - http://code.google.com/p/concurrentlinkedhashmap)
* ISO Parser (com.googlecode.mp4parser:isoparser:1.0-RC-1 - http://code.google.com/p/mp4parser/)
* builder-commons (com.lyncode:builder-commons:1.0.2 - http://nexus.sonatype.org/oss-repository-hosting.html/builder-commons)
* Jtwig Core (com.lyncode:jtwig-core:2.0.1 - http://www.lyncode.com/jtwig-core)
* Jtwig Core Functions (com.lyncode:jtwig-functions:2.0.1 - http://www.lyncode.com/jtwig-functions)
* Jtwig Spring (com.lyncode:jtwig-spring:2.0.1 - http://www.lyncode.com/jtwig-spring)
* Test Support (com.lyncode:test-support:1.0.3 - http://nexus.sonatype.org/oss-repository-hosting.html/test-support)
* Spatial4J (com.spatial4j:spatial4j:0.4.1 - https://github.com/spatial4j/spatial4j)
* Apache Commons BeanUtils (commons-beanutils:commons-beanutils:1.9.2 - http://commons.apache.org/proper/commons-beanutils/)
* Apache Commons CLI (commons-cli:commons-cli:1.3.1 - http://commons.apache.org/proper/commons-cli/)
* Apache Commons Codec (commons-codec:commons-codec:1.10 - http://commons.apache.org/proper/commons-codec/)
* Apache Commons Collections (commons-collections:commons-collections:3.2.2 - http://commons.apache.org/collections/)
* Apache Commons Configuration (commons-configuration:commons-configuration:1.10 - http://commons.apache.org/configuration/)
* Commons Digester (commons-digester:commons-digester:1.8.1 - http://commons.apache.org/digester/)
* Apache Commons FileUpload (commons-fileupload:commons-fileupload:1.3.1 - http://commons.apache.org/proper/commons-fileupload/)
* HttpClient (commons-httpclient:commons-httpclient:3.1 - http://jakarta.apache.org/httpcomponents/httpclient-3.x/)
* Commons IO (commons-io:commons-io:2.4 - http://commons.apache.org/io/)
* commons-jexl (commons-jexl:commons-jexl:1.0 - no url defined)
* Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
* Commons Lang (commons-lang:commons-lang:2.6 - http://commons.apache.org/lang/)
* Apache Commons Logging (commons-logging:commons-logging:1.2 - http://commons.apache.org/proper/commons-logging/)
* Apache Commons Validator (commons-validator:commons-validator:1.5.0 - http://commons.apache.org/proper/commons-validator/)
* Boilerpipe -- Boilerplate Removal and Fulltext Extraction from HTML pages (de.l3s.boilerpipe:boilerpipe:1.1.0 - http://code.google.com/p/boilerpipe/)
* The Netty Project (io.netty:netty:3.7.0.Final - http://netty.io/)
* jakarta-regexp (jakarta-regexp:jakarta-regexp:1.4 - no url defined)
* javax.inject (javax.inject:javax.inject:1 - http://code.google.com/p/atinject/)
* Bean Validation API (javax.validation:validation-api:1.1.0.Final - http://beanvalidation.org)
* jdbm (jdbm:jdbm:1.0 - no url defined)
* Joda time (joda-time:joda-time:2.2 - http://joda-time.sourceforge.net)
* Joda-Time (joda-time:joda-time:2.9.2 - http://www.joda.org/joda-time/)
* Apache Log4j (log4j:log4j:1.2.17 - http://logging.apache.org/log4j/1.2/)
* "Java Concurrency in Practice" book annotations (net.jcip:jcip-annotations:1.0 - http://jcip.net/)
* Ehcache Core (net.sf.ehcache:ehcache-core:2.4.3 - http://ehcache.org)
* opencsv (net.sf.opencsv:opencsv:2.3 - http://opencsv.sf.net)
* Abdera Client (org.apache.abdera:abdera-client:1.1.3 - http://abdera.apache.org/abdera-client)
* Abdera Core (org.apache.abdera:abdera-core:1.1.3 - http://abdera.apache.org/abdera-core)
* I18N Libraries (org.apache.abdera:abdera-i18n:1.1.3 - http://abdera.apache.org)
* Abdera Parser (org.apache.abdera:abdera-parser:1.1.3 - http://abdera.apache.org/abdera-parser)
* org.apache.tools.ant (org.apache.ant:ant:1.7.0 - http://ant.apache.org/ant/)
* ant-launcher (org.apache.ant:ant-launcher:1.7.0 - http://ant.apache.org/ant-launcher/)
* Avalon Framework API (org.apache.avalon.framework:avalon-framework-api:4.3.1 - http://www.apache.org/excalibur/avalon-framework/avalon-framework-api/)
* Avalon Framework Implementation (org.apache.avalon.framework:avalon-framework-impl:4.3.1 - http://www.apache.org/excalibur/avalon-framework/avalon-framework-impl/)
* Cocoon Configuration API (org.apache.cocoon:cocoon-configuration-api:1.0.2 - http://cocoon.apache.org/subprojects/configuration/1.0/configuration-api/1.0/)
* Cocoon Core (org.apache.cocoon:cocoon-core:2.2.0 - http://cocoon.apache.org/2.2/core-modules/core/2.2/)
* Cocoon Expression Language API (org.apache.cocoon:cocoon-expression-language-api:1.0.0 - http://cocoon.apache.org/2.2/core-modules/expression-language-api/1.0/)
* Cocoon Expression Language Implementation. (org.apache.cocoon:cocoon-expression-language-impl:1.0.0 - http://cocoon.apache.org/2.2/core-modules/expression-language-impl/1.0/)
* Cocoon Flowscript Block Implementation (org.apache.cocoon:cocoon-flowscript-impl:1.0.0 - http://cocoon.apache.org/2.2/blocks/flowscript/1.0/)
* Cocoon Linkrewriter Block Implementation (org.apache.cocoon:cocoon-linkrewriter-impl:1.0.0 - http://cocoon.apache.org/2.2/blocks/linkrewriter/1.0/)
* Cocoon Pipeline API (org.apache.cocoon:cocoon-pipeline-api:1.0.0 - http://cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/)
* Cocoon Pipeline Components (org.apache.cocoon:cocoon-pipeline-components:1.0.0 - http://cocoon.apache.org/2.2/core-modules/pipeline-components/1.0/)
* Cocoon Pipeline Implementation (org.apache.cocoon:cocoon-pipeline-impl:1.0.0 - http://cocoon.apache.org/2.2/core-modules/pipeline-impl/1.0/)
* Cocoon Servlet Service Components (org.apache.cocoon:cocoon-servlet-service-components:1.0.0 - http://cocoon.apache.org/subprojects/servlet-service/1.0/servlet-service-components/1.0/)
* Cocoon Sitemap API (org.apache.cocoon:cocoon-sitemap-api:1.0.0 - http://cocoon.apache.org/2.2/core-modules/sitemap-api/1.0/)
* Cocoon Sitemap Components (org.apache.cocoon:cocoon-sitemap-components:1.0.0 - http://cocoon.apache.org/2.2/core-modules/sitemap-components/1.0/)
* Cocoon Sitemap Implementation (org.apache.cocoon:cocoon-sitemap-impl:1.0.0 - http://cocoon.apache.org/2.2/core-modules/sitemap-impl/1.0/)
* Cocoon Spring Configurator (org.apache.cocoon:cocoon-spring-configurator:1.0.2 - http://cocoon.apache.org/cocoon-spring-configurator)
* Cocoon Store Implementation (org.apache.cocoon:cocoon-store-impl:1.0.0 - http://cocoon.apache.org/2.2/core-modules/store-impl/1.0/)
* Cocoon Template Framework Block Implementation (org.apache.cocoon:cocoon-template-impl:1.1.0 - http://cocoon.apache.org/2.2/blocks/template/1.0/)
* Cocoon Thread API (org.apache.cocoon:cocoon-thread-api:1.0.0 - http://cocoon.apache.org/2.2/core-modules/thread-api/1.0/)
* Cocoon Thread Implementation (org.apache.cocoon:cocoon-thread-impl:1.0.0 - http://cocoon.apache.org/2.2/core-modules/thread-impl/1.0/)
* Cocoon Util (org.apache.cocoon:cocoon-util:1.0.0 - http://cocoon.apache.org/2.2/core-modules/util/1.0/)
* Cocoon XML API (org.apache.cocoon:cocoon-xml-api:1.0.0 - http://cocoon.apache.org/2.2/core-modules/xml-api/1.0/)
* Cocoon XML Implementation (org.apache.cocoon:cocoon-xml-impl:1.0.0 - http://cocoon.apache.org/2.2/core-modules/xml-impl/1.0/)
* Cocoon XML Resolver (org.apache.cocoon:cocoon-xml-resolver:1.0.0 - http://cocoon.apache.org/2.2/core-modules/xml-resolver/1.0/)
* Cocoon XML Utilities (org.apache.cocoon:cocoon-xml-util:1.0.0 - http://cocoon.apache.org/2.2/core-modules/xml-util/1.0/)
* Apache Commons Compress (org.apache.commons:commons-compress:1.7 - http://commons.apache.org/proper/commons-compress/)
* Apache Commons CSV (org.apache.commons:commons-csv:1.0 - http://commons.apache.org/proper/commons-csv/)
* Apache Commons DBCP (org.apache.commons:commons-dbcp2:2.1.1 - http://commons.apache.org/dbcp/)
* Apache Commons Lang (org.apache.commons:commons-lang3:3.3.2 - http://commons.apache.org/proper/commons-lang/)
* Apache Commons Pool (org.apache.commons:commons-pool2:2.4.2 - http://commons.apache.org/proper/commons-pool/)
* Excalibur Pool API (org.apache.excalibur.components:excalibur-pool-api:2.2.1 - http://www.apache.org/excalibur/excalibur-components-modules/excalibur-pool-modules/excalibur-pool-api/)
* Excalibur Sourceresolve (org.apache.excalibur.components:excalibur-sourceresolve:2.2.3 - http://www.apache.org/excalibur/excalibur-sourceresolve/)
* Excalibur Store (org.apache.excalibur.components:excalibur-store:2.2.1 - http://www.apache.org/excalibur/excalibur-components-modules/excalibur-store/)
* Excalibur XML Utilities (org.apache.excalibur.components:excalibur-xmlutil:2.2.1 - http://www.apache.org/excalibur/excalibur-components-modules/excalibur-xmlutil/)
* Excalibur Instrument API (org.apache.excalibur.containerkit:excalibur-instrument-api:2.2.1 - http://www.apache.org/excalibur/excalibur-containerkit/excalibur-instrument-modules/excalibur-instrument-api/)
* Excalibur Logger (org.apache.excalibur.containerkit:excalibur-logger:2.2.1 - http://www.apache.org/excalibur/excalibur-containerkit/excalibur-logger/)
* Activation 1.1 (org.apache.geronimo.specs:geronimo-activation_1.1_spec:1.1 - http://geronimo.apache.org/maven/specs/geronimo-activation_1.1_spec/1.1)
* JavaMail 1.4 (org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1 - http://geronimo.apache.org/maven/specs/geronimo-javamail_1.4_spec/1.7.1)
* Streaming API for XML (STAX API 1.0) (org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:1.0.1 - http://geronimo.apache.org/specs/geronimo-stax-api_1.0_spec)
* Apache Hadoop Annotations (org.apache.hadoop:hadoop-annotations:2.2.0 - no url defined)
* Apache Hadoop Auth (org.apache.hadoop:hadoop-auth:2.2.0 - no url defined)
* Apache Hadoop Common (org.apache.hadoop:hadoop-common:2.2.0 - no url defined)
* Apache Hadoop HDFS (org.apache.hadoop:hadoop-hdfs:2.2.0 - no url defined)
* Apache HttpClient (org.apache.httpcomponents:httpclient:4.5.1 - http://hc.apache.org/httpcomponents-client)
* Apache HttpClient Cache (org.apache.httpcomponents:httpclient-cache:4.2.6 - http://hc.apache.org/httpcomponents-client)
* Apache HttpCore (org.apache.httpcomponents:httpcore:4.4.4 - http://hc.apache.org/httpcomponents-core-ga)
* Apache HttpClient Mime (org.apache.httpcomponents:httpmime:4.3.1 - http://hc.apache.org/httpcomponents-client)
* Apache JAMES Mime4j (Core) (org.apache.james:apache-mime4j-core:0.7.2 - http://james.apache.org/mime4j/apache-mime4j-core)
* Apache JAMES Mime4j (DOM) (org.apache.james:apache-mime4j-dom:0.7.2 - http://james.apache.org/mime4j/apache-mime4j-dom)
* Apache Jena - Libraries POM (org.apache.jena:apache-jena-libs:2.13.0 - http://jena.apache.org/apache-jena-libs/)
* Apache Jena - ARQ (SPARQL 1.1 Query Engine) (org.apache.jena:jena-arq:2.13.0 - http://jena.apache.org/jena-arq/)
* Apache Jena - Core (org.apache.jena:jena-core:2.13.0 - http://jena.apache.org/jena-core/)
* Apache Jena - IRI (org.apache.jena:jena-iri:1.1.2 - http://jena.apache.org/jena-iri/)
* Apache Jena - TDB (Native Triple Store) (org.apache.jena:jena-tdb:1.1.2 - http://jena.apache.org/jena-tdb/)
* Lucene Common Analyzers (org.apache.lucene:lucene-analyzers-common:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-analyzers-common)
* Lucene Common Analyzers (org.apache.lucene:lucene-analyzers-common:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-analyzers-common)
* Lucene ICU Analysis Components (org.apache.lucene:lucene-analyzers-icu:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-analyzers-icu)
* Lucene Kuromoji Japanese Morphological Analyzer (org.apache.lucene:lucene-analyzers-kuromoji:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-analyzers-kuromoji)
* Lucene Morfologik Polish Lemmatizer (org.apache.lucene:lucene-analyzers-morfologik:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-analyzers-morfologik)
* Lucene Phonetic Filters (org.apache.lucene:lucene-analyzers-phonetic:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-analyzers-phonetic)
* Lucene Smart Chinese Analyzer (org.apache.lucene:lucene-analyzers-smartcn:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-analyzers-smartcn)
* Lucene Stempel Analyzer (org.apache.lucene:lucene-analyzers-stempel:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-analyzers-stempel)
* Lucene codecs (org.apache.lucene:lucene-codecs:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-codecs)
* Lucene Core (org.apache.lucene:lucene-core:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-core)
* Lucene Core (org.apache.lucene:lucene-core:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-core)
* Lucene Expressions (org.apache.lucene:lucene-expressions:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-expressions)
* Lucene Grouping (org.apache.lucene:lucene-grouping:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-grouping)
* Lucene Grouping (org.apache.lucene:lucene-grouping:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-grouping)
* Lucene Highlighter (org.apache.lucene:lucene-highlighter:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-highlighter)
* Lucene Highlighter (org.apache.lucene:lucene-highlighter:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-highlighter)
* Lucene Join (org.apache.lucene:lucene-join:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-join)
* Lucene Join (org.apache.lucene:lucene-join:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-join)
* Lucene Memory (org.apache.lucene:lucene-memory:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-memory)
* Lucene Memory (org.apache.lucene:lucene-memory:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-memory)
* Lucene Miscellaneous (org.apache.lucene:lucene-misc:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-misc)
* Lucene Miscellaneous (org.apache.lucene:lucene-misc:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-misc)
* Lucene Queries (org.apache.lucene:lucene-queries:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-queries)
* Lucene Queries (org.apache.lucene:lucene-queries:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-queries)
* Lucene QueryParsers (org.apache.lucene:lucene-queryparser:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-queryparser)
* Lucene QueryParsers (org.apache.lucene:lucene-queryparser:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-queryparser)
* Lucene Sandbox (org.apache.lucene:lucene-sandbox:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-sandbox)
* Lucene Spatial (org.apache.lucene:lucene-spatial:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-spatial)
* Lucene Spatial (org.apache.lucene:lucene-spatial:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-spatial)
* Lucene Suggest (org.apache.lucene:lucene-suggest:4.10.2 - http://lucene.apache.org/lucene-parent/lucene-suggest)
* Lucene Suggest (org.apache.lucene:lucene-suggest:4.10.4 - http://lucene.apache.org/lucene-parent/lucene-suggest)
* Apache FontBox (org.apache.pdfbox:fontbox:2.0.2 - http://pdfbox.apache.org/)
* Apache JempBox (org.apache.pdfbox:jempbox:1.8.4 - http://www.apache.org/pdfbox-parent/jempbox/)
* Apache PDFBox (org.apache.pdfbox:pdfbox:2.0.2 - http://www.apache.org/pdfbox-parent/pdfbox/)
* Apache POI (org.apache.poi:poi:3.13 - http://poi.apache.org/)
* Apache POI (org.apache.poi:poi-ooxml:3.13 - http://poi.apache.org/)
* Apache POI (org.apache.poi:poi-ooxml-schemas:3.10.1 - http://poi.apache.org/)
* Apache POI (org.apache.poi:poi-ooxml-schemas:3.13 - http://poi.apache.org/)
* Apache POI (org.apache.poi:poi-scratchpad:3.13 - http://poi.apache.org/)
* Apache Solr Search Server (org.apache.solr:solr:4.10.4 - http://lucene.apache.org/solr-parent/solr)
* Apache Solr Analysis Extras (org.apache.solr:solr-analysis-extras:4.10.4 - http://lucene.apache.org/solr-parent/solr-analysis-extras)
* Apache Solr Content Extraction Library (org.apache.solr:solr-cell:4.10.4 - http://lucene.apache.org/solr-parent/solr-cell)
* Apache Solr Core (org.apache.solr:solr-core:4.10.4 - http://lucene.apache.org/solr-parent/solr-core)
* Apache Solr Solrj (org.apache.solr:solr-solrj:4.10.4 - http://lucene.apache.org/solr-parent/solr-solrj)
* Apache Thrift (org.apache.thrift:libthrift:0.9.2 - http://thrift.apache.org)
* Apache Tika core (org.apache.tika:tika-core:1.5 - http://tika.apache.org/)
* Apache Tika parsers (org.apache.tika:tika-parsers:1.5 - http://tika.apache.org/)
* Apache Tika XMP (org.apache.tika:tika-xmp:1.5 - http://tika.apache.org/)
* Axiom API (org.apache.ws.commons.axiom:axiom-api:1.2.14 - http://ws.apache.org/axiom/)
* Axiom Impl (org.apache.ws.commons.axiom:axiom-impl:1.2.14 - http://ws.apache.org/axiom/)
* XmlBeans (org.apache.xmlbeans:xmlbeans:2.6.0 - http://xmlbeans.apache.org)
* zookeeper (org.apache.zookeeper:zookeeper:3.4.6 - no url defined)
* Evo Inflector (org.atteo:evo-inflector:1.2.1 - http://atteo.org/static/evo-inflector)
* TagSoup (org.ccil.cowan.tagsoup:tagsoup:1.2.1 - http://home.ccil.org/~cowan/XML/tagsoup/)
* Jackson (org.codehaus.jackson:jackson-core-asl:1.9.13 - http://jackson.codehaus.org)
* Data Mapper for Jackson (org.codehaus.jackson:jackson-mapper-asl:1.9.13 - http://jackson.codehaus.org)
* Woodstox (org.codehaus.woodstox:woodstox-core-asl:4.1.4 - http://woodstox.codehaus.org)
* Woodstox (org.codehaus.woodstox:wstx-asl:3.2.0 - http://woodstox.codehaus.org)
* Woodstox (org.codehaus.woodstox:wstx-asl:3.2.7 - http://woodstox.codehaus.org)
* flyway-core (org.flywaydb:flyway-core:4.0.3 - https://flywaydb.org/flyway-core)
* Ogg and Vorbis for Java, Core (org.gagravarr:vorbis-java-core:0.1 - https://github.com/Gagravarr/VorbisJava)
* Apache Tika plugin for Ogg, Vorbis and FLAC (org.gagravarr:vorbis-java-tika:0.1 - https://github.com/Gagravarr/VorbisJava)
* Javassist (org.javassist:javassist:3.18.1-GA - http://www.javassist.org/)
* Jetty Server (org.mortbay.jetty:jetty:6.1.26 - http://www.eclipse.org/jetty/jetty-parent/project/modules/jetty)
* Jetty Servlet Tester (org.mortbay.jetty:jetty-servlet-tester:6.1.26 - http://www.eclipse.org/jetty/jetty-parent/project/jetty-servlet-tester)
* Jetty Utilities (org.mortbay.jetty:jetty-util:6.1.26 - http://www.eclipse.org/jetty/jetty-parent/project/jetty-util)
* Servlet Specification API (org.mortbay.jetty:servlet-api:2.5-20081211 - http://jetty.mortbay.org/servlet-api)
* Noggit (org.noggit:noggit:0.5 - http://noggit.org)
* Objenesis (org.objenesis:objenesis:2.1 - http://objenesis.org)
* parboiled-core (org.parboiled:parboiled-core:1.1.6 - http://parboiled.org)
* parboiled-java (org.parboiled:parboiled-java:1.1.6 - http://parboiled.org)
* org.restlet (org.restlet.jee:org.restlet:2.1.1 - no url defined)
* org.restlet.ext.servlet (org.restlet.jee:org.restlet.ext.servlet:2.1.1 - no url defined)
* rome-modules (org.rometools:rome-modules:1.0 - http://www.rometools.org)
* Spring AOP (org.springframework:spring-aop:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring AOP (org.springframework:spring-aop:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Beans (org.springframework:spring-beans:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Beans (org.springframework:spring-beans:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Context (org.springframework:spring-context:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Context (org.springframework:spring-context:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Context Support (org.springframework:spring-context-support:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Core (org.springframework:spring-core:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Core (org.springframework:spring-core:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Expression Language (SpEL) (org.springframework:spring-expression:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Expression Language (SpEL) (org.springframework:spring-expression:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring JDBC (org.springframework:spring-jdbc:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring JDBC (org.springframework:spring-jdbc:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Object/Relational Mapping (org.springframework:spring-orm:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Object/Relational Mapping (org.springframework:spring-orm:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring TestContext Framework (org.springframework:spring-test:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Transaction (org.springframework:spring-tx:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Transaction (org.springframework:spring-tx:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Web (org.springframework:spring-web:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Web (org.springframework:spring-web:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Web MVC (org.springframework:spring-webmvc:3.2.16.RELEASE - https://github.com/SpringSource/spring-framework)
* Spring Web MVC (org.springframework:spring-webmvc:3.2.5.RELEASE - https://github.com/SpringSource/spring-framework)
* spring-security-config (org.springframework.security:spring-security-config:3.2.9.RELEASE - http://spring.io/spring-security)
* spring-security-core (org.springframework.security:spring-security-core:3.2.9.RELEASE - http://spring.io/spring-security)
* spring-security-web (org.springframework.security:spring-security-web:3.2.9.RELEASE - http://spring.io/spring-security)
* SWORD Java API, GUI and CLI (org.swordapp:sword-common:1.1 - http://nexus.sonatype.org/oss-repository-hosting.html/sword-common)
* SWORD v2 :: Common Server Library (org.swordapp:sword2-server:1.0 - http://www.swordapp.org/)
* xml-matchers (org.xmlmatchers:xml-matchers:0.10 - http://code.google.com/p/xml-matchers/)
* oro (oro:oro:2.0.8 - no url defined)
* JUnitParams (pl.pragmatists:JUnitParams:1.0.2 - http://junitparams.googlecode.com)
* Rome A9 OpenSearch (rome:opensearch:0.1 - http://wiki.java.net/bin/view/Javawsxml/OpenSearch)
* ROME, RSS and atOM utilitiEs for Java (rome:rome:1.0 - https://rome.dev.java.net/)
* oai4j (se.kb:oai4j:0.6b1 - http://oai4j-client.sourceforge.net/)
* StAX API (stax:stax-api:1.0.1 - http://stax.codehaus.org/)
* standard (taglibs:standard:1.1.2 - no url defined)
* Xalan Java Serializer (xalan:serializer:2.7.2 - http://xml.apache.org/xalan-j/)
* Xalan Java (xalan:xalan:2.7.2 - http://xml.apache.org/xalan-j/)
* Xerces2-j (xerces:xercesImpl:2.11.0 - https://xerces.apache.org/xerces2-j/)
* xmlParserAPIs (xerces:xmlParserAPIs:2.6.2 - no url defined)
* XML Commons External Components XML APIs (xml-apis:xml-apis:1.4.01 - http://xml.apache.org/commons/components/external/)
* XML Commons Resolver Component (xml-resolver:xml-resolver:1.2 - http://xml.apache.org/commons/components/resolver/)
Common Public License v1.0 (http://www.opensource.org/licenses/cpl1.0)
* JUnit (junit:*) - http://junit.org/license
* WSDL4J (wsdl4j:*) - http://sourceforge.net/projects/wsdl4j/
BSD License:
Lesser GPL (http://www.opensource.org/licenses/LGPL-2.1)
* Text-mining (org.dspace.dependencies:dspace-tm-extractors) - http://code.google.com/p/text-mining/
* MaxMind GeoIP (org.dspace.dependencies:dspace-geoip) - http://geoip.cvs.sourceforge.net/viewvc/geoip/java/LICENSE
* AntLR Parser Generator (antlr:antlr:2.7.7 - http://www.antlr.org/)
* ASM Core (asm:asm:3.3.1 - http://asm.objectweb.org/asm/)
* XMP Library for Java (com.adobe.xmp:xmpcore:5.1.2 - http://www.adobe.com/devnet/xmp.html)
* coverity-escapers (com.coverity.security:coverity-escapers:1.1.1 - http://coverity.com/security)
* JSONLD Java :: Core (com.github.jsonld-java:jsonld-java:0.5.1 - http://github.com/jsonld-java/jsonld-java/jsonld-java/)
* Protocol Buffer Java API (com.google.protobuf:protobuf-java:2.5.0 - http://code.google.com/p/protobuf)
* Jena IRI (com.hp.hpl.jena:iri:0.8 - http://jena.sf.net/iri)
* Jena (com.hp.hpl.jena:jena:2.6.4 - http://www.openjena.org/)
* yui compressor (com.yahoo.platform.yui:yuicompressor:2.3.6 - http://developer.yahoo.com/yui/compressor/)
* dnsjava (dnsjava:dnsjava:2.1.7 - http://www.dnsjava.org)
* dom4j (dom4j:dom4j:1.6.1 - http://dom4j.org)
* Biblio Transformation Engine :: Core (gr.ekt.bte:bte-core:0.9.3.5 - http://github.com/EKT/Biblio-Transformation-Engine/bte-core)
* Biblio Transformation Engine :: Input/Output (gr.ekt.bte:bte-io:0.9.3.5 - http://github.com/EKT/Biblio-Transformation-Engine/bte-io)
* jaxen (jaxen:jaxen:1.1.6 - http://jaxen.codehaus.org/)
* JLine (jline:jline:0.9.94 - http://jline.sourceforge.net)
* ANTLR 3 Runtime (org.antlr:antlr-runtime:3.5 - http://www.antlr.org)
* Morfologik FSA (org.carrot2:morfologik-fsa:1.7.1 - http://morfologik.blogspot.com/morfologik-fsa/)
* Morfologik Stemming Dictionary for Polish (org.carrot2:morfologik-polish:1.7.1 - http://morfologik.blogspot.com/morfologik-polish/)
* Morfologik Stemming APIs (org.carrot2:morfologik-stemming:1.7.1 - http://morfologik.blogspot.com/morfologik-stemming/)
* Stax2 API (org.codehaus.woodstox:stax2-api:3.1.1 - http://woodstox.codehaus.org/StAX2)
* DSpace Kernel :: API and Implementation (org.dspace:dspace-api:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-api)
* DSpace I18N :: Language Packs (org.dspace:dspace-api-lang:6.0.3 - https://github.com/dspace/dspace-api-lang)
* DSpace JSP-UI (org.dspace:dspace-jspui:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-jspui)
* DSpace OAI-PMH (org.dspace:dspace-oai:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-oai)
* DSpace RDF (org.dspace:dspace-rdf:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-rdf)
* DSpace REST :: API and Implementation (org.dspace:dspace-rest:6.0-rc4-SNAPSHOT - http://demo.dspace.org)
* DSpace Services Framework :: API and Implementation (org.dspace:dspace-services:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-services)
* Apache Solr Webapp (org.dspace:dspace-solr:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-solr)
* DSpace SWORD (org.dspace:dspace-sword:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-sword)
* DSpace SWORD v2 (org.dspace:dspace-swordv2:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-swordv2)
* DSpace XML-UI (Manakin) (org.dspace:dspace-xmlui:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/dspace-xmlui)
* DSpace XML-UI (Manakin) I18N :: Language Packs (org.dspace:dspace-xmlui-lang:6.0.3 - https://github.com/dspace/dspace-xmlui-lang)
* handle (org.dspace:handle:6.2 - no url defined)
* jargon (org.dspace:jargon:1.4.25 - no url defined)
* mets (org.dspace:mets:1.5.2 - no url defined)
* oclc-harvester2 (org.dspace:oclc-harvester2:0.1.12 - no url defined)
* XOAI : OAI-PMH Java Toolkit (org.dspace:xoai:3.2.10 - http://nexus.sonatype.org/oss-repository-hosting.html/xoai)
* Repackaged Cocoon Servlet Service Implementation (org.dspace.dependencies.cocoon:dspace-cocoon-servlet-service-impl:1.0.3 - http://projects.dspace.org/dspace-pom/dspace-cocoon-servlet-service-impl)
* DSpace Kernel :: Additions and Local Customizations (org.dspace.modules:additions:6.0-rc4-SNAPSHOT - https://github.com/dspace/DSpace/modules/additions)
* Hamcrest All (org.hamcrest:hamcrest-all:1.3 - https://github.com/hamcrest/JavaHamcrest/hamcrest-all)
* Hamcrest Core (org.hamcrest:hamcrest-all:1.3 - https://github.com/hamcrest/JavaHamcrest/hamcrest-all)
* JBibTeX (org.jbibtex:jbibtex:1.0.10 - http://www.jbibtex.org)
* ASM Core (org.ow2.asm:asm:4.1 - http://asm.objectweb.org/asm/)
* ASM Analysis (org.ow2.asm:asm-analysis:4.1 - http://asm.objectweb.org/asm-analysis/)
* ASM Commons (org.ow2.asm:asm-commons:4.1 - http://asm.objectweb.org/asm-commons/)
* ASM Tree (org.ow2.asm:asm-tree:4.1 - http://asm.objectweb.org/asm-tree/)
* ASM Util (org.ow2.asm:asm-util:4.1 - http://asm.objectweb.org/asm-util/)
* XMLUnit for Java (xmlunit:xmlunit:1.1 - http://xmlunit.sourceforge.net/)
* XMLUnit for Java (xmlunit:xmlunit:1.3 - http://xmlunit.sourceforge.net/)
MIT / X11 License (or adaptations) (http://www.opensource.org/licenses/MIT)
* Bouncy Castle (org.bouncycastle:*) - http://www.bouncycastle.org/licence.html
* jmockit (org.dspace.dependencies.jmockit:dspace-jmockit) - http://code.google.com/p/jmockit/
* SLF4J (org.slf4j:*) - http://www.slf4j.org/license.html
Common Development and Distribution License (CDDL):
Mozilla Public License (http://www.opensource.org/licenses/MPL-2.0)
* H2 database (com.h2database:*) - http://www.h2database.com/html/license.html
* JAXB Reference Implementation (com.sun.xml.bind:jaxb-impl:2.2.5 - http://jaxb.java.net/)
* JHighlight (com.uwyn:jhighlight:1.0 - https://jhighlight.dev.java.net/)
* JavaBeans(TM) Activation Framework (javax.activation:activation:1.1.1 - http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp)
* javax.annotation API (javax.annotation:javax.annotation-api:1.2 - http://jcp.org/en/jsr/detail?id=250)
* JavaMail API (compat) (javax.mail:mail:1.4.7 - http://kenai.com/projects/javamail/mail)
* Java Servlet API (javax.servlet:javax.servlet-api:3.1.0 - http://servlet-spec.java.net)
* jsp-api (javax.servlet:jsp-api:2.0 - no url defined)
* jstl (javax.servlet:jstl:1.2 - no url defined)
* servlet-api (javax.servlet:servlet-api:2.5 - no url defined)
* javax.ws.rs-api (javax.ws.rs:javax.ws.rs-api:2.0.1 - http://jax-rs-spec.java.net)
* Class Model for Hk2 (org.glassfish.hk2:class-model:2.4.0-b31 - https://hk2.java.net/class-model)
* HK2 config types (org.glassfish.hk2:config-types:2.4.0-b31 - https://hk2.java.net/hk2-configuration/hk2-configuration-persistence/hk2-xml-dom/config-types)
* HK2 module of HK2 itself (org.glassfish.hk2:hk2:2.4.0-b31 - https://hk2.java.net/hk2)
* HK2 API module (org.glassfish.hk2:hk2-api:2.4.0-b31 - https://hk2.java.net/hk2-api)
* HK2 configuration module (org.glassfish.hk2:hk2-config:2.4.0-b31 - https://hk2.java.net/hk2-configuration/hk2-configuration-persistence/hk2-xml-dom/hk2-config)
* HK2 core module (org.glassfish.hk2:hk2-core:2.4.0-b31 - https://hk2.java.net/hk2-core)
* ServiceLocator Default Implementation (org.glassfish.hk2:hk2-locator:2.4.0-b31 - https://hk2.java.net/hk2-locator)
* Run Level Service (org.glassfish.hk2:hk2-runlevel:2.4.0-b31 - https://hk2.java.net/hk2-runlevel)
* HK2 Implementation Utilities (org.glassfish.hk2:hk2-utils:2.4.0-b31 - https://hk2.java.net/hk2-utils)
* OSGi resource locator bundle - used by various API providers that rely on META-INF/services mechanism to locate providers. (org.glassfish.hk2:osgi-resource-locator:1.0.1 - http://glassfish.org/osgi-resource-locator/)
* HK2 Spring Bridge (org.glassfish.hk2:spring-bridge:2.4.0-b31 - https://hk2.java.net/spring-bridge)
* aopalliance version 1.0 repackaged as a module (org.glassfish.hk2.external:aopalliance-repackaged:2.4.0-b31 - https://hk2.java.net/external/aopalliance-repackaged)
* ASM library repackaged as OSGi bundle (org.glassfish.hk2.external:asm-all-repackaged:2.4.0-b31 - https://hk2.java.net/external/asm-all-repackaged)
* javax.validation:1.1.0.Final as OSGi bundle (org.glassfish.hk2.external:bean-validator:2.4.0-b31 - https://hk2.java.net/external/bean-validator)
* javax.inject:1 as OSGi bundle (org.glassfish.hk2.external:javax.inject:2.4.0-b31 - https://hk2.java.net/external/javax.inject)
* jersey-repackaged-guava (org.glassfish.jersey.bundles.repackaged:jersey-guava:2.22.1 - https://jersey.java.net/project/project/jersey-guava/)
* jersey-container-servlet (org.glassfish.jersey.containers:jersey-container-servlet:2.22.1 - https://jersey.java.net/project/jersey-container-servlet/)
* jersey-container-servlet-core (org.glassfish.jersey.containers:jersey-container-servlet-core:2.22.1 - https://jersey.java.net/project/jersey-container-servlet-core/)
* jersey-core-client (org.glassfish.jersey.core:jersey-client:2.22.1 - https://jersey.java.net/jersey-client/)
* jersey-core-common (org.glassfish.jersey.core:jersey-common:2.22.1 - https://jersey.java.net/jersey-common/)
* jersey-core-server (org.glassfish.jersey.core:jersey-server:2.22.1 - https://jersey.java.net/jersey-server/)
* jersey-ext-entity-filtering (org.glassfish.jersey.ext:jersey-entity-filtering:2.22.1 - https://jersey.java.net/project/jersey-entity-filtering/)
* jersey-spring3 (org.glassfish.jersey.ext:jersey-spring3:2.22.1 - https://jersey.java.net/project/jersey-spring3/)
* jersey-media-jaxb (org.glassfish.jersey.media:jersey-media-jaxb:2.22.1 - https://jersey.java.net/project/jersey-media-jaxb/)
* jersey-media-json-jackson (org.glassfish.jersey.media:jersey-media-json-jackson:2.22.1 - https://jersey.java.net/project/jersey-media-json-jackson/)
* Java Transaction API (org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:1.0.1.Final - http://www.jboss.org/jboss-transaction-api_1.1_spec)
* Type arithmetic library for Java5 (org.jvnet:tiger-types:1.4 - http://java.net/tiger-types/)
Other Open Source Licenses:
* ICU4J (com.ibm.icu:icu4j) - ICU License : http://source.icu-project.org/repos/icu/icu/trunk/license.html
* JDOM (jdom:*) - JDOM License : https://github.com/hunterhacker/jdom/blob/master/LICENSE.txt
* PostgreSQL (postgresql:*) - PostgreSQL License (BSD-based): http://www.postgresql.org/about/licence/
Eclipse Public License:
----
NOTE #1: Some individual web application files in DSpace (e.g. Javascript
libraries, CSS Frameworks) may have their own open source license. In that
scenario, we place a copy of the full text of the license alongside the
licensed files. You can locate these additional licenses in our codebase
by searching for files with a ".LICENSE" file extension.
* JUnit (junit:junit:4.11 - http://junit.org)
* AspectJ runtime (org.aspectj:aspectjrt:1.6.11 - http://www.aspectj.org)
* JPA 2.0 API (org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final - http://hibernate.org)
* Jetty Server (org.mortbay.jetty:jetty:6.1.26 - http://www.eclipse.org/jetty/jetty-parent/project/modules/jetty)
* Jetty Servlet Tester (org.mortbay.jetty:jetty-servlet-tester:6.1.26 - http://www.eclipse.org/jetty/jetty-parent/project/jetty-servlet-tester)
* Jetty Utilities (org.mortbay.jetty:jetty-util:6.1.26 - http://www.eclipse.org/jetty/jetty-parent/project/jetty-util)
For example, on Linux you can use the 'find' command from the source directory:
GNU General Public License, Version 2 with the Classpath Exception:
find . -type f -name "*.LICENSE"
----
* Java Transaction API (org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:1.0.1.Final - http://www.jboss.org/jboss-transaction-api_1.1_spec)
----
NOTE #2: Although we try to keep this libraries list current, the latest
information about DSpace third party libraries can be found by running the
following Maven command(s):
GNU Lesser General Public License (LGPL):
mvn project-info-reports:dependencies
* 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)
* im4java (org.im4java:im4java:1.4.0 - http://sourceforge.net/projects/im4java/)
* Javassist (org.javassist:javassist:3.18.1-GA - http://www.javassist.org/)
* JBoss Logging 3 (org.jboss.logging:jboss-logging:3.1.0.GA - http://www.jboss.org)
* org.jdesktop - Swing Worker (org.jdesktop:swing-worker:1.1 - no url defined)
* xom (xom:xom:1.1 - http://www.xom.nu)
* XOM (xom:xom:1.2.5 - http://xom.nu)
This generates a "[project]/target/site/dependencies.html" report under every
DSpace project directory. This report lists all dependencies and their license
(if it can be determined by Maven).
ICU License:
Additionally, you may wish to run:
* ICU4J (com.ibm.icu:icu4j:56.1 - http://icu-project.org/)
mvn project-info-reports:dependancy-convergence
JDOM License (Apache-style license):
This generates a summary report at
"[dspace]/target/site/dependancy-convergence.html" which lists all dependencies
of all DSpace projects (though it does not list license information)
* jdom (jdom:jdom:1.0 - no url defined)
For more information see the maven-project-info-reports-plugin:
http://maven.apache.org/plugins/maven-project-info-reports-plugin/
----
MIT License:
* Bouncy Castle CMS and S/MIME API (org.bouncycastle:bcmail-jdk15:1.46 - http://www.bouncycastle.org/java.html)
* Bouncy Castle Provider (org.bouncycastle:bcprov-jdk15:1.46 - http://www.bouncycastle.org/java.html)
* Main (org.jmockit:jmockit:1.21 - http://www.jmockit.org)
* OpenCloud (org.mcavallo:opencloud:0.3 - http://opencloud.mcavallo.org/)
* Mockito (org.mockito:mockito-core:1.10.19 - http://www.mockito.org)
* JCL 1.1.1 implemented over SLF4J (org.slf4j:jcl-over-slf4j:1.7.14 - http://www.slf4j.org)
* JUL to SLF4J bridge (org.slf4j:jul-to-slf4j:1.7.14 - http://www.slf4j.org)
* SLF4J API Module (org.slf4j:slf4j-api:1.7.14 - http://www.slf4j.org)
* SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.14 - http://www.slf4j.org)
Mozilla Public License:
* juniversalchardet (com.googlecode.juniversalchardet:juniversalchardet:1.0.3 - http://juniversalchardet.googlecode.com/)
* h2 (com.h2database:h2:1.4.187 - no url defined)
* Javassist (org.javassist:javassist:3.18.1-GA - http://www.javassist.org/)
* Rhino (rhino:js:1.6R7 - http://www.mozilla.org/rhino/)
Public Domain:
* AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
* Dough Lea's util.concurrent package (concurrent:concurrent:1.3.4 - no url defined)
* Reflections (org.reflections:reflections:0.9.9-RC1 - http://code.google.com/p/reflections/reflections/)
* XZ for Java (org.tukaani:xz:1.4 - http://tukaani.org/xz/java.html)
Similar to Apache License but with the acknowledgment clause removed:
* JDOM (org.jdom:jdom:1.1.3 - http://www.jdom.org)
The PostgreSQL License:
* PostgreSQL JDBC Driver - JDBC 4.2 (org.postgresql:postgresql:9.4.1211 - https://github.com/pgjdbc/pgjdbc)
license.txt:
* JPA 2.0 API (org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final - http://hibernate.org)

54
README
View File

@@ -1,54 +0,0 @@
Installation instructions are included in this release package under
- dspace/docs/DSpace-Manual.pdf
DSpace version information can be viewed online at
- https://wiki.duraspace.org/display/DSDOC/
Documentation for the most recent stable release(s) may be downloaded
or viewed online at
- http://www.dspace.org/latest-release/
- https://wiki.duraspace.org/display/DSDOC/
In addition, a listing of all known contributors to DSpace software can be
found online at:
https://wiki.duraspace.org/display/DSPACE/DSpaceContributors
Installation instructions for other versions may be different, so you
are encouraged to obtain the appropriate version of the Documentation
(from the links above or from the source repository).
To obtain files from the repository and build, please see:
- https://github.com/DSpace/DSpace/
or just:
- git clone git://github.com/DSpace/DSpace.git
Please refer any further problems to the dspace-tech@lists.sourceforge.net
mailing list.
- http://sourceforge.net/mail/?group_id=19984
Detailed Issue Tracking for DSpace is done on our JIRA Issue Tracker
- https://jira.duraspace.org/browse/DS
To contribute to DSpace, please see:
- https://wiki.duraspace.org/display/DSPACE/How+to+Contribute+to+DSpace
For more details about DSpace, including a list of service providers,
places to seek help, news articles and lists of other users, please see:
- http://www.dspace.org/
DSpace source code licensing information available online at:
- http://www.dspace.org/license/
Copyright (c) 2002-2012, DuraSpace. All rights reserved.

85
README.md Normal file
View File

@@ -0,0 +1,85 @@
# DSpace
## NOTE: The rest-tutorial branch has been created to support the [DSpace 7 REST documentation](https://dspace-labs.github.io/DSpace7RestTutorial/walkthrough/intro)
- This branch provides stable, referencable line numbers in code
[![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 Releases](https://github.com/DSpace/DSpace/releases) |
[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
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.
* 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.
***
## Downloads
The latest release of DSpace can be downloaded from the [DSpace website](http://www.dspace.org/latest-release/) or from [GitHub](https://github.com/DSpace/DSpace/releases).
Past releases are all available via GitHub at https://github.com/DSpace/DSpace/releases
## Documentation / Installation
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)
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.
## Contributing
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:
* [How to Contribute to DSpace](https://wiki.duraspace.org/display/DSPACE/How+to+Contribute+to+DSpace): How to contribute in general (via code, documentation, bug reports, expertise, etc)
* [Code Contribution Guidelines](https://wiki.duraspace.org/display/DSPACE/Code+Contribution+Guidelines): How to give back code or contribute features, bug fixes, etc.
* [DSpace Community Advisory Team (DCAT)](https://wiki.duraspace.org/display/cmtygp/DSpace+Community+Advisory+Team): If you are not a developer, we also have an interest group specifically for repository managers. The DCAT group meets virtually, once a month, and sends open invitations to join their meetings via the [DCAT mailing list](https://groups.google.com/d/forum/DSpaceCommunityAdvisoryTeam).
We also encourage GitHub Pull Requests (PRs) at any time. Please see our [Development with Git](https://wiki.duraspace.org/display/DSPACE/Development+with+Git) guide for more info.
In addition, a listing of all known contributors to DSpace software can be
found online at: https://wiki.duraspace.org/display/DSPACE/DSpaceContributors
## Getting Help
DSpace provides public mailing lists where you can post questions or raise topics for discussion.
We welcome everyone to participate in these lists:
* [dspace-community@googlegroups.com](https://groups.google.com/d/forum/dspace-community) : General discussion about DSpace platform, announcements, sharing of best practices
* [dspace-tech@googlegroups.com](https://groups.google.com/d/forum/dspace-tech) : Technical support mailing list. See also our guide for [How to troubleshoot an error](https://wiki.duraspace.org/display/DSPACE/Troubleshoot+an+error).
* [dspace-devel@googlegroups.com](https://groups.google.com/d/forum/dspace-devel) : Developers / Development mailing list
Great Q&A is also available under the [DSpace tag on Stackoverflow](http://stackoverflow.com/questions/tagged/dspace)
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
[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
## License
DSpace source code is freely available under a standard [BSD 3-Clause license](https://opensource.org/licenses/BSD-3-Clause).
The full license is available at http://www.dspace.org/license/

View File

@@ -1,137 +0,0 @@
# DSpace build.properties
# This file should be customised to suit your build environment.
# Note that not all configuration is handled here, only the most common properties that tend to differ between build environments.
# For adjusting global settings or more complex settings, edit the relevant config file.
##########################
# SERVER CONFIGURATION #
##########################
# DSpace installation directory. Data will be stored within this directory
dspace.dir=/dspace
# DSpace host name - should match base URL. Do not include port number
dspace.hostname = localhost
# DSpace base host URL. Include port number etc.
dspace.baseUrl = http://localhost:8080
# Name of the site
dspace.name = DSpace at My University
# Solr server
solr.server=http://localhost:8080/solr
# Default language for metadata values
default.language = en_US
##########################
# DATABASE CONFIGURATION #
##########################
# Database name ("oracle", or "postgres")
db.name=postgres
# Uncomment the appropriate block below for your database.
# postgres
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://localhost:5432/dspace
db.username=dspace
db.password=dspace
# oracle
#db.driver= oracle.jdbc.OracleDriver
#db.url=jdbc:oracle:thin:@//localhost:1521/xe
#db.username=dspace
#db.password=dspace
# Schema name - if your database contains multiple schemas, you can avoid problems with
# retrieving the definitions of duplicate object names by specifying
# the schema name here that is used for DSpace by uncommenting the following entry
db.schema =
# Maximum number of DB connections in pool
db.maxconnections = 30
# Maximum time to wait before giving up if all connections in pool are busy (milliseconds)
db.maxwait = 5000
# Maximum number of idle connections in pool (-1 = unlimited)
db.maxidle = -1
# Determine if prepared statement should be cached. (default is true)
db.statementpool = true
# Specify a name for the connection pool (useful if you have multiple applications sharing Tomcat's dbcp)
# If not specified, defaults to 'dspacepool'
db.poolname = dspacepool
#######################
# EMAIL CONFIGURATION #
#######################
# SMTP mail server
mail.server = smtp.example.com
# SMTP mail server authentication username and password (if required)
# mail.server.username = myusername
# mail.server.password = mypassword
mail.server.username=
mail.server.password=
# SMTP mail server alternate port (defaults to 25)
mail.server.port = 25
# From address for mail
mail.from.address = dspace-noreply@myu.edu
# Currently limited to one recipient!
mail.feedback.recipient = dspace-help@myu.edu
# General site administration (Webmaster) e-mail
mail.admin = dspace-help@myu.edu
# Recipient for server errors and alerts
#mail.alert.recipient = email-address-here
mail.alert.recipient=
# Recipient for new user registration emails
#mail.registration.notify = email-address-here
mail.registration.notify=
########################
# HANDLE CONFIGURATION #
########################
# Canonical Handle URL prefix
#
# By default, DSpace is configured to use http://hdl.handle.net/
# as the canonical URL prefix when generating dc.identifier.uri
# during submission, and in the 'identifier' displayed in JSPUI
# item record pages.
#
# If you do not subscribe to CNRI's handle service, you can change this
# to match the persistent URL service you use, or you can force DSpace
# to use your site's URL, eg.
#handle.canonical.prefix = ${dspace.url}/handle/
#
# Note that this will not alter dc.identifer.uri metadata for existing
# items (only for subsequent submissions), but it will alter the URL
# in JSPUI's 'identifier' message on item record pages for existing items.
#
# If omitted, the canonical URL prefix will be http://hdl.handle.net/
handle.canonical.prefix = http://hdl.handle.net/
# CNRI Handle prefix
handle.prefix = 123456789
#######################
# PROXY CONFIGURATION #
#######################
# uncomment and specify both properties if proxy server required
# proxy server for external http requests - use regular hostname without port number
http.proxy.host =
# port number of proxy server
http.proxy.port =

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.2//EN"
"http://checkstyle.sourceforge.net/dtds/suppressions_1_2.dtd">
<suppressions>
<!-- Temporarily suppress indentation checks for all Tests -->
<!-- TODO: We should have these turned on. But, currently there's a known bug with indentation checks
on JMockIt Expectations blocks and similar. See https://github.com/checkstyle/checkstyle/issues/3739 -->
<suppress checks="Indentation" files="src[/\\]test[/\\]java"/>
</suppressions>

144
checkstyle.xml Normal file
View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
<!--
DSpace CodeStyle Requirements
1. 4-space indents for Java, and 2-space indents for XML. NO TABS ALLOWED.
2. K&R style braces required. Braces required on all blocks.
3. Do not use wildcard imports (e.g. import java.util.*). Duplicated or unused imports also not allowed.
4. Javadocs should exist for all public classes and methods. (Methods rule is unenforced at this time.) Keep it short and to the point
5. Maximum line length is 120 characters (except for long URLs, packages or imports)
6. No trailing spaces allowed (except in comments)
7. Tokens should be surrounded by whitespace (see http://checkstyle.sourceforge.net/config_whitespace.html#WhitespaceAround)
8. Each source file must include our license header (validated separately by license-maven-plugin, see pom.xml)
For more information on CheckStyle configurations below, see: http://checkstyle.sourceforge.net/checks.html
-->
<module name="Checker">
<!-- Configure checker to use UTF-8 encoding -->
<property name="charset" value="UTF-8"/>
<!-- Configure checker to run on files with these extensions -->
<property name="fileExtensions" value="java, properties, cfg, xml"/>
<!-- Suppression configurations in checkstyle-suppressions.xml in same directory -->
<module name="SuppressionFilter">
<property name="file" value="${checkstyle.suppressions.file}" default="checkstyle-suppressions.xml"/>
</module>
<!-- No tab characters ('\t') allowed in the source code -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
<property name="fileExtensions" value="java, properties, cfg, css, js, xml"/>
</module>
<!-- No Trailing Whitespace, except on lines that only have an asterisk (e.g. Javadoc comments) -->
<module name="RegexpSingleline">
<property name="format" value="(?&lt;!\*)\s+$|\*\s\s+$"/>
<property name="message" value="Line has trailing whitespace"/>
<property name="fileExtensions" value="java, properties, cfg, css, js, xml"/>
</module>
<!-- Allow individual lines of code to be excluded from these rules, if they are annotated
with @SuppressWarnings. See also SuppressWarningsHolder below -->
<module name="SuppressWarningsFilter" />
<!-- Check individual Java source files for specific rules -->
<module name="TreeWalker">
<!-- Maximum line length is 120 characters -->
<module name="LineLength">
<property name="max" value="120"/>
<!-- Only exceptions for packages, imports, URLs, and JavaDoc {@link} tags -->
<property name="ignorePattern" value="^package.*|^import.*|http://|https://|@link"/>
</module>
<!-- Highlight any TODO or FIXME comments in info messages -->
<module name="TodoComment">
<property name="severity" value="info"/>
<property name="format" value="(TODO)|(FIXME)"/>
</module>
<!-- Do not report errors on any lines annotated with @SuppressWarnings -->
<module name="SuppressWarningsHolder"/>
<!-- ##### Import statement requirements ##### -->
<!-- Star imports (e.g. import java.util.*) are NOT ALLOWED -->
<module name="AvoidStarImport"/>
<!-- Redundant import statements are NOT ALLOWED -->
<module name="RedundantImport"/>
<!-- Unused import statements are NOT ALLOWED -->
<module name="UnusedImports"/>
<!-- Ensure imports appear alphabetically and grouped -->
<module name="CustomImportOrder">
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="true"/>
<property name="customImportOrderRules" value="STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE"/>
</module>
<!-- ##### Javadocs requirements ##### -->
<!-- Requirements for Javadocs for classes/interfaces -->
<module name="JavadocType">
<!-- All public classes/interfaces MUST HAVE Javadocs -->
<property name="scope" value="public"/>
<!-- Add an exception for anonymous inner classes -->
<property name="excludeScope" value="anoninner"/>
<!-- Ignore errors related to unknown tags -->
<property name="allowUnknownTags" value="true"/>
<!-- Allow params tags to be optional -->
<property name="allowMissingParamTags" value="false"/>
</module>
<!-- Requirements for Javadocs for methods -->
<module name="JavadocMethod">
<!-- All public methods MUST HAVE Javadocs -->
<!-- <property name="scope" value="public"/> -->
<!-- TODO: Above rule has been disabled because of large amount of missing public method Javadocs -->
<property name="scope" value="nothing"/>
<!-- Allow RuntimeExceptions to be undeclared -->
<property name="allowUndeclaredRTE" value="true"/>
<!-- Allow params, throws and return tags to be optional -->
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
</module>
<!-- ##### Requirements for K&R Style braces ##### -->
<!-- Code blocks MUST HAVE braces, even single line statements (if, while, etc) -->
<module name="NeedBraces"/>
<!-- Left braces should be at the end of current line (default value)-->
<module name="LeftCurly"/>
<!-- Right braces should be on start of a new line (default value) -->
<module name="RightCurly"/>
<!-- ##### Indentation / Whitespace requirements ##### -->
<!-- Require 4-space indentation (default value) -->
<module name="Indentation"/>
<!-- Whitespace should exist around all major tokens -->
<module name="WhitespaceAround">
<!-- However, make an exception for empty constructors, methods, types, etc. -->
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
</module>
<!-- Validate whitespace around Generics (angle brackets) per typical conventions
http://checkstyle.sourceforge.net/config_whitespace.html#GenericWhitespace -->
<module name="GenericWhitespace"/>
<!-- ##### Requirements for "switch" statements ##### -->
<!-- "switch" statements MUST have a "default" clause -->
<module name="MissingSwitchDefault"/>
<!-- "case" clauses in switch statements MUST include break, return, throw or continue -->
<module name="FallThrough"/>
<!-- ##### Other / Miscellaneous requirements ##### -->
<!-- Require utility classes do not have a public constructor -->
<module name="HideUtilityClassConstructor"/>
<!-- Require each variable declaration is its own statement on its own line -->
<module name="MultipleVariableDeclarations"/>
<!-- Each line of code can only include one statement -->
<module name="OneStatementPerLine"/>
<!-- Require that "catch" statements are not empty (must at least contain a comment) -->
<module name="EmptyCatchBlock"/>
</module>
</module>

View File

@@ -1,4 +1,5 @@
<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>
@@ -12,14 +13,37 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>3.0-rc3</version>
<version>7.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<properties>
<!-- This is the path to the root [dspace-src] directory. -->
<root.basedir>${basedir}/..</root.basedir>
</properties>
<!--
Runtime and Compile Time dependencies for DSpace.
-->
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>maven.properties</include>
<include>scm.properties</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>maven.properties</exclude>
<exclude>scm.properties</exclude>
</excludes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -48,16 +72,93 @@
</execution>
</executions>
</plugin>
<!-- Verify OS license headers for all source code files -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/src/test/resources/**</exclude>
<exclude>**/src/test/data/**</exclude>
<exclude>**/.gitignore</exclude>
<exclude>src/test/data/dspaceFolder/config/spiders/**</exclude>
<exclude>src/main/java/org/apache/solr/handler/extraction/ExtractingParams.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>setupTestEnvironment</id>
<phase>generate-test-resources</phase>
<phase>validate</phase>
<goals>
<goal>unpack</goal>
<goal>maven-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>findbugs</id>
<activation>
<activeByDefault>false</activeByDefault>
<!-- property>
<name>maven.test.skip</name>
<value>false</value>
</property -->
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<!-- If Unit Testing is enabled, then setup the Unit Test Environment.
See also the 'skiptests' profile in Parent POM. -->
<profile>
<id>test-environment</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>maven.test.skip</name>
<value>false</value>
</property>
</activation>
<build>
<plugins>
<!-- Unit/Integration Testing setup: This plugin unzips the
'testEnvironment.zip' file (created by dspace-parent POM), into
the 'target/testing/' folder, to essentially create a test
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>
@@ -70,104 +171,117 @@
</artifactItem>
</artifactItems>
</configuration>
<executions>
<execution>
<id>setupTestEnvironment</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
</execution>
<execution>
<id>setupIntegrationTestEnvironment</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- This plugin allows us to run a Groovy script in our Maven POM
(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 necessary so that the FileWeaver & Surefire plugins can
use it to initialize the Unit Test Framework's dspace.cfg file.
This is needed by the FileWeaver & Surefire 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:
http://stackoverflow.com/questions/3872355/how-to-convert-file-separator-in-maven
-->
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.4</version>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<id>setproperty</id>
<phase>generate-test-resources</phase>
<phase>generate-test-resources
</phase> <!-- XXX I think this should be 'initialize' - MHW -->
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
pom.properties['agnostic.build.dir']=project.build.directory.replace('\\','/');
project.properties['agnostic.build.dir'] = project.build.directory.replace(File.separator, '/');
println("Initializing Maven property 'agnostic.build.dir' to: " + project.properties['agnostic.build.dir']);
</source>
</configuration>
</execution>
</executions>
</plugin>
<!-- FileWeaver plugin is in charge of initializing & "weaving" together
the dspace.cfg file to be used by the Unit Testing framework -->
<plugin>
<groupId>edu.iu.ul.maven.plugins</groupId>
<artifactId>fileweaver</artifactId>
<version>1.0</version>
<configuration>
<outputs>
<output>
<outputPath>${agnostic.build.dir}/testing</outputPath>
<name>dspace.cfg.woven</name>
<parts>
<part>
<path>${agnostic.build.dir}/testing/dspace/config/dspace.cfg</path>
</part>
<part>
<path>${agnostic.build.dir}/testing/dspace.cfg.more</path>
</part>
</parts>
<properties>
<dspace.dir>${agnostic.build.dir}/testing/dspace</dspace.dir>
</properties>
</output>
</outputs>
</configuration>
<executions>
<execution>
<id>edit-dspace-cfg</id>
<phase>process-test-resources</phase>
<goals>
<goal>weave</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
The ant plugin below ensures that the dspace "woven" configuration file ends up in the dspace directory
The dspace service manager needs this "woven" configuration file when it starts
-->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-test-resources</phase>
<configuration>
<tasks>
<copy file="${agnostic.build.dir}/testing/dspace.cfg.woven" tofile="${agnostic.build.dir}/testing/dspace/config/dspace.cfg" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Run Unit Testing! This plugin just kicks off the tests (when enabled). -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<dspace.dir>${agnostic.build.dir}/testing/dspace</dspace.dir>
<dspace.dir.static>${basedir}/src/test/data/dspaceFolder</dspace.dir.static>
<dspace.configuration>${agnostic.build.dir}/testing/dspace/config/dspace.cfg</dspace.configuration>
<db.schema.path>${agnostic.build.dir}/testing/dspace/etc/h2/database_schema.sql</db.schema.path>
<!-- Specify the dspace.dir to use for test environment -->
<!-- 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 -->
<dspace.log.init.disable>true</dspace.log.init.disable>
</systemPropertyVariables>
</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 -->
<dspace.dir>${agnostic.build.dir}/testing/dspace/</dspace.dir>
<!-- Turn off any DSpace logging -->
<dspace.log.init.disable>true</dspace.log.init.disable>
</systemPropertyVariables>
</configuration>
@@ -175,7 +289,39 @@
</plugins>
</build>
</profile>
</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>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.1-b10</version>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>handle</artifactId>
@@ -193,12 +339,19 @@
<artifactId>dspace-tm-extractors</artifactId>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers</artifactId>
<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>
@@ -213,19 +366,18 @@
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
@@ -235,8 +387,12 @@
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
@@ -258,7 +414,7 @@
</exclusions>
</dependency>
<dependency>
<groupId>jdom</groupId>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
</dependency>
<dependency>
@@ -277,10 +433,6 @@
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jempbox</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15</artifactId>
@@ -298,11 +450,7 @@
<artifactId>poi-scratchpad</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<dependency>
<groupId>net.java.dev.rome</groupId>
<groupId>rome</groupId>
<artifactId>rome</artifactId>
</dependency>
<dependency>
@@ -316,10 +464,16 @@
<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>
<artifactId>xmlParserAPIs</artifactId>
<artifactId>xml-apis</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
@@ -337,14 +491,19 @@
<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>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.dspace.dependencies.jmockit</groupId>
<artifactId>dspace-jmockit</artifactId>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -353,34 +512,57 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.databene</groupId>
<artifactId>contiperf</artifactId>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.rometools</groupId>
<artifactId>rome-modules</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>gr.ekt</groupId>
<artifactId>biblio-transformation-engine</artifactId>
<version>0.82</version>
<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>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.3</version>
<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>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jbibtex</groupId>
<artifactId>jbibtex</artifactId>
<version>1.0.0</version>
<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>${lucene.version}</version>
<version>${solr.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
@@ -392,51 +574,166 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.dspace.dependencies</groupId>
<artifactId>dspace-geoip</artifactId>
<version>1.2.3</version>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
</dependency>
<dependency>
<groupId>org.dspace.dnsjava</groupId>
<groupId>dnsjava</groupId>
<artifactId>dnsjava</artifactId>
<version>2.0.6</version>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>org.ostermiller</groupId>
<artifactId>utils</artifactId>
<version>1.07.00</version>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>4.10.4</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>0.18.6</version>
<groupId>com.coverity.security</groupId>
<artifactId>coverity-escapers</artifactId>
<version>1.1.1</version>
</dependency>
<!-- Gson: Java to Json conversion -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>jdbm</groupId>
<artifactId>jdbm</artifactId>
<version>1.0</version>
</dependency>
<!-- For ImageMagick MediaFilters -->
<dependency>
<groupId>org.im4java</groupId>
<artifactId>im4java</artifactId>
<version>1.4.0</version>
</dependency>
<!-- Flyway DB API (flywaydb.org) is used to manage DB upgrades automatically. -->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>4.0.3</version>
</dependency>
<!-- Google Analytics -->
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-analytics</artifactId>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
</dependency>
<!-- FindBugs -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<type>jar</type>
</dependency>
<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>
</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>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey.version}</version>
</dependency>
<!-- S3 -->
<dependency>
<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... -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,163 @@
/*
* 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

@@ -9,18 +9,23 @@ package org.dspace.administer;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import java.util.UUID;
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.PosixParser;
import org.apache.commons.collections.CollectionUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Community;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CommunityService;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.handle.HandleManager;
import org.dspace.storage.rdbms.DatabaseManager;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.handle.service.HandleService;
/**
* A command-line tool for setting/removing community/sub-community
@@ -30,10 +35,21 @@ import org.dspace.storage.rdbms.DatabaseManager;
* @version $Revision$
*/
public class CommunityFiliator
{
public static void main(String[] argv) throws Exception
{
public class CommunityFiliator {
protected CommunityService communityService;
protected HandleService handleService;
public CommunityFiliator() {
communityService = ContentServiceFactory.getInstance().getCommunityService();
handleService = HandleServiceFactory.getInstance().getHandleService();
}
/**
* @param argv the command line arguments given
* @throws Exception if error
*/
public static void main(String[] argv) throws Exception {
// create an options object and populate it
CommandLineParser parser = new PosixParser();
@@ -54,8 +70,7 @@ public class CommunityFiliator
String parentID = null;
String childID = null;
if (line.hasOption('h'))
{
if (line.hasOption('h')) {
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("CommunityFiliator\n", options);
System.out
@@ -66,45 +81,37 @@ public class CommunityFiliator
System.exit(0);
}
if (line.hasOption('s'))
{
if (line.hasOption('s')) {
command = "set";
}
if (line.hasOption('r'))
{
if (line.hasOption('r')) {
command = "remove";
}
if (line.hasOption('p')) // parent
{
if (line.hasOption('p')) { // parent
parentID = line.getOptionValue('p');
}
if (line.hasOption('c')) // child
{
if (line.hasOption('c')) { // child
childID = line.getOptionValue('c');
}
// now validate
// must have a command set
if (command == null)
{
if (command == null) {
System.out
.println("Error - must run with either set or remove (run with -h flag for details)");
System.exit(1);
}
if ("set".equals(command) || "remove".equals(command))
{
if (parentID == null)
{
if ("set".equals(command) || "remove".equals(command)) {
if (parentID == null) {
System.out.println("Error - a parentID must be specified (run with -h flag for details)");
System.exit(1);
}
if (childID == null)
{
if (childID == null) {
System.out.println("Error - a childID must be specified (run with -h flag for details)");
System.exit(1);
}
@@ -113,63 +120,58 @@ public class CommunityFiliator
CommunityFiliator filiator = new CommunityFiliator();
Context c = new Context();
// ve are superuser!
c.setIgnoreAuthorization(true);
// we are superuser!
c.turnOffAuthorisationSystem();
try
{
try {
// validate and resolve the parent and child IDs into commmunities
Community parent = filiator.resolveCommunity(c, parentID);
Community child = filiator.resolveCommunity(c, childID);
if (parent == null)
{
if (parent == null) {
System.out.println("Error, parent community cannot be found: "
+ parentID);
System.exit(1);
}
if (child == null)
{
if (child == null) {
System.out.println("Error, child community cannot be found: "
+ childID);
System.exit(1);
}
if ("set".equals(command))
{
if ("set".equals(command)) {
filiator.filiate(c, parent, child);
}
else
{
} else {
filiator.defiliate(c, parent, child);
}
}
catch (SQLException sqlE)
{
} catch (SQLException sqlE) {
System.out.println("Error - SQL exception: " + sqlE.toString());
}
catch (AuthorizeException authE)
{
} catch (AuthorizeException authE) {
System.out.println("Error - Authorize exception: "
+ authE.toString());
}
catch (IOException ioE)
{
} catch (IOException ioE) {
System.out.println("Error - IO exception: " + ioE.toString());
}
}
/**
* @param c context
* @param parent parent Community
* @param child child community
* @throws SQLException if database error
* @throws AuthorizeException if authorize error
* @throws IOException if IO error
*/
public void filiate(Context c, Community parent, Community child)
throws SQLException, AuthorizeException, IOException
{
throws SQLException, AuthorizeException, IOException {
// check that a valid filiation would be established
// first test - proposed child must currently be an orphan (i.e.
// top-level)
Community childDad = child.getParentCommunity();
Community childDad = CollectionUtils.isNotEmpty(child.getParentCommunities()) ? child.getParentCommunities()
.iterator().next() : null;
if (childDad != null)
{
if (childDad != null) {
System.out.println("Error, child community: " + child.getID()
+ " already a child of: " + childDad.getID());
System.exit(1);
@@ -177,12 +179,10 @@ public class CommunityFiliator
// second test - circularity: parent's parents can't include proposed
// child
Community[] parentDads = parent.getAllParents();
List<Community> parentDads = parent.getParentCommunities();
for (int i = 0; i < parentDads.length; i++)
{
if (parentDads[i].getID() == child.getID())
{
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);
@@ -190,7 +190,7 @@ public class CommunityFiliator
}
// everthing's OK
parent.addSubcommunity(child);
communityService.addSubcommunity(c, parent, child);
// complete the pending transaction
c.complete();
@@ -198,25 +198,29 @@ public class CommunityFiliator
+ "' is parent of community: '" + child.getID() + "'");
}
/**
* @param c context
* @param parent parent Community
* @param child child community
* @throws SQLException if database error
* @throws AuthorizeException if authorize error
* @throws IOException if IO error
*/
public void defiliate(Context c, Community parent, Community child)
throws SQLException, AuthorizeException, IOException
{
throws SQLException, AuthorizeException, IOException {
// verify that child is indeed a child of parent
Community[] parentKids = parent.getSubcommunities();
List<Community> parentKids = parent.getSubcommunities();
boolean isChild = false;
for (int i = 0; i < parentKids.length; i++)
{
if (parentKids[i].getID() == child.getID())
{
for (int i = 0; i < parentKids.size(); i++) {
if (parentKids.get(i).getID().equals(child.getID())) {
isChild = true;
break;
}
}
if (!isChild)
{
if (!isChild) {
System.out
.println("Error, child community not a child of parent community");
System.exit(1);
@@ -224,9 +228,10 @@ public class CommunityFiliator
// OK remove the mappings - but leave the community, which will become
// top-level
DatabaseManager.updateQuery(c,
"DELETE FROM community2community WHERE parent_comm_id= ? "+
"AND child_comm_id= ? ", parent.getID(), child.getID());
child.getParentCommunities().remove(parent);
parent.getSubcommunities().remove(child);
communityService.update(c, child);
communityService.update(c, parent);
// complete the pending transaction
c.complete();
@@ -235,27 +240,30 @@ public class CommunityFiliator
+ "'");
}
private Community resolveCommunity(Context c, String communityID)
throws SQLException
{
/**
* Find a community by ID
*
* @param c context
* @param communityID community ID
* @return Community object
* @throws SQLException if database error
*/
protected Community resolveCommunity(Context c, String communityID)
throws SQLException {
Community community = null;
if (communityID.indexOf('/') != -1)
{
if (communityID.indexOf('/') != -1) {
// has a / must be a handle
community = (Community) HandleManager.resolveToObject(c,
community = (Community) handleService.resolveToObject(c,
communityID);
// ensure it's a community
if ((community == null)
|| (community.getType() != Constants.COMMUNITY))
{
|| (community.getType() != Constants.COMMUNITY)) {
community = null;
}
}
else
{
community = Community.find(c, Integer.parseInt(communityID));
} else {
community = communityService.find(c, UUID.fromString(communityID));
}
return community;

View File

@@ -7,21 +7,23 @@
*/
package org.dspace.administer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.Console;
import java.util.Arrays;
import java.util.Locale;
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.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.I18nUtil;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.eperson.factory.EPersonServiceFactory;
import org.dspace.eperson.service.EPersonService;
import org.dspace.eperson.service.GroupService;
/**
* A command-line tool for creating an initial administrator for setting up a
@@ -39,24 +41,26 @@ import org.dspace.eperson.Group;
*
* @author Robert Tansley
* @author Richard Jones
*
* @version $Revision$
*/
public final class CreateAdministrator
{
/** DSpace Context object */
private Context context;
public final class CreateAdministrator {
/**
* DSpace Context object
*/
private final Context context;
protected EPersonService ePersonService;
protected GroupService groupService;
/**
* For invoking via the command line. If called with no command line arguments,
* it will negotiate with the user for the administrator details
*
* @param argv
* command-line arguments
* @param argv the command line arguments given
* @throws Exception if error
*/
public static void main(String[] argv)
throws Exception
{
throws Exception {
CommandLineParser parser = new PosixParser();
Options options = new Options();
@@ -71,14 +75,11 @@ public final class CreateAdministrator
CommandLine line = parser.parse(options, argv);
if (line.hasOption("e") && line.hasOption("f") && line.hasOption("l") &&
line.hasOption("c") && line.hasOption("p"))
{
line.hasOption("c") && line.hasOption("p")) {
ca.createAdministrator(line.getOptionValue("e"),
line.getOptionValue("f"), line.getOptionValue("l"),
line.getOptionValue("c"), line.getOptionValue("p"));
}
else
{
} else {
ca.negotiateAdministratorDetails();
}
}
@@ -86,25 +87,24 @@ public final class CreateAdministrator
/**
* constructor, which just creates and object with a ready context
*
* @throws Exception
* @throws Exception if error
*/
private CreateAdministrator()
throws Exception
{
protected CreateAdministrator()
throws Exception {
context = new Context();
groupService = EPersonServiceFactory.getInstance().getGroupService();
ePersonService = EPersonServiceFactory.getInstance().getEPersonService();
}
/**
* Method which will negotiate with the user via the command line to
* obtain the administrator's details
*
* @throws Exception
* @throws Exception if error
*/
private void negotiateAdministratorDetails()
throws Exception
{
// For easier reading of typing
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
protected void negotiateAdministratorDetails()
throws Exception {
Console console = System.console();
System.out.println("Creating an initial administrator account");
@@ -113,102 +113,90 @@ public final class CreateAdministrator
String email = null;
String firstName = null;
String lastName = null;
String password1 = null;
String password2 = null;
char[] password1 = null;
char[] password2 = null;
String language = I18nUtil.DEFAULTLOCALE.getLanguage();
while (!dataOK)
{
while (!dataOK) {
System.out.print("E-mail address: ");
System.out.flush();
email = input.readLine();
if (email != null)
{
email = console.readLine();
if (!StringUtils.isBlank(email)) {
email = email.trim();
} else {
System.out.println("Please provide an email address.");
continue;
}
System.out.print("First name: ");
System.out.flush();
firstName = input.readLine();
firstName = console.readLine();
if (firstName != null)
{
if (firstName != null) {
firstName = firstName.trim();
}
System.out.print("Last name: ");
System.out.flush();
lastName = input.readLine();
lastName = console.readLine();
if (lastName != null)
{
if (lastName != null) {
lastName = lastName.trim();
}
if (ConfigurationManager.getProperty("webui.supported.locales") != null)
{
System.out.println("Select one of the following languages: " + ConfigurationManager.getProperty("webui.supported.locales"));
if (ConfigurationManager.getProperty("webui.supported.locales") != null) {
System.out.println("Select one of the following languages: " + ConfigurationManager
.getProperty("webui.supported.locales"));
System.out.print("Language: ");
System.out.flush();
language = input.readLine();
language = console.readLine();
if (language != null)
{
if (language != null) {
language = language.trim();
language = I18nUtil.getSupportedLocale(new Locale(language)).getLanguage();
}
}
System.out.println("WARNING: Password will appear on-screen.");
System.out.println("Password will not display on screen.");
System.out.print("Password: ");
System.out.flush();
password1 = input.readLine();
if (password1 != null)
{
password1 = password1.trim();
}
password1 = console.readPassword();
System.out.print("Again to confirm: ");
System.out.flush();
password2 = input.readLine();
password2 = console.readPassword();
if (password2 != null)
{
password2 = password2.trim();
}
if (!StringUtils.isEmpty(password1) && StringUtils.equals(password1, password2))
{
//TODO real password validation
if (password1.length > 1 && Arrays.equals(password1, password2)) {
// password OK
System.out.print("Is the above data correct? (y or n): ");
System.out.flush();
String s = input.readLine();
String s = console.readLine();
if (s != null)
{
if (s != null) {
s = s.trim();
if (s.toLowerCase().startsWith("y"))
{
if (s.toLowerCase().startsWith("y")) {
dataOK = true;
}
}
}
else
{
} else {
System.out.println("Passwords don't match");
}
}
// if we make it to here, we are ready to create an administrator
createAdministrator(email, firstName, lastName, language, password1);
createAdministrator(email, firstName, lastName, language, String.valueOf(password1));
//Cleaning arrays that held password
Arrays.fill(password1, ' ');
Arrays.fill(password2, ' ');
}
/**
@@ -218,48 +206,45 @@ public final class CreateAdministrator
* @param email the email for the user
* @param first user's first name
* @param last user's last name
* @param ps desired password
*
* @throws Exception
* @param language preferred language
* @param pw desired password
* @throws Exception if error
*/
private void createAdministrator(String email, String first, String last,
protected void createAdministrator(String email, String first, String last,
String language, String pw)
throws Exception
{
throws Exception {
// Of course we aren't an administrator yet so we need to
// circumvent authorisation
context.setIgnoreAuthorization(true);
context.turnOffAuthorisationSystem();
// Find administrator group
Group admins = Group.find(context, 1);
Group admins = groupService.findByName(context, Group.ADMIN);
if (admins == null)
{
if (admins == null) {
throw new IllegalStateException("Error, no admin group (group 1) found");
}
// Create the administrator e-person
EPerson eperson = EPerson.findByEmail(context,email);
EPerson eperson = ePersonService.findByEmail(context, email);
// check if the email belongs to a registered user,
// if not create a new user with this email
if (eperson == null)
{
eperson = EPerson.create(context);
if (eperson == null) {
eperson = ePersonService.create(context);
eperson.setEmail(email);
eperson.setCanLogIn(true);
eperson.setRequireCertificate(false);
eperson.setSelfRegistered(false);
}
eperson.setLastName(last);
eperson.setFirstName(first);
eperson.setLanguage(language);
eperson.setPassword(pw);
eperson.update();
eperson.setLastName(context, last);
eperson.setFirstName(context, first);
eperson.setLanguage(context, language);
ePersonService.setPassword(eperson, pw);
ePersonService.update(context, eperson);
admins.addMember(eperson);
admins.update();
groupService.addMember(context, admins, eperson);
groupService.update(context, admins);
context.complete();

View File

@@ -1,287 +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.administer;
import java.io.IOException;
import java.sql.SQLException;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.NonUniqueMetadataException;
import org.dspace.core.Context;
/**
* Class representing a particular Dublin Core metadata type, with various
* utility methods. In general, only used for manipulating the registry of
* Dublin Core types in the system, so most users will not need this.
*
* <p>
* The DCType implementation has been deprecated, please use MetadataManager,
* MetadataSchema and MetadataField instead. For backward compatibility the this
* implementation has been updated to transparently call the new classes.
* </p>
*
* @author Robert Tansley
* @author Martin Hald
* @version $Revision$
* @deprecated
*/
public class DCType
{
/** Our context */
private Context ourContext;
/** The matching metadata field */
private MetadataField field = new MetadataField();
/**
* Create a DCType from an existing metadata field.
*
* @param context
* @param field
* @deprecated
*/
public DCType(Context context, MetadataField field)
{
this.ourContext = context;
this.field = field;
}
/**
* Default constructor.
*
* @param context
* @deprecated
*/
public DCType(Context context)
{
this.ourContext = context;
}
/**
* Utility method for quick access to an element and qualifier given the
* type ID.
*
* @param context
* context, in case DC types need to be read in from DB
* @param id
* the DC type ID
* @return a two-String array, string 0 is the element, string 1 is the
* qualifier
* @deprecated
*/
public static String[] quickFind(Context context, int id)
throws SQLException
{
MetadataField field = MetadataField.find(context, id);
String[] result = new String[2];
if (field == null)
{
return result;
}
else
{
result[0] = field.getElement();
result[1] = field.getQualifier();
return result;
}
}
/**
* Get a metadata field from the database.
*
* @param context
* DSpace context object
* @param id
* ID of the dublin core type
*
* @return the metadata field, or null if the ID is invalid.
* @deprecated
*/
public static DCType find(Context context, int id) throws SQLException
{
MetadataField field = MetadataField.find(context, id);
return new DCType(context, field);
}
/**
* Find a given Dublin Core type. Returns <code>null</code> if the Dublin
* Core type doesn't exist.
*
* @param context
* the DSpace context to use
* @param element
* the element to find
* @param qualifier
* the qualifier, or <code>null</code> to find an unqualified
* type
*
* @return the Dublin Core type, or <code>null</code> if there isn't a
* corresponding type in the registry
* @throws AuthorizeException
* @deprecated
*/
public static DCType findByElement(Context context, String element,
String qualifier) throws SQLException, AuthorizeException
{
MetadataField field = MetadataField.findByElement(context,
MetadataSchema.DC_SCHEMA_ID, element, qualifier);
if (field == null)
{
return null;
}
else
{
return new DCType(context, field);
}
}
/**
* Retrieve all Dublin Core types from the registry
*
* @return an array of all the Dublin Core types
* @deprecated
*/
public static DCType[] findAll(Context context) throws SQLException
{
MetadataField field[] = MetadataField.findAll(context);
DCType[] typeArray = new DCType[field.length];
for (int ii = 0; ii < field.length; ii++)
{
typeArray[ii] = new DCType(context, field[ii]);
}
// Return the array
return typeArray;
}
/**
* Create a new Dublin Core type
*
* @param context
* DSpace context object
* @return the newly created DCType
* @throws NonUniqueMetadataException
* @throws IOException
* @deprecated
*/
public static DCType create(Context context) throws SQLException,
AuthorizeException, IOException, NonUniqueMetadataException
{
MetadataField field = new MetadataField();
field.setSchemaID(MetadataSchema.DC_SCHEMA_ID);
field.create(context);
return new DCType(context, field);
}
/**
* Delete this DC type. This won't work if there are any DC values in the
* database of this type - they need to be updated first. An
* <code>SQLException</code> (referential integrity violation) will be
* thrown in this case.
* @deprecated
*/
public void delete() throws SQLException, AuthorizeException
{
field.delete(ourContext);
}
/**
* Get the internal identifier of this metadata field
*
* @return the internal identifier
*/
public int getID()
{
return field.getFieldID();
}
/**
* Get the DC element
*
* @return the element
*/
public String getElement()
{
return field.getElement();
}
/**
* Set the DC element
*
* @param s
* the new element
*/
public void setElement(String s)
{
field.setElement(s);
}
/**
* Get the DC qualifier, if any.
*
* @return the DC qualifier, or <code>null</code> if this is an
* unqualified element
*/
public String getQualifier()
{
return field.getQualifier();
}
/**
* Set the DC qualifier
*
* @param s
* the DC qualifier, or <code>null</code> if this is an
* unqualified element
*/
public void setQualifier(String s)
{
field.setQualifier(s);
}
/**
* Get the scope note - information about the DC type and its use
*
* @return the scope note
*/
public String getScopeNote()
{
return field.getScopeNote();
}
/**
* Set the scope note
*
* @param s
* the new scope note
*/
public void setScopeNote(String s)
{
field.setScopeNote(s);
}
/**
* Update the dublin core registry
*
* @throws IOException
* @throws NonUniqueMetadataException
* @deprecated
*/
public void update() throws SQLException, AuthorizeException,
NonUniqueMetadataException, IOException
{
field.update(ourContext);
}
}

View File

@@ -12,6 +12,7 @@ import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.cli.CommandLine;
@@ -24,6 +25,9 @@ import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.MetadataFieldService;
import org.dspace.content.service.MetadataSchemaService;
import org.dspace.core.Context;
import org.xml.sax.SAXException;
@@ -35,27 +39,37 @@ import org.xml.sax.SAXException;
* from the metadata schemas for the repository.
*
* The form of the XML is as follows
*
* {@code
* <metadata-schemas>
* <schema>
* <name>dc</name>
* <namespace>http://dublincore.org/documents/dcmi-terms/</namespace>
* </schema>
* </metadata-schemas>
* }
*/
public class MetadataExporter
{
public class MetadataExporter {
protected static MetadataSchemaService metadataSchemaService = ContentServiceFactory.getInstance()
.getMetadataSchemaService();
protected static MetadataFieldService metadataFieldService = ContentServiceFactory.getInstance()
.getMetadataFieldService();
/**
* @param args
* @throws ParseException
* @throws SAXException
* @throws IOException
* @throws SQLException
* @throws RegistryExportException
* Default constructor
*/
public static void main(String[] args) throws ParseException, SQLException, IOException, SAXException, RegistryExportException
{
private MetadataExporter() { }
/**
* @param args commandline arguments
* @throws ParseException if parser error
* @throws SAXException if XML parse error
* @throws IOException if IO error
* @throws SQLException if database error
* @throws RegistryExportException if export error
*/
public static void main(String[] args)
throws ParseException, SQLException, IOException, SAXException, RegistryExportException {
// create an options object and populate it
CommandLineParser parser = new PosixParser();
Options options = new Options();
@@ -66,29 +80,35 @@ public class MetadataExporter
String file = null;
String schema = null;
if (line.hasOption('f'))
{
if (line.hasOption('f')) {
file = line.getOptionValue('f');
}
else
{
} else {
usage();
System.exit(0);
}
if (line.hasOption('s'))
{
if (line.hasOption('s')) {
schema = line.getOptionValue('s');
}
saveRegistry(file, schema);
}
public static void saveRegistry(String file, String schema) throws SQLException, IOException, SAXException, RegistryExportException
{
/**
* Save a registry to a filepath
*
* @param file filepath
* @param schema schema definition to save
* @throws SQLException if database error
* @throws IOException if IO error
* @throws SAXException if XML error
* @throws RegistryExportException if export error
*/
public static void saveRegistry(String file, String schema)
throws SQLException, IOException, SAXException, RegistryExportException {
// create a context
Context context = new Context();
context.setIgnoreAuthorization(true);
context.turnOffAuthorisationSystem();
OutputFormat xmlFormat = new OutputFormat(Method.XML, "UTF-8", true);
xmlFormat.setLineWidth(120);
@@ -102,30 +122,25 @@ public class MetadataExporter
// Save the schema definition(s)
saveSchema(context, xmlSerializer, schema);
MetadataField[] mdFields = null;
List<MetadataField> mdFields = null;
// If a single schema has been specified
if (schema != null && !"".equals(schema))
{
if (schema != null && !"".equals(schema)) {
// Get the id of that schema
MetadataSchema mdSchema = MetadataSchema.find(context, schema);
if (mdSchema == null)
{
MetadataSchema mdSchema = metadataSchemaService.find(context, schema);
if (mdSchema == null) {
throw new RegistryExportException("no schema to export");
}
// Get the metadata fields only for the specified schema
mdFields = MetadataField.findAllInSchema(context, mdSchema.getSchemaID());
}
else
{
mdFields = metadataFieldService.findAllInSchema(context, mdSchema);
} else {
// Get the metadata fields for all the schemas
mdFields = MetadataField.findAll(context);
mdFields = metadataFieldService.findAll(context);
}
// Output the metadata fields
for (MetadataField mdField : mdFields)
{
for (MetadataField mdField : mdFields) {
saveType(context, xmlSerializer, mdField);
}
@@ -138,29 +153,26 @@ public class MetadataExporter
/**
* Serialize the schema registry. If the parameter 'schema' is null or empty, save all schemas
* @param context
* @param xmlSerializer
* @param schema
* @throws SQLException
* @throws SAXException
* @throws RegistryExportException
*
* @param context DSpace Context
* @param xmlSerializer XML serializer
* @param schema schema (may be null to save all)
* @throws SQLException if database error
* @throws SAXException if XML error
* @throws RegistryExportException if export error
*/
public static void saveSchema(Context context, XMLSerializer xmlSerializer, String schema) throws SQLException, SAXException, RegistryExportException
{
if (schema != null && !"".equals(schema))
{
public static void saveSchema(Context context, XMLSerializer xmlSerializer, String schema)
throws SQLException, SAXException, RegistryExportException {
if (schema != null && !"".equals(schema)) {
// Find a single named schema
MetadataSchema mdSchema = MetadataSchema.find(context, schema);
MetadataSchema mdSchema = metadataSchemaService.find(context, schema);
saveSchema(xmlSerializer, mdSchema);
}
else
{
} else {
// Find all schemas
MetadataSchema[] mdSchemas = MetadataSchema.findAll(context);
List<MetadataSchema> mdSchemas = metadataSchemaService.findAll(context);
for (MetadataSchema mdSchema : mdSchemas)
{
for (MetadataSchema mdSchema : mdSchemas) {
saveSchema(xmlSerializer, mdSchema);
}
}
@@ -169,30 +181,27 @@ public class MetadataExporter
/**
* Serialize a single schema (namespace) registry entry
*
* @param xmlSerializer
* @param mdSchema
* @throws SAXException
* @throws RegistryExportException
* @param xmlSerializer XML serializer
* @param mdSchema DSpace metadata schema
* @throws SAXException if XML error
* @throws RegistryExportException if export error
*/
private static void saveSchema(XMLSerializer xmlSerializer, MetadataSchema mdSchema) throws SAXException, RegistryExportException
{
private static void saveSchema(XMLSerializer xmlSerializer, MetadataSchema mdSchema)
throws SAXException, RegistryExportException {
// If we haven't got a schema, it's an error
if (mdSchema == null)
{
if (mdSchema == null) {
throw new RegistryExportException("no schema to export");
}
String name = mdSchema.getName();
String namespace = mdSchema.getNamespace();
if (name == null || "".equals(name))
{
if (name == null || "".equals(name)) {
System.out.println("name is null, skipping");
return;
}
if (namespace == null || "".equals(namespace))
{
if (namespace == null || "".equals(namespace)) {
System.out.println("namespace is null, skipping");
return;
}
@@ -216,19 +225,18 @@ public class MetadataExporter
/**
* Serialize a single metadata field registry entry to xml
*
* @param context
* @param xmlSerializer
* @param mdField
* @throws SAXException
* @throws RegistryExportException
* @throws SQLException
* @throws IOException
* @param context DSpace context
* @param xmlSerializer xml serializer
* @param mdField DSpace metadata field
* @throws SAXException if XML error
* @throws RegistryExportException if export error
* @throws SQLException if database error
* @throws IOException if IO error
*/
private static void saveType(Context context, XMLSerializer xmlSerializer, MetadataField mdField) throws SAXException, RegistryExportException, SQLException, IOException
{
private static void saveType(Context context, XMLSerializer xmlSerializer, MetadataField mdField)
throws SAXException, RegistryExportException, SQLException, IOException {
// If we haven't been given a field, it's an error
if (mdField == null)
{
if (mdField == null) {
throw new RegistryExportException("no field to export");
}
@@ -239,8 +247,7 @@ public class MetadataExporter
String scopeNote = mdField.getScopeNote();
// We must have a schema and element
if (schemaName == null || element == null)
{
if (schemaName == null || element == null) {
throw new RegistryExportException("incomplete field information");
}
@@ -258,53 +265,50 @@ public class MetadataExporter
xmlSerializer.endElement("element");
// Output the qualifier, if present
if (qualifier != null)
{
if (qualifier != null) {
xmlSerializer.startElement("qualifier", null);
xmlSerializer.characters(qualifier.toCharArray(), 0, qualifier.length());
xmlSerializer.endElement("qualifier");
}
else
{
} else {
xmlSerializer.comment("unqualified");
}
// Output the scope note, if present
if (scopeNote != null)
{
if (scopeNote != null) {
xmlSerializer.startElement("scope_note", null);
xmlSerializer.characters(scopeNote.toCharArray(), 0, scopeNote.length());
xmlSerializer.endElement("scope_note");
}
else
{
} else {
xmlSerializer.comment("no scope note");
}
xmlSerializer.endElement("dc-type");
}
static Map<Integer, String> schemaMap = new HashMap<Integer, String>();
/**
* Helper method to retrieve a schema name for the field.
* Caches the name after looking up the id.
*
* @param context DSpace Context
* @param mdField DSpace metadata field
* @return name of schema
* @throws SQLException if database error
* @throws RegistryExportException if export error
*/
static Map<Integer, String> schemaMap = new HashMap<Integer, String>();
private static String getSchemaName(Context context, MetadataField mdField) throws SQLException, RegistryExportException
{
private static String getSchemaName(Context context, MetadataField mdField)
throws SQLException, RegistryExportException {
// Get name from cache
String name = schemaMap.get(Integer.valueOf(mdField.getSchemaID()));
String name = schemaMap.get(mdField.getMetadataSchema().getID());
if (name == null)
{
if (name == null) {
// Name not retrieved before, so get the schema now
MetadataSchema mdSchema = MetadataSchema.find(context, mdField.getSchemaID());
if (mdSchema != null)
{
MetadataSchema mdSchema = metadataSchemaService.find(context, mdField.getMetadataSchema().getID());
if (mdSchema != null) {
name = mdSchema.getName();
schemaMap.put(Integer.valueOf(mdSchema.getSchemaID()), name);
}
else
{
schemaMap.put(mdSchema.getID(), name);
} else {
// Can't find the schema
throw new RegistryExportException("Can't get schema name for field");
}
@@ -315,8 +319,7 @@ public class MetadataExporter
/**
* Print the usage message to stdout
*/
public static void usage()
{
public static void usage() {
String usage = "Use this class with the following options:\n" +
" -f <xml output file> : specify the output file for the schemas\n" +
" -s <schema> : name of the schema to export\n";

View File

@@ -9,7 +9,6 @@ package org.dspace.administer;
import java.io.IOException;
import java.sql.SQLException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
@@ -18,19 +17,20 @@ import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.NonUniqueMetadataException;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.MetadataFieldService;
import org.dspace.content.service.MetadataSchemaService;
import org.dspace.core.Context;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
@@ -42,6 +42,7 @@ import org.xml.sax.SAXException;
*
* The format of the XML file is as follows:
*
* {@code
* <dspace-dc-types>
* <dc-type>
* <schema>icadmin</schema>
@@ -53,17 +54,42 @@ import org.xml.sax.SAXException;
* [....]
*
* </dspace-dc-types>
* }
*/
public class MetadataImporter
{
public class MetadataImporter {
protected static MetadataSchemaService metadataSchemaService = ContentServiceFactory.getInstance()
.getMetadataSchemaService();
protected static MetadataFieldService metadataFieldService = ContentServiceFactory.getInstance()
.getMetadataFieldService();
/**
* logging category
*/
private static final Logger log = LoggerFactory.getLogger(MetadataImporter.class);
/**
* Default constructor
*/
private MetadataImporter() { }
/**
* main method for reading user input from the command line
*/
*
* @param args the command line arguments given
* @throws ParseException if parse error
* @throws SQLException if database error
* @throws IOException if IO error
* @throws TransformerException if transformer error
* @throws ParserConfigurationException if config error
* @throws AuthorizeException if authorization error
* @throws SAXException if parser error
* @throws NonUniqueMetadataException if duplicate metadata
* @throws RegistryImportException if import fails
**/
public static void main(String[] args)
throws ParseException, SQLException, IOException, TransformerException,
ParserConfigurationException, AuthorizeException, SAXException,
NonUniqueMetadataException, RegistryImportException
{
NonUniqueMetadataException, RegistryImportException {
boolean forceUpdate = false;
// create an options object and populate it
@@ -74,12 +100,9 @@ public class MetadataImporter
CommandLine line = parser.parse(options, args);
String file = null;
if (line.hasOption('f'))
{
if (line.hasOption('f')) {
file = line.getOptionValue('f');
}
else
{
} else {
usage();
System.exit(0);
}
@@ -92,14 +115,25 @@ public class MetadataImporter
* Load the data from the specified file path into the database
*
* @param file the file path containing the source data
* @param forceUpdate whether to force update
* @throws SQLException if database error
* @throws IOException if IO error
* @throws TransformerException if transformer error
* @throws ParserConfigurationException if config error
* @throws AuthorizeException if authorization error
* @throws SAXException if parser error
* @throws NonUniqueMetadataException if duplicate metadata
* @throws RegistryImportException if import fails
*/
public static void loadRegistry(String file, boolean forceUpdate)
throws SQLException, IOException, TransformerException, ParserConfigurationException,
AuthorizeException, SAXException, NonUniqueMetadataException, RegistryImportException
{
AuthorizeException, SAXException, NonUniqueMetadataException, RegistryImportException {
Context context = null;
try {
// create a context
Context context = new Context();
context.setIgnoreAuthorization(true);
context = new Context();
context.turnOffAuthorisationSystem();
// read the XML
Document document = RegistryImporter.loadXML(file);
@@ -108,8 +142,7 @@ public class MetadataImporter
NodeList schemaNodes = XPathAPI.selectNodeList(document, "/dspace-dc-types/dc-schema");
// Add each one as a new format to the registry
for (int i = 0; i < schemaNodes.getLength(); i++)
{
for (int i = 0; i < schemaNodes.getLength(); i++) {
Node n = schemaNodes.item(i);
loadSchema(context, n, forceUpdate);
}
@@ -118,81 +151,73 @@ public class MetadataImporter
NodeList typeNodes = XPathAPI.selectNodeList(document, "/dspace-dc-types/dc-type");
// Add each one as a new format to the registry
for (int i = 0; i < typeNodes.getLength(); i++)
{
for (int i = 0; i < typeNodes.getLength(); i++) {
Node n = typeNodes.item(i);
loadType(context, n);
}
context.restoreAuthSystemState();
context.complete();
} finally {
// Clean up our context, if it still exists & it was never completed
if (context != null && context.isValid()) {
context.abort();
}
}
}
/**
* Process a node in the metadata registry XML file. If the
* schema already exists, it will not be recreated
*
* @param context
* DSpace context object
* @param node
* the node in the DOM tree
* @throws NonUniqueMetadataException
* @param context DSpace context object
* @param node the node in the DOM tree
* @throws SQLException if database error
* @throws IOException if IO error
* @throws TransformerException if transformer error
* @throws AuthorizeException if authorization error
* @throws NonUniqueMetadataException if duplicate metadata
* @throws RegistryImportException if import fails
*/
private static void loadSchema(Context context, Node node, boolean updateExisting)
throws SQLException, IOException, TransformerException,
AuthorizeException, NonUniqueMetadataException, RegistryImportException
{
AuthorizeException, NonUniqueMetadataException, RegistryImportException {
// Get the values
String name = RegistryImporter.getElementData(node, "name");
String namespace = RegistryImporter.getElementData(node, "namespace");
if (name == null || "".equals(name))
{
if (name == null || "".equals(name)) {
throw new RegistryImportException("Name of schema must be supplied");
}
if (namespace == null || "".equals(namespace))
{
if (namespace == null || "".equals(namespace)) {
throw new RegistryImportException("Namespace of schema must be supplied");
}
System.out.print("Registering Schema: " + name + " - " + namespace + " ... ");
// check to see if the schema already exists
MetadataSchema s = MetadataSchema.find(context, name);
MetadataSchema s = metadataSchemaService.find(context, name);
if (s == null)
{
if (s == null) {
// Schema does not exist - create
MetadataSchema schema = new MetadataSchema(namespace, name);
schema.create(context);
System.out.println("created");
}
else
{
log.info("Registering Schema " + name + " (" + namespace + ")");
metadataSchemaService.create(context, name, namespace);
} else {
// Schema exists - if it's the same namespace, allow the type imports to continue
if (s.getNamespace().equals(namespace))
{
System.out.println("already exists, skipping to type import");
if (s.getNamespace().equals(namespace)) {
// This schema already exists with this namespace, skipping it
return;
}
// It's a different namespace - have we been told to update?
if (updateExisting)
{
if (updateExisting) {
// Update the existing schema namespace and continue to type import
log.info("Updating Schema " + name + ": New namespace " + namespace);
s.setNamespace(namespace);
s.update(context);
System.out.println("namespace updated (" + name + " = " + namespace + ")");
}
else
{
// Don't update the existing namespace - abort abort abort
System.out.println("schema exists, but with different namespace");
System.out.println("was: " + s.getNamespace());
System.out.println("xml: " + namespace);
System.out.println("aborting - use -u to force the update");
throw new RegistryImportException("schema already registered with different namespace - use -u to update");
metadataSchemaService.update(context, s);
} else {
throw new RegistryImportException(
"Schema " + name + " already registered with different namespace " + namespace + ". Rerun with " +
"'update' option enabled if you wish to update this schema.");
}
}
@@ -203,16 +228,18 @@ public class MetadataImporter
* be a "dc-type" node. If the type already exists, then it
* will not be reimported
*
* @param context
* DSpace context object
* @param node
* the node in the DOM tree
* @throws NonUniqueMetadataException
* @param context DSpace context object
* @param node the node in the DOM tree
* @throws SQLException if database error
* @throws IOException if IO error
* @throws TransformerException if transformer error
* @throws AuthorizeException if authorization error
* @throws NonUniqueMetadataException if duplicate metadata
* @throws RegistryImportException if import fails
*/
private static void loadType(Context context, Node node)
throws SQLException, IOException, TransformerException,
AuthorizeException, NonUniqueMetadataException, RegistryImportException
{
AuthorizeException, NonUniqueMetadataException, RegistryImportException {
// Get the values
String schema = RegistryImporter.getElementData(node, "schema");
String element = RegistryImporter.getElementData(node, "element");
@@ -220,42 +247,38 @@ public class MetadataImporter
String scopeNote = RegistryImporter.getElementData(node, "scope_note");
// If the schema is not provided default to DC
if (schema == null)
{
if (schema == null) {
schema = MetadataSchema.DC_SCHEMA;
}
System.out.print("Registering Metadata: " + schema + "." + element + "." + qualifier + " ... ");
// Find the matching schema object
MetadataSchema schemaObj = MetadataSchema.find(context, schema);
MetadataSchema schemaObj = metadataSchemaService.find(context, schema);
if (schemaObj == null)
{
throw new RegistryImportException("Schema '" + schema + "' is not registered");
if (schemaObj == null) {
throw new RegistryImportException("Schema '" + schema + "' is not registered and does not exist.");
}
MetadataField mf = MetadataField.findByElement(context, schemaObj.getSchemaID(), element, qualifier);
if (mf != null)
{
System.out.println("already exists, skipping");
MetadataField mf = metadataFieldService.findByElement(context, schemaObj, element, qualifier);
if (mf != null) {
// Metadata field already exists, skipping it
return;
}
MetadataField field = new MetadataField();
field.setSchemaID(schemaObj.getSchemaID());
field.setElement(element);
field.setQualifier(qualifier);
field.setScopeNote(scopeNote);
field.create(context);
System.out.println("created");
// Actually create this metadata field as it doesn't yet exist
String fieldName = schema + "." + element + "." + qualifier;
if (qualifier == null) {
fieldName = schema + "." + element;
}
log.info("Registering metadata field " + fieldName);
MetadataField field = metadataFieldService.create(context, schemaObj, element, qualifier, scopeNote);
metadataFieldService.update(context, field);
}
/**
* Print the usage message to stdout
*/
public static void usage()
{
public static void usage() {
String usage = "Use this class with the following option:\n" +
" -f <xml source file> : specify which xml source file " +
"contains the DC fields to import.\n";

View File

@@ -12,44 +12,39 @@ package org.dspace.administer;
*
* An exception to report any problems with registry exports
*/
public class RegistryExportException extends Exception
{
public class RegistryExportException extends Exception {
/**
* Create an empty authorize exception
*/
public RegistryExportException()
{
public RegistryExportException() {
super();
}
/**
* create an exception with only a message
*
* @param message
* @param message exception message
*/
public RegistryExportException(String message)
{
public RegistryExportException(String message) {
super(message);
}
/**
* create an exception with an inner exception and a message
*
* @param message
* @param e
* @param message exception message
* @param e reference to Throwable
*/
public RegistryExportException(String message, Throwable e)
{
public RegistryExportException(String message, Throwable e) {
super(message, e);
}
/**
* create an exception with an inner exception
*
* @param e
* @param e reference to Throwable
*/
public RegistryExportException(Throwable e)
{
public RegistryExportException(Throwable e) {
super(e);
}

View File

@@ -12,44 +12,39 @@ package org.dspace.administer;
*
* An exception to report any problems with registry imports
*/
public class RegistryImportException extends Exception
{
public class RegistryImportException extends Exception {
/**
* Create an empty authorize exception
*/
public RegistryImportException()
{
public RegistryImportException() {
super();
}
/**
* create an exception with only a message
*
* @param message
* @param message error message
*/
public RegistryImportException(String message)
{
public RegistryImportException(String message) {
super(message);
}
/**
* create an exception with an inner exception and a message
*
* @param message
* @param e
* @param message error message
* @param e throwable
*/
public RegistryImportException(String message, Throwable e)
{
public RegistryImportException(String message, Throwable e) {
super(message, e);
}
/**
* create an exception with an inner exception
*
* @param e
* @param e throwable
*/
public RegistryImportException(Throwable e)
{
public RegistryImportException(Throwable e) {
super(e);
}

View File

@@ -9,18 +9,15 @@ package org.dspace.administer;
import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.apache.xpath.XPathAPI;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
@@ -31,19 +28,24 @@ import org.xml.sax.SAXException;
* I am the author, really I ripped these methods off from other
* classes
*/
public class RegistryImporter
{
public class RegistryImporter {
/**
* Default constructor
*/
private RegistryImporter() { }
/**
* Load in the XML from file.
*
* @param filename
* the filename to load from
*
* @param filename the filename to load from
* @return the DOM representation of the XML file
* @throws IOException if IO error
* @throws ParserConfigurationException if configuration parse error
* @throws SAXException if XML parse error
*/
public static Document loadXML(String filename)
throws IOException, ParserConfigurationException, SAXException
{
throws IOException, ParserConfigurationException, SAXException {
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
@@ -64,21 +66,17 @@ public class RegistryImporter
* </P>
* Why this isn't a core part of the XML API I do not know...
*
* @param parentElement
* the element, whose child element you want the CDATA from
* @param childName
* the name of the element you want the CDATA from
*
* @param parentElement the element, whose child element you want the CDATA from
* @param childName the name of the element you want the CDATA from
* @return the CDATA as a <code>String</code>
* @throws TransformerException if error
*/
public static String getElementData(Node parentElement, String childName)
throws TransformerException
{
throws TransformerException {
// Grab the child node
Node childNode = XPathAPI.selectSingleNode(parentElement, childName);
if (childNode == null)
{
if (childNode == null) {
// No child node, so no values
return null;
}
@@ -86,8 +84,7 @@ public class RegistryImporter
// Get the #text
Node dataNode = childNode.getFirstChild();
if (dataNode == null)
{
if (dataNode == null) {
return null;
}
@@ -112,23 +109,19 @@ public class RegistryImporter
* </P>
* Why this also isn't a core part of the XML API I do not know...
*
* @param parentElement
* the element, whose child element you want the CDATA from
* @param childName
* the name of the element you want the CDATA from
*
* @param parentElement the element, whose child element you want the CDATA from
* @param childName the name of the element you want the CDATA from
* @return the CDATA as a <code>String</code>
* @throws TransformerException if error
*/
public static String[] getRepeatedElementData(Node parentElement,
String childName) throws TransformerException
{
String childName) throws TransformerException {
// Grab the child node
NodeList childNodes = XPathAPI.selectNodeList(parentElement, childName);
String[] data = new String[childNodes.getLength()];
for (int i = 0; i < childNodes.getLength(); i++)
{
for (int i = 0; i < childNodes.getLength(); i++) {
// Get the #text node
Node dataNode = childNodes.item(i).getFirstChild();

View File

@@ -10,7 +10,8 @@ package org.dspace.administer;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -20,9 +21,8 @@ import org.apache.log4j.Logger;
import org.apache.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.NonUniqueMetadataException;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.BitstreamFormatService;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.w3c.dom.Document;
@@ -43,88 +43,86 @@ import org.xml.sax.SAXException;
* @author Robert Tansley
* @version $Revision$
*/
public class RegistryLoader
{
/** log4j category */
public class RegistryLoader {
/**
* log4j category
*/
private static Logger log = Logger.getLogger(RegistryLoader.class);
protected static BitstreamFormatService bitstreamFormatService = ContentServiceFactory.getInstance()
.getBitstreamFormatService();
/**
* Default constructor
*/
private RegistryLoader() { }
/**
* For invoking via the command line
*
* @param argv
* command-line arguments
* @param argv the command line arguments given
* @throws Exception if error
*/
public static void main(String[] argv) throws Exception
{
public static void main(String[] argv) throws Exception {
String usage = "Usage: " + RegistryLoader.class.getName()
+ " (-bitstream | -dc) registry-file.xml";
+ " (-bitstream | -metadata) registry-file.xml";
Context context = null;
try
{
try {
context = new Context();
// Can't update registries anonymously, so we need to turn off
// authorisation
context.setIgnoreAuthorization(true);
context.turnOffAuthorisationSystem();
// Work out what we're loading
if (argv[0].equalsIgnoreCase("-bitstream"))
{
if (argv[0].equalsIgnoreCase("-bitstream")) {
RegistryLoader.loadBitstreamFormats(context, argv[1]);
}
else if (argv[0].equalsIgnoreCase("-dc"))
{
loadDublinCoreTypes(context, argv[1]);
}
else
{
} else if (argv[0].equalsIgnoreCase("-metadata")) {
// Call MetadataImporter, as it handles Metadata schema updates
MetadataImporter.loadRegistry(argv[1], true);
} else {
System.err.println(usage);
}
// Commit changes and close Context
context.complete();
System.exit(0);
}
catch (ArrayIndexOutOfBoundsException ae)
{
} catch (ArrayIndexOutOfBoundsException ae) {
System.err.println(usage);
if (context != null)
{
context.abort();
}
System.exit(1);
}
catch (Exception e)
{
} catch (Exception e) {
log.fatal(LogManager.getHeader(context, "error_loading_registries",
""), e);
if (context != null)
{
context.abort();
}
System.err.println("Error: \n - " + e.getMessage());
System.exit(1);
} finally {
// Clean up our context, if it still exists & it was never completed
if (context != null && context.isValid()) {
context.abort();
}
}
}
/**
* Load Bitstream Format metadata
*
* @param context
* DSpace context object
* @param filename
* the filename of the XML file to load
* @param context DSpace context object
* @param filename the filename of the XML file to load
* @throws SQLException if database error
* @throws IOException if IO error
* @throws TransformerException if transformer error
* @throws ParserConfigurationException if config error
* @throws AuthorizeException if authorization error
* @throws SAXException if parser error
*/
public static void loadBitstreamFormats(Context context, String filename)
throws SQLException, IOException, ParserConfigurationException,
SAXException, TransformerException, AuthorizeException
{
SAXException, TransformerException, AuthorizeException {
Document document = loadXML(filename);
// Get the nodes corresponding to formats
@@ -132,8 +130,7 @@ public class RegistryLoader
"dspace-bitstream-types/bitstream-type");
// Add each one as a new format to the registry
for (int i = 0; i < typeNodes.getLength(); i++)
{
for (int i = 0; i < typeNodes.getLength(); i++) {
Node n = typeNodes.item(i);
loadFormat(context, n);
}
@@ -146,15 +143,16 @@ public class RegistryLoader
* Process a node in the bitstream format registry XML file. The node must
* be a "bitstream-type" node
*
* @param context
* DSpace context object
* @param node
* the node in the DOM tree
* @param context DSpace context object
* @param node the node in the DOM tree
* @throws SQLException if database error
* @throws IOException if IO error
* @throws TransformerException if transformer error
* @throws AuthorizeException if authorization error
*/
private static void loadFormat(Context context, Node node)
throws SQLException, IOException, TransformerException,
AuthorizeException
{
AuthorizeException {
// Get the values
String mimeType = getElementData(node, "mimetype");
String shortDesc = getElementData(node, "short_description");
@@ -168,124 +166,32 @@ public class RegistryLoader
String[] extensions = getRepeatedElementData(node, "extension");
// Check if this format already exists in our registry (by mime type)
BitstreamFormat exists = bitstreamFormatService.findByMIMEType(context, mimeType);
// If not found by mimeType, check by short description (since this must also be unique)
if (exists == null) {
exists = bitstreamFormatService.findByShortDescription(context, shortDesc);
}
// If it doesn't exist, create it..otherwise skip it.
if (exists == null) {
// Create the format object
BitstreamFormat format = BitstreamFormat.create(context);
BitstreamFormat format = bitstreamFormatService.create(context);
// Fill it out with the values
format.setMIMEType(mimeType);
format.setShortDescription(shortDesc);
bitstreamFormatService.setShortDescription(context, format, shortDesc);
format.setDescription(desc);
format.setSupportLevel(supportLevel);
format.setInternal(internal);
format.setExtensions(extensions);
ArrayList<String> extensionList = new ArrayList<>();
extensionList.addAll(Arrays.asList(extensions));
format.setExtensions(extensionList);
// Write to database
format.update();
bitstreamFormatService.update(context, format);
}
/**
* Load Dublin Core types
*
* @param context
* DSpace context object
* @param filename
* the filename of the XML file to load
* @throws NonUniqueMetadataException
*/
public static void loadDublinCoreTypes(Context context, String filename)
throws SQLException, IOException, ParserConfigurationException,
SAXException, TransformerException, AuthorizeException,
NonUniqueMetadataException
{
Document document = loadXML(filename);
// Get the nodes corresponding to schemas
NodeList schemaNodes = XPathAPI.selectNodeList(document,
"/dspace-dc-types/dc-schema");
// Add each schema
for (int i = 0; i < schemaNodes.getLength(); i++)
{
Node n = schemaNodes.item(i);
loadMDSchema(context, n);
}
// Get the nodes corresponding to fields
NodeList typeNodes = XPathAPI.selectNodeList(document,
"/dspace-dc-types/dc-type");
// Add each one as a new field to the schema
for (int i = 0; i < typeNodes.getLength(); i++)
{
Node n = typeNodes.item(i);
loadDCType(context, n);
}
log.info(LogManager.getHeader(context, "load_dublin_core_types",
"number_loaded=" + typeNodes.getLength()));
}
/**
* Load Dublin Core Schemas
*
* @param context
* @param node
*/
private static void loadMDSchema(Context context, Node node)
throws TransformerException, SQLException, AuthorizeException,
NonUniqueMetadataException
{
// Get the values
String shortname = getElementData(node, "name");
String namespace = getElementData(node, "namespace");
// Check if the schema exists already
MetadataSchema schema = MetadataSchema.find(context, shortname);
if (schema == null)
{
// If not create it.
schema = new MetadataSchema();
schema.setNamespace(namespace);
schema.setName(shortname);
schema.create(context);
}
}
/**
* Process a node in the bitstream format registry XML file. The node must
* be a "bitstream-type" node
*
* @param context
* DSpace context object
* @param node
* the node in the DOM tree
* @throws NonUniqueMetadataException
*/
private static void loadDCType(Context context, Node node)
throws SQLException, IOException, TransformerException,
AuthorizeException, NonUniqueMetadataException
{
// Get the values
String schema = getElementData(node, "schema");
String element = getElementData(node, "element");
String qualifier = getElementData(node, "qualifier");
String scopeNote = getElementData(node, "scope_note");
// If the schema is not provided default to DC
if (schema == null)
{
schema = MetadataSchema.DC_SCHEMA;
}
// Find the matching schema object
MetadataSchema schemaObj = MetadataSchema.find(context, schema);
MetadataField field = new MetadataField();
field.setSchemaID(schemaObj.getSchemaID());
field.setElement(element);
field.setQualifier(qualifier);
field.setScopeNote(scopeNote);
field.create(context);
}
// ===================== XML Utility Methods =========================
@@ -293,14 +199,14 @@ public class RegistryLoader
/**
* Load in the XML from file.
*
* @param filename
* the filename to load from
*
* @param filename the filename to load from
* @return the DOM representation of the XML file
* @throws IOException if IO error
* @throws ParserConfigurationException if config error
* @throws SAXException if parser error
*/
private static Document loadXML(String filename) throws IOException,
ParserConfigurationException, SAXException
{
ParserConfigurationException, SAXException {
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
@@ -319,21 +225,17 @@ public class RegistryLoader
* </P>
* Why this isn't a core part of the XML API I do not know...
*
* @param parentElement
* the element, whose child element you want the CDATA from
* @param childName
* the name of the element you want the CDATA from
*
* @param parentElement the element, whose child element you want the CDATA from
* @param childName the name of the element you want the CDATA from
* @return the CDATA as a <code>String</code>
* @throws TransformerException if transformer error
*/
private static String getElementData(Node parentElement, String childName)
throws TransformerException
{
throws TransformerException {
// Grab the child node
Node childNode = XPathAPI.selectSingleNode(parentElement, childName);
if (childNode == null)
{
if (childNode == null) {
// No child node, so no values
return null;
}
@@ -341,8 +243,7 @@ public class RegistryLoader
// Get the #text
Node dataNode = childNode.getFirstChild();
if (dataNode == null)
{
if (dataNode == null) {
return null;
}
@@ -367,23 +268,19 @@ public class RegistryLoader
* </P>
* Why this also isn't a core part of the XML API I do not know...
*
* @param parentElement
* the element, whose child element you want the CDATA from
* @param childName
* the name of the element you want the CDATA from
*
* @param parentElement the element, whose child element you want the CDATA from
* @param childName the name of the element you want the CDATA from
* @return the CDATA as a <code>String</code>
* @throws TransformerException if transformer error
*/
private static String[] getRepeatedElementData(Node parentElement,
String childName) throws TransformerException
{
String childName) throws TransformerException {
// Grab the child node
NodeList childNodes = XPathAPI.selectNodeList(parentElement, childName);
String[] data = new String[childNodes.getLength()];
for (int i = 0; i < childNodes.getLength(); i++)
{
for (int i = 0; i < childNodes.getLength(); i++) {
// Get the #text node
Node dataNode = childNodes.item(i).getFirstChild();

View File

@@ -14,7 +14,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -28,8 +27,12 @@ import org.apache.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
import org.dspace.content.service.CommunityService;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.factory.EPersonServiceFactory;
import org.dspace.eperson.service.EPersonService;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
import org.w3c.dom.Document;
@@ -42,7 +45,7 @@ import org.xml.sax.SAXException;
* an XML file.
*
* The XML file structure needs to be:
*
* {@code
* <import_structure>
* <community>
* <name>....</name>
@@ -52,42 +55,56 @@ import org.xml.sax.SAXException;
* </collection>
* </community>
* </import_structure>
*
* }
* 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
*
* @author Richard Jones
*
*/
public class StructBuilder
{
/** the output xml document which will contain updated information about the
public class StructBuilder {
/**
* the output xml document which will contain updated information about the
* imported structure
*/
private static org.jdom.Document xmlOutput = new org.jdom.Document(new Element("imported_structure"));
/** a hashtable to hold metadata for the collection being worked on */
/**
* a hashtable to hold metadata for the collection being worked on
*/
private static Map<String, String> collectionMap = new HashMap<String, String>();
/** a hashtable to hold metadata for the community being worked on */
/**
* a hashtable to hold metadata for the community being worked on
*/
private static Map<String, String> communityMap = new HashMap<String, String>();
protected static CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
protected static CollectionService collectionService = ContentServiceFactory.getInstance().getCollectionService();
protected static EPersonService ePersonService = EPersonServiceFactory.getInstance().getEPersonService();
/**
* Default constructor
*/
private StructBuilder() { }
/**
* Main method to be run from the command line to import a structure into
* DSpace
*
* This is of the form:
*
* StructBuilder -f [xml source] -e [administrator email] -o [output file]
* {@code StructBuilder -f [xml source] -e [administrator email] -o [output file]}
*
* 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.
*
* @param argv the command line arguments given
* @throws Exception if an error occurs
*/
public static void main(String[] argv)
throws Exception
{
throws Exception {
CommandLineParser parser = new PosixParser();
Options options = new Options();
@@ -102,23 +119,19 @@ public class StructBuilder
String eperson = null;
String output = null;
if (line.hasOption('f'))
{
if (line.hasOption('f')) {
file = line.getOptionValue('f');
}
if (line.hasOption('e'))
{
if (line.hasOption('e')) {
eperson = line.getOptionValue('e');
}
if (line.hasOption('o'))
{
if (line.hasOption('o')) {
output = line.getOptionValue('o');
}
if (output == null || eperson == null || file == null)
{
if (output == null || eperson == null || file == null) {
usage();
System.exit(0);
}
@@ -127,7 +140,7 @@ public class StructBuilder
Context context = new Context();
// set the context
context.setCurrentUser(EPerson.findByEmail(context, eperson));
context.setCurrentUser(ePersonService.findByEmail(context, eperson));
// load the XML
Document document = loadXML(file);
@@ -159,20 +172,16 @@ public class StructBuilder
// generate the output
Element root = xmlOutput.getRootElement();
for (int i = 0; i < elements.length; i++)
{
for (int i = 0; i < elements.length; i++) {
root.addContent(elements[i]);
}
// finally write the string into the output file
try
{
try {
BufferedWriter out = new BufferedWriter(new FileWriter(output));
out.write(new XMLOutputter().outputString(xmlOutput));
out.close();
}
catch (IOException e)
{
} catch (IOException e) {
System.out.println("Unable to write to output file " + output);
System.exit(0);
}
@@ -183,10 +192,11 @@ public class StructBuilder
/**
* Output the usage information
*/
private static void usage()
{
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");
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;
}
@@ -195,12 +205,10 @@ public class StructBuilder
* fails it generates an error and ceases execution
*
* @param document the XML document object
* @throws TransformerException
*
* @throws TransformerException if transformer error
*/
private static void validate(org.w3c.dom.Document document)
throws TransformerException
{
throws TransformerException {
StringBuffer err = new StringBuffer();
boolean trip = false;
@@ -208,22 +216,19 @@ public class StructBuilder
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)
{
if (first.getLength() == 0) {
err.append("-There are no top level communities in the source document");
System.out.println(err.toString());
System.exit(0);
}
String errs = validateCommunities(first, 1);
if (errs != null)
{
if (errs != null) {
err.append(errs);
trip = true;
}
if (trip)
{
if (trip) {
System.out.println(err.toString());
System.exit(0);
}
@@ -236,23 +241,19 @@ public class StructBuilder
* @param communities the NodeList of communities to validate
* @param level the level in the XML document that we are at, for the purposes
* of error reporting
*
* @return the errors that need to be generated by the calling method, or null if
* no errors.
*/
private static String validateCommunities(NodeList communities, int level)
throws TransformerException
{
throws TransformerException {
StringBuffer err = new StringBuffer();
boolean trip = false;
String errs = null;
for (int i = 0; i < communities.getLength(); i++)
{
for (int i = 0; i < communities.getLength(); i++) {
Node n = communities.item(i);
NodeList name = XPathAPI.selectNodeList(n, "name");
if (name.getLength() != 1)
{
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");
@@ -262,8 +263,7 @@ public class StructBuilder
// validate sub communities
NodeList subCommunities = XPathAPI.selectNodeList(n, "community");
String comErrs = validateCommunities(subCommunities, level + 1);
if (comErrs != null)
{
if (comErrs != null) {
err.append(comErrs);
trip = true;
}
@@ -271,15 +271,13 @@ public class StructBuilder
// validate collections
NodeList collections = XPathAPI.selectNodeList(n, "collection");
String colErrs = validateCollections(collections, level + 1);
if (colErrs != null)
{
if (colErrs != null) {
err.append(colErrs);
trip = true;
}
}
if (trip)
{
if (trip) {
errs = err.toString();
}
@@ -292,22 +290,18 @@ public class StructBuilder
*
* @param collections a NodeList of collections to validate
* @param level the level in the XML document for the purposes of error reporting
*
* @return the errors to be generated by the calling method, or null if none
*/
private static String validateCollections(NodeList collections, int level)
throws TransformerException
{
throws TransformerException {
StringBuffer err = new StringBuffer();
boolean trip = false;
String errs = null;
for (int i = 0; i < collections.getLength(); i++)
{
for (int i = 0; i < collections.getLength(); i++) {
Node n = collections.item(i);
NodeList name = XPathAPI.selectNodeList(n, "name");
if (name.getLength() != 1)
{
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");
@@ -315,8 +309,7 @@ public class StructBuilder
}
}
if (trip)
{
if (trip) {
errs = err.toString();
}
@@ -326,14 +319,11 @@ public class StructBuilder
/**
* Load in the XML from file.
*
* @param filename
* the filename to load from
*
* @param filename the filename to load from
* @return the DOM representation of the XML file
*/
private static org.w3c.dom.Document loadXML(String filename)
throws IOException, ParserConfigurationException, SAXException
{
throws IOException, ParserConfigurationException, SAXException {
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
@@ -346,19 +336,15 @@ public class StructBuilder
* Return the String value of a Node
*
* @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)
{
public static String getStringValue(Node node) {
String value = node.getNodeValue();
if (node.hasChildNodes())
{
if (node.hasChildNodes()) {
Node first = node.getFirstChild();
if (first.getNodeType() == Node.TEXT_NODE)
{
if (first.getNodeType() == Node.TEXT_NODE) {
return first.getNodeValue().trim();
}
}
@@ -373,41 +359,33 @@ public class StructBuilder
* @param context the context of the request
* @param communities a nodelist of communities to create along with their sub-structures
* @param parent the parent community of the nodelist of communities to create
*
* @return an element array containing additional information regarding the
* 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, Exception {
Element[] elements = new Element[communities.getLength()];
for (int i = 0; i < communities.getLength(); i++)
{
for (int i = 0; i < communities.getLength(); i++) {
Community community;
Element element = new Element("community");
// create the community or sub community
if (parent != null)
{
community = parent.createSubcommunity();
}
else
{
community = Community.create(null, context);
if (parent != null) {
community = communityService.create(parent, context);
} else {
community = communityService.create(null, context);
}
// default the short description to be an empty string
community.setMetadata("short_description", " ");
communityService.setMetadata(context, community, "short_description", " ");
// now update the metadata
Node tn = communities.item(i);
for (Map.Entry<String, String> entry : communityMap.entrySet())
{
for (Map.Entry<String, String> entry : communityMap.entrySet()) {
NodeList nl = XPathAPI.selectNodeList(tn, entry.getKey());
if (nl.getLength() == 1)
{
community.setMetadata(entry.getValue(), getStringValue(nl.item(0)));
if (nl.getLength() == 1) {
communityService.setMetadata(context, community, entry.getValue(), getStringValue(nl.item(0)));
}
}
@@ -420,7 +398,7 @@ public class StructBuilder
// difficult
// to isolate the community that already exists without hitting
// the database directly.
community.update();
communityService.update(context, community);
// build the element with the handle that identifies the new
// community
@@ -433,34 +411,30 @@ public class StructBuilder
element.setAttribute("identifier", community.getHandle());
Element nameElement = new Element("name");
nameElement.setText(community.getMetadata("name"));
nameElement.setText(communityService.getMetadata(community, "name"));
element.addContent(nameElement);
if (community.getMetadata("short_description") != null)
{
if (communityService.getMetadata(community, "short_description") != null) {
Element descriptionElement = new Element("description");
descriptionElement.setText(community.getMetadata("short_description"));
descriptionElement.setText(communityService.getMetadata(community, "short_description"));
element.addContent(descriptionElement);
}
if (community.getMetadata("introductory_text") != null)
{
if (communityService.getMetadata(community, "introductory_text") != null) {
Element introElement = new Element("intro");
introElement.setText(community.getMetadata("introductory_text"));
introElement.setText(communityService.getMetadata(community, "introductory_text"));
element.addContent(introElement);
}
if (community.getMetadata("copyright_text") != null)
{
if (communityService.getMetadata(community, "copyright_text") != null) {
Element copyrightElement = new Element("copyright");
copyrightElement.setText(community.getMetadata("copyright_text"));
copyrightElement.setText(communityService.getMetadata(community, "copyright_text"));
element.addContent(copyrightElement);
}
if (community.getMetadata("side_bar_text") != null)
{
if (communityService.getMetadata(community, "side_bar_text") != null) {
Element sidebarElement = new Element("sidebar");
sidebarElement.setText(community.getMetadata("side_bar_text"));
sidebarElement.setText(communityService.getMetadata(community, "side_bar_text"));
element.addContent(sidebarElement);
}
@@ -473,12 +447,10 @@ public class StructBuilder
Element[] collectionElements = handleCollections(context, collections, community);
int j;
for (j = 0; j < subCommunityElements.length; j++)
{
for (j = 0; j < subCommunityElements.length; j++) {
element.addContent(subCommunityElements[j]);
}
for (j = 0; j < collectionElements.length; j++)
{
for (j = 0; j < collectionElements.length; j++) {
element.addContent(collectionElements[j]);
}
@@ -494,81 +466,70 @@ public class StructBuilder
* @param context the context of the request
* @param collections the node list of collections to be created
* @param parent the parent community to whom the collections belong
*
* @return an Element array containing additional information about the
* 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, IOException, Exception {
Element[] elements = new Element[collections.getLength()];
for (int i = 0; i < collections.getLength(); i++)
{
for (int i = 0; i < collections.getLength(); i++) {
Element element = new Element("collection");
Collection collection = parent.createCollection();
Collection collection = collectionService.create(context, parent);
// default the short description to the empty string
collection.setMetadata("short_description", " ");
collectionService.setMetadata(context, collection, "short_description", " ");
// import the rest of the metadata
Node tn = collections.item(i);
for (Map.Entry<String, String> entry : collectionMap.entrySet())
{
for (Map.Entry<String, String> entry : collectionMap.entrySet()) {
NodeList nl = XPathAPI.selectNodeList(tn, entry.getKey());
if (nl.getLength() == 1)
{
collection.setMetadata(entry.getValue(), getStringValue(nl.item(0)));
if (nl.getLength() == 1) {
collectionService.setMetadata(context, collection, entry.getValue(), getStringValue(nl.item(0)));
}
}
collection.update();
collectionService.update(context, collection);
element.setAttribute("identifier", collection.getHandle());
Element nameElement = new Element("name");
nameElement.setText(collection.getMetadata("name"));
nameElement.setText(collectionService.getMetadata(collection, "name"));
element.addContent(nameElement);
if (collection.getMetadata("short_description") != null)
{
if (collectionService.getMetadata(collection, "short_description") != null) {
Element descriptionElement = new Element("description");
descriptionElement.setText(collection.getMetadata("short_description"));
descriptionElement.setText(collectionService.getMetadata(collection, "short_description"));
element.addContent(descriptionElement);
}
if (collection.getMetadata("introductory_text") != null)
{
if (collectionService.getMetadata(collection, "introductory_text") != null) {
Element introElement = new Element("intro");
introElement.setText(collection.getMetadata("introductory_text"));
introElement.setText(collectionService.getMetadata(collection, "introductory_text"));
element.addContent(introElement);
}
if (collection.getMetadata("copyright_text") != null)
{
if (collectionService.getMetadata(collection, "copyright_text") != null) {
Element copyrightElement = new Element("copyright");
copyrightElement.setText(collection.getMetadata("copyright_text"));
copyrightElement.setText(collectionService.getMetadata(collection, "copyright_text"));
element.addContent(copyrightElement);
}
if (collection.getMetadata("side_bar_text") != null)
{
if (collectionService.getMetadata(collection, "side_bar_text") != null) {
Element sidebarElement = new Element("sidebar");
sidebarElement.setText(collection.getMetadata("side_bar_text"));
sidebarElement.setText(collectionService.getMetadata(collection, "side_bar_text"));
element.addContent(sidebarElement);
}
if (collection.getMetadata("license") != null)
{
if (collectionService.getMetadata(collection, "license") != null) {
Element sidebarElement = new Element("license");
sidebarElement.setText(collection.getMetadata("license"));
sidebarElement.setText(collectionService.getMetadata(collection, "license"));
element.addContent(sidebarElement);
}
if (collection.getMetadata("provenance_description") != null)
{
if (collectionService.getMetadata(collection, "provenance_description") != null) {
Element sidebarElement = new Element("provenance");
sidebarElement.setText(collection.getMetadata("provenance_description"));
sidebarElement.setText(collectionService.getMetadata(collection, "provenance_description"));
element.addContent(sidebarElement);
}

View File

@@ -1,97 +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.administer;
import org.dspace.content.DCDate;
import org.dspace.core.Context;
import org.dspace.storage.rdbms.DatabaseManager;
import org.dspace.storage.rdbms.TableRow;
import org.dspace.storage.rdbms.TableRowIterator;
/**
* A command-line tool for performing necessary tweaks in the database for the
* new last_modified column in the item table.
*
* @author Robert Tansley
* @version $Revision$
*/
public class Upgrade101To11
{
/**
* For invoking via the command line
*
* @param argv
* command-line arguments
*/
public static void main(String[] argv)
{
Context context = null;
try
{
context = new Context();
// Deal with withdrawn items first.
// last_modified takes the value of the deletion date
TableRowIterator tri = DatabaseManager.queryTable(context, "item",
"SELECT * FROM item WHERE withdrawal_date IS NOT NULL");
while (tri.hasNext())
{
TableRow row = tri.next();
DCDate d = new DCDate(row.getStringColumn("withdrawal_date"));
row.setColumn("last_modified", d.toDate());
DatabaseManager.update(context, row);
}
tri.close();
// Next, update those items with a date.available
tri = DatabaseManager.query(context,
"SELECT item.item_id, dcvalue.text_value FROM item, dctyperegistry, "+
"dcvalue WHERE item.item_id=dcvalue.item_id AND dcvalue.dc_type_id="+
"dctyperegistry.dc_type_id AND dctyperegistry.element LIKE 'date' "+
"AND dctyperegistry.qualifier LIKE 'available'");
while (tri.hasNext())
{
TableRow resultRow = tri.next();
DCDate d = new DCDate(resultRow.getStringColumn("text_value"));
// Can't update the row, have to do a separate query
TableRow itemRow = DatabaseManager.find(context, "item",
resultRow.getIntColumn("item_id"));
itemRow.setColumn("last_modified", d.toDate());
DatabaseManager.update(context, itemRow);
}
tri.close();
// Finally, for all items that have no date.available or withdrawal
// date, set the update time to now!
DatabaseManager.updateQuery(context,
"UPDATE item SET last_modified=now() WHERE last_modified IS NULL");
context.complete();
System.out.println("Last modified dates set");
System.exit(0);
}
catch (Exception e)
{
System.err.println("Exception occurred:" + e);
e.printStackTrace();
if (context != null)
{
context.abort();
}
System.exit(1);
}
}
}

View File

@@ -1,198 +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.administer;
import org.dspace.content.Bitstream;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.Bundle;
import org.dspace.content.Collection;
import org.dspace.content.Item;
import org.dspace.content.ItemIterator;
import org.dspace.core.Context;
/**
* Command-line tool for making changes to DSpace database when updating from
* version 1.1/1.1.1 to 1.2.
* <P>
* The changes are:
* <ul>
* <li>Setting owning collection field for items
* <li>Reorganising content bitstreams into one bundle named ORIGINAL, license
* bitstreams into a bundle named LICENSE
* <li>Setting the sequence_id numbers in the bitstream table. This happens as
* item.update() is called on every item.
* <li>If a (newly-reorganised) 'ORIGINAL' bundle contains a text/html
* bitstream, that bitstream is set to the primary bitstream for HTML support.
* </ul>
*/
public class Upgrade11To12
{
public static void main(String[] argv) throws Exception
{
Context c = new Context();
// ve are superuser!
c.setIgnoreAuthorization(true);
ItemIterator ii = null;
// first set owning Collections
Collection[] collections = Collection.findAll(c);
System.out.println("Setting item owningCollection fields in database");
for (int q = 0; q < collections.length; q++)
{
ii = collections[q].getItems();
while (ii.hasNext())
{
Item myItem = ii.next();
// set it if it's not already set
if (myItem.getOwningCollection() == null)
{
myItem.setOwningCollection(collections[q]);
myItem.update();
System.out.println("Set owner of item " + myItem.getID()
+ " to collection " + collections[q].getID());
}
}
}
// commit pending transactions before continuing
c.commit();
// now combine some bundles
ii = Item.findAll(c);
while (ii.hasNext())
{
boolean skipItem = false;
Item myItem = ii.next();
int licenseBundleIndex = -1; // array index of license bundle (we'll
// skip this one often)
int primaryBundleIndex = -1; // array index of our primary bundle
// (all bitstreams assemble here)
System.out.println("Processing item #: " + myItem.getID());
Bundle[] myBundles = myItem.getBundles();
// look for bundles with multiple bitstreams
// (if any found, we'll skip this item)
for (int i = 0; i < myBundles.length; i++)
{
// skip if bundle is already named
if (myBundles[i].getName() != null)
{
System.out
.println("Skipping this item - named bundles already found");
skipItem = true;
break;
}
Bitstream[] bitstreams = myBundles[i].getBitstreams();
// skip this item if we already have bundles combined in this
// item
if (bitstreams.length > 1)
{
System.out
.println("Skipping this item - compound bundles already found");
skipItem = true;
break;
}
// is this the license? check the format
BitstreamFormat bf = bitstreams[0].getFormat();
if ("License".equals(bf.getShortDescription()))
{
System.out.println("Found license!");
if (licenseBundleIndex == -1)
{
licenseBundleIndex = i;
System.out.println("License bundle set to: " + i);
}
else
{
System.out
.println("ERROR - multiple license bundles in item - skipping");
skipItem = true;
break;
}
}
else
{
// not a license, if primary isn't set yet, set it
if (primaryBundleIndex == -1)
{
primaryBundleIndex = i;
System.out.println("Primary bundle set to: " + i);
}
}
}
if (!skipItem)
{
// name the primary and license bundles
if (primaryBundleIndex != -1)
{
myBundles[primaryBundleIndex].setName("ORIGINAL");
myBundles[primaryBundleIndex].update();
}
if (licenseBundleIndex != -1)
{
myBundles[licenseBundleIndex].setName("LICENSE");
myBundles[licenseBundleIndex].update();
}
for (int i = 0; i < myBundles.length; i++)
{
Bitstream[] bitstreams = myBundles[i].getBitstreams();
// now we can safely assume no bundles with multiple
// bitstreams
if (bitstreams.length > 0 && (i != primaryBundleIndex) && (i != licenseBundleIndex))
{
// only option left is a bitstream to be combined
// with primary bundle
// and remove now-redundant bundle
myBundles[primaryBundleIndex]
.addBitstream(bitstreams[0]); // add to
// primary
myItem.removeBundle(myBundles[i]); // remove this
// bundle
System.out.println("Bitstream from bundle " + i
+ " moved to primary bundle");
// flag if HTML bitstream
if (bitstreams[0].getFormat().getMIMEType().equals(
"text/html"))
{
System.out
.println("Set primary bitstream to HTML file in item #"
+ myItem.getID()
+ " for HTML support.");
}
}
}
}
}
c.complete();
}
}

View File

@@ -7,68 +7,93 @@
*/
package org.dspace.app.bulkedit;
import org.dspace.content.Item;
import org.dspace.content.DCValue;
import org.dspace.content.Collection;
import java.util.ArrayList;
import java.util.List;
import org.dspace.content.Collection;
import org.dspace.content.Item;
/**
* Utility class to store changes to item that may occur during a batch edit.
*
* @author Stuart Lewis
*/
public class BulkEditChange
{
/** The item these changes relate to */
public class BulkEditChange {
/**
* The item these changes relate to
*/
private Item item;
/** The List of hashtables with the new elements */
private List<DCValue> adds;
/**
* The List of hashtables with the new elements
*/
private List<BulkEditMetadataValue> adds;
/** The List of hashtables with the removed elements */
private List<DCValue> removes;
/**
* The List of hashtables with the removed elements
*/
private List<BulkEditMetadataValue> removes;
/** The List of hashtables with the unchanged elements */
private List<DCValue> constant;
/**
* The List of hashtables with the unchanged elements
*/
private List<BulkEditMetadataValue> constant;
/** The List of the complete set of new values (constant + adds) */
private List<DCValue> complete;
/**
* The List of the complete set of new values (constant + adds)
*/
private List<BulkEditMetadataValue> complete;
/** The list of old collections the item used to be mapped to */
/**
* The list of old collections the item used to be mapped to
*/
private List<Collection> oldMappedCollections;
/** The list of new collections the item has been mapped into */
/**
* The list of new collections the item has been mapped into
*/
private List<Collection> newMappedCollections;
/** The old owning collection */
/**
* The old owning collection
*/
private Collection oldOwningCollection;
/** The new owning collection */
/**
* The new owning collection
*/
private Collection newOwningCollection;
/** Is this a new item */
/**
* Is this a new item
*/
private boolean newItem;
/** Has this item been deleted? */
/**
* Has this item been deleted?
*/
private boolean deleted;
/** Has this item been withdrawn? */
/**
* Has this item been withdrawn?
*/
private boolean withdrawn;
/** Has this item been reinstated? */
/**
* Has this item been reinstated?
*/
private boolean reinstated;
/** Have any changes actually been made? */
/**
* Have any changes actually been made?
*/
private boolean empty;
/**
* Initialise a change holder for a new item
*/
public BulkEditChange()
{
public BulkEditChange() {
// Set the item to be null
item = null;
newItem = true;
@@ -77,12 +102,12 @@ public class BulkEditChange
newOwningCollection = null;
// Initialise the arrays
adds = new ArrayList<DCValue>();
removes = new ArrayList<DCValue>();
constant = new ArrayList<DCValue>();
complete = new ArrayList<DCValue>();
oldMappedCollections = new ArrayList<Collection>();
newMappedCollections = new ArrayList<Collection>();
adds = new ArrayList<>();
removes = new ArrayList<>();
constant = new ArrayList<>();
complete = new ArrayList<>();
oldMappedCollections = new ArrayList<>();
newMappedCollections = new ArrayList<>();
}
/**
@@ -90,20 +115,19 @@ public class BulkEditChange
*
* @param i The Item to store
*/
public BulkEditChange(Item i)
{
public BulkEditChange(Item i) {
// Store the item
item = i;
newItem = false;
empty = true;
// Initialise the arrays
adds = new ArrayList<DCValue>();
removes = new ArrayList<DCValue>();
constant = new ArrayList<DCValue>();
complete = new ArrayList<DCValue>();
oldMappedCollections = new ArrayList<Collection>();
newMappedCollections = new ArrayList<Collection>();
adds = new ArrayList<>();
removes = new ArrayList<>();
constant = new ArrayList<>();
complete = new ArrayList<>();
oldMappedCollections = new ArrayList<>();
newMappedCollections = new ArrayList<>();
}
/**
@@ -111,8 +135,7 @@ public class BulkEditChange
*
* @param i The item
*/
public void setItem(Item i)
{
public void setItem(Item i) {
// Store the item
item = i;
}
@@ -122,8 +145,7 @@ public class BulkEditChange
*
* @param dcv The value to add
*/
public void registerAdd(DCValue dcv)
{
public void registerAdd(BulkEditMetadataValue dcv) {
// Add the added value
adds.add(dcv);
complete.add(dcv);
@@ -135,8 +157,7 @@ public class BulkEditChange
*
* @param dcv The value to remove
*/
public void registerRemove(DCValue dcv)
{
public void registerRemove(BulkEditMetadataValue dcv) {
// Add the removed value
removes.add(dcv);
empty = false;
@@ -147,8 +168,7 @@ public class BulkEditChange
*
* @param dcv The value to keep unchanged
*/
public void registerConstant(DCValue dcv)
{
public void registerConstant(BulkEditMetadataValue dcv) {
// Add the removed value
constant.add(dcv);
complete.add(dcv);
@@ -159,8 +179,7 @@ public class BulkEditChange
*
* @param c The new mapped Collection
*/
public void registerNewMappedCollection(Collection c)
{
public void registerNewMappedCollection(Collection c) {
// Add the new owning Collection
newMappedCollections.add(c);
empty = false;
@@ -171,27 +190,22 @@ public class BulkEditChange
*
* @param c The old mapped Collection
*/
public void registerOldMappedCollection(Collection c)
{
public void registerOldMappedCollection(Collection c) {
// Add the old owning Collection (if it isn't there already, or is an old collection)
boolean found = false;
if ((this.getOldOwningCollection() != null) &&
(this.getOldOwningCollection().getHandle().equals(c.getHandle())))
{
(this.getOldOwningCollection().getHandle().equals(c.getHandle()))) {
found = true;
}
for (Collection collection : oldMappedCollections)
{
if (collection.getHandle().equals(c.getHandle()))
{
for (Collection collection : oldMappedCollections) {
if (collection.getHandle().equals(c.getHandle())) {
found = true;
}
}
if (!found)
{
if (!found) {
oldMappedCollections.add(c);
empty = false;
}
@@ -203,8 +217,7 @@ public class BulkEditChange
* @param oldC The old owning collection
* @param newC The new owning collection
*/
public void changeOwningCollection(Collection oldC, Collection newC)
{
public void changeOwningCollection(Collection oldC, Collection newC) {
// Store the old owning collection
oldOwningCollection = oldC;
@@ -218,8 +231,7 @@ public class BulkEditChange
*
* @param newC The new owning collection
*/
public void setOwningCollection(Collection newC)
{
public void setOwningCollection(Collection newC) {
// Store the new owning collection
newOwningCollection = newC;
//empty = false;
@@ -230,8 +242,7 @@ public class BulkEditChange
*
* @return The item
*/
public Item getItem()
{
public Item getItem() {
// Return the item
return item;
}
@@ -241,8 +252,7 @@ public class BulkEditChange
*
* @return the list of elements and their values that have been added.
*/
public List<DCValue> getAdds()
{
public List<BulkEditMetadataValue> getAdds() {
// Return the array
return adds;
}
@@ -252,8 +262,7 @@ public class BulkEditChange
*
* @return the list of elements and their values that have been removed.
*/
public List<DCValue> getRemoves()
{
public List<BulkEditMetadataValue> getRemoves() {
// Return the array
return removes;
}
@@ -263,8 +272,7 @@ public class BulkEditChange
*
* @return the list of unchanged values
*/
public List<DCValue> getConstant()
{
public List<BulkEditMetadataValue> getConstant() {
// Return the array
return constant;
}
@@ -274,8 +282,7 @@ public class BulkEditChange
*
* @return the list of all values
*/
public List<DCValue> getComplete()
{
public List<BulkEditMetadataValue> getComplete() {
// Return the array
return complete;
}
@@ -285,8 +292,7 @@ public class BulkEditChange
*
* @return the list of new mapped collections
*/
public List<Collection> getNewMappedCollections()
{
public List<Collection> getNewMappedCollections() {
// Return the array
return newMappedCollections;
}
@@ -296,8 +302,7 @@ public class BulkEditChange
*
* @return the list of old mapped collections
*/
public List<Collection> getOldMappedCollections()
{
public List<Collection> getOldMappedCollections() {
// Return the array
return oldMappedCollections;
}
@@ -307,8 +312,7 @@ public class BulkEditChange
*
* @return the old owning collection
*/
public Collection getOldOwningCollection()
{
public Collection getOldOwningCollection() {
// Return the old owning collection
return oldOwningCollection;
}
@@ -318,8 +322,7 @@ public class BulkEditChange
*
* @return the new owning collection
*/
public Collection getNewOwningCollection()
{
public Collection getNewOwningCollection() {
// Return the new owning collection
return newOwningCollection;
}
@@ -329,8 +332,7 @@ public class BulkEditChange
*
* @return Whether or not this is for a new item
*/
public boolean isNewItem()
{
public boolean isNewItem() {
// Return the new item status
return newItem;
}
@@ -340,8 +342,7 @@ public class BulkEditChange
*
* @return Whether or not this is for a deleted item
*/
public boolean isDeleted()
{
public boolean isDeleted() {
// Return the new item status
return deleted;
}
@@ -360,8 +361,7 @@ public class BulkEditChange
*
* @return Whether or not this is for a withdrawn item
*/
public boolean isWithdrawn()
{
public boolean isWithdrawn() {
// Return the new item status
return withdrawn;
}
@@ -380,8 +380,7 @@ public class BulkEditChange
*
* @return Whether or not this is for a reinstated item
*/
public boolean isReinstated()
{
public boolean isReinstated() {
// Return the new item status
return reinstated;
}
@@ -400,8 +399,7 @@ public class BulkEditChange
*
* @return Whether or not changes have been made
*/
public boolean hasChanges()
{
public boolean hasChanges() {
return !empty;
}
}

View File

@@ -0,0 +1,83 @@
/**
* 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.bulkedit;
/**
* Value class used for metadata value edits used by the bulk edit.
*
* @author kevinvandevelde at atmire.com
*/
public class BulkEditMetadataValue {
private String schema;
private String element;
private String qualifier;
private String language;
private String value;
private String authority;
private int confidence;
public BulkEditMetadataValue() {
}
public void setSchema(String schema) {
this.schema = schema;
}
public void setElement(String element) {
this.element = element;
}
public void setQualifier(String qualifier) {
this.qualifier = qualifier;
}
public void setLanguage(String language) {
this.language = language;
}
public void setValue(String value) {
this.value = value;
}
public void setAuthority(String authority) {
this.authority = authority;
}
public void setConfidence(int confidence) {
this.confidence = confidence;
}
public String getSchema() {
return schema;
}
public String getElement() {
return element;
}
public String getQualifier() {
return qualifier;
}
public String getLanguage() {
return language;
}
public String getValue() {
return value;
}
public String getAuthority() {
return authority;
}
public int getConfidence() {
return confidence;
}
}

View File

@@ -7,15 +7,41 @@
*/
package org.dspace.app.bulkedit;
import org.dspace.content.*;
import org.dspace.content.Collection;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import java.util.*;
import java.util.regex.Pattern;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.regex.Matcher;
import java.io.*;
import java.util.regex.Pattern;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.factory.AuthorityServiceFactory;
import org.dspace.authority.service.AuthorityValueService;
import org.dspace.content.Collection;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataValue;
import org.dspace.content.authority.Choices;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
import org.dspace.content.service.MetadataFieldService;
import org.dspace.content.service.MetadataSchemaService;
import org.dspace.core.Context;
import org.dspace.services.factory.DSpaceServicesFactory;
/**
* Utility class to read and write CSV files
@@ -31,41 +57,70 @@ import java.io.*;
*
* @author Stuart Lewis
*/
public class DSpaceCSV implements Serializable
{
/** The headings of the CSV file */
private List<String> headings;
public class DSpaceCSV implements Serializable {
/**
* The headings of the CSV file
*/
protected List<String> headings;
/** An array list of CSV lines */
private List<DSpaceCSVLine> lines;
/**
* An array list of CSV lines
*/
protected List<DSpaceCSVLine> lines;
/** A counter of how many CSV lines this object holds */
private int counter;
/**
* A counter of how many CSV lines this object holds
*/
protected int counter;
/** The value separator (defaults to double pipe '||') */
protected static String valueSeparator;
/**
* The value separator (defaults to double pipe '||')
*/
protected String valueSeparator;
/** The value separator in an escaped form for using in regexs */
protected static String escapedValueSeparator;
/**
* The value separator in an escaped form for using in regexes
*/
protected String escapedValueSeparator;
/** The field separator (defaults to comma) */
protected static String fieldSeparator;
/**
* The field separator (defaults to comma)
*/
protected String fieldSeparator;
/** The field separator in an escaped form for using in regexs */
protected static String escapedFieldSeparator;
/**
* The field separator in an escaped form for using in regexes
*/
protected String escapedFieldSeparator;
/** The authority separator (defaults to dobule colon '::') */
protected static String authoritySeparator;
/**
* The authority separator (defaults to double colon '::')
*/
protected String authoritySeparator;
/** The authority separator in an escaped form for using in regexs */
protected static String escapedAuthoritySeparator;
/**
* The authority separator in an escaped form for using in regexes
*/
protected String escapedAuthoritySeparator;
protected transient final ItemService itemService = ContentServiceFactory.getInstance().getItemService();
protected transient final MetadataSchemaService metadataSchemaService =
ContentServiceFactory.getInstance().getMetadataSchemaService();
protected transient final MetadataFieldService metadataFieldService =
ContentServiceFactory.getInstance().getMetadataFieldService();
protected transient final AuthorityValueService authorityValueService =
AuthorityServiceFactory.getInstance().getAuthorityValueService();
/** Whether to export all metadata such as handles and provenance information */
private boolean exportAll;
/**
* Whether to export all metadata such as handles and provenance information
*/
protected boolean exportAll;
/** A list of metadata elements to ignore */
private Map<String, String> ignore;
/**
* A list of metadata elements to ignore
*/
protected Map<String, String> ignore;
/**
@@ -73,8 +128,7 @@ public class DSpaceCSV implements Serializable
*
* @param exportAll Whether to export all metadata such as handles and provenance information
*/
public DSpaceCSV(boolean exportAll)
{
public DSpaceCSV(boolean exportAll) {
// Initialise the class
init();
@@ -87,48 +141,45 @@ public class DSpaceCSV implements Serializable
*
* @param f The file to read from
* @param c The DSpace Context
*
* @throws Exception thrown if there is an error reading or processing the file
*/
public DSpaceCSV(File f, Context c) throws Exception
{
public DSpaceCSV(File f, Context c) throws Exception {
// Initialise the class
init();
// Open the CSV file
BufferedReader input = null;
try
{
try {
input = new BufferedReader(new InputStreamReader(new FileInputStream(f), "UTF-8"));
// Read the heading line
String head = input.readLine();
String[] headingElements = head.split(escapedFieldSeparator);
int columnCounter = 0;
for (String element : headingElements)
{
for (String element : headingElements) {
columnCounter++;
// Remove surrounding quotes if there are any
if ((element.startsWith("\"")) && (element.endsWith("\"")))
{
if ((element.startsWith("\"")) && (element.endsWith("\""))) {
element = element.substring(1, element.length() - 1);
}
// Store the heading
if ("collection".equals(element))
{
if ("collection".equals(element)) {
// Store the heading
headings.add(element);
}
// Store the action
else if ("action".equals(element))
{
} else if ("action".equals(element)) { // Store the action
// Store the heading
headings.add(element);
} else if (!"id".equals(element)) {
String authorityPrefix = "";
AuthorityValue authorityValueType = authorityValueService.getAuthorityValueType(element);
if (authorityValueType != null) {
String authorityType = authorityValueType.getAuthorityType();
authorityPrefix = element.substring(0, authorityType.length() + 1);
element = element.substring(authorityPrefix.length());
}
else if (!"id".equals(element))
{
// Verify that the heading is valid in the metadata registry
String[] clean = element.split("\\[");
String[] parts = clean[0].split("\\.");
@@ -147,7 +198,7 @@ public class DSpaceCSV implements Serializable
}
// Check that the scheme exists
MetadataSchema foundSchema = MetadataSchema.find(c, metadataSchema);
MetadataSchema foundSchema = metadataSchemaService.find(c, metadataSchema);
if (foundSchema == null) {
throw new MetadataImportInvalidHeadingException(clean[0],
MetadataImportInvalidHeadingException.SCHEMA,
@@ -155,8 +206,8 @@ public class DSpaceCSV implements Serializable
}
// Check that the metadata element exists in the schema
int schemaID = foundSchema.getSchemaID();
MetadataField foundField = MetadataField.findByElement(c, schemaID, metadataElement, metadataQualifier);
MetadataField foundField = metadataFieldService
.findByElement(c, foundSchema, metadataElement, metadataQualifier);
if (foundField == null) {
throw new MetadataImportInvalidHeadingException(clean[0],
MetadataImportInvalidHeadingException.ELEMENT,
@@ -164,7 +215,7 @@ public class DSpaceCSV implements Serializable
}
// Store the heading
headings.add(element);
headings.add(authorityPrefix + element);
}
}
@@ -172,8 +223,7 @@ public class DSpaceCSV implements Serializable
StringBuilder lineBuilder = new StringBuilder();
String lineRead;
while ((lineRead = input.readLine()) != null)
{
while ((lineRead = input.readLine()) != null) {
if (lineBuilder.length() > 0) {
// Already have a previously read value - add this line
lineBuilder.append("\n").append(lineRead);
@@ -212,11 +262,8 @@ public class DSpaceCSV implements Serializable
addItem(lineRead);
}
}
}
finally
{
if (input != null)
{
} finally {
if (input != null) {
input.close();
}
}
@@ -225,8 +272,7 @@ public class DSpaceCSV implements Serializable
/**
* Initialise this class with values from dspace.cfg
*/
private void init()
{
protected void init() {
// Set the value separator
setValueSeparator();
@@ -237,28 +283,28 @@ public class DSpaceCSV implements Serializable
setAuthoritySeparator();
// Create the headings
headings = new ArrayList<String>();
headings = new ArrayList<>();
// Create the blank list of items
lines = new ArrayList<DSpaceCSVLine>();
lines = new ArrayList<>();
// Initialise the counter
counter = 0;
// Set the metadata fields to ignore
ignore = new HashMap<String, String>();
String toIgnore = ConfigurationManager.getProperty("bulkedit", "ignore-on-export");
if ((toIgnore == null) || ("".equals(toIgnore.trim())))
{
// Set a default value
toIgnore = "dc.date.accessioned, dc.date.available, " +
"dc.date.updated, dc.description.provenance";
}
String[] toIgnoreArray = toIgnore.split(",");
for (String toIgnoreString : toIgnoreArray)
{
if (!"".equals(toIgnoreString.trim()))
{
ignore = new HashMap<>();
// Specify default values
String[] defaultValues =
new String[] {
"dc.date.accessioned, dc.date.available, dc.date.updated, dc.description.provenance"
};
String[] toIgnoreArray =
DSpaceServicesFactory.getInstance()
.getConfigurationService()
.getArrayProperty("bulkedit.ignore-on-export", defaultValues);
for (String toIgnoreString : toIgnoreArray) {
if (!"".equals(toIgnoreString.trim())) {
ignore.put(toIgnoreString.trim(), toIgnoreString.trim());
}
}
@@ -286,16 +332,13 @@ public class DSpaceCSV implements Serializable
*
* If not set, defaults to double pipe '||'
*/
private void setValueSeparator()
{
private void setValueSeparator() {
// Get the value separator
valueSeparator = ConfigurationManager.getProperty("bulkedit", "valueseparator");
if ((valueSeparator != null) && (!"".equals(valueSeparator.trim())))
{
valueSeparator = DSpaceServicesFactory.getInstance().getConfigurationService()
.getProperty("bulkedit.valueseparator");
if ((valueSeparator != null) && (!"".equals(valueSeparator.trim()))) {
valueSeparator = valueSeparator.trim();
}
else
{
} else {
valueSeparator = "||";
}
@@ -315,32 +358,22 @@ public class DSpaceCSV implements Serializable
* Special values are 'tab', 'hash' and 'semicolon' which will
* get substituted from the text to the value.
*/
private void setFieldSeparator()
{
private void setFieldSeparator() {
// Get the value separator
fieldSeparator = ConfigurationManager.getProperty("bulkedit", "fieldseparator");
if ((fieldSeparator != null) && (!"".equals(fieldSeparator.trim())))
{
fieldSeparator = DSpaceServicesFactory.getInstance().getConfigurationService()
.getProperty("bulkedit.fieldseparator");
if ((fieldSeparator != null) && (!"".equals(fieldSeparator.trim()))) {
fieldSeparator = fieldSeparator.trim();
if ("tab".equals(fieldSeparator))
{
if ("tab".equals(fieldSeparator)) {
fieldSeparator = "\t";
}
else if ("semicolon".equals(fieldSeparator))
{
} else if ("semicolon".equals(fieldSeparator)) {
fieldSeparator = ";";
}
else if ("hash".equals(fieldSeparator))
{
} else if ("hash".equals(fieldSeparator)) {
fieldSeparator = "#";
}
else
{
} else {
fieldSeparator = fieldSeparator.trim();
}
}
else
{
} else {
fieldSeparator = ",";
}
@@ -357,16 +390,13 @@ public class DSpaceCSV implements Serializable
*
* If not set, defaults to double colon '::'
*/
private void setAuthoritySeparator()
{
private void setAuthoritySeparator() {
// Get the value separator
authoritySeparator = ConfigurationManager.getProperty("bulkedit", "authorityseparator");
if ((authoritySeparator != null) && (!"".equals(authoritySeparator.trim())))
{
authoritySeparator = DSpaceServicesFactory.getInstance().getConfigurationService()
.getProperty("bulkedit.authorityseparator");
if ((authoritySeparator != null) && (!"".equals(authoritySeparator.trim()))) {
authoritySeparator = authoritySeparator.trim();
}
else
{
} else {
authoritySeparator = "::";
}
@@ -380,11 +410,15 @@ public class DSpaceCSV implements Serializable
* Add a DSpace item to the CSV file
*
* @param i The DSpace item
*
* @throws Exception if something goes wrong with adding the Item
*/
public final void addItem(Item i) throws Exception
{
public final void addItem(Item i) throws Exception {
// If the item does not have an "owningCollection" the the below "getHandle()" call will fail
// This should not happen but is here for safety.
if (i.getOwningCollection() == null) {
return;
}
// Create the CSV line
DSpaceCSVLine line = new DSpaceCSVLine(i.getID());
@@ -393,48 +427,43 @@ public class DSpaceCSV implements Serializable
line.add("collection", owningCollectionHandle);
// Add in any mapped collections
Collection[] collections = i.getCollections();
for (Collection c : collections)
{
List<Collection> collections = i.getCollections();
for (Collection c : collections) {
// Only add if it is not the owning collection
if (!c.getHandle().equals(owningCollectionHandle))
{
if (!c.getHandle().equals(owningCollectionHandle)) {
line.add("collection", c.getHandle());
}
}
// Populate it
DCValue md[] = i.getMetadata(Item.ANY, Item.ANY, Item.ANY, Item.ANY);
for (DCValue value : md)
{
List<MetadataValue> md = itemService.getMetadata(i, Item.ANY, Item.ANY, Item.ANY, Item.ANY);
for (MetadataValue value : md) {
MetadataField metadataField = value.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
// Get the key (schema.element)
String key = value.schema + "." + value.element;
String key = metadataSchema.getName() + "." + metadataField.getElement();
// Add the qualifier if there is one (schema.element.qualifier)
if (value.qualifier != null)
{
key = key + "." + value.qualifier;
if (metadataField.getQualifier() != null) {
key = key + "." + metadataField.getQualifier();
}
// Add the language if there is one (schema.element.qualifier[langauge])
//if ((value.language != null) && (!"".equals(value.language)))
if (value.language != null)
{
key = key + "[" + value.language + "]";
if (value.getLanguage() != null) {
key = key + "[" + value.getLanguage() + "]";
}
// Store the item
if (exportAll || okToExport(value))
{
if (exportAll || okToExport(metadataField)) {
// Add authority and confidence if authority is not null
String mdValue = value.value;
if (value.authority != null && !"".equals(value.authority))
{
mdValue += authoritySeparator + value.authority + authoritySeparator + value.confidence;
String mdValue = value.getValue();
if (value.getAuthority() != null && !"".equals(value.getAuthority())) {
mdValue += authoritySeparator + value.getAuthority() + authoritySeparator + (value
.getConfidence() != -1 ? value.getConfidence() : Choices.CF_ACCEPTED);
}
line.add(key, mdValue);
if (!headings.contains(key))
{
if (!headings.contains(key)) {
headings.add(key);
}
}
@@ -449,12 +478,10 @@ public class DSpaceCSV implements Serializable
* @param line The line of elements
* @throws Exception Thrown if an error occurs when adding the item
*/
public final void addItem(String line) throws Exception
{
// Check to see if the last character is a field separator, which hides the last empy column
public final void addItem(String line) throws Exception {
// Check to see if the last character is a field separator, which hides the last empty column
boolean last = false;
if (line.endsWith(fieldSeparator))
{
if (line.endsWith(fieldSeparator)) {
// Add a space to the end, then remove it later
last = true;
line += " ";
@@ -462,20 +489,17 @@ public class DSpaceCSV implements Serializable
// Split up on field separator
String[] parts = line.split(escapedFieldSeparator);
ArrayList<String> bits = new ArrayList<String>();
ArrayList<String> bits = new ArrayList<>();
bits.addAll(Arrays.asList(parts));
// Merge parts with embedded separators
boolean alldone = false;
while (!alldone)
{
while (!alldone) {
boolean found = false;
int i = 0;
for (String part : bits)
{
for (String part : bits) {
int bitcounter = part.length() - part.replaceAll("\"", "").length();
if ((part.startsWith("\"")) && ((!part.endsWith("\"")) || ((bitcounter & 1) == 1)))
{
if ((part.startsWith("\"")) && ((!part.endsWith("\"")) || ((bitcounter & 1) == 1))) {
found = true;
String add = bits.get(i) + fieldSeparator + bits.get(i + 1);
bits.remove(i);
@@ -490,10 +514,8 @@ public class DSpaceCSV implements Serializable
// Deal with quotes around the elements
int i = 0;
for (String part : bits)
{
if ((part.startsWith("\"")) && (part.endsWith("\"")))
{
for (String part : bits) {
if ((part.startsWith("\"")) && (part.endsWith("\""))) {
part = part.substring(1, part.length() - 1);
bits.set(i, part);
}
@@ -502,10 +524,8 @@ public class DSpaceCSV implements Serializable
// Remove embedded quotes
i = 0;
for (String part : bits)
{
if (part.contains("\"\""))
{
for (String part : bits) {
if (part.contains("\"\"")) {
part = part.replaceAll("\"\"", "\"");
bits.set(i, part);
}
@@ -517,18 +537,12 @@ public class DSpaceCSV implements Serializable
DSpaceCSVLine csvLine;
// Is this an existing item, or a new item (where id = '+')
if ("+".equals(id))
{
if ("+".equals(id)) {
csvLine = new DSpaceCSVLine();
}
else
{
try
{
csvLine = new DSpaceCSVLine(Integer.parseInt(id));
}
catch (NumberFormatException nfe)
{
} else {
try {
csvLine = new DSpaceCSVLine(UUID.fromString(id));
} catch (NumberFormatException nfe) {
System.err.println("Invalid item identifier: " + id);
System.err.println("Please check your CSV file for information. " +
"Item id must be numeric, or a '+' to add a new item");
@@ -538,13 +552,10 @@ public class DSpaceCSV implements Serializable
// Add the rest of the parts
i = 0;
for (String part : bits)
{
if (i > 0)
{
for (String part : bits) {
if (i > 0) {
// Is this a last empty item?
if ((last) && (i == headings.size()))
{
if ((last) && (i == headings.size())) {
part = "";
}
@@ -556,10 +567,8 @@ public class DSpaceCSV implements Serializable
}
csvLine.add(headings.get(i - 1), null);
String[] elements = part.split(escapedValueSeparator);
for (String element : elements)
{
if ((element != null) && (!"".equals(element)))
{
for (String element : elements) {
if ((element != null) && (!"".equals(element))) {
csvLine.add(headings.get(i - 1), element);
}
}
@@ -575,8 +584,7 @@ public class DSpaceCSV implements Serializable
*
* @return The lines
*/
public final List<DSpaceCSVLine> getCSVLines()
{
public final List<DSpaceCSVLine> getCSVLines() {
// Return the lines
return lines;
}
@@ -586,22 +594,20 @@ public class DSpaceCSV implements Serializable
*
* @return the array of CSV formatted Strings
*/
public final String[] getCSVLinesAsStringArray()
{
public final String[] getCSVLinesAsStringArray() {
// Create the headings line
String[] csvLines = new String[counter + 1];
csvLines[0] = "id" + fieldSeparator + "collection";
Collections.sort(headings);
for (String value : headings)
{
List<String> headingsCopy = new ArrayList<>(headings);
Collections.sort(headingsCopy);
for (String value : headingsCopy) {
csvLines[0] = csvLines[0] + fieldSeparator + value;
}
Iterator<DSpaceCSVLine> i = lines.iterator();
int c = 1;
while (i.hasNext())
{
csvLines[c++] = i.next().toCSV(headings);
while (i.hasNext()) {
csvLines[c++] = i.next().toCSV(headingsCopy, fieldSeparator, valueSeparator);
}
return csvLines;
@@ -611,11 +617,9 @@ public class DSpaceCSV implements Serializable
* Save the CSV file to the given filename
*
* @param filename The filename to save the CSV file to
*
* @throws IOException Thrown if an error occurs when writing the file
*/
public final void save(String filename) throws IOException
{
public final void save(String filename) throws IOException {
// Save the file
BufferedWriter out = new BufferedWriter(
new OutputStreamWriter(
@@ -633,16 +637,14 @@ public class DSpaceCSV implements Serializable
*
* The list can be configured via the key ignore-on-export in bulkedit.cfg
*
* @param md The DCValue to examine
* @param md The Metadatum to examine
* @return Whether or not it is OK to export this element
*/
private final boolean okToExport(DCValue md)
{
protected boolean okToExport(MetadataField md) {
// Now compare with the list to ignore
String key = md.schema + "." + md.element;
if (md.qualifier != null)
{
key += "." + md.qualifier;
String key = md.getMetadataSchema().getName() + "." + md.getElement();
if (md.getQualifier() != null) {
key += "." + md.getQualifier();
}
if (ignore.get(key) != null) {
return false;
@@ -657,8 +659,7 @@ public class DSpaceCSV implements Serializable
*
* @return The headings
*/
public List<String> getHeadings()
{
public List<String> getHeadings() {
return headings;
}
@@ -667,15 +668,22 @@ public class DSpaceCSV implements Serializable
*
* @return The formatted String as a csv
*/
public final String toString()
{
@Override
public final String toString() {
// Return the csv as one long string
StringBuffer csvLines = new StringBuffer();
StringBuilder csvLines = new StringBuilder();
String[] lines = this.getCSVLinesAsStringArray();
for (String line : lines)
{
for (String line : lines) {
csvLines.append(line).append("\n");
}
return csvLines.toString();
}
public String getAuthoritySeparator() {
return authoritySeparator;
}
public String getEscapedAuthoritySeparator() {
return escapedAuthoritySeparator;
}
}

View File

@@ -9,44 +9,78 @@ package org.dspace.app.bulkedit;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.UUID;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.factory.AuthorityServiceFactory;
import org.dspace.authority.service.AuthorityValueService;
/**
* Utility class to store a line from a CSV file
*
* @author Stuart Lewis
*/
public class DSpaceCSVLine implements Serializable
{
/** The item id of the item represented by this line. -1 is for a new item */
private int id;
public class DSpaceCSVLine implements Serializable {
/**
* The item id of the item represented by this line. -1 is for a new item
*/
private final UUID id;
/** The elements in this line in a hashtable, keyed by the metadata type */
private Map<String, ArrayList> items;
/**
* The elements in this line in a hashtable, keyed by the metadata type
*/
private final Map<String, ArrayList> items;
protected transient final AuthorityValueService authorityValueService
= AuthorityServiceFactory.getInstance().getAuthorityValueService();
/**
* ensuring that the order-sensible columns of the csv are processed in the correct order
*/
private transient final Comparator<? super String> headerComparator = new Comparator<String>() {
@Override
public int compare(String md1, String md2) {
// The metadata coming from an external source should be processed after the others
AuthorityValue source1 = authorityValueService.getAuthorityValueType(md1);
AuthorityValue source2 = authorityValueService.getAuthorityValueType(md2);
int compare;
if (source1 == null && source2 != null) {
compare = -1;
} else if (source1 != null && source2 == null) {
compare = 1;
} else {
// the order of the rest does not matter
compare = md1.compareTo(md2);
}
return compare;
}
};
/**
* Create a new CSV line
*
* @param itemId The item ID of the line
*/
public DSpaceCSVLine(int itemId)
{
public DSpaceCSVLine(UUID itemId) {
// Store the ID + separator, and initialise the hashtable
this.id = itemId;
items = new HashMap<String, ArrayList>();
items = new TreeMap<>(headerComparator);
// this.items = new HashMap<String, ArrayList>();
}
/**
* Create a new CSV line for a new item
*/
public DSpaceCSVLine()
{
// Set the ID to be -1, and initialise the hashtable
this.id = -1;
this.items = new HashMap<String, ArrayList>();
public DSpaceCSVLine() {
// Set the ID to be null, and initialise the hashtable
this.id = null;
this.items = new TreeMap<>(headerComparator);
}
/**
@@ -54,8 +88,7 @@ public class DSpaceCSVLine implements Serializable
*
* @return The item ID
*/
public int getID()
{
public UUID getID() {
// Return the ID
return id;
}
@@ -66,17 +99,14 @@ public class DSpaceCSVLine implements Serializable
* @param key The metadata key (e.g. dc.contributor.author)
* @param value The metadata value
*/
public void add(String key, String value)
{
public void add(String key, String value) {
// Create the array list if we need to
if (items.get(key) == null)
{
if (items.get(key) == null) {
items.put(key, new ArrayList<String>());
}
// Store the item if it is not null
if (value != null)
{
if (value != null) {
items.get(key).add(value);
}
}
@@ -87,8 +117,7 @@ public class DSpaceCSVLine implements Serializable
* @param key The metadata key
* @return All the elements that match
*/
public List<String> get(String key)
{
public List<String> get(String key) {
// Return any relevant values
return items.get(key);
}
@@ -98,8 +127,7 @@ public class DSpaceCSVLine implements Serializable
*
* @return The action (may be blank, 'withdraw', 'reinstate' or 'delete')
*/
public String getAction()
{
public String getAction() {
if (items.containsKey("action")) {
ArrayList actions = items.get("action");
if (actions.size() > 0) {
@@ -114,8 +142,7 @@ public class DSpaceCSVLine implements Serializable
*
* @return An enumeration of all the keys
*/
public Set<String> keys()
{
public Set<String> keys() {
// Return the keys
return items.keySet();
}
@@ -124,24 +151,23 @@ public class DSpaceCSVLine implements Serializable
* Write this line out as a CSV formatted string, in the order given by the headings provided
*
* @param headings The headings which define the order the elements must be presented in
* @param fieldSeparator separator between metadata fields
* @param valueSeparator separator between metadata values (within a field)
* @return The CSV formatted String
*/
protected String toCSV(List<String> headings)
{
protected String toCSV(List<String> headings, String fieldSeparator, String valueSeparator) {
StringBuilder bits = new StringBuilder();
// Add the id
bits.append("\"").append(id).append("\"").append(DSpaceCSV.fieldSeparator);
bits.append(valueToCSV(items.get("collection")));
bits.append("\"").append(id).append("\"").append(fieldSeparator);
bits.append(valueToCSV(items.get("collection"), valueSeparator));
// Add the rest of the elements
for (String heading : headings)
{
bits.append(DSpaceCSV.fieldSeparator);
for (String heading : headings) {
bits.append(fieldSeparator);
List<String> values = items.get(heading);
if (values != null && !"collection".equals(heading))
{
bits.append(valueToCSV(values));
if (values != null && !"collection".equals(heading)) {
bits.append(valueToCSV(values, valueSeparator));
}
}
@@ -152,32 +178,26 @@ public class DSpaceCSVLine implements Serializable
* Internal method to create a CSV formatted String joining a given set of elements
*
* @param values The values to create the string from
* @param valueSeparator value separator
* @return The line as a CSV formatted String
*/
protected String valueToCSV(List<String> values)
{
protected String valueToCSV(List<String> values, String valueSeparator) {
// Check there is some content
if (values == null)
{
if (values == null) {
return "";
}
// Get on with the work
String s;
if (values.size() == 1)
{
if (values.size() == 1) {
s = values.get(0);
}
else
{
} else {
// Concatenate any fields together
StringBuilder str = new StringBuilder();
for (String value : values)
{
if (str.length() > 0)
{
str.append(DSpaceCSV.valueSeparator);
for (String value : values) {
if (str.length() > 0) {
str.append(valueSeparator);
}
str.append(value);

View File

@@ -7,29 +7,51 @@
*/
package org.dspace.app.bulkedit;
import org.apache.commons.cli.*;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.dspace.content.*;
import com.google.common.collect.Iterators;
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.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.handle.HandleManager;
import java.util.ArrayList;
import java.sql.SQLException;
import java.util.List;
import org.dspace.handle.factory.HandleServiceFactory;
/**
* Metadata exporter to allow the batch export of metadata into a file
*
* @author Stuart Lewis
*/
public class MetadataExport
{
/** The items to export */
private ItemIterator toExport;
public class MetadataExport {
/**
* The items to export
*/
protected Iterator<Item> toExport;
/** Whether to export all metadata, or just normally edited metadata */
private boolean exportAll;
protected ItemService itemService;
protected Context context;
/**
* Whether to export all metadata, or just normally edited metadata
*/
protected boolean exportAll;
protected MetadataExport() {
itemService = ContentServiceFactory.getInstance().getItemService();
}
/**
* Set up a new metadata export
@@ -38,11 +60,13 @@ public class MetadataExport
* @param toExport The ItemIterator of items to export
* @param exportAll whether to export all metadata or not (include handle, provenance etc)
*/
public MetadataExport(Context c, ItemIterator toExport, boolean exportAll)
{
public MetadataExport(Context c, Iterator<Item> toExport, boolean exportAll) {
itemService = ContentServiceFactory.getInstance().getItemService();
// Store the export settings
this.toExport = toExport;
this.exportAll = exportAll;
this.context = c;
}
/**
@@ -52,16 +76,15 @@ public class MetadataExport
* @param toExport The Community to export
* @param exportAll whether to export all metadata or not (include handle, provenance etc)
*/
public MetadataExport(Context c, Community toExport, boolean exportAll)
{
try
{
public MetadataExport(Context c, Community toExport, boolean exportAll) {
itemService = ContentServiceFactory.getInstance().getItemService();
try {
// Try to export the community
this.toExport = new ItemIterator(c, buildFromCommunity(toExport, new ArrayList<Integer>(), 0));
this.toExport = buildFromCommunity(c, toExport, 0);
this.exportAll = exportAll;
}
catch (SQLException sqle)
{
this.context = c;
} catch (SQLException sqle) {
// Something went wrong...
System.err.println("Error running exporter:");
sqle.printStackTrace(System.err);
@@ -72,48 +95,47 @@ public class MetadataExport
/**
* Build an array list of item ids that are in a community (include sub-communities and collections)
*
* @param context DSpace context
* @param community The community to build from
* @param itemIDs The itemID (used for recursion - use an empty ArrayList)
* @param indent How many spaces to use when writing out the names of items added
* @return The list of item ids
* @throws SQLException
* @throws SQLException if database error
*/
private List<Integer> buildFromCommunity(Community community, List<Integer> itemIDs, int indent)
throws SQLException
{
protected Iterator<Item> buildFromCommunity(Context context, Community community, int indent)
throws SQLException {
// Add all the collections
Collection[] collections = community.getCollections();
for (Collection collection : collections)
{
for (int i = 0; i < indent; i++)
{
List<Collection> collections = community.getCollections();
Iterator<Item> result = null;
for (Collection collection : collections) {
for (int i = 0; i < indent; i++) {
System.out.print(" ");
}
ItemIterator items = collection.getAllItems();
while (items.hasNext())
{
int id = items.next().getID();
// Only add if not already included (so mapped items only appear once)
if (!itemIDs.contains(id))
{
itemIDs.add(id);
}
}
}
Iterator<Item> items = itemService.findByCollection(context, collection);
result = addItemsToResult(result, items);
}
// Add all the sub-communities
Community[] communities = community.getSubcommunities();
for (Community subCommunity : communities)
{
for (int i = 0; i < indent; i++)
{
List<Community> communities = community.getSubcommunities();
for (Community subCommunity : communities) {
for (int i = 0; i < indent; i++) {
System.out.print(" ");
}
buildFromCommunity(subCommunity, itemIDs, indent + 1);
Iterator<Item> items = buildFromCommunity(context, subCommunity, indent + 1);
result = addItemsToResult(result, items);
}
return itemIDs;
return result;
}
private Iterator<Item> addItemsToResult(Iterator<Item> result, Iterator<Item> items) {
if (result == null) {
result = items;
} else {
result = Iterators.concat(result, items);
}
return result;
}
/**
@@ -121,22 +143,26 @@ public class MetadataExport
*
* @return the exported CSV lines
*/
public DSpaceCSV export()
{
try
{
public DSpaceCSV export() {
try {
Context.Mode originalMode = context.getCurrentMode();
context.setMode(Context.Mode.READ_ONLY);
// Process each item
DSpaceCSV csv = new DSpaceCSV(exportAll);
while (toExport.hasNext())
{
csv.addItem(toExport.next());
while (toExport.hasNext()) {
Item item = toExport.next();
csv.addItem(item);
context.uncacheEntity(item);
}
context.setMode(originalMode);
// Return the results
return csv;
}
catch (Exception e)
{
} catch (Exception e) {
// Something went wrong...
System.err.println("Error exporting to CSV:");
e.printStackTrace();
return null;
}
}
@@ -147,8 +173,7 @@ public class MetadataExport
* @param options The command line options the user gave
* @param exitCode the system exit code to use
*/
private static void printHelp(Options options, int exitCode)
{
private static void printHelp(Options options, int exitCode) {
// print the help message
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MetadataExport\n", options);
@@ -161,9 +186,9 @@ public class MetadataExport
* main method to run the metadata exporter
*
* @param argv the command line arguments given
* @throws Exception if error occurs
*/
public static void main(String[] argv) throws Exception
{
public static void main(String[] argv) throws Exception {
// Create an options object and populate it
CommandLineParser parser = new PosixParser();
@@ -171,83 +196,70 @@ public class MetadataExport
options.addOption("i", "id", true, "ID or handle of thing to export (item, collection, or community)");
options.addOption("f", "file", true, "destination where you want file written");
options.addOption("a", "all", false, "include all metadata fields that are not normally changed (e.g. provenance)");
options.addOption("a", "all", false,
"include all metadata fields that are not normally changed (e.g. provenance)");
options.addOption("h", "help", false, "help");
CommandLine line = null;
try
{
try {
line = parser.parse(options, argv);
}
catch (ParseException pe)
{
} catch (ParseException pe) {
System.err.println("Error with commands.");
printHelp(options, 1);
System.exit(0);
}
if (line.hasOption('h'))
{
if (line.hasOption('h')) {
printHelp(options, 0);
}
// Check a filename is given
if (!line.hasOption('f'))
{
if (!line.hasOption('f')) {
System.err.println("Required parameter -f missing!");
printHelp(options, 1);
}
String filename = line.getOptionValue('f');
// Create a context
Context c = new Context();
Context c = new Context(Context.Mode.READ_ONLY);
c.turnOffAuthorisationSystem();
// The things we'll export
ItemIterator toExport = null;
Iterator<Item> toExport = null;
MetadataExport exporter = null;
// Export everything?
boolean exportAll = line.hasOption('a');
ContentServiceFactory contentServiceFactory = ContentServiceFactory.getInstance();
// Check we have an item OK
if (!line.hasOption('i'))
{
ItemService itemService = contentServiceFactory.getItemService();
if (!line.hasOption('i')) {
System.out.println("Exporting whole repository WARNING: May take some time!");
exporter = new MetadataExport(c, Item.findAll(c), exportAll);
}
else
{
exporter = new MetadataExport(c, itemService.findAll(c), exportAll);
} else {
String handle = line.getOptionValue('i');
DSpaceObject dso = HandleManager.resolveToObject(c, handle);
if (dso == null)
{
DSpaceObject dso = HandleServiceFactory.getInstance().getHandleService().resolveToObject(c, handle);
if (dso == null) {
System.err.println("Item '" + handle + "' does not resolve to an item in your repository!");
printHelp(options, 1);
}
if (dso.getType() == Constants.ITEM)
{
if (dso.getType() == Constants.ITEM) {
System.out.println("Exporting item '" + dso.getName() + "' (" + handle + ")");
List<Integer> item = new ArrayList<Integer>();
item.add(dso.getID());
exporter = new MetadataExport(c, new ItemIterator(c, item), exportAll);
}
else if (dso.getType() == Constants.COLLECTION)
{
List<Item> item = new ArrayList<>();
item.add((Item) dso);
exporter = new MetadataExport(c, item.iterator(), exportAll);
} else if (dso.getType() == Constants.COLLECTION) {
System.out.println("Exporting collection '" + dso.getName() + "' (" + handle + ")");
Collection collection = (Collection) dso;
toExport = collection.getAllItems();
toExport = itemService.findByCollection(c, collection);
exporter = new MetadataExport(c, toExport, exportAll);
}
else if (dso.getType() == Constants.COMMUNITY)
{
} else if (dso.getType() == Constants.COMMUNITY) {
System.out.println("Exporting community '" + dso.getName() + "' (" + handle + ")");
exporter = new MetadataExport(c, (Community) dso, exportAll);
}
else
{
} else {
System.err.println("Error identifying '" + handle + "'");
System.exit(1);
}

View File

@@ -12,15 +12,13 @@ package org.dspace.app.bulkedit;
*
* @author Stuart Lewis
*/
public class MetadataImportException extends Exception
{
public class MetadataImportException extends Exception {
/**
* Instantiate a new MetadataImportException
*
* @param message the error message
*/
public MetadataImportException(String message)
{
public MetadataImportException(String message) {
super(message);
}
@@ -30,8 +28,7 @@ public class MetadataImportException extends Exception
* @param message the error message
* @param exception the root cause
*/
public MetadataImportException(String message, Exception exception)
{
public MetadataImportException(String message, Exception exception) {
super(message, exception);
}
}

View File

@@ -12,27 +12,40 @@ package org.dspace.app.bulkedit;
*
* @author Stuart Lewis
*/
public class MetadataImportInvalidHeadingException extends Exception
{
/** The type of error (schema or element) */
public class MetadataImportInvalidHeadingException extends Exception {
/**
* The type of error (schema or element)
*/
private int type;
/** The bad heading */
/**
* The bad heading
*/
private String badHeading;
/** The column number */
/**
* The column number
*/
private int column;
/** Error with the schema */
/**
* Error with the schema
*/
public static final int SCHEMA = 0;
/** Error with the element */
/**
* Error with the element
*/
public static final int ELEMENT = 1;
/** Error with a missing header */
/**
* Error with a missing header
*/
public static final int MISSING = 98;
/** Error with the whole entry */
/**
* Error with the whole entry
*/
public static final int ENTRY = 99;
@@ -41,9 +54,9 @@ public class MetadataImportInvalidHeadingException extends Exception
*
* @param message the error message
* @param theType the type of the error
* @param theColumn column number
*/
public MetadataImportInvalidHeadingException(String message, int theType, int theColumn)
{
public MetadataImportInvalidHeadingException(String message, int theType, int theColumn) {
super(message);
badHeading = message;
type = theType;
@@ -55,8 +68,7 @@ public class MetadataImportInvalidHeadingException extends Exception
*
* @return the type of the exception
*/
public String getType()
{
public String getType() {
return "" + type;
}
@@ -65,8 +77,7 @@ public class MetadataImportInvalidHeadingException extends Exception
*
* @return the invalid heading
*/
public String getBadHeader()
{
public String getBadHeader() {
return badHeading;
}
@@ -75,8 +86,7 @@ public class MetadataImportInvalidHeadingException extends Exception
*
* @return the invalid column number
*/
public int getColumn()
{
public int getColumn() {
return column;
}
@@ -85,20 +95,16 @@ public class MetadataImportInvalidHeadingException extends Exception
*
* @return The exception message
*/
public String getMessage()
{
if (type == SCHEMA)
{
return "Unknown metadata schema in row " + column + ": " + badHeading;
} else if (type == ELEMENT)
{
return "Unknown metadata element in row " + column + ": " + badHeading;
} else if (type == MISSING)
{
return "Row with missing header: Row " + column;
} else
{
return "Bad metadata declaration in row " + column + ": " + badHeading;
@Override
public String getMessage() {
if (type == SCHEMA) {
return "Unknown metadata schema in column " + column + ": " + badHeading;
} else if (type == ELEMENT) {
return "Unknown metadata element in column " + column + ": " + badHeading;
} else if (type == MISSING) {
return "Row with missing header: column " + column;
} else {
return "Bad metadata declaration in column" + column + ": " + badHeading;
}
}
}

View File

@@ -0,0 +1,21 @@
/**
* 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/
*/
/**
* <p>The DSpace Batch Metadata Editor, which uses a CSV file to export/import
* item metadata.</p>
* <ul>
* <li>works on items, communities, collections or the whole site</li>
* <li>can also create new items, delete items and withdraw/restore them</li>
* <li>cannot export/import bitstreams</li>
* </ul>
*/
package org.dspace.app.bulkedit;

View File

@@ -8,10 +8,12 @@
package org.dspace.app.checker;
import java.io.FileNotFoundException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
@@ -23,42 +25,43 @@ import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.log4j.Logger;
import org.dspace.checker.BitstreamDispatcher;
import org.dspace.checker.BitstreamInfoDAO;
import org.dspace.checker.CheckerCommand;
import org.dspace.checker.HandleDispatcher;
import org.dspace.checker.IteratorDispatcher;
import org.dspace.checker.LimitedCountDispatcher;
import org.dspace.checker.LimitedDurationDispatcher;
import org.dspace.checker.ListDispatcher;
import org.dspace.checker.ResultsLogger;
import org.dspace.checker.ResultsPruner;
import org.dspace.checker.SimpleDispatcher;
import org.dspace.content.Bitstream;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.BitstreamService;
import org.dspace.core.Context;
import org.dspace.core.Utils;
/**
* Command line access to the checksum checker. Options are listed in the
* documentation for the main method.</p>
* documentation for the main method.
*
* @author Jim Downing
* @author Grace Carpenter
* @author Nathan Sarr
*/
public final class ChecksumChecker
{
public final class ChecksumChecker {
private static final Logger LOG = Logger.getLogger(ChecksumChecker.class);
private static final BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();
/**
* Blanked off constructor, this class should be used as a command line
* tool.
*
*/
private ChecksumChecker()
{
private ChecksumChecker() {
}
/**
* Command line access to the checksum package.
*
* @param args
* <dl>
* <dt>-h</dt>
* <dd>Print help on command line options</dd>
@@ -77,9 +80,11 @@ public final class ChecksumChecker
* <dt>-p</dt>
* <dd>Don't prune results before running checker</dd>
* </dl>
*
* @param args the command line arguments given
* @throws SQLException if error
*/
public static void main(String[] args)
{
public static void main(String[] args) throws SQLException {
// set up command line parser
CommandLineParser parser = new PosixParser();
CommandLine line = null;
@@ -103,42 +108,37 @@ public final class ChecksumChecker
options.addOption(useBitstreamIds);
options.addOption("p", "prune", false, "Prune configuration file");
options
.addOption(OptionBuilder
options.addOption(OptionBuilder
.withArgName("prune")
.hasOptionalArgs(1)
.withDescription(
"Prune old results (optionally using specified properties file for configuration)")
.create('p'));
try
{
try {
line = parser.parse(options, args);
}
catch (ParseException e)
{
} catch (ParseException e) {
LOG.fatal(e);
System.exit(1);
}
// user asks for help
if (line.hasOption('h'))
{
if (line.hasOption('h')) {
printHelp(options);
}
Context context = null;
try {
context = new Context();
// Prune stage
if (line.hasOption('p'))
{
if (line.hasOption('p')) {
ResultsPruner rp = null;
try
{
try {
rp = (line.getOptionValue('p') != null) ? ResultsPruner
.getPruner(line.getOptionValue('p')) : ResultsPruner
.getDefaultPruner();
}
catch (FileNotFoundException e)
{
.getPruner(context, line.getOptionValue('p')) : ResultsPruner
.getDefaultPruner(context);
} catch (FileNotFoundException e) {
LOG.error("File not found", e);
System.exit(1);
}
@@ -153,77 +153,55 @@ public final class ChecksumChecker
// process should loop infinitely through
// most_recent_checksum table
if (line.hasOption('l'))
{
dispatcher = new SimpleDispatcher(new BitstreamInfoDAO(), processStart, false);
}
else if (line.hasOption('L'))
{
dispatcher = new SimpleDispatcher(new BitstreamInfoDAO(), processStart, true);
}
else if (line.hasOption('b'))
{
if (line.hasOption('l')) {
dispatcher = new SimpleDispatcher(context, processStart, false);
} else if (line.hasOption('L')) {
dispatcher = new SimpleDispatcher(context, processStart, true);
} else if (line.hasOption('b')) {
// check only specified bitstream(s)
String[] ids = line.getOptionValues('b');
List<Integer> idList = new ArrayList<Integer>(ids.length);
List<Bitstream> bitstreams = new ArrayList<>(ids.length);
for (int i = 0; i < ids.length; i++)
{
try
{
idList.add(Integer.valueOf(ids[i]));
}
catch (NumberFormatException nfe)
{
for (int i = 0; i < ids.length; i++) {
try {
bitstreams.add(bitstreamService.find(context, UUID.fromString(ids[i])));
} catch (NumberFormatException nfe) {
System.err.println("The following argument: " + ids[i]
+ " is not an integer");
System.exit(0);
}
}
dispatcher = new ListDispatcher(idList);
}
else if (line.hasOption('a'))
{
dispatcher = new HandleDispatcher(new BitstreamInfoDAO(), line.getOptionValue('a'));
}
else if (line.hasOption('d'))
{
dispatcher = new IteratorDispatcher(bitstreams.iterator());
} else if (line.hasOption('a')) {
dispatcher = new HandleDispatcher(context, line.getOptionValue('a'));
} else if (line.hasOption('d')) {
// run checker process for specified duration
try
{
try {
dispatcher = new LimitedDurationDispatcher(
new SimpleDispatcher(new BitstreamInfoDAO(), processStart, true), new Date(
new SimpleDispatcher(context, processStart, true), new Date(
System.currentTimeMillis()
+ Utils.parseDuration(line
.getOptionValue('d'))));
}
catch (Exception e)
{
} catch (Exception e) {
LOG.fatal("Couldn't parse " + line.getOptionValue('d')
+ " as a duration: ", e);
System.exit(0);
}
}
else if (line.hasOption('c'))
{
int count = Integer.valueOf(line.getOptionValue('c')).intValue();
} else if (line.hasOption('c')) {
int count = Integer.valueOf(line.getOptionValue('c'));
// run checker process for specified number of bitstreams
dispatcher = new LimitedCountDispatcher(new SimpleDispatcher(
new BitstreamInfoDAO(), processStart, false), count);
}
else
{
context, processStart, false), count);
} else {
dispatcher = new LimitedCountDispatcher(new SimpleDispatcher(
new BitstreamInfoDAO(), processStart, false), 1);
context, processStart, false), 1);
}
ResultsLogger logger = new ResultsLogger(processStart);
CheckerCommand checker = new CheckerCommand();
CheckerCommand checker = new CheckerCommand(context);
// verbose reporting
if (line.hasOption('v'))
{
if (line.hasOption('v')) {
checker.setReportVerbose(true);
}
@@ -231,7 +209,13 @@ public final class ChecksumChecker
checker.setDispatcher(dispatcher);
checker.setCollector(logger);
checker.process();
System.exit(0);
context.complete();
context = null;
} finally {
if (context != null) {
context.abort();
}
}
}
/**
@@ -239,24 +223,19 @@ public final class ChecksumChecker
*
* @param options that are available for the user
*/
private static void printHelp(Options options)
{
private static void printHelp(Options options) {
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("Checksum Checker\n", options);
System.out
.println("\nSpecify a duration for checker process, using s(seconds),"
System.out.println("\nSpecify a duration for checker process, using s(seconds),"
+ "m(minutes), or h(hours): ChecksumChecker -d 30s"
+ " OR ChecksumChecker -d 30m"
+ " OR ChecksumChecker -d 2h");
System.out
.println("\nSpecify bitstream IDs: ChecksumChecker -b 13 15 17 20");
System.out.println("\nSpecify bitstream IDs: ChecksumChecker -b 13 15 17 20");
System.out.println("\nLoop once through all bitstreams: "
+ "ChecksumChecker -l");
System.out
.println("\nLoop continuously through all bitstreams: ChecksumChecker -L");
System.out
.println("\nCheck a defined number of bitstreams: ChecksumChecker -c 10");
System.out.println("\nLoop continuously through all bitstreams: ChecksumChecker -L");
System.out.println("\nCheck a defined number of bitstreams: ChecksumChecker -c 10");
System.out.println("\nReport all processing (verbose)(default reports only errors): ChecksumChecker -v");
System.out.println("\nDefault (no arguments) is equivalent to '-c 1'");
System.exit(0);

View File

@@ -7,16 +7,14 @@
*/
package org.dspace.app.configuration;
import org.dspace.kernel.config.SpringLoader;
import org.dspace.services.ConfigurationService;
import java.io.File;
import java.net.MalformedURLException;
import org.dspace.kernel.config.SpringLoader;
import org.dspace.services.ConfigurationService;
/**
* User: kevin (kevin at atmire.com)
* Date: 3-aug-2011
* Time: 11:31:21
* @author Kevin Van de Velde (kevin at atmire dot com)
*/
public class APISpringLoader implements SpringLoader {

View File

@@ -9,7 +9,9 @@ package org.dspace.app.harvest;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
@@ -17,30 +19,39 @@ import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.dspace.authorize.AuthorizeException;
import org.dspace.browse.IndexBrowse;
import org.dspace.content.Collection;
import org.dspace.content.DSpaceObject;
import org.dspace.harvest.HarvestedCollection;
import org.dspace.content.Item;
import org.dspace.content.ItemIterator;
import org.dspace.harvest.OAIHarvester;
import org.dspace.harvest.OAIHarvester.HarvestingException;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
import org.dspace.content.service.ItemService;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.dspace.handle.HandleManager;
import org.dspace.eperson.factory.EPersonServiceFactory;
import org.dspace.eperson.service.EPersonService;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.harvest.HarvestedCollection;
import org.dspace.harvest.HarvestingException;
import org.dspace.harvest.OAIHarvester;
import org.dspace.harvest.factory.HarvestServiceFactory;
import org.dspace.harvest.service.HarvestedCollectionService;
/**
* Test class for harvested collections.
*
* @author Alexey Maslov
*/
public class Harvest
{
public class Harvest {
private static Context context;
public static void main(String[] argv) throws Exception
{
private static final HarvestedCollectionService harvestedCollectionService =
HarvestServiceFactory.getInstance().getHarvestedCollectionService();
private static final EPersonService ePersonService = EPersonServiceFactory.getInstance().getEPersonService();
private static final CollectionService collectionService =
ContentServiceFactory.getInstance().getCollectionService();
public static void main(String[] argv) throws Exception {
// create an options object and populate it
CommandLineParser parser = new PosixParser();
@@ -56,12 +67,19 @@ public class Harvest
options.addOption("P", "purge", false, "purge all harvestable collections");
options.addOption("e", "eperson", true, "eperson");
options.addOption("c", "collection", true, "harvesting collection (handle or id)");
options.addOption("t", "type", true, "type of harvesting (0 for none)");
options.addOption("a", "address", true, "address of the OAI-PMH server");
options.addOption("i", "oai_set_id", true, "id of the PMH set representing the harvested collection");
options.addOption("m", "metadata_format", true, "the name of the desired metadata format for harvesting, resolved to namespace and crosswalk in dspace.cfg");
options.addOption("e", "eperson", true,
"eperson");
options.addOption("c", "collection", true,
"harvesting collection (handle or id)");
options.addOption("t", "type", true,
"type of harvesting (0 for none)");
options.addOption("a", "address", true,
"address of the OAI-PMH server");
options.addOption("i", "oai_set_id", true,
"id of the PMH set representing the harvested collection");
options.addOption("m", "metadata_format", true,
"the name of the desired metadata format for harvesting, resolved to namespace and " +
"crosswalk in dspace.cfg");
options.addOption("h", "help", false, "help");
@@ -75,27 +93,21 @@ public class Harvest
String metadataKey = null;
int harvestType = 0;
if (line.hasOption('h'))
{
if (line.hasOption('h')) {
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("Harvest\n", options);
System.out
.println("\nPING OAI server: Harvest -g -s oai_source -i oai_set_id");
System.out
.println("RUNONCE harvest with arbitrary options: Harvest -o -e eperson -c collection -t harvest_type -a oai_source -i oai_set_id -m metadata_format");
System.out
.println("SETUP a collection for harvesting: Harvest -s -c collection -t harvest_type -a oai_source -i oai_set_id -m metadata_format");
System.out
.println("RUN harvest once: Harvest -r -e eperson -c collection");
System.out
.println("START harvest scheduler: Harvest -S");
System.out
.println("RESET all harvest status: Harvest -R");
System.out
.println("PURGE a collection of items and settings: Harvest -p -e eperson -c collection");
System.out
.println("PURGE all harvestable collections: Harvest -P -e eperson");
System.out.println("\nPING OAI server: Harvest -g -a oai_source -i oai_set_id");
System.out.println(
"RUNONCE harvest with arbitrary options: Harvest -o -e eperson -c collection -t harvest_type -a " +
"oai_source -i oai_set_id -m metadata_format");
System.out.println(
"SETUP a collection for harvesting: Harvest -s -c collection -t harvest_type -a oai_source -i " +
"oai_set_id -m metadata_format");
System.out.println("RUN harvest once: Harvest -r -e eperson -c collection");
System.out.println("START harvest scheduler: Harvest -S");
System.out.println("RESET all harvest status: Harvest -R");
System.out.println("PURGE a collection of items and settings: Harvest -p -e eperson -c collection");
System.out.println("PURGE all harvestable collections: Harvest -P -e eperson");
System.exit(0);
@@ -151,21 +163,17 @@ public class Harvest
// Instantiate our class
Harvest harvester = new Harvest();
harvester.context = new Context();
harvester.context = new Context(Context.Mode.BATCH_EDIT);
// Check our options
if (command == null)
{
if (command == null) {
System.out
.println("Error - no parameters specified (run with -h flag for details)");
System.exit(1);
}
} else if ("run".equals(command)) {
// Run a single harvest cycle on a collection using saved settings.
else if ("run".equals(command))
{
if (collection == null || eperson == null)
{
if (collection == null || eperson == null) {
System.out
.println("Error - a target collection and eperson must be provided");
System.out.println(" (run with -h flag for details)");
@@ -173,41 +181,33 @@ public class Harvest
}
harvester.runHarvest(collection, eperson);
}
} else if ("start".equals(command)) {
// start the harvest loop
else if ("start".equals(command))
{
startHarvester();
}
} else if ("reset".equals(command)) {
// reset harvesting status
else if ("reset".equals(command))
{
resetHarvesting();
}
} else if ("purgeAll".equals(command)) {
// purge all collections that are set up for harvesting (obviously for testing purposes only)
else if ("purgeAll".equals(command))
{
if (eperson == null)
{
if (eperson == null) {
System.out
.println("Error - an eperson must be provided");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
List<Integer> cids = HarvestedCollection.findAll(context);
System.out.println("Purging the following collections (deleting items and resetting harvest status): " + cids.toString());
for (Integer cid : cids)
{
harvester.purgeCollection(cid.toString(), eperson);
List<HarvestedCollection> harvestedCollections = harvestedCollectionService.findAll(context);
for (HarvestedCollection harvestedCollection : harvestedCollections) {
System.out.println(
"Purging the following collections (deleting items and resetting harvest status): " +
harvestedCollection
.getCollection().getID().toString());
harvester.purgeCollection(harvestedCollection.getCollection().getID().toString(), eperson);
}
context.complete();
}
} else if ("purge".equals(command)) {
// Delete all items in a collection. Useful for testing fresh harvests.
else if ("purge".equals(command))
{
if (collection == null || eperson == null)
{
if (collection == null || eperson == null) {
System.out
.println("Error - a target collection and eperson must be provided");
System.out.println(" (run with -h flag for details)");
@@ -218,39 +218,34 @@ public class Harvest
context.complete();
//TODO: implement this... remove all items and remember to unset "last-harvested" settings
}
} else if ("config".equals(command)) {
// Configure a collection with the three main settings
else if ("config".equals(command))
{
if (collection == null)
{
if (collection == null) {
System.out.println("Error - a target collection must be provided");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
if (oaiSource == null || oaiSetID == null)
{
if (oaiSource == null || oaiSetID == null) {
System.out.println("Error - both the OAI server address and OAI set id must be specified");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
if (metadataKey == null)
{
System.out.println("Error - a metadata key (commonly the prefix) must be specified for this collection");
if (metadataKey == null) {
System.out
.println("Error - a metadata key (commonly the prefix) must be specified for this collection");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
harvester.configureCollection(collection, harvestType, oaiSource, oaiSetID, metadataKey);
}
else if ("ping".equals(command))
{
if (oaiSource == null || oaiSetID == null)
{
} else if ("ping".equals(command)) {
if (oaiSource == null || oaiSetID == null) {
System.out.println("Error - both the OAI server address and OAI set id must be specified");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
pingResponder(oaiSource, oaiSetID, metadataKey);
}
}
@@ -265,39 +260,30 @@ public class Harvest
try {
// is the ID a handle?
if (collectionID != null)
{
if (collectionID.indexOf('/') != -1)
{
if (collectionID != null) {
if (collectionID.indexOf('/') != -1) {
// string has a / so it must be a handle - try and resolve it
dso = HandleManager.resolveToObject(context, collectionID);
dso = HandleServiceFactory.getInstance().getHandleService().resolveToObject(context, collectionID);
// resolved, now make sure it's a collection
if (dso == null || dso.getType() != Constants.COLLECTION)
{
if (dso == null || dso.getType() != Constants.COLLECTION) {
targetCollection = null;
}
else
{
} else {
targetCollection = (Collection) dso;
}
}
// not a handle, try and treat it as an integer collection
// database ID
else
{
System.out.println("Looking up by id: " + collectionID + ", parsed as '" + Integer.parseInt(collectionID) + "', " + "in context: " + context);
targetCollection = Collection.find(context, Integer.parseInt(collectionID));
} 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);
targetCollection = collectionService.find(context, UUID.fromString(collectionID));
}
}
// was the collection valid?
if (targetCollection == null)
{
if (targetCollection == null) {
System.out.println("Cannot resolve " + collectionID + " to collection");
System.exit(1);
}
}
catch (SQLException se) {
} catch (SQLException se) {
se.printStackTrace();
}
@@ -305,33 +291,31 @@ public class Harvest
}
private void configureCollection(String collectionID, int type, String oaiSource, String oaiSetId, String mdConfigId) {
private void configureCollection(String collectionID, int type, String oaiSource, String oaiSetId,
String mdConfigId) {
System.out.println("Running: configure collection");
Collection collection = resolveCollection(collectionID);
System.out.println(collection.getID());
try {
HarvestedCollection hc = HarvestedCollection.find(context, collection.getID());
HarvestedCollection hc = harvestedCollectionService.find(context, collection);
if (hc == null) {
hc = HarvestedCollection.create(context, collection.getID());
hc = harvestedCollectionService.create(context, collection);
}
context.turnOffAuthorisationSystem();
hc.setHarvestParams(type, oaiSource, oaiSetId, mdConfigId);
hc.setHarvestStatus(HarvestedCollection.STATUS_READY);
hc.update();
harvestedCollectionService.update(context, hc);
context.restoreAuthSystemState();
context.complete();
}
catch (Exception e) {
} catch (Exception e) {
System.out.println("Changes could not be committed");
e.printStackTrace();
System.exit(1);
}
finally {
if (context != null)
{
} finally {
if (context != null) {
context.restoreAuthSystemState();
}
}
@@ -345,47 +329,45 @@ public class Harvest
* @param email
*/
private void purgeCollection(String collectionID, String email) {
System.out.println("Purging collection of all items and resetting last_harvested and harvest_message: " + collectionID);
System.out.println(
"Purging collection of all items and resetting last_harvested and harvest_message: " + collectionID);
Collection collection = resolveCollection(collectionID);
try
{
EPerson eperson = EPerson.findByEmail(context, email);
try {
EPerson eperson = ePersonService.findByEmail(context, email);
context.setCurrentUser(eperson);
context.turnOffAuthorisationSystem();
ItemIterator it = collection.getAllItems();
IndexBrowse ib = new IndexBrowse(context);
ItemService itemService = ContentServiceFactory.getInstance().getItemService();
Iterator<Item> it = itemService.findByCollection(context, collection);
int i = 0;
while (it.hasNext()) {
i++;
Item item = it.next();
System.out.println("Deleting: " + item.getHandle());
ib.itemRemoved(item);
collection.removeItem(item);
// commit every 50 items
collectionService.removeItem(context, collection, item);
context.uncacheEntity(item);// Dispatch events every 50 items
if (i % 50 == 0) {
context.commit();
context.dispatchEvents();
i = 0;
}
}
HarvestedCollection hc = HarvestedCollection.find(context, collection.getID());
HarvestedCollection hc = harvestedCollectionService.find(context, collection);
if (hc != null) {
hc.setHarvestResult(null,"");
hc.setLastHarvested(null);
hc.setHarvestMessage("");
hc.setHarvestStatus(HarvestedCollection.STATUS_READY);
hc.setHarvestStartTime(null);
hc.update();
harvestedCollectionService.update(context, hc);
}
context.restoreAuthSystemState();
context.commit();
}
catch (Exception e) {
context.dispatchEvents();
} catch (Exception e) {
System.out.println("Changes could not be committed");
e.printStackTrace();
System.exit(1);
}
finally {
} finally {
context.restoreAuthSystemState();
}
}
@@ -401,11 +383,10 @@ public class Harvest
OAIHarvester harvester = null;
try {
Collection collection = resolveCollection(collectionID);
HarvestedCollection hc = HarvestedCollection.find(context, collection.getID());
HarvestedCollection hc = harvestedCollectionService.find(context, collection);
harvester = new OAIHarvester(context, collection, hc);
System.out.println("success. ");
}
catch (HarvestingException hex) {
} catch (HarvestingException hex) {
System.out.print("failed. ");
System.out.println(hex.getMessage());
throw new IllegalStateException("Unable to harvest", hex);
@@ -417,67 +398,87 @@ public class Harvest
try {
// Harvest will not work for an anonymous user
EPerson eperson = EPerson.findByEmail(context, email);
EPerson eperson = ePersonService.findByEmail(context, email);
System.out.println("Harvest started... ");
context.setCurrentUser(eperson);
harvester.runHarvest();
context.complete();
}
catch (SQLException e) {
} catch (SQLException e) {
throw new IllegalStateException("Failed to run harvester", e);
}
catch (AuthorizeException e) {
} catch (AuthorizeException e) {
throw new IllegalStateException("Failed to run harvester", e);
}
catch (IOException e) {
} catch (IOException e) {
throw new IllegalStateException("Failed to run harvester", e);
}
System.out.println("Harvest complete. ");
}
/**
* Resets harvest_status and harvest_start_time flags for all collections that have a row in the harvested_collections table
* Resets harvest_status and harvest_start_time flags for all collections that have a row in the
* harvested_collections table
*/
private static void resetHarvesting() {
System.out.print("Resetting harvest status flag on all collections... ");
try
{
List<Integer> cids = HarvestedCollection.findAll(context);
for (Integer cid : cids)
{
HarvestedCollection hc = HarvestedCollection.find(context, cid);
try {
List<HarvestedCollection> harvestedCollections = harvestedCollectionService.findAll(context);
for (HarvestedCollection harvestedCollection : harvestedCollections) {
//hc.setHarvestResult(null,"");
hc.setHarvestStartTime(null);
hc.setHarvestStatus(HarvestedCollection.STATUS_READY);
hc.update();
harvestedCollection.setHarvestStartTime(null);
harvestedCollection.setHarvestStatus(HarvestedCollection.STATUS_READY);
harvestedCollectionService.update(context, harvestedCollection);
}
context.commit();
System.out.println("success. ");
}
catch (Exception ex) {
} catch (Exception ex) {
System.out.println("failed. ");
ex.printStackTrace();
}
}
/**
* Starts up the harvest scheduler. Terminating this process will stop the scheduler.
*/
private static void startHarvester()
{
try
{
private static void startHarvester() {
try {
System.out.print("Starting harvest loop... ");
OAIHarvester.startNewScheduler();
HarvestServiceFactory.getInstance().getHarvestSchedulingService().startNewScheduler();
System.out.println("running. ");
}
catch (Exception ex) {
} catch (Exception ex) {
ex.printStackTrace();
}
}
/**
* See if the responder is alive and working.
*
* @param server address of the responder's host.
* @param set name of an item set.
* @param metadataFormat local prefix name, or null for "dc".
*/
private static void pingResponder(String server, String set, String metadataFormat) {
List<String> errors;
System.out.print("Testing basic PMH access: ");
errors = OAIHarvester.verifyOAIharvester(server, set,
(null != metadataFormat) ? metadataFormat : "dc", false);
if (errors.isEmpty()) {
System.out.println("OK");
} else {
for (String error : errors) {
System.err.println(error);
}
}
System.out.print("Testing ORE support: ");
errors = OAIHarvester.verifyOAIharvester(server, set,
(null != metadataFormat) ? metadataFormat : "dc", true);
if (errors.isEmpty()) {
System.out.println("OK");
} else {
for (String error : errors) {
System.err.println(error);
}
}
}
}

View File

@@ -0,0 +1,246 @@
/**
* 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.itemexport;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
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.PosixParser;
import org.dspace.app.itemexport.factory.ItemExportServiceFactory;
import org.dspace.app.itemexport.service.ItemExportService;
import org.dspace.content.Collection;
import org.dspace.content.Item;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
import org.dspace.content.service.ItemService;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.handle.service.HandleService;
/**
* Item exporter to create simple AIPs for DSpace content. Currently exports
* individual items, or entire collections. For instructions on use, see
* printUsage() method.
* <P>
* ItemExport creates the simple AIP package that the importer also uses. It
* consists of:
* <P>
* /exportdir/42/ (one directory per item) / dublin_core.xml - qualified dublin
* core in RDF schema / contents - text file, listing one file per line / file1
* - files contained in the item / file2 / ...
* <P>
* issues -doesn't handle special characters in metadata (needs to turn {@code &'s} into
* {@code &amp;}, etc.)
* <P>
* Modified by David Little, UCSD Libraries 12/21/04 to allow the registration
* of files (bitstreams) into DSpace.
*
* @author David Little
* @author Jay Paz
*/
public class ItemExportCLITool {
protected static ItemExportService itemExportService = ItemExportServiceFactory.getInstance()
.getItemExportService();
protected static HandleService handleService = HandleServiceFactory.getInstance().getHandleService();
protected static ItemService itemService = ContentServiceFactory.getInstance().getItemService();
protected static CollectionService collectionService = ContentServiceFactory.getInstance().getCollectionService();
/**
* Default constructor
*/
private ItemExportCLITool() { }
/*
*
*/
public static void main(String[] argv) throws Exception {
// create an options object and populate it
CommandLineParser parser = new PosixParser();
Options options = new Options();
options.addOption("t", "type", true, "type: COLLECTION or ITEM");
options.addOption("i", "id", true, "ID or handle of thing to export");
options.addOption("d", "dest", true,
"destination where you want items to go");
options.addOption("m", "migrate", false,
"export for migration (remove handle and metadata that will be re-created in new system)");
options.addOption("n", "number", true,
"sequence number to begin exporting items with");
options.addOption("z", "zip", true, "export as zip file (specify filename e.g. export.zip)");
options.addOption("h", "help", false, "help");
// as pointed out by Peter Dietz this provides similar functionality to export metadata
// but it is needed since it directly exports to Simple Archive Format (SAF)
options.addOption("x", "exclude-bitstreams", false, "do not export bitstreams");
CommandLine line = parser.parse(options, argv);
String typeString = null;
String destDirName = null;
String myIDString = null;
int seqStart = -1;
int myType = -1;
Item myItem = null;
Collection mycollection = null;
if (line.hasOption('h')) {
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("ItemExport\n", options);
System.out
.println("\nfull collection: ItemExport -t COLLECTION -i ID -d dest -n number");
System.out
.println("singleitem: ItemExport -t ITEM -i ID -d dest -n number");
System.exit(0);
}
if (line.hasOption('t')) { // type
typeString = line.getOptionValue('t');
if ("ITEM".equals(typeString)) {
myType = Constants.ITEM;
} else if ("COLLECTION".equals(typeString)) {
myType = Constants.COLLECTION;
}
}
if (line.hasOption('i')) { // id
myIDString = line.getOptionValue('i');
}
if (line.hasOption('d')) { // dest
destDirName = line.getOptionValue('d');
}
if (line.hasOption('n')) { // number
seqStart = Integer.parseInt(line.getOptionValue('n'));
}
boolean migrate = false;
if (line.hasOption('m')) { // number
migrate = true;
}
boolean zip = false;
String zipFileName = "";
if (line.hasOption('z')) {
zip = true;
zipFileName = line.getOptionValue('z');
}
boolean excludeBitstreams = false;
if (line.hasOption('x')) {
excludeBitstreams = true;
}
// now validate the args
if (myType == -1) {
System.out
.println("type must be either COLLECTION or ITEM (-h for help)");
System.exit(1);
}
if (destDirName == null) {
System.out
.println("destination directory must be set (-h for help)");
System.exit(1);
}
if (seqStart == -1) {
System.out
.println("sequence start number must be set (-h for help)");
System.exit(1);
}
if (myIDString == null) {
System.out
.println("ID must be set to either a database ID or a handle (-h for help)");
System.exit(1);
}
Context c = new Context(Context.Mode.READ_ONLY);
c.turnOffAuthorisationSystem();
if (myType == Constants.ITEM) {
// first, is myIDString a handle?
if (myIDString.indexOf('/') != -1) {
myItem = (Item) handleService.resolveToObject(c, myIDString);
if ((myItem == null) || (myItem.getType() != Constants.ITEM)) {
myItem = null;
}
} else {
myItem = itemService.find(c, UUID.fromString(myIDString));
}
if (myItem == null) {
System.out
.println("Error, item cannot be found: " + myIDString);
}
} else {
if (myIDString.indexOf('/') != -1) {
// has a / must be a handle
mycollection = (Collection) handleService.resolveToObject(c,
myIDString);
// ensure it's a collection
if ((mycollection == null)
|| (mycollection.getType() != Constants.COLLECTION)) {
mycollection = null;
}
} else if (myIDString != null) {
mycollection = collectionService.find(c, UUID.fromString(myIDString));
}
if (mycollection == null) {
System.out.println("Error, collection cannot be found: "
+ myIDString);
System.exit(1);
}
}
if (zip) {
Iterator<Item> items;
if (myItem != null) {
List<Item> myItems = new ArrayList<>();
myItems.add(myItem);
items = myItems.iterator();
} else {
System.out.println("Exporting from collection: " + myIDString);
items = itemService.findByCollection(c, mycollection);
}
itemExportService.exportAsZip(c, items, destDirName, zipFileName, seqStart, migrate, excludeBitstreams);
} else {
if (myItem != null) {
// it's only a single item
itemExportService
.exportItem(c, Collections.singletonList(myItem).iterator(), destDirName, seqStart, migrate,
excludeBitstreams);
} else {
System.out.println("Exporting from collection: " + myIDString);
// it's a collection, so do a bunch of items
Iterator<Item> i = itemService.findByCollection(c, mycollection);
itemExportService.exportItem(c, i, destDirName, seqStart, migrate, excludeBitstreams);
}
}
c.complete();
}
}

View File

@@ -10,20 +10,17 @@ package org.dspace.app.itemexport;
/**
* An exception that can be thrown when error occur during item export
*/
public class ItemExportException extends Exception
{
public class ItemExportException extends Exception {
public static final int EXPORT_TOO_LARGE = 0;
private int reason;
public ItemExportException(int r, String message)
{
public ItemExportException(int r, String message) {
super(message);
reason = r;
}
public int getReason()
{
public int getReason() {
return reason;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
/**
* 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.itemexport.factory;
import org.dspace.app.itemexport.service.ItemExportService;
import org.dspace.services.factory.DSpaceServicesFactory;
/**
* Abstract factory to get services for the itemexport package, use ItemExportServiceFactory.getInstance() to
* retrieve an implementation
*
* @author kevinvandevelde at atmire.com
*/
public abstract class ItemExportServiceFactory {
public abstract ItemExportService getItemExportService();
public static ItemExportServiceFactory getInstance() {
return DSpaceServicesFactory.getInstance().getServiceManager()
.getServiceByName("itemExportServiceFactory", ItemExportServiceFactory.class);
}
}

View File

@@ -0,0 +1,28 @@
/**
* 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.itemexport.factory;
import org.dspace.app.itemexport.service.ItemExportService;
import org.springframework.beans.factory.annotation.Autowired;
/**
* Factory implementation to get services for the itemexport package, use ItemExportServiceFactory.getInstance() to
* retrieve an implementation
*
* @author kevinvandevelde at atmire.com
*/
public class ItemExportServiceFactoryImpl extends ItemExportServiceFactory {
@Autowired(required = true)
private ItemExportService itemExportService;
@Override
public ItemExportService getItemExportService() {
return itemExportService;
}
}

View File

@@ -0,0 +1,270 @@
/**
* 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.itemexport.service;
import java.io.InputStream;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import javax.mail.MessagingException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
/**
* Item exporter to create simple AIPs for DSpace content. Currently exports
* individual items, or entire collections. For instructions on use, see
* printUsage() method.
* <P>
* ItemExport creates the simple AIP package that the importer also uses. It
* consists of:
* <P>
* /exportdir/42/ (one directory per item) / dublin_core.xml - qualified dublin
* core in RDF schema / contents - text file, listing one file per line / file1
* - files contained in the item / file2 / ...
* <P>
* issues -doesn't handle special characters in metadata (needs to turn {@code &'s} into
* {@code &amp;}, etc.)
* <P>
* Modified by David Little, UCSD Libraries 12/21/04 to allow the registration
* of files (bitstreams) into DSpace.
*
* @author David Little
* @author Jay Paz
*/
public interface ItemExportService {
/**
* used for export download
*/
public static final String COMPRESSED_EXPORT_MIME_TYPE = "application/zip";
public void exportItem(Context c, Iterator<Item> i,
String destDirName, int seqStart, boolean migrate,
boolean excludeBitstreams) throws Exception;
/**
* Method to perform an export and save it as a zip file.
*
* @param context The DSpace Context
* @param items The items to export
* @param destDirName The directory to save the export in
* @param zipFileName The name to save the zip file as
* @param seqStart The first number in the sequence
* @param migrate Whether to use the migrate option or not
* @param excludeBitstreams Whether to exclude bitstreams or not
* @throws Exception if error
*/
public void exportAsZip(Context context, Iterator<Item> items,
String destDirName, String zipFileName,
int seqStart, boolean migrate,
boolean excludeBitstreams) throws Exception;
/**
* Convenience methot to create export a single Community, Collection, or
* Item
*
* @param dso - the dspace object to export
* @param context - the dspace context
* @param migrate Whether to use the migrate option or not
* @throws Exception if error
*/
public void createDownloadableExport(DSpaceObject dso,
Context context, boolean migrate) throws Exception;
/**
* Convenience method to export a List of dspace objects (Community,
* Collection or Item)
*
* @param dsObjects - List containing dspace objects
* @param context - the dspace context
* @param migrate Whether to use the migrate option or not
* @throws Exception if error
*/
public void createDownloadableExport(List<DSpaceObject> dsObjects,
Context context, boolean migrate) throws Exception;
/**
* Convenience methot to create export a single Community, Collection, or
* Item
*
* @param dso - the dspace object to export
* @param context - the dspace context
* @param additionalEmail - cc email to use
* @param migrate Whether to use the migrate option or not
* @throws Exception if error
*/
public void createDownloadableExport(DSpaceObject dso,
Context context, String additionalEmail, boolean migrate) throws Exception;
/**
* Convenience method to export a List of dspace objects (Community,
* Collection or Item)
*
* @param dsObjects - List containing dspace objects
* @param context - the dspace context
* @param additionalEmail - cc email to use
* @param migrate Whether to use the migrate option or not
* @throws Exception if error
*/
public void createDownloadableExport(List<DSpaceObject> dsObjects,
Context context, String additionalEmail, boolean migrate) throws Exception;
/**
* Create a file name based on the date and eperson
*
* @param type Type of object (as string)
* @param eperson - eperson who requested export and will be able to download it
* @param date - the date the export process was created
* @return String representing the file name in the form of
* 'export_yyy_MMM_dd_count_epersonID'
* @throws Exception if error
*/
public String assembleFileName(String type, EPerson eperson,
Date date) throws Exception;
/**
* Use config file entry for org.dspace.app.itemexport.download.dir and id
* of the eperson to create a download directory name
*
* @param ePerson - the eperson who requested export archive
* @return String representing a directory in the form of
* org.dspace.app.itemexport.download.dir/epersonID
* @throws Exception if error
*/
public String getExportDownloadDirectory(EPerson ePerson)
throws Exception;
/**
* Returns config file entry for org.dspace.app.itemexport.work.dir
*
* @return String representing config file entry for
* org.dspace.app.itemexport.work.dir
* @throws Exception if error
*/
public String getExportWorkDirectory() throws Exception;
/**
* Used to read the export archived. Inteded for download.
*
* @param fileName the name of the file to download
* @param eperson the eperson requesting the download
* @return an input stream of the file to be downloaded
* @throws Exception if error
*/
public InputStream getExportDownloadInputStream(String fileName,
EPerson eperson) throws Exception;
/**
* Get the file size of the export archive represented by the file name.
*
* @param context DSpace context
* @param fileName name of the file to get the size.
* @return size as long
* @throws Exception if error
*/
public long getExportFileSize(Context context, String fileName) throws Exception;
/**
* Get the last modified date of the export archive represented by the file name.
*
* @param context DSpace context
* @param fileName name of the file to get the size.
* @return date as long
* @throws Exception if error
* @see java.io.File#lastModified()
*/
public long getExportFileLastModified(Context context, String fileName)
throws Exception;
/**
* The file name of the export archive contains the eperson id of the person
* who created it When requested for download this method can check if the
* person requesting it is the same one that created it
*
* @param context dspace context
* @param fileName the file name to check auths for
* @return true if it is the same person false otherwise
*/
public boolean canDownload(Context context, String fileName);
/**
* Reads the download directory for the eperson to see if any export
* archives are available
*
* @param eperson EPerson object
* @return a list of file names representing export archives that have been
* processed
* @throws Exception if error
*/
public List<String> getExportsAvailable(EPerson eperson)
throws Exception;
/**
* A clean up method that is ran before a new export archive is created. It
* uses the config file entry 'org.dspace.app.itemexport.life.span.hours' to
* determine if the current exports are too old and need pruging
*
* @param eperson - the eperson to clean up
* @throws Exception if error
*/
public void deleteOldExportArchives(EPerson eperson) throws Exception;
/**
* A clean up method that is ran before a new export archive is created. It
* uses the config file entry 'org.dspace.app.itemexport.life.span.hours' to
* determine if the current exports are too old and need purgeing
* Removes all old exports, not just those for the person doing the export.
*
* @throws Exception if error
*/
public void deleteOldExportArchives() throws Exception;
/**
* Since the archive is created in a new thread we are unable to communicate
* with calling method about success or failure. We accomplis this
* communication with email instead. Send a success email once the export
* archive is complete and ready for download
*
* @param context - the current Context
* @param eperson - eperson to send the email to
* @param fileName - the file name to be downloaded. It is added to the url in
* the email
* @throws MessagingException if error
*/
public void emailSuccessMessage(Context context, EPerson eperson,
String fileName) throws MessagingException;
/**
* Since the archive is created in a new thread we are unable to communicate
* with calling method about success or failure. We accomplis this
* communication with email instead. Send an error email if the export
* archive fails
*
* @param eperson - EPerson to send the error message to
* @param error - the error message
* @throws MessagingException if error
*/
public void emailErrorMessage(EPerson eperson, String error)
throws MessagingException;
/**
* Zip source to target
*
* @param strSource source file
* @param target target file
* @throws Exception if error
*/
public void zip(String strSource, String target) throws Exception;
}

View File

@@ -0,0 +1,106 @@
/**
* 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.itemimport;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import gr.ekt.bte.core.DataLoader;
import gr.ekt.bte.core.TransformationEngine;
import gr.ekt.bte.dataloader.FileDataLoader;
/**
* This class acts as a Service in the procedure to batch import using the Biblio-Transformation-Engine
*/
public class BTEBatchImportService {
TransformationEngine transformationEngine;
Map<String, DataLoader> dataLoaders = new HashMap<String, DataLoader>();
Map<String, String> outputMap = new HashMap<String, String>();
/**
* Default constructor
*/
public BTEBatchImportService() {
super();
}
/**
* Setter method for dataLoaders parameter
*
* @param dataLoaders map of data loaders
*/
public void setDataLoaders(Map<String, DataLoader> dataLoaders) {
this.dataLoaders = dataLoaders;
}
/**
* Get data loaders
*
* @return the map of DataLoaders
*/
public Map<String, DataLoader> getDataLoaders() {
return dataLoaders;
}
/**
* Get output map
*
* @return the outputMapping
*/
public Map<String, String> getOutputMap() {
return outputMap;
}
/**
* Setter method for the outputMapping
*
* @param outputMap the output mapping
*/
public void setOutputMap(Map<String, String> outputMap) {
this.outputMap = outputMap;
}
/**
* Get transformation engine
*
* @return transformation engine
*/
public TransformationEngine getTransformationEngine() {
return transformationEngine;
}
/**
* set transformation engine
*
* @param transformationEngine transformation engine
*/
public void setTransformationEngine(TransformationEngine transformationEngine) {
this.transformationEngine = transformationEngine;
}
/**
* Getter of file data loaders
*
* @return List of file data loaders
*/
public List<String> getFileDataLoaders() {
List<String> result = new ArrayList<String>();
for (String key : dataLoaders.keySet()) {
DataLoader dl = dataLoaders.get(key);
if (dl instanceof FileDataLoader) {
result.add(key);
}
}
return result;
}
}

View File

@@ -0,0 +1,229 @@
/**
* 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.itemimport;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.LineNumberReader;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
/**
* @author kstamatis
*/
public class BatchUpload {
private Date date;
private File dir;
private boolean successful;
private int itemsImported;
private int totalItems = 0;
private List<String> handlesImported = new ArrayList<String>();
private String errorMsg = "";
private String errorMsgHTML = "";
/**
* Initialize with directory
*
* @param dirPath directory path
*/
public BatchUpload(String dirPath) {
this.initializeWithFile(new File(dirPath));
}
/**
* Initialize with directory
*
* @param dir directory path
*/
public BatchUpload(File dir) {
this.initializeWithFile(dir);
}
/**
* Initialize with directory
*
* @param dir directory path
*/
private void initializeWithFile(File dir) {
this.dir = dir;
String dirName = dir.getName();
long timeMillis = Long.parseLong(dirName);
Calendar calendar = new GregorianCalendar();
calendar.setTimeInMillis(timeMillis);
this.date = calendar.getTime();
try {
this.itemsImported = countLines(dir + File.separator + "mapfile");
} catch (IOException e) {
e.printStackTrace();
}
for (File file : dir.listFiles()) {
if (file.isDirectory()) {
this.totalItems = file.list().length;
}
}
this.successful = this.totalItems == this.itemsImported;
//Parse possible error message
File errorFile = new File(dir + File.separator + "error.txt");
if (errorFile.exists()) {
try {
readFile(dir + File.separator + "error.txt");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
/**
* Count lines in file
*
* @param filename file name
* @return lines in file
* @throws IOException if IO error
*/
private int countLines(String filename) throws IOException {
LineNumberReader reader = new LineNumberReader(new FileReader(filename));
int cnt = 0;
String lineRead = "";
while ((lineRead = reader.readLine()) != null) {
String[] parts = lineRead.split(" ");
if (parts.length > 1) {
handlesImported.add(parts[1].trim());
} else {
handlesImported.add(lineRead);
}
}
cnt = reader.getLineNumber();
reader.close();
return cnt;
}
/**
* Read a file
*
* @param filename file name
* @throws IOException if IO error
*/
private void readFile(String filename) throws IOException {
LineNumberReader reader = new LineNumberReader(new FileReader(filename));
String lineRead = "";
while ((lineRead = reader.readLine()) != null) {
this.errorMsg += lineRead + "\n";
if (lineRead.startsWith("\tat ")) {
this.errorMsgHTML += "<span class=\"batchimport-error-tab\">" + lineRead + "</span><br/>";
} else if (lineRead.startsWith("Caused by")) {
this.errorMsgHTML += "<span class=\"batchimport-error-caused\">" + lineRead + "</span><br/>";
} else {
this.errorMsgHTML += lineRead + "<br/>";
}
}
reader.close();
}
/**
* Get date
*
* @return Date
*/
public Date getDate() {
return date;
}
/**
* Get path to directory
*
* @return directory
*/
public File getDir() {
return dir;
}
/**
* Whether successulf
*
* @return true or false
*/
public boolean isSuccessful() {
return successful;
}
/**
* Get items imported
*
* @return number of items
*/
public int getItemsImported() {
return itemsImported;
}
/**
* Get total items
*
* @return total
*/
public int getTotalItems() {
return totalItems;
}
/**
* Get formatted date (DD/MM/YY)
*
* @return date as string
*/
public String getDateFormatted() {
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy - HH:mm");
return df.format(date);
}
/**
* Get handles of imported files
*
* @return list of handles
*/
public List<String> getHandlesImported() {
return handlesImported;
}
/**
* Get error message
*
* @return error message
*/
public String getErrorMsg() {
return errorMsg;
}
/**
* Get error message as HTML
*
* @return error message string as HTML
*/
public String getErrorMsgHTML() {
return errorMsgHTML;
}
}

View File

@@ -1,52 +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.itemimport;
import java.util.HashMap;
import java.util.Map;
import gr.ekt.transformationengine.core.DataLoader;
/**
* This class acts as a Service in the procedure ot batch import using the Biblio-Transformation-Engine
*/
public class DataLoaderService
{
Map<String, DataLoader> dataLoaders = new HashMap<String, DataLoader>();
/**
* Default constructor
*/
public DataLoaderService()
{
super();
}
/**
* Setter method for dataLoaders parameter
* @param dataLoaders
*/
public void setDataLoaders(Map<String, DataLoader> dataLoaders)
{
this.dataLoaders = dataLoaders;
}
/**
*
* @return the map of DataLoaders
*/
public Map<String, DataLoader> getDataLoaders()
{
return dataLoaders;
}
}

View File

@@ -0,0 +1,431 @@
/**
* 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.itemimport;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
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.PosixParser;
import org.dspace.app.itemimport.factory.ItemImportServiceFactory;
import org.dspace.app.itemimport.service.ItemImportService;
import org.dspace.content.Collection;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
import org.dspace.core.Constants;
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;
/**
* Import items into DSpace. The conventional use is upload files by copying
* them. DSpace writes the item's bitstreams into its assetstore. Metadata is
* also loaded to the DSpace database.
* <P>
* A second use assumes the bitstream files already exist in a storage
* resource accessible to DSpace. In this case the bitstreams are 'registered'.
* That is, the metadata is loaded to the DSpace database and DSpace is given
* the location of the file which is subsumed into DSpace.
* <P>
* The distinction is controlled by the format of lines in the 'contents' file.
* See comments in processContentsFile() below.
* <P>
* Modified by David Little, UCSD Libraries 12/21/04 to
* allow the registration of files (bitstreams) into DSpace.
*/
public class ItemImportCLITool {
private static boolean template = false;
private static final CollectionService collectionService = ContentServiceFactory.getInstance()
.getCollectionService();
private static final EPersonService epersonService = EPersonServiceFactory.getInstance().getEPersonService();
private static final HandleService handleService = HandleServiceFactory.getInstance().getHandleService();
/**
* Default constructor
*/
private ItemImportCLITool() { }
public static void main(String[] argv) throws Exception {
Date startTime = new Date();
int status = 0;
try {
// create an options object and populate it
CommandLineParser parser = new PosixParser();
Options options = new Options();
options.addOption("a", "add", false, "add items to DSpace");
options.addOption("b", "add-bte", false, "add items to DSpace via Biblio-Transformation-Engine (BTE)");
options.addOption("r", "replace", false, "replace items in mapfile");
options.addOption("d", "delete", false,
"delete items listed in mapfile");
options.addOption("i", "inputtype", true, "input type in case of BTE import");
options.addOption("s", "source", true, "source of items (directory)");
options.addOption("z", "zip", true, "name of zip file");
options.addOption("c", "collection", true,
"destination collection(s) Handle or database ID");
options.addOption("m", "mapfile", true, "mapfile items in mapfile");
options.addOption("e", "eperson", true,
"email of eperson doing importing");
options.addOption("w", "workflow", false,
"send submission through collection's workflow");
options.addOption("n", "notify", false,
"if sending submissions through the workflow, send notification emails");
options.addOption("t", "test", false,
"test run - do not actually import items");
options.addOption("p", "template", false, "apply template");
options.addOption("R", "resume", false,
"resume a failed import (add only)");
options.addOption("q", "quiet", false, "don't display metadata");
options.addOption("h", "help", false, "help");
CommandLine line = parser.parse(options, argv);
String command = null; // add replace remove, etc
String bteInputType = null; //ris, endnote, tsv, csv, bibtex
String sourcedir = null;
String mapfile = null;
String eperson = null; // db ID or email
String[] collections = null; // db ID or handles
boolean isTest = false;
boolean isResume = false;
boolean useWorkflow = false;
boolean useWorkflowSendEmail = false;
boolean isQuiet = false;
if (line.hasOption('h')) {
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("ItemImport\n", options);
System.out
.println("\nadding items: ItemImport -a -e eperson -c collection -s sourcedir -m mapfile");
System.out
.println(
"\nadding items from zip file: ItemImport -a -e eperson -c collection -s sourcedir -z " +
"filename.zip -m mapfile");
System.out
.println("replacing items: ItemImport -r -e eperson -c collection -s sourcedir -m mapfile");
System.out
.println("deleting items: ItemImport -d -e eperson -m mapfile");
System.out
.println(
"If multiple collections are specified, the first collection will be the one that owns the " +
"item.");
System.exit(0);
}
if (line.hasOption('a')) {
command = "add";
}
if (line.hasOption('r')) {
command = "replace";
}
if (line.hasOption('d')) {
command = "delete";
}
if (line.hasOption('b')) {
command = "add-bte";
}
if (line.hasOption('i')) {
bteInputType = line.getOptionValue('i');
}
if (line.hasOption('w')) {
useWorkflow = true;
if (line.hasOption('n')) {
useWorkflowSendEmail = true;
}
}
if (line.hasOption('t')) {
isTest = true;
System.out.println("**Test Run** - not actually importing items.");
}
if (line.hasOption('p')) {
template = true;
}
if (line.hasOption('s')) { // source
sourcedir = line.getOptionValue('s');
}
if (line.hasOption('m')) { // mapfile
mapfile = line.getOptionValue('m');
}
if (line.hasOption('e')) { // eperson
eperson = line.getOptionValue('e');
}
if (line.hasOption('c')) { // collections
collections = line.getOptionValues('c');
}
if (line.hasOption('R')) {
isResume = true;
System.out
.println("**Resume import** - attempting to import items not already imported");
}
if (line.hasOption('q')) {
isQuiet = true;
}
boolean zip = false;
String zipfilename = "";
if (line.hasOption('z')) {
zip = true;
zipfilename = line.getOptionValue('z');
}
//By default assume collections will be given on the command line
boolean commandLineCollections = true;
// now validate
// must have a command set
if (command == null) {
System.out
.println("Error - must run with either add, replace, or remove (run with -h flag for details)");
System.exit(1);
} else if ("add".equals(command) || "replace".equals(command)) {
if (sourcedir == null) {
System.out
.println("Error - a source directory containing items must be set");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
if (mapfile == null) {
System.out
.println("Error - a map file to hold importing results must be specified");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
if (eperson == null) {
System.out
.println("Error - an eperson to do the importing must be specified");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
if (collections == null) {
System.out.println("No collections given. Assuming 'collections' file inside item directory");
commandLineCollections = false;
}
} else if ("add-bte".equals(command)) {
//Source dir can be null, the user can specify the parameters for his loader in the Spring XML
// configuration file
if (mapfile == null) {
System.out
.println("Error - a map file to hold importing results must be specified");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
if (eperson == null) {
System.out
.println("Error - an eperson to do the importing must be specified");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
if (collections == null) {
System.out.println("No collections given. Assuming 'collections' file inside item directory");
commandLineCollections = false;
}
if (bteInputType == null) {
System.out
.println(
"Error - an input type (tsv, csv, ris, endnote, bibtex or any other type you have " +
"specified in BTE Spring XML configuration file) must be specified");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
} else if ("delete".equals(command)) {
if (eperson == null) {
System.out
.println("Error - an eperson to do the importing must be specified");
System.exit(1);
}
if (mapfile == null) {
System.out.println("Error - a map file must be specified");
System.exit(1);
}
}
// can only resume for adds
if (isResume && !"add".equals(command) && !"add-bte".equals(command)) {
System.out
.println("Error - resume option only works with the --add or the --add-bte commands");
System.exit(1);
}
// do checks around mapfile - if mapfile exists and 'add' is selected,
// resume must be chosen
File myFile = new File(mapfile);
if (!isResume && "add".equals(command) && myFile.exists()) {
System.out.println("Error - the mapfile " + mapfile
+ " already exists.");
System.out
.println("Either delete it or use --resume if attempting to resume an aborted import.");
System.exit(1);
}
ItemImportService myloader = ItemImportServiceFactory.getInstance().getItemImportService();
myloader.setTest(isTest);
myloader.setResume(isResume);
myloader.setUseWorkflow(useWorkflow);
myloader.setUseWorkflowSendEmail(useWorkflowSendEmail);
myloader.setQuiet(isQuiet);
// create a context
Context c = new Context(Context.Mode.BATCH_EDIT);
// find the EPerson, assign to context
EPerson myEPerson = null;
if (eperson.indexOf('@') != -1) {
// @ sign, must be an email
myEPerson = epersonService.findByEmail(c, eperson);
} else {
myEPerson = epersonService.find(c, UUID.fromString(eperson));
}
if (myEPerson == null) {
System.out.println("Error, eperson cannot be found: " + eperson);
System.exit(1);
}
c.setCurrentUser(myEPerson);
// find collections
List<Collection> mycollections = null;
// don't need to validate collections set if command is "delete"
// also if no collections are given in the command line
if (!"delete".equals(command) && commandLineCollections) {
System.out.println("Destination collections:");
mycollections = new ArrayList<>();
// validate each collection arg to see if it's a real collection
for (int i = 0; i < collections.length; i++) {
// is the ID a handle?
if (collections[i].indexOf('/') != -1) {
// string has a / so it must be a handle - try and resolve
// it
mycollections.add((Collection) handleService
.resolveToObject(c, collections[i]));
// resolved, now make sure it's a collection
if ((mycollections.get(i) == null)
|| (mycollections.get(i).getType() != Constants.COLLECTION)) {
mycollections.set(i, null);
}
} else if (collections[i] != null) {
// not a handle, try and treat it as an integer collection database ID
mycollections.set(i, collectionService.find(c, UUID.fromString(collections[i])));
}
// was the collection valid?
if (mycollections.get(i) == null) {
throw new IllegalArgumentException("Cannot resolve "
+ collections[i] + " to collection");
}
// print progress info
String owningPrefix = "";
if (i == 0) {
owningPrefix = "Owning ";
}
System.out.println(owningPrefix + " Collection: "
+ mycollections.get(i).getName());
}
} // end of validating collections
try {
// If this is a zip archive, unzip it first
if (zip) {
sourcedir = myloader.unzip(sourcedir, zipfilename);
}
c.turnOffAuthorisationSystem();
if ("add".equals(command)) {
myloader.addItems(c, mycollections, sourcedir, mapfile, template);
} else if ("replace".equals(command)) {
myloader.replaceItems(c, mycollections, sourcedir, mapfile, template);
} else if ("delete".equals(command)) {
myloader.deleteItems(c, mapfile);
} else if ("add-bte".equals(command)) {
myloader.addBTEItems(c, mycollections, sourcedir, mapfile, template, bteInputType, null);
}
// complete all transactions
c.complete();
} catch (Exception e) {
c.abort();
e.printStackTrace();
System.out.println(e);
status = 1;
}
// Delete the unzipped file
try {
if (zip) {
System.gc();
System.out.println(
"Deleting temporary zip directory: " + myloader.getTempWorkDirFile().getAbsolutePath());
myloader.cleanupZipTemp();
}
} catch (Exception ex) {
System.out.println("Unable to delete temporary zip archive location: " + myloader.getTempWorkDirFile()
.getAbsolutePath());
}
if (isTest) {
System.out.println("***End of Test Run***");
}
} finally {
Date endTime = new Date();
System.out.println("Started: " + startTime.getTime());
System.out.println("Ended: " + endTime.getTime());
System.out.println(
"Elapsed time: " + ((endTime.getTime() - startTime.getTime()) / 1000) + " secs (" + (endTime
.getTime() - startTime.getTime()) + " msecs)");
}
System.exit(status);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
/**
* 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.itemimport.factory;
import org.dspace.app.itemimport.service.ItemImportService;
import org.dspace.services.factory.DSpaceServicesFactory;
/**
* Abstract factory to get services for the itemimport package, use ItemImportService.getInstance() to retrieve an
* implementation
*
* @author kevinvandevelde at atmire.com
*/
public abstract class ItemImportServiceFactory {
public abstract ItemImportService getItemImportService();
public static ItemImportServiceFactory getInstance() {
return DSpaceServicesFactory.getInstance().getServiceManager()
.getServiceByName("itemImportServiceFactory", ItemImportServiceFactory.class);
}
}

View File

@@ -0,0 +1,28 @@
/**
* 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.itemimport.factory;
import org.dspace.app.itemimport.service.ItemImportService;
import org.springframework.beans.factory.annotation.Autowired;
/**
* Factory implementation to get services for the itemimport package, use ItemImportService.getInstance() to retrieve
* an implementation
*
* @author kevinvandevelde at atmire.com
*/
public class ItemImportServiceFactoryImpl extends ItemImportServiceFactory {
@Autowired(required = true)
private ItemImportService itemImportService;
@Override
public ItemImportService getItemImportService() {
return itemImportService;
}
}

View File

@@ -0,0 +1,253 @@
/**
* 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.itemimport.service;
import java.io.File;
import java.io.IOException;
import java.util.List;
import javax.mail.MessagingException;
import org.dspace.app.itemimport.BatchUpload;
import org.dspace.content.Collection;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
/**
* Import items into DSpace. The conventional use is upload files by copying
* them. DSpace writes the item's bitstreams into its assetstore. Metadata is
* also loaded to the DSpace database.
* <P>
* A second use assumes the bitstream files already exist in a storage
* resource accessible to DSpace. In this case the bitstreams are 'registered'.
* That is, the metadata is loaded to the DSpace database and DSpace is given
* the location of the file which is subsumed into DSpace.
* <P>
* The distinction is controlled by the format of lines in the 'contents' file.
* See comments in processContentsFile() below.
* <P>
* Modified by David Little, UCSD Libraries 12/21/04 to
* allow the registration of files (bitstreams) into DSpace.
*/
public interface ItemImportService {
/**
* @param c DSpace Context
* @param mycollections List of Collections
* @param sourceDir source location
* @param mapFile map file
* @param template whether to use template item
* @throws Exception if error
*/
public void addItemsAtomic(Context c, List<Collection> mycollections, String sourceDir, String mapFile,
boolean template) throws Exception;
/**
* Add items
*
* @param c DSpace Context
* @param mycollections List of Collections
* @param sourceDir source location
* @param mapFile map file
* @param template whether to use template item
* @throws Exception if error
*/
public void addItems(Context c, List<Collection> mycollections,
String sourceDir, String mapFile, boolean template) throws Exception;
/**
* Unzip a file
*
* @param zipfile file
* @return unzip location
* @throws IOException if error
*/
public String unzip(File zipfile) throws IOException;
/**
* Unzip a file to a destination
*
* @param zipfile file
* @param destDir destination directory
* @return unzip location
* @throws IOException if error
*/
public String unzip(File zipfile, String destDir) throws IOException;
/**
* Unzip a file in a specific source directory
*
* @param sourcedir source directory
* @param zipfilename file name
* @return unzip location
* @throws IOException if error
*/
public String unzip(String sourcedir, String zipfilename) throws IOException;
/**
* Given a public URL to a zip file that has the Simple Archive Format, this method imports the contents to DSpace
*
* @param url The public URL of the zip file
* @param owningCollection The owning collection the items will belong to
* @param collections The collections the created items will be inserted to, apart from the owning one
* @param resumeDir In case of a resume request, the directory that containsthe old mapfile and data
* @param inputType The input type of the data (bibtex, csv, etc.), in case of local file
* @param context The context
* @param template whether to use template item
* @throws Exception if error
*/
public void processUIImport(String url, Collection owningCollection, String[] collections, String resumeDir,
String inputType, Context context, boolean template) throws Exception;
/**
* Since the BTE batch import is done in a new thread we are unable to communicate
* with calling method about success or failure. We accomplish this
* communication with email instead. Send a success email once the batch
* import is complete
*
* @param context - the current Context
* @param eperson - eperson to send the email to
* @param fileName - the filepath to the mapfile created by the batch import
* @throws MessagingException if error
*/
public void emailSuccessMessage(Context context, EPerson eperson,
String fileName) throws MessagingException;
/**
* Since the BTE batch import is done in a new thread we are unable to communicate
* with calling method about success or failure. We accomplis this
* communication with email instead. Send an error email if the batch
* import fails
*
* @param eperson - EPerson to send the error message to
* @param error - the error message
* @throws MessagingException if error
*/
public void emailErrorMessage(EPerson eperson, String error)
throws MessagingException;
/**
* Get imports available for a person
*
* @param eperson EPerson object
* @return List of batch uploads
* @throws Exception if error
*/
public List<BatchUpload> getImportsAvailable(EPerson eperson)
throws Exception;
/**
* Get import upload directory
*
* @param ePerson EPerson object
* @return directory
* @throws Exception if error
*/
public String getImportUploadableDirectory(EPerson ePerson)
throws Exception;
/**
* Delete a batch by ID
*
* @param c DSpace Context
* @param uploadId identifier
* @throws Exception if error
*/
public void deleteBatchUpload(Context c, String uploadId) throws Exception;
/**
* Replace items
*
* @param c DSpace Context
* @param mycollections List of Collections
* @param sourcedir source directory
* @param mapfile map file
* @param template whether to use template item
* @throws Exception if error
*/
public void replaceItems(Context c, List<Collection> mycollections, String sourcedir, String mapfile,
boolean template) throws Exception;
/**
* Delete items via mapfile
*
* @param c DSpace Context
* @param mapfile map file
* @throws Exception if error
*/
public void deleteItems(Context c, String mapfile) throws Exception;
/**
* Add items
*
* @param c DSpace Context
* @param mycollections List of Collections
* @param sourcedir source directory
* @param mapfile map file
* @param template whether to use template item
* @param bteInputType The input type of the data (bibtex, csv, etc.), in case of local file
* @param workingDir working directory
* @throws Exception if error
*/
public void addBTEItems(Context c, List<Collection> mycollections, String sourcedir, String mapfile,
boolean template, String bteInputType, String workingDir) throws Exception;
/**
* Get temporary work directory
*
* @return directory as string
*/
public String getTempWorkDir();
/**
* Get temporary work directory (as File)
*
* @return directory as File
* @throws java.io.IOException if the directory cannot be created.
*/
public File getTempWorkDirFile() throws IOException;
/**
* Cleanup
*/
public void cleanupZipTemp();
/**
* Set test flag
*
* @param isTest true or false
*/
public void setTest(boolean isTest);
/**
* Set resume flag
*
* @param isResume true or false
*/
public void setResume(boolean isResume);
/**
* Set use workflow
*
* @param useWorkflow whether to enable workflow
*/
public void setUseWorkflow(boolean useWorkflow);
/**
* @param useWorkflowSendMail whether to send mail
*/
public void setUseWorkflowSendEmail(boolean useWorkflowSendMail);
/**
* Set quiet flag
*
* @param isQuiet true or false
*/
public void setQuiet(boolean isQuiet);
}

View File

@@ -0,0 +1,93 @@
/**
* 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.itemmarking;
import java.io.UnsupportedEncodingException;
import java.sql.SQLException;
import java.util.List;
import org.dspace.app.util.Util;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
import org.dspace.content.Item;
import org.dspace.content.service.ItemService;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.springframework.beans.factory.annotation.Autowired;
/**
* This is an item marking Strategy class that tries to mark an item availability
* based on the existence of bitstreams within the ORIGINAL bundle.
*
* @author Kostas Stamatis
*/
public class ItemMarkingAvailabilityBitstreamStrategy implements ItemMarkingExtractor {
private String availableImageName;
private String nonAvailableImageName;
@Autowired(required = true)
protected ItemService itemService;
public ItemMarkingAvailabilityBitstreamStrategy() {
}
@Override
public ItemMarkingInfo getItemMarkingInfo(Context context, Item item)
throws SQLException {
List<Bundle> bundles = itemService.getBundles(item, "ORIGINAL");
if (bundles.size() == 0) {
ItemMarkingInfo markInfo = new ItemMarkingInfo();
markInfo.setImageName(nonAvailableImageName);
return markInfo;
} else {
Bundle originalBundle = bundles.iterator().next();
if (originalBundle.getBitstreams().size() == 0) {
ItemMarkingInfo markInfo = new ItemMarkingInfo();
markInfo.setImageName(nonAvailableImageName);
return markInfo;
} else {
Bitstream bitstream = originalBundle.getBitstreams().get(0);
ItemMarkingInfo signInfo = new ItemMarkingInfo();
signInfo.setImageName(availableImageName);
signInfo.setTooltip(bitstream.getName());
String bsLink = "";
bsLink = bsLink + "bitstream/"
+ item.getHandle() + "/"
+ bitstream.getSequenceID() + "/";
try {
bsLink = bsLink + Util.encodeBitstreamName(bitstream.getName(), Constants.DEFAULT_ENCODING);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
signInfo.setLink(bsLink);
return signInfo;
}
}
}
public void setAvailableImageName(String availableImageName) {
this.availableImageName = availableImageName;
}
public void setNonAvailableImageName(String nonAvailableImageName) {
this.nonAvailableImageName = nonAvailableImageName;
}
}

View File

@@ -0,0 +1,49 @@
/**
* 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.itemmarking;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.dspace.content.Collection;
import org.dspace.content.Item;
import org.dspace.core.Context;
/**
* This is an item marking Strategy class that tries to mark an item
* based on the collection the items belong to
*
* @author Kostas Stamatis
*/
public class ItemMarkingCollectionStrategy implements ItemMarkingExtractor {
Map<String, ItemMarkingInfo> mapping = new HashMap<String, ItemMarkingInfo>();
public ItemMarkingCollectionStrategy() {
}
@Override
public ItemMarkingInfo getItemMarkingInfo(Context context, Item item)
throws SQLException {
if (mapping != null) {
for (Collection collection : item.getCollections()) {
if (mapping.containsKey(collection.getHandle())) {
return mapping.get(collection.getHandle());
}
}
}
return null;
}
public void setMapping(Map<String, ItemMarkingInfo> mapping) {
this.mapping = mapping;
}
}

View File

@@ -0,0 +1,23 @@
/**
* 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.itemmarking;
import java.sql.SQLException;
import org.dspace.content.Item;
import org.dspace.core.Context;
/**
* Interface to abstract the strategy for item signing
*
* @author Kostas Stamatis
*/
public interface ItemMarkingExtractor {
public ItemMarkingInfo getItemMarkingInfo(Context context, Item item)
throws SQLException;
}

View File

@@ -0,0 +1,56 @@
/**
* 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.itemmarking;
/**
* Simple DTO to transfer data about the marking info for an item
*
* @author Kostas Stamatis
*/
public class ItemMarkingInfo {
private String imageName;
private String classInfo;
private String tooltip;
private String link;
public ItemMarkingInfo() {
super();
}
public String getImageName() {
return imageName;
}
public void setImageName(String imageName) {
this.imageName = imageName;
}
public String getTooltip() {
return tooltip;
}
public void setTooltip(String tooltip) {
this.tooltip = tooltip;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public String getClassInfo() {
return classInfo;
}
public void setClassInfo(String classInfo) {
this.classInfo = classInfo;
}
}

View File

@@ -0,0 +1,64 @@
/**
* 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.itemmarking;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.dspace.content.Item;
import org.dspace.content.MetadataValue;
import org.dspace.content.service.ItemService;
import org.dspace.core.Context;
import org.springframework.beans.factory.annotation.Autowired;
/**
* This is an item marking Strategy class that tries to mark an item
* based on the existence of a specific value within the values of a specific
* metadata field
*
* @author Kostas Stamatis
*/
public class ItemMarkingMetadataStrategy implements ItemMarkingExtractor {
@Autowired(required = true)
protected ItemService itemService;
private String metadataField;
Map<String, ItemMarkingInfo> mapping = new HashMap<String, ItemMarkingInfo>();
public ItemMarkingMetadataStrategy() {
}
@Override
public ItemMarkingInfo getItemMarkingInfo(Context context, Item item)
throws SQLException {
if (metadataField != null && mapping != null) {
List<MetadataValue> vals = itemService.getMetadataByMetadataString(item, metadataField);
if (vals.size() > 0) {
for (MetadataValue value : vals) {
String type = value.getValue();
if (mapping.containsKey(type)) {
return mapping.get(type);
}
}
}
}
return null;
}
public void setMetadataField(String metadataField) {
this.metadataField = metadataField;
}
public void setMapping(Map<String, ItemMarkingInfo> mapping) {
this.mapping = mapping;
}
}

View File

@@ -16,21 +16,25 @@ import java.util.Map;
* Order of actions is very import for correct processing. This implementation
* supports an iterator that returns the actions in the order in which they are
* put in. Adding the same action a second time has no effect on this order.
*
*
*/
public class ActionManager implements Iterable<UpdateAction> {
private Map<Class<? extends UpdateAction>, UpdateAction> registry
protected Map<Class<? extends UpdateAction>, UpdateAction> registry
= new LinkedHashMap<Class<? extends UpdateAction>, UpdateAction>();
/**
* Get update action
*
* @param actionClass UpdateAction class
* @return instantiation of UpdateAction class
* @throws InstantiationException if instantiation error
* @throws IllegalAccessException if illegal access error
*/
public UpdateAction getUpdateAction(Class<? extends UpdateAction> actionClass)
throws InstantiationException, IllegalAccessException
{
throws InstantiationException, IllegalAccessException {
UpdateAction action = registry.get(actionClass);
if (action == null)
{
if (action == null) {
action = actionClass.newInstance();
registry.put(actionClass, action);
}
@@ -39,11 +43,9 @@ public class ActionManager implements Iterable<UpdateAction> {
}
/**
*
* @return whether any actions have been registered with this manager
*/
public boolean hasActions()
{
public boolean hasActions() {
return !registry.isEmpty();
}
@@ -53,25 +55,24 @@ public class ActionManager implements Iterable<UpdateAction> {
*
* @return iterator for UpdateActions
*/
public Iterator<UpdateAction> iterator()
{
return new Iterator<UpdateAction>()
{
@Override
public Iterator<UpdateAction> iterator() {
return new Iterator<UpdateAction>() {
private Iterator<Class<? extends UpdateAction>> itr = registry.keySet().iterator();
public boolean hasNext()
{
@Override
public boolean hasNext() {
return itr.hasNext();
}
public UpdateAction next()
{
@Override
public UpdateAction next() {
return registry.get(itr.next());
}
//not supported
public void remove()
{
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};

View File

@@ -17,54 +17,59 @@ import java.util.ArrayList;
import java.util.List;
import org.dspace.authorize.AuthorizeException;
import org.dspace.authorize.AuthorizeManager;
import org.dspace.authorize.ResourcePolicy;
import org.dspace.authorize.factory.AuthorizeServiceFactory;
import org.dspace.authorize.service.AuthorizeService;
import org.dspace.content.Bitstream;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.Bundle;
import org.dspace.content.DCDate;
import org.dspace.content.FormatIdentifier;
import org.dspace.content.InstallItem;
import org.dspace.content.Item;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.BitstreamFormatService;
import org.dspace.content.service.InstallItemService;
import org.dspace.core.Context;
import org.dspace.eperson.Group;
import org.dspace.eperson.factory.EPersonServiceFactory;
import org.dspace.eperson.service.GroupService;
/**
* Action to add bitstreams listed in item contents file to the item in DSpace
*
*
*/
public class AddBitstreamsAction extends UpdateBitstreamsAction {
public AddBitstreamsAction()
{
protected AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
protected BitstreamFormatService bitstreamFormatService = ContentServiceFactory.getInstance()
.getBitstreamFormatService();
protected GroupService groupService = EPersonServiceFactory.getInstance().getGroupService();
protected InstallItemService installItemService = ContentServiceFactory.getInstance().getInstallItemService();
public AddBitstreamsAction() {
//empty
}
/**
* Adds bitstreams from the archive as listed in the contents file.
*
* @param context
* @param itarch
* @param isTest
* @param suppressUndo
* @throws IllegalArgumentException
* @throws ParseException
* @throws IOException
* @throws AuthorizeException
* @throws SQLException
* @param context DSpace Context
* @param itarch Item Archive
* @param isTest test flag
* @param suppressUndo undo flag
* @throws IOException if IO error
* @throws IllegalArgumentException if arg exception
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
* @throws ParseException if parse error
*/
@Override
public void execute(Context context, ItemArchive itarch, boolean isTest,
boolean suppressUndo) throws IllegalArgumentException,
ParseException, IOException, AuthorizeException, SQLException
{
ParseException, IOException, AuthorizeException, SQLException {
Item item = itarch.getItem();
File dir = itarch.getDirectory();
List<ContentsEntry> contents = MetadataUtilities.readContentsFile(new File(dir, ItemUpdate.CONTENTS_FILE));
if (contents.isEmpty())
{
if (contents.isEmpty()) {
ItemUpdate.pr("Contents is empty - no bitstreams to add");
return;
}
@@ -73,32 +78,59 @@ public class AddBitstreamsAction extends UpdateBitstreamsAction {
String[] files = dir.list(ItemUpdate.fileFilter);
List<String> fileList = new ArrayList<String>();
for (String filename : files)
{
for (String filename : files) {
fileList.add(filename);
ItemUpdate.pr("file: " + filename);
}
for (ContentsEntry ce : contents)
{
for (ContentsEntry ce : contents) {
//validate match to existing file in archive
if (!fileList.contains(ce.filename))
{
if (!fileList.contains(ce.filename)) {
throw new IllegalArgumentException("File listed in contents is missing: " + ce.filename);
}
}
int bitstream_bundles_updated = 0;
//now okay to add
for (ContentsEntry ce : contents)
{
addBitstream(context, itarch, item, dir, ce, suppressUndo, isTest);
for (ContentsEntry ce : contents) {
String targetBundleName = addBitstream(context, itarch, item, dir, ce, suppressUndo, isTest);
if (!targetBundleName.equals("")
&& !targetBundleName.equals("THUMBNAIL")
&& !targetBundleName.equals("TEXT")) {
bitstream_bundles_updated++;
}
}
private void addBitstream(Context context, ItemArchive itarch, Item item, File dir,
if (alterProvenance && bitstream_bundles_updated > 0) {
DtoMetadata dtom = DtoMetadata.create("dc.description.provenance", "en", "");
String append = ". Added " + Integer.toString(bitstream_bundles_updated)
+ " bitstream(s) on " + DCDate.getCurrent() + " : "
+ installItemService.getBitstreamProvenanceMessage(context, item);
MetadataUtilities.appendMetadata(context, item, dtom, false, append);
}
}
/**
* Add bitstream
*
* @param context DSpace Context
* @param itarch Item Archive
* @param item DSpace Item
* @param dir directory
* @param ce contents entry for bitstream
* @param suppressUndo undo flag
* @param isTest test flag
* @return bundle name
* @throws IOException if IO error
* @throws IllegalArgumentException if arg exception
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
* @throws ParseException if parse error
*/
protected String addBitstream(Context context, ItemArchive itarch, Item item, File dir,
ContentsEntry ce, boolean suppressUndo, boolean isTest)
throws IOException, IllegalArgumentException, SQLException, AuthorizeException, ParseException
{
throws IOException, IllegalArgumentException, SQLException, AuthorizeException, ParseException {
ItemUpdate.pr("contents entry for bitstream: " + ce.toString());
File f = new File(dir, ce.filename);
@@ -108,40 +140,29 @@ public class AddBitstreamsAction extends UpdateBitstreamsAction {
Bitstream bs = null;
String newBundleName = ce.bundlename;
if (ce.bundlename == null) // should be required but default convention established
{
if (ce.filename.equals("license.txt"))
{
if (ce.bundlename == null) { // should be required but default convention established
if (ce.filename.equals("license.txt")) {
newBundleName = "LICENSE";
}
else
{
} else {
newBundleName = "ORIGINAL";
}
}
ItemUpdate.pr(" Bitstream " + ce.filename + " to be added to bundle: " + newBundleName);
if (!isTest)
{
if (!isTest) {
// find the bundle
Bundle[] bundles = item.getBundles(newBundleName);
List<Bundle> bundles = itemService.getBundles(item, newBundleName);
Bundle targetBundle = null;
if (bundles.length < 1)
{
if (bundles.size() < 1) {
// not found, create a new one
targetBundle = item.createBundle(newBundleName);
}
else
{
targetBundle = bundleService.create(context, item, newBundleName);
} else {
//verify bundle + name are not duplicates
for (Bundle b : bundles)
{
Bitstream[] bitstreams = b.getBitstreams();
for (Bitstream bsm : bitstreams)
{
if (bsm.getName().equals(ce.filename))
{
for (Bundle b : bundles) {
List<Bitstream> bitstreams = b.getBitstreams();
for (Bitstream bsm : bitstreams) {
if (bsm.getName().equals(ce.filename)) {
throw new IllegalArgumentException("Duplicate bundle + filename cannot be added: "
+ b.getName() + " + " + bsm.getName());
}
@@ -149,55 +170,39 @@ public class AddBitstreamsAction extends UpdateBitstreamsAction {
}
// select first bundle
targetBundle = bundles[0];
targetBundle = bundles.iterator().next();
}
bs = targetBundle.createBitstream(bis);
bs.setName(ce.filename);
bs = bitstreamService.create(context, targetBundle, bis);
bs.setName(context, ce.filename);
// Identify the format
// FIXME - guessing format guesses license.txt incorrectly as a text file format!
BitstreamFormat fmt = FormatIdentifier.guessFormat(context, bs);
bs.setFormat(fmt);
BitstreamFormat fmt = bitstreamFormatService.guessFormat(context, bs);
bitstreamService.setFormat(context, bs, fmt);
if (ce.description != null)
{
bs.setDescription(ce.description);
if (ce.description != null) {
bs.setDescription(context, ce.description);
}
if ((ce.permissionsActionId != -1) && (ce.permissionsGroupName != null))
{
Group group = Group.findByName(context, ce.permissionsGroupName);
if ((ce.permissionsActionId != -1) && (ce.permissionsGroupName != null)) {
Group group = groupService.findByName(context, ce.permissionsGroupName);
if (group != null)
{
AuthorizeManager.removeAllPolicies(context, bs); // remove the default policy
ResourcePolicy rp = ResourcePolicy.create(context);
rp.setResource(bs);
rp.setAction(ce.permissionsActionId);
rp.setGroup(group);
rp.update();
if (group != null) {
authorizeService.removeAllPolicies(context, bs); // remove the default policy
authorizeService.createResourcePolicy(context, bs, group, null, ce.permissionsActionId, null);
}
}
if (alterProvenance && !targetBundle.getName().equals("THUMBNAIL")
&& !targetBundle.getName().equals("TEXT"))
{
DtoMetadata dtom = DtoMetadata.create("dc.description.provenance", "en", "");
//update after all changes are applied
bitstreamService.update(context, bs);
String append = "Bitstream added on " + DCDate.getCurrent() + " : "
+ InstallItem.getBitstreamProvenanceMessage(item);
MetadataUtilities.appendMetadata(item, dtom, false, append);
}
//update after all changes are applied, even metadata ones
bs.update();
if (!suppressUndo)
{
if (!suppressUndo) {
itarch.addUndoDeleteContents(bs.getID());
}
return targetBundle.getName();
}
return "";
}
}

View File

@@ -8,104 +8,101 @@
package org.dspace.app.itemupdate;
import java.sql.SQLException;
import java.util.List;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DCValue;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataValue;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.MetadataFieldService;
import org.dspace.content.service.MetadataSchemaService;
import org.dspace.core.Context;
/**
* Action to add metadata to item
*
*/
public class AddMetadataAction extends UpdateMetadataAction {
protected MetadataSchemaService metadataSchemaService = ContentServiceFactory.getInstance()
.getMetadataSchemaService();
protected MetadataFieldService metadataFieldService = ContentServiceFactory.getInstance().getMetadataFieldService();
/**
* Adds metadata specified in the source archive
*
* @param context
* @param itarch
* @param isTest
* @param suppressUndo
* @throws AuthorizeException
* @throws SQLException
* @param context DSpace Context
* @param itarch item archive
* @param isTest test flag
* @param suppressUndo undo flag
* @throws AuthorizeException if authorization error
* @throws SQLException if database error
*/
@Override
public void execute(Context context, ItemArchive itarch, boolean isTest,
boolean suppressUndo) throws AuthorizeException, SQLException
{
boolean suppressUndo) throws AuthorizeException, SQLException {
Item item = itarch.getItem();
String dirname = itarch.getDirectoryName();
for (DtoMetadata dtom : itarch.getMetadataFields())
{
for (String f : targetFields)
{
if (dtom.matches(f, false))
{
for (DtoMetadata dtom : itarch.getMetadataFields()) {
for (String f : targetFields) {
if (dtom.matches(f, false)) {
// match against metadata for this field/value in repository
// qualifier must be strictly matched, possibly null
DCValue[] ardcv = null;
ardcv = item.getMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
List<MetadataValue> ardcv = null;
ardcv = itemService.getMetadata(item, dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
boolean found = false;
for (DCValue dcv : ardcv)
{
if (dcv.value.equals(dtom.value))
{
for (MetadataValue dcv : ardcv) {
if (dcv.getValue().equals(dtom.value)) {
found = true;
break;
}
}
if (found)
{
if (found) {
ItemUpdate.pr("Warning: No new metadata found to add to item " + dirname
+ " for element " + f);
}
else
{
if (isTest)
{
} else {
if (isTest) {
ItemUpdate.pr("Metadata to add: " + dtom.toString());
//validity tests that would occur in actual processing
// If we're just test the import, let's check that the actual metadata field exists.
MetadataSchema foundSchema = MetadataSchema.find(context, dtom.schema);
MetadataSchema foundSchema = metadataSchemaService.find(context, dtom.schema);
if (foundSchema == null)
{
if (foundSchema == null) {
ItemUpdate.pr("ERROR: schema '"
+ dtom.schema + "' was not found in the registry; found on item " + dirname);
}
else
{
int schemaID = foundSchema.getSchemaID();
MetadataField foundField = MetadataField.findByElement(context, schemaID, dtom.element, dtom.qualifier);
+ dtom.schema + "' was not found in the registry; found on item " +
dirname);
} else {
MetadataField foundField = metadataFieldService
.findByElement(context, foundSchema, dtom.element, dtom.qualifier);
if (foundField == null)
{
if (foundField == null) {
ItemUpdate.pr("ERROR: Metadata field: '" + dtom.schema + "." + dtom.element + "."
+ dtom.qualifier + "' not found in registry; found on item " + dirname);
+ dtom.qualifier + "' not found in registry; found on item " +
dirname);
}
}
}
else
{
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, dtom.value);
} else {
itemService
.addMetadata(context, item, dtom.schema, dtom.element, dtom.qualifier, dtom.language,
dtom.value);
ItemUpdate.pr("Metadata added: " + dtom.toString());
if (!suppressUndo)
{
if (!suppressUndo) {
//itarch.addUndoDtom(dtom);
//ItemUpdate.pr("Undo metadata: " + dtom);
// add all as a replace record to be preceded by delete
for (DCValue dcval : ardcv)
{
itarch.addUndoMetadataField(DtoMetadata.create(dcval.schema, dcval.element,
dcval.qualifier, dcval.language, dcval.value));
for (MetadataValue dcval : ardcv) {
MetadataField metadataField = dcval.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
itarch.addUndoMetadataField(
DtoMetadata.create(metadataSchema.getName(), metadataField.getElement(),
metadataField.getQualifier(), dcval.getLanguage(),
dcval.getValue()));
}
}

View File

@@ -7,17 +7,17 @@
*/
package org.dspace.app.itemupdate;
import java.io.IOException;
import java.util.Properties;
import java.io.InputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import org.dspace.content.Bitstream;
/**
* Filter interface to be used by ItemUpdate
* to determine which bitstreams in an Item
* acceptable for removal.
*
*/
public abstract class BitstreamFilter {
@@ -26,33 +26,27 @@ public abstract class BitstreamFilter {
/**
* The filter method
*
* @param bitstream
* @param bitstream Bitstream
* @return whether the bitstream matches the criteria
* @throws BitstreamFilterException
* @throws BitstreamFilterException if filter error
*/
public abstract boolean accept(Bitstream bitstream) throws BitstreamFilterException;
/**
*
* @param filepath - The complete path for the properties file
* @throws IOException
* @throws IOException if IO error
*/
public void initProperties(String filepath)
throws IOException
{
throws IOException {
props = new Properties();
InputStream in = null;
try
{
try {
in = new FileInputStream(filepath);
props.load(in);
}
finally
{
if (in != null)
{
} finally {
if (in != null) {
in.close();
}
}

View File

@@ -8,56 +8,47 @@
package org.dspace.app.itemupdate;
import java.sql.SQLException;
import java.util.List;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
/**
* BitstreamFilter implementation to filter by bundle name
*
*/
public class BitstreamFilterByBundleName extends BitstreamFilter {
protected String bundleName;
public BitstreamFilterByBundleName()
{
public BitstreamFilterByBundleName() {
//empty
}
/**
* Filter bitstream based on bundle name found in properties file
*
* @param bitstream
* @throws BitstreamFilterException
* @param bitstream Bitstream
* @return whether bitstream is in bundle
*
* @throws BitstreamFilterException if filter error
*/
@Override
public boolean accept(Bitstream bitstream)
throws BitstreamFilterException
{
if (bundleName == null)
{
throws BitstreamFilterException {
if (bundleName == null) {
bundleName = props.getProperty("bundle");
if (bundleName == null)
{
if (bundleName == null) {
throw new BitstreamFilterException("Property 'bundle' not found.");
}
}
try
{
Bundle[] bundles = bitstream.getBundles();
for (Bundle b : bundles)
{
if (b.getName().equals(bundleName))
{
try {
List<Bundle> bundles = bitstream.getBundles();
for (Bundle b : bundles) {
if (b.getName().equals(bundleName)) {
return true;
}
}
}
catch(SQLException e)
{
} catch (SQLException e) {
throw new BitstreamFilterException(e);
}
return false;

View File

@@ -7,21 +7,20 @@
*/
package org.dspace.app.itemupdate;
import java.util.regex.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.dspace.content.Bitstream;
/**
* BitstreamFilter implementation to filter by filename pattern
*
*/
public class BitstreamFilterByFilename extends BitstreamFilter {
private Pattern pattern;
private String filenameRegex;
protected Pattern pattern;
protected String filenameRegex;
public BitstreamFilterByFilename()
{
public BitstreamFilterByFilename() {
//empty
}
@@ -29,15 +28,15 @@ public class BitstreamFilterByFilename extends BitstreamFilter {
* Tests bitstream by matching the regular expression in the
* properties against the bitstream name
*
* @param bitstream Bitstream
* @return whether bitstream name matches the regular expression
* @throws BitstreamFilterException if filter error
*/
public boolean accept(Bitstream bitstream) throws BitstreamFilterException
{
if (filenameRegex == null)
{
@Override
public boolean accept(Bitstream bitstream) throws BitstreamFilterException {
if (filenameRegex == null) {
filenameRegex = props.getProperty("filename");
if (filenameRegex == null)
{
if (filenameRegex == null) {
throw new BitstreamFilterException("BitstreamFilter property 'filename' not found.");
}
pattern = Pattern.compile(filenameRegex);

View File

@@ -9,20 +9,25 @@ package org.dspace.app.itemupdate;
/**
* Exception class for BitstreamFilters
*
*/
public class BitstreamFilterException extends Exception
{
public class BitstreamFilterException extends Exception {
private static final long serialVersionUID = 1L;
public BitstreamFilterException() {}
public BitstreamFilterException(String msg)
{
public BitstreamFilterException() {
}
/**
* @param msg exception message
*/
public BitstreamFilterException(String msg) {
super(msg);
}
public BitstreamFilterException(Exception e)
{
/**
* @param e exception
*/
public BitstreamFilterException(Exception e) {
super(e);
}

View File

@@ -8,7 +8,8 @@
package org.dspace.app.itemupdate;
import java.text.ParseException;
import java.util.regex.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.dspace.core.Constants;
@@ -21,14 +22,13 @@ import org.dspace.core.Constants;
* it looks from the source code that the ordering or elements is not fixed
*
* e.g.:
* {@code
* 48217870-MIT.pdf\tbundle: bundlename\tpermissions: -r 'MIT Users'\tdescription: Full printable version (MIT only)
* permissions: -[r|w] ['group name']
* description: <the description of the file>
*
*
* }
*/
public class ContentsEntry
{
public class ContentsEntry {
public static final String HDR_BUNDLE = "bundle:";
public static final String HDR_PERMISSIONS = "permissions:";
public static final String HDR_DESCRIPTION = "description:";
@@ -41,12 +41,11 @@ public class ContentsEntry
final int permissionsActionId;
final String description;
private ContentsEntry(String filename,
protected ContentsEntry(String filename,
String bundlename,
int permissionsActionId,
String permissionsGroupName,
String description)
{
String description) {
this.filename = filename;
this.bundlename = bundlename;
this.permissionsActionId = permissionsActionId;
@@ -57,13 +56,12 @@ public class ContentsEntry
/**
* Factory method parses a line from the Contents Entry file
*
* @param line
* @param line line as string
* @return the parsed ContentsEntry object
* @throws ParseException
* @throws ParseException if parse error
*/
public static ContentsEntry parse(String line)
throws ParseException
{
throws ParseException {
String[] ar = line.split("\t");
ItemUpdate.pr("ce line split: " + ar.length);
@@ -73,46 +71,33 @@ public class ContentsEntry
String groupName = null;
int actionId = -1;
if (ar.length > 1)
{
for (int i=1; i < ar.length; i++)
{
if (ar.length > 1) {
for (int i = 1; i < ar.length; i++) {
ItemUpdate.pr("ce " + i + " : " + ar[i]);
if (ar[i].startsWith(HDR_BUNDLE))
{
if (ar[i].startsWith(HDR_BUNDLE)) {
arp[1] = ar[i].substring(HDR_BUNDLE.length()).trim();
}
else if (ar[i].startsWith(HDR_PERMISSIONS))
{
} else if (ar[i].startsWith(HDR_PERMISSIONS)) {
arp[2] = ar[i].substring(HDR_PERMISSIONS.length()).trim();
// parse into actionId and group name
Matcher m = permissionsPattern.matcher(arp[2]);
if (m.matches())
{
if (m.matches()) {
String action = m.group(1); //
if (action.equals("r"))
{
if (action.equals("r")) {
actionId = Constants.READ;
}
else if (action.equals("w"))
{
} else if (action.equals("w")) {
actionId = Constants.WRITE;
}
groupName = m.group(2).trim();
}
}
else if (ar[i].startsWith(HDR_DESCRIPTION))
{
} else if (ar[i].startsWith(HDR_DESCRIPTION)) {
arp[3] = ar[i].substring(HDR_DESCRIPTION.length()).trim();
}
else
{
} else {
throw new ParseException("Unknown text in contents file: " + ar[i], 0);
}
}
@@ -120,30 +105,23 @@ public class ContentsEntry
return new ContentsEntry(arp[0], arp[1], actionId, groupName, arp[3]);
}
public String toString()
{
public String toString() {
StringBuilder sb = new StringBuilder(filename);
if (bundlename != null)
{
if (bundlename != null) {
sb.append(HDR_BUNDLE).append(" ").append(bundlename);
}
if (permissionsGroupName != null)
{
if (permissionsGroupName != null) {
sb.append(HDR_PERMISSIONS);
if (permissionsActionId == Constants.READ)
{
if (permissionsActionId == Constants.READ) {
sb.append(" -r ");
}
else if (permissionsActionId == Constants.WRITE)
{
} else if (permissionsActionId == Constants.WRITE) {
sb.append(" -w ");
}
sb.append(permissionsGroupName);
}
if (description != null)
{
if (description != null) {
sb.append(HDR_DESCRIPTION).append(" ").append(description);
}

View File

@@ -26,84 +26,64 @@ import org.dspace.core.Context;
* Undo not supported for this UpdateAction
*
* Derivatives of the bitstream to be deleted are not also deleted
*
*/
public class DeleteBitstreamsAction extends UpdateBitstreamsAction
{
public class DeleteBitstreamsAction extends UpdateBitstreamsAction {
/**
* Delete bitstream from item
*
* @param context
* @param itarch
* @param isTest
* @param suppressUndo
* @throws IllegalArgumentException
* @throws ParseException
* @throws IOException
* @throws AuthorizeException
* @throws SQLException
* @param context DSpace Context
* @param itarch item archive
* @param isTest test flag
* @param suppressUndo undo flag
* @throws IOException if IO error
* @throws IllegalArgumentException if arg exception
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
* @throws ParseException if parse error
*/
@Override
public void execute(Context context, ItemArchive itarch, boolean isTest,
boolean suppressUndo) throws IllegalArgumentException, IOException,
SQLException, AuthorizeException, ParseException
{
SQLException, AuthorizeException, ParseException {
File f = new File(itarch.getDirectory(), ItemUpdate.DELETE_CONTENTS_FILE);
if (!f.exists())
{
if (!f.exists()) {
ItemUpdate.pr("Warning: Delete_contents file for item " + itarch.getDirectoryName() + " not found.");
}
else
{
List<Integer> list = MetadataUtilities.readDeleteContentsFile(f);
if (list.isEmpty())
{
} else {
List<String> list = MetadataUtilities.readDeleteContentsFile(f);
if (list.isEmpty()) {
ItemUpdate.pr("Warning: empty delete_contents file for item " + itarch.getDirectoryName());
}
else
{
for (int id : list)
{
try
{
Bitstream bs = Bitstream.find(context, id);
if (bs == null)
{
} else {
for (String id : list) {
try {
Bitstream bs = bitstreamService.findByIdOrLegacyId(context, id);
if (bs == null) {
ItemUpdate.pr("Bitstream not found by id: " + id);
}
else
{
Bundle[] bundles = bs.getBundles();
for (Bundle b : bundles)
{
if (isTest)
{
} else {
List<Bundle> bundles = bs.getBundles();
for (Bundle b : bundles) {
if (isTest) {
ItemUpdate.pr("Delete bitstream with id = " + id);
}
else
{
b.removeBitstream(bs);
} else {
bundleService.removeBitstream(context, b, bs);
ItemUpdate.pr("Deleted bitstream with id = " + id);
}
}
if (alterProvenance)
{
if (alterProvenance) {
DtoMetadata dtom = DtoMetadata.create("dc.description.provenance", "en", "");
String append = "Bitstream " + bs.getName() + " deleted on " + DCDate.getCurrent() + "; ";
Item item = bundles[0].getItems()[0];
String append = "Bitstream " + bs.getName() + " deleted on " + DCDate
.getCurrent() + "; ";
Item item = bundles.iterator().next().getItems().iterator().next();
ItemUpdate.pr("Append provenance with: " + append);
if (!isTest)
{
MetadataUtilities.appendMetadata(item, dtom, false, append);
if (!isTest) {
MetadataUtilities.appendMetadata(context, item, dtom, false, append);
}
}
}
}
catch(SQLException e)
{
} catch (SQLException e) {
ItemUpdate.pr("Error finding bitstream from id: " + id + " : " + e.toString());
}
}

View File

@@ -28,77 +28,67 @@ import org.dspace.core.Context;
*
* Note: Multiple filters are impractical if trying to manage multiple properties files
* in a commandline environment
*
*
*/
public class DeleteBitstreamsByFilterAction extends UpdateBitstreamsAction {
private BitstreamFilter filter;
protected BitstreamFilter filter;
/**
* Set filter
*
* @param filter
* @param filter BitstreamFilter
*/
public void setBitstreamFilter(BitstreamFilter filter)
{
public void setBitstreamFilter(BitstreamFilter filter) {
this.filter = filter;
}
/**
* Get filter
*
* @return filter
*/
public BitstreamFilter getBitstreamFilter()
{
public BitstreamFilter getBitstreamFilter() {
return filter;
}
/**
* Delete bitstream
*
* @param context
* @param itarch
* @param isTest
* @param suppressUndo
* @throws IllegalArgumentException
* @throws ParseException
* @throws IOException
* @throws AuthorizeException
* @throws SQLException
* @param context DSpace Context
* @param itarch item archive
* @param isTest test flag
* @param suppressUndo undo flag
* @throws IOException if IO error
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
* @throws ParseException if parse error
* @throws BitstreamFilterException if filter error
*/
@Override
public void execute(Context context, ItemArchive itarch, boolean isTest,
boolean suppressUndo) throws AuthorizeException,
BitstreamFilterException, IOException, ParseException, SQLException
{
BitstreamFilterException, IOException, ParseException, SQLException {
List<String> deleted = new ArrayList<String>();
Item item = itarch.getItem();
Bundle[] bundles = item.getBundles();
List<Bundle> bundles = item.getBundles();
for (Bundle b : bundles)
{
Bitstream[] bitstreams = b.getBitstreams();
for (Bundle b : bundles) {
List<Bitstream> bitstreams = b.getBitstreams();
String bundleName = b.getName();
for (Bitstream bs : bitstreams)
{
if (filter.accept(bs))
{
if (isTest)
{
for (Bitstream bs : bitstreams) {
if (filter.accept(bs)) {
if (isTest) {
ItemUpdate.pr("Delete from bundle " + bundleName + " bitstream " + bs.getName()
+ " with id = " + bs.getID());
}
else
{
} else {
//provenance is not maintained for derivative bitstreams
if (!bundleName.equals("THUMBNAIL") && !bundleName.equals("TEXT"))
{
if (!bundleName.equals("THUMBNAIL") && !bundleName.equals("TEXT")) {
deleted.add(bs.getName());
}
b.removeBitstream(bs);
bundleService.removeBitstream(context, b, bs);
ItemUpdate.pr("Deleted " + bundleName + " bitstream " + bs.getName()
+ " with id = " + bs.getID());
}
@@ -106,13 +96,11 @@ public class DeleteBitstreamsByFilterAction extends UpdateBitstreamsAction {
}
}
if (alterProvenance && !deleted.isEmpty())
{
if (alterProvenance && !deleted.isEmpty()) {
StringBuilder sb = new StringBuilder(" Bitstreams deleted on ");
sb.append(DCDate.getCurrent()).append(": ");
for (String s : deleted)
{
for (String s : deleted) {
sb.append(s).append(", ");
}
@@ -120,9 +108,8 @@ public class DeleteBitstreamsByFilterAction extends UpdateBitstreamsAction {
ItemUpdate.pr("Append provenance with: " + sb.toString());
if (!isTest)
{
MetadataUtilities.appendMetadata(item, dtom, false, sb.toString());
if (!isTest) {
MetadataUtilities.appendMetadata(context, item, dtom, false, sb.toString());
}
}
}

View File

@@ -7,57 +7,58 @@
*/
package org.dspace.app.itemupdate;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DCValue;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataValue;
import org.dspace.core.Context;
/**
* Action to delete metadata
*
*
*/
public class DeleteMetadataAction extends UpdateMetadataAction {
/**
* Delete metadata from item
*
* @param context
* @param itarch
* @param isTest
* @param suppressUndo
* @throws ParseException
* @throws AuthorizeException
* @param context DSpace Context
* @param itarch Item Archive
* @param isTest test flag
* @param suppressUndo undo flag
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
* @throws ParseException if parse error
*/
@Override
public void execute(Context context, ItemArchive itarch, boolean isTest,
boolean suppressUndo) throws AuthorizeException, ParseException
{
boolean suppressUndo) throws AuthorizeException, ParseException, SQLException {
Item item = itarch.getItem();
for (String f : targetFields)
{
for (String f : targetFields) {
DtoMetadata dummy = DtoMetadata.create(f, Item.ANY, "");
DCValue[] ardcv = item.getMetadata(f);
List<MetadataValue> ardcv = itemService.getMetadataByMetadataString(item, f);
ItemUpdate.pr("Metadata to be deleted: ");
for (DCValue dcv : ardcv)
{
for (MetadataValue dcv : ardcv) {
ItemUpdate.pr(" " + MetadataUtilities.getDCValueString(dcv));
}
if (!isTest)
{
if (!suppressUndo)
{
for (DCValue dcv : ardcv)
{
itarch.addUndoMetadataField(DtoMetadata.create(dcv.schema, dcv.element,
dcv.qualifier, dcv.language, dcv.value));
if (!isTest) {
if (!suppressUndo) {
for (MetadataValue dcv : ardcv) {
MetadataField metadataField = dcv.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
itarch.addUndoMetadataField(
DtoMetadata.create(metadataSchema.getName(), metadataField.getElement(),
metadataField.getQualifier(), dcv.getLanguage(), dcv.getValue()));
}
}
item.clearMetadata(dummy.schema, dummy.element, dummy.qualifier, Item.ANY);
itemService.clearMetadata(context, item, dummy.schema, dummy.element, dummy.qualifier, Item.ANY);
}
}
}

View File

@@ -11,12 +11,10 @@ import java.util.Properties;
/**
* Bitstream filter to delete from TEXT bundle
*
*/
public class DerivativeTextBitstreamFilter extends BitstreamFilterByBundleName {
public DerivativeTextBitstreamFilter()
{
public DerivativeTextBitstreamFilter() {
props = new Properties();
props.setProperty("bundle", "TEXT");
}

View File

@@ -8,6 +8,7 @@
package org.dspace.app.itemupdate;
import java.text.ParseException;
import org.dspace.content.Item;
/**
@@ -16,22 +17,19 @@ import org.dspace.content.Item;
*
* Adds some utility methods
*
* Really not at all general enough but supports Dublin Core and the compound form notation <schema>.<element>[.<qualifier>]
* Really not at all general enough but supports Dublin Core and the compound form notation {@code <schema>
* .<element>[.<qualifier>]}
*
* Does not support wildcard for qualifier
*
*
*/
class DtoMetadata
{
class DtoMetadata {
final String schema;
final String element;
final String qualifier;
final String language;
final String value;
private DtoMetadata(String schema, String element, String qualifier, String language, String value)
{
protected DtoMetadata(String schema, String element, String qualifier, String language, String value) {
this.schema = schema;
this.element = element;
this.qualifier = qualifier;
@@ -42,23 +40,21 @@ class DtoMetadata
/**
* Factory method
*
*
* @param schema not null, not empty - 'dc' is the standard case
* @param element not null, not empty
* @param qualifier null; don't allow empty string or * indicating 'any'
* @param language null or empty
* @param value
* @param value value
* @return DtoMetadata object
* @throws IllegalArgumentException if arg error
*/
public static DtoMetadata create(String schema,
String element,
String qualifier,
String language,
String value)
throws IllegalArgumentException
{
if ((qualifier != null) && (qualifier.equals(Item.ANY) || qualifier.equals("")))
{
throws IllegalArgumentException {
if ((qualifier != null) && (qualifier.equals(Item.ANY) || qualifier.equals(""))) {
throw new IllegalArgumentException("Invalid qualifier: " + qualifier);
}
return new DtoMetadata(schema, element, qualifier, language, value);
@@ -67,19 +63,18 @@ class DtoMetadata
/**
* Factory method to create metadata object
*
*
* @param compoundForm of the form <schema>.<element>[.<qualifier>]
* @param language null or empty
* @param value
* @param value value
* @throws ParseException if parse error
* @throws IllegalArgumentException if arg error
*/
public static DtoMetadata create(String compoundForm, String language, String value)
throws ParseException, IllegalArgumentException
{
throws ParseException, IllegalArgumentException {
String[] ar = MetadataUtilities.parseCompoundForm(compoundForm);
String qual = null;
if (ar.length > 2)
{
if (ar.length > 2) {
qual = ar[2];
}
@@ -90,56 +85,44 @@ class DtoMetadata
* Determine if this metadata field matches the specified type:
* schema.element or schema.element.qualifier
*
*
* @param compoundForm of the form <schema>.<element>[.<qualifier>|.*]
* @param wildcard allow wildcards in compoundForm param
* @return whether matches
*/
public boolean matches(String compoundForm, boolean wildcard)
{
public boolean matches(String compoundForm, boolean wildcard) {
String[] ar = compoundForm.split("\\s*\\.\\s*"); //MetadataUtilities.parseCompoundForm(compoundForm);
if ((ar.length < 2) || (ar.length > 3))
{
if ((ar.length < 2) || (ar.length > 3)) {
return false;
}
if (!this.schema.equals(ar[0]) || !this.element.equals(ar[1]))
{
if (!this.schema.equals(ar[0]) || !this.element.equals(ar[1])) {
return false;
}
if (ar.length == 2)
{
if (this.qualifier != null)
{
if (ar.length == 2) {
if (this.qualifier != null) {
return false;
}
}
if (ar.length == 3)
{
if (this.qualifier == null)
{
if (ar.length == 3) {
if (this.qualifier == null) {
return false;
}
if (wildcard && ar[2].equals(Item.ANY))
{
if (wildcard && ar[2].equals(Item.ANY)) {
return true;
}
if (!this.qualifier.equals(ar[2]))
{
if (!this.qualifier.equals(ar[2])) {
return false;
}
}
return true;
}
public String toString()
{
public String toString() {
String s = "\tSchema: " + schema + " Element: " + element;
if (qualifier != null)
{
if (qualifier != null) {
s += " Qualifier: " + qualifier;
}
s += " Language: " + ((language == null) ? "[null]" : language);
@@ -148,8 +131,7 @@ class DtoMetadata
return s;
}
public String getValue()
{
public String getValue() {
return value;
}

View File

@@ -10,64 +10,70 @@ package org.dspace.app.itemupdate;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerConfigurationException;
import org.apache.log4j.Logger;
import org.dspace.content.ItemIterator;
import org.dspace.app.util.LocalSchemaFilenameFilter;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
import org.dspace.core.Context;
import org.dspace.handle.HandleManager;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.handle.service.HandleService;
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);
public static final String DUBLIN_CORE_XML = "dublin_core.xml";
private static DocumentBuilder builder = null;
private static Transformer transformer = null;
protected static DocumentBuilder builder = null;
protected Transformer transformer = null;
private List<DtoMetadata> dtomList = null;
private List<DtoMetadata> undoDtomList = new ArrayList<DtoMetadata>();
protected List<DtoMetadata> dtomList = null;
protected List<DtoMetadata> undoDtomList = new ArrayList<DtoMetadata>();
private List<Integer> undoAddContents = new ArrayList<Integer>(); // for undo of add
protected List<UUID> undoAddContents = new ArrayList<>(); // for undo of add
private Item item;
private File dir; // directory name in source archive for this item
private String dirname; //convenience
protected Item item;
protected File dir; // directory name in source archive for this item
protected String dirname; //convenience
protected HandleService handleService;
protected ItemService itemService;
//constructors
private ItemArchive()
{
// nothing
protected ItemArchive() {
handleService = HandleServiceFactory.getInstance().getHandleService();
itemService = ContentServiceFactory.getInstance().getItemService();
}
/** factory method
/**
* factory method
*
* Minimal requirements for dublin_core.xml for this application
* is the presence of dc.identifier.uri
@@ -77,40 +83,40 @@ public class ItemArchive {
* @param dir - The directory File in the source archive
* @param itemField - The metadata field in which the Item identifier is located
* if null, the default is the handle in the dc.identifier.uri field
*
* @return ItemArchive object
* @throws Exception if error
*/
public static ItemArchive create(Context context, File dir, String itemField)
throws Exception
{
throws Exception {
ItemArchive itarch = new ItemArchive();
itarch.dir = dir;
itarch.dirname = dir.getName();
InputStream is = null;
try
{
try {
is = new FileInputStream(new File(dir, DUBLIN_CORE_XML));
itarch.dtomList = MetadataUtilities.loadDublinCore(getDocumentBuilder(), is);
//The code to search for local schema files was copied from org.dspace.app.itemimport
// .ItemImportServiceImpl.java
File file[] = dir.listFiles(new LocalSchemaFilenameFilter());
for (int i = 0; i < file.length; i++) {
is = new FileInputStream(file[i]);
itarch.dtomList.addAll(MetadataUtilities.loadDublinCore(getDocumentBuilder(), is));
}
finally
{
if (is != null)
{
} finally {
if (is != null) {
is.close();
}
}
ItemUpdate.pr("Loaded metadata with " + itarch.dtomList.size() + " fields");
if (itemField == null)
{
if (itemField == null) {
itarch.item = itarch.itemFromHandleInput(context); // sets the item instance var and seeds the undo list
}
else
{
} else {
itarch.item = itarch.itemFromMetadataField(context, itemField);
}
if (itarch.item == null)
{
if (itarch.item == null) {
throw new Exception("Item not instantiated: " + itarch.dirname);
}
@@ -119,21 +125,23 @@ public class ItemArchive {
return itarch;
}
private static DocumentBuilder getDocumentBuilder()
throws ParserConfigurationException
{
if (builder == null)
{
protected static DocumentBuilder getDocumentBuilder()
throws ParserConfigurationException {
if (builder == null) {
builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
}
return builder;
}
private static Transformer getTransformer()
throws TransformerConfigurationException
{
if (transformer == null)
{
/**
* Getter for Transformer
*
* @return Transformer
* @throws TransformerConfigurationException if config error
*/
protected Transformer getTransformer()
throws TransformerConfigurationException {
if (transformer == null) {
transformer = TransformerFactory.newInstance().newTransformer();
}
return transformer;
@@ -141,55 +149,55 @@ public class ItemArchive {
/**
* Getter for the DSpace item referenced in the archive
*
* @return DSpace item
*/
public Item getItem()
{
public Item getItem() {
return item;
}
/**
* Getter for directory in archive on disk
*
* @return directory in archive
*/
public File getDirectory()
{
public File getDirectory() {
return dir;
}
/**
* Getter for directory name in archive
*
* @return directory name in archive
*/
public String getDirectoryName()
{
public String getDirectoryName() {
return dirname;
}
/**
* Add metadata field to undo list
* @param dtom
*
* @param dtom DtoMetadata (represents metadata field)
*/
public void addUndoMetadataField(DtoMetadata dtom)
{
public void addUndoMetadataField(DtoMetadata dtom) {
this.undoDtomList.add(dtom);
}
/**
* Getter for list of metadata fields
*
* @return list of metadata fields
*/
public List<DtoMetadata> getMetadataFields()
{
public List<DtoMetadata> getMetadataFields() {
return dtomList;
}
/**
* Add bitstream id to delete contents file
* @param bitstreamId
*
* @param bitstreamId bitstream ID
*/
public void addUndoDeleteContents(int bitstreamId)
{
public void addUndoDeleteContents(UUID bitstreamId) {
this.undoAddContents.add(bitstreamId);
}
@@ -200,13 +208,14 @@ public class ItemArchive {
* that uses the dc.identifier.uri metadatafield
* that contains the item handle as its value
*
* @param context DSpace Context
* @throws SQLException if database error
* @throws Exception if error
*/
private Item itemFromHandleInput(Context context)
throws SQLException, Exception
{
throws SQLException, Exception {
DtoMetadata dtom = getMetadataField("dc.identifier.uri");
if (dtom == null)
{
if (dtom == null) {
throw new Exception("No dc.identier.uri field found for handle");
}
@@ -214,21 +223,17 @@ public class ItemArchive {
String uri = dtom.value;
if (!uri.startsWith(ItemUpdate.HANDLE_PREFIX))
{
if (!uri.startsWith(ItemUpdate.HANDLE_PREFIX)) {
throw new Exception("dc.identifier.uri for item " + uri
+ " does not begin with prefix: " + ItemUpdate.HANDLE_PREFIX);
}
String handle = uri.substring(ItemUpdate.HANDLE_PREFIX.length());
DSpaceObject dso = HandleManager.resolveToObject(context, handle);
if (dso instanceof Item)
{
DSpaceObject dso = handleService.resolveToObject(context, handle);
if (dso instanceof Item) {
item = (Item) dso;
}
else
{
} else {
ItemUpdate.pr("Warning: item not instantiated");
throw new IllegalArgumentException("Item " + handle + " not instantiated.");
}
@@ -239,53 +244,50 @@ public class ItemArchive {
* Find and instantiate Item from the dublin_core.xml based
* on the specified itemField for the item identifier,
*
*
* @param context - the DSpace context
* @param itemField - the compound form of the metadata element <schema>.<element>.<qualifier>
* @throws SQLException
* @throws Exception
* @throws SQLException if database error
* @throws Exception if error
*/
private Item itemFromMetadataField(Context context, String itemField)
throws SQLException, AuthorizeException, Exception
{
throws SQLException, AuthorizeException, Exception {
DtoMetadata dtom = getMetadataField(itemField);
Item item = null;
if (dtom == null)
{
if (dtom == null) {
throw new IllegalArgumentException("No field found for item identifier field: " + itemField);
}
ItemUpdate.prv("Metadata field to match for item: " + dtom.toString());
this.addUndoMetadataField(dtom); //seed the undo list with the identifier field
ItemIterator itr = Item.findByMetadataField(context, dtom.schema, dtom.element, dtom.qualifier, dtom.value);
Iterator<Item> itr = itemService
.findByMetadataField(context, dtom.schema, dtom.element, dtom.qualifier, dtom.value);
int count = 0;
while (itr.hasNext())
{
while (itr.hasNext()) {
item = itr.next();
count++;
}
itr.close();
ItemUpdate.prv("items matching = " + count);
if (count != 1)
{
if (count != 1) {
throw new Exception("" + count + " items matching item identifier: " + dtom.value);
}
return item;
}
private DtoMetadata getMetadataField(String compoundForm)
{
for (DtoMetadata dtom : dtomList)
{
if (dtom.matches(compoundForm, false))
{
/**
* Get DtoMetadata field
*
* @param compoundForm compound form
* @return DtoMetadata field
*/
private DtoMetadata getMetadataField(String compoundForm) {
for (DtoMetadata dtom : dtomList) {
if (dtom.matches(compoundForm, false)) {
return dtom;
}
}
@@ -295,51 +297,44 @@ public class ItemArchive {
/**
* write undo directory and files to Disk in archive format
*
*
* @param undoDir - the root directory of the undo archive
* @throws IOException if IO error
* @throws ParserConfigurationException if config error
* @throws TransformerConfigurationException if transformer config error
* @throws TransformerException if transformer error
* @throws FileNotFoundException if file not found
*/
public void writeUndo(File undoDir)
throws IOException, ParserConfigurationException, TransformerConfigurationException,
TransformerException, FileNotFoundException
{
TransformerException, FileNotFoundException {
// create directory for item
File dir = new File(undoDir, dirname);
if (!dir.exists() && !dir.mkdir())
{
if (!dir.exists() && !dir.mkdir()) {
log.error("Unable to create undo directory");
}
OutputStream out = null;
try
{
try {
out = new FileOutputStream(new File(dir, "dublin_core.xml"));
Document doc = MetadataUtilities.writeDublinCore(getDocumentBuilder(), undoDtomList);
MetadataUtilities.writeDocument(doc, getTransformer(), out);
// if undo has delete bitstream
if (undoAddContents.size() > 0)
{
if (undoAddContents.size() > 0) {
PrintWriter pw = null;
try
{
try {
File f = new File(dir, ItemUpdate.DELETE_CONTENTS_FILE);
pw = new PrintWriter(new BufferedWriter(new FileWriter(f)));
for (Integer i : undoAddContents)
{
for (UUID i : undoAddContents) {
pw.println(i);
}
}
finally
{
} finally {
pw.close();
}
}
}
finally
{
if (out != null)
{
} finally {
if (out != null) {
out.close();
}
}

View File

@@ -9,9 +9,9 @@ package org.dspace.app.itemupdate;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FilenameFilter;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -20,6 +20,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
@@ -28,12 +29,15 @@ import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
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;
/**
*
* Provides some batch editing capabilities for items in DSpace:
* Metadata fields - Add, Delete
* Bitstreams - Add, Delete
@@ -58,9 +62,7 @@ import org.dspace.eperson.EPerson;
* Some of this has been placed into the MetadataUtilities class
* for possible reuse elsewhere.
*
*
* @author W. Hays based on a conceptual design by R. Rodgers
*
*/
public class ItemUpdate {
@@ -74,45 +76,44 @@ public class ItemUpdate {
public static boolean verbose = false;
static
{
protected static final EPersonService epersonService = EPersonServiceFactory.getInstance().getEPersonService();
protected static final ItemService itemService = ContentServiceFactory.getInstance().getItemService();
static {
filterAliases.put("ORIGINAL", "org.dspace.app.itemupdate.OriginalBitstreamFilter");
filterAliases.put("ORIGINAL_AND_DERIVATIVES", "org.dspace.app.itemupdate.OriginalWithDerivativesBitstreamFilter");
filterAliases
.put("ORIGINAL_AND_DERIVATIVES", "org.dspace.app.itemupdate.OriginalWithDerivativesBitstreamFilter");
filterAliases.put("TEXT", "org.dspace.app.itemupdate.DerivativeTextBitstreamFilter");
filterAliases.put("THUMBNAIL", "org.dspace.app.itemupdate.ThumbnailBitstreamFilter");
}
// File listing filter to check for folders
static FilenameFilter directoryFilter = new FilenameFilter()
{
public boolean accept(File dir, String n)
{
static FilenameFilter directoryFilter = new FilenameFilter() {
@Override
public boolean accept(File dir, String n) {
File f = new File(dir.getAbsolutePath() + File.separatorChar + n);
return f.isDirectory();
}
};
// File listing filter to check for files (not directories)
static FilenameFilter fileFilter = new FilenameFilter()
{
public boolean accept(File dir, String n)
{
static FilenameFilter fileFilter = new FilenameFilter() {
@Override
public boolean accept(File dir, String n) {
File f = new File(dir.getAbsolutePath() + File.separatorChar + n);
return (f.isFile());
}
};
// instance variables
private ActionManager actionMgr = new ActionManager();
private List<String> undoActionList = new ArrayList<String>();
private String eperson;
protected ActionManager actionMgr = new ActionManager();
protected List<String> undoActionList = new ArrayList<String>();
protected String eperson;
/**
*
* @param argv
* @param argv the command line arguments given
*/
public static void main(String[] argv)
{
public static void main(String[] argv) {
// create an options object and populate it
CommandLineParser parser = new PosixParser();
@@ -123,20 +124,23 @@ public class ItemUpdate {
options.addOption("s", "source", true, "root directory of source dspace archive ");
//actions on items
options.addOption("a", "addmetadata", true, "add metadata specified for each item; multiples separated by semicolon ';'");
options.addOption("a", "addmetadata", true,
"add metadata specified for each item; multiples separated by semicolon ';'");
options.addOption("d", "deletemetadata", true, "delete metadata specified for each item");
options.addOption("A", "addbitstreams", false, "add bitstreams as specified for each item");
// extra work to get optional argument
Option delBitstreamOption = new Option("D", "deletebitstreams", true, "delete bitstreams as specified for each item");
Option delBitstreamOption = new Option("D", "deletebitstreams", true,
"delete bitstreams as specified for each item");
delBitstreamOption.setOptionalArg(true);
delBitstreamOption.setArgName("BitstreamFilter");
options.addOption(delBitstreamOption);
//other params
options.addOption("e", "eperson", true, "email of eperson doing the update");
options.addOption("i", "itemfield", true, "optional metadata field that containing item identifier; default is dc.identifier.uri");
options.addOption("i", "itemfield", true,
"optional metadata field that containing item identifier; default is dc.identifier.uri");
options.addOption("F", "filter-properties", true, "filter class name; only for deleting bitstream");
options.addOption("v", "verbose", false, "verbose logging");
@@ -154,12 +158,10 @@ public class ItemUpdate {
Context context = null;
ItemUpdate iu = new ItemUpdate();
try
{
try {
CommandLine line = parser.parse(options, argv);
if (line.hasOption('h'))
{
if (line.hasOption('h')) {
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("ItemUpdate", options);
pr("");
@@ -173,91 +175,79 @@ public class ItemUpdate {
System.exit(0);
}
if (line.hasOption('v'))
{
if (line.hasOption('v')) {
verbose = true;
}
if (line.hasOption('P'))
{
if (line.hasOption('P')) {
alterProvenance = false;
pr("Suppressing changes to Provenance field option");
}
iu.eperson = line.getOptionValue('e'); // db ID or email
if (!line.hasOption('s')) // item specific changes from archive dir
{
if (!line.hasOption('s')) { // item specific changes from archive dir
pr("Missing source archive option");
System.exit(1);
}
String sourcedir = line.getOptionValue('s');
if (line.hasOption('t')) //test
{
if (line.hasOption('t')) { //test
isTest = true;
pr("**Test Run** - not actually updating items.");
}
if (line.hasOption('i'))
{
if (line.hasOption('i')) {
itemField = line.getOptionValue('i');
}
if (line.hasOption('d'))
{
if (line.hasOption('d')) {
String[] targetFields = line.getOptionValues('d');
DeleteMetadataAction delMetadataAction = (DeleteMetadataAction) iu.actionMgr.getUpdateAction(DeleteMetadataAction.class);
DeleteMetadataAction delMetadataAction = (DeleteMetadataAction) iu.actionMgr
.getUpdateAction(DeleteMetadataAction.class);
delMetadataAction.addTargetFields(targetFields);
//undo is an add
for (String field : targetFields)
{
for (String field : targetFields) {
iu.undoActionList.add(" -a " + field + " ");
}
pr("Delete metadata for fields: ");
for (String s : targetFields)
{
for (String s : targetFields) {
pr(" " + s);
}
}
if (line.hasOption('a'))
{
if (line.hasOption('a')) {
String[] targetFields = line.getOptionValues('a');
AddMetadataAction addMetadataAction = (AddMetadataAction) iu.actionMgr.getUpdateAction(AddMetadataAction.class);
AddMetadataAction addMetadataAction = (AddMetadataAction) iu.actionMgr
.getUpdateAction(AddMetadataAction.class);
addMetadataAction.addTargetFields(targetFields);
//undo is a delete followed by an add of a replace record for target fields
for (String field : targetFields)
{
for (String field : targetFields) {
iu.undoActionList.add(" -d " + field + " ");
}
for (String field : targetFields)
{
for (String field : targetFields) {
iu.undoActionList.add(" -a " + field + " ");
}
pr("Add metadata for fields: ");
for (String s : targetFields)
{
for (String s : targetFields) {
pr(" " + s);
}
}
if (line.hasOption('D')) // undo not supported
{
if (line.hasOption('D')) { // undo not supported
pr("Delete bitstreams ");
String[] filterNames = line.getOptionValues('D');
if ((filterNames != null) && (filterNames.length > 1))
{
if ((filterNames != null) && (filterNames.length > 1)) {
pr("Error: Only one filter can be a used at a time.");
System.exit(1);
}
@@ -265,138 +255,127 @@ public class ItemUpdate {
String filterName = line.getOptionValue('D');
pr("Filter argument: " + filterName);
if (filterName == null) // indicates using delete_contents files
{
DeleteBitstreamsAction delAction = (DeleteBitstreamsAction) iu.actionMgr.getUpdateAction(DeleteBitstreamsAction.class);
if (filterName == null) { // indicates using delete_contents files
DeleteBitstreamsAction delAction = (DeleteBitstreamsAction) iu.actionMgr
.getUpdateAction(DeleteBitstreamsAction.class);
delAction.setAlterProvenance(alterProvenance);
}
else
{
} else {
// check if param is on ALIAS list
String filterClassname = filterAliases.get(filterName);
if (filterClassname == null)
{
if (filterClassname == null) {
filterClassname = filterName;
}
BitstreamFilter filter = null;
try
{
try {
Class<?> cfilter = Class.forName(filterClassname);
pr("BitstreamFilter class to instantiate: " + cfilter.toString());
filter = (BitstreamFilter) cfilter.newInstance(); //unfortunate cast, an erasure consequence
}
catch(Exception e)
{
} catch (Exception e) {
pr("Error: Failure instantiating bitstream filter class: " + filterClassname);
System.exit(1);
}
String filterPropertiesName = line.getOptionValue('F');
if (filterPropertiesName != null) //not always required
{
try
{
if (filterPropertiesName != null) { //not always required
try {
// TODO try multiple relative locations, e.g. source dir
if (!filterPropertiesName.startsWith("/"))
{
if (!filterPropertiesName.startsWith("/")) {
filterPropertiesName = sourcedir + File.separator + filterPropertiesName;
}
filter.initProperties(filterPropertiesName);
}
catch(Exception e)
{
pr("Error: Failure finding properties file for bitstream filter class: " + filterPropertiesName);
} catch (Exception e) {
pr("Error: Failure finding properties file for bitstream filter class: " +
filterPropertiesName);
System.exit(1);
}
}
DeleteBitstreamsByFilterAction delAction =
(DeleteBitstreamsByFilterAction) iu.actionMgr.getUpdateAction(DeleteBitstreamsByFilterAction.class);
(DeleteBitstreamsByFilterAction) iu.actionMgr
.getUpdateAction(DeleteBitstreamsByFilterAction.class);
delAction.setAlterProvenance(alterProvenance);
delAction.setBitstreamFilter(filter);
//undo not supported
}
}
if (line.hasOption('A'))
{
if (line.hasOption('A')) {
pr("Add bitstreams ");
AddBitstreamsAction addAction = (AddBitstreamsAction) iu.actionMgr.getUpdateAction(AddBitstreamsAction.class);
AddBitstreamsAction addAction = (AddBitstreamsAction) iu.actionMgr
.getUpdateAction(AddBitstreamsAction.class);
addAction.setAlterProvenance(alterProvenance);
iu.undoActionList.add(" -D "); // delete_contents file will be written, no arg required
}
if (!iu.actionMgr.hasActions())
{
if (!iu.actionMgr.hasActions()) {
pr("Error - an action must be specified");
System.exit(1);
}
else
{
} else {
pr("Actions to be performed: ");
for (UpdateAction ua : iu.actionMgr)
{
for (UpdateAction ua : iu.actionMgr) {
pr(" " + ua.getClass().getName());
}
}
pr("ItemUpdate - initializing run on " + (new Date()).toString());
context = new Context();
context = new Context(Context.Mode.BATCH_EDIT);
iu.setEPerson(context, iu.eperson);
context.setIgnoreAuthorization(true);
context.turnOffAuthorisationSystem();
HANDLE_PREFIX = ConfigurationManager.getProperty("handle.canonical.prefix");
if (HANDLE_PREFIX == null || HANDLE_PREFIX.length() == 0)
{
if (HANDLE_PREFIX == null || HANDLE_PREFIX.length() == 0) {
HANDLE_PREFIX = "http://hdl.handle.net/";
}
iu.processArchive(context, sourcedir, itemField, metadataIndexName, alterProvenance, isTest);
context.complete(); // complete all transactions
context.setIgnoreAuthorization(false);
}
catch (Exception e)
{
if (context != null && context.isValid())
{
} catch (Exception e) {
if (context != null && context.isValid()) {
context.abort();
context.setIgnoreAuthorization(false);
}
e.printStackTrace();
pr(e.toString());
status = 1;
} finally {
context.restoreAuthSystemState();
}
if (isTest)
{
if (isTest) {
pr("***End of Test Run***");
}
else
{
} else {
pr("End.");
}
System.exit(status);
}
private void processArchive(Context context, String sourceDirPath, String itemField,
/**
* process an archive
*
* @param context DSpace Context
* @param sourceDirPath source path
* @param itemField item field
* @param metadataIndexName index name
* @param alterProvenance whether to alter provenance
* @param isTest test flag
* @throws Exception if error
*/
protected void processArchive(Context context, String sourceDirPath, String itemField,
String metadataIndexName, boolean alterProvenance, boolean isTest)
throws Exception
{
throws Exception {
// open and process the source directory
File sourceDir = new File(sourceDirPath);
if ((sourceDir == null) || !sourceDir.exists() || !sourceDir.isDirectory())
{
if ((sourceDir == null) || !sourceDir.exists() || !sourceDir.isDirectory()) {
pr("Error, cannot open archive source directory " + sourceDirPath);
throw new Exception("error with archive source directory " + sourceDirPath);
}
@@ -407,90 +386,73 @@ public class ItemUpdate {
//Undo is suppressed to prevent undo of undo
boolean suppressUndo = false;
File fSuppressUndo = new File(sourceDir, SUPPRESS_UNDO_FILENAME);
if (fSuppressUndo.exists())
{
if (fSuppressUndo.exists()) {
suppressUndo = true;
}
File undoDir = null; //sibling directory of source archive
if (!suppressUndo && !isTest)
{
if (!suppressUndo && !isTest) {
undoDir = initUndoArchive(sourceDir);
}
int itemCount = 0;
int successItemCount = 0;
for (String dirname : dircontents)
{
for (String dirname : dircontents) {
itemCount++;
pr("");
pr("processing item " + dirname);
try
{
try {
ItemArchive itarch = ItemArchive.create(context, new File(sourceDir, dirname), itemField);
for (UpdateAction action : actionMgr)
{
for (UpdateAction action : actionMgr) {
pr("action: " + action.getClass().getName());
action.execute(context, itarch, isTest, suppressUndo);
if (!isTest && !suppressUndo)
{
if (!isTest && !suppressUndo) {
itarch.writeUndo(undoDir);
}
}
if (!isTest)
{
if (!isTest) {
Item item = itarch.getItem();
item.update(); //need to update before commit
context.commit();
item.decache();
itemService.update(context, item); //need to update before commit
context.uncacheEntity(item);
}
ItemUpdate.pr("Item " + dirname + " completed");
successItemCount++;
}
catch(Exception e)
{
} catch (Exception e) {
pr("Exception processing item " + dirname + ": " + e.toString());
e.printStackTrace();
}
}
if (!suppressUndo && !isTest)
{
if (!suppressUndo && !isTest) {
StringBuilder sb = new StringBuilder("dsrun org.dspace.app.itemupdate.ItemUpdate ");
sb.append(" -e ").append(this.eperson);
sb.append(" -s ").append(undoDir);
if (itemField != null)
{
if (itemField != null) {
sb.append(" -i ").append(itemField);
}
if (!alterProvenance)
{
if (!alterProvenance) {
sb.append(" -P ");
}
if (isTest)
{
if (isTest) {
sb.append(" -t ");
}
for (String actionOption : undoActionList)
{
for (String actionOption : undoActionList) {
sb.append(actionOption);
}
PrintWriter pw = null;
try
{
try {
File cmdFile = new File(undoDir.getParent(), undoDir.getName() + "_command.sh");
pw = new PrintWriter(new BufferedWriter(new FileWriter(cmdFile)));
pw.println(sb.toString());
}
finally
{
} finally {
pw.close();
}
}
@@ -502,48 +464,42 @@ public class ItemUpdate {
/**
*
* to avoid overwriting the undo source tree on repeated processing
* sequence numbers are added and checked
*
* @param sourceDir - the original source directory
* @return the directory of the undo archive
* @throws FileNotFoundException
* @throws IOException
* @throws FileNotFoundException if file doesn't exist
* @throws IOException if IO error
*/
private File initUndoArchive(File sourceDir)
throws FileNotFoundException, IOException
{
File parentDir = sourceDir.getAbsoluteFile().getParentFile();
if (parentDir == null)
{
throw new FileNotFoundException("Parent directory of archive directory not found; unable to write UndoArchive; no processing performed");
protected File initUndoArchive(File sourceDir)
throws FileNotFoundException, IOException {
File parentDir = sourceDir.getCanonicalFile().getParentFile();
if (parentDir == null) {
throw new FileNotFoundException(
"Parent directory of archive directory not found; unable to write UndoArchive; no processing " +
"performed");
}
String sourceDirName = sourceDir.getName();
int seqNo = 1;
File undoDir = new File(parentDir, "undo_" + sourceDirName + "_" + seqNo);
while (undoDir.exists())
{
while (undoDir.exists()) {
undoDir = new File(parentDir, "undo_" + sourceDirName + "_" + ++seqNo); //increment
}
// create root directory
if (!undoDir.mkdir())
{
pr("ERROR creating Undo Archive directory ");
throw new IOException("ERROR creating Undo Archive directory ");
if (!undoDir.mkdir()) {
pr("ERROR creating Undo Archive directory " + undoDir.getCanonicalPath());
throw new IOException("ERROR creating Undo Archive directory " + undoDir.getCanonicalPath());
}
//Undo is suppressed to prevent undo of undo
File fSuppressUndo = new File(undoDir, ItemUpdate.SUPPRESS_UNDO_FILENAME);
try
{
try {
fSuppressUndo.createNewFile();
}
catch(IOException e)
{
} catch (IOException e) {
pr("ERROR creating Suppress Undo File " + e.toString());
throw e;
}
@@ -552,29 +508,31 @@ public class ItemUpdate {
//private void write
private void setEPerson(Context context, String eperson)
throws Exception
{
if (eperson == null)
{
/**
* Set EPerson doing import
*
* @param context DSpace Context
* @param eperson EPerson obj
* @throws Exception if error
*/
protected void setEPerson(Context context, String eperson)
throws Exception {
if (eperson == null) {
pr("Error - an eperson to do the importing must be specified");
pr(" (run with -h flag for details)");
throw new Exception("EPerson not specified."); }
throw new Exception("EPerson not specified.");
}
EPerson myEPerson = null;
if (eperson.indexOf('@') != -1)
{
if (eperson.indexOf('@') != -1) {
// @ sign, must be an email
myEPerson = EPerson.findByEmail(context, eperson);
}
else
{
myEPerson = EPerson.find(context, Integer.parseInt(eperson));
myEPerson = epersonService.findByEmail(context, eperson);
} else {
myEPerson = epersonService.find(context, UUID.fromString(eperson));
}
if (myEPerson == null)
{
if (myEPerson == null) {
pr("Error, eperson cannot be found: " + eperson);
throw new Exception("Invalid EPerson");
}
@@ -586,21 +544,20 @@ public class ItemUpdate {
* poor man's logging
* As with ItemImport, API logging goes through log4j to the DSpace.log files
* whereas the batch logging goes to the console to be captured there.
* @param s
*
* @param s String
*/
static void pr(String s)
{
static void pr(String s) {
System.out.println(s);
}
/**
* print if verbose flag is set
* @param s
*
* @param s String
*/
static void prv(String s)
{
if (verbose)
{
static void prv(String s) {
if (verbose) {
System.out.println(s);
}
}

View File

@@ -11,14 +11,13 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Result;
@@ -31,7 +30,15 @@ import javax.xml.transform.stream.StreamResult;
import org.apache.commons.lang.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.MetadataValue;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -39,12 +46,6 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DCValue;
import org.dspace.content.Item;
import org.dspace.content.MetadataSchema;
import org.dspace.core.ConfigurationManager;
/**
* Miscellaneous methods for metadata handling that build on the API
@@ -52,67 +53,60 @@ import org.dspace.core.ConfigurationManager;
* in context in ItemUpdate.
*
* The XML methods were based on those in ItemImport
*
*
*/
public class MetadataUtilities {
protected static final ItemService itemService = ContentServiceFactory.getInstance().getItemService();
/**
*
* Working around Item API to delete a value-specific DCValue
* Default constructor
*/
private MetadataUtilities() { }
/**
* Working around Item API to delete a value-specific Metadatum
* For a given element/qualifier/lang:
* get all DCValues
* clear (i.e. delete) all of these DCValues
* add them back, minus the one to actually delete
*
*
* @param item
* @param dtom
* @param isLanguageStrict -
*
* @param context DSpace Context
* @param item Item Object
* @param dtom metadata field
* @param isLanguageStrict whether strict or not
* @return true if metadata field is found with matching value and was deleted
* @throws SQLException if database error
*/
public static boolean deleteMetadataByValue(Item item, DtoMetadata dtom, boolean isLanguageStrict)
{
DCValue[] ar = null;
public static boolean deleteMetadataByValue(Context context, Item item, DtoMetadata dtom, boolean isLanguageStrict)
throws SQLException {
List<MetadataValue> ar = null;
if (isLanguageStrict)
{ // get all for given type
ar = item.getMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language);
}
else
{
ar = item.getMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
if (isLanguageStrict) { // get all for given type
ar = itemService.getMetadata(item, dtom.schema, dtom.element, dtom.qualifier, dtom.language);
} else {
ar = itemService.getMetadata(item, dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
}
boolean found = false;
//build new set minus the one to delete
List<String> vals = new ArrayList<String>();
for (DCValue dcv : ar)
{
if (dcv.value.equals(dtom.value))
{
for (MetadataValue dcv : ar) {
if (dcv.getValue().equals(dtom.value)) {
found = true;
}
else
{
vals.add(dcv.value);
} else {
vals.add(dcv.getValue());
}
}
if (found) //remove all for given type ??synchronize this block??
{
if (isLanguageStrict)
{
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language);
}
else
{
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
if (found) { //remove all for given type ??synchronize this block??
if (isLanguageStrict) {
itemService.clearMetadata(context, item, dtom.schema, dtom.element, dtom.qualifier, dtom.language);
} else {
itemService.clearMetadata(context, item, dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
}
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals.toArray(new String[vals.size()]));
itemService.addMetadata(context, item, dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals);
}
return found;
}
@@ -120,83 +114,71 @@ public class MetadataUtilities {
/**
* Append text to value metadata field to item
*
* @param item
* @param dtom
* @param isLanguageStrict
* @param textToAppend
* @param context DSpace Context
* @param item DSpace Item
* @param dtom metadata field
* @param isLanguageStrict if strict
* @param textToAppend text to append
* @throws IllegalArgumentException - When target metadata field is not found
* @throws SQLException if database error
*/
public static void appendMetadata(Item item, DtoMetadata dtom, boolean isLanguageStrict,
public static void appendMetadata(Context context, Item item, DtoMetadata dtom, boolean isLanguageStrict,
String textToAppend)
throws IllegalArgumentException
{
DCValue[] ar = null;
throws IllegalArgumentException, SQLException {
List<MetadataValue> ar = null;
// get all values for given element/qualifier
if (isLanguageStrict) // get all for given element/qualifier
{
ar = item.getMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language);
}
else
{
ar = item.getMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
if (isLanguageStrict) { // get all for given element/qualifier
ar = itemService.getMetadata(item, dtom.schema, dtom.element, dtom.qualifier, dtom.language);
} else {
ar = itemService.getMetadata(item, dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
}
if (ar.length == 0)
{
if (ar.size() == 0) {
throw new IllegalArgumentException("Metadata to append to not found");
}
int idx = 0; //index of field to change
if (ar.length > 1) //need to pick one, can't be sure it's the last one
{
if (ar.size() > 1) { //need to pick one, can't be sure it's the last one
// TODO maybe get highest id ?
}
//build new set minus the one to delete
List<String> vals = new ArrayList<String>();
for (int i=0; i < ar.length; i++)
{
if (i == idx)
{
vals.add(ar[i].value + textToAppend);
}
else
{
vals.add(ar[i].value);
for (int i = 0; i < ar.size(); i++) {
if (i == idx) {
vals.add(ar.get(i).getValue() + textToAppend);
} else {
vals.add(ar.get(i).getValue());
}
}
if (isLanguageStrict)
{
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language);
}
else
{
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
if (isLanguageStrict) {
itemService.clearMetadata(context, item, dtom.schema, dtom.element, dtom.qualifier, dtom.language);
} else {
itemService.clearMetadata(context, item, dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
}
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals.toArray(new String[vals.size()]));
itemService.addMetadata(context, item, dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals);
}
/**
* Modification of method from ItemImporter.loadDublinCore
* as a Factory method
*
* @param docBuilder -
* @param docBuilder DocumentBuilder
* @param is - InputStream of dublin_core.xml
* @return list of DtoMetadata representing the metadata fields relating to an Item
* @throws SQLException
* @throws IOException
* @throws ParserConfigurationException
* @throws SAXException
* @throws TransformerException
* @throws AuthorizeException
* @throws SQLException if database error
* @throws IOException if IO error
* @throws ParserConfigurationException if parser config error
* @throws SAXException if XML error
* @throws TransformerException if transformer error
* @throws AuthorizeException if authorization error
*/
public static List<DtoMetadata> loadDublinCore(DocumentBuilder docBuilder, InputStream is)
throws SQLException, IOException, ParserConfigurationException,
SAXException, TransformerException, AuthorizeException
{
SAXException, TransformerException, AuthorizeException {
Document document = docBuilder.parse(is);
List<DtoMetadata> dtomList = new ArrayList<DtoMetadata>();
@@ -206,55 +188,43 @@ public class MetadataUtilities {
String schema = null;
NodeList metadata = XPathAPI.selectNodeList(document, "/dublin_core");
Node schemaAttr = metadata.item(0).getAttributes().getNamedItem("schema");
if (schemaAttr == null)
{
if (schemaAttr == null) {
schema = MetadataSchema.DC_SCHEMA;
}
else
{
} else {
schema = schemaAttr.getNodeValue();
}
// Get the nodes corresponding to formats
NodeList dcNodes = XPathAPI.selectNodeList(document, "/dublin_core/dcvalue");
for (int i = 0; i < dcNodes.getLength(); i++)
{
for (int i = 0; i < dcNodes.getLength(); i++) {
Node n = dcNodes.item(i);
String value = getStringValue(n).trim();
// compensate for empty value getting read as "null", which won't display
if (value == null)
{
if (value == null) {
value = "";
}
String element = getAttributeValue(n, "element");
if (element != null)
{
if (element != null) {
element = element.trim();
}
String qualifier = getAttributeValue(n, "qualifier");
if (qualifier != null)
{
if (qualifier != null) {
qualifier = qualifier.trim();
}
String language = getAttributeValue(n, "language");
if (language != null)
{
if (language != null) {
language = language.trim();
}
if ("none".equals(qualifier) || "".equals(qualifier))
{
if ("none".equals(qualifier) || "".equals(qualifier)) {
qualifier = null;
}
// a goofy default, but consistent with DSpace treatment elsewhere
if (language == null)
{
if (language == null) {
language = "en";
}
else if ("".equals(language))
{
} else if ("".equals(language)) {
language = ConfigurationManager.getProperty("default.language");
}
@@ -268,39 +238,31 @@ public class MetadataUtilities {
/**
* Write dublin_core.xml
*
* @param docBuilder
* @param dtomList
* @param docBuilder DocumentBuilder
* @param dtomList List of metadata fields
* @return xml document
* @throws ParserConfigurationException
* @throws TransformerConfigurationException
* @throws TransformerException
* @throws ParserConfigurationException if parser config error
* @throws TransformerConfigurationException if transformer config error
* @throws TransformerException if transformer error
*/
public static Document writeDublinCore(DocumentBuilder docBuilder, List<DtoMetadata> dtomList)
throws ParserConfigurationException, TransformerConfigurationException, TransformerException
{
throws ParserConfigurationException, TransformerConfigurationException, TransformerException {
Document doc = docBuilder.newDocument();
Element root = doc.createElement("dublin_core");
doc.appendChild(root);
for (DtoMetadata dtom : dtomList)
{
for (DtoMetadata dtom : dtomList) {
Element mel = doc.createElement("dcvalue");
mel.setAttribute("element", dtom.element);
if (dtom.qualifier == null)
{
if (dtom.qualifier == null) {
mel.setAttribute("qualifier", "none");
}
else
{
} else {
mel.setAttribute("qualifier", dtom.qualifier);
}
if (StringUtils.isEmpty(dtom.language))
{
if (StringUtils.isEmpty(dtom.language)) {
mel.setAttribute("language", "en");
}
else
{
} else {
mel.setAttribute("language", dtom.language);
}
mel.setTextContent(dtom.value);
@@ -312,39 +274,37 @@ public class MetadataUtilities {
/**
* write xml document to output stream
* @param doc
* @param transformer
* @param out
* @throws IOException
* @throws TransformerException
*
* @param doc XML Document
* @param transformer XML Transformer
* @param out OutputStream
* @throws IOException if IO Error
* @throws TransformerException if Transformer error
*/
public static void writeDocument(Document doc, Transformer transformer, OutputStream out)
throws IOException, TransformerException
{
throws IOException, TransformerException {
Source src = new DOMSource(doc);
Result dest = new StreamResult(out);
transformer.transform(src, dest);
}
// XML utility methods
/**
* Lookup an attribute from a DOM node.
* @param n
* @param name
* @return
*
* @param n Node
* @param name name
* @return attribute value
*/
private static String getAttributeValue(Node n, String name)
{
private static String getAttributeValue(Node n, String name) {
NamedNodeMap nm = n.getAttributes();
for (int i = 0; i < nm.getLength(); i++)
{
for (int i = 0; i < nm.getLength(); i++) {
Node node = nm.item(i);
if (name.equals(node.getNodeName()))
{
if (name.equals(node.getNodeName())) {
return node.getNodeValue();
}
}
@@ -354,19 +314,17 @@ public class MetadataUtilities {
/**
* Return the String value of a Node.
* @param node
* @return
*
* @param node node
* @return string value
*/
private static String getStringValue(Node node)
{
private static String getStringValue(Node node) {
String value = node.getNodeValue();
if (node.hasChildNodes())
{
if (node.hasChildNodes()) {
Node first = node.getFirstChild();
if (first.getNodeType() == Node.TEXT_NODE)
{
if (first.getNodeType() == Node.TEXT_NODE) {
return first.getNodeValue();
}
}
@@ -375,44 +333,37 @@ public class MetadataUtilities {
}
/**
* rewrite of ItemImport's functionality
* but just the parsing of the file, not the processing of its elements
* Rewrite of ItemImport's functionality
* but just the parsing of the file, not the processing of its elements.
*
*
* @validate flag to verify matching files in tree
* @return
* @param f file
* @return list of ContentsEntry
* @throws FileNotFoundException if file doesn't exist
* @throws IOException if IO error
* @throws ParseException if parse error
*/
public static List<ContentsEntry> readContentsFile(File f)
throws FileNotFoundException, IOException, ParseException
{
throws FileNotFoundException, IOException, ParseException {
List<ContentsEntry> list = new ArrayList<ContentsEntry>();
BufferedReader in = null;
try
{
try {
in = new BufferedReader(new FileReader(f));
String line = null;
while ((line = in.readLine()) != null)
{
while ((line = in.readLine()) != null) {
line = line.trim();
if ("".equals(line))
{
if ("".equals(line)) {
continue;
}
ItemUpdate.pr("Contents entry: " + line);
list.add(ContentsEntry.parse(line));
}
}
finally
{
try
{
} finally {
try {
in.close();
}
catch(IOException e)
{
} catch (IOException e) {
//skip
}
}
@@ -421,52 +372,33 @@ public class MetadataUtilities {
}
/**
*
* @param f
* @return
* @throws FileNotFoundException
* @throws IOException
* @param f file
* @return list of lines as strings
* @throws FileNotFoundException if file doesn't exist
* @throws IOException if IO Error
*/
public static List<Integer> readDeleteContentsFile(File f)
throws FileNotFoundException, IOException
{
List<Integer> list = new ArrayList<Integer>();
public static List<String> readDeleteContentsFile(File f)
throws FileNotFoundException, IOException {
List<String> list = new ArrayList<>();
BufferedReader in = null;
try
{
try {
in = new BufferedReader(new FileReader(f));
String line = null;
while ((line = in.readLine()) != null)
{
while ((line = in.readLine()) != null) {
line = line.trim();
if ("".equals(line))
{
if ("".equals(line)) {
continue;
}
int n = 0;
try
{
n = Integer.parseInt(line);
list.add(n);
list.add(line);
}
catch(NumberFormatException e)
{
ItemUpdate.pr("Error reading delete contents line:" + e.toString());
}
}
}
finally
{
try
{
} finally {
try {
in.close();
}
catch(IOException e)
{
} catch (IOException e) {
//skip
}
}
@@ -475,54 +407,55 @@ public class MetadataUtilities {
}
/**
* Get display of DCValue
* Get display of Metadatum
*
* @param dcv
* @return string displaying elements of the DCValue
* @param dcv MetadataValue
* @return string displaying elements of the Metadatum
*/
public static String getDCValueString(DCValue dcv)
{
return "schema: " + dcv.schema + "; element: " + dcv.element + "; qualifier: " + dcv.qualifier +
"; language: " + dcv.language + "; value: " + dcv.value;
public static String getDCValueString(MetadataValue dcv) {
MetadataField metadataField = dcv.getMetadataField();
MetadataSchema metadataSchema = metadataField.getMetadataSchema();
return "schema: " + metadataSchema.getName() + "; element: " + metadataField
.getElement() + "; qualifier: " + metadataField.getQualifier() +
"; language: " + dcv.getLanguage() + "; value: " + dcv.getValue();
}
/**
* Return compound form of a metadata field (i.e. schema.element.qualifier)
*
* @param schema schema
* @param element element
* @param qualifier qualifier
* @return a String representation of the two- or three-part form of a metadata element
* e.g. dc.identifier.uri
*/
public static String getCompoundForm(String schema, String element, String qualifier)
{
public static String getCompoundForm(String schema, String element, String qualifier) {
StringBuilder sb = new StringBuilder();
sb.append(schema).append(".").append(element);
if (qualifier != null)
{
if (qualifier != null) {
sb.append(".").append(qualifier);
}
return sb.toString();
}
/**
* Parses metadata field given in the form <schema>.<element>[.<qualifier>|.*]
* Parses metadata field given in the form {@code <schema>.<element>[.<qualifier>|.*]}
* checks for correct number of elements (2 or 3) and for empty strings
*
* @param compoundForm compound form of metadata field
* @return String Array
* @throws ParseException if validity checks fail
*
*/
public static String[] parseCompoundForm(String compoundForm)
throws ParseException
{
throws ParseException {
String[] ar = compoundForm.split("\\s*\\.\\s*"); //trim ends
if ("".equals(ar[0]))
{
if ("".equals(ar[0])) {
throw new ParseException("schema is empty string: " + compoundForm, 0);
}
if ((ar.length < 2) || (ar.length > 3) || "".equals(ar[1]))
{
if ((ar.length < 2) || (ar.length > 3) || "".equals(ar[1])) {
throw new ParseException("element is malformed or empty string: " + compoundForm, 0);
}

View File

@@ -8,6 +8,7 @@
package org.dspace.app.itemupdate;
import java.sql.SQLException;
import java.util.List;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
@@ -17,36 +18,29 @@ import org.dspace.content.Bundle;
* Also delete all derivative bitstreams, i.e.
* all bitstreams in the TEXT and THUMBNAIL bundles
*/
public class OriginalBitstreamFilter extends BitstreamFilterByBundleName
{
public OriginalBitstreamFilter()
{
public class OriginalBitstreamFilter extends BitstreamFilterByBundleName {
public OriginalBitstreamFilter() {
//empty
}
/**
* Tests bitstreams for containment in an ORIGINAL bundle
*
* @param bitstream Bitstream
* @return true if the bitstream is in the ORIGINAL bundle
*
* @throws BitstreamFilterException
* @throws BitstreamFilterException if filter error
*/
@Override
public boolean accept(Bitstream bitstream)
throws BitstreamFilterException
{
try
{
Bundle[] bundles = bitstream.getBundles();
for (Bundle b : bundles)
{
if (b.getName().equals("ORIGINAL"))
{
throws BitstreamFilterException {
try {
List<Bundle> bundles = bitstream.getBundles();
for (Bundle bundle : bundles) {
if (bundle.getName().equals("ORIGINAL")) {
return true;
}
}
}
catch(SQLException e)
{
} catch (SQLException e) {
throw new BitstreamFilterException(e);
}
return false;

View File

@@ -8,6 +8,8 @@
package org.dspace.app.itemupdate;
import java.sql.SQLException;
import java.util.List;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
@@ -16,41 +18,33 @@ import org.dspace.content.Bundle;
* Also delete all derivative bitstreams, i.e.
* all bitstreams in the TEXT and THUMBNAIL bundles
*/
public class OriginalWithDerivativesBitstreamFilter extends BitstreamFilter
{
private String[] bundlesToEmpty = { "ORIGINAL", "TEXT", "THUMBNAIL" };
public class OriginalWithDerivativesBitstreamFilter extends BitstreamFilter {
protected String[] bundlesToEmpty = {"ORIGINAL", "TEXT", "THUMBNAIL"};
public OriginalWithDerivativesBitstreamFilter()
{
public OriginalWithDerivativesBitstreamFilter() {
//empty
}
/**
* Tests bitstream for membership in specified bundles (ORIGINAL, TEXT, THUMBNAIL)
*
* @param bitstream
* @throws BitstreamFilterException
* @param bitstream Bitstream
* @return true if bitstream is in specified bundles
* @throws BitstreamFilterException if error
*/
@Override
public boolean accept(Bitstream bitstream)
throws BitstreamFilterException
{
try
{
Bundle[] bundles = bitstream.getBundles();
for (Bundle b : bundles)
{
for (String bn : bundlesToEmpty)
{
if (b.getName().equals(bn))
{
throws BitstreamFilterException {
try {
List<Bundle> bundles = bitstream.getBundles();
for (Bundle b : bundles) {
for (String bn : bundlesToEmpty) {
if (b.getName().equals(bn)) {
return true;
}
}
}
}
catch(SQLException e)
{
} catch (SQLException e) {
throw new BitstreamFilterException(e);
}
return false;

View File

@@ -11,12 +11,10 @@ import java.util.Properties;
/**
* Bitstream filter targetting the THUMBNAIL bundle
*
*/
public class ThumbnailBitstreamFilter extends BitstreamFilterByBundleName {
public ThumbnailBitstreamFilter()
{
public ThumbnailBitstreamFilter() {
props = new Properties();
props.setProperty("bundle", "THUMBNAIL");
}

View File

@@ -7,22 +7,25 @@
*/
package org.dspace.app.itemupdate;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
import org.dspace.core.Context;
/**
* Interface for actions to update an item
*
*/
public interface UpdateAction
{
public interface UpdateAction {
public ItemService itemService = ContentServiceFactory.getInstance().getItemService();
/**
* Action to update item
*
* @param context
* @param itarch
* @param isTest
* @param suppressUndo
* @throws Exception
* @param context DSpace context
* @param itarch item archive
* @param isTest test flag
* @param suppressUndo undo flag
* @throws Exception if error
*/
public void execute(Context context, ItemArchive itarch, boolean isTest, boolean suppressUndo)
throws Exception;

View File

@@ -7,32 +7,36 @@
*/
package org.dspace.app.itemupdate;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.BitstreamService;
import org.dspace.content.service.BundleService;
/**
* Base class for Bitstream actions
*
*
*/
public abstract class UpdateBitstreamsAction implements UpdateAction {
protected boolean alterProvenance = true;
protected BundleService bundleService = ContentServiceFactory.getInstance().getBundleService();
protected BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();
/**
* Set variable to indicate that the dc.description.provenance field may
* be changed as a result of Bitstream changes by ItemUpdate
* @param alterProvenance
*
* @param alterProvenance whether to alter provenance
*/
public void setAlterProvenance(boolean alterProvenance)
{
public void setAlterProvenance(boolean alterProvenance) {
this.alterProvenance = alterProvenance;
}
/**
*
* @return boolean value to indicate whether the dc.description.provenance field may
* be changed as a result of Bitstream changes by ItemUpdate
*/
public boolean getAlterProvenance()
{
public boolean getAlterProvenance() {
return alterProvenance;
}

View File

@@ -13,12 +13,10 @@ import java.util.Set;
/**
* This abstract subclass for metadata actions
* maintains a collection for the target metadata fields
* expressed as a string in the compound notation ( <schema>.<element>.<qualifier> )
* expressed as a string in the compound notation ( {@code <schema>.<element>.<qualifier>} )
* on which to apply the action when the method execute is called.
*
* Implemented as a Set to avoid problems with duplicates
*
*
*/
public abstract class UpdateMetadataAction implements UpdateAction {
@@ -36,11 +34,10 @@ public abstract class UpdateMetadataAction implements UpdateAction {
/**
* Set target fields
*
* @param targetFields
* @param targetFields Set of target fields to update
*/
public void addTargetFields(Set<String> targetFields) {
for (String tf : targetFields)
{
for (String tf : targetFields) {
this.targetFields.add(tf);
}
@@ -48,11 +45,11 @@ public abstract class UpdateMetadataAction implements UpdateAction {
/**
* Add array of target fields to update
* @param targetFields
*
* @param targetFields array of target fields to update
*/
public void addTargetFields(String[] targetFields) {
for (String tf : targetFields)
{
for (String tf : targetFields) {
this.targetFields.add(tf);
}
@@ -61,7 +58,7 @@ public abstract class UpdateMetadataAction implements UpdateAction {
/**
* Add single field to update
*
* @param targetField
* @param targetField target field to update
*/
public void addTargetField(String targetField) {
this.targetFields.add(targetField);

View File

@@ -0,0 +1,104 @@
/**
* 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.launcher;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.List;
import org.jdom.Document;
/**
* @author mwood
*/
public class CommandRunner {
/**
* Default constructor
*/
private CommandRunner() { }
/**
* @param args the command line arguments given
* @throws IOException if IO error
* @throws FileNotFoundException if file doesn't exist
*/
public static void main(String[] args)
throws FileNotFoundException, IOException {
if (args.length > 0) {
runManyCommands(args[0]);
} else {
runManyCommands("-");
}
// There is no sensible way to use the status returned by runManyCommands().
// If called from the command line then we would want to return it
// through System.exit(). But if called (normally) from ScriptLauncher,
// there is no way to return it and we don't want to interrupt
// ScriptLauncher.
//
// "'tis a puzzlement." -- the King of Siam
}
/**
* Read a file of command lines and execute each in turn.
*
* @param script the file of command lines to be executed.
* @return status code
* @throws IOException if IO error
* @throws FileNotFoundException if file doesn't exist
*/
static int runManyCommands(String script)
throws FileNotFoundException, IOException {
Reader input;
if ("-".equals(script)) {
input = new InputStreamReader(System.in);
} else {
input = new FileReader(script);
}
StreamTokenizer tokenizer = new StreamTokenizer(input);
tokenizer.eolIsSignificant(true);
tokenizer.ordinaryChar('-');
tokenizer.wordChars('-', '-');
tokenizer.ordinaryChars('0', '9');
tokenizer.wordChars('0', '9');
tokenizer.ordinaryChar('.');
tokenizer.wordChars('.', '.');
tokenizer.ordinaryChar('@');
tokenizer.wordChars('@', '@');
int status = 0;
List<String> tokens = new ArrayList<String>();
Document commandConfigs = ScriptLauncher.getConfig();
while (StreamTokenizer.TT_EOF != tokenizer.nextToken()) {
if (StreamTokenizer.TT_EOL == tokenizer.ttype) {
if (tokens.size() > 0) {
status = ScriptLauncher.runOneCommand(commandConfigs, tokens.toArray(new String[tokens.size()]));
if (status > 0) {
break;
}
tokens.clear();
}
} else {
tokens.add(tokenizer.sval);
}
}
return status;
}
}

View File

@@ -7,15 +7,18 @@
*/
package org.dspace.app.launcher;
import org.dspace.core.ConfigurationManager;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.List;
import java.util.TreeMap;
import org.dspace.servicemanager.DSpaceKernelImpl;
import org.dspace.servicemanager.DSpaceKernelInit;
import org.dspace.services.RequestService;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
import java.util.List;
import java.lang.reflect.Method;
/**
* A DSpace script launcher.
@@ -23,89 +26,121 @@ import java.lang.reflect.Method;
* @author Stuart Lewis
* @author Mark Diggory
*/
public class ScriptLauncher
{
/** The service manager kernel */
public class ScriptLauncher {
/**
* The service manager kernel
*/
private static transient DSpaceKernelImpl kernelImpl;
/**
* Default constructor
*/
private ScriptLauncher() { }
/**
* Execute the DSpace script launcher
*
* @param args Any parameters required to be passed to the scripts it executes
* @throws IOException if IO error
* @throws FileNotFoundException if file doesn't exist
*/
public static void main(String[] args)
{
// Check that there is at least one argument
if (args.length < 1)
{
System.err.println("You must provide at least one command argument");
display();
System.exit(1);
}
throws FileNotFoundException, IOException {
// Initialise the service manager kernel
try {
kernelImpl = DSpaceKernelInit.getKernel(null);
if (!kernelImpl.isRunning())
{
kernelImpl.start(ConfigurationManager.getProperty("dspace.dir"));
if (!kernelImpl.isRunning()) {
kernelImpl.start();
}
} catch (Exception e)
{
} catch (Exception e) {
// Failed to start so destroy it and log and throw an exception
try
{
try {
kernelImpl.destroy();
}
catch (Exception e1)
{
} catch (Exception e1) {
// Nothing to do
}
String message = "Failure during filter init: " + e.getMessage();
System.err.println(message + ":" + e);
String message = "Failure during kernel init: " + e.getMessage();
System.err.println(message);
e.printStackTrace();
throw new IllegalStateException(message, e);
}
// Parse the configuration file looking for the command entered
Document doc = getConfig();
// Load up the ScriptLauncher's configuration
Document commandConfigs = getConfig();
// Check that there is at least one argument (if not display command options)
if (args.length < 1) {
System.err.println("You must provide at least one command argument");
display(commandConfigs);
System.exit(1);
}
// Look up command in the configuration, and execute.
int status;
status = runOneCommand(commandConfigs, args);
// Destroy the service kernel if it is still alive
if (kernelImpl != null) {
kernelImpl.destroy();
kernelImpl = null;
}
System.exit(status);
}
protected static int runOneCommand(Document commandConfigs, String[] args) {
return runOneCommand(commandConfigs, args, kernelImpl);
}
/**
* Recognize and execute a single command.
*
* @param commandConfigs Document
* @param args the command line arguments given
*/
public static int runOneCommand(Document commandConfigs, String[] args, DSpaceKernelImpl kernelImpl) {
String request = args[0];
Element root = doc.getRootElement();
Element root = commandConfigs.getRootElement();
List<Element> commands = root.getChildren("command");
for (Element command : commands)
{
if (request.equalsIgnoreCase(command.getChild("name").getValue()))
{
Element command = null;
for (Element candidate : commands) {
if (request.equalsIgnoreCase(candidate.getChild("name").getValue())) {
command = candidate;
break;
}
}
if (null == command) {
// The command wasn't found
System.err.println("Command not found: " + args[0]);
display(commandConfigs);
return 1;
}
// Run each step
List<Element> steps = command.getChildren("step");
for (Element step : steps)
{
for (Element step : steps) {
// Instantiate the class
Class target = null;
// Is it the special case 'dsrun' where the user provides the class name?
String className;
if ("dsrun".equals(request))
{
if (args.length < 2)
{
if ("dsrun".equals(request)) {
if (args.length < 2) {
System.err.println("Error in launcher.xml: Missing class name");
System.exit(1);
return 1;
}
className = args[1];
}
else {
} else {
className = step.getChild("class").getValue();
}
try
{
try {
target = Class.forName(className,
true,
Thread.currentThread().getContextClassLoader());
}
catch (ClassNotFoundException e)
{
} catch (ClassNotFoundException e) {
System.err.println("Error in launcher.xml: Invalid class name: " + className);
System.exit(1);
return 1;
}
// Strip the leading argument from the args, and add the arguments
@@ -114,26 +149,20 @@ public class ScriptLauncher
Class[] argTypes = {useargs.getClass()};
boolean passargs = true;
if ((step.getAttribute("passuserargs") != null) &&
("false".equalsIgnoreCase(step.getAttribute("passuserargs").getValue())))
{
("false".equalsIgnoreCase(step.getAttribute("passuserargs").getValue()))) {
passargs = false;
}
if ((args.length == 1) || (("dsrun".equals(request)) && (args.length == 2)) || (!passargs))
{
if ((args.length == 1) || (("dsrun".equals(request)) && (args.length == 2)) || (!passargs)) {
useargs = new String[0];
}
else
{
} else {
// The number of arguments to ignore
// If dsrun is the command, ignore the next, as it is the class name not an arg
int x = 1;
if ("dsrun".equals(request))
{
if ("dsrun".equals(request)) {
x = 2;
}
String[] argsnew = new String[useargs.length - x];
for (int i = x; i < useargs.length; i++)
{
for (int i = x; i < useargs.length; i++) {
argsnew[i - x] = useargs[i];
}
useargs = argsnew;
@@ -141,25 +170,24 @@ public class ScriptLauncher
// Add any extra properties
List<Element> bits = step.getChildren("argument");
if (step.getChild("argument") != null)
{
if (step.getChild("argument") != null) {
String[] argsnew = new String[useargs.length + bits.size()];
int i = 0;
for (Element arg : bits)
{
for (Element arg : bits) {
argsnew[i++] = arg.getValue();
}
for (; i < bits.size() + useargs.length; i++)
{
for (; i < bits.size() + useargs.length; i++) {
argsnew[i] = useargs[i - bits.size()];
}
useargs = argsnew;
}
// Establish the request service startup
RequestService requestService = kernelImpl.getServiceManager().getServiceByName(RequestService.class.getName(), RequestService.class);
RequestService requestService = kernelImpl.getServiceManager().getServiceByName(
RequestService.class.getName(), RequestService.class);
if (requestService == null) {
throw new IllegalStateException("Could not get the DSpace RequestService to start the request transaction");
throw new IllegalStateException(
"Could not get the DSpace RequestService to start the request transaction");
}
// Establish a request related to the current session
@@ -167,8 +195,7 @@ public class ScriptLauncher
requestService.startRequest();
// Run the main() method
try
{
try {
Object[] arguments = {useargs};
// Useful for debugging, so left in the code...
@@ -184,50 +211,20 @@ public class ScriptLauncher
// ensure we close out the request (happy request)
requestService.endRequest(null);
}
catch (Exception e)
{
} catch (Exception e) {
// Failure occurred in the request so we destroy it
requestService.endRequest(e);
if (kernelImpl != null)
{
kernelImpl.destroy();
kernelImpl = null;
}
// Exceptions from the script are reported as a 'cause'
Throwable cause = e.getCause();
System.err.println("Exception: " + cause.getMessage());
cause.printStackTrace();
System.exit(1);
return 1;
}
}
// Destroy the service kernel
if (kernelImpl != null)
{
kernelImpl.destroy();
kernelImpl = null;
}
// Everything completed OK
System.exit(0);
}
}
// Destroy the service kernel if it is still alive
if (kernelImpl != null)
{
kernelImpl.destroy();
kernelImpl = null;
}
// The command wasn't found
System.err.println("Command not found: " + args[0]);
display();
System.exit(1);
return 0;
}
/**
@@ -235,22 +232,23 @@ public class ScriptLauncher
*
* @return The XML configuration file Document
*/
private static Document getConfig()
{
protected static Document getConfig() {
return getConfig(kernelImpl);
}
public static Document getConfig(DSpaceKernelImpl kernelImpl) {
// Load the launcher configuration file
String config = ConfigurationManager.getProperty("dspace.dir") +
String config = kernelImpl.getConfigurationService().getProperty("dspace.dir") +
System.getProperty("file.separator") + "config" +
System.getProperty("file.separator") + "launcher.xml";
SAXBuilder saxBuilder = new SAXBuilder();
Document doc = null;
try
{
try {
doc = saxBuilder.build(config);
}
catch (Exception e)
{
} catch (Exception e) {
System.err.println("Unable to load the launcher configuration file: [dspace]/config/launcher.xml");
System.err.println(e.getMessage());
e.printStackTrace();
System.exit(1);
}
return doc;
@@ -258,14 +256,24 @@ public class ScriptLauncher
/**
* Display the commands that the current launcher config file knows about
*
* @param commandConfigs configs as Document
*/
private static void display()
{
Document doc = getConfig();
List<Element> commands = doc.getRootElement().getChildren("command");
private static void display(Document commandConfigs) {
// List all command elements
List<Element> commands = commandConfigs.getRootElement().getChildren("command");
// Sort the commands by name.
// We cannot just use commands.sort() because it tries to remove and
// reinsert Elements within other Elements, and that doesn't work.
TreeMap<String, Element> sortedCommands = new TreeMap<>();
for (Element command : commands) {
sortedCommands.put(command.getChild("name").getValue(), command);
}
// Display the sorted list
System.out.println("Usage: dspace [command-name] {parameters}");
for (Element command : commands)
{
for (Element command : sortedCommands.values()) {
System.out.println(" - " + command.getChild("name").getValue() +
": " + command.getChild("description").getValue());
}

View File

@@ -7,12 +7,12 @@
*/
package org.dspace.app.mediafilter;
import java.awt.image.BufferedImage;
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
/**
* Class to attach a footer to an image using ImageMagick.
@@ -20,8 +20,7 @@ import java.awt.Rectangle;
* This version of the code is basically Ninh's but reorganised a little. Used with permission.
*/
public class Brand
{
public class Brand {
private int brandWidth;
private int brandHeight;
private Font font;
@@ -34,13 +33,11 @@ public class Brand
* @param brandHeight height of the footer in pixels
* @param font font to use for text on the footer
* @param xOffset number of pixels text should be indented from left-hand side of footer
*
*/
public Brand(int brandWidth,
int brandHeight,
Font font,
int xOffset)
{
int xOffset) {
this.brandWidth = brandWidth;
this.brandHeight = brandHeight;
this.font = font;
@@ -55,46 +52,34 @@ public class Brand
* the image is resized such that brandLeftText will not fit. <code>null</code> if not
* required
* @param brandRightText text that should appear in the bottom right of the image
*
* @return BufferedImage a BufferedImage object describing the brand image file
*/
public BufferedImage create(String brandLeftText,
String shortLeftText,
String brandRightText)
{
String brandRightText) {
BrandText[] allBrandText = null;
BufferedImage brandImage =
new BufferedImage(brandWidth, brandHeight, BufferedImage.TYPE_INT_RGB);
if (brandWidth >= 350)
{
allBrandText = new BrandText[]
{
if (brandWidth >= 350) {
allBrandText = new BrandText[] {
new BrandText(BrandText.BL, brandLeftText),
new BrandText(BrandText.BR, brandRightText)
};
}
else if (brandWidth >= 190)
{
allBrandText = new BrandText[]
{
} else if (brandWidth >= 190) {
allBrandText = new BrandText[] {
new BrandText(BrandText.BL, shortLeftText),
new BrandText(BrandText.BR, brandRightText)
};
}
else
{
allBrandText = new BrandText[]
{
} else {
allBrandText = new BrandText[] {
new BrandText(BrandText.BR, brandRightText)
};
}
if (allBrandText != null && allBrandText.length > 0)
{
for (int i = 0; i < allBrandText.length; ++i)
{
if (allBrandText != null && allBrandText.length > 0) {
for (int i = 0; i < allBrandText.length; ++i) {
drawImage(brandImage, allBrandText[i]);
}
}
@@ -111,48 +96,37 @@ public class Brand
* position within the brand
*/
private void drawImage(BufferedImage brandImage,
BrandText brandText)
{
BrandText brandText) {
int imgWidth = brandImage.getWidth();
int imgHeight = brandImage.getHeight();
int bx, by, tx, ty, bWidth, bHeight;
Graphics2D g2 = brandImage.createGraphics();
g2.setFont(font);
FontMetrics fm = g2.getFontMetrics();
int bWidth = fm.stringWidth(brandText.getText()) + xOffset * 2 + 1;
int bHeight = fm.getHeight();
bWidth = fm.stringWidth(brandText.getText()) + xOffset * 2 + 1;
bHeight = fm.getHeight();
int bx = 0;
int by = 0;
if (brandText.getLocation().equals(BrandText.TL)) {
bx = 0;
by = 0;
if (brandText.getLocation().equals(BrandText.TL))
{
bx = 0;
by = 0;
}
else if (brandText.getLocation().equals(BrandText.TR))
{
} else if (brandText.getLocation().equals(BrandText.TR)) {
bx = imgWidth - bWidth;
by = 0;
}
else if (brandText.getLocation().equals(BrandText.BL))
{
} else if (brandText.getLocation().equals(BrandText.BL)) {
bx = 0;
by = imgHeight - bHeight;
}
else if (brandText.getLocation().equals(BrandText.BR))
{
} else if (brandText.getLocation().equals(BrandText.BR)) {
bx = imgWidth - bWidth;
by = imgHeight - bHeight;
}
Rectangle box = new Rectangle(bx, by, bWidth, bHeight);
tx = bx + xOffset;
ty = by + fm.getAscent();
int tx = bx + xOffset;
int ty = by + fm.getAscent();
g2.setColor(Color.black);
g2.fill(box);

View File

@@ -13,15 +13,22 @@ package org.dspace.app.mediafilter;
* This is a copy of Picture Australia's PiObj class re-organised with methods.
* Thanks to Ninh Nguyen at the National Library for providing the original source.
*/
class BrandText
{
/** Bottom Left */
class BrandText {
/**
* Bottom Left
*/
public static final String BL = "bl";
/** Bottom Right */
/**
* Bottom Right
*/
public static final String BR = "br";
/** Top Left */
/**
* Top Left
*/
public static final String TL = "tl";
/** Top Right */
/**
* Top Right
*/
public static final String TR = "tr";
private String location;
@@ -34,8 +41,7 @@ class BrandText
* @param location one of the class location constants e.g. <code>Identifier.BL</code>
* @param the text associated with the location
*/
public BrandText(String location, String text)
{
public BrandText(String location, String text) {
this.location = location;
this.text = text;
}
@@ -45,8 +51,7 @@ class BrandText
*
* @return String one the class location constants e.g. <code>Identifier.BL</code>
*/
public String getLocation()
{
public String getLocation() {
return location;
}
@@ -56,8 +61,7 @@ class BrandText
*
* @return String the text associated with the Identifier object
*/
public String getText()
{
public String getText() {
return text;
}
@@ -67,8 +71,7 @@ class BrandText
*
* @param location one of the class location constants
*/
public void setLocation(String location)
{
public void setLocation(String location) {
this.location = location;
}
@@ -78,8 +81,7 @@ class BrandText
*
* @param text any text string (typically a branding or identifier)
*/
public void setText(String text)
{
public void setText(String text) {
this.text = text;
}
}

View File

@@ -7,64 +7,61 @@
*/
package org.dspace.app.mediafilter;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.awt.Font;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import javax.imageio.ImageIO;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
/**
* Filter image bitstreams, scaling the image to be within the bounds of
* thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be
* no bigger than. Creates only JPEGs.
*
* @author Jason Sherman jsherman@usao.edu
*/
public class BrandedPreviewJPEGFilter extends MediaFilter
{
public String getFilteredName(String oldFilename)
{
public class BrandedPreviewJPEGFilter extends MediaFilter {
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".preview.jpg";
}
/**
* @return String bundle name
*
*/
public String getBundleName()
{
@Override
public String getBundleName() {
return "BRANDED_PREVIEW";
}
/**
* @return String bitstreamformat
*/
public String getFormatString()
{
@Override
public String getFormatString() {
return "JPEG";
}
/**
* @return String description
*/
public String getDescription()
{
@Override
public String getDescription() {
return "Generated Branded Preview";
}
/**
* @param source
* source input stream
*
* @param currentItem item
* @param source source input stream
* @param verbose verbose mode
* @return InputStream the resulting input stream
* @throws Exception if error
*/
public InputStream getDestinationStream(InputStream source)
throws Exception
{
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
// read in bitstream's image
BufferedImage buf = ImageIO.read(source);
@@ -73,89 +70,17 @@ public class BrandedPreviewJPEGFilter extends MediaFilter
.getIntProperty("webui.preview.maxwidth");
float ymax = (float) ConfigurationManager
.getIntProperty("webui.preview.maxheight");
boolean blurring = (boolean) ConfigurationManager
.getBooleanProperty("webui.preview.blurring");
boolean hqscaling = (boolean) ConfigurationManager
.getBooleanProperty("webui.preview.hqscaling");
int brandHeight = ConfigurationManager.getIntProperty("webui.preview.brand.height");
String brandFont = ConfigurationManager.getProperty("webui.preview.brand.font");
int brandFontPoint = ConfigurationManager.getIntProperty("webui.preview.brand.fontpoint");
// now get the image dimensions
float xsize = (float) buf.getWidth(null);
float ysize = (float) buf.getHeight(null);
// if verbose flag is set, print out dimensions
// to STDOUT
if (MediaFilterManager.isVerbose)
{
System.out.println("original size: " + xsize + "," + ysize);
}
// scale by x first if needed
if (xsize > xmax)
{
// calculate scaling factor so that xsize * scale = new size (max)
float scaleFactor = xmax / xsize;
// if verbose flag is set, print out extracted text
// to STDOUT
if (MediaFilterManager.isVerbose)
{
System.out.println("x scale factor: " + scaleFactor);
}
// now reduce x size
// and y size
xsize = xsize * scaleFactor;
ysize = ysize * scaleFactor;
// if verbose flag is set, print out extracted text
// to STDOUT
if (MediaFilterManager.isVerbose)
{
System.out.println("new size: " + xsize + "," + ysize);
}
}
// scale by y if needed
if (ysize > ymax)
{
float scaleFactor = ymax / ysize;
// now reduce x size
// and y size
xsize = xsize * scaleFactor;
ysize = ysize * scaleFactor;
}
// if verbose flag is set, print details to STDOUT
if (MediaFilterManager.isVerbose)
{
System.out.println("created thumbnail size: " + xsize + ", "
+ ysize);
}
// create an image buffer for the preview with the new xsize, ysize
// we add
BufferedImage branded = new BufferedImage((int) xsize, (int) ysize + brandHeight,
BufferedImage.TYPE_INT_RGB);
// now render the image into the preview buffer
Graphics2D g2d = branded.createGraphics();
g2d.drawImage(buf, 0, 0, (int) xsize, (int) ysize, null);
Brand brand = new Brand((int) xsize, brandHeight, new Font(brandFont, Font.PLAIN, brandFontPoint), 5);
BufferedImage brandImage = brand.create(ConfigurationManager.getProperty("webui.preview.brand"),
ConfigurationManager.getProperty("webui.preview.brand.abbrev"),
MediaFilterManager.getCurrentItem() == null ? "" : "hdl:" + MediaFilterManager.getCurrentItem().getHandle());
g2d.drawImage(brandImage, (int)0, (int)ysize, (int) xsize, (int) 20, null);
// now create an input stream for the thumbnail buffer and return it
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(branded, "jpeg", baos);
// now get the array
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
return bais; // hope this gets written out before its garbage collected!
JPEGFilter jpegFilter = new JPEGFilter();
return jpegFilter
.getThumbDim(currentItem, buf, verbose, xmax, ymax, blurring, hqscaling, brandHeight, brandFontPoint,
brandFont);
}
}

View File

@@ -0,0 +1,99 @@
/**
* 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.InputStream;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;
import org.apache.poi.POITextExtractor;
import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.hssf.extractor.ExcelExtractor;
import org.apache.poi.xssf.extractor.XSSFExcelExtractor;
import org.dspace.content.Item;
/*
* ExcelFilter
*
* Entries you must add to dspace.cfg:
*
* filter.plugins = blah, \
* Excel Text Extractor
*
* plugin.named.org.dspace.app.mediafilter.FormatFilter = \
* blah = blah, \
* org.dspace.app.mediafilter.ExcelFilter = Excel Text Extractor
*
* #Configure each filter's input Formats
* filter.org.dspace.app.mediafilter.ExcelFilter.inputFormats = Microsoft Excel, Microsoft Excel XML
*
*/
public class ExcelFilter extends MediaFilter {
private static Logger log = Logger.getLogger(ExcelFilter.class);
public String getFilteredName(String oldFilename) {
return oldFilename + ".txt";
}
/**
* @return String bundle name
*/
public String getBundleName() {
return "TEXT";
}
/**
* @return String bitstream format
*/
public String getFormatString() {
return "Text";
}
/**
* @return String description
*/
public String getDescription() {
return "Extracted text";
}
/**
* @param item 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 item, InputStream source, boolean verbose)
throws Exception {
String extractedText = null;
try {
POITextExtractor theExtractor = ExtractorFactory.createExtractor(source);
if (theExtractor instanceof ExcelExtractor) {
// for xls file
extractedText = (theExtractor).getText();
} else if (theExtractor instanceof XSSFExcelExtractor) {
// for xlsx file
extractedText = (theExtractor).getText();
}
} catch (Exception e) {
log.error("Error filtering bitstream: " + e.getMessage(), e);
throw e;
}
if (extractedText != null) {
// generate an input stream with the extracted text
return IOUtils.toInputStream(extractedText, StandardCharsets.UTF_8);
}
return null;
}
}

View File

@@ -18,13 +18,11 @@ import org.dspace.core.Context;
* from one format to another. This interface should be implemented by any class
* which defines a "filter" to be run by the MediaFilterManager.
*/
public interface FormatFilter
{
public interface FormatFilter {
/**
* Get a filename for a newly created filtered bitstream
*
* @param sourceName
* name of source bitstream
* @param sourceName name of source bitstream
* @return filename generated by the filter - for example, document.pdf
* becomes document.pdf.txt
*/
@@ -44,18 +42,21 @@ public interface FormatFilter
public String getFormatString();
/**
* @return string to describe the newly-generated Bitstream's - how it was
* @return string to describe the newly-generated Bitstream - how it was
* produced is a good idea
*/
public String getDescription();
/**
* @param source
* input stream
* Read the source stream and produce the filtered content.
*
* @return result of filter's transformation, written out to a bitstream
* @param item Item
* @param source input stream
* @param verbose verbosity flag
* @return result of filter's transformation as a byte stream.
* @throws Exception if error
*/
public InputStream getDestinationStream(InputStream source)
public InputStream getDestinationStream(Item item, InputStream source, boolean verbose)
throws Exception;
/**
@@ -66,18 +67,15 @@ public interface FormatFilter
* is necessary). Return false if bitstream should be skipped
* for any reason.
*
*
* @param c
* context
* @param item
* item containing bitstream to process
* @param source
* source bitstream to be processed
*
* @param c context
* @param item item containing bitstream to process
* @param source source bitstream to be processed
* @param verbose verbose mode
* @return true if bitstream processing should continue,
* false if this bitstream should be skipped
* @throws Exception if error
*/
public boolean preProcessBitstream(Context c, Item item, Bitstream source)
public boolean preProcessBitstream(Context c, Item item, Bitstream source, boolean verbose)
throws Exception;
/**
@@ -88,14 +86,11 @@ public interface FormatFilter
* is necessary). Return false if bitstream should be skipped
* for some reason.
*
*
* @param c
* context
* @param item
* item containing bitstream to process
* @param generatedBitstream
* the bitstream which was generated by
* @param c context
* @param item item containing bitstream to process
* @param generatedBitstream the bitstream which was generated by
* this filter.
* @throws Exception if error
*/
public void postProcessBitstream(Context c, Item item, Bitstream generatedBitstream)
throws Exception;

View File

@@ -9,58 +9,58 @@ package org.dspace.app.mediafilter;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import javax.swing.text.Document;
import javax.swing.text.html.HTMLEditorKit;
import org.dspace.content.Item;
/*
*
* to do: helpful error messages - can't find mediafilter.cfg - can't
* instantiate filter - bitstream format doesn't exist
*
*/
public class HTMLFilter extends MediaFilter
{
public class HTMLFilter extends MediaFilter {
public String getFilteredName(String oldFilename)
{
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".txt";
}
/**
* @return String bundle name
*
*/
public String getBundleName()
{
@Override
public String getBundleName() {
return "TEXT";
}
/**
* @return String bitstreamformat
*/
public String getFormatString()
{
@Override
public String getFormatString() {
return "Text";
}
/**
* @return String description
*/
public String getDescription()
{
@Override
public String getDescription() {
return "Extracted text";
}
/**
* @param source
* source input stream
*
* @param currentItem item
* @param source source input stream
* @param verbose verbose mode
* @return InputStream the resulting input stream
* @throws Exception if error
*/
public InputStream getDestinationStream(InputStream source)
throws Exception
{
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
// try and read the document - set to ignore character set directive,
// assuming that the input stream is already set properly (I hope)
HTMLEditorKit kit = new HTMLEditorKit();

View File

@@ -0,0 +1,52 @@
/**
* 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.File;
import java.io.InputStream;
import java.nio.file.Files;
import org.dspace.content.Item;
/**
* Filter image bitstreams, scaling the image to be within the bounds of
* thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be
* no bigger than. Creates only JPEGs.
*/
public class ImageMagickImageThumbnailFilter extends ImageMagickThumbnailFilter {
/**
* @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 {
File f = inputStreamToTempFile(source, "imthumb", ".tmp");
File f2 = null;
try {
f2 = getThumbnailFile(f, verbose);
byte[] bytes = Files.readAllBytes(f2.toPath());
return new ByteArrayInputStream(bytes);
} finally {
//noinspection ResultOfMethodCallIgnored
f.delete();
if (f2 != null) {
//noinspection ResultOfMethodCallIgnored
f2.delete();
}
}
}
}

View File

@@ -0,0 +1,43 @@
/**
* 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.File;
import java.io.InputStream;
import java.nio.file.Files;
import org.dspace.content.Item;
public class ImageMagickPdfThumbnailFilter extends ImageMagickThumbnailFilter {
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
File f = inputStreamToTempFile(source, "impdfthumb", ".pdf");
File f2 = null;
File f3 = null;
try {
f2 = getImageFile(f, 0, verbose);
f3 = getThumbnailFile(f2, verbose);
byte[] bytes = Files.readAllBytes(f3.toPath());
return new ByteArrayInputStream(bytes);
} finally {
//noinspection ResultOfMethodCallIgnored
f.delete();
if (f2 != null) {
//noinspection ResultOfMethodCallIgnored
f2.delete();
}
if (f3 != null) {
//noinspection ResultOfMethodCallIgnored
f3.delete();
}
}
}
}

View File

@@ -0,0 +1,202 @@
/**
* 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.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
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.im4java.core.ConvertCmd;
import org.im4java.core.IM4JavaException;
import org.im4java.core.IMOperation;
import org.im4java.core.Info;
import org.im4java.process.ProcessStarter;
/**
* Filter image bitstreams, scaling the image to be within the bounds of
* thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be
* no bigger than. Creates only JPEGs.
*/
public abstract class ImageMagickThumbnailFilter extends MediaFilter {
protected static int width = 180;
protected static int height = 120;
private static boolean flatten = true;
static String bitstreamDescription = "IM Thumbnail";
static final String defaultPattern = "Generated Thumbnail";
static Pattern replaceRegex = Pattern.compile(defaultPattern);
protected final ItemService itemService = ContentServiceFactory.getInstance().getItemService();
static String cmyk_profile;
static String srgb_profile;
static {
String pre = ImageMagickThumbnailFilter.class.getName();
String s = ConfigurationManager.getProperty(pre + ".ProcessStarter");
ProcessStarter.setGlobalSearchPath(s);
width = ConfigurationManager.getIntProperty("thumbnail.maxwidth", width);
height = ConfigurationManager.getIntProperty("thumbnail.maxheight", height);
flatten = ConfigurationManager.getBooleanProperty(pre + ".flatten", flatten);
String description = ConfigurationManager.getProperty(pre + ".bitstreamDescription");
cmyk_profile = ConfigurationManager.getProperty(pre + ".cmyk_profile");
srgb_profile = ConfigurationManager.getProperty(pre + ".srgb_profile");
if (description != null) {
bitstreamDescription = description;
}
try {
String patt = ConfigurationManager.getProperty(pre + ".replaceRegex");
replaceRegex = Pattern.compile(patt == null ? defaultPattern : patt);
} catch (PatternSyntaxException e) {
System.err.println("Invalid thumbnail replacement pattern: " + e.getMessage());
}
}
public ImageMagickThumbnailFilter() {
}
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".jpg";
}
/**
* @return String bundle name
*/
@Override
public String getBundleName() {
return "THUMBNAIL";
}
/**
* @return String bitstreamformat
*/
@Override
public String getFormatString() {
return "JPEG";
}
/**
* @return String bitstreamDescription
*/
@Override
public String getDescription() {
return bitstreamDescription;
}
public File inputStreamToTempFile(InputStream source, String prefix, String suffix) throws IOException {
File f = File.createTempFile(prefix, suffix);
f.deleteOnExit();
FileOutputStream fos = new FileOutputStream(f);
byte[] buffer = new byte[1024];
int len = source.read(buffer);
while (len != -1) {
fos.write(buffer, 0, len);
len = source.read(buffer);
}
fos.close();
return f;
}
public File getThumbnailFile(File f, boolean verbose)
throws IOException, InterruptedException, IM4JavaException {
File f2 = new File(f.getParentFile(), f.getName() + ".jpg");
f2.deleteOnExit();
ConvertCmd cmd = new ConvertCmd();
IMOperation op = new IMOperation();
op.autoOrient();
op.addImage(f.getAbsolutePath());
op.thumbnail(width, height);
op.addImage(f2.getAbsolutePath());
if (verbose) {
System.out.println("IM Thumbnail Param: " + op);
}
cmd.run(op);
return f2;
}
public File getImageFile(File f, int page, boolean verbose)
throws IOException, InterruptedException, IM4JavaException {
File f2 = new File(f.getParentFile(), f.getName() + ".jpg");
f2.deleteOnExit();
ConvertCmd cmd = new ConvertCmd();
IMOperation op = new IMOperation();
String s = "[" + page + "]";
op.addImage(f.getAbsolutePath() + s);
if (flatten) {
op.flatten();
}
// 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);
String imageClass = imageInfo.getImageClass();
if (imageClass.contains("CMYK")) {
op.profile(cmyk_profile);
op.profile(srgb_profile);
}
}
op.addImage(f2.getAbsolutePath());
if (verbose) {
System.out.println("IM Image Param: " + op);
}
cmd.run(op);
return f2;
}
@Override
public boolean preProcessBitstream(Context c, Item item, Bitstream source, boolean verbose) throws Exception {
String nsrc = source.getName();
for (Bundle b : itemService.getBundles(item, "THUMBNAIL")) {
for (Bitstream bit : b.getBitstreams()) {
String n = bit.getName();
if (n != null) {
if (nsrc != null) {
if (!n.startsWith(nsrc)) {
continue;
}
}
}
String description = bit.getDescription();
// If anything other than a generated thumbnail
// is found, halt processing
if (description != null) {
if (replaceRegex.matcher(description).matches()) {
if (verbose) {
System.out.println(description + " " + nsrc
+ " matches pattern and is replacable.");
}
continue;
}
if (description.equals(bitstreamDescription)) {
if (verbose) {
System.out.println(bitstreamDescription + " " + nsrc
+ " is replacable.");
}
continue;
}
}
System.out.println("Custom Thumbnail exists for " + nsrc + " for item "
+ item.getHandle() + ". Thumbnail will not be generated. ");
return false;
}
}
return true; // assume that the thumbnail is a custom one
}
}

View File

@@ -7,92 +7,113 @@
*/
package org.dspace.app.mediafilter;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.awt.image.ConvolveOp;
import java.awt.image.Kernel;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import javax.imageio.ImageIO;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
/**
* Filter image bitstreams, scaling the image to be within the bounds of
* thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be
* no bigger than. Creates only JPEGs.
*
* @author Jason Sherman jsherman@usao.edu
*/
public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats
{
public String getFilteredName(String oldFilename)
{
public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats {
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".jpg";
}
/**
* @return String bundle name
*
*/
public String getBundleName()
{
@Override
public String getBundleName() {
return "THUMBNAIL";
}
/**
* @return String bitstreamformat
*/
public String getFormatString()
{
@Override
public String getFormatString() {
return "JPEG";
}
/**
* @return String description
*/
public String getDescription()
{
@Override
public String getDescription() {
return "Generated Thumbnail";
}
/**
* @param source
* source input stream
*
* @param currentItem item
* @param source source input stream
* @param verbose verbose mode
* @return InputStream the resulting input stream
* @throws Exception if error
*/
public InputStream getDestinationStream(InputStream source)
throws Exception
{
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
// read in bitstream's image
BufferedImage buf = ImageIO.read(source);
return getThumb(currentItem, buf, verbose);
}
public InputStream getThumb(Item currentItem, BufferedImage buf, boolean verbose)
throws Exception {
// get config params
float xmax = (float) ConfigurationManager
.getIntProperty("thumbnail.maxwidth");
float ymax = (float) ConfigurationManager
.getIntProperty("thumbnail.maxheight");
boolean blurring = (boolean) ConfigurationManager
.getBooleanProperty("thumbnail.blurring");
boolean hqscaling = (boolean) ConfigurationManager
.getBooleanProperty("thumbnail.hqscaling");
return getThumbDim(currentItem, buf, verbose, xmax, ymax, blurring, hqscaling, 0, 0, null);
}
public InputStream getThumbDim(Item currentItem, BufferedImage buf, boolean verbose, float xmax, float ymax,
boolean blurring, boolean hqscaling, int brandHeight, int brandFontPoint,
String brandFont)
throws Exception {
// now get the image dimensions
float xsize = (float) buf.getWidth(null);
float ysize = (float) buf.getHeight(null);
// if verbose flag is set, print out dimensions
// to STDOUT
if (MediaFilterManager.isVerbose)
{
if (verbose) {
System.out.println("original size: " + xsize + "," + ysize);
}
// scale by x first if needed
if (xsize > xmax)
{
if (xsize > xmax) {
// calculate scaling factor so that xsize * scale = new size (max)
float scale_factor = xmax / xsize;
// if verbose flag is set, print out extracted text
// to STDOUT
if (MediaFilterManager.isVerbose)
{
if (verbose) {
System.out.println("x scale factor: " + scale_factor);
}
@@ -103,15 +124,13 @@ public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats
// if verbose flag is set, print out extracted text
// to STDOUT
if (MediaFilterManager.isVerbose)
{
System.out.println("new size: " + xsize + "," + ysize);
if (verbose) {
System.out.println("size after fitting to maximum width: " + xsize + "," + ysize);
}
}
// scale by y if needed
if (ysize > ymax)
{
if (ysize > ymax) {
float scale_factor = ymax / ysize;
// now reduce x size
@@ -121,9 +140,8 @@ public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats
}
// if verbose flag is set, print details to STDOUT
if (MediaFilterManager.isVerbose)
{
System.out.println("created thumbnail size: " + xsize + ", "
if (verbose) {
System.out.println("size after fitting to maximum height: " + xsize + ", "
+ ysize);
}
@@ -131,10 +149,34 @@ public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats
BufferedImage thumbnail = new BufferedImage((int) xsize, (int) ysize,
BufferedImage.TYPE_INT_RGB);
// Use blurring if selected in config.
// a little blur before scaling does wonders for keeping moire in check.
if (blurring) {
// send the buffered image off to get blurred.
buf = getBlurredInstance((BufferedImage) buf);
}
// Use high quality scaling method if selected in config.
// this has a definite performance penalty.
if (hqscaling) {
// send the buffered image off to get an HQ downscale.
buf = getScaledInstance((BufferedImage) buf, (int) xsize, (int) ysize,
(Object) RenderingHints.VALUE_INTERPOLATION_BICUBIC, (boolean) true);
}
// now render the image into the thumbnail buffer
Graphics2D g2d = thumbnail.createGraphics();
g2d.drawImage(buf, 0, 0, (int) xsize, (int) ysize, null);
if (brandHeight != 0) {
Brand brand = new Brand((int) xsize, brandHeight, new Font(brandFont, Font.PLAIN, brandFontPoint), 5);
BufferedImage brandImage = brand.create(ConfigurationManager.getProperty("webui.preview.brand"),
ConfigurationManager.getProperty("webui.preview.brand.abbrev"),
currentItem == null ? "" : "hdl:" + currentItem.getHandle());
g2d.drawImage(brandImage, (int) 0, (int) ysize, (int) xsize, (int) 20, null);
}
// now create an input stream for the thumbnail buffer and return it
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -147,20 +189,127 @@ public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats
}
public String[] getInputMIMETypes()
{
@Override
public String[] getInputMIMETypes() {
return ImageIO.getReaderMIMETypes();
}
public String[] getInputDescriptions()
{
@Override
public String[] getInputDescriptions() {
return null;
}
public String[] getInputExtensions()
{
@Override
public String[] getInputExtensions() {
// Temporarily disabled as JDK 1.6 only
// return ImageIO.getReaderFileSuffixes();
return null;
}
public BufferedImage getNormalizedInstance(BufferedImage buf) {
int type = (buf.getTransparency() == Transparency.OPAQUE) ?
BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB_PRE;
int w = buf.getWidth();
int h = buf.getHeight();
BufferedImage normal = new BufferedImage(w, h, type);
Graphics2D g2d = normal.createGraphics();
g2d.drawImage(buf, 0, 0, w, h, Color.WHITE, null);
g2d.dispose();
return normal;
}
/**
* Convenience method that returns a blurred instance of the
* provided {@code BufferedImage}.
*
* @param buf buffered image
* @return updated BufferedImage
*/
public BufferedImage getBlurredInstance(BufferedImage buf) {
buf = getNormalizedInstance(buf);
// kernel for blur op
float[] matrix = {
0.111f, 0.111f, 0.111f,
0.111f, 0.111f, 0.111f,
0.111f, 0.111f, 0.111f,
};
// perform the blur and return the blurred version.
BufferedImageOp blur = new ConvolveOp(new Kernel(3, 3, matrix));
BufferedImage blurbuf = blur.filter(buf, null);
return blurbuf;
}
/**
* Convenience method that returns a scaled instance of the
* provided {@code BufferedImage}.
*
* @param buf the original image to be scaled
* @param targetWidth the desired width of the scaled instance,
* in pixels
* @param targetHeight the desired height of the scaled instance,
* in pixels
* @param hint one of the rendering hints that corresponds to
* {@code RenderingHints.KEY_INTERPOLATION} (e.g.
* {@code RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR},
* {@code RenderingHints.VALUE_INTERPOLATION_BILINEAR},
* {@code RenderingHints.VALUE_INTERPOLATION_BICUBIC})
* @param higherQuality if true, this method will use a multi-step
* scaling technique that provides higher quality than the usual
* one-step technique (only useful in downscaling cases, where
* {@code targetWidth} or {@code targetHeight} is
* smaller than the original dimensions, and generally only when
* the {@code BILINEAR} hint is specified)
* @return a scaled version of the original {@code BufferedImage}
*/
public BufferedImage getScaledInstance(BufferedImage buf,
int targetWidth,
int targetHeight,
Object hint,
boolean higherQuality) {
int type = (buf.getTransparency() == Transparency.OPAQUE) ?
BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB;
BufferedImage scalebuf = (BufferedImage) buf;
int w;
int h;
if (higherQuality) {
// Use multi-step technique: start with original size, then
// scale down in multiple passes with drawImage()
// until the target size is reached
w = buf.getWidth();
h = buf.getHeight();
} else {
// Use one-step technique: scale directly from original
// size to target size with a single drawImage() call
w = targetWidth;
h = targetHeight;
}
do {
if (higherQuality && w > targetWidth) {
w /= 2;
if (w < targetWidth) {
w = targetWidth;
}
}
if (higherQuality && h > targetHeight) {
h /= 2;
if (h < targetHeight) {
h = targetHeight;
}
}
BufferedImage tmp = new BufferedImage(w, h, type);
Graphics2D g2d = tmp.createGraphics();
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);
g2d.drawImage(scalebuf, 0, 0, w, h, Color.WHITE, null);
g2d.dispose();
scalebuf = tmp;
} while (w != targetWidth || h != targetHeight);
return scalebuf;
}
}

View File

@@ -18,8 +18,7 @@ import org.dspace.core.Context;
* by the MediaFilterManager. More complex filters should likely implement the FormatFilter
* interface directly, so that they can define their own pre/postProcessing methods.
*/
public abstract class MediaFilter implements FormatFilter
{
public abstract class MediaFilter implements FormatFilter {
/**
* Perform any pre-processing of the source bitstream *before* the actual
* filtering takes place in MediaFilterManager.processBitstream().
@@ -28,20 +27,17 @@ public abstract class MediaFilter implements FormatFilter
* is necessary). Return false if bitstream should be skipped
* for any reason.
*
*
* @param c
* context
* @param item
* item containing bitstream to process
* @param source
* source bitstream to be processed
*
* @param c context
* @param item item containing bitstream to process
* @param source source bitstream to be processed
* @param verbose verbose mode
* @return true if bitstream processing should continue,
* false if this bitstream should be skipped
* @throws Exception if error
*/
public boolean preProcessBitstream(Context c, Item item, Bitstream source)
throws Exception
{
@Override
public boolean preProcessBitstream(Context c, Item item, Bitstream source, boolean verbose)
throws Exception {
return true; //default to no pre-processing
}
@@ -53,18 +49,15 @@ public abstract class MediaFilter implements FormatFilter
* is necessary). Return false if bitstream should be skipped
* for some reason.
*
*
* @param c
* context
* @param item
* item containing bitstream to process
* @param generatedBitstream
* the bitstream which was generated by
* @param c context
* @param item item containing bitstream to process
* @param generatedBitstream the bitstream which was generated by
* this filter.
* @throws Exception if error
*/
@Override
public void postProcessBitstream(Context c, Item item, Bitstream generatedBitstream)
throws Exception
{
throws Exception {
//default to no post-processing necessary
}
}

View File

@@ -0,0 +1,325 @@
/**
* 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.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.MissingArgumentException;
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.dspace.app.mediafilter.factory.MediaFilterServiceFactory;
import org.dspace.app.mediafilter.service.MediaFilterService;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.core.SelfNamedPlugin;
import org.dspace.core.factory.CoreServiceFactory;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.services.factory.DSpaceServicesFactory;
/**
* MediaFilterManager is the class that invokes the media/format filters over the
* repository's content. A few command line flags affect the operation of the
* MFM: -v verbose outputs all extracted text to STDOUT; -f force forces all
* bitstreams to be processed, even if they have been before; -n noindex does not
* recreate index after processing bitstreams; -i [identifier] limits processing
* scope to a community, collection or item; and -m [max] limits processing to a
* maximum number of items.
*/
public class MediaFilterCLITool {
//key (in dspace.cfg) which lists all enabled filters by name
private static final String MEDIA_FILTER_PLUGINS_KEY = "filter.plugins";
//prefix (in dspace.cfg) for all filter properties
private static final String FILTER_PREFIX = "filter";
//suffix (in dspace.cfg) for input formats supported by each filter
private static final String INPUT_FORMATS_SUFFIX = "inputFormats";
/**
* Default constructor
*/
private MediaFilterCLITool() { }
public static void main(String[] argv) throws Exception {
// set headless for non-gui workstations
System.setProperty("java.awt.headless", "true");
// create an options object and populate it
CommandLineParser parser = new PosixParser();
int status = 0;
Options options = new Options();
options.addOption("v", "verbose", false,
"print all extracted text and other details to STDOUT");
options.addOption("q", "quiet", false,
"do not print anything except in the event of errors.");
options.addOption("f", "force", false,
"force all bitstreams to be processed");
options.addOption("i", "identifier", true,
"ONLY process bitstreams belonging to identifier");
options.addOption("m", "maximum", true,
"process no more than maximum items");
options.addOption("h", "help", false, "help");
//create a "plugin" option (to specify specific MediaFilter plugins to run)
OptionBuilder.withLongOpt("plugins");
OptionBuilder.withValueSeparator(',');
OptionBuilder.withDescription(
"ONLY run the specified Media Filter plugin(s)\n" +
"listed from '" + MEDIA_FILTER_PLUGINS_KEY + "' in dspace.cfg.\n" +
"Separate multiple with a comma (,)\n" +
"(e.g. MediaFilterManager -p \n\"Word Text Extractor\",\"PDF Text Extractor\")");
Option pluginOption = OptionBuilder.create('p');
pluginOption.setArgs(Option.UNLIMITED_VALUES); //unlimited number of args
options.addOption(pluginOption);
//create a "skip" option (to specify communities/collections/items to skip)
OptionBuilder.withLongOpt("skip");
OptionBuilder.withValueSeparator(',');
OptionBuilder.withDescription(
"SKIP the bitstreams belonging to identifier\n" +
"Separate multiple identifiers with a comma (,)\n" +
"(e.g. MediaFilterManager -s \n 123456789/34,123456789/323)");
Option skipOption = OptionBuilder.create('s');
skipOption.setArgs(Option.UNLIMITED_VALUES); //unlimited number of args
options.addOption(skipOption);
boolean isVerbose = false;
boolean isQuiet = false;
boolean isForce = false; // default to not forced
String identifier = null; // object scope limiter
int max2Process = Integer.MAX_VALUE;
Map<String, List<String>> filterFormats = new HashMap<>();
CommandLine line = null;
try {
line = parser.parse(options, argv);
} catch (MissingArgumentException e) {
System.out.println("ERROR: " + e.getMessage());
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MediaFilterManager\n", options);
System.exit(1);
}
if (line.hasOption('h')) {
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MediaFilterManager\n", options);
System.exit(0);
}
if (line.hasOption('v')) {
isVerbose = true;
}
isQuiet = line.hasOption('q');
if (line.hasOption('f')) {
isForce = true;
}
if (line.hasOption('i')) {
identifier = line.getOptionValue('i');
}
if (line.hasOption('m')) {
max2Process = Integer.parseInt(line.getOptionValue('m'));
if (max2Process <= 1) {
System.out.println("Invalid maximum value '" +
line.getOptionValue('m') + "' - ignoring");
max2Process = Integer.MAX_VALUE;
}
}
String filterNames[] = null;
if (line.hasOption('p')) {
//specified which media filter plugins we are using
filterNames = line.getOptionValues('p');
if (filterNames == null || filterNames.length == 0) { //display error, since no plugins specified
System.err.println("\nERROR: -p (-plugin) option requires at least one plugin to be specified.\n" +
"(e.g. MediaFilterManager -p \"Word Text Extractor\",\"PDF Text Extractor\")\n");
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MediaFilterManager\n", options);
System.exit(1);
}
} else {
//retrieve list of all enabled media filter plugins!
filterNames = DSpaceServicesFactory.getInstance().getConfigurationService()
.getArrayProperty(MEDIA_FILTER_PLUGINS_KEY);
}
MediaFilterService mediaFilterService = MediaFilterServiceFactory.getInstance().getMediaFilterService();
mediaFilterService.setForce(isForce);
mediaFilterService.setQuiet(isQuiet);
mediaFilterService.setVerbose(isVerbose);
mediaFilterService.setMax2Process(max2Process);
//initialize an array of our enabled filters
List<FormatFilter> filterList = new ArrayList<FormatFilter>();
//set up each filter
for (int i = 0; i < filterNames.length; i++) {
//get filter of this name & add to list of filters
FormatFilter filter = (FormatFilter) CoreServiceFactory.getInstance().getPluginService()
.getNamedPlugin(FormatFilter.class, filterNames[i]);
if (filter == null) {
System.err.println(
"\nERROR: Unknown MediaFilter specified (either from command-line or in dspace.cfg): '" +
filterNames[i] + "'");
System.exit(1);
} else {
filterList.add(filter);
String filterClassName = filter.getClass().getName();
String pluginName = null;
//If this filter is a SelfNamedPlugin,
//then the input formats it accepts may differ for
//each "named" plugin that it defines.
//So, we have to look for every key that fits the
//following format: filter.<class-name>.<plugin-name>.inputFormats
if (SelfNamedPlugin.class.isAssignableFrom(filter.getClass())) {
//Get the plugin instance name for this class
pluginName = ((SelfNamedPlugin) filter).getPluginInstanceName();
}
//Retrieve our list of supported formats from dspace.cfg
//For SelfNamedPlugins, format of key is:
// filter.<class-name>.<plugin-name>.inputFormats
//For other MediaFilters, format of key is:
// filter.<class-name>.inputFormats
String[] formats =
DSpaceServicesFactory.getInstance().getConfigurationService().getArrayProperty(
FILTER_PREFIX + "." + filterClassName +
(pluginName != null ? "." + pluginName : "") +
"." + INPUT_FORMATS_SUFFIX);
//add to internal map of filters to supported formats
if (ArrayUtils.isNotEmpty(formats)) {
//For SelfNamedPlugins, map key is:
// <class-name><separator><plugin-name>
//For other MediaFilters, map key is just:
// <class-name>
filterFormats.put(filterClassName +
(pluginName != null ? MediaFilterService.FILTER_PLUGIN_SEPARATOR +
pluginName : ""),
Arrays.asList(formats));
}
} //end if filter!=null
} //end for
//If verbose, print out loaded mediafilter info
if (isVerbose) {
System.out.println("The following MediaFilters are enabled: ");
Iterator<String> i = filterFormats.keySet().iterator();
while (i.hasNext()) {
String filterName = i.next();
System.out.println("Full Filter Name: " + filterName);
String pluginName = null;
if (filterName.contains(MediaFilterService.FILTER_PLUGIN_SEPARATOR)) {
String[] fields = filterName.split(MediaFilterService.FILTER_PLUGIN_SEPARATOR);
filterName = fields[0];
pluginName = fields[1];
}
System.out.println(filterName +
(pluginName != null ? " (Plugin: " + pluginName + ")" : ""));
}
}
mediaFilterService.setFilterFormats(filterFormats);
//store our filter list into an internal array
mediaFilterService.setFilterClasses(filterList);
//Retrieve list of identifiers to skip (if any)
String skipIds[] = null;
if (line.hasOption('s')) {
//specified which identifiers to skip when processing
skipIds = line.getOptionValues('s');
if (skipIds == null || skipIds.length == 0) { //display error, since no identifiers specified to skip
System.err.println("\nERROR: -s (-skip) option requires at least one identifier to SKIP.\n" +
"Make sure to separate multiple identifiers with a comma!\n" +
"(e.g. MediaFilterManager -s 123456789/34,123456789/323)\n");
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MediaFilterManager\n", options);
System.exit(0);
}
//save to a global skip list
mediaFilterService.setSkipList(Arrays.asList(skipIds));
}
Context c = null;
try {
c = new Context();
// have to be super-user to do the filtering
c.turnOffAuthorisationSystem();
// now apply the filters
if (identifier == null) {
mediaFilterService.applyFiltersAllItems(c);
} else {
// restrict application scope to identifier
DSpaceObject dso = HandleServiceFactory.getInstance().getHandleService().resolveToObject(c, identifier);
if (dso == null) {
throw new IllegalArgumentException("Cannot resolve "
+ identifier + " to a DSpace object");
}
switch (dso.getType()) {
case Constants.COMMUNITY:
mediaFilterService.applyFiltersCommunity(c, (Community) dso);
break;
case Constants.COLLECTION:
mediaFilterService.applyFiltersCollection(c, (Collection) dso);
break;
case Constants.ITEM:
mediaFilterService.applyFiltersItem(c, (Item) dso);
break;
default:
break;
}
}
c.complete();
c = null;
} catch (Exception e) {
status = 1;
} finally {
if (c != null) {
c.abort();
}
}
System.exit(status);
}
}

View File

@@ -1,838 +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.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.List;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.MissingArgumentException;
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.dspace.authorize.AuthorizeManager;
import org.dspace.content.Bitstream;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.Bundle;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DCDate;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.ItemIterator;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.core.PluginManager;
import org.dspace.core.SelfNamedPlugin;
import org.dspace.handle.HandleManager;
import org.dspace.search.DSIndexer;
/**
* MediaFilterManager is the class that invokes the media/format filters over the
* repository's content. A few command line flags affect the operation of the
* MFM: -v verbose outputs all extracted text to STDOUT; -f force forces all
* bitstreams to be processed, even if they have been before; -n noindex does not
* recreate index after processing bitstreams; -i [identifier] limits processing
* scope to a community, collection or item; and -m [max] limits processing to a
* maximum number of items.
*/
public class MediaFilterManager
{
//key (in dspace.cfg) which lists all enabled filters by name
public static final String MEDIA_FILTER_PLUGINS_KEY = "filter.plugins";
//prefix (in dspace.cfg) for all filter properties
public static final String FILTER_PREFIX = "filter";
//suffix (in dspace.cfg) for input formats supported by each filter
public static final String INPUT_FORMATS_SUFFIX = "inputFormats";
static boolean updateIndex = true; // default to updating index
static boolean isVerbose = false; // default to not verbose
static boolean isQuiet = false; // default is noisy
static boolean isForce = false; // default to not forced
static String identifier = null; // object scope limiter
static int max2Process = Integer.MAX_VALUE; // maximum number items to process
static int processed = 0; // number items processed
private static Item currentItem = null; // current item being processed
private static FormatFilter[] filterClasses = null;
private static Map<String, List<String>> filterFormats = new HashMap<String, List<String>>();
private static List<String> skipList = null; //list of identifiers to skip during processing
//separator in filterFormats Map between a filter class name and a plugin name,
//for MediaFilters which extend SelfNamedPlugin (\034 is "file separator" char)
public static final String FILTER_PLUGIN_SEPARATOR = "\034";
public static void main(String[] argv) throws Exception
{
// set headless for non-gui workstations
System.setProperty("java.awt.headless", "true");
// create an options object and populate it
CommandLineParser parser = new PosixParser();
int status = 0;
Options options = new Options();
options.addOption("v", "verbose", false,
"print all extracted text and other details to STDOUT");
options.addOption("q", "quiet", false,
"do not print anything except in the event of errors.");
options.addOption("f", "force", false,
"force all bitstreams to be processed");
options.addOption("n", "noindex", false,
"do NOT update the search index after filtering bitstreams");
options.addOption("i", "identifier", true,
"ONLY process bitstreams belonging to identifier");
options.addOption("m", "maximum", true,
"process no more than maximum items");
options.addOption("h", "help", false, "help");
//create a "plugin" option (to specify specific MediaFilter plugins to run)
OptionBuilder.withLongOpt("plugins");
OptionBuilder.withValueSeparator(',');
OptionBuilder.withDescription(
"ONLY run the specified Media Filter plugin(s)\n" +
"listed from '" + MEDIA_FILTER_PLUGINS_KEY + "' in dspace.cfg.\n" +
"Separate multiple with a comma (,)\n" +
"(e.g. MediaFilterManager -p \n\"Word Text Extractor\",\"PDF Text Extractor\")");
Option pluginOption = OptionBuilder.create('p');
pluginOption.setArgs(Option.UNLIMITED_VALUES); //unlimited number of args
options.addOption(pluginOption);
//create a "skip" option (to specify communities/collections/items to skip)
OptionBuilder.withLongOpt("skip");
OptionBuilder.withValueSeparator(',');
OptionBuilder.withDescription(
"SKIP the bitstreams belonging to identifier\n" +
"Separate multiple identifiers with a comma (,)\n" +
"(e.g. MediaFilterManager -s \n 123456789/34,123456789/323)");
Option skipOption = OptionBuilder.create('s');
skipOption.setArgs(Option.UNLIMITED_VALUES); //unlimited number of args
options.addOption(skipOption);
CommandLine line = null;
try
{
line = parser.parse(options, argv);
}
catch(MissingArgumentException e)
{
System.out.println("ERROR: " + e.getMessage());
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MediaFilterManager\n", options);
System.exit(1);
}
if (line.hasOption('h'))
{
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MediaFilterManager\n", options);
System.exit(0);
}
if (line.hasOption('v'))
{
isVerbose = true;
}
isQuiet = line.hasOption('q');
if (line.hasOption('n'))
{
updateIndex = false;
}
if (line.hasOption('f'))
{
isForce = true;
}
if (line.hasOption('i'))
{
identifier = line.getOptionValue('i');
}
if (line.hasOption('m'))
{
max2Process = Integer.parseInt(line.getOptionValue('m'));
if (max2Process <= 1)
{
System.out.println("Invalid maximum value '" +
line.getOptionValue('m') + "' - ignoring");
max2Process = Integer.MAX_VALUE;
}
}
String filterNames[] = null;
if(line.hasOption('p'))
{
//specified which media filter plugins we are using
filterNames = line.getOptionValues('p');
if(filterNames==null || filterNames.length==0)
{ //display error, since no plugins specified
System.err.println("\nERROR: -p (-plugin) option requires at least one plugin to be specified.\n" +
"(e.g. MediaFilterManager -p \"Word Text Extractor\",\"PDF Text Extractor\")\n");
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MediaFilterManager\n", options);
System.exit(1);
}
}
else
{
//retrieve list of all enabled media filter plugins!
String enabledPlugins = ConfigurationManager.getProperty(MEDIA_FILTER_PLUGINS_KEY);
filterNames = enabledPlugins.split(",\\s*");
}
//initialize an array of our enabled filters
List<FormatFilter> filterList = new ArrayList<FormatFilter>();
//set up each filter
for(int i=0; i< filterNames.length; i++)
{
//get filter of this name & add to list of filters
FormatFilter filter = (FormatFilter) PluginManager.getNamedPlugin(FormatFilter.class, filterNames[i]);
if(filter==null)
{
System.err.println("\nERROR: Unknown MediaFilter specified (either from command-line or in dspace.cfg): '" + filterNames[i] + "'");
System.exit(1);
}
else
{
filterList.add(filter);
String filterClassName = filter.getClass().getName();
String pluginName = null;
//If this filter is a SelfNamedPlugin,
//then the input formats it accepts may differ for
//each "named" plugin that it defines.
//So, we have to look for every key that fits the
//following format: filter.<class-name>.<plugin-name>.inputFormats
if( SelfNamedPlugin.class.isAssignableFrom(filter.getClass()) )
{
//Get the plugin instance name for this class
pluginName = ((SelfNamedPlugin) filter).getPluginInstanceName();
}
//Retrieve our list of supported formats from dspace.cfg
//For SelfNamedPlugins, format of key is:
// filter.<class-name>.<plugin-name>.inputFormats
//For other MediaFilters, format of key is:
// filter.<class-name>.inputFormats
String formats = ConfigurationManager.getProperty(
FILTER_PREFIX + "." + filterClassName +
(pluginName!=null ? "." + pluginName : "") +
"." + INPUT_FORMATS_SUFFIX);
//add to internal map of filters to supported formats
if (formats != null)
{
//For SelfNamedPlugins, map key is:
// <class-name><separator><plugin-name>
//For other MediaFilters, map key is just:
// <class-name>
filterFormats.put(filterClassName +
(pluginName!=null ? FILTER_PLUGIN_SEPARATOR + pluginName : ""),
Arrays.asList(formats.split(",[\\s]*")));
}
}//end if filter!=null
}//end for
//If verbose, print out loaded mediafilter info
if(isVerbose)
{
System.out.println("The following MediaFilters are enabled: ");
Iterator<String> i = filterFormats.keySet().iterator();
while(i.hasNext())
{
String filterName = i.next();
System.out.println("Full Filter Name: " + filterName);
String pluginName = null;
if(filterName.contains(FILTER_PLUGIN_SEPARATOR))
{
String[] fields = filterName.split(FILTER_PLUGIN_SEPARATOR);
filterName=fields[0];
pluginName=fields[1];
}
System.out.println(filterName +
(pluginName!=null? " (Plugin: " + pluginName + ")": ""));
}
}
//store our filter list into an internal array
filterClasses = (FormatFilter[]) filterList.toArray(new FormatFilter[filterList.size()]);
//Retrieve list of identifiers to skip (if any)
String skipIds[] = null;
if(line.hasOption('s'))
{
//specified which identifiers to skip when processing
skipIds = line.getOptionValues('s');
if(skipIds==null || skipIds.length==0)
{ //display error, since no identifiers specified to skip
System.err.println("\nERROR: -s (-skip) option requires at least one identifier to SKIP.\n" +
"Make sure to separate multiple identifiers with a comma!\n" +
"(e.g. MediaFilterManager -s 123456789/34,123456789/323)\n");
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MediaFilterManager\n", options);
System.exit(0);
}
//save to a global skip list
skipList = Arrays.asList(skipIds);
}
Context c = null;
try
{
c = new Context();
// have to be super-user to do the filtering
c.turnOffAuthorisationSystem();
// now apply the filters
if (identifier == null)
{
applyFiltersAllItems(c);
}
else // restrict application scope to identifier
{
DSpaceObject dso = HandleManager.resolveToObject(c, identifier);
if (dso == null)
{
throw new IllegalArgumentException("Cannot resolve "
+ identifier + " to a DSpace object");
}
switch (dso.getType())
{
case Constants.COMMUNITY:
applyFiltersCommunity(c, (Community)dso);
break;
case Constants.COLLECTION:
applyFiltersCollection(c, (Collection)dso);
break;
case Constants.ITEM:
applyFiltersItem(c, (Item)dso);
break;
}
}
// update search index?
if (updateIndex)
{
if (!isQuiet)
{
System.out.println("Updating search index:");
}
DSIndexer.setBatchProcessingMode(true);
try
{
DSIndexer.updateIndex(c);
}
finally
{
DSIndexer.setBatchProcessingMode(false);
}
}
c.complete();
c = null;
}
catch (Exception e)
{
status = 1;
}
finally
{
if (c != null)
{
c.abort();
}
}
System.exit(status);
}
public static void applyFiltersAllItems(Context c) throws Exception
{
if(skipList!=null)
{
//if a skip-list exists, we need to filter community-by-community
//so we can respect what is in the skip-list
Community[] topLevelCommunities = Community.findAllTop(c);
for(int i=0; i<topLevelCommunities.length; i++)
{
applyFiltersCommunity(c, topLevelCommunities[i]);
}
}
else
{
//otherwise, just find every item and process
ItemIterator i = Item.findAll(c);
try
{
while (i.hasNext() && processed < max2Process)
{
applyFiltersItem(c, i.next());
}
}
finally
{
if (i != null)
{
i.close();
}
}
}
}
public static void applyFiltersCommunity(Context c, Community community)
throws Exception
{ //only apply filters if community not in skip-list
if(!inSkipList(community.getHandle()))
{
Community[] subcommunities = community.getSubcommunities();
for (int i = 0; i < subcommunities.length; i++)
{
applyFiltersCommunity(c, subcommunities[i]);
}
Collection[] collections = community.getCollections();
for (int j = 0; j < collections.length; j++)
{
applyFiltersCollection(c, collections[j]);
}
}
}
public static void applyFiltersCollection(Context c, Collection collection)
throws Exception
{
//only apply filters if collection not in skip-list
if(!inSkipList(collection.getHandle()))
{
ItemIterator i = collection.getItems();
try
{
while (i.hasNext() && processed < max2Process)
{
applyFiltersItem(c, i.next());
}
}
finally
{
if (i != null)
{
i.close();
}
}
}
}
public static void applyFiltersItem(Context c, Item item) throws Exception
{
//only apply filters if item not in skip-list
if(!inSkipList(item.getHandle()))
{
//cache this item in MediaFilterManager
//so it can be accessed by MediaFilters as necessary
currentItem = item;
if (filterItem(c, item))
{
// commit changes after each filtered item
c.commit();
// increment processed count
++processed;
}
// clear item objects from context cache and internal cache
item.decache();
currentItem = null;
}
}
/**
* Iterate through the item's bitstreams in the ORIGINAL bundle, applying
* filters if possible.
*
* @return true if any bitstreams processed,
* false if none
*/
public static boolean filterItem(Context c, Item myItem) throws Exception
{
// get 'original' bundles
Bundle[] myBundles = myItem.getBundles("ORIGINAL");
boolean done = false;
for (int i = 0; i < myBundles.length; i++)
{
// now look at all of the bitstreams
Bitstream[] myBitstreams = myBundles[i].getBitstreams();
for (int k = 0; k < myBitstreams.length; k++)
{
done |= filterBitstream(c, myItem, myBitstreams[k]);
}
}
return done;
}
/**
* Attempt to filter a bitstream.
*
* An exception will be thrown if the media filter class cannot be
* instantiated. Exceptions from filtering will be logged to STDOUT and
* swallowed.
*
* @return true if bitstream processed,
* false if no applicable filter or already processed
*/
public static boolean filterBitstream(Context c, Item myItem,
Bitstream myBitstream) throws Exception
{
boolean filtered = false;
// iterate through filter classes. A single format may be actioned
// by more than one filter
for (int i = 0; i < filterClasses.length; i++)
{
//List fmts = (List)filterFormats.get(filterClasses[i].getClass().getName());
String pluginName = null;
//if this filter class is a SelfNamedPlugin,
//its list of supported formats is different for
//differently named "plugin"
if( SelfNamedPlugin.class.isAssignableFrom(filterClasses[i].getClass()) )
{
//get plugin instance name for this media filter
pluginName = ((SelfNamedPlugin)filterClasses[i]).getPluginInstanceName();
}
//Get list of supported formats for the filter (and possibly named plugin)
//For SelfNamedPlugins, map key is:
// <class-name><separator><plugin-name>
//For other MediaFilters, map key is just:
// <class-name>
List<String> fmts = filterFormats.get(filterClasses[i].getClass().getName() +
(pluginName!=null ? FILTER_PLUGIN_SEPARATOR + pluginName : ""));
if (fmts.contains(myBitstream.getFormat().getShortDescription()))
{
try
{
// only update item if bitstream not skipped
if (processBitstream(c, myItem, myBitstream, filterClasses[i]))
{
myItem.update(); // Make sure new bitstream has a sequence
// number
filtered = true;
}
}
catch (Exception e)
{
String handle = myItem.getHandle();
Bundle[] bundles = myBitstream.getBundles();
long size = myBitstream.getSize();
String checksum = myBitstream.getChecksum() + " ("+myBitstream.getChecksumAlgorithm()+")";
int assetstore = myBitstream.getStoreNumber();
// Printout helpful information to find the errored bitstream.
System.out.println("ERROR filtering, skipping bitstream:\n");
System.out.println("\tItem Handle: "+ handle);
for (Bundle bundle : bundles)
{
System.out.println("\tBundle Name: " + bundle.getName());
}
System.out.println("\tFile Size: " + size);
System.out.println("\tChecksum: " + checksum);
System.out.println("\tAsset Store: " + assetstore);
System.out.println(e);
e.printStackTrace();
}
}
else if (filterClasses[i] instanceof SelfRegisterInputFormats)
{
// Filter implements self registration, so check to see if it should be applied
// given the formats it claims to support
SelfRegisterInputFormats srif = (SelfRegisterInputFormats)filterClasses[i];
boolean applyFilter = false;
// Check MIME type
String[] mimeTypes = srif.getInputMIMETypes();
if (mimeTypes != null)
{
for (String mimeType : mimeTypes)
{
if (mimeType.equalsIgnoreCase(myBitstream.getFormat().getMIMEType()))
{
applyFilter = true;
}
}
}
// Check description
if (!applyFilter)
{
String[] descriptions = srif.getInputDescriptions();
if (descriptions != null)
{
for (String desc : descriptions)
{
if (desc.equalsIgnoreCase(myBitstream.getFormat().getShortDescription()))
{
applyFilter = true;
}
}
}
}
// Check extensions
if (!applyFilter)
{
String[] extensions = srif.getInputExtensions();
if (extensions != null)
{
for (String ext : extensions)
{
String[] formatExtensions = myBitstream.getFormat().getExtensions();
if (formatExtensions != null && ArrayUtils.contains(formatExtensions, ext))
{
applyFilter = true;
}
}
}
}
// Filter claims to handle this type of file, so attempt to apply it
if (applyFilter)
{
try
{
// only update item if bitstream not skipped
if (processBitstream(c, myItem, myBitstream, filterClasses[i]))
{
myItem.update(); // Make sure new bitstream has a sequence
// number
filtered = true;
}
}
catch (Exception e)
{
System.out.println("ERROR filtering, skipping bitstream #"
+ myBitstream.getID() + " " + e);
e.printStackTrace();
}
}
}
}
return filtered;
}
/**
* A utility class that calls the virtual methods
* from the current MediaFilter class.
* It scans the bitstreams in an item, and decides if a bitstream has
* already been filtered, and if not or if overWrite is set, invokes the
* filter.
*
* @param c
* context
* @param item
* item containing bitstream to process
* @param source
* source bitstream to process
* @param formatFilter
* FormatFilter to perform filtering
*
* @return true if new rendition is created, false if rendition already
* exists and overWrite is not set
*/
public static boolean processBitstream(Context c, Item item, Bitstream source, FormatFilter formatFilter)
throws Exception
{
//do pre-processing of this bitstream, and if it fails, skip this bitstream!
if(!formatFilter.preProcessBitstream(c, item, source))
{
return false;
}
boolean overWrite = MediaFilterManager.isForce;
// 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
Bundle[] bundles = item.getBundles(formatFilter.getBundleName());
// check if destination bitstream exists
if (bundles.length > 0)
{
// only finds the last match (FIXME?)
for (int i = 0; i < bundles.length; i++)
{
Bitstream[] bitstreams = bundles[i].getBitstreams();
for (int j = 0; j < bitstreams.length; j++)
{
if (bitstreams[j].getName().equals(newName))
{
targetBundle = bundles[i];
existingBitstream = bitstreams[j];
}
}
}
}
// if exists and overwrite = false, exit
if (!overWrite && (existingBitstream != null))
{
if (!isQuiet)
{
System.out.println("SKIPPED: bitstream " + source.getID()
+ " (item: " + item.getHandle() + ") because '" + newName + "' already exists");
}
return false;
}
InputStream destStream = formatFilter.getDestinationStream(source.retrieve());
if (destStream == null)
{
if (!isQuiet)
{
System.out.println("SKIPPED: bitstream " + source.getID()
+ " (item: " + item.getHandle() + ") because filtering was unsuccessful");
}
return false;
}
// create new bundle if needed
if (bundles.length < 1)
{
targetBundle = item.createBundle(formatFilter.getBundleName());
}
else
{
// take the first match
targetBundle = bundles[0];
}
Bitstream b = targetBundle.createBitstream(destStream);
// Now set the format and name of the bitstream
b.setName(newName);
b.setSource("Written by FormatFilter " + formatFilter.getClass().getName() +
" on " + DCDate.getCurrent() + " (GMT).");
b.setDescription(formatFilter.getDescription());
// Find the proper format
BitstreamFormat bf = BitstreamFormat.findByShortDescription(c,
formatFilter.getFormatString());
b.setFormat(bf);
b.update();
//Inherit policies from the source bitstream
//(first remove any existing policies)
AuthorizeManager.removeAllPolicies(c, b);
AuthorizeManager.inheritPolicies(c, source, b);
// fixme - set date?
// we are overwriting, so remove old bitstream
if (existingBitstream != null)
{
targetBundle.removeBitstream(existingBitstream);
}
if (!isQuiet)
{
System.out.println("FILTERED: bitstream " + source.getID()
+ " (item: " + item.getHandle() + ") and created '" + newName + "'");
}
//do post-processing of the generated bitstream
formatFilter.postProcessBitstream(c, item, b);
return true;
}
/**
* Return the item that is currently being processed/filtered
* by the MediaFilterManager.
* <p>
* This allows FormatFilters to retrieve the Item object
* in case they need access to item-level information for their format
* transformations/conversions.
*
* @return current Item being processed by MediaFilterManager
*/
public static Item getCurrentItem()
{
return currentItem;
}
/**
* Check whether or not to skip processing the given identifier.
*
* @param identifier
* identifier (handle) of a community, collection or item
*
* @return true if this community, collection or item should be skipped
* during processing. Otherwise, return false.
*/
public static boolean inSkipList(String identifier)
{
if(skipList!=null && skipList.contains(identifier))
{
if (!isQuiet)
{
System.out.println("SKIP-LIST: skipped bitstreams within identifier " + identifier);
}
return true;
}
else
{
return false;
}
}
}

View File

@@ -0,0 +1,469 @@
/**
* 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.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.dspace.app.mediafilter.service.MediaFilterService;
import org.dspace.authorize.service.AuthorizeService;
import org.dspace.content.Bitstream;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.Bundle;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DCDate;
import org.dspace.content.Item;
import org.dspace.content.service.BitstreamFormatService;
import org.dspace.content.service.BitstreamService;
import org.dspace.content.service.BundleService;
import org.dspace.content.service.CollectionService;
import org.dspace.content.service.CommunityService;
import org.dspace.content.service.ItemService;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.core.SelfNamedPlugin;
import org.dspace.eperson.Group;
import org.dspace.eperson.service.GroupService;
import org.dspace.services.ConfigurationService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
/**
* MediaFilterManager is the class that invokes the media/format filters over the
* repository's content. A few command line flags affect the operation of the
* MFM: -v verbose outputs all extracted text to STDOUT; -f force forces all
* bitstreams to be processed, even if they have been before; -n noindex does not
* recreate index after processing bitstreams; -i [identifier] limits processing
* scope to a community, collection or item; and -m [max] limits processing to a
* maximum number of items.
*/
public class MediaFilterServiceImpl implements MediaFilterService, InitializingBean {
@Autowired(required = true)
protected AuthorizeService authorizeService;
@Autowired(required = true)
protected BitstreamFormatService bitstreamFormatService;
@Autowired(required = true)
protected BitstreamService bitstreamService;
@Autowired(required = true)
protected BundleService bundleService;
@Autowired(required = true)
protected CollectionService collectionService;
@Autowired(required = true)
protected CommunityService communityService;
@Autowired(required = true)
protected GroupService groupService;
@Autowired(required = true)
protected ItemService itemService;
@Autowired(required = true)
protected ConfigurationService configurationService;
protected int max2Process = Integer.MAX_VALUE; // maximum number items to process
protected int processed = 0; // number items processed
protected Item currentItem = null; // current item being processed
protected List<FormatFilter> filterClasses = null;
protected Map<String, List<String>> filterFormats = new HashMap<>();
protected List<String> skipList = null; //list of identifiers to skip during processing
protected final List<String> publicFiltersClasses = new ArrayList<>();
protected boolean isVerbose = false;
protected boolean isQuiet = false;
protected boolean isForce = false; // default to not forced
protected MediaFilterServiceImpl() {
}
@Override
public void afterPropertiesSet() throws Exception {
String[] publicPermissionFilters = configurationService
.getArrayProperty("filter.org.dspace.app.mediafilter.publicPermission");
if (publicPermissionFilters != null) {
for (String filter : publicPermissionFilters) {
publicFiltersClasses.add(filter.trim());
}
}
}
@Override
public void applyFiltersAllItems(Context context) throws Exception {
if (skipList != null) {
//if a skip-list exists, we need to filter community-by-community
//so we can respect what is in the skip-list
List<Community> topLevelCommunities = communityService.findAllTop(context);
for (Community topLevelCommunity : topLevelCommunities) {
applyFiltersCommunity(context, topLevelCommunity);
}
} else {
//otherwise, just find every item and process
Iterator<Item> itemIterator = itemService.findAll(context);
while (itemIterator.hasNext() && processed < max2Process) {
applyFiltersItem(context, itemIterator.next());
}
}
}
@Override
public void applyFiltersCommunity(Context context, Community community)
throws Exception { //only apply filters if community not in skip-list
if (!inSkipList(community.getHandle())) {
List<Community> subcommunities = community.getSubcommunities();
for (Community subcommunity : subcommunities) {
applyFiltersCommunity(context, subcommunity);
}
List<Collection> collections = community.getCollections();
for (Collection collection : collections) {
applyFiltersCollection(context, collection);
}
}
}
@Override
public void applyFiltersCollection(Context context, Collection collection)
throws Exception {
//only apply filters if collection not in skip-list
if (!inSkipList(collection.getHandle())) {
Iterator<Item> itemIterator = itemService.findAllByCollection(context, collection);
while (itemIterator.hasNext() && processed < max2Process) {
applyFiltersItem(context, itemIterator.next());
}
}
}
@Override
public void applyFiltersItem(Context c, Item item) throws Exception {
//only apply filters if item not in skip-list
if (!inSkipList(item.getHandle())) {
//cache this item in MediaFilterManager
//so it can be accessed by MediaFilters as necessary
currentItem = item;
if (filterItem(c, item)) {
// increment processed count
++processed;
}
// clear item objects from context cache and internal cache
c.uncacheEntity(currentItem);
currentItem = null;
}
}
@Override
public boolean filterItem(Context context, Item myItem) throws Exception {
// get 'original' bundles
List<Bundle> myBundles = itemService.getBundles(myItem, "ORIGINAL");
boolean done = false;
for (Bundle myBundle : myBundles) {
// now look at all of the bitstreams
List<Bitstream> myBitstreams = myBundle.getBitstreams();
for (Bitstream myBitstream : myBitstreams) {
done |= filterBitstream(context, myItem, myBitstream);
}
}
return done;
}
@Override
public boolean filterBitstream(Context context, Item myItem,
Bitstream myBitstream) throws Exception {
boolean filtered = false;
// iterate through filter classes. A single format may be actioned
// by more than one filter
for (FormatFilter filterClass : filterClasses) {
//List fmts = (List)filterFormats.get(filterClasses[i].getClass().getName());
String pluginName = null;
//if this filter class is a SelfNamedPlugin,
//its list of supported formats is different for
//differently named "plugin"
if (SelfNamedPlugin.class.isAssignableFrom(filterClass.getClass())) {
//get plugin instance name for this media filter
pluginName = ((SelfNamedPlugin) filterClass).getPluginInstanceName();
}
//Get list of supported formats for the filter (and possibly named plugin)
//For SelfNamedPlugins, map key is:
// <class-name><separator><plugin-name>
//For other MediaFilters, map key is just:
// <class-name>
List<String> fmts = filterFormats.get(filterClass.getClass().getName() +
(pluginName != null ? FILTER_PLUGIN_SEPARATOR + pluginName : ""));
if (fmts.contains(myBitstream.getFormat(context).getShortDescription())) {
try {
// only update item if bitstream not skipped
if (processBitstream(context, myItem, myBitstream, filterClass)) {
itemService.update(context, myItem); // Make sure new bitstream has a sequence
// number
filtered = true;
}
} catch (Exception e) {
String handle = myItem.getHandle();
List<Bundle> bundles = myBitstream.getBundles();
long size = myBitstream.getSize();
String checksum = myBitstream.getChecksum() + " (" + myBitstream.getChecksumAlgorithm() + ")";
int assetstore = myBitstream.getStoreNumber();
// Printout helpful information to find the errored bitstream.
System.out.println("ERROR filtering, skipping bitstream:\n");
System.out.println("\tItem Handle: " + handle);
for (Bundle bundle : bundles) {
System.out.println("\tBundle Name: " + bundle.getName());
}
System.out.println("\tFile Size: " + size);
System.out.println("\tChecksum: " + checksum);
System.out.println("\tAsset Store: " + assetstore);
System.out.println(e);
e.printStackTrace();
}
} else if (filterClass instanceof SelfRegisterInputFormats) {
// Filter implements self registration, so check to see if it should be applied
// given the formats it claims to support
SelfRegisterInputFormats srif = (SelfRegisterInputFormats) filterClass;
boolean applyFilter = false;
// Check MIME type
String[] mimeTypes = srif.getInputMIMETypes();
if (mimeTypes != null) {
for (String mimeType : mimeTypes) {
if (mimeType.equalsIgnoreCase(myBitstream.getFormat(context).getMIMEType())) {
applyFilter = true;
}
}
}
// Check description
if (!applyFilter) {
String[] descriptions = srif.getInputDescriptions();
if (descriptions != null) {
for (String desc : descriptions) {
if (desc.equalsIgnoreCase(myBitstream.getFormat(context).getShortDescription())) {
applyFilter = true;
}
}
}
}
// Check extensions
if (!applyFilter) {
String[] extensions = srif.getInputExtensions();
if (extensions != null) {
for (String ext : extensions) {
List<String> formatExtensions = myBitstream.getFormat(context).getExtensions();
if (formatExtensions != null && formatExtensions.contains(ext)) {
applyFilter = true;
}
}
}
}
// Filter claims to handle this type of file, so attempt to apply it
if (applyFilter) {
try {
// only update item if bitstream not skipped
if (processBitstream(context, myItem, myBitstream, filterClass)) {
itemService.update(context, myItem); // Make sure new bitstream has a sequence
// number
filtered = true;
}
} catch (Exception e) {
System.out.println("ERROR filtering, skipping bitstream #"
+ myBitstream.getID() + " " + e);
e.printStackTrace();
}
}
}
}
return filtered;
}
@Override
public boolean processBitstream(Context context, Item item, Bitstream source, FormatFilter formatFilter)
throws Exception {
//do pre-processing of this bitstream, and if it fails, skip this bitstream!
if (!formatFilter.preProcessBitstream(context, item, source, isVerbose)) {
return false;
}
boolean overWrite = isForce;
// 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
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) {
List<Bitstream> bitstreams = bundle.getBitstreams();
for (Bitstream bitstream : bitstreams) {
if (bitstream.getName().trim().equals(newName.trim())) {
targetBundle = bundle;
existingBitstream = bitstream;
}
}
}
}
// if exists and overwrite = false, exit
if (!overWrite && (existingBitstream != null)) {
if (!isQuiet) {
System.out.println("SKIPPED: bitstream " + source.getID()
+ " (item: " + item.getHandle() + ") because '" + newName + "' already exists");
}
return false;
}
if (isVerbose) {
System.out.println("PROCESSING: bitstream " + source.getID()
+ " (item: " + item.getHandle() + ")");
}
InputStream destStream;
try {
System.out.println("File: " + newName);
destStream = formatFilter.getDestinationStream(item, bitstreamService.retrieve(context, source), isVerbose);
if (destStream == null) {
if (!isQuiet) {
System.out.println("SKIPPED: bitstream " + source.getID()
+ " (item: " + item.getHandle() + ") because filtering was unsuccessful");
}
return false;
}
} 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);
}
if (!isQuiet) {
System.out.println("FILTERED: bitstream " + source.getID()
+ " (item: " + item.getHandle() + ") and created '" + newName + "'");
}
//do post-processing of the generated bitstream
formatFilter.postProcessBitstream(context, item, b);
return true;
}
@Override
public Item getCurrentItem() {
return currentItem;
}
@Override
public boolean inSkipList(String identifier) {
if (skipList != null && skipList.contains(identifier)) {
if (!isQuiet) {
System.out.println("SKIP-LIST: skipped bitstreams within identifier " + identifier);
}
return true;
} else {
return false;
}
}
@Override
public void setVerbose(boolean isVerbose) {
this.isVerbose = isVerbose;
}
@Override
public void setQuiet(boolean isQuiet) {
this.isQuiet = isQuiet;
}
@Override
public void setForce(boolean isForce) {
this.isForce = isForce;
}
@Override
public void setMax2Process(int max2Process) {
this.max2Process = max2Process;
}
@Override
public void setFilterClasses(List<FormatFilter> filterClasses) {
this.filterClasses = filterClasses;
}
@Override
public void setSkipList(List<String> skipList) {
this.skipList = skipList;
}
@Override
public void setFilterFormats(Map<String, List<String>> filterFormats) {
this.filterFormats = filterFormats;
}
}

View File

@@ -0,0 +1,94 @@
/**
* 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.awt.image.BufferedImage;
import java.io.InputStream;
import javax.imageio.ImageIO;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.rendering.PDFRenderer;
import org.dspace.content.Item;
/**
* Create JPEG thumbnails from PDF cover page using PDFBox.
* Based on JPEGFilter:
* Filter image bitstreams, scaling the image to be within the bounds of
* thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be
* no bigger than. Creates only JPEGs.
*
* @author Ivan Masár helix84@centrum.sk
* @author Jason Sherman jsherman@usao.edu
*/
public class PDFBoxThumbnail extends MediaFilter implements SelfRegisterInputFormats {
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".jpg";
}
/**
* @return String bundle name
*/
@Override
public String getBundleName() {
return "THUMBNAIL";
}
/**
* @return String bitstreamformat
*/
@Override
public String getFormatString() {
return "JPEG";
}
/**
* @return String description
*/
@Override
public String getDescription() {
return "Generated Thumbnail";
}
/**
* @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 {
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();
JPEGFilter jpegFilter = new JPEGFilter();
return jpegFilter.getThumb(currentItem, buf, verbose);
}
@Override
public String[] getInputMIMETypes() {
return ImageIO.getReaderMIMETypes();
}
@Override
public String[] getInputDescriptions() {
return null;
}
@Override
public String[] getInputExtensions() {
// Temporarily disabled as JDK 1.6 only
// return ImageIO.getReaderFileSuffixes();
return null;
}
}

View File

@@ -18,7 +18,8 @@ import java.io.Writer;
import org.apache.log4j.Logger;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.util.PDFTextStripper;
import org.apache.pdfbox.text.PDFTextStripper;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
/*
@@ -27,118 +28,98 @@ import org.dspace.core.ConfigurationManager;
* instantiate filter - bitstream format doesn't exist
*
*/
public class PDFFilter extends MediaFilter
{
public class PDFFilter extends MediaFilter {
private static Logger log = Logger.getLogger(PDFFilter.class);
public String getFilteredName(String oldFilename)
{
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".txt";
}
/**
* @return String bundle name
*
*/
public String getBundleName()
{
@Override
public String getBundleName() {
return "TEXT";
}
/**
* @return String bitstreamformat
*/
public String getFormatString()
{
@Override
public String getFormatString() {
return "Text";
}
/**
* @return String description
*/
public String getDescription()
{
@Override
public String getDescription() {
return "Extracted text";
}
/**
* @param source
* source input stream
*
* @param currentItem item
* @param source source input stream
* @param verbose verbose mode
* @return InputStream the resulting input stream
* @throws Exception if error
*/
public InputStream getDestinationStream(InputStream source)
throws Exception
{
try
{
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
try {
boolean useTemporaryFile = ConfigurationManager.getBooleanProperty("pdffilter.largepdfs", false);
// get input stream from bitstream
// pass to filter, get string back
PDFTextStripper pts = new PDFTextStripper();
pts.setSortByPosition(true);
PDDocument pdfDoc = null;
Writer writer = null;
File tempTextFile = null;
ByteArrayOutputStream byteStream = null;
if (useTemporaryFile)
{
if (useTemporaryFile) {
tempTextFile = File.createTempFile("dspacepdfextract" + source.hashCode(), ".txt");
tempTextFile.deleteOnExit();
writer = new OutputStreamWriter(new FileOutputStream(tempTextFile));
}
else
{
} else {
byteStream = new ByteArrayOutputStream();
writer = new OutputStreamWriter(byteStream);
}
try
{
try {
pdfDoc = PDDocument.load(source);
pts.writeText(pdfDoc, writer);
}
finally
{
try
{
if (pdfDoc != null)
{
} finally {
try {
if (pdfDoc != null) {
pdfDoc.close();
}
}
catch(Exception e)
{
} catch (Exception e) {
log.error("Error closing PDF file: " + e.getMessage(), e);
}
try
{
try {
writer.close();
}
catch(Exception e)
{
} catch (Exception e) {
log.error("Error closing temporary extract file: " + e.getMessage(), e);
}
}
if (useTemporaryFile)
{
if (useTemporaryFile) {
return new FileInputStream(tempTextFile);
}
else
{
} else {
byte[] bytes = byteStream.toByteArray();
return new ByteArrayInputStream(bytes);
}
}
catch (OutOfMemoryError oome)
{
} catch (OutOfMemoryError oome) {
log.error("Error parsing PDF document " + oome.getMessage(), oome);
if (!ConfigurationManager.getBooleanProperty("pdffilter.skiponmemoryexception", false))
{
if (!ConfigurationManager.getBooleanProperty("pdffilter.skiponmemoryexception", false)) {
throw oome;
}
}

View File

@@ -0,0 +1,71 @@
/**
* 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.poi.POITextExtractor;
import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.xmlbeans.XmlException;
import org.dspace.content.Item;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Extract flat text from Microsoft Word documents (.doc, .docx).
*/
public class PoiWordFilter
extends MediaFilter {
private static final Logger LOG = LoggerFactory.getLogger(PoiWordFilter.class);
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".txt";
}
@Override
public String getBundleName() {
return "TEXT";
}
@Override
public String getFormatString() {
return "Text";
}
@Override
public String getDescription() {
return "Extracted text";
}
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
String text;
try {
// get input stream from bitstream, pass to filter, get string back
POITextExtractor extractor = ExtractorFactory.createExtractor(source);
text = extractor.getText();
} catch (IOException | OpenXML4JException | XmlException e) {
System.err.format("Invalid File Format: %s%n", e.getMessage());
LOG.error("Unable to parse the bitstream: ", e);
throw e;
}
// if verbose flag is set, print out extracted text to STDOUT
if (verbose) {
System.out.println(text);
}
// return the extracted text as a stream.
return new ByteArrayInputStream(text.getBytes());
}
}

View File

@@ -10,33 +10,31 @@ package org.dspace.app.mediafilter;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.xslf.extractor.XSLFPowerPointExtractor;
import org.apache.poi.hslf.extractor.PowerPointExtractor;
import org.apache.poi.POITextExtractor;
import org.apache.log4j.Logger;
import org.apache.poi.POITextExtractor;
import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.hslf.extractor.PowerPointExtractor;
import org.apache.poi.xslf.extractor.XSLFPowerPointExtractor;
import org.dspace.content.Item;
/*
* TODO: Allow user to configure extraction of only text or only notes
*
*/
public class PowerPointFilter extends MediaFilter
{
public class PowerPointFilter extends MediaFilter {
private static Logger log = Logger.getLogger(PowerPointFilter.class);
public String getFilteredName(String oldFilename)
{
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".txt";
}
/**
* @return String bundle name
*
*/
public String getBundleName()
{
@Override
public String getBundleName() {
return "TEXT";
}
@@ -45,31 +43,31 @@ public class PowerPointFilter extends MediaFilter
*
* TODO: Check that this is correct
*/
public String getFormatString()
{
@Override
public String getFormatString() {
return "Text";
}
/**
* @return String description
*/
public String getDescription()
{
@Override
public String getDescription() {
return "Extracted text";
}
/**
* @param source
* source input stream
*
* @param currentItem item
* @param source source input stream
* @param verbose verbose mode
* @return InputStream the resulting input stream
* @throws Exception if error
*/
public InputStream getDestinationStream(InputStream source)
throws Exception
{
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
try
{
try {
String extractedText = null;
new ExtractorFactory();
@@ -80,29 +78,22 @@ public class PowerPointFilter extends MediaFilter
// require different classes and APIs for text extraction
// If this is a PowerPoint XML file, extract accordingly
if (pptExtractor instanceof XSLFPowerPointExtractor)
{
if (pptExtractor instanceof XSLFPowerPointExtractor) {
// The true method arguments indicate that text from
// the slides and the notes is desired
extractedText = ((XSLFPowerPointExtractor) pptExtractor)
.getText(true, true);
}
// Legacy PowerPoint files
else if (pptExtractor instanceof PowerPointExtractor)
{
} else if (pptExtractor instanceof PowerPointExtractor) { // Legacy PowerPoint files
extractedText = ((PowerPointExtractor) pptExtractor).getText()
+ " " + ((PowerPointExtractor) pptExtractor).getNotes();
}
if (extractedText != null)
{
if (extractedText != null) {
// if verbose flag is set, print out extracted text
// to STDOUT
if (MediaFilterManager.isVerbose)
{
if (verbose) {
System.out.println(extractedText);
}
@@ -112,9 +103,7 @@ public class PowerPointFilter extends MediaFilter
return bais;
}
}
catch (Exception e)
{
} catch (Exception e) {
log.error("Error filtering bitstream: " + e.getMessage(), e);
throw e;
}

View File

@@ -11,8 +11,7 @@ package org.dspace.app.mediafilter;
* Interface to allow filters to register the input formats they handle
* (useful for exposing underlying capabilities of libraries used)
*/
public interface SelfRegisterInputFormats
{
public interface SelfRegisterInputFormats {
public String[] getInputMIMETypes();
public String[] getInputDescriptions();

View File

@@ -8,11 +8,11 @@
package org.dspace.app.mediafilter;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
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;
@@ -22,62 +22,59 @@ import org.textmining.extraction.word.WordTextExtractorFactory;
* instantiate filter - bitstream format doesn't exist.
*
*/
public class WordFilter extends MediaFilter
{
public class WordFilter extends MediaFilter {
private static Logger log = Logger.getLogger(WordFilter.class);
public String getFilteredName(String oldFilename)
{
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".txt";
}
/**
* @return String bundle name
*
*/
public String getBundleName()
{
@Override
public String getBundleName() {
return "TEXT";
}
/**
* @return String bitstreamformat
*/
public String getFormatString()
{
@Override
public String getFormatString() {
return "Text";
}
/**
* @return String description
*/
public String getDescription()
{
@Override
public String getDescription() {
return "Extracted text";
}
/**
* @param source
* source input stream
*
* @param currentItem item
* @param source source input stream
* @param verbose verbose mode
* @return InputStream the resulting input stream
* @throws Exception if error
*/
public InputStream getDestinationStream(InputStream source)
throws Exception
{
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
// get input stream from bitstream
// pass to filter, get string back
try
{
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 (MediaFilterManager.isVerbose)
{
if (verbose) {
System.out.println(extractedText);
}
@@ -86,9 +83,7 @@ public class WordFilter extends MediaFilter
ByteArrayInputStream bais = new ByteArrayInputStream(textBytes);
return bais; // will this work? or will the byte array be out of scope?
}
catch (IOException ioe)
{
} catch (IOException ioe) {
System.out.println("Invalid Word Format");
log.error("Error detected - Word File format not recognized: "
+ ioe.getMessage(), ioe);

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