Compare commits

...

1867 Commits

Author SHA1 Message Date
Tim Donohue
e30be69b31 Replacing dspace/LICENSE file in dspace-1.6.0 tag
git-svn-id: http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0@4804 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 18:36:39 +00:00
Tim Donohue
37b623235c Temporarily removing dspace/LICENSE from dspace-1.6.0 tag. Will be replaced shortly.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0@4803 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 18:36:08 +00:00
Tim Donohue
f1c875175b Replacing dspace/README file in dspace-1.6.0 tag
git-svn-id: http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0@4802 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 18:34:35 +00:00
Tim Donohue
a681a557a6 Temporarily removing dspace/README from dspace-1.6.0 tag. Will be replaced shortly.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0@4801 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 18:34:07 +00:00
Tim Donohue
368a189aed Replacing README file in dspace-1.6.0 tag
git-svn-id: http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0@4800 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 18:33:38 +00:00
Tim Donohue
08505b7280 Temporarily removing README from dspace-1.6.0 tag. Will be replaced shortly.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0@4799 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 18:33:16 +00:00
Tim Donohue
fe63ccecde [maven-release-plugin] copy for tag dspace-1.6.0
git-svn-id: http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0@4796 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 17:48:35 +00:00
Jeffrey Trimble
523abd162b Final Version for 1.6.0
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4794 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 17:02:36 +00:00
Jeffrey Trimble
4f55fd4144 Final changes for 1.6.0
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4793 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 17:02:04 +00:00
Jeffrey Trimble
5a12376f9a Final changes for 1.6.0
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4792 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 16:59:56 +00:00
Jeffrey Trimble
3b25a2c81e Final changes for 1.6.0
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4791 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-03-02 16:59:43 +00:00
Jeffrey Trimble
cbb9d449cf git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4790 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-03-02 02:35:56 +00:00
Jeffrey Trimble
1207bc9137 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4789 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-03-02 02:31:38 +00:00
Jeffrey Trimble
2eebb4ecbf git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4788 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-03-02 02:31:27 +00:00
Jeffrey Trimble
f090e896bd git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4787 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-03-02 02:31:17 +00:00
Jeffrey Trimble
586bd23e49 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4786 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-03-02 02:31:07 +00:00
Jeffrey Trimble
3ba97fcae3 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4785 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-03-02 02:30:32 +00:00
Stuart Lewis
676b8e157b Update to KNOWN_BUGS - link to list of 1.6 bugs in JIRA
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4784 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-28 22:33:45 +00:00
Stuart Lewis
e40f5152df Update KNOWN_BUGS in preparation for 1.6 final release.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4783 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-28 22:03:05 +00:00
Ben Bosman
997d4e171c [DS-483] statistics.item.authorization.admin ignored by xmlui
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4780 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-22 09:44:00 +00:00
Kim Shepherd
85c9891115 [DS-468] - Fix for 'foreign characters broken in group names (XMLUI)'
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4779 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-18 02:08:39 +00:00
Kim Shepherd
1f6a9d76d8 [DS-474] - Added handle.canonical.prefix defaults and usage examples to dspace.cfg
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4778 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-18 01:08:42 +00:00
Mark Wood
e1eaac67d0 check whether bundle list for item is empty before dereferencing [0]
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4777 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-17 21:58:08 +00:00
Stuart Lewis
dab184d3de Update example db.url (remove '-services')
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4773 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-14 01:33:27 +00:00
Tim Donohue
b816380369 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4769 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-10 15:40:18 +00:00
Tim Donohue
c43d8763db [maven-release-plugin] prepare release dspace-1.6.0-rc2
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4767 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-10 15:39:42 +00:00
Mark Wood
7aa34fa495 Remove old Manakin mailing list, add missing dspace-general, tidy a few distracting comment issues
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4766 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-10 14:50:24 +00:00
Jeffrey Trimble
5d757d4b29 Final 1.6-RC2 release after additional material was added
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4765 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-10 03:01:51 +00:00
Jeffrey Trimble
17a2ad5b27 Final 1.6-RC2 release after additional material was added
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4764 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-10 03:01:39 +00:00
Jeffrey Trimble
f576f19225 Final 1.6-RC2 release after additional material was added
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4763 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-10 03:01:12 +00:00
Jeffrey Trimble
ee354937b2 Additional material
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4762 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-10 02:59:57 +00:00
Mark Diggory
ce47431200 [DS-440] Add Launcher entry and adjust command names to be uniform for stats tools. Consolidate DownloadSpiderIPs into StatisticsClient.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4754 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-09 07:36:43 +00:00
Kim Shepherd
0cc539d981 [DS-418] - i18n and session invalidation fix for JSPUI
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4753 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-08 21:48:34 +00:00
Mark Diggory
3a784d0a63 [DS-440] Adjust SolrLogger and rest of Statistics system to support processing multiple statistics files. Adding CLI class.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4752 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-08 05:12:44 +00:00
Jeffrey Trimble
f53325d272 New Generated files for DSpace 1-6-RC2
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4751 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-08 02:00:45 +00:00
Jeffrey Trimble
ea94064877 Final changes for 1.6-RC2
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4750 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-08 02:00:06 +00:00
Jeffrey Trimble
2554297bc1 Final changes for 1.6-RC2
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4749 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-08 01:59:39 +00:00
Jeffrey Trimble
4ab4d71bdc Final changes for 1.6-RC2
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4748 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-08 01:59:30 +00:00
Jeffrey Trimble
2da2c0787b Final changes for 1.6-RC2
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4747 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-08 01:59:22 +00:00
Jeffrey Trimble
6ef0c0c8cc Final changes for 1.6-RC2
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4746 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-08 01:59:11 +00:00
Mark Diggory
73edd7a585 [DS-440] Adjust SolrLogger and rest of Statistics system to support processing multiple statistics files. Prempt logging spider IPs and prune spider IPs from Solr with utility methods.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4745 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-07 17:44:17 +00:00
Mark Diggory
a5beae59c2 [DS-440] Adjust SpiderDownloader to download multiple files in a "config/spiders" directory relative ${dspace.dir}
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4744 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-07 16:42:56 +00:00
Mark Diggory
3035d3a7c8 Handle Exeptions to eliminate issues when testing / debugging in IDE's and allow application to run with a default fversion if pom cannot be determined.,
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4743 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-07 00:35:14 +00:00
Graham Triggs
edf94a15f1 [DS-477] Fix LDAP authentication error by ensuring findByEmail lowercases the email to match the database storage
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4742 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-05 12:11:05 +00:00
Stuart Lewis
fd0364dae0 Correct typos in error messages
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4740 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-04 22:46:57 +00:00
Jeffrey Trimble
aa464807aa Added Authority Control documentation from LCS
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4737 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-03 00:26:56 +00:00
Stuart Lewis
821c6849cb [DS-44] Monthly statistics skip first and last of month - fix stat-general
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4735 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-02-01 23:11:43 +00:00
Stuart Lewis
c279ab1b47 [DS-359] Add alternate file appender for log4j - swap to using 'dd' (day of month) rather than 'DD' (day of year)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4734 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-31 14:13:10 +00:00
Stuart Lewis
03168dc04a Correcting typo in API method name
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4733 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-30 19:07:06 +00:00
Stuart Lewis
716ee78cc3 Update (C) year in JSPUI footer
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4732 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-30 06:27:44 +00:00
Ben Bosman
7e527eea7a [DS-247] Contribution of @MIRE Solr Based Statistics Engine to DSpace
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4731 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-29 16:31:00 +00:00
Stuart Lewis
888c34be1c [DS-472] 'fresh_install' broken on a completely clean system
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4730 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-28 23:16:27 +00:00
Jeffrey Trimble
5fe0c7999f Added email testing and enhance the Checking your installation section.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4729 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-27 17:13:32 +00:00
Jeffrey Trimble
98f1b01a24 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4728 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-01-27 16:54:43 +00:00
Jeffrey Trimble
b9ab7d891c git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4727 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-01-27 16:54:32 +00:00
Jeffrey Trimble
5951cd4f90 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4726 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-01-27 16:54:21 +00:00
Tim Donohue
58b12f87ce Enable OAI-ORE dissemination via OAI-PMH by default in DSpace 1.6 (the setting was missing from oaicat.properties). Also added in exta comments in the oaicat.properties files to better explain some of these settings. Related to DS-289
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4725 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-26 22:17:18 +00:00
Tim Donohue
8d03869e53 Small modifications to dspace.cfg. Adding in the commented out default settings that were missing in the OAI Harvesting section of dspace.cfg. Again, this relates to DS-289
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4724 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-26 19:08:10 +00:00
Tim Donohue
5d4d06b6d2 Applying Toni Prieto's Oracle patch for DS-289 : OAI-PMH + OAI-ORE harvesting support. I just did a basic installation on Oracle 10g, and Toni's patches seem to fix collection harvesting for Oracle. Also tested these changes with a basic PostgreSQL install to ensure they didn't affect PostgreSQL.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4723 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-26 18:14:06 +00:00
Tim Donohue
5ef85a9ff0 Adding very basic provenance statement to 'dc.description.provenance' for OAI Harvested Items. See DS-289 and following email thread on dspace-devel for more information:
http://sourceforge.net/mailarchive/forum.php?thread_name=69f93bf71001221536s423b0acdr5cf4cc77b367e833%40mail.gmail.com&forum_name=dspace-devel

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4722 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-26 16:13:16 +00:00
Tim Donohue
346aa44a03 Minor reorganization of keys in dspace.cfg. The Authority Control Settings were under the OAI Harvesting section -- I moved them to the JSPUI & XMLUI Configs section. Also added a new section header for the SOLR stats section of this config file.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4721 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-22 20:31:49 +00:00
Tim Donohue
88c0c45b95 Minor update to CHANGES file. DS-423 is now fixed for both Postgres and Oracle. You can create all 1.6 tables by running 'ant setup_database' and clear them out again by running 'ant clean_database'.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4720 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-22 18:44:49 +00:00
Tim Donohue
9ff36ebfb7 Fixes to Oracle Schema scripts based on DS-289: OAI-PMH + OAI-ORE harvesting support.
These seem to create the tables properly in Oracle 10g (based on my limited testing with a local Oracle install), and they also help fix DS-423 for Oracle.

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4719 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-22 18:37:13 +00:00
Tim Donohue
299eb9202b Fix for Postgres for DS-423: Ant target 'clean_database' doesn't drop all tables. A fix for Oracle will also be coming.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4718 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-21 20:28:22 +00:00
Ben Bosman
2c8fffb4a0 [DS-365] support for OAI gateways that do not use sets in harvester
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4717 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-21 16:58:55 +00:00
Ben Bosman
c6e422ab73 [DS-365] support for OAI gateways that do not use sets in harvester
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4716 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-21 16:57:40 +00:00
Richard Rodgers
6c3ca9bb4f [DS-427] Fix typo in last commit
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4713 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-20 04:28:03 +00:00
Richard Rodgers
99ad916454 [DS-427] License bundle display conditional on config property
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4712 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-20 04:23:25 +00:00
Richard Rodgers
5e5e286cbd [DS-422] Fix missing etc error, add deprecation warning
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4711 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-19 23:05:11 +00:00
Jeffrey Trimble
511297ae08 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4710 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-01-19 20:05:08 +00:00
Jeffrey Trimble
c628d0ade4 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4709 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-01-19 20:04:53 +00:00
Jeffrey Trimble
cec1c784e2 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4708 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2010-01-19 20:03:33 +00:00
Stuart Lewis
6a097bfa4d [DS-321] DSpace command launcher - fix error with stats scripts
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4701 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-16 08:59:24 +00:00
Stuart Lewis
3b1512de25 [DS-460] Change logging from RollingFileAppender to DailyFileAppender
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4700 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-16 08:20:46 +00:00
Stuart Lewis
690e63635c [DS-364] Script to convert legacy dspace.log stats into solr stats records
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4699 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-16 07:09:43 +00:00
Mark Diggory
39e118ebc2 Remove DTD to correct problems generating original documentation.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4698 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-15 21:15:07 +00:00
Mark Wood
3a7f4260d9 Remove log4j.xml, document change, small related doc cleanups
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4697 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-15 20:01:37 +00:00
Tim Donohue
f21cd59a82 Fix for DS-399 : Special characters in collection license lead to parse error (XMLUI). See DS-399 comments for more information.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4695 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-15 17:06:30 +00:00
Stuart Lewis
3ea82ecca5 [DS-364] Script to convert legacy dspace.log stats into solr stats records
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4693 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-14 19:58:17 +00:00
Mark Diggory
1f9ec08f89 [DS-241] DSpace Assembly Improvement
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4691 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-14 05:40:16 +00:00
Graham Triggs
5008cdee23 Allow LDAPHierarchicalAuthentication to work with an empty search_context
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4690 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-13 12:16:24 +00:00
Mark Diggory
3439498f3a Exclude UI Shared from output war modules in assembly.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4680 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-11 20:47:38 +00:00
Ben Bosman
f7cb262ff8 [DS-247] Update of contribution of @MIRE Solr Based Statistics Engine to DSpace.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4667 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-11 10:42:28 +00:00
Larry Stone
cf0e2ebaa7 [DS-400] Fix DCDate date formatting for display in JSPUI
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4662 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-08 03:27:08 +00:00
Stuart Lewis
c40c9668fc [DS-295] CC License being assigned incorrect Mime Type during submission.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4660 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-07 01:57:33 +00:00
Stuart Lewis
523973b2de [DS-447] Email test script
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4659 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-06 21:37:39 +00:00
Stuart Lewis
b2570f59e5 [DS-446] New ant step - test_database
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4658 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-06 21:30:42 +00:00
Stuart Lewis
de65b78ca6 [DS-445] New Bitstream.findAll() method
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4657 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-06 21:12:51 +00:00
Mark Diggory
16acce7421 Remove Commit in wrong location
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4656 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-05 23:45:54 +00:00
Mark Diggory
3ea5eb0e27 Test
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4655 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-04 23:56:53 +00:00
Mark Diggory
e62d9645ff Test
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4654 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-04 23:55:41 +00:00
Ben Bosman
691e42ab8c [DS-247] Update of contribution of @MIRE Solr Based Statistics Engine to DSpace.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4653 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-04 15:39:37 +00:00
Mark Diggory
1ddd4193f5 Improved Confluence Documentation Generation using maven-xml-plugin instead of antrun plugin, utilizing Saxon for XSLT 2.0 capability and updating docBook xml file to include proper dtd and missing entity declarations.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4652 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-04 04:07:59 +00:00
Stuart Lewis
c1ec454cbc [DS-321] DSpace command launcher - update build.xml
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4651 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-03 08:11:05 +00:00
Mark Diggory
11612077f8 Adding docBook2confluence transformation of DSpace Manual.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4650 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-01-02 03:15:25 +00:00
Stuart Lewis
b40609ea80 [DS-442] Enable RSS feeds by default
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4649 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-26 09:44:25 +00:00
Tim Donohue
0b26060a57 Fix for DS-398 - Submission license displayed on collection and item homepage (XMLUI)
This was partially fixed by DS-217.  However, I've also disabled display of the Submission License on Item pages (it was also displayed there by default).  Copyright information (for collections/communities) and CC Licenses (for items) are still displayed by default in XMLUI.

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4648 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-23 16:24:52 +00:00
Kim Shepherd
2a6f7e6652 Fix for [DS-414] - File downloads displayed in collection and community statistics
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4647 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-23 07:46:30 +00:00
Kim Shepherd
3bd148d0d6 [DS-406], [DS-409], [DS-425], [DS-438] fixes
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4646 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-23 06:42:08 +00:00
Larry Stone
173401df7c [DS-284] alternate odd and even styles correctly on table rows in Item Summary view
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4645 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-23 02:25:34 +00:00
Andrea Bollini
e1d2da5f1b [DS-217] Hardcoded String in the license bitstream
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4644 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-22 21:10:30 +00:00
Stuart Lewis
96da9e0c34 [DS-321] DSpace command launcher
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4643 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-20 09:14:47 +00:00
Stuart Lewis
7768e62880 [DS-295] CC License being assigned incorrect Mime Type during submission.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4642 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-20 08:54:06 +00:00
Stuart Lewis
f4623e09e8 [DS-321] DSpace command launcher
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4641 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-20 08:42:28 +00:00
Stuart Lewis
a0ebcb1244 [DS-295] CC License being assigned incorrect Mime Type during submission.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4640 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-20 08:32:57 +00:00
Stuart Lewis
cb278553aa [DS-424] Export metadata button displayed in JSPUI Administration List of withdrawn items
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4639 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-20 08:20:35 +00:00
Andrea Bollini
0878efa463 [DS-415] Create groups via admin UI authorization denied
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4638 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-18 09:03:30 +00:00
Andrea Bollini
1fec2f71c0 [DS-436] SWORD Authenticator doesn't support the special groups infrastructure
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4637 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-17 11:47:00 +00:00
Larry Stone
ad598e34ed DS-437 remove unused artifacts from schema. also delete blank lines within CREATE TABLE statement that cause failure in SQL*Plus.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4636 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-17 00:03:28 +00:00
Larry Stone
2522b32016 DS-412 generate UTF-8 encoded text, improve error reporting
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4635 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-16 23:59:17 +00:00
Larry Stone
4078f157a2 DS-419, fix array exception for unqualified metadata field specified
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4634 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-16 21:10:55 +00:00
Claudia Juergen
dad1166917 Removed superfluous statistics configuration parameters from dspace.cfg as documented by Ben Bosman in http://wiki.dspace.org/index.php/StatisticsDocumentation
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4633 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-10 14:54:25 +00:00
Jeffrey Trimble
a798cafeff Typos corrected.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4632 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-04 19:12:07 +00:00
Jeffrey Trimble
76e6d46900 Typos corrected.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4631 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-04 18:47:52 +00:00
Jeffrey Trimble
a716d0fd2d git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4630 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2009-12-04 18:28:52 +00:00
Jeffrey Trimble
646ce616ca git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4629 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2009-12-04 18:28:32 +00:00
Jeffrey Trimble
32b0037d32 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4628 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2009-12-04 18:28:10 +00:00
Tim Donohue
5d486d8f3a Fix for DS-395 - DSpace Objects (communities, collections, items, bitstreams) only accessible to logged in users.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4627 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-04 18:16:01 +00:00
Larry Stone
cdd985b2c8 Revised xpdf install instructions and tested procedure
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4626 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-04 02:46:58 +00:00
Tim Donohue
c81b37a332 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4625 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 23:24:10 +00:00
Tim Donohue
4fb22388d7 [maven-release-plugin] prepare release dspace-1.6.0-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4623 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 23:23:46 +00:00
Tim Donohue
c20be82bba Increment the language pack dependencies to require 1.6.0.0 release or above.
WARNING:  YOU WILL NOT BE ABLE TO BUILD TRUNK until http://repo2.maven.org/maven2/ updates itself, or unless you manually install the 1.6.0.0 tagged version of 'dspace-api-lang' and 'dspace-xmlui-lang' in your ~/.m2/ directory.

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4622 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 21:15:59 +00:00
Tim Donohue
5eddf8d88a Adding a Maven property to force DSpace to always build using UTF-8 source encoding. Previously building DSpace on Windows used a Windows platform specific encoding.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4612 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 17:23:02 +00:00
Jeffrey Trimble
f297b45dce Minor changes
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4611 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 15:11:29 +00:00
Jeffrey Trimble
32a15f6ec5 Minor changes
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4610 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 15:11:09 +00:00
Jeffrey Trimble
a2ef7ac879 Minor changes
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4609 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 15:10:41 +00:00
Jeffrey Trimble
5961638f96 Small cleanup before 1.6RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4608 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 14:57:59 +00:00
Jeffrey Trimble
c313c586fc Small cleanup before 1.6RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4607 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 14:57:48 +00:00
Jeffrey Trimble
60e45455a5 Small cleanup before 1.6RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4606 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 14:57:38 +00:00
Jeffrey Trimble
00c8c340ee Small cleanup before 1.6RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4605 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 14:57:27 +00:00
Jeffrey Trimble
715c2170c4 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4604 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2009-12-03 14:56:54 +00:00
Kim Shepherd
f6126decc1 [DS-363] - JSPUI statistics views
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4603 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 08:17:54 +00:00
Larry Stone
2a7d3bd10d [DS-393] Fix DCDate and submission timezone bugs that changed date on page reload
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4602 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 06:23:30 +00:00
Jeffrey Trimble
17700ff654 New images for documentation 1.6-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4601 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 05:02:43 +00:00
Jeffrey Trimble
1b940cfe4c Final generation for 1.6-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4600 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 05:02:09 +00:00
Jeffrey Trimble
beb775c904 Final generation for 1.6-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4599 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 05:01:49 +00:00
Jeffrey Trimble
e15e0c6659 Final generation for 1.6-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4598 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 05:01:25 +00:00
Jeffrey Trimble
0cd6154f72 Final generation for 1.6-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4597 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 05:01:09 +00:00
Jeffrey Trimble
6ad002c36d Final inclusion for 1.6-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4596 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 04:59:44 +00:00
Jeffrey Trimble
19dc97214a Final inclusion for 1.6-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4595 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 04:58:08 +00:00
Jeffrey Trimble
9d65c23e03 Final inclusion for 1.6-rc1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4594 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 04:57:52 +00:00
Jeffrey Trimble
887b59d37d Changed styles to html.xsl and print.xsl. Change PDF name for 1.6-RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4593 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 02:22:08 +00:00
Jeffrey Trimble
5c8812c60e Preliminary preparation work for upgrades to 1.6 RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4592 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-03 01:42:52 +00:00
Richard Rodgers
2a77b3ffdc [DS-379] Fix for inability to retrieve description.xml from servlet
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4591 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-02 22:35:28 +00:00
Larry Stone
8f1d52a756 [DS-377] Add META tags identifying DSpace source version
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4589 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-02 19:21:44 +00:00
Jeffrey Trimble
a48ec2db96 Changes to reflect 1.6 RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4588 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-02 18:07:15 +00:00
Jeffrey Trimble
edb3db0593 Changes to reflect 1.6 RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4587 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-02 18:07:06 +00:00
Jeffrey Trimble
9ac64eacdb Changes to reflect 1.6 RC1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4586 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-12-02 18:06:56 +00:00
Tim Donohue
68fba45c54 Applying patch [DS-386] "Allow user to specify which <dmdSec> is used by the METS Ingester when importing METS from Packager script"
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4575 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-30 21:37:44 +00:00
Ben Bosman
170e7c6854 [DS-392] Error messages in the submission do not disappear if e.g. one of the two errors are solved
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4568 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-30 16:37:13 +00:00
Ben Bosman
a71786249c [DS-381] community and collection homepage
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4567 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-30 16:31:29 +00:00
Stuart Lewis
9fb947f373 [DS-295] CC License being assigned incorrect Mime Type during submission.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4566 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-26 03:20:34 +00:00
Stuart Lewis
a411a99ae5 [DS-389] Misleading label: "Submit to This Collection"
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4565 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-26 03:09:09 +00:00
Mark Diggory
ea88f7e272 [DS-247] Access control on Statistics pages.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4564 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-25 19:24:00 +00:00
Stuart Lewis
4efbd22a5a [DS-388] Item importer - new option to enable workflow notification emails
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4563 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-21 03:01:30 +00:00
Mark Diggory
33b9fa0e43 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4562 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2009-11-21 00:58:25 +00:00
Tim Donohue
73739e2e67 Fix for [DS-385] Packager script is unable to import the same METS + DIM package that was exported
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4561 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-19 18:11:40 +00:00
Tim Donohue
358bfb3eca Adding 'dc.creator' to Author Browse index by default, as detailed in:
[DS-382] Proposal: Add 'dc.creator' to Author browse index by default


git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4560 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-19 17:05:16 +00:00
Mark Diggory
9ea4f1445d [DS-336] DSpace Services 2.0 Support / Reduce Logging events on Services API and Implementation
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4557 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-19 06:02:21 +00:00
Mark Diggory
e9f10eee28 [DS-336] DSpace Services 2.0 Support / Upgrade DSpace Services to full release.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4556 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-19 03:35:42 +00:00
Mark Diggory
5c6bce8d22 Correct LocalHost restriction filter behavior.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4555 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-19 03:24:49 +00:00
Mark Diggory
bfbfc86aee [DS-335] Minho Statistics Database Manager additions.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4544 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-18 23:34:23 +00:00
Stuart Lewis
aff90cd4f3 [DS-321] DSpace command launcher - fix parameter count problem in dspace.bat, and echo 'caused by' exception instead of root exception. Also print out full stack trace.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4543 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-18 22:57:51 +00:00
Stuart Lewis
5179b030fe [DS-321] DSpace command launcher - fix parameter count problem in dspace.bat, and echo 'caused by' exception instead of root exception. Also print out full stack trace.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4542 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-18 22:54:57 +00:00
Larry Stone
6cfaa2a46c [DS-373] Fix "Letter" link URLs in 2nd-stage Browse
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4541 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-18 22:37:43 +00:00
Claudia Juergen
570242be67 updated Russian translation comitted to dspace-api-lang DS-375
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4540 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-18 11:42:35 +00:00
Mark Diggory
cfda8ac3a6 [DS-247] Additional Country and City Statistics. Externalize Strings.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4525 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-16 20:45:29 +00:00
Jeffrey Trimble
1d21beb31e Updated all sections to be consistent in format and style.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4524 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-14 20:24:08 +00:00
Jeffrey Trimble
845b88d575 Cleaned up typos
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4523 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-14 20:23:45 +00:00
Jeffrey Trimble
5c9853e05b Updated sections
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4522 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-14 20:23:29 +00:00
Jeffrey Trimble
5ea984354d Cleaned up typos and added new descriptions to new features.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4521 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-14 20:23:11 +00:00
Tim Donohue
a1c3d1b924 Fix for DS-378 : XMLUI Submission Interface messes up in IE7 after an empty <hint> in input_forms.xml
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4520 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-12 22:01:06 +00:00
Stuart Lewis
55cc25ba79 [DS-372] New verbose option for [dspace]/bin/dspace cleanup script
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4519 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-12 00:53:09 +00:00
Claudia Juergen
e520ce24d1 - [DS-372] New verbose option for [dspace]/bin/dspace cleanup script
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4518 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-11 12:57:07 +00:00
Larry Stone
56bee34544 [DS-294] Add preferred language setting to Edit Profile page in XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4517 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-10 22:57:37 +00:00
Andrea Bollini
d8fbcce62a DS-236 bug fix - wrong pagination links when browsing authored items
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4516 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-07 19:11:00 +00:00
Andrea Bollini
85e2b694a4 DS-236 bug fix - JSPUI need to set the contentType header
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4515 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-07 19:10:19 +00:00
Andrea Bollini
c2c56611a4 DS-236 bug fix - compatibility issues for lookup js in IE
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4514 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-07 17:41:20 +00:00
Andrea Bollini
b1f19c9405 DS-236 bug fix - authority keys are not stored in "normal" browse indexes
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4513 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-07 17:39:53 +00:00
Andrea Bollini
7967f833fc DS-236 removed unused i18n keys
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4512 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-07 17:38:13 +00:00
Larry Stone
df26b2d178 DS-361, DS-369 refactor syndication feed generation, support all RSS and Atom formats in both feed and OpenSearch, also follow harvest.includerestricted.rss in both UIs.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4511 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-06 04:26:26 +00:00
Jeffrey Trimble
82c8a310a3 Assembled Checksum Checker documentation from wiki and 1.5.2 manual to new chapter.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4510 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-06 03:38:56 +00:00
Jeffrey Trimble
63d5c7a892 Revisions and additions of batch editing
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4509 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-06 00:14:52 +00:00
Jeffrey Trimble
bca06f96cf Correction of typos
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4508 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-06 00:13:18 +00:00
Jeffrey Trimble
b0ee58bee5 Inserted BulkEdit feature configuration.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4507 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-05 13:56:12 +00:00
Jeffrey Trimble
805d44e055 Corrected 4427 changes that were omitted and reformatted some text.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4506 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-05 13:54:16 +00:00
Claudia Juergen
8a4f51d6a3 Fix for [DS-370] E Mail Sent On Item Export Error Message and typo in email template
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4505 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-05 13:26:45 +00:00
Larry Stone
c93655d5a2 [DS-349] Admins can choose Internal BitstreamFormats in XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4504 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-05 03:24:44 +00:00
Larry Stone
39eb37bbae [DS-347] Add --quiet option to filter-media (MediaFilterManager) to disable progress messages
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4503 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-05 02:31:03 +00:00
Stuart Lewis
57b03571b9 [DS-354] Make-handle-server configuration fails. Using manual commands instead of script is successful: sub-task: Add to launcher.xml
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4502 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-05 00:07:16 +00:00
Mark Diggory
9f8eb52288 [DS-247] Contribution of @MIRE Solr Based Statistics Engine to DSpace. Move statistics to separate page. Externalize Strings.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4501 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-04 19:02:06 +00:00
Stuart Lewis
37441bd7ec [DS-320] java.util.NoSuchElementException: Timeout waiting for idle object
[DS-353] Missing commits in XMLUI server-side javascript code.

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4500 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-11-03 02:15:38 +00:00
Jeffrey Trimble
0eefcec595 Introduced a "For the Impatient" section (unsupported).
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4499 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-31 16:00:07 +00:00
Jeffrey Trimble
8341b71c14 System administration (Section X.9x onward) has been placed into a new chapter "sys_admin.xml")
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4498 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-31 15:59:29 +00:00
Larry Stone
a2ae6fea2d fix browse of index type "authority", supply a default OrderFormat the same as for "text", so start-at will work for authority-controlled browse index.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4497 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-30 21:51:19 +00:00
Larry Stone
64ce96df31 fix to lookup of repeatable authority values; clear source input field(s) so trial value is not inadvertently added e.g. by Next button.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4496 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-30 20:30:02 +00:00
Jeffrey Trimble
234139e9ff Updates from DS-306, 308, 331
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4495 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-30 20:16:41 +00:00
Jeffrey Trimble
cd63f5893b New chapter. Separating out from Application Layer
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4494 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-30 20:15:45 +00:00
Jeffrey Trimble
b2eec9cbd1 Updated 2.8
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4493 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-30 19:51:09 +00:00
Graham Triggs
207a9c8d23 Add alternate file appender for log4j
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4492 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-30 13:05:27 +00:00
Kim Shepherd
378e358f0c [DS-331] Config property mismatch between DSpaceLocaleAction and dspace.cfg
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4491 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-29 23:13:36 +00:00
Stuart Lewis
97687b0989 Update to master pom - adding new developer, and updating existing developer information
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4490 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-29 01:59:31 +00:00
Stuart Lewis
0cbd6ea68f [DS-161] Bulk metadata editing - add new CSV test case (unbalanced quotes)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4489 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-29 01:16:25 +00:00
Kim Shepherd
953ffdb74a [DS-246] Fix configurable browse parameter encoding (XMLUI)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4488 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-29 00:43:43 +00:00
Jeffrey Trimble
a5bfb45ab2 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4487 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2009-10-28 00:41:40 +00:00
Jeffrey Trimble
f82ef5082d Updated with Delegated Admin configuration
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4486 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-28 00:40:38 +00:00
Larry Stone
fe620f5077 Add "order" parameter to OpenSearch request to control sort order; also fix bug in jspui version that breaks looking for the wrong i18nk keys for metadata names.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4485 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-27 02:00:15 +00:00
Jeffrey Trimble
9392fd3eb9 New image for docbook admonitions
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4472 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-25 23:32:45 +00:00
Jeffrey Trimble
1cf33e4d96 New image for docbook admonitions
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4471 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-25 23:32:36 +00:00
Jeffrey Trimble
87c09cf5ac New image for docbook admonitions
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4470 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-25 23:32:10 +00:00
Jeffrey Trimble
4989a9b2eb Cleaned up some docbook coding.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4469 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-25 23:31:18 +00:00
Jeffrey Trimble
84b6c70b50 Revised sections for clarity and changed Handle Server instructions. Prepared for 1.6 installation.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4468 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-25 23:27:07 +00:00
Jeffrey Trimble
d741bb538a Revised sections for clarity and changed Handle Server instructions. Prepared for 1.6 installation.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4467 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-25 23:20:28 +00:00
Jeffrey Trimble
7a1d90c3b0 Revised sections for clarity and changed Handle Server instructions. Prepared for 1.6 installation.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4466 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-25 23:19:11 +00:00
Larry Stone
592e70bd60 Fix bug introduced by DS-285 changes when accessing Bitstream without Item, i.e. /bitstream/id/NNN
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4465 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-24 02:46:21 +00:00
Richard Rodgers
ffd7c48153 [DS-323] Add check for null filter list in commandline processing
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4464 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-23 21:13:09 +00:00
Richard Rodgers
2f6e46a541 Fix mistaken escaped '>' which caused handle md field to not be stripped
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4463 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-23 20:17:49 +00:00
Graham Triggs
408d8ab750 [DS-356] Antispam for suggest item feature
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4462 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-22 22:53:26 +00:00
Stuart Lewis
7c163d3e24 [DS-251] Bulk Metadata Editing: XMLUI aspect and forms
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4461 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-20 02:42:11 +00:00
Jeffrey Trimble
9de11497a9 Added more customization specifically for PDF printing.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4460 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-18 01:14:29 +00:00
Jeffrey Trimble
f11d036f21 Added customizations for deeper layers
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4459 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-18 01:13:23 +00:00
Jeffrey Trimble
6d7cf24b00 Gutted and rewritten. JSPUI and Manakin separated out.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4458 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-18 01:12:08 +00:00
Jeffrey Trimble
c16956b4d5 New Chapter. Extracted from old Configuration and Customization Chapter.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4457 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-18 01:11:26 +00:00
Jeffrey Trimble
5cda653e46 New Chapter. Extracted from old Configuration and Customization Chapter.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4456 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-18 01:11:01 +00:00
Larry Stone
514c1efcdc Add explanatory text to AuthorizeException generated by feedback page permission failure (trivial change)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4455 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-16 20:56:44 +00:00
Larry Stone
cb102d4e62 use symbolic names of authority confidence values in configuration; make default minconfidence configurable; fix logic in building authority-controlled browse index.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4454 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-16 20:08:28 +00:00
Graham Triggs
61ebe0492a Add to CHANGES file - Fix problem where an apostrophe in the email address would stop the javascrpt function from selecting the eperson.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4453 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-15 12:35:37 +00:00
Graham Triggs
ea915e8ba2 Fix problem where an apostrophe in the email address would stop the javascrpt function from selecting the eperson.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4452 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-15 12:31:36 +00:00
Claudia Juergen
7802b4e0a9 just some grammatical error
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4450 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-15 10:29:58 +00:00
Stuart Lewis
4cef1d1dcc [DS-289] OAI-PMH + OAI-ORE harvesting support - add launcher config
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4449 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-13 03:06:10 +00:00
Mark Diggory
d90247447a svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4446 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-11 00:48:23 +00:00
Mark Diggory
eb3e726e00 [DS-247] Initial Check-in of StatisticsTransformer to view Community, Collection and Item page views.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4445 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-11 00:32:54 +00:00
Mark Diggory
a7944e89b8 svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4444 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-11 00:30:33 +00:00
Mark Diggory
e1c4f80511 svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4443 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 19:36:08 +00:00
Mark Diggory
47fac0d807 We need to use latest version of the maven-war-plugin to assure filtering and other capabilities are up to date.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4442 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 19:24:52 +00:00
Mark Diggory
f07d7f5a5a [DS-247] Wire stats into build process, webapp dependencies and Spring activations.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4441 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 19:06:08 +00:00
Mark Diggory
ca14de5eeb [DS-247] Cleanout further unnecessary code and import references.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4440 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 19:03:27 +00:00
Mark Diggory
5571f153ca [DS-247] Wire stats into build process, webapp dependencies and Spring activations.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4439 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 18:55:03 +00:00
Mark Diggory
b80b41c29b [DS-247] Moving dspace-stats to dspace 1.6.0 trunk to resolve cycles created when attempting to release
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4437 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 18:44:52 +00:00
Mark Diggory
e0b6a4c48d svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4431 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 17:24:18 +00:00
Mark Diggory
b1d9b5306a [DS-247] Adjust location of UsageEvents to not be part of old statistics package.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4430 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 17:21:30 +00:00
Mark Diggory
485cc48e2a [DS-247] Remove unused code.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4429 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 17:12:48 +00:00
Mark Diggory
d4ae6d94af [DS-247] Remove unused code.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4428 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-10 10:04:17 +00:00
Larry Stone
c49f1c8385 [DS-297] Move PostgreSQL-specific SQL into etc/postgres for greater clarity
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4427 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-09 22:42:19 +00:00
Mark Diggory
dd499261d4 svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4426 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-09 22:23:31 +00:00
Mark Diggory
11c8d9d39e Add shared-ui to addons profile for release. Adjust stale metadata for project.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4425 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-09 22:20:58 +00:00
Mark Diggory
0ce6172190 svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4424 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-09 22:11:03 +00:00
Mark Diggory
dc5a493ef7 Unnecessary
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4423 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-09 22:10:14 +00:00
Mark Diggory
9e557c16db Cleanup stray pom issues for release process, no web.xml required. Especially if it is empty.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4422 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-09 22:09:32 +00:00
Mark Diggory
ae443da02d Cleanup stray pom issues for release process (and minor spellings).
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4421 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-09 22:02:28 +00:00
Larry Stone
e83033d198 [DS-338] Disable cache advice (Expires header) on Bitstream download that requires authorization (XMLUI)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4420 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-08 23:23:49 +00:00
Larry Stone
18ba104e00 [DS-236] fix typo in database update script.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4419 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-08 23:18:49 +00:00
Larry Stone
85ff1c403b [DS-285] Respond to If-Modified-Since request header in XMLUI, also provide Last-Modified response header for Bitstreams.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4417 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-07 23:09:53 +00:00
Stuart Lewis
fef8b7ae3d Adjust attributions
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4416 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-07 19:51:51 +00:00
Claudia Juergen
1c2a78fe58 fixed [DS-337] A bug related with adding new -EPersons
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4400 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-07 08:29:12 +00:00
Mark Diggory
c9291c834b [DS-247] LoggingUsageEventListener still used for BitstreamReader to reduce complexity in sitemap.xmap
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4394 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-07 03:23:46 +00:00
Mark Diggory
ea13e757e0 [DS-247] LoggingUsageEventListener and the UsageEventAction do all XMLUI logging now.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4393 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-07 03:16:28 +00:00
Mark Diggory
d4158e4909 further correct logging text.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4392 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-07 03:14:13 +00:00
Stuart Lewis
5a58000d3a Correct attributions to Mark
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4387 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-07 00:21:45 +00:00
Larry Stone
769f3f4eb9 [DS-288] Configurable option to hide metadata fields in public UIs and OAI-PMH
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4386 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-06 20:00:23 +00:00
Brad McLean
6369817dd7 Adjust licensing notices to reflect transfer from DSpace Foundation to
DuraSpace.



git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4368 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-06 13:45:01 +00:00
Larry Stone
bbe8a2a3d1 [DS-236] Authority control for metadata fields and Choice Authority plugin framework
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4365 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-05 23:52:42 +00:00
Mark Diggory
fa86734005 [DS-247] Add GeoCityLite installation (need to do this at install time because of licensing issues with redistribution of GeoCityLite database.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4364 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-05 23:01:31 +00:00
Mark Diggory
9edc76bd80 [DS-247] Add Solr statistics configuration and solr webapp overlay to trunk.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4363 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-05 22:59:14 +00:00
Mark Diggory
c33069e38c [DS-247] Add Solr statistics configuration and solr webapp overlay to trunk.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4362 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-05 22:57:56 +00:00
Mark Diggory
cc94816bc7 [DS-247] Add to modules as 2.0.0-alpha is now deployed in central repository
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4361 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-05 22:51:24 +00:00
Stuart Lewis
51010c269b [DS-247] Addition of DSpace Services to DSpace 1.6 - startup service manager in DSpace script launcher
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4360 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-05 22:14:51 +00:00
Mark Diggory
2d20e3b75b [DS-247] Add Solr statistics configuration and solr webapp overlay to trunk.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4359 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-05 21:48:04 +00:00
Larry Stone
f0b2d6b817 [DS-128] fix repositioning on submission pages after add button is clicked, xmlui
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4354 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-05 19:28:27 +00:00
Stuart Lewis
d0dcd5a13f [DS-161] Bulk metadata editing - fix bug where item:owning_collection is not getting updated properly when moving items
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4353 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-04 23:49:22 +00:00
Mark Diggory
90ac19ee80 [DS-336] Use first official alpha release of dspace-services.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4352 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-04 19:31:03 +00:00
Mark Diggory
60b2c1d98a [DS-336] DSpace Service Support to be added to DSpace 1.6.0 XMLUI and JSPUI.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4324 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-03 09:28:18 +00:00
Mark Diggory
20dc303f66 [DS-336] DSpace Service Support to be added to DSpace 1.6.0 XMLUI and JSPUI.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4323 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-03 09:26:27 +00:00
Mark Diggory
390975fa6e [DS-336] DSpace Service Support to be added to DSpace 1.6.0 XMLUI and JSPUI.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4322 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-03 09:25:30 +00:00
Mark Diggory
1af5db5821 [DS-335] DatabaseManager additions from Minho statistics addon.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4316 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-03 02:30:56 +00:00
Stuart Lewis
a7ff304f18 [DS-333] Adjust SWORD ingest crosswalk to store bibliographic citation
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4314 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-01 22:52:51 +00:00
Stuart Lewis
3c6f7bc9d7 [DS-330] Create new session on login / invalidate sessions on logout
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4313 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-01 20:11:23 +00:00
Stuart Lewis
fe88e442b8 Update JSPUI footer text from 'The DSpace Foundation' to 'Duraspace'
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4312 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-10-01 00:37:42 +00:00
Stuart Lewis
2cc0f7ad4d [DS-321] DSpace command launcher
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4311 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-30 22:02:09 +00:00
Andrea Bollini
d98a94fbcc [DS-270] added missing javadoc
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4310 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-30 19:56:38 +00:00
Andrea Bollini
98c8f11320 [DS-270] Make delegate admin permissions configurable
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4309 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-30 19:20:07 +00:00
Andrea Bollini
316408bb47 [DS-309] Shiboleth default roles are applied also to anonymous user and user logged-in with other methods
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4308 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-30 19:01:21 +00:00
Stuart Lewis
40559cdfd1 [DS-324] Add OpenSearch support (fix incorrectly closed generator tag)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4304 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 23:40:52 +00:00
Larry Stone
0a9b03fd7a [DS-317] fix DCDate usage to work with corrected DCDate behavior in embargo patch - submission describe page used local time instead of GMT
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4303 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 23:21:17 +00:00
Larry Stone
7546acdcc9 [DS-255] Protect submission from being lost if exception occurs in CompleteStep
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4302 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 23:00:05 +00:00
Larry Stone
6a69dd936b [DS-254] Fix response for authorization failure on Bitstream when user is logged-in, also item export
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4301 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 21:24:49 +00:00
Stuart Lewis
b2226a8a54 [DS-328] SWORD service documents do not include atom:generator element
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4300 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 21:16:26 +00:00
Richard Rodgers
501eb99b07 [DS-324] Fix package location
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4299 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 20:03:43 +00:00
Richard Rodgers
13744e07ab [DS-324] Add new dependencies and repo for OpenSearch
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4298 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 19:52:32 +00:00
Richard Rodgers
24355bba36 [DS-324] Add OpenSearch support
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4297 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 19:31:08 +00:00
Richard Rodgers
a04e7880ed [DS-324] Add OpenSearch support
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4296 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 19:21:37 +00:00
Richard Rodgers
463cbfbf9f [DS-324] Add OpenSearch support
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4295 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 19:16:31 +00:00
Richard Rodgers
33e8346ce3 [DS-324] Add OpenSearch servlet
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4294 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 19:15:14 +00:00
Richard Rodgers
36cb5c5010 Add new OpenSearch dependencies
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4293 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 19:10:14 +00:00
Richard Rodgers
535b5451ec [DS-324] Add OpenSearch support
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4292 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 19:09:34 +00:00
Richard Rodgers
a12cd001a2 [DS-324] OpenSearch configuration properties
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4291 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 18:45:01 +00:00
Larry Stone
179f3b6587 [DS-232] parse personal names correctly if there is no space after the comma, in DCPersonName
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4290 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 02:57:36 +00:00
Stuart Lewis
c56d85c7e1 [DS-327] SWORD temp upload directory missing trailling slash
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4289 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-29 02:42:55 +00:00
Stuart Lewis
afd54d17d5 [DS-234] Remove SSL setting (not required)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4287 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-24 23:37:16 +00:00
Richard Rodgers
a53e0f841d [DS-323] Add ItemUpdate - new feature (command-line application)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4282 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-23 23:43:42 +00:00
Richard Rodgers
00461dbdc1 [DS-317] Add configuration properties for Embargo function
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4279 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-22 21:38:25 +00:00
Richard Rodgers
a8267c587b [DS-317] Add support for Embargo function
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4278 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-22 21:31:14 +00:00
Richard Rodgers
ebbe09345a [DS-317] Add Support for Embargo function
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4277 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-22 21:27:54 +00:00
Stuart Lewis
d5a6ed482c [DS-319] - Replace '/dspace/bin/dsrun org.dspace.browse.ItemCounter' with /dspace/bin/itemcounter
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4275 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-22 02:34:47 +00:00
Stuart Lewis
816eec1261 [DS-318] JSPUI: Left over text in edit item about format
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4274 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-21 22:25:03 +00:00
Richard Rodgers
45dfd6740e test check-in embargo
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4273 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-21 20:03:50 +00:00
Stuart Lewis
3bbcaa6c46 [DS-315] Enhance readability of embedded metadata in html head
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4272 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-19 20:08:54 +00:00
Stuart Lewis
0e7299353c [DS-316] Make SWORD app:accepts configurable
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4271 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-19 20:04:33 +00:00
Ben Bosman
921958150d [DS-310] UTF-8 encoding in community and collection text
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4265 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-16 09:16:58 +00:00
Stuart Lewis
ac87493d64 [DS-279] XMLUI Item Mapper will map the same item more than one time
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4264 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-15 03:29:34 +00:00
Stuart Lewis
21ceb87476 [DS-303] Export migrate option incorrectly removes non-handle identifier.uris
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4263 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-15 02:51:47 +00:00
Mark Wood
2a2c4168d1 [DS-274] Larry Stone: Typo in XSL breaks rendering of dri:xref with class
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4262 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-14 19:34:03 +00:00
Ben Bosman
6b189db402 [DS-306] Option to disable mailserver
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4261 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-14 10:48:03 +00:00
Ben Bosman
ff81b39aaa [DS-307] Offer access in AbstractSearch to QueryResults for subclasses
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4260 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-14 10:29:24 +00:00
Ben Bosman
9a68321217 [DS-306] Option to disable mailserver
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4259 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-14 10:18:05 +00:00
Andrea Bollini
37e52ca6ff [DS-260] Template item some times has owningCollection filled and some times not
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4258 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-12 13:17:06 +00:00
Andrea Bollini
46a635c942 Add schema changes required by DS-289 to the postgres SQL update script
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4257 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-12 13:10:15 +00:00
Stuart Lewis
b0714df50e [DS-280] build.xml fails for ant versions below 1.7
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4252 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-09 23:07:35 +00:00
Stuart Lewis
0de6fc39cf [DS-275] License files not listed on Item Summary page
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4251 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-09 23:01:10 +00:00
Graham Triggs
e1fe542237 [DS-265] Fix rare condition where if you had a 4 character value that contains a '-', it would use the length of the string to determine the padding, which would result in an attempt to use a 0 width specification.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4250 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-09 21:23:36 +00:00
Stuart Lewis
4e0ac8e702 [DS-25] SWORD Service Document fails if Collection is untitled
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4249 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-09 09:11:42 +00:00
Stuart Lewis
7f983557bc [DS-52] Factor out common webapp installation - ID: 2042160
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4246 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-04 19:15:53 +00:00
Mark Wood
0464bf3737 [DS-52] Factor common webapp installation tasks out of fresh_install, update targets in ant build.xml
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4245 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-04 13:47:12 +00:00
Stuart Lewis
386c143163 [DS-299] Allow long values to be specified for the max upload request (> 2GB uploads)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4244 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-02 21:10:49 +00:00
Graham Triggs
96bf084057 Allow long values to be specified for the max upload request (for uploading files greater than 2Gb)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4243 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-02 09:12:23 +00:00
Stuart Lewis
0c9663956e [DS-191] metadataschemaregistry_seq is not initialized correctly under Oracle
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4242 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-01 19:22:57 +00:00
Stuart Lewis
49732f2f4c [DS-234] Configurable passing of Javamail parameter settings
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4241 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-09-01 00:31:12 +00:00
Stuart Lewis
1da5764565 [DS-44] Monthly statistics skip first and last of month - SF ID: 2541435
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4240 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-31 22:10:12 +00:00
Stuart Lewis
c26daee063 [DS-291] README update for top level of dspace 1.6.0 package directory
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4236 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-26 21:17:17 +00:00
Stuart Lewis
551fcd54e7 Adjust path to documentation to reflect new layout
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4235 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-26 21:02:39 +00:00
Stuart Lewis
2d48ccca32 [DS-256] Item Export ignores metadata language qualifier
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4234 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-25 08:14:45 +00:00
Stuart Lewis
3b03befc60 [DS-161] Bulk metadata editing - report on number of changes made
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4233 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-25 04:25:20 +00:00
Stuart Lewis
4f5038673f [DS-161] Bulk metadata editing - remove some metadata from default exports (e.g. provenance information)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4232 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-25 03:28:22 +00:00
Stuart Lewis
ecb2a5988b [DS-161] Bulk metadata editing - remove some metadata from default exports (e.g. provenance information)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4231 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-25 03:17:33 +00:00
Stuart Lewis
698576c072 [DS-290] [dspace]/exports is not created during fresh install
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4230 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-25 01:25:16 +00:00
Scott Phillips
7058d92ab9 Updated change log for harvesting support. DS-289
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4229 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-24 21:42:10 +00:00
Scott Phillips
3dacc68256 (Alexey Maslov) OAI-PMH + OAI-ORE Harvesting Patch
http://jira.dspace.org/jira/browse/DS-289

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4228 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-24 21:18:09 +00:00
Stuart Lewis
57ea973114 [DS-271] Make the OAI DC crosswalk configurable
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4210 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-12 22:04:14 +00:00
Tim Donohue
3415aafade Fix for DS-281 : Invalide Link to "Go to DSpace Home" on Page Not Found (XMLUI). Essentially, a trailing slash was needed after the contextPath, so that the link URL did not end up empty for DSpace installs which run off the root context (e.g. http://my.dspace.edu/).
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4209 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-12 17:14:24 +00:00
Ben Bosman
1d5bf800c6 Some people still use ie6
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4197 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-07 13:28:26 +00:00
Andrea Bollini
0b3c7b9fa0 [DS-261] Community Admin JSPUI: porting of the DS-228 patch
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4196 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-06 13:29:46 +00:00
Claudia Juergen
7eae73c1d8 [DS-276] Patch to fix spelling error in Exception page
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4195 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-08-06 05:55:57 +00:00
Claudia Juergen
d40b9ee613 [DS-269] Oracle JDBC connection string wrong in dspace.cfg - ID: 2722093, just a documentation issue
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4171 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-29 12:11:00 +00:00
Claudia Juergen
7c60b49424 [DS-222] Email alerts due to internal errors are not sent, if context is missing
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4170 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-29 08:43:45 +00:00
Claudia Juergen
389c15bd3a [DS-114] Links not working due to trailing white space in dspace.url
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4155 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-28 10:35:54 +00:00
Jeffrey Trimble
4d547abd52 Added for tip icon to alert users in documentation.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4146 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-27 01:55:37 +00:00
Jeffrey Trimble
7e9d5a07b2 Corrected poorly formed table. Renovated typographical presentations.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4145 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-27 01:53:01 +00:00
Mark Diggory
219b4c2291 [DS-247] [DS-243] [DSB-37] cleanup imports.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4111 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-23 23:16:17 +00:00
Mark Diggory
01da35f9d9 [DS-247] [DS-243] [DSB-37] extend functionality of ContextUtil so request object can be used as parameter.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4110 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-23 23:15:35 +00:00
Stuart Lewis
54d6c52a3a [DS-262] Bug in DS-118, new patch included
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4099 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-22 04:11:16 +00:00
Stuart Lewis
fd19d29e5f [DS-258] Item View Thumbnails not displaying in XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4098 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-22 02:09:29 +00:00
Jeffrey Trimble
5b31d58967 Rev. 7.2 to reflect 1.5.2 changes in directory layout and add instructions.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4094 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-19 18:50:59 +00:00
Andrea Bollini
65e6ec3143 [DS-259] Community/collection admin should not to be able to delete their admin group
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4093 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-18 12:51:12 +00:00
Mark Diggory
9958796337 (DS-253) NullPointerException in HttpServletResponseBufferingWrapper (Cocoon bug?)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4090 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-16 00:28:40 +00:00
Claudia Juergen
ad688f0a0b Item Importer - documented the use of non-dc metadata during item import
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4089 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-15 10:30:53 +00:00
Claudia Juergen
fe332866bb [DS-197] Deleting a primary bitstream does not clear the primary_bitstream_id on the bundle table
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4088 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-14 11:18:24 +00:00
Jeffrey Trimble
d9668a6520 Minor typographical errors corrected
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4087 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-14 02:20:30 +00:00
Stuart Lewis
0464acbc7d Put back a change
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4086 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-14 01:47:10 +00:00
Stuart Lewis
7ff0c7d288 Correcting spelling mistakes
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4085 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-14 01:34:56 +00:00
Jeffrey Trimble
957bc58490 git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4084 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2009-07-14 01:00:20 +00:00
Stuart Lewis
b8e24c7954 [DS-252] Interpolate variables in the Subject: line of email templates as well
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4083 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-13 00:27:48 +00:00
Stuart Lewis
3b2d6d4fd3 [DS-161] Bulk metadata editing - fixed issue with invalid collection handles in the incoming csv file
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4082 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-13 00:17:10 +00:00
Stuart Lewis
974358fd98 [DS-249] sub-daily utility script does not pass arguments to Java
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4080 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-09 02:32:03 +00:00
Stuart Lewis
21266f105a [DS-250] Invalid identifers are not escaped
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4079 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-09 02:29:20 +00:00
Claudia Juergen
9e2d4b910c [DS-248] Missing admin column in community table in database-schema.sql and update - community admin patch
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4078 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-08 11:53:25 +00:00
Stuart Lewis
24ff8397c0 [DS-242] Special groups shown for logged in user rather than for user being examined - fix NPE
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4077 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-08 04:34:11 +00:00
Stuart Lewis
6312751e0a [DS-161] Bulk metadata editing - Export from browse screens
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4076 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-08 02:39:49 +00:00
Stuart Lewis
6da2593f00 [DS-161] Bulk metadata editing - Add configuration options to dspace.cfg
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4057 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-07 03:21:29 +00:00
Stuart Lewis
c703b33a2e [DS-242] Special groups shown for logged in user rather than for user being examined
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4056 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-07 00:28:44 +00:00
Stuart Lewis
f565c49775 [DS-161] Bulk metadata editing - export search results as csv
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4055 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-07 00:25:02 +00:00
Kim Shepherd
3a46d1d19d [DS-121] XMLUI Feedback form breaks with multiple hostnames
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4054 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-06 21:51:38 +00:00
Stuart Lewis
43e0afa931 Administer link wrongly active when edit profile is selected
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4020 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-03 03:55:39 +00:00
Stuart Lewis
caffe8ed07 [DS-219] Internal Server error - include login details of user
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3997 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-02 01:47:02 +00:00
Stuart Lewis
8c341b122a [DS-205] Creative Commons - option to set legal jurisdiction
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3996 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-01 23:36:04 +00:00
Kim Shepherd
517a221e3e Update trunk/dspace/CHANGES
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3995 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-01 23:20:35 +00:00
Kim Shepherd
a94d47df6f [DS-198] File descriptions can not be removed/cleared in XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3994 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-01 23:03:07 +00:00
Kim Shepherd
5b9872ee41 [DS-240] Item validityKey not complete
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3992 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-01 21:07:29 +00:00
Stuart Lewis
510d60ca25 [DS-225] dc.description.provenance - public display
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3991 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-07-01 04:30:47 +00:00
Stuart Lewis
9d23f14c1c [DS-213] IPAuthentication extended to allow negative matching
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3990 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-30 22:27:13 +00:00
Stuart Lewis
ee081784df [DS-238] Move item function in xmlui - updated CHANGES file
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3989 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-30 21:58:46 +00:00
Stuart Lewis
9b9d93e056 [DS-161] Bulk metadata editing - addition of [dspace]/bin/ scripts
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3988 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-30 21:53:47 +00:00
Tim Donohue
8d88babaa7 Adding missing flowscript & sitemap configs for DS-228 'Community Admin XMLUI: Delegated Admins' patch - These fully enable the Move Item functionality for XMLUI. Apologies for not getting this code in earlier...seems my NetBeans IDE was at fault and didn't commit these differences.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3987 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-30 16:09:39 +00:00
Graham Triggs
5c68d267fb Fix dspace:layout to use titlekey instead of title
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3986 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-30 14:22:06 +00:00
Stuart Lewis
1ec6725ae6 [DS-209] Context.java turnOffAuthorisationSystem() can throw a NPE
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3985 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-30 02:37:07 +00:00
Stuart Lewis
b9dba44bd7 [DS-204] New -zip option for item exporter and importer / [DS-216] Migrating items that use additional metadata schemas causes an NPE
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3984 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-30 02:33:25 +00:00
Stuart Lewis
dbce1cc890 [DS-161] Bulk metadata editing - remove debug line, and make use of escaped field separator when splitting strings
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3983 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-30 02:27:25 +00:00
Tim Donohue
c05d70a67c Applying second part of "Community Admin XMLUI: Delegated Admins Patch" (DS-228). For some reason not all of the 'dspace-xmlui-api' patch applied properly during the previous commit.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3981 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-29 14:37:47 +00:00
Tim Donohue
1c7affd37a Applying "Community Admin XMLUI: Delegated Admins Patch" (DS-228). This adds delegated Admin capabilities and specifically a Community Administrator role. See Jira issue DS-228 for more specific details, including documentation on the permissions of a System Admin vs. Community Admin vs. Collection Admin. [WARNING:] This patch adds a database_schema_15-16.sql (as it requires a new "admin" column on the 'collection' table). This patch also currently only fully works for the XMLUI (but should not break anything with JSPUI) - Andrea Bollini is working on porting it over to JSPUI.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3980 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-26 17:07:25 +00:00
Stuart Lewis
fd2be53602 [DS-161] Bulk metadata editing
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3954 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-25 03:15:28 +00:00
Claudia Juergen
287c0f079d [DS-231] Missig file (this is just some obsolete use of index-all in the current documentation, corrected the docs)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3884 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-16 14:56:56 +00:00
Graham Triggs
34bb8d4217 Added check so that null values don't cause page to crash
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3868 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-11 13:41:14 +00:00
Ben Bosman
20e896910c [DS-226] confirmation page of edit profile has an invalid link
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3867 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-11 09:53:02 +00:00
Andrea Bollini
caab45e57a [DS-227] Values with double apos doesn't work in dropdown and list input type
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3866 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-10 06:36:13 +00:00
Ben Bosman
a06056dc11 [DS-226] small bugfix
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3865 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-09 19:44:06 +00:00
Andrea Bollini
e2cfb903c5 [DS-223] Submission process show previous button in JSPUI also if the step is the first "visible" step
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3864 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-06 12:30:05 +00:00
Stuart Lewis
67f7f0c52e [DS-221] XMLUI 'current activity' recognises Google Chrome as Safari
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3833 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-02 01:57:28 +00:00
Tim Donohue
8a2b56f36b Fix for [DS-218] Cannot add/remove email subscriptions from Profile page in XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3832 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-06-01 19:17:02 +00:00
Stuart Lewis
6ce5fb0767 [DS-212] NPE thrown during Harvest of non-items when visibility restriction is enabled
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3830 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-27 01:55:55 +00:00
Stuart Lewis
e0cf6cf505 [DS-212] NPE thrown during Harvest of non-items when visibility restriction is enabled
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3829 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-26 02:22:27 +00:00
Stuart Lewis
04ebdbf4a6 [DS-212] NPE thrown during Harvest of non-items when visibility restriction is enabled
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3828 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-26 00:55:19 +00:00
Andrea Bollini
e03c324b72 [DS-199] SWORD module doesn't accept X-No-Op header (dry run)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3825 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-22 09:53:50 +00:00
Stuart Lewis
8c74ad42b3 [DS-212] NPE thrown during Harvest of non-items when visibility restriction is enabled
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3824 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-21 00:10:19 +00:00
Andrea Bollini
04e3850ea6 [DS-206] Input form visibility restriction doesn't work properly
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3823 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-19 18:09:05 +00:00
Stuart Lewis
7c5d3b9061 Add new committers
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3797 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-13 03:20:02 +00:00
Mark Diggory
c7bd0838f7 Adjust Build environment to generate only one snapshot release per module and hardcode versions to reduce chances of overriding them by accident in module addons.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3796 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-13 00:13:33 +00:00
Mark Diggory
9eb48e8162 Adjust SVN repository locations for Maven release plugin.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3768 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-11 21:15:20 +00:00
Mark Diggory
e848bfb838 New location for DSpace Project
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3767 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-11 19:57:57 +00:00
Claudia Juergen
47b2aad946 [DS-118] File preview link during submission leads to page not found
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3763 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-07 13:52:21 +00:00
Stuart Lewis
8b1d849838 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3762 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-07 04:36:47 +00:00
Stuart Lewis
45ca0fab09 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3761 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-07 04:18:02 +00:00
Stuart Lewis
dda551aa1e [DS-200] SWORD module requires the X-Packaging header
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3760 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-05 08:32:14 +00:00
Stuart Lewis
2e7398696b [DS-201] handle.jar upgraded to version 6.2
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3759 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-05 08:27:05 +00:00
Stuart Lewis
3a76e0b4bf [DS-156] File description not available in XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3758 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-30 23:40:25 +00:00
Stuart Lewis
99d6d89079 [DS-195] Allow the primary bitstream to be set in the item importer
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3745 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-28 00:17:07 +00:00
Stuart Lewis
1f9cf8b18c [DS-196] METS exposed via OAI-PMH includes descritpion.provenance information
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3739 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-27 22:26:36 +00:00
Stuart Lewis
4b539b4292 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3738 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 04:32:12 +00:00
Stuart Lewis
7fcd6bce91 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3737 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 04:22:28 +00:00
Stuart Lewis
105700e1be Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3736 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 04:16:22 +00:00
Stuart Lewis
827c639926 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3735 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 04:05:53 +00:00
Stuart Lewis
14f3d3b062 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3734 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 04:00:19 +00:00
Stuart Lewis
e3a5c35a54 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3733 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 03:52:11 +00:00
Stuart Lewis
15237bffc7 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3732 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 03:26:59 +00:00
Stuart Lewis
6a65114e79 Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3731 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 03:20:45 +00:00
Stuart Lewis
a5bfc8774a Update code licence to The DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3730 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-24 03:11:14 +00:00
Brad McLean
5cdc504ce9 Update license to DSpace foundation for future use
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3729 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-23 12:52:12 +00:00
Stuart Lewis
2723669c7d [DS-193] OAI RDF crosswalk fails when DC value is null
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3728 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-23 04:00:26 +00:00
Stuart Lewis
80c1572fff [DS-194] Give METS ingester configuration option to make use of collection templates
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3727 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-23 03:34:04 +00:00
Stuart Lewis
218b1aab41 Update CHANGES for 1.6.0
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3726 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-23 03:26:24 +00:00
Stuart Lewis
00a2279d23 Adjust project poms to 1.6.0-SNAPSHOT, and changed location of svn repo from /branches/dspace-1_5_x/ to /trunk/
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3725 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-23 03:21:52 +00:00
Stuart Lewis
9e844c457c Copying DSpace 1.5.x branch to trunk to start development of v1.6
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3724 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-23 02:36:30 +00:00
Claudia Juergen
a68d37793d just forgot the name
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3722 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-17 13:49:44 +00:00
Claudia Juergen
5120187f32 [DS-190] Portuguese (pt_PT) translation Messages.properties JSP-UI v1.5.2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3721 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-17 13:48:21 +00:00
Claudia Juergen
6a5c0710a0 just removed the umlaut
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3720 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-15 07:55:24 +00:00
Claudia Juergen
dbbd278775 Fix for [DS-188] Misspell exclude.type=indentifier in dstat.cfg
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3719 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-15 07:52:59 +00:00
Mark Diggory
594efc7903 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3718 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 21:06:26 +00:00
Mark Diggory
e990445a2e [maven-release-plugin] prepare release dspace-1.5.2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3716 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 21:05:20 +00:00
Andrea Bollini
274baf4a47 missed entry in CHANGES file
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3715 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 20:52:17 +00:00
Andrea Bollini
8f96431398 added contributor to the Shibboleth patch
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3714 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 20:49:55 +00:00
Mark Diggory
4975bf1a67 [DS-48] shibboleth+dspace1.5.1 patch - ID: 2412723 Commiting dspace3688-ignoreScope-v3.patch (3 kB)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3713 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 20:22:35 +00:00
Brad McLean
3c99f49351 [DS-183] Apply XPDF Filter doc patches and rebuild docs
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3712 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 20:07:34 +00:00
Stuart Lewis
04ecb2c5e9 [DS-182] Speed up SWORD deposits
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3711 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 19:52:28 +00:00
Andrea Bollini
9df41d355d [DS-186] NPE during edit of eperson in XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3710 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 15:17:56 +00:00
Andrea Bollini
f8c30a097f [DS-157] Ukrainian for DSpace 1.5.2 - JSPUI only (gone into google code)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3709 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 14:13:02 +00:00
Andrea Bollini
4d9f9d0ea0 added missed end tag profiles
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3708 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-13 12:51:34 +00:00
Mark Diggory
5e1374b4d6 Change issue management URL to JIRA
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3707 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-12 00:47:42 +00:00
Mark Diggory
106b9c0058 Change issue management URL to JIRA
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3706 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-12 00:33:24 +00:00
Mark Diggory
23cf0406dd [DS-183] XPDF support for filtering PDFs for text extraction/search
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3705 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-11 17:02:24 +00:00
Mark Diggory
47ebe88651 [DS-183] XPDF support for filtering PDFs for text extraction/search
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3704 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-10 03:36:38 +00:00
Mark Diggory
adc949bfd1 Set Keyword substitution across entire project.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3703 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-09 23:58:38 +00:00
Mark Diggory
71f966bce5 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3702 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 22:50:42 +00:00
Mark Diggory
eac7b7c887 [maven-release-plugin] prepare release dspace-1.5.2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3700 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 22:40:47 +00:00
Andrea Bollini
5733504965 [maven-release-plugin] rollback the release of dspace-1.5.2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3699 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 22:34:50 +00:00
Andrea Bollini
31f8b6aa0e [maven-release-plugin] prepare release dspace-1.5.2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3698 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 22:31:54 +00:00
Andrea Bollini
aa829c7633 restore the "force the release:prepare goal to not attempt to build the site"
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3697 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 22:26:32 +00:00
Mark Diggory
6a82d5c0ff [maven-release-plugin] rollback the release of dspace-1_5_2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3696 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 22:08:30 +00:00
Mark Diggory
c9fea90190 [maven-release-plugin] prepare release dspace-1_5_2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3695 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 22:07:28 +00:00
Mark Diggory
8e6f764971 Drop profile activation
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3694 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 21:58:24 +00:00
Mark Diggory
6f10ca8cac [maven-release-plugin] rollback the release of dspace-1.5.2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3693 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 21:54:38 +00:00
Mark Diggory
b30bfb488b [maven-release-plugin] prepare release dspace-1.5.2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3692 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 21:52:06 +00:00
Andrea Bollini
641c37b3f2 [maven-release-plugin] rollback the release of dspace-1.5.2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3691 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 21:33:37 +00:00
Andrea Bollini
64d6918173 [maven-release-plugin] prepare release dspace-1.5.2-rc2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3690 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 21:12:48 +00:00
Andrea Bollini
5e2087c07e force the release:prepare goal to not attempt to build the site
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3689 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-08 20:58:08 +00:00
Mark Diggory
baa26befeb [DS-155] Maven war plugin changes cause war to include libraries as well
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3687 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-07 00:11:05 +00:00
Mark Diggory
49187ebe24 [DS-155] Maven war plugin changes cause war to include libraries as well
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3685 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-06 23:46:14 +00:00
Graham Triggs
65e064f0f5 Fix various critical bugs identified by Findbugs.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3684 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-06 22:52:38 +00:00
Mark Diggory
979bbdc026 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3683 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-06 22:15:05 +00:00
Mark Diggory
3032423006 [maven-release-plugin] prepare release dspace-parent-1.5.2-rc1
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3681 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-06 22:14:11 +00:00
Andrea Bollini
8fa1341264 add reference to JIRA to all CHANGES related to SF - for each issue, I have reported in the JIRA comments the revision where the patch was committed
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3680 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-06 19:32:47 +00:00
Brad McLean
ce7855934f Rename the html and pdf build script to be move obvious. Incorporate
1.5.2 documentation notes from Graham Triggs, Mark Diggory, Larry 
Stone.  Regenerate the html and pdf.



git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3679 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-06 14:38:41 +00:00
Mark Diggory
93abec17ef [DS-154] Make a backup of the config dir on Ant update
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3675 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-06 08:07:43 +00:00
Tim Donohue
09ca5ab0d6 Minor change to log4j.properties. The Checksum Checker log (checker.log) settings should not be additive. In other words, the checksum checker should only log to 'checker.log' and not also to the default 'dspace.log'.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3674 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-03 21:12:49 +00:00
Tim Donohue
321ed0f073 Applying fix for Jira [DS-120] "Cocoon 2.2 'hijacks' the dspace.log file". Essentially moving all Cocoon's log4j configurations into the normal DSpace log4j.properties file. This also adds a separate 'cocoon.log' file for the XMLUI for all logs generated by Apache Cocoon. It also doesn't seem to affect the JSPUI's normal logging. This change also fixes Jira [DS-85] "XMLUI Cocoon logs should not be stored under [xmlui-webapp]/WEB-INF/logs/"
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3673 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-03 20:54:50 +00:00
Graham Triggs
3014bcd75a DS-131 Fix title ordering to ignore leading non-alphanumeric characters
Now uses Marc 21 multi-lingual rules by default

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3672 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-04-01 10:40:35 +00:00
Tim Donohue
a9f75b1dba Applying fix for Jira [DS-132] XMLUI overall UTF-8 encoding is inconsistent and forms do not use UTF-8. This fix also resolves [DS-112] Scandinavian caharacters mess up Front page full text search.
Essentially, I'm adding a Cocoon Filter which forces UTF-8 encoding for all servlet requests.  This was based on recommendations on the Cocoon wiki: http://cocoon.apache.org/2.2/1366_1_1.html   This seems to resolve these issues so that I can now submit/search/browse/edit items which have Scandinavian (or other non-English) characters.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3664 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-31 15:34:29 +00:00
Brad McLean
faff36653d Update headings to 1.5.2, and fix most of the broken internal links.
More to follow.



git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3663 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-31 14:50:55 +00:00
Andrea Bollini
53a56e504a missed jira entries
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3662 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-31 11:18:12 +00:00
Andrea Bollini
6dff029575 [DS-99] Non-admin user and admin menu options (1.5.1 XMUI only) - ID: 2353606
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3661 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-31 09:55:29 +00:00
Andrea Bollini
efaa36dddf [DS-81] Subscription not sent correctly - ID: 2667590
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3660 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-31 08:12:52 +00:00
Andrea Bollini
e9c0e8a761 [DS-92] Bitstream access rights inheritenc, editing in_archive items - ID: 1993036
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3659 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-31 07:30:14 +00:00
Tim Donohue
d0c8954136 Fix for Jira [DS-130] XMLUI Browse by Author doesn't work for names with special characters (for example: é, è, ö, etc.)
Essentially, this just adds a new setting to Cocoon (org.apache.cocoon.containerencoding=UTF-8) which ensures the Cocoon Servlet Container encoding is set to UTF-8.  It also ensures that *all* XMLUI Sitemaps have 'encoding="UTF-8"' set.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3651 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-30 20:34:45 +00:00
Mark Diggory
39d5b11590 [DS-129] OpenURL support exposes dc.description.provenance information
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3650 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-30 18:52:55 +00:00
Andrea Bollini
05399aefae [DS-116] File description not correct
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3649 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-30 14:11:52 +00:00
Andrea Bollini
bd72f32938 [DS-122] Problems with repeatable metadata
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3648 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-30 08:21:36 +00:00
Andrea Bollini
99e6acab6b [DS-115] metadata not showed in verify step
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3647 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-29 17:51:22 +00:00
Andrea Bollini
1d58746e8b [DS-66] bitstream format registry, setting bitstream internal - ID: 1896055
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3646 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-27 10:54:40 +00:00
Andrea Bollini
4b881d9886 [DS-67] Impossible retry/resume after upload a file with internal format
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3645 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-27 10:39:26 +00:00
Andrea Bollini
a600a6eb16 [DS-126] Request to [dspace-base-url]/bitstream throw NPE
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3644 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-27 10:33:26 +00:00
Andrea Bollini
7f1c6b3372 credits for [DS-48] shibboleth+dspace1.5.1 patch - ID: 2412723
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3643 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-27 10:31:38 +00:00
Mark Diggory
b0bf22d495 [DS-48] shibboleth+dspace1.5.1 patch - ID: 2412723
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3642 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-27 04:53:11 +00:00
Mark Diggory
6c412317f7 [DS-64] xmlui selection of authentication method - ID: 2086673 Re-adjustment to use getLoginPage.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3641 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-27 03:31:29 +00:00
Stuart Lewis
3b63800d57 Fix for Jira [DS-127] Item exporter does not export bitsteam descriptions
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3640 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-26 23:37:16 +00:00
Stuart Lewis
4fadd4357b Correct the wrong message tag for migrate button, and move Edit button back to the top right corner
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3639 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-26 20:32:42 +00:00
Mark Diggory
5590b2412b Correct formatting errors introduced in last commit (Eclipse autoformat w/o dspace formatting template in place).
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3636 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 22:12:47 +00:00
Mark Diggory
0b3afa95cd Merge in getCacheSize from previous patch commit.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3635 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 22:04:40 +00:00
Mark Diggory
0ce2581f3f Recover Previous Revision History
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3634 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 21:58:21 +00:00
Mark Diggory
cbb3294107 Remove to prepare for recovery
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3633 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 21:57:29 +00:00
Stuart Lewis
b535879117 [2621423] Add method to instrument Context's cache usage
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3632 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 20:55:07 +00:00
Scott Phillips
d2a0842f53 (Scott Phillips) Removed some debuging statements I left in from my last commit, bad scott....
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3631 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 20:52:52 +00:00
Mark Diggory
262c081224 [DS-94] Verify Configuration Options are still applicable with the Cocoon User community.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3630 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 20:36:08 +00:00
Andrea Bollini
6b44909f39 [DS-106] Save & exit button doesn't properly work in workflow
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3629 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 20:22:31 +00:00
Andrea Bollini
a18832355b [DS-105] Initial Questions button in the progress bar doesn't work in workflow
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3628 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 20:21:19 +00:00
Claudia Juergen
f4b4e725c8 Just a typo
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3627 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 11:28:36 +00:00
Claudia Juergen
e891886632 Changed bug fix entry, my contribution wasn't that significant
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3626 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 11:26:17 +00:00
Andrea Bollini
ef01a162c6 [DS-102] Submission without file possible with the skip upload functionality disabled
[DS-103] Use of the Progress bar button don't save the current page modification
[DS-104] Cancel/save button during edit of a workflow item doesn't work

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3625 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 11:18:53 +00:00
Andrea Bollini
e4a8bfff87 [DS-46] Bug 1617889 Years < 1000 do not display in simple item view - ID: 2524083
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3624 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 09:28:09 +00:00
Andrea Bollini
30812021fa [DS-43] Manakin RSS feed generator cache timeout can't be adjusted - ID: 2593393
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3623 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-23 09:03:14 +00:00
Andrea Bollini
3a3090cd98 [DS-107] DIDL Crosswalk thrown NPE
overwrite previous wrong fix


git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3622 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-22 08:46:02 +00:00
Andrea Bollini
59768e8653 Added default value if no oai.didl.maxresponse property is defined
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3621 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-21 11:57:57 +00:00
Tim Donohue
1f59219b32 [1712125] Allow dsrun and dsrun.bat to use JAVA_OPTS. Previously all JVM options were hardcoded in dsrun scripts. This allows admin to specify JVM options for all command-line scripts using the JAVA_OPTS environment variable.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3620 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-20 20:46:37 +00:00
Tim Donohue
6b057525c4 Minor improvements to messages output by MediaFilterManager. Added item handle information to the "SKIPPED:" and "FILTERED:" messages. Without the item handle it's much more difficult to locate bitstreams which may be having problems filtering, etc.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3619 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-20 16:52:03 +00:00
Claudia Juergen
583273e624 Added missing blanks between label and text value in subsription email.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3618 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-20 09:45:22 +00:00
Claudia Juergen
fd7a9db6de Added missing blanks between label and text value in subsription email.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3617 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-20 09:41:46 +00:00
Andrea Bollini
051ba89fad fix typo in javadoc
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3616 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-20 09:19:44 +00:00
Stuart Lewis
ab70da0771 Adds new functionality to the export scripts: 'migrate' option that strips metadata that will be re-created in the same fashion as the dspace_migrate script. This can be invoked by using the -m or --migrate flag on the export cli script, or with the new JSPUI export (migrate) button. This patch also fixes DS-59.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3615 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-20 02:41:00 +00:00
Stuart Lewis
39bdc2a660 Adds new functionality to the export scripts: 'migrate' option that strips metadata that will be re-created in the same fashion as the dspace_migrate script. This can be invoked by using the -m or --migrate flag on the export cli script, or with the new JSPUI export (migrate) button. This patch also fixes DS-59.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3614 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-20 01:58:38 +00:00
Tim Donohue
fb68bf6f5b Minor Fix: Add an invisible link to the /htmlmap sitemap to the XMLUI footer by default. This allows search engines to be able to find that HTML sitemap link for the out-of-the-box XMLUI.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3613 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-19 19:31:45 +00:00
Andrea Bollini
bfdaa80994 fix wrong file header
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3612 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-19 17:10:10 +00:00
Andrea Bollini
2bfe661bd6 [DS-101] Impossible to complete Registration in JSPUI
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3611 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-19 09:37:57 +00:00
Mark Diggory
c1dca2dce5 [DS-100] XMLUI OpenURL support contributed by the National Evolutionary Synthsis Center (NESCent) and @mire.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3610 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-19 04:01:18 +00:00
Stuart Lewis
a9d518e263 Fix for Jira [DS-98] Key jsp.mydspace.request.export.community not set in Messages.properties
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3609 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-19 02:21:22 +00:00
Tim Donohue
67b74c7081 Fix for Jira [DS-97] XMLUI does not come with a robots.txt out-of-the-box. It also does not provide suggestions for loading global static content.
Added a default robots.txt file for XMLUI.  Also updated Docbook configuration documentation to document the basics on how to add additional global static content (esp. static HTML) to the newly created /src/main/webapp/static/ folder for XMLUI.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3605 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 20:24:59 +00:00
Tim Donohue
1fb610e594 Fix for Jira [DS-96] XMLUI Wing-Framework 'Radio' class doesn't support adding radio buttons which are unselected by default.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3604 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 19:17:27 +00:00
Tim Donohue
bf1fdd525e Minor fixes to look of XMLUI Submission process. In the review information for the DescribeStep, ensure that empty fields are not displayed when reviewing metadata (no reason to display fields that weren't filled out...plus they cause a very long review page). On the "Save or Remove" page, make sure all three buttons are in the same HTML <div>. This allows for easier styling of the buttons (otherwise it's nearly impossible to place them all on the same line).
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3603 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 19:03:58 +00:00
Tim Donohue
051dee3f9e Fix for Jira [DS-95] XMLUI: Visiting an item page with a trailing slash returns a 404 message
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3602 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 17:02:16 +00:00
Tim Donohue
e8a02edf71 Fix for Jira [DS-87] XMLUI file download links break in Google search results if file 'sequence' number changes.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3601 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 16:47:37 +00:00
Andrea Bollini
92f0e74c43 [DS-83] missed to comment the alternative SkipInitialQuestionsStep configuration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3600 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 11:35:13 +00:00
Andrea Bollini
f8e72fd4c6 [DS-83] Hardcoded behaviour of Initial question step in the submission
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3596 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 07:05:13 +00:00
Andrea Bollini
a85d45b9f8 [DS-78] Italian translation xmlui - ID: 1984513 (gone into google code)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3594 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 06:29:31 +00:00
Andrea Bollini
86229ffb27 [DS-64] xmlui selection of authentication method - ID: 2086673
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3593 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-17 06:26:52 +00:00
Mark Diggory
ffbb51b3c7 [DS-93] Upgrade XMLUI to Cocoon 2.2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3590 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-15 02:30:59 +00:00
Scott Phillips
f3fb9d4796 (Scott Phillips) Added the ability to stop or start recording anonymous or bot activity. With this patch it also removes viewing web continuations which are not needed now that you can view current activity on the site.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3589 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-13 22:01:01 +00:00
Scott Phillips
5e5d52d985 (Scott Phillips) Fixed a problem where importing/exporting items multiple times would result in duplicate identifier.uri metadata records being added each time. Now it will check to see if the metadata record exists before adding it.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3588 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-13 17:21:29 +00:00
Andrea Bollini
5d4b5c0b35 [DS-90] Workflow doesn't skipped if the wf group contains empty subgroups
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3587 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-13 10:21:46 +00:00
Andrea Bollini
eeb2621291 [DS-47] Add support for rendering DOI links in JSPUI (1.4, 1.5) - ID: 2521493
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3586 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-13 09:45:24 +00:00
Andrea Bollini
54619f00d3 [DS-88] Anonymous group don't works as subgroup - ID: 1688445
[DS-61] IP Authentication only works on logged in users - ID: 2088431

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3585 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-13 09:38:12 +00:00
Andrea Bollini
c14efdf798 fix wrong indent
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3584 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-13 09:26:47 +00:00
Andrea Bollini
ed6b7136f9 fix minor typo
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3583 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-13 09:25:40 +00:00
Tim Donohue
c356d6fd70 Fix for Jira bug [DS-86] XMLUI Feedback form does not include any protection from spamming. Basically just copied over the same logic that is used already in the JSPUI and tested that it works for XMLUI as well.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3582 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-12 19:09:31 +00:00
Tim Donohue
7b7f1a8a66 Fix for Jira bug [DS-86] XMLUI Feedback form does not include any protection from spamming. Basically just copied over the same logic that is used already in the JSPUI and tested that it works for XMLUI as well.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3581 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-12 19:05:26 +00:00
Andrea Bollini
e3f9025213 [DS-60] netid.toLowerCase() in different classes and methods - ID: 2458187
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3575 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-11 14:33:44 +00:00
Andrea Bollini
8e446e0a1a [DS-58] Double quote problem in some fields of JSPUI (continued) - ID: 2528065
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3574 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-11 13:42:18 +00:00
Andrea Bollini
ff0261284c [DS-84] Improve API for "IgnoreAuthorization" blocks - ID: 1687783
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3573 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-11 11:00:52 +00:00
Andrea Bollini
9b820c2367 [DS-62] Not right encoding for license and extracted texts - ID: 2234532
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3572 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-11 10:14:30 +00:00
Scott Phillips
97095bfe97 (Scott Phillips) Fixed two bugs.
1) Sometimes a null event would get into the event queue which would choke during sorting. I've added protected the sorting and event display from null pointers, and syncronized the event queue manipulation from getting null events into the queue. 

2) Fixed the i18n header from not displaying how many pages maximum its suppost to view, the paramater just wasn't being passed but the i18n tag was expecting it.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3545 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-09 15:02:31 +00:00
Scott Phillips
174edcfbc0 (James Creel) Fixed some minor display bugs on the submission form for initial questions.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3539 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-07 19:08:56 +00:00
Scott Phillips
a148e77720 (Scott Phillips) There is a bug where user supplied query strings that contain ":" were being written straight to the logs unescapped. This would cause the loganalyser to think in some cases that there we logging events of random strings. This patch ensures that all cases where search strings are being written to the logs are escaped to prevent this.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3538 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-07 19:04:20 +00:00
Richard Jones
a7fa86a9ed remove extraneous directory
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3529 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-05 22:46:27 +00:00
Richard Jones
542377fea9 SWORD version 1.3.1 supporting the sword standard version 1.3.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3528 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-05 22:42:52 +00:00
Richard Jones
fdb1c37023 Remove existing common sword code; This will temporarily break the build, but is necessary to smooth the path to including the new code...
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3527 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-05 22:23:33 +00:00
Mark Diggory
d3d54747ad Artifactory considers this to be an incorrect format for Maven identifiers.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3526 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-05 17:41:05 +00:00
Stuart Lewis
f82ce8f974 SF Patch [2655052] Authors re-ordered when item edited
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3520 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-03-02 17:57:49 +00:00
Andrea Bollini
b344a1bbfe [DS-1] Controlled vocab:he URL http://localhost:8080/jspui/subject-search gives internal error and a stack trace in dspace.log
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3516 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-28 12:08:38 +00:00
Andrea Bollini
65aca5a1dd [DS-1] Controlled vocab:he URL http://localhost:8080/jspui/subject-search gives internal error and a stack trace in dspace.log
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3515 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-28 12:01:53 +00:00
Mark Wood
6aadbf53f3 DS-41 Small JSP cleanups
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3507 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-27 19:39:56 +00:00
Andrea Bollini
e851e9c11c [bug SF #2645754 ] SubmissionController is not thread safe
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3506 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-27 16:47:32 +00:00
Andrea Bollini
1ac61679b2 [bug SF #2645754 ] SubmissionController is not thread safe
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3505 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-27 16:45:43 +00:00
Andrea Bollini
2fa025942e [bug SF #2645754 ] SubmissionController is not thread safe
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3504 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-27 16:07:16 +00:00
Claudia Juergen
3a5990e575 moved the locale and supported locale settings in the jspui section as the mulitlingual support beyond mere language catalogues works only for jspui
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3503 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-27 13:18:02 +00:00
Claudia Juergen
492cd2eb9f SF patch [2636514] multilingual input-forms reenabled
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3496 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-25 11:37:07 +00:00
Claudia Juergen
5afaa20568 SF patch [2612034] Remove Edit/Delete Button for Special Groups
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3495 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-25 08:46:59 +00:00
Claudia Juergen
ca4b781586 Fix for SF Bug [2620307] 'ant init_configs' copies wrong dspace.cfg
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3489 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-23 10:18:18 +00:00
Claudia Juergen
2a66fb44e6 SF patch [2612341] Patch for SF Feature Request [2609564] group delete confirm
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3488 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-20 10:49:25 +00:00
Claudia Juergen
eca471a28e SF patch [2615647] Greek translation for xmlui version 1.5.1 submitted to Google code
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3487 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-20 08:15:18 +00:00
Scott Phillips
8b47239949 (Scott Phillips) This patch fixes a bug that occured when DSpace is configured to disallow users from editing their metadata (name, phone number, etc -- typically because shibboleth or LDAP is being used). When configured this way if a user editing their subscriptions they would see their metadata fields be in error because the submit side of the form had an error.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3485 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-18 22:43:03 +00:00
Scott Phillips
90d05abf7b (Scott Phillips) Added protection for displaying statistic reports when some data (almost always incorrect data) will be to long and blow up the page. This can not be fixed by CSS or HTML in the case where the data does not contain any spaces, dashes, periods or other breakable points for a browser to use. In these cases the HTML table may extend far off the page causing all sorts of display problem. This patch adds limits to the size of data being displayed.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3484 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-18 22:39:59 +00:00
Scott Phillips
c697542022 (Scott Phillips) Fixed a bug where each time a collection export was generated a database connection would be leaked.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3483 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-18 22:37:04 +00:00
Claudia Juergen
9021447430 added line feeds to xml sitemaps
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3482 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-17 13:29:28 +00:00
Claudia Juergen
ce6a4c88fc added line feed to avoid having too long lines and made tags lower case
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3481 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-17 12:59:59 +00:00
Claudia Juergen
1240178e0f missing start tag <li>
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3478 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-16 16:42:47 +00:00
Claudia Juergen
b49f2def0d listed a change under the wrong person
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3472 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-11 10:22:17 +00:00
Claudia Juergen
277383c20d SF patch [2560974] for SF feature request [2560839] Make sitemap directory configurable
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3471 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-11 09:54:23 +00:00
Stuart Lewis
c76ddaf003 Added anonymous authentication option to initial bind in LDAPHierarchicalAuthentication
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3448 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-10 09:46:42 +00:00
Robert Tansley
fd317b9bdf (Robert Tansley)
- Add generator metadata to every page to aid search engines in interpreting page and metadata

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3441 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-05 20:03:32 +00:00
Claudia Juergen
5fe1719fce SF Patch #2540683 jspui Thai translation for 1.5.1 (gone into google code)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3439 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-05 15:54:51 +00:00
Claudia Juergen
af83619237 SF Patch #2537799 updated Thai translation (gone into google code)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3438 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-05 15:48:07 +00:00
Robert Tansley
17cf83ab63 (Robert Tansley)
- Include meta tags in head element in XMLUI

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3435 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-04 21:06:54 +00:00
Robert Tansley
6183a396e5 Remove /browse pattern from default robots.txt disallow list, as this prevents any indexing of a DSpace installation by search engines.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3422 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-02 17:56:23 +00:00
Tim Donohue
101ce9c70d Fix for SF Bug [2557654] Search with "%" causes NullPointerException in XMLUI.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3421 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-02 17:35:20 +00:00
Tim Donohue
21edf0d4b7 Fix for SF Bug [2557654] Search with "%" causes NullPointerException in XMLUI.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3420 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-02-02 17:35:12 +00:00
Mark Wood
722fff1518 [2025998] Usage event (statistics) plugin hook
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3402 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-29 15:26:05 +00:00
Tim Donohue
78ac046cc9 Fix for SF bug [2543413] XMLUI Submission forms display validation errors on other fields during add/remove. This was a usability problem that came up in local usability testing of XMLUI, that I thought would be best to fix for 1.5.2.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3399 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-28 17:08:57 +00:00
Tim Donohue
b14f5aa54a Fix for SF bug [2543413] XMLUI Submission forms display validation errors on other fields during add/remove. This was a usability problem that came up in local usability testing of XMLUI, that I thought would be best to fix for 1.5.2.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3398 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-28 17:01:47 +00:00
Stuart Lewis
fa471e5fc6 Fix for SF bug [2155479] Submission verify page handles dc.identifier.* incorrectly
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3396 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-28 07:17:29 +00:00
Tim Donohue
d5654a0530 Fix for SF bug [2541285] Submission Forms don't preserve order of values
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3395 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-27 21:08:24 +00:00
Tim Donohue
8b7694be2d Fix for SF bug [2541285] Submission Forms don't preserve order of values
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3394 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-27 21:08:16 +00:00
Stuart Lewis
b5a010cd7d Inclusion of uketd_dc OAI-PMH crosswalk
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3393 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-27 12:30:15 +00:00
Mark Wood
1acef427b9 Fix SF bug #2002866: return 404, not 200, when page Not Found
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3387 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-21 20:49:47 +00:00
Claudia Juergen
c82ed09095 Fix for SF Bug #2411653 Export Item email as hardcoded strings in sources
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3385 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-21 14:13:38 +00:00
Claudia Juergen
cce4634c32 Fix for SF Bug 2512868 Double quote problem in some fields of JSPUI
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3384 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-21 13:11:30 +00:00
Claudia Juergen
41694b1477 SF Patch #2526153 Hardcoded String in jspui browse
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3383 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-21 13:00:39 +00:00
Claudia Juergen
f06d5feb68 Fix for SF Bug #2413800 Improper display of Umlauts / Encoding of messages_de.xml, the fix itself is in google code dspace-xmlui-lang
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3382 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-21 09:41:11 +00:00
Claudia Juergen
f2dde1768a Pure cosmetics, formatted using the dspace-format.xml
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3378 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-19 17:32:13 +00:00
Claudia Juergen
9cdebe49f6 Fix for SF Bug #1571645 NullPointerException possible in review.jsp
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3377 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-19 12:29:41 +00:00
Stuart Lewis
050dbe280f Fix for SF bug [2086481] xmlui Administrative log in as another eperson
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3376 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-19 07:50:32 +00:00
Stuart Lewis
b7b6d61cff Update (C) date in JSPUI footer from 2008 to 2009
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3375 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-18 21:42:07 +00:00
Stuart Lewis
f9061c2d9f [2513300] Fix for bug [1774958] Nested folders do not export correctly
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3374 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-18 21:35:22 +00:00
Stuart Lewis
0654064bd8 Fix for SF bug [1606439] Exception handling for deleting a metadata field
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3373 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-18 21:22:41 +00:00
Stuart Lewis
1058c7485a Update XMLUI Google Analytics code to match latest tracking code
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3372 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-17 08:06:56 +00:00
Tim Donohue
b05d3e7aac Messages.xml key fix. There was a typo in the name of the key "xmlui.administrative.registries.EditBitstreamFormat.mimetype_help". It caused the key to not be translated properly on the Edit Bitstream Format page in the XMLUI.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3371 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-13 19:53:02 +00:00
Tim Donohue
e0f460799b Messages.xml key fix. There was a typo in the name of the key "xmlui.administrative.registries.EditBitstreamFormat.mimetype_help". It caused the key to not be translated properly on the Edit Bitstream Format page in the XMLUI.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3370 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-13 19:52:58 +00:00
Tim Donohue
612e202a87 Minor bug fix. Had wrong MIME Types for OpenOffice.org formats when I previously applied SF patch #2433852: Add File Format Descriptions to XMLUI 1.5.x
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3369 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-13 19:47:52 +00:00
Tim Donohue
1cc69eb3fb Minor bug fix. Had wrong MIME Types for OpenOffice.org formats when I previously applied SF patch #2433852: Add File Format Descriptions to XMLUI 1.5.x
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3368 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-13 19:47:46 +00:00
Stuart Lewis
2213eb7e73 SF patch [2385187] Fix for toDate method in DCDateSF
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3367 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-09 20:12:18 +00:00
Claudia Juergen
232d477130 Fix for SF bug [2495728] 'My Account' disappears following exports
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3366 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-09 13:59:20 +00:00
Claudia Juergen
e86c32af81 Fix for SF Bug #1745573 Itemmap-browse.jsp throws Exception on items without date
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3364 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-09 08:42:41 +00:00
Claudia Juergen
9d58af96e9 Fix for SF Bug 2493794 Hardcoded Strings in DSQuery
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3363 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-01-08 13:43:36 +00:00
Tim Donohue
bb567d9349 Applying Patch #2477820: DSpace 1.5 XMLUI - Enable METS <amdSec> using crosswalks. Allows you to retrieve Item-level METS files with an <amdSec> section, and generate the administrative metadata using any crosswalk. By default, the <amdSec> is NOT generated, in order to keep METS files small. But, it can be enabled via parameters on querystring (so that it is available to Themes, etc.). See patch description for more information.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3361 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-30 22:56:47 +00:00
Tim Donohue
b0ff41a863 Minor bug fix to PREMISCrosswalk. It should report that it only can disseminate Bitstream objects (via canDisseminate(dso) method), as it currently throws a CrosswalkObjectNotSupported exception whenever it's given anything other than a Bitstream object.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3360 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-30 22:51:46 +00:00
Tim Donohue
581370f1b3 Minor bug fix to PREMISCrosswalk. It should report that it only can disseminate Bitstream objects (via canDisseminate(dso) method), as it currently throws a CrosswalkObjectNotSupported exception whenever it's given anything other than a Bitstream object.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3359 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-30 22:51:40 +00:00
Tim Donohue
8c65148fb5 Applying Patch #2477820: DSpace 1.5 XMLUI - Enable METS <amdSec> using crosswalks. Allows you to retrieve Item-level METS files with an <amdSec> section, and generate the administrative metadata using any crosswalk. By default, the <amdSec> is NOT generated, in order to keep METS files small. But, it can be enabled via parameters on querystring (so that it is available to Themes, etc.). See patch description for more information.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3358 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-30 22:46:36 +00:00
Tim Donohue
8e5d11bf1c Fixed small bug in XMLUI's org.dspace.app.xmlui.cocoon.DSpaceMETSGenerator which caused Repository-wide METS file to fail to generate.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3349 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-29 18:55:28 +00:00
Tim Donohue
a94687436c Fixed small bug in XMLUI's org.dspace.app.xmlui.cocoon.DSpaceMETSGenerator which caused Repository-wide METS file to fail to generate.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3348 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-29 18:55:20 +00:00
Stuart Lewis
690c2e0775 Patch for SF feature request [1587270] Implicit group for all registered users
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3347 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-24 07:35:14 +00:00
Stuart Lewis
09dcb5219b Fix for SF bug [1730606] Restricted Items metadata exposed via OAI
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3346 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-23 19:29:52 +00:00
Tim Donohue
a1675f13fa Applying SF patch #2462293 - Enable Google Sitemaps for XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3345 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-23 18:43:38 +00:00
Tim Donohue
d4e558acef Applying SF patch #2462293 - Enable Google Sitemaps for XMLUI
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3344 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-23 18:31:56 +00:00
Stuart Lewis
494bc2e199 Add Mark H. Wood as commiter in master pom.xml
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3343 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-23 07:54:09 +00:00
Stuart Lewis
96bcde90ad Fix for SF bug [1951859] DSpace Home link style in breadcrumb trail
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3342 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-21 08:41:26 +00:00
Stuart Lewis
eda0fccd48 Fix for SF bug [1896225] HTML tags not stripped in statistics display
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3341 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-18 20:50:36 +00:00
Stuart Lewis
54fc94d9f3 Fix for SF Bug #1968082 SWORD Service Document fails if Collection is untitled
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3340 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-18 20:05:53 +00:00
Stuart Lewis
90071e2528 Patch for SF bug #2016130 checksum checker can not retrieve very large bitstream
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3339 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-18 20:04:31 +00:00
Claudia Juergen
4e59dd511c Fix for SF Bug #1725817 Error in authorization to submit when you add collection.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3338 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-18 09:41:48 +00:00
Claudia Juergen
d22e56554e Fix for SF Bug #2125833 News stored not language dependend
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3337 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-17 12:58:34 +00:00
Claudia Juergen
f5860ba883 Fix for SF Bug #2343849 DSQuery invalid check for empty query string
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3336 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-17 12:55:41 +00:00
Tim Donohue
74b04f63e7 Applying SF patch #2433852: Add File Format Descriptions to XMLUI 1.5.x
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3335 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-16 17:20:42 +00:00
Tim Donohue
68f190bd0c Applying SF patch #2433852: Add File Format Descriptions to XMLUI 1.5.x
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3334 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-16 16:53:42 +00:00
Claudia Juergen
a5f417dc32 Fixed hardcoded metadata language qualifier in DescribeStep to use default.language configuration parameter, this old bug had been reintroduced with the customizable submission system
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3333 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-16 12:45:09 +00:00
Stuart Lewis
5761df3bcc Patch for SF bug #2016130 checksum checker can not retrieve very large bitstream
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3332 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-15 16:51:13 +00:00
Claudia Juergen
fc3938ab18 Fix for SF bugs #2352146 and #1775059 Repeated execution of chooser.jsp exhausts db conn pool
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3331 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-15 14:49:11 +00:00
Andrea Bollini
a9f9d42ede added additionals info about Bollini
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3330 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-11 16:27:42 +00:00
Andrea Bollini
b82f387db4 added additionals info about Bollini
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3329 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-11 16:25:56 +00:00
Andrea Bollini
b7c09dab17 Patch for Bug # 2414062 Auth request delayed using RetrieveServlet
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3328 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-11 16:22:33 +00:00
Andrea Bollini
078d5e39e5 Patch for Bug # 2414062 Auth request delayed using RetrieveServlet
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3327 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-10 15:54:07 +00:00
Claudia Juergen
5b12e2f551 Fixed SF Bug 2225052 Hardcoded String in CollectionViewer
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3326 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-09 13:44:30 +00:00
Claudia Juergen
91bcf097c1 Fixed typo repositry -> repository in email text, nonetheless the text should not be hardcoded a resource bundle should be used.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3325 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-09 13:21:11 +00:00
Claudia Juergen
ecaf6c5591 Added missing header for Exported Ressources in the MyDSpace Page
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3324 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-09 13:14:59 +00:00
Stuart Lewis
4cdb9f49bc (Stuart Lewis) Fix for SF bug [2343281] XHTML Head Dissimination Crosswalk exposes provenance info
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3323 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-07 07:54:21 +00:00
Stuart Lewis
1edb073d20 [2041754] Feature Request #1896717 Registration notification missing information about instance
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3322 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-06 07:29:55 +00:00
Stuart Lewis
fd90f3c669 SF bug [2137425] DSpace 1.5.1(XMLUI) Wrong dir usage of StatisticsLoader
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3321 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-06 07:10:12 +00:00
Stuart Lewis
835c3b8838 Correct small logic error concerning LDAP accounts and email addresses, and removed unused variable
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3317 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-01 20:18:08 +00:00
Stuart Lewis
7341cc5a12 (Stuart Lewis) Fix for SF bug [2164955] DSpace1.5.1(XML) problem with Login to restricted bitstreams
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3316 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-12-01 19:57:08 +00:00
Scott Phillips
f4ac318e25 (ScottPhillips) Fixed bug where collection administrator were not able to edit the roles associated with their collection (i.e. submitters or a workflow step). This was because the function checking permissions relied on the name of the group which was not initialized at the begining of the editing loop properly.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3315 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-11-21 22:23:21 +00:00
Scott Phillips
e26b1bc2c7 (ScottPhillips) Fixed bug where collection administrator were not able to edit the roles associated with their collection (i.e. submitters or a workflow step). This was because the function checking permissions relied on the name of the group which was not initialized at the begining of the editing loop properly.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3314 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-11-21 22:18:46 +00:00
Graham Triggs
65c9da9bea Add an extra index to the metadata (distinct) tables for better scalability.
Add option for 'case-insensitive' metadata browse tables, as a way to avoid the problems of duplicate entries.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3216 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-17 14:42:30 +00:00
Stuart Lewis
7269fe86e1 Removing duplicated dsrun
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3215 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-17 05:53:48 +00:00
Claudia Juergen
f292545ed4 Fixed xmlui.administrative.ItemExport.item.success
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3209 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-16 09:15:19 +00:00
Claudia Juergen
d4aa8e5b08 xhtml compliance missing end /
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3207 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-16 07:00:48 +00:00
Claudia Juergen
2442f26569 xhmtl compliance POST to "post"
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3206 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-16 06:44:42 +00:00
Claudia Juergen
3fe700ca91 xhtml compliance, removed superfluos <tr><td>
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3205 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-16 06:37:03 +00:00
Claudia Juergen
83bb0cab80 xhtml compliance, closed some tags
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3176 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-13 11:03:41 +00:00
Stuart Lewis
f03447bd2f Correcting small spelling mistake
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3171 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-09 05:46:02 +00:00
Claudia Juergen
dc01e2df95 Removed non en log info from old test
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3165 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-07 08:30:56 +00:00
Claudia Juergen
41242a96b0 fixed i18n mulitlingual getting and setting of default license
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3160 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-06 12:55:42 +00:00
Claudia Juergen
b9e5f2e2dd Corrected some XHTML issue
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3153 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-01 08:42:50 +00:00
Claudia Juergen
a8f72c8847 Corrected some XHTML issues
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3152 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-10-01 08:40:08 +00:00
Claudia Juergen
8eb575eefe Corrected missing end / in input-type for xhtml compliance
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3151 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-24 09:28:24 +00:00
Claudia Juergen
d5deb225b7 added missing start <tr> for xhtml compliance
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3150 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-23 11:24:03 +00:00
Claudia Juergen
98828cdef6 replaced & with entitiy for xhtml compliance
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3149 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-23 11:01:02 +00:00
Stuart Lewis
583df36a42 (Yin Latt) - SF bug [1931796] DSpace 1.5 Controlled Vocab (edit-metadata.jsp) not working on first box in twobox
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3148 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-22 13:20:49 +00:00
Stuart Lewis
8eb186cf98 (Stuart Lewis) - Changed scope of ldapGroup variable as it didn't need to be a class variable.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3147 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-22 09:57:38 +00:00
Stuart Lewis
2e31496215 (Stuart Lewis) - Enable ldap.login.specialgroup special group for all LDAP users
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3146 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-22 09:35:25 +00:00
Stuart Lewis
a0722e0f7b (Stuart Lewis) - Remove 'new Context()' where there is already one to use.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3145 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-19 15:32:43 +00:00
Stuart Lewis
899c0108f0 (Stuart Lewis) - Fix issue where users are not getting added to the ldap special group correctly, and adjusted some of the logging levels
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3144 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-19 15:26:33 +00:00
Stuart Lewis
11fcb5f3cf (Stuart Lewis) - Fix issue where users without a netid (users not authenticated via LDAP) can't login because an NPE is thrown in the getSpecialGroups method of the LDAPHierarchicalAuthentication class
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3143 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-19 07:03:49 +00:00
Stuart Lewis
fa16865ae3 (Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini) - [2057378] Hierarchical LDAP support
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3132 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-17 22:40:54 +00:00
Stuart Lewis
8fb92b9f66 [2057231] Refactor LDAPServlet to use Stackable Authentication
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3131 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-17 15:26:25 +00:00
Graham Triggs
45b6af64a3 Fix compilation errors from merge
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3130 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-12 10:30:32 +00:00
Graham Triggs
0a78f6aa64 integrated from branch 1.5
Add missing close() calls to use of TableRowIterator, also add close() to ItemIterator (to close underlying TableRowIterator)


git-svn-id: http://scm.dspace.org/svn/repo/trunk@3129 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-11 16:19:47 +00:00
Graham Triggs
722216d312 integrated from branch 1.5
Fix build problem from missing imports

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3128 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-11 15:15:38 +00:00
Graham Triggs
a84ccd5705 integrated from branch 1.5
Fix various problems with resources potentially not being freed, and other minor fixes suggested by FindBugs

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3127 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-11 15:06:38 +00:00
Mark Diggory
7c71068375 Correct to be pronoun, not contraction.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3126 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-11 01:18:03 +00:00
Mark Diggory
05bb88b693 Publish maven docs to the appropriate location
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3125 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-10 22:57:49 +00:00
Mark Diggory
095c7eb020 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3123 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-10 17:48:21 +00:00
Mark Diggory
36ce082b42 [maven-release-plugin] prepare release dspace-1_5_1
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3121 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-10 17:35:43 +00:00
Mark Diggory
6719669555 [ 2102617 ] Sands Fish - Correct version of code. X509Authentication fails to assign appropriate special groups
http://sourceforge.net/tracker/index.php?func=detail&aid=2102617&group_id=19984&atid=319984

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3120 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-10 16:30:20 +00:00
Graham Triggs
0e87da2bdd integrated from branch 1.5
Replace URLEncoder with StringEscapeUtils for better fix of escaping the hidden query field

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3119 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-10 16:12:05 +00:00
Graham Triggs
76b2fb8827 integrated from branch 1.5
Fix #2034372 - Resorting in JSPUI gives no results

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3118 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-10 15:55:35 +00:00
Brad McLean
d1578931d8 Update documentation to say 1.5.1 instead of 1.5.1Beta
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3117 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-10 13:51:21 +00:00
Mark Diggory
a094d67ebd Additional Documentation of Changes
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3116 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 21:23:27 +00:00
Mark Diggory
79761b7a59 Additional Documentation of Changes
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3115 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 21:09:59 +00:00
Mark Diggory
3c3526419e [ 2102617 ] Sands Fish - X509Authentication fails to assign appropriate special groups
http://sourceforge.net/tracker/index.php?func=detail&aid=2102617&group_id=19984&atid=319984

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3114 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 20:37:55 +00:00
Mark Diggory
1fe7487263 [ 2102580 ] William Hays: Duplicate Handle exception when replacing bitstreams
http://sourceforge.net/tracker/index.php?func=detail&aid=2102580&group_id=19984&atid=119984

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3113 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 20:12:24 +00:00
Mark Diggory
aa6776c2cf [ 2102580 ] William Hays: Duplicate Handle exception when replacing bitstreams
http://sourceforge.net/tracker/index.php?func=detail&aid=2102580&group_id=19984&atid=119984

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3112 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 20:09:45 +00:00
Graham Triggs
33e11c7a5d integrated from branch 1.5
Fix #1714851 - set eperson.subscription.onlynew in dspace.cfg to only include items that are new to the repository, otherwise any modified items will be included

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3111 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 13:45:44 +00:00
Graham Triggs
ce786d09b3 Fix compilation errors from previous merges
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3110 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 13:36:38 +00:00
Graham Triggs
9b0cde4139 integrated from branch 1.5
Fix issue where the browse and search indexes will not be updated correctly if you move an Item, and the Collection you are moving it from is not the owning collection.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3109 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 13:30:33 +00:00
Graham Triggs
1360111a12 integrated from branch 1.5
Fix problem with SWORD not accepting multiple concurrent submissions
- DSpaceSWORDServer as originally written was not re-entrant (DSpace Context was stored as a member variable)

As the deposit / servicedocument servlets maintained a handle to an *instance* of the DSpaceSWORDServer as a private member,
this had the effect of making all concurrent requests use the same instance of DSpaceSWORDServer.

Each attempt to get the servicedocument or make a deposit would therefore overwrite the Context,
so requests currently processing would be attempting to use the wrong Context insance.

This revision moves the Context to variables within the servicedocument / deposit methods.
These are passed as parameters to the called private methods, making this class re-entrant.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@3108 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 13:23:03 +00:00
Graham Triggs
e7c125c5ab integrated from branch 1.5
Add missing key org.dspace.eperson.Subscribe.authors (subscriptions where the items have authors are broken otherwise)

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3107 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 13:15:06 +00:00
Graham Triggs
e8c60a8efc integrated from branch 1.5
Fixed ambiguous column usage

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3106 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 13:12:08 +00:00
Graham Triggs
205e368e8f integrated from branch 1.5
Fix #1963060 Authors listed in reverse order

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3105 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 13:07:19 +00:00
Graham Triggs
bd7406f458 integrated from branch 1.5
Fix #1970852 - XMLUI: Browse by Issue Date "Type in Year" doesn't work

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3104 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 13:03:32 +00:00
Graham Triggs
afd1da316c Fixed compilation errors from branch merge
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3103 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 12:58:04 +00:00
Graham Triggs
e2985e2ecd integrated from branch 1.5
Statistics viewer for XMLUI, based on existing DStat. Note that this generates the view from the analysis files (.dat), does not require HTML report generation.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3102 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 12:45:34 +00:00
Graham Triggs
c95de97f0a integrated from branch 1.5
Make RequestInfo Serializable as it is stored in the current session - otherwise prevents clustering

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3101 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 11:17:33 +00:00
Graham Triggs
e8fde1ea46 integrated from branch1.5
Fixed incorrect downloading of bitstream on withdrawn item
Fixed caching of browse pages
Added addtional logging (JSP compatible)

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3100 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 10:54:18 +00:00
Graham Triggs
c3fab8eaff Add JSPUI compatible log messages to XMLUI transformers
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3099 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 10:25:48 +00:00
Mark Diggory
3905221423 This will get confusing it has a version number in its name.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3098 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-09 04:06:22 +00:00
Tim Donohue
ce13d65459 Applying previous 1.5.x branch commit to Trunk:
Fix for SF bug #2095402 - Non-interactive Submission Steps don't work in JSPUI 1.5

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3094 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-05 17:20:51 +00:00
Tim Donohue
43bdd9d7a7 Fix for SF bug #2095402 - Non-interactive Submission Steps don't work in JSPUI 1.5
(also added some previous SF bugs I fixed since 1.5 to our "CHANGES" document)

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3093 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-05 17:13:40 +00:00
Claudia Juergen
1820c54cde Fix for SF bug #2078324 xmlui hardcoded strings used in UI in General-Handler.xsl
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3092 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-05 11:48:51 +00:00
Claudia Juergen
6fde55594d Applied SF patch #2076066 Review in jspui submission non-dc metadata
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3086 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-04 14:16:42 +00:00
Claudia Juergen
03dd139957 Added the latest bug fixes to the list
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3085 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-04 14:00:11 +00:00
Claudia Juergen
e4301b5549 Fix for SF Bug #2081930 xmlui hardcoded strings in EditGroupForm.java
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3084 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-04 13:43:35 +00:00
Claudia Juergen
fd8fd7686c Fix for SF Bug #2080319 jspui hardcoded strings in browse
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3083 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-04 13:35:17 +00:00
Claudia Juergen
c6b262ac4a Patch for SF bug #2078305 xmlui hardcoded strings used in UI in xmlui-api
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3082 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-04 09:31:52 +00:00
Claudia Juergen
c487e5885d Fix for SF Bug #2090761 Statistics wrong use of dspace.dir for log location
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3081 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-03 09:24:29 +00:00
Aaron Zeckoski
dbaf557eb8 Removed DS2 profile and code from DS1 trunk and moved over to DS2 location
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3072 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-02 09:51:58 +00:00
Aaron Zeckoski
17ddc52fd7 Moving ds2 trunk over
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3071 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-02 09:48:43 +00:00
Aaron Zeckoski
d599b2cfc4 git-svn-id: http://scm.dspace.org/svn/repo/trunk@3069 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2008-09-02 09:46:25 +00:00
Aaron Zeckoski
bb4f2789f8 git-svn-id: http://scm.dspace.org/svn/repo/trunk@3068 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2008-09-02 09:45:43 +00:00
Aaron Zeckoski
20522df276 git-svn-id: http://scm.dspace.org/svn/repo/trunk@3067 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2008-09-02 09:44:43 +00:00
Aaron Zeckoski
5d8d07f92d git-svn-id: http://scm.dspace.org/svn/repo/trunk@3066 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2008-09-02 09:44:04 +00:00
Aaron Zeckoski
cdac38b557 git-svn-id: http://scm.dspace.org/svn/repo/trunk@3065 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2008-09-02 09:43:39 +00:00
Aaron Zeckoski
6afd409e9d dSpace2
Added basic utils and added in initial services
No implementations or tests yet

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3064 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-01 18:17:40 +00:00
Aaron Zeckoski
34be59daf0 dSpace2
Added the basic structure and played around with the POMs some
Added a new 2.0 profile to the base POM

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3063 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-01 11:52:46 +00:00
Aaron Zeckoski
ec6f2fd91f dSpace2
Adding in the initial folder and pom

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3062 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-09-01 10:13:58 +00:00
Mark Diggory
e94e382518 Fix problem with CLI caused in previous commit
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3061 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-29 22:34:50 +00:00
Mark Diggory
ed154a9de9 Fix problem with CLI caused in previous commit
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3061 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-29 22:34:50 +00:00
Mark Diggory
0cec7ea317 Move DSpace Initialization Code to Share DSpaceContextListener in dspace-api. add deprecation to Existing InitServlets and remove obsolete initialization cases from web.xml. (Missed configurationManager changes).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3060 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-29 17:40:28 +00:00
Mark Diggory
e70f544b11 Need to rely on dspace-api-lang to deliver Messages.properties. This was just an example of how to overide it.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3059 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-29 04:18:29 +00:00
Mark Diggory
413329f93c svn ignore
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3058 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-29 03:41:31 +00:00
Mark Diggory
586a141187 Move DSpace Initialization Code to Share DSpaceContextListener in dspace-api. add deprecation to Existing InitServlets and remove obsolete initialization cases from web.xml.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3057 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-29 03:40:24 +00:00
Mark Diggory
0689928801 Switch container encoding to ISO-8859-1 per requirements of the servlet specification.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3056 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-29 03:12:05 +00:00
Mark Diggory
b7439f253c Move DSpace Initialization Code to Share DSpaceContextListener in dspace-api. add deprecation to Existing InitServlets and remove obsolete initialization cases from web.xml.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3055 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-29 03:03:15 +00:00
Mark Diggory
70023eb3dd Reduce issues with getting new updates from snapshot repository.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3054 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-20 00:14:00 +00:00
Brad McLean
f9baf5b5d0 Integrate doc changes from foundation's webmaster@dspace.org backlog
of submissions, and regenerate the docbook, html, and pdf.



git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3053 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-19 13:18:56 +00:00
Stuart Lewis
7ced108cef (Stuart Lewis) Fix for SF bug #2055941 LDAP authentication fails for new users in SWORD and Manakin
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3052 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-17 14:13:19 +00:00
Stuart Lewis
160adab1c9 (Stuart Lewis) Fix for SF bug #2055941 LDAP authentication fails for new users in SWORD and Manakin
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3051 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-17 14:11:20 +00:00
Mark Diggory
8b192d2665 Need more concrete references to these images within the generated content or it fails to render properly on non-unix and web viewvc systems
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3050 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-15 20:53:47 +00:00
Mark Diggory
07988fbcca Need more concrete references to these images within the generated content.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3049 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-15 20:48:48 +00:00
Mark Diggory
5a9287f40a set mime-types on html documentation
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3048 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-15 19:59:52 +00:00
Mark Diggory
b5c880176a [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3047 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-15 04:59:05 +00:00
Mark Diggory
d487cb194c [maven-release-plugin] prepare release dspace-1_5_1-beta
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3045 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-15 04:57:05 +00:00
Brad McLean
147c2e5fcb Update the docbook conversion script. Move the legacy html to a
subdirectory.  Prepare for 1.5.1Beta release.



git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3044 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-13 17:54:00 +00:00
Claudia Juergen
5f7fc9e333 Corrected missing escape of quotations in localized help links
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3043 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-13 14:20:51 +00:00
Brad McLean
2e853aee50 An initial conversion of the html documents to docbook, the script
to do that conversion, and the resulting html and pdf documents.
All of the work is done in subdirectories.
This is for review, comment, and adjustment.  Still to be done:
- Integrate the docbook to html and pdf into the Maven build.
- Merge changes from the Foundation version of docs into HTML.
- Remove the legacy HTML source.
- Remove the generated html and pdf once the build does it.
- Various small formatting cleanups.


git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3042 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-12 12:39:05 +00:00
Claudia Juergen
4f2868a901 Changed Copyright notice in default footer from MIT and HP to DSpace Foundation
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3041 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-12 11:26:23 +00:00
Brad McLean
4256c1fa81 Prepare a location for docbook version of documentation.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3040 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-10 19:44:17 +00:00
Claudia Juergen
1a3d20ecfa Added missing tags for item and collection export
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3039 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-08 09:15:29 +00:00
Graham Triggs
3f3d806ad5 Add missing close() calls to use of TableRowIterator, also add close() to ItemIterator (to close underlying TableRowIterator)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3038 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-07 09:21:47 +00:00
Graham Triggs
6e611d8750 Fix build problem from missing imports
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3037 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-07 07:00:10 +00:00
Graham Triggs
9ae95a94e7 Fix various problems with resources potentially not being freed, and other minor fixes suggested by FindBugs
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3036 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-06 15:52:30 +00:00
Mark Diggory
44cdd859a8 Added better debugging/logging capabilities, option to allow test runs, and correct bug in retrieval of date accessioned metadata value.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3035 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-05 22:39:14 +00:00
Mark Diggory
d8b31e66dd Added better debugging/logging capabilities, option to allow test runs, and correct bug in retrieval of date accessioned metadata value.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3034 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-05 22:39:04 +00:00
Graham Triggs
fd35b68315 Replace URLEncoder with StringEscapeUtils for better fix of escaping the hidden query field
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3033 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-04 09:30:00 +00:00
Mark Diggory
378409fd73 (Sands Fish) Add "Select Primary Bitstream" functionality to submission workflow and fix typos and file formating in messages.xml.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3032 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-01 22:45:03 +00:00
Mark Diggory
d74ba12beb (Sands Fish) Add "Select Primary Bitstream" functionality to submission workflow and fix typos and file formating in messages.xml.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3031 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-01 22:44:50 +00:00
Mark Diggory
e6fa9f7459 (Sands Fish) Add "Select Primary Bitstream" functionality to submission workflow and fix typos and file formating in messages.xml.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3030 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-01 22:44:23 +00:00
Claudia Juergen
75e6bc7c5c SF Bug #1983859 added Foreign Lucene Analyzers to poms
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3029 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-01 10:51:19 +00:00
Claudia Juergen
fdbaca84c9 SF Bug #1989916 - missing LDAP authentication key
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3028 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-01 08:55:39 +00:00
Graham Triggs
a55003b268 Fix #2034372 - Resorting in JSPUI gives no results
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3027 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-08-01 05:31:18 +00:00
Mark Diggory
810b2dc5cc Undo trim on getMetadata in Community that slipped into last commit. Return values need to represent what is truly in database.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3026 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 23:27:07 +00:00
Mark Diggory
5f22cda143 Guard against Community/Collection metadata having only whitespace characters and eliminate cases where null pointer exceptions would be thrown. Improve Collection in trunk to use metadata hashtable for license.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3025 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 23:23:32 +00:00
Mark Diggory
77cb5d313d Guard against Community/Collection metadata having only whitespace characters and eliminate cases where null pointer exceptions would be thrown.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3024 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 23:23:06 +00:00
Tim Donohue
a8de2d395b Fix to Bug #2015988 - Configurable Submission bug in SubmissionController
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3023 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 20:59:03 +00:00
Tim Donohue
8d93f1d810 Fix to Bug #2015988 - Configurable Submission bug in SubmissionController
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3022 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 20:58:42 +00:00
Tim Donohue
d64392faa8 Bug Fix for SF# 2013921 - Movement in Submission Workflow Causes Skipped Steps
THIS PATCH WAS ONLY TESTED ON 1.5.x BRANCH.  However, I've updated it for Trunk to hopefully support the new "resource/*" in the URL of the XMLUI submission process.  It's untested, as I couldn't get Trunk's XMLUI to work.

This changes the Submission workflow to use URLs of the form resource/$/submit/*.continue (where the final part is the continuation id).  In addition, the submission process also makes use of Cocoon's Page Local functionality to save the state of individual pages in the submission process.  This ensures that if the user clicks the browser "back button", previous state information can be reloaded (so the flow no longer gets confused as to the current state).

git-svn-id: http://scm.dspace.org/svn/repo/trunk@3021 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 20:00:44 +00:00
Tim Donohue
0ee9d6b926 Bug Fix for SF# 2013921 - Movement in Submission Workflow Causes Skipped Steps
This changes the Submission workflow to use URLs of the form handle/*/*/submit/*.continue (where the final part is the continuation id).  In addition, the submission process also makes use of Cocoon's Page Local functionality to save the state of individual pages in the submission process.  This ensures that if the user clicks the browser "back button", previous state information can be reloaded (so the flow no longer gets confused as to the current state).

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3020 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 19:56:48 +00:00
Tim Donohue
d6a929d784 Modified XMLUI DIM-Handler to display Collection/Community strengths if they exist within the DIM section of the METS document.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3019 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 15:41:24 +00:00
Tim Donohue
94708485eb Modified XMLUI DIM-Handler to display Collection/Community strengths if they exist within the DIM section of the METS document.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3019 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-31 15:41:24 +00:00
Tim Donohue
aa50995881 Fixing Java 6 specific IOException constructor in previous commit.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3018 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 22:03:08 +00:00
Tim Donohue
01ce2b2378 Fixing Java 6 specific IOException constructor in previous commit.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3017 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 22:02:47 +00:00
Tim Donohue
3755fac3b3 Enabling Community/Collection Item Counts (i.e. strengths) for XMLUI. These counts are stored in the "dc.format.extent" DIM field of the METS document generated for Communities/Collections. By default these counts are NOT displayed by the out-of-the-box themes. However, now they are available for custom themes. After talking with Scott Phillips, it was decided they should only be enabled when the "webui.strengths.cache" flag is enabled in dspace.cfg. Added a note to dspace.cfg to document this.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3016 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 21:49:25 +00:00
Tim Donohue
e54b36429c Updates to Community/Collection Item Counts (i.e. strengths) for XMLUI. After talking with Scott Phillips, it was decided they should only be enabled when the "webui.strengths.cache" flag is enabled in dspace.cfg. Added a note to dspace.cfg to document this..
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3015 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 21:35:42 +00:00
Tim Donohue
ecaece7399 Enabling Community/Collection Item Counts (i.e. strengths) for XMLUI. These counts are stored in the "dc.format.extent" DIM field of the METS document generated for Communities/Collections. By default these counts are NOT displayed by the out-of-the-box themes. However, now they are available for custom themes.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3014 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 20:58:34 +00:00
Mark Diggory
c489a2241f Improve DSIndexer logic in both branches to support removal of items from index when withdrawn from repository. Remove decision making logic in SearchConsumer to allow DSIndexer to make the decisions where its more appropriate.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3013 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 16:02:47 +00:00
Mark Diggory
a673d62f75 Improve DSIndexer logic in both branches to support removal of items from index when withdrawn from repository. Remove decision making logic in SearchConsumer to allow DSIndexer to make the decisions where its more appropriate.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3012 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 16:02:20 +00:00
Mark Diggory
700b9df036 Improve debug logging and correct null pointer errors in Browse and Search Consumers.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3011 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 05:58:25 +00:00
Mark Diggory
11f50df64a Improve debug logging and correct null pointer errors in Browse and Search Consumers.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3010 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 05:55:06 +00:00
Mark Diggory
5920b3bb9f Improve debug logging and correct null pointer errors in Browse and Search Consumers.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3009 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-30 05:54:54 +00:00
James Rutherford
3cc6980155 Committed SF patch #2031532 (with minor modifications) from Peter Coetzee to cache DAOs in the Context object cache. The patch also added generics to Context#fromCache(); unnecessary casts elsewhere in the code can now be removed.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3008 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-29 15:00:22 +00:00
Mark Diggory
c061eaf4df (Sands Fish) Provides fix for AuthenticationUtil where users ID's are not properly compared. As corrects issue with logged in user not having appropriate rights to be in this particular flowscript once logged in as. Eliminates need for user to do "double-logout".
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3007 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-24 21:58:58 +00:00
Mark Diggory
23acebe943 (Sands Fish) Provides fix for AuthenticationUtil where users ID's are not properly compared. As corrects issue with logged in user not having appropriate rights to be in this particular flowscript once logged in as. Eliminates need for user to do "double-logout".
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3006 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-24 21:58:42 +00:00
Mark Diggory
29ff58270c Correct Copy/Paste error in configuration.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3005 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-23 16:40:55 +00:00
Mark Diggory
9af315076e Correct Copy/Paste error in configuration.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3004 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-23 16:40:47 +00:00
Mark Diggory
bb92c12537 Correct Problems where Search and Browse Consumers do not properly update Indexes when Items are Added or Removed from Collections. (force reindexing).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3003 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-17 22:27:29 +00:00
Mark Diggory
5f38f530e5 Correct Problems where Search and Browse Consumers do not properly update Indexes when Items are Added or Removed from Collections.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3002 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-17 22:24:53 +00:00
Mark Diggory
ecc74dade7 Correct Problems where Search and Browse Consumers do not properly update Indexes when Items are Added or Removed from Collections.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@3001 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-17 22:24:31 +00:00
Mark Diggory
27ca5f780b Correct Problems where Search and Browse Consumers do not properly update Indexes when Items are Added or Removed from Collections.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3000 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-17 22:24:03 +00:00
Mark Diggory
5a1c544c33 Correct documentation on PDFBox temp file contents.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2999 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-17 03:09:24 +00:00
Mark Diggory
00749dd0b2 Correct documentation on PDFBox temp file contents.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2998 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-17 03:09:15 +00:00
Mark Diggory
1e84e08c91 Fix NullPointerException cause by nullified Context object in LNI map item to new collection.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2997 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-17 03:06:03 +00:00
Mark Diggory
036ed9fa0e Fix NullPointerException cause by nullified Context object in LNI map item to new collection.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2996 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-17 03:05:52 +00:00
Graham Triggs
8424f0ccb4 Fix #1714851 - set eperson.subscription.onlynew in dspace.cfg to only include items that are new to the repository, otherwise any modified items will be included
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2995 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-15 08:19:31 +00:00
Stuart Lewis
e2b80cc4a2 (Stuart Lewis) Updated upgrade instructions to include step for copying the new registration email
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2994 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-10 08:14:53 +00:00
Mark Diggory
05db166e63 Printing out the Stacktrace should always be done... Its nice to know why and where there was an exception.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2993 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-10 04:13:53 +00:00
Mark Diggory
a2afc286cd 1.) Adjust Logging in DAVServlet so that errors can actually be seen in the server logs.
2.) Remove throws ServletException from DAVResource API where it is never ever thrown.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2992 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-10 04:12:56 +00:00
Mark Diggory
b5c7928e81 1.) Adjust Logging in DAVServlet so that errors can actually be seen in the server logs.
2.) Remove throws ServletException from DAVResource API where it is never ever thrown.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2991 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-09 23:51:24 +00:00
Mark Diggory
7ceeacd0fc Printing out the Stacktrace should always be done... Its nice to know why and where there was an exception.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2990 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-09 21:52:42 +00:00
Mark Diggory
0d603e5216 Block Basic Authentication "details" from being exposed in dspace logs.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2989 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-09 17:41:06 +00:00
Mark Diggory
d3b3024439 Block Basic Authentication "details" from being exposed in dspace logs.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2988 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-09 17:40:58 +00:00
Mark Diggory
2cfd2c689b Block Basic Authentication "details" from being exposed in dspace logs.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2987 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-09 17:40:37 +00:00
Graham Triggs
fbfe1c2471 Fix issue where the browse and search indexes will not be updated correctly if you move an Item, and the Collection you are moving it from is not the owning collection.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2986 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-09 15:40:29 +00:00
Scott Phillips
c785add656 (Scott Phillips) Fixed bug where users could not finish registering nor reset their password because the authentication method signatures were changed. This patch has only been tested against 1.5 branch.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2985 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-08 16:05:34 +00:00
Scott Phillips
18eb47b96d (Scott Phillips) Fixed bug where users could not finish registering nor reset their password because the authentication method signatures were changed. This patch has only been tested against 1.5 branch.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2984 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-08 16:04:56 +00:00
Stuart Lewis
0c057e80c7 (Stuart Lewis / Claudia Juergen) Updated installation and configuration documents for new statistics scripts, and removed references to Perl
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2983 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-08 13:56:44 +00:00
Mark Diggory
366b09a70f Making search field descriptions more specific to Communities and Collections.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2982 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-08 04:53:45 +00:00
Mark Diggory
8516caead8 (Bill Hays, Mark Diggory -MIT Libraries) Close InputStreamReaders explicitly to release any file handles back to OS. Originally based on patch provided by Bill Hays.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2981 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-07 23:47:02 +00:00
Mark Diggory
473d19fac9 (Bill Hays, Mark Diggory -MIT Libraries) Close InputStreamReaders explicitly to release any file handles back to OS. Originally based on patch provided by Bill Hays.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2980 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-07 23:46:56 +00:00
James Rutherford
61ba0de4ea Cleaned up the exception handling a bit (removed remnants of debugging code that shouldn't have made it into trunk).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2979 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-07 10:22:18 +00:00
Mark Diggory
58525d9be1 Use urn:uuid: where more appropriate.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2978 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-05 06:15:19 +00:00
Mark Diggory
e19e380e98 Adding ability to get all ResourcePolicies independent of Group or Action ID.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2977 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-04 19:21:05 +00:00
Graham Triggs
ff790eb38a Fix problem with SWORD not accepting multiple concurrent submissions
- DSpaceSWORDServer as originally written was not re-entrant (DSpace Context was stored as a member variable)

As the deposit / servicedocument servlets maintained a handle to an *instance* of the DSpaceSWORDServer as a private member,
this had the effect of making all concurrent requests use the same instance of DSpaceSWORDServer.

Each attempt to get the servicedocument or make a deposit would therefore overwrite the Context,
so requests currently processing would be attempting to use the wrong Context insance.

This revision moves the Context to variables within the servicedocument / deposit methods.
These are passed as parameters to the called private methods, making this class re-entrant.


git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2976 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-07-02 13:03:48 +00:00
Stuart Lewis
c67034d6d4 (Stuart Lewis) Changed SWORD config key from server-class to sword-server-class to bring it in line with the master SWORD code in the SWORD-APP SVN repository.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2975 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-26 05:51:57 +00:00
Scott Phillips
5fd5a9ff1c Jay Paz (SF#1898241) Additional fixes to patch to enable reuse of methods.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2974 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-25 19:31:06 +00:00
Scott Phillips
bbf15f17b5 Jay Paz (SF#1898241) Additional fixes to patch to enable reuse of methods.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2973 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-25 19:30:18 +00:00
Scott Phillips
f9e13057a3 (ScottPhillips) Added the ability to manage sessions with site wide alerts to prevent users from authenticating. This will help administrators when the system requires maintaince. They can leave the site up and functioning while restricting logins to ensure that no items are submitted or other state changes. (This patch has only been tested on the 1.5 branch)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2972 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-25 00:26:41 +00:00
Scott Phillips
c3ba3294be (ScottPhillips) Added the ability to manage sessions with site wide alerts to prevent users from authenticating. This will help administrators when the system requires maintaince. They can leave the site up and functioning while restricting logins to ensure that no items are submitted or other state changes.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2971 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-25 00:25:56 +00:00
Scott Phillips
59e4c326cf ScottPhillips: Fixes a bug where the ability to edit an item durring workflow step 2 is not displayed.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2970 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-24 21:31:50 +00:00
Scott Phillips
f1a495552a ScottPhillips: Fixes a bug where the ability to edit an item durring workflow step 2 is not displayed.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2969 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-24 21:31:06 +00:00
Scott Phillips
eb717aa6e1 Jay Paz (SF#1898241) Add item Export from jspui and xmlui.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2968 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-24 21:08:28 +00:00
Scott Phillips
0292f77157 ScottPhillips: Fixes a bug where community and collection logos do not appear because they do not have names.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2967 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-24 21:06:12 +00:00
Scott Phillips
f7e0c054b9 Jay Paz (SF#1898241) Add item Export from jspui and xmlui. I can't say everything works as not everything on trunk works, but it works on 1.5
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2966 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-24 21:02:04 +00:00
Scott Phillips
7858eb3bf1 ScottPhillips: Fixes a problem where community and collection logos do not appear.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2965 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-24 20:58:54 +00:00
Stuart Lewis
5d58d5500d (Stuart Lewis) Corrected one line of upgrade instructions (incorrect path for stat files to copy)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2964 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-17 14:12:24 +00:00
Graham Triggs
b62b05f189 Add missing key org.dspace.eperson.Subscribe.authors (subscriptions where the items have authors are broken otherwise)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2963 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-17 13:23:57 +00:00
Mark Diggory
2f3b41e795 correct linking on pages when xmlui is the ROOT webapplication
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2962 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-12 00:21:52 +00:00
Mark Diggory
edaa197096 correct linking on pages when xmlui is the ROOT webapplication
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2961 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-12 00:20:28 +00:00
Stuart Lewis
d82d24c3ba (Zuki Ebetsu / Stuart Lewis) [1990660] SWORD Service Document are malformed / Corrected Atom publishing MIME types
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2960 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-11 11:11:05 +00:00
Stuart Lewis
aa2df4c39b Stuart Lewis - [ 1947036 ] Patch for SF Bug1896960 SWORD authentication and LDAP + [ 1989874 ] LDAPAuthentication pluggable method broken for current users
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2959 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-11 09:40:51 +00:00
Graham Triggs
40984350a4 Fixed ambiguous column usage
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2958 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-09 10:05:29 +00:00
Graham Triggs
07069e8d0f Fix #1963060 Authors listed in reverse order
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2957 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-07 20:59:20 +00:00
Graham Triggs
2d4b527b99 Fix #1970852 - XMLUI: Browse by Issue Date "Type in Year" doesn't work
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2956 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-06 14:05:39 +00:00
Graham Triggs
d4e859fcd3 Statistics viewer for XMLUI, based on existing DStat.
Note that this generates the view from the analysis files (.dat), does not require HTML report generation.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2955 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-06 11:06:09 +00:00
Stuart Lewis
11b9a0b588 Stuart Lewis - Fixed issue reported by Gary Browne relating to old messages still appearing in the stat scripts.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2954 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-06 05:16:12 +00:00
Mark Diggory
d7ca0b0fb7 correct issue with sitemap redirection of mydspace uri. Better solution, move up into webapp sitemap where it can be caught and issued prior to aspect activation. Placing in aspects is effected by aspect ordering. Its not possible to predictably redirect from within aspect pipelines.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2953 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-05 23:03:51 +00:00
Mark Diggory
9388fd95a9 correct issue with sitemap redirection of mydspace uri. Better solution, move up into webapp sitemap where it can be caught and issued prior to aspect activation. Placing in aspects is effected by aspect ordering. Its not possible to predictably redirect from within aspect pipelines.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2953 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-05 23:03:51 +00:00
Mark Diggory
2e7da0836b correct issue with sitemap redirection of mydspace uri.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2952 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-05 22:34:27 +00:00
Mark Diggory
1de52672f6 correct issue with sitemap redirection of mydspace uri.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2952 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-06-05 22:34:27 +00:00
Graham Triggs
cc604e0ed3 Added cleanup listeners. Updated Fileupload and IO dependencies to fix occassional upload problems, and improve application cleanup.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2951 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-28 15:22:31 +00:00
Tim Donohue
7e209122af Removing HREFs in Update documentation that accidentally reference Scott's filesystem.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2950 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-28 14:49:49 +00:00
Tim Donohue
a2515132de 1.5 upgrade instructions were missing Metadata Registry updates necessary to support SWORD.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2949 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-27 21:47:54 +00:00
Graham Triggs
6ae60a3954 Fixed incorrect downloading of bitstream on withdrawn item
Fixed caching of browse pages
Added addtional logging (JSP compatible)

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2948 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-25 20:51:47 +00:00
Mark Diggory
c2ddaf2e61 To be consistent with JSPUI Only show top level communities at top level search.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2947 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-24 05:44:15 +00:00
Mark Diggory
5b54e5a9ec To be consistent with JSPUI Only show top level communities at top level search.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2947 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-24 05:44:15 +00:00
Graham Triggs
6d124c10ca Add JSPUI compatible log messages to XMLUI transformers
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2946 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-23 22:49:36 +00:00
Mark Diggory
29981a8134 Add serlet-api to overlay wars to reduce compile time errors when adding classes
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2945 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-23 05:59:11 +00:00
Mark Diggory
883655d818 Add serlet-api to overlay wars to reduce compile time errors when adding classes
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2944 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-23 05:55:15 +00:00
Mark Diggory
0000cabb00 Add serlet-api to overlay wars to reduce compile time errors when adding classes
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2944 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-23 05:55:15 +00:00
Mark Diggory
7a3def94c5 Drop the use of pluginRepository from 1.5.x Branch to eliminate warning in build process.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2943 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-22 23:45:53 +00:00
Graham Triggs
b3392e1d32 Make RequestInfo Serializable as it is stored in the current session - otherwise prevents clustering
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2942 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-20 15:19:21 +00:00
Graham Triggs
17cd67dd93 Make RequestInfo Serializable as it is stored in the current session - otherwise prevents clustering
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2941 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-20 15:18:41 +00:00
Graham Triggs
071bee15c6 Make config Serializable as it is stored in the current session - otherwise prevents clustering
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2940 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-19 15:15:13 +00:00
Graham Triggs
94a897d12a Make config Serializable as it is stored in the current session - otherwise prevents clustering
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2939 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-19 15:14:27 +00:00
Mark Diggory
16b350833d Correct issues in feed generation where description value is overwritten and only the first instance of a field is included in the description.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2938 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-18 18:25:28 +00:00
Mark Diggory
60d3e6ce59 Correct issues in feed generation where description value is overwritten and only the first instance of a field is included in the description.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2938 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-18 18:25:28 +00:00
Mark Diggory
dcff318d76 redirect mydspace to submissions if encountered (approval notices from workflow still contain this path).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2937 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-16 17:09:44 +00:00
Mark Diggory
58f35ee427 redirect mydspace to submissions if encountered (approval notices from workflow still contain this path).
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2937 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-16 17:09:44 +00:00
Mark Diggory
8e5d718bba Adjust Advanced Search to use search properties from dspace.cfg for determining terms available to users. Add common Messages for some commonly used search indexes.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2936 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-15 20:48:08 +00:00
Mark Diggory
e12dfd5c7c Adjust Advanced Search to use search properties from dspace.cfg for determining terms available to users. Add common Messages for some commonly used search indexes.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2936 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-15 20:48:08 +00:00
Mark Diggory
a5b1a8b937 add to svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2935 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-14 23:21:45 +00:00
Mark Diggory
835e337206 add to svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2934 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-14 23:21:24 +00:00
Mark Diggory
7099fc2fe0 Protect against null pointer when bitstream has no name. See:
http://sourceforge.net/tracker/index.php?func=detail&aid=1939278&group_id=19984&atid=119984

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2933 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-14 18:23:33 +00:00
Mark Diggory
d98d07e898 PRotect against null pointer when bitstrema has no name. See:
http://sourceforge.net/tracker/index.php?func=detail&aid=1939278&group_id=19984&atid=119984

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2932 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-14 18:17:48 +00:00
Graham Triggs
3c6969572d Update db dependencies to remove problem with Thread creation / locking in -pool
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2931 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-14 11:51:30 +00:00
Graham Triggs
901ff568e1 Update db dependencies to remove problem with Thread creation / locking in -pool
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2930 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-14 11:48:41 +00:00
Graham Triggs
7b84dc8874 Slight cleanup of how DBCP driver is referenced
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2929 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-08 11:30:18 +00:00
Graham Triggs
ce557ac337 Slight cleanup of how DBCP driver is referenced
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2928 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-08 11:29:44 +00:00
Graham Triggs
d8fe136cce Improved cleanup of database resources when web application is unloaded
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2927 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-07 16:17:04 +00:00
Graham Triggs
b3f63045a8 Improved cleanup of database resources when web application is unloaded
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2926 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-07 16:15:51 +00:00
Graham Triggs
0294d58997 Clean up use of ThreadLocal with finally block in DSpaceCocoonServlet and more recent revision of logkit
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2925 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-07 10:19:52 +00:00
Graham Triggs
ba898acd29 Clean up use of ThreadLocal with finally block in DSpaceCocoonServlet and more recent revision of logkit
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2924 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-05-07 10:19:19 +00:00
Tim Donohue
af9ae0cde6 Copying recent dspace.cfg change from 1.5.x branch to Trunk:
Despite being available configs in 1.5, these two 'pdffilter.' configurations were missing from the 1.5 dspace.cfg file.   I've added them, but they are commented out by default.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2923 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-23 17:15:59 +00:00
Tim Donohue
7cc9047c60 Despite being available configs in 1.5, these two 'pdffilter.' configurations were missing from the 1.5 dspace.cfg file. I've added them, but they are commented out by default.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2922 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-23 15:18:21 +00:00
Richard Jones
5c9cda751d minor modifications to group membership analysis so that it actually works
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2921 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-17 16:54:18 +00:00
Richard Jones
5f79aa75a3 enable the sword overlay module
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2920 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-17 14:52:23 +00:00
Richard Jones
3d5d1a8029 minor re-jigging of sword module pom to line up with other module poms
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2919 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-17 10:11:06 +00:00
Mark Diggory
a331296927 Add back in more difficult changes left out of previous merge from 1.5.x branch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2918 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-17 06:07:40 +00:00
Mark Diggory
de52d398bd Block out these methods until the dspace-api merge issues can be properly resolved.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2917 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-17 06:05:27 +00:00
Mark Diggory
e46f93dab1 Block out these methods until the dspace-api merge issues can be properly resolved.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2916 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-17 06:04:52 +00:00
Mark Diggory
caa5061308 Correct Checker where I18N was removed.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2915 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 14:59:25 +00:00
Mark Diggory
300d029b78 Fix merged handle cases and odd merge placements.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2914 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 14:47:20 +00:00
Mark Diggory
03d73999e4 change method exposure and remove unused I18N class.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2913 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 14:46:11 +00:00
Richard Jones
f914bcd7fa modify the poms to enable sword (which now compiles, but is as yet untested) and disable xmlui (which currently doesn't build)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2912 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 14:39:04 +00:00
Richard Jones
4ea0b2f94c changes to bring SWORD into line with current working practices on the trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2911 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 14:32:35 +00:00
Richard Jones
9c3f4c2dc3 add an identifier service to allow identifiers with arbitrary base urls to be created which override the default configuration set urls
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2910 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 14:28:39 +00:00
Mark Diggory
4eef061ac2 Fix merge errors in pom files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2909 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 13:47:18 +00:00
Richard Jones
8b8b1b573c introduce basic PURL Partial Redirect identifier service to DSpace. Currently I have left this and Handles activated simultaneously so that every item will get a handle and a purl as well as its usual UUID. Purls are currently set as preferred URL namespace. For the Purls to actually work you will need to register your purl.partial-redirect.prefix with purl.org.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2908 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 10:48:43 +00:00
Richard Jones
2558743436 fix jspui display bug for multiple external identifiers
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2907 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 10:30:36 +00:00
Richard Jones
d0d385b44d fix UUID resolving bug introduced during refactoring
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2906 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 10:29:31 +00:00
Mark Diggory
e34a1eb008 Merge back from 1.5.x branch to trunk for LNI
r10061@mark-diggorys-computer-2 (orig r2798):  mdiggory | 2008-03-10 16:45:36 -0700
 1.) Moving language-packs to dspace-sandbox. See:  http://dspace-sandbox.googlecode.com/svn/modules/dspace-api-lang/trunk/
 2.) Adjusting dependencies and dspace-api-lang project name
 3.) Cleaning up versioning in poms, removing uneccessary dependencies and version tag
 4.) consolidating wars generated so that dspace-xxx-webapp wars are skinny by default.
 r10064@mark-diggorys-computer-2 (orig r2801):  ScottPhillips | 2008-03-10 18:59:40 -0700
 [maven-release-plugin] prepare release dspace-1.5-beta2
 r10066@mark-diggorys-computer-2 (orig r2803):  ScottPhillips | 2008-03-10 19:00:23 -0700
 [maven-release-plugin] prepare for next development iteration
 r10087@mark-diggorys-computer-2 (orig r2809):  tdonohue | 2008-03-11 14:34:43 -0700
 Force assembly to use 2.2-beta-1, so that everything works on Maven 2.0.8
 r10193@mark-diggorys-computer-2 (orig r2855):  ScottPhillips | 2008-03-18 11:48:27 -0700
 [maven-release-plugin] prepare release dspace-1_5-rc1
 r10195@mark-diggorys-computer-2 (orig r2857):  ScottPhillips | 2008-03-18 11:51:15 -0700
 [maven-release-plugin] prepare for next development iteration
 r10229@mark-diggorys-computer-2 (orig r2867):  ScottPhillips | 2008-03-24 19:25:48 -0700
 [maven-release-plugin] prepare release dspace-1_5
 r10231@mark-diggorys-computer-2 (orig r2869):  ScottPhillips | 2008-03-24 19:26:55 -0700
 [maven-release-plugin] prepare for next development iteration


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2905 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-16 00:00:43 +00:00
Mark Diggory
ada9d1d904 Merge back from 1.5.x branch
r10061@mark-diggorys-computer-2 (orig r2798):  mdiggory | 2008-03-10 16:45:36 -0700
 1.) Moving language-packs to dspace-sandbox. See:  http://dspace-sandbox.googlecode.com/svn/modules/dspace-api-lang/trunk/
 2.) Adjusting dependencies and dspace-api-lang project name
 3.) Cleaning up versioning in poms, removing uneccessary dependencies and version tag
 4.) consolidating wars generated so that dspace-xxx-webapp wars are skinny by default.
 r10062@mark-diggorys-computer-2 (orig r2799):  mdiggory | 2008-03-10 17:36:45 -0700
 getting project name consistent with other module projects.
 r10064@mark-diggorys-computer-2 (orig r2801):  ScottPhillips | 2008-03-10 18:59:40 -0700
 [maven-release-plugin] prepare release dspace-1.5-beta2
 r10066@mark-diggorys-computer-2 (orig r2803):  ScottPhillips | 2008-03-10 19:00:23 -0700
 [maven-release-plugin] prepare for next development iteration
 r10193@mark-diggorys-computer-2 (orig r2855):  ScottPhillips | 2008-03-18 11:48:27 -0700
 [maven-release-plugin] prepare release dspace-1_5-rc1
 r10195@mark-diggorys-computer-2 (orig r2857):  ScottPhillips | 2008-03-18 11:51:15 -0700
 [maven-release-plugin] prepare for next development iteration
 r10229@mark-diggorys-computer-2 (orig r2867):  ScottPhillips | 2008-03-24 19:25:48 -0700
 [maven-release-plugin] prepare release dspace-1_5
 r10231@mark-diggorys-computer-2 (orig r2869):  ScottPhillips | 2008-03-24 19:26:55 -0700
 [maven-release-plugin] prepare for next development iteration


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2904 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-15 23:58:53 +00:00
Mark Diggory
78f5211cd5 Merging changes from 1.5.x to trunk for "dspace" project
r9930@mark-diggorys-computer-2 (orig r2763):  mdiggory | 2008-02-28 12:40:47 -0800
 Needs to look for SNAPSHOT version as well until released.
 r9931@mark-diggorys-computer-2 (orig r2764):  mdiggory | 2008-02-28 12:57:28 -0800
 Qualifying the location with ${basedir} assures that build will work in both top level and inside the dspace directory.
 r9932@mark-diggorys-computer-2 (orig r2765):  mdiggory | 2008-02-28 15:33:29 -0800
 Undo previous commit and adjust release management profiles.  We cannot currently build whole project from top level.
 r9968@mark-diggorys-computer-2 (orig r2772):  mdiggory | 2008-02-29 13:49:42 -0800
 fix rpoject version until release can be figured out.
 r9986@mark-diggorys-computer-2 (orig r2781):  ScottPhillips | 2008-03-03 16:46:49 -0800
 (Scott Phillips) Removed useless common problem.
 r9987@mark-diggorys-computer-2 (orig r2782):  ScottPhillips | 2008-03-03 17:41:06 -0800
 (Scott Phillips) SF#1896186 - mail.charset not documented in dspace.cfg
 r9988@mark-diggorys-computer-2 (orig r2783):  ScottPhillips | 2008-03-03 19:20:21 -0800
 (Scott Phillips) webui.content_disposition_threshold -> xmlui.content_disposition_threshold 
 r9993@mark-diggorys-computer-2 (orig r2788):  ScottPhillips | 2008-03-03 21:48:48 -0800
 (Scott Phillips) Added support for xmlui.supported.locales parameter so that an administrator can choose which languages to deploy Manakin in.
 r10033@mark-diggorys-computer-2 (orig r2791):  grahamtriggs | 2008-03-07 04:04:08 -0800
 Fix Oracle upgrade script
 r10035@mark-diggorys-computer-2 (orig r2793):  ScottPhillips | 2008-03-07 09:33:32 -0800
 (Scott Phillips) SF#1908952 - Office 2007 formats cannot be added to FormatRegistry
 r10036@mark-diggorys-computer-2 (orig r2794):  ScottPhillips | 2008-03-07 11:53:12 -0800
 (Scott Phillips) Added OpenOffice document formats to the default format registry.
 r10037@mark-diggorys-computer-2 (orig r2795):  mdiggory | 2008-03-07 15:16:10 -0800
 rename generated webapps and force assembly to use 2.2-beta-1
 r10061@mark-diggorys-computer-2 (orig r2798):  mdiggory | 2008-03-10 16:45:36 -0700
 1.) Moving language-packs to dspace-sandbox. See:  http://dspace-sandbox.googlecode.com/svn/modules/dspace-api-lang/trunk/
 2.) Adjusting dependencies and dspace-api-lang project name
 3.) Cleaning up versioning in poms, removing uneccessary dependencies and version tag
 4.) consolidating wars generated so that dspace-xxx-webapp wars are skinny by default.
 r10064@mark-diggorys-computer-2 (orig r2801):  ScottPhillips | 2008-03-10 18:59:40 -0700
 [maven-release-plugin] prepare release dspace-1.5-beta2
 r10066@mark-diggorys-computer-2 (orig r2803):  ScottPhillips | 2008-03-10 19:00:23 -0700
 [maven-release-plugin] prepare for next development iteration
 r10084@mark-diggorys-computer-2 (orig r2806):  mdiggory | 2008-03-11 08:16:09 -0700
 don't use version in war plugin.
 
 r10085@mark-diggorys-computer-2 (orig r2807):  mdiggory | 2008-03-11 08:22:24 -0700
 add trailing slashes to complete uri for webapps to be created correctly.
 r10086@mark-diggorys-computer-2 (orig r2808):  tdonohue | 2008-03-11 11:00:59 -0700
 Fix for [ SF# 1896466 ] 1.5 install breaks in Windows with spaces in path names
 
 The file path arguments in ANT should have single quotes (' ') around them, to ensure that filepaths with spaces are passed properly to the Load Registry scripts.
 r10088@mark-diggorys-computer-2 (orig r2810):  ScottPhillips | 2008-03-11 17:32:34 -0700
 (Scott Phillips) Split the update task into two: update_code and update_webapps. Also added the "-Dwars=true" switch to create war files.
 r10093@mark-diggorys-computer-2 (orig r2815):  ScottPhillips | 2008-03-11 23:01:29 -0700
 (Scott Phillips) Added shibboleth options to disable editing of metadata and registration of new users if desired.
 r10094@mark-diggorys-computer-2 (orig r2816):  ScottPhillips | 2008-03-11 23:02:28 -0700
 (Scott Phillips) Corrected target description.
 r10108@mark-diggorys-computer-2 (orig r2817):  grahamtriggs | 2008-03-12 05:08:19 -0700
 Corrections to Oracle schema
 r10111@mark-diggorys-computer-2 (orig r2820):  tdonohue | 2008-03-12 10:19:54 -0700
 Minor changes to documentation...added 'dspace-sword' to directories listing.
 r10112@mark-diggorys-computer-2 (orig r2821):  ScottPhillips | 2008-03-12 13:18:05 -0700
 (Scott Phillips) Add DRI Schema Reference to the DSpace manual
 r10113@mark-diggorys-computer-2 (orig r2822):  tdonohue | 2008-03-12 14:09:18 -0700
 Updates to the DRI Schema version 1.1 from Scott Phillips.
 r10119@mark-diggorys-computer-2 (orig r2828):  ScottPhillips | 2008-03-12 19:55:12 -0700
 (Scott Phillips) Added xmlui.user.loginredirect to determine where a user should go after logging into the system.
 r10120@mark-diggorys-computer-2 (orig r2829):  mdiggory | 2008-03-12 21:48:34 -0700
 Adjust xml declaration and include dspace-api-lang into build process if present.
 r10139@mark-diggorys-computer-2 (orig r2830):  tdonohue | 2008-03-13 08:08:06 -0700
 Cleaned up the 1.5 Windows Install instructions.  It previously contained a lot of Unix commands and Unix-specific language.
 r10140@mark-diggorys-computer-2 (orig r2831):  grahamtriggs | 2008-03-13 09:19:15 -0700
 Fixed problem with thumbnails appearing multiple times if you include multiple dates in your list columns.
 Also provides for a more attractive display, and faster table rendering.
 r10143@mark-diggorys-computer-2 (orig r2834):  tdonohue | 2008-03-13 12:15:32 -0700
 Removed references to the old 'history' directory, and the 'history.dir' param from dspace.cfg
 r10144@mark-diggorys-computer-2 (orig r2835):  tdonohue | 2008-03-13 12:18:32 -0700
 minor updates to Windows install instructions
 r10146@mark-diggorys-computer-2 (orig r2837):  tdonohue | 2008-03-13 13:57:30 -0700
 MAJOR reorg of the 'dspace.cfg' file.  Created sections to separate out "general configurations" (i.e. API-layer), XMLUI-specific, JSPUI-specific and ones that work in both those interfaces.  (Oh, and obviously a section for SWORD & OAI)
 r10147@mark-diggorys-computer-2 (orig r2838):  ScottPhillips | 2008-03-13 14:14:32 -0700
 (Scott Phillips) Recent submissions effects both interfaces.
 r10149@mark-diggorys-computer-2 (orig r2840):  ScottPhillips | 2008-03-13 15:44:19 -0700
 (Scott Phillips) Added a DTD for the xmlui.xconf
 r10150@mark-diggorys-computer-2 (orig r2841):  mdiggory | 2008-03-13 21:55:34 -0700
 correct id of snapshot repository.
 r10173@mark-diggorys-computer-2 (orig r2846):  mdiggory | 2008-03-17 14:15:17 -0700
 Adjust all modules to be under a simpler naming convention so that rebranding does not have to be of the war/webapp names themselves.
 r10174@mark-diggorys-computer-2 (orig r2847):  mdiggory | 2008-03-17 14:26:36 -0700
 Adjust all modules to be under a simpler naming convention so that rebranding does not have to be of the war/webapp names themselves.
 r10176@mark-diggorys-computer-2 (orig r2849):  ScottPhillips | 2008-03-17 22:23:13 -0700
 (Scott Phillips) Fixed a bug where the new.xml file was not being read. I changed the file to news-xmlui.xml so that it lists well with the other news files for the jspui. I also have supplied a default version of this file.
 r10193@mark-diggorys-computer-2 (orig r2855):  ScottPhillips | 2008-03-18 11:48:27 -0700
 [maven-release-plugin] prepare release dspace-1_5-rc1
 r10195@mark-diggorys-computer-2 (orig r2857):  ScottPhillips | 2008-03-18 11:51:15 -0700
 [maven-release-plugin] prepare for next development iteration
 r10223@mark-diggorys-computer-2 (orig r2863):  mdiggory | 2008-03-21 14:22:31 -0700
 Asure handle server logs to its own log and dspace is not in control of logging.
 r10227@mark-diggorys-computer-2 (orig r2865):  ScottPhillips | 2008-03-24 08:20:28 -0700
 (Scott Phillips) Added a licensing notice stating the copyright has transfered from HP+MIT to DSpace
 r10228@mark-diggorys-computer-2 (orig r2866):  ScottPhillips | 2008-03-24 08:20:57 -0700
 (Scott Phillips) Updated known bugs
 r10229@mark-diggorys-computer-2 (orig r2867):  ScottPhillips | 2008-03-24 19:25:48 -0700
 [maven-release-plugin] prepare release dspace-1_5
 r10231@mark-diggorys-computer-2 (orig r2869):  ScottPhillips | 2008-03-24 19:26:55 -0700
 [maven-release-plugin] prepare for next development iteration
 r10240@mark-diggorys-computer-2 (orig r2871):  mdiggory | 2008-03-28 07:13:29 -0700
 Correct issue with libraries being excluded
 r10296@mark-diggorys-computer-2 (orig r2895):  ScottPhillips | 2008-04-14 10:58:15 -0700
 (Scott Phillips) Added the ability for super admins to login as other users. This is controled by the parameter xmlui.user.assumelogin, default value is false.
 r10297@mark-diggorys-computer-2 (orig r2896):  ScottPhillips | 2008-04-14 11:37:31 -0700
 (Scott Phillips) Added easy support for google analytics statistics, if you want to use analytics simple provide your key in the parameter "xmlui.google.analytics.key".
 r10298@mark-diggorys-computer-2 (orig r2897):  ScottPhillips | 2008-04-14 21:14:43 -0700
 (Scott Phillips) Added an activity viewer to the Control Panel showing the current user activity on the repository.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2903 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-15 23:57:13 +00:00
Mark Diggory
692cabc55d The following merge back from the 1.5.x brnach to trunk may include any of the following changes in dspace-xmlui...
(Scott Phillips) SF#1896732 - Primary Bitstream flag no effect on bitstream display
 (Scott Phililps) SF#1899958 - User appears logged in when not logged in
 (Scott Phillips) patch to prevent cocoon's cache from filling up your tomcat work directory with caches that will never be used.
 (Scott Phillips) Added protection against communities and collections which have a null value title.
 (Scott Phillips) SF#1896183 - Special characters in xmlui
 (Scott Phillips) SF#1897804 - non-administrator unable to create subcommunity
 (Scott Phillips) SF#1896521 - Manakin XMLUI ignores content disposition threshold
 (Scott Phillips) webui.content_disposition_threshold -> xmlui.content_disposition_threshold 
 (Scott Phillips) Added support for xmlui.supported.locales parameter so that an administrator can choose which languages to deploy Manakin in.
 (Scott Phillips) Reduce the number of duplicate language tags for common strings such as Next, Save, Confirm, Delete, etc...
 1.) Moving language-packs to dspace-sandbox. See:  http://dspace-sandbox.googlecode.com/svn/modules/dspace-api-lang/trunk/
 2.) Adjusting dependencies and dspace-api-lang project name
 3.) Cleaning up versioning in poms, removing uneccessary dependencies and version tag
 4.) consolidating wars generated so that dspace-xxx-webapp wars are skinny by default.
 [maven-release-plugin] prepare release dspace-1.5-beta2
 [maven-release-plugin] prepare for next development iteration
 (Scott Phillips) Added the missing general Untitled tag
 (Scott Phillips) Added protection for untitled communities or collections - the api no longer returns the string "untitled" if none exists.
 (Scott Phillips) Fixes display bug in IE6&7 on the submission submit buttons.
 (Scott Phillips) Removed hidden form item, replaced with a hidden field on the division. This resulted in a blank item being placed in the form.
 (Scott Phillips) Added shibboleth options to disable editing of metadata and registration of new users if desired.
 (Scott Phillips) SF#1912952 - XMLUI: Cannot add Person to Group with auto-generated name
 Fix for SF Bug # [ 1904131 ] <visibility>workflow</visibility> doesn't work in manakin
 (Scott Phillips) SF#1913091 - JSPUI & XMLUI: Problem deleting Collection-associated groups
 (Scott Phillips) SF#1898915 - Exception displayed on delete of ePerson that has submitted
 (Scott Phillips) Added xmlui.user.loginredirect to determine where a user should go after logging into the system.
 (Scott Phillips) SF#1913521 Scoped searching (like scoped browsing)
 (Scott Phillips) SupportedLocales now defaults to accept all locales if not defined.
 (Scott Phillips) Fixed bug when browsing by authors using non-ascii characters the link was not properly being decoded.
 (Scott Phillips) Added a DTD for the xmlui.xconf
 (Scott Phillips) Fixed an i18n character encoding issues when search queries used special characters the next/previous links were not being encoded/decoded properly. I also change it so that search uses GET instead of POST. The reason is that this exposes the url so researchers can prepare queries then save a link to their query.
 (Scott Phillips) Fixed a bug where the new.xml file was not being read. I changed the file to news-xmlui.xml so that it lists well with the other news files for the jspui. I also have supplied a default version of this file.
 (Scott Phillips) Added protection against NPEs during authentication.
 (Scott Phillips) Added support for aspects to have their own i18n files automaticaly added.
 (Scott Phillips) fixed a display issues where the alphabet list would break to two lines.
 (Scott Phillips) Community names were being doubled in the bread crumbtrail, this has been fixed.
 [maven-release-plugin] prepare release dspace-1_5-rc1
 [maven-release-plugin] prepare for next development iteration
 (Scott Phillips) Removed system.out.println
 (Scott Phillips) Removed check for email & password to be null, this breaks shibboleth. Instead if either email or password is null we'll set it to a "" value.
 Use authentication fall-through similar to shibboleth for certificate based auth with x509
 (Scott Phillips) Fixed i18n issues with URLencoding. Changing this parameter brigs Manakin in-line with the encoding that the JSPUI uses. This also requires that your servlet container be configured to use UTF-8 for URIs or otherwise parameters encoded in the URL will not be properly handled. For tomcat follow the steps outlined in the manual to set your connector's URIencoding parameter to UTF-8
 [maven-release-plugin] prepare release dspace-1_5
 [maven-release-plugin] prepare for next development iteration
 Correct bug in Body.toSAX where startElement is called instead of end element.
 (Scott Phillips) Added the ability for super admins to login as other users. This is controled by the parameter xmlui.user.assumelogin, default value is false.
 (Scott Phillips) Added easy support for google analytics statistics, if you want to use analytics simple provide your key in the parameter "xmlui.google.analytics.key".
 (Scott Phillips) Added an activity viewer to the Control Panel showing the current user activity on the repository.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2902 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-15 19:56:41 +00:00
Richard Jones
1b4e99c5ff Refactoring of Handle implementation, which includes the javadocs, proper exception handling, and initial Oracle support. This, then, includes all the non-identifier stuff which also needed to be updated, plus a change in the configuration to acknowledge a new class implementing the IdentifierAssigner and IdentifierResolver interfaces
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2901 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-15 16:26:31 +00:00
Richard Jones
d710c87479 Fix method name clash
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2900 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-15 15:42:15 +00:00
Richard Jones
8827f20d9d add initial (untested) oracle support, and build in the hooks in the Factories to select the appropriate DAO implementation in the identifiers storage code. Some further exception handling and its propagation through the rest of the code.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2899 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-15 15:31:28 +00:00
Richard Jones
d1fdea11f0 lots of javadocs and refactoring for the storage layer of identifiers. This includes a complete treatment of the exception handling processes, so that now the Identifier code is consistent and does not throw spurious or quick and dirty exceptions. This has resulted in changes to exception handling throughout the codebase, but due to the brokenness of DSpace exception handing, on many occasions these are in the form of RuntimeExceptions.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2898 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-15 13:54:45 +00:00
Scott Phillips
b55360719d (Scott Phillips) Added an activity viewer to the Control Panel showing the current user activity on the repository.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2897 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-15 04:14:43 +00:00
Scott Phillips
616a4f0221 (Scott Phillips) Added easy support for google analytics statistics, if you want to use analytics simple provide your key in the parameter "xmlui.google.analytics.key".
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2896 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-14 18:37:31 +00:00
Scott Phillips
3f0d3639c7 (Scott Phillips) Added the ability for super admins to login as other users. This is controled by the parameter xmlui.user.assumelogin, default value is false.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2895 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-14 17:58:15 +00:00
Richard Jones
3355532f3b Javadocs and refactoring for the remainder of the identifier code. This includes a change to the name of the ObjectIdentifierMint to ObjectIdentifierService.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2894 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-14 16:08:57 +00:00
Richard Jones
ed30d9de7a API changes for resolving objects through the IdentifierService, rather than through the ObjectIdentifier.getObject method. This is propagated through refactoring in classes which relied on this mechanism. There is some additional neatening and improvements in javadocs scattered through the code.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2893 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-14 15:45:58 +00:00
Richard Jones
58f7ca3a5c update configurable submission to use collection-uri attribute
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2892 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-14 12:42:47 +00:00
Richard Jones
0bba958e46 add identifier kit required metadata fields to default metadata registry
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2891 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-14 12:39:19 +00:00
Richard Jones
e96385c9ef re-introduce erroneously lost changes to external identifier module's JSPUI messages
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2890 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-14 11:18:05 +00:00
Mark Diggory
05a5a75697 svn ignore target directory
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2889 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 19:10:50 +00:00
Mark Diggory
55a03de793 Remove pluginRepositories as it is deprecated.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2888 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 19:04:50 +00:00
Mark Diggory
f334bdddb5 Disable sword in assembly build
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2887 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 15:31:00 +00:00
Mark Diggory
b67876764b disable sword until compilation errors are fixed
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2886 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 15:20:21 +00:00
Mark Diggory
425fceb646 Change svn and version to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2885 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 15:08:48 +00:00
Mark Diggory
46aa70c038 Merging dspace-sword to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2884 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 15:06:14 +00:00
Mark Diggory
5584c687fd New directory to merge dspace-sword from branch into
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2883 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 15:00:18 +00:00
Mark Diggory
1e3432c63e merge 1.5.1 Build/Assembly process changes
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2882 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 14:53:38 +00:00
Mark Diggory
0c733299de 1.) Remove language-packs its now in sandbox
2.) merge POM differences from 1.5

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2881 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 14:51:45 +00:00
Mark Diggory
7eec0ab11d refactor model directory names.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2880 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-11 14:38:09 +00:00
Graham Triggs
a1bbecaeb9 Fix potential server error in FeedServlet with invalid XML characters
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2879 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-10 15:23:20 +00:00
Graham Triggs
b9b1bb1e08 Fix potential server error in FeedServlet with invalid XML characters
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2878 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-10 15:22:59 +00:00
James Rutherford
3f111932d5 FIxed version numbers in POM files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2877 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-10 10:06:08 +00:00
Graham Triggs
7dde170a4c Fix potential server error when incorrect parameters are passed
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2876 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-09 16:04:09 +00:00
Graham Triggs
0ad0b7e06d Fix JDOM error with invalid characters in the metadata
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2875 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-09 13:42:19 +00:00
Graham Triggs
78fb63038c Stop JDOM errors if we try to output metadata with illegal characters
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2874 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-09 12:46:22 +00:00
Graham Triggs
1d9720b01c Fix bug #1931799 - duplicate "FROM metadatavalue"
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2873 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-04-06 22:49:41 +00:00
Mark Diggory
713b81a7df Correct bug in Body.toSAX where startElement is called instead of end element.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2872 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-28 19:57:20 +00:00
Mark Diggory
a21bd7ac7a Correct issue with libraries being excluded
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2871 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-28 14:13:29 +00:00
Graham Triggs
18fbbe5f7a Fixed Oracle bugs with ILIKE operators and LIMIT/OFFSET clauses
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2870 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-25 22:36:45 +00:00
Scott Phillips
5e7cdaf467 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2869 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-25 02:26:55 +00:00
Scott Phillips
7961f0676b [maven-release-plugin] prepare release dspace-1_5
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2867 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-25 02:25:48 +00:00
Scott Phillips
287f18b7bd (Scott Phillips) Updated known bugs
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2866 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-24 15:20:57 +00:00
Scott Phillips
7a6d57eab7 (Scott Phillips) Added a licensing notice stating the copyright has transfered from HP+MIT to DSpace
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2865 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-24 15:20:28 +00:00
Scott Phillips
c802b0e07b (Scott Phillips) Fixed i18n issues with URLencoding. Changing this parameter brigs Manakin in-line with the encoding that the JSPUI uses. This also requires that your servlet container be configured to use UTF-8 for URIs or otherwise parameters encoded in the URL will not be properly handled. For tomcat follow the steps outlined in the manual to set your connector's URIencoding parameter to UTF-8
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2864 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-22 19:38:54 +00:00
Mark Diggory
0680bac6cb Asure handle server logs to its own log and dspace is not in control of logging.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2863 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-21 21:22:31 +00:00
Mark Diggory
5896a03b93 Use authentication fall-through similar to shibboleth for certificate based auth with x509
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2862 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-21 06:03:42 +00:00
Graham Triggs
79753e0968 Fix bug #1872213 - getNumItems fails with Oracle
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2861 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-20 11:01:10 +00:00
Scott Phillips
3531fdcd1b (Scott Phillips) Removed check for email & password to be null, this breaks shibboleth. Instead if either email or password is null we'll set it to a "" value.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2860 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-19 19:48:31 +00:00
Scott Phillips
7cd56ee896 (Scott Phillips) Removed system.out.println
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2859 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-19 17:46:36 +00:00
Graham Triggs
3b3022dec7 Missing key: jsp.dspace-admin.workflow-abort-confirm.button
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2858 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-19 14:55:44 +00:00
Scott Phillips
c4328172a9 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2857 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 18:51:15 +00:00
Scott Phillips
6d3b14a693 [maven-release-plugin] prepare release dspace-1_5-rc1
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2855 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 18:48:27 +00:00
Scott Phillips
30708a3cd2 (Scott Phillips) Community names were being doubled in the bread crumbtrail, this has been fixed.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2854 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 18:28:00 +00:00
Scott Phillips
4ff60c2671 (Scott Phillips) fixed a display issues where the alphabet list would break to two lines.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2853 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 07:02:22 +00:00
Scott Phillips
0effc6858c (Scott Phillips) Added support for aspects to have their own i18n files automaticaly added.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2852 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 05:27:15 +00:00
Scott Phillips
d72aafe3e4 (Scott Phillips) Added protection against NPEs during authentication.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2851 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 05:26:07 +00:00
Scott Phillips
e5c8802032 (Scott Phillips) Added two configuration parameters to support multiple ways of using the handle server.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2850 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 05:25:07 +00:00
Scott Phillips
7be6116ae9 (Scott Phillips) Fixed a bug where the new.xml file was not being read. I changed the file to news-xmlui.xml so that it lists well with the other news files for the jspui. I also have supplied a default version of this file.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2849 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 05:23:13 +00:00
Scott Phillips
2ccd24fdeb (Scott Phillips) Fixed an i18n character encoding issues when search queries used special characters the next/previous links were not being encoded/decoded properly. I also change it so that search uses GET instead of POST. The reason is that this exposes the url so researchers can prepare queries then save a link to their query.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2848 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-18 05:21:16 +00:00
Mark Diggory
f8a793fd5d Adjust all modules to be under a simpler naming convention so that rebranding does not have to be of the war/webapp names themselves.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2847 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-17 21:26:36 +00:00
Mark Diggory
1cad5fdf30 Adjust all modules to be under a simpler naming convention so that rebranding does not have to be of the war/webapp names themselves.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2846 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-17 21:15:17 +00:00
Mark Diggory
a1c7729e2b Adjust all modules to be under a simpler naming convention so that rebranding does not have to be of the war/webapp names themselves.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2845 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-17 21:14:40 +00:00
Tim Donohue
05bc786cc5 Closed a TableRowIterator which was potentially left open in the Harvester...
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2844 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-17 15:27:55 +00:00
Mark Diggory
a3591d4cc9 svn:ignores
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2843 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-14 21:49:46 +00:00
Mark Diggory
092d628beb svn:ignores
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2842 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-14 21:49:40 +00:00
Mark Diggory
f137aa9173 correct id of snapshot repository.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2841 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-14 04:55:34 +00:00
Scott Phillips
0750151652 (Scott Phillips) Added a DTD for the xmlui.xconf
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2840 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 22:44:19 +00:00
Scott Phillips
c38fa39894 (Scott Phillips) Fixed bug when browsing by authors using non-ascii characters the link was not properly being decoded.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2839 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 22:22:21 +00:00
Scott Phillips
233c1389f4 (Scott Phillips) Recent submissions effects both interfaces.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2838 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 21:14:32 +00:00
Tim Donohue
f113ef749a MAJOR reorg of the 'dspace.cfg' file. Created sections to separate out "general configurations" (i.e. API-layer), XMLUI-specific, JSPUI-specific and ones that work in both those interfaces. (Oh, and obviously a section for SWORD & OAI)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2837 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 20:57:30 +00:00
Scott Phillips
5cdc5a6ca9 (Scott Phillips) SupportedLocales now defaults to accept all locales if not defined.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2836 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 20:47:13 +00:00
Tim Donohue
2eb9eaf4fc minor updates to Windows install instructions
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2835 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 19:18:32 +00:00
Tim Donohue
777dd8261d Removed references to the old 'history' directory, and the 'history.dir' param from dspace.cfg
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2834 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 19:15:32 +00:00
Scott Phillips
604cd20193 (Scott Phillips) SF#1913521 Scoped searching (like scoped browsing)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2833 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 18:01:54 +00:00
Graham Triggs
f536bcbe3b Fixed bug with the wrong operator used (&& instead of ||)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2832 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 17:21:59 +00:00
Graham Triggs
7d47d443ae Fixed problem with thumbnails appearing multiple times if you include multiple dates in your list columns.
Also provides for a more attractive display, and faster table rendering.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2831 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 16:19:15 +00:00
Tim Donohue
5c16cd85f2 Cleaned up the 1.5 Windows Install instructions. It previously contained a lot of Unix commands and Unix-specific language.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2830 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 15:08:06 +00:00
Mark Diggory
7947ae4400 Adjust xml declaration and include dspace-api-lang into build process if present.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2829 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 04:48:34 +00:00
Scott Phillips
39c94cf8ec (Scott Phillips) Added xmlui.user.loginredirect to determine where a user should go after logging into the system.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2828 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 02:55:12 +00:00
Scott Phillips
1726023d8f (Scott Phillips) SF#1898915 - Exception displayed on delete of ePerson that has submitted
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2827 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-13 02:00:37 +00:00
Scott Phillips
8b13f10354 (Scott Phillips) SF#1913091 - JSPUI & XMLUI: Problem deleting Collection-associated groups
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2826 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 23:02:30 +00:00
Tim Donohue
7f1ba494b7 Fix for SF Bug # [ 1904131 ] <visibility>workflow</visibility> doesn't work in manakin
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2825 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 22:07:02 +00:00
Scott Phillips
ba37b8c9d8 (Scott Phillips) Print out more information when a bitstream fails to be "filtered"
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2824 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 21:45:01 +00:00
Scott Phillips
846383002d (Scott Phillips) SF#1912952 - XMLUI: Cannot add Person to Group with auto-generated name
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2823 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 21:14:43 +00:00
Tim Donohue
eccff05471 Updates to the DRI Schema version 1.1 from Scott Phillips.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2822 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 21:09:18 +00:00
Scott Phillips
96cb5dc8f4 (Scott Phillips) Add DRI Schema Reference to the DSpace manual
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2821 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 20:18:05 +00:00
Tim Donohue
e08b93f22b Minor changes to documentation...added 'dspace-sword' to directories listing.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2820 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 17:19:54 +00:00
Graham Triggs
1b12c9b411 Restructured to allow incremental display of the table (useful if you are rendering 100 items on a page!)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2819 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 16:09:15 +00:00
Graham Triggs
1f6a946296 Corrections to the Oracle schema
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2818 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 12:09:16 +00:00
Graham Triggs
917dc06608 Corrections to Oracle schema
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2817 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 12:08:19 +00:00
Scott Phillips
09745a7f2a (Scott Phillips) Corrected target description.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2816 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 06:02:28 +00:00
Scott Phillips
c999a0e4a3 (Scott Phillips) Added shibboleth options to disable editing of metadata and registration of new users if desired.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2815 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 06:01:29 +00:00
Scott Phillips
e6de46f8fc (Scott Phillips) Removed hidden form item, replaced with a hidden field on the division. This resulted in a blank item being placed in the form.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2814 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 05:59:57 +00:00
Scott Phillips
d9562fa135 (Scott Phillips) Fixes display bug in IE6&7 on the submission submit buttons.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2813 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 05:58:58 +00:00
Scott Phillips
d27e6c5495 (Scott Phillips) Added protection for untitled communities or collections - the api no longer returns the string "untitled" if none exists.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2812 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 01:10:21 +00:00
Scott Phillips
b9df351a05 (Scott Phillips) Added the missing general Untitled tag
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2811 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 01:09:32 +00:00
Scott Phillips
2159ed015c (Scott Phillips) Split the update task into two: update_code and update_webapps. Also added the "-Dwars=true" switch to create war files.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2810 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-12 00:32:34 +00:00
Tim Donohue
91182585b8 Force assembly to use 2.2-beta-1, so that everything works on Maven 2.0.8
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2809 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-11 21:34:43 +00:00
Tim Donohue
bc2eb357e0 Fix for [ SF# 1896466 ] 1.5 install breaks in Windows with spaces in path names
The file path arguments in ANT should have single quotes (' ') around them, to ensure that filepaths with spaces are passed properly to the Load Registry scripts.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2808 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-11 18:00:59 +00:00
Mark Diggory
92fce7009a add trailing slashes to complete uri for webapps to be created correctly.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2807 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-11 15:22:24 +00:00
Mark Diggory
c5dd9a1d59 don't use version in war plugin.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2806 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-11 15:16:09 +00:00
Scott Phillips
fe4a46e112 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2803 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-11 02:00:23 +00:00
Scott Phillips
4b9822844a [maven-release-plugin] prepare release dspace-1.5-beta2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2801 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-11 01:59:40 +00:00
Mark Diggory
4da43dc226 Releases of language packs completed. Now using version ranges [1.5.0.0-1.6.0.0) to support resolution of these dependencies.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2800 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-11 01:13:14 +00:00
Mark Diggory
4d72aa9765 getting project name consistent with other module projects.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2799 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-11 00:36:45 +00:00
Mark Diggory
ada9621329 1.) Moving language-packs to dspace-sandbox. See: http://dspace-sandbox.googlecode.com/svn/modules/dspace-api-lang/trunk/
2.) Adjusting dependencies and dspace-api-lang project name
3.) Cleaning up versioning in poms, removing uneccessary dependencies and version tag
4.) consolidating wars generated so that dspace-xxx-webapp wars are skinny by default.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2798 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-10 23:45:36 +00:00
Mark Diggory
57969f1c1a Do likewise for war files. However, overlays will not include dependent wars META-INF directories.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2797 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-08 00:31:13 +00:00
Mark Diggory
9362ba7dfe Add Maven metadata to Manifests.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2796 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-08 00:23:13 +00:00
Mark Diggory
b9c3558290 rename generated webapps and force assembly to use 2.2-beta-1
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2795 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-07 23:16:10 +00:00
Scott Phillips
2f8a587158 (Scott Phillips) Added OpenOffice document formats to the default format registry.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2794 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-07 19:53:12 +00:00
Scott Phillips
87e777afe0 (Scott Phillips) SF#1908952 - Office 2007 formats cannot be added to FormatRegistry
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2793 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-07 17:33:32 +00:00
Graham Triggs
659b113224 Fix Oracle upgrade script
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2792 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-07 12:17:35 +00:00
Graham Triggs
e2d567bb2b Fix Oracle upgrade script
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2791 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-07 12:04:08 +00:00
Scott Phillips
2e734699d7 (Scott Phillips) Reduce the number of duplicate language tags for common strings such as Next, Save, Confirm, Delete, etc...
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2790 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-05 00:26:11 +00:00
James Rutherford
19e84aed9a Removed duplicate XML declaration from Classic.xsl.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2789 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 11:18:33 +00:00
Scott Phillips
40d62f2e59 (Scott Phillips) Added support for xmlui.supported.locales parameter so that an administrator can choose which languages to deploy Manakin in.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2788 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 05:48:48 +00:00
Mark Diggory
a2bfa070e5 remove files accidentally commited.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2787 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 05:03:36 +00:00
Mark Diggory
ce1c3df0f3 remove tools.jar dependency
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2786 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 05:02:18 +00:00
Mark Diggory
4c399d476f Commit properties generated from native2ascii
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2785 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 05:01:29 +00:00
Mark Diggory
c4bd8d7b09 remove i18n transformation because it doesn't work easily on all platforms. Reserve UTF* native2ascii functionality to profiles for those who wish to use it to assist in editing.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2784 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 04:57:59 +00:00
Scott Phillips
e5ab31db62 (Scott Phillips) webui.content_disposition_threshold -> xmlui.content_disposition_threshold
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2783 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 03:20:21 +00:00
Scott Phillips
bb435de720 (Scott Phillips) SF#1896186 - mail.charset not documented in dspace.cfg
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2782 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 01:41:06 +00:00
Scott Phillips
78cbab2532 (Scott Phillips) Removed useless common problem.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2781 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 00:46:49 +00:00
Scott Phillips
f3875f0f4c (Scott Phillips) SF#1896521 - Manakin XMLUI ignores content disposition threshold
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2780 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-04 00:35:58 +00:00
Scott Phillips
5bda6eef92 (Scott Phillips) SF#1897804 - non-administrator unable to create subcommunity
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2779 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-03 23:29:56 +00:00
Scott Phillips
62c5ef4ae2 (Scott Phillips) SF#1896183 - Special characters in xmlui
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2778 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-03 22:09:07 +00:00
Scott Phillips
96855565e0 (Scott Phillips) Added protection against communities and collections which have a null value title.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2777 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-03 22:07:45 +00:00
Scott Phillips
0cb094ebd6 (Scott Phillips) patch to prevent cocoon's cache from filling up your tomcat work directory with caches that will never be used.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2776 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-03 22:06:44 +00:00
Mark Diggory
c95a485973 Use snapshot version for development.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2775 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-03 18:55:28 +00:00
Mark Diggory
14cfa60686 remove until we have a better solution
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2774 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-03 17:43:47 +00:00
Scott Phillips
da996aa6e1 (Scott Phililps) SF#1899958 - User appears logged in when not logged in
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2773 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-03-03 00:54:57 +00:00
Mark Diggory
9eeb44d604 fix rpoject version until release can be figured out.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2772 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-29 21:49:42 +00:00
Mark Diggory
12671885ad Make "all" active by default.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2771 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-29 21:15:11 +00:00
Mark Diggory
1e6b140f79 Release Management Steps are now Maven based. See wiki http://wiki.dspace.org/index.php/ReleaseProcedure
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2770 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-29 18:06:04 +00:00
Graham Triggs
5152d0e65d Remove security problem with returning last-modified headers when logged in
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2769 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-29 15:29:43 +00:00
Graham Triggs
f25634e45f Remove security problem with returning last-modified headers when logged in
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2768 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-29 15:29:19 +00:00
Scott Phillips
32d1549800 (Scott Phillips) SF#1896732 - Primary Bitstream flag no effect on bitstream display
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2767 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-29 00:46:31 +00:00
Mark Diggory
5a797e83c2 Undo previous commit and adjust release management profiles. We cannot currently build whole project from top level.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2766 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 23:45:58 +00:00
Mark Diggory
d6f727d22c Undo previous commit and adjust release management profiles. We cannot currently build whole project from top level.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2765 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 23:33:29 +00:00
Mark Diggory
dff6c4fc06 Qualifying the location with ${basedir} assures that build will work in both top level and inside the dspace directory.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2764 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 20:57:28 +00:00
Mark Diggory
7117f2a57b Needs to look for SNAPSHOT version as well until released.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2763 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 20:40:47 +00:00
Mark Diggory
be236dc6aa Merging recent changes from 1.5 branch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2762 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 18:39:50 +00:00
Mark Diggory
df9296ce5c Exclude UTF-8 files from resulting jar.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2761 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 18:38:09 +00:00
Mark Diggory
ab48f68713 Detect Sun as vendor and look for tools jar appropriately.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2760 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 18:32:47 +00:00
Mark Diggory
fd44192d14 cleanup imports on MetadataExporter.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2759 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 18:13:04 +00:00
Mark Diggory
943960bc11 Correct BrowseItem vs Item iterations in recentSubmissions and DSpaceObjectManager so xmlui compiles properly.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2758 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 18:11:56 +00:00
Mark Diggory
aebe6dbdbf Correct BrowseItem vs Item iterations in recentSubmissions and DSpaceObjectManager so xmlui compiles properly.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2757 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 18:11:35 +00:00
Mark Diggory
a88c11eaca Restore IdentifierUtils after merge.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2756 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 15:49:54 +00:00
Mark Diggory
4625ae2195 Merging 1.5 differences in dspace-xmlui project back to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2755 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 15:44:23 +00:00
Mark Diggory
e4a673f6aa Merging 1.5 differences in dspace project back to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2754 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 15:27:51 +00:00
Mark Diggory
b2dbab4cb8 Merging differences between language-packs from 1.5 branch to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2753 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 15:26:56 +00:00
Mark Diggory
62bb59178c Replace all Windows linefeeds found in source with unix linefeeds.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2752 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 15:23:41 +00:00
Mark Diggory
9b624b53be Replace all Windows linefeeds found in source with unix linefeeds.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2751 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 15:06:48 +00:00
Graham Triggs
f93c9fcb98 Fix JDOM error if a metadatavalue is null
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2750 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 11:28:34 +00:00
Graham Triggs
1507867370 Fix JDOM error if a metadatavalue is null
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2749 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 11:26:01 +00:00
Scott Phillips
fcac2f33e1 (Scott Phillips) Removed hardcoding of the bundle list out into the dspace.cfg parameter.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2748 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 06:58:30 +00:00
Scott Phillips
d15ec68fd8 (Scott Phillips) SF#1896265 - Browse result counts incorrect in xmlui
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2747 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 06:28:08 +00:00
Scott Phillips
17a8a62b0c (Scott Phillips) SF#1897647 - For a logged in user the submit button is allways displayed
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2746 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 05:01:46 +00:00
Mark Diggory
8ad4b8385a Merge and correct changes in POM files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2745 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 04:56:38 +00:00
Mark Diggory
d628ca4cc3 Merging 1.5 differences in language-packs project back to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2744 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 04:54:31 +00:00
Mark Diggory
94a35b7c62 Merge and correct changes in POM files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2743 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 04:48:25 +00:00
Scott Phillips
8ce735f415 (Scott Phillips) SF#1896943 - Manakin search glitch
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2742 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 04:47:23 +00:00
Mark Diggory
a6832e521a restore original changes in trunk without windows linefeeds.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2741 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 04:43:05 +00:00
Mark Diggory
f7be403683 Merging 1.5 differences in dspace-xmlui project back to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2740 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 04:18:47 +00:00
Mark Diggory
4f4f1aba40 Merging 1.5 differences in dspacei-oai project back to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2739 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 03:53:32 +00:00
Mark Diggory
5b0be33a0d Hand merge difference in POM files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2738 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 03:44:40 +00:00
Mark Diggory
9cad36a595 Merging 1.5 differences in dspace-lni project back to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2737 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 03:40:12 +00:00
Scott Phillips
f4e90c9ffb (Scott Phillips) XMLUI will now allways lowercase your email address when checking to see if one allready exists. This caused problems when users tried to register accounts with different cases the API would fail later in the processes.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2736 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 03:38:23 +00:00
Mark Diggory
9e4cb4b0d0 Restore modules section lost in merge
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2735 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 03:36:02 +00:00
Mark Diggory
adbbb84ec4 Correcting some problems with the last commit.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2734 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 03:34:05 +00:00
Mark Diggory
56abf37d1f Merging 1.5 differences in dspace project back to trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2733 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 03:25:54 +00:00
Scott Phillips
d74916e5ff (Scott Phillips) SF#1897998 'This collection' search label missing when using browse
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2732 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 02:59:32 +00:00
Scott Phillips
132791a9bd (Scott Phillips) SF#1898195 - Browse by pages are missing the 0-9 link.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2731 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 02:48:48 +00:00
Mark Diggory
3bd07d6e70 Merge statistics changes.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2730 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 01:38:35 +00:00
Scott Phillips
1fdba83734 (Scott Phillips) SF#1899214 - The submission complete page did not have a trail or title which caused the theme to blow up when viewed in IE. I've added default trail and title for any submission page that dosn't have it allready and fixed it so that the theme dosn't blow up if there is not a trail or title.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2729 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 01:17:23 +00:00
Scott Phillips
66a3a72a94 (Scott Phillips) SF#1898491 The item summary-view page doesn't handle multiple metadata entries very well. Now it will:
title: one per line
authors: in one line but separated by semicolons.
abstract: entries seperated by a line
description: entries seperated by a line
URI: one per line
Date: one per line

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2728 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-28 00:19:06 +00:00
Mark Diggory
6d86806ae4 git-svn-id: http://scm.dspace.org/svn/repo/trunk@2727 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2008-02-27 23:54:38 +00:00
Mark Diggory
eae0d643b1 Watch those line delimiters Tim... Correcting windows line feeds in files.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2726 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 23:47:41 +00:00
Scott Phillips
89f707bbe2 (Scott Phillips) SF#1899170 Submission labeling error.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2725 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 23:24:07 +00:00
Scott Phillips
cdd0407efe (Scott Phillips) I broke messages.xml on my last commit, this fixes it.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2724 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 23:01:11 +00:00
Mark Diggory
bdeccb92d7 Build dspace-xmlui-lang if checked out into project workspace.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2723 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 22:50:19 +00:00
Mark Diggory
0e11e9929f Build dspace-xmlui-lang if checked out into project workspace.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2722 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 22:44:05 +00:00
Scott Phillips
7e751bc165 (Scott Phillips) SF#1899213 - Spelling error in "authorizations".
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2721 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 22:43:28 +00:00
Scott Phillips
e97ec51866 (Scott Phillips) SF#1899781 - Submission language save/cancel --> save & exit
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2720 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 22:31:26 +00:00
Mark Diggory
c0ad8911a0 Addining example for appassembler plugin.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2719 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 21:31:50 +00:00
Scott Phillips
6dd6bdfc72 (Scott Phillips) SF#1896110 - Long metadata fields cause problems in the workflow task/pool submission system. Added protection for these cases.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2718 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 21:31:21 +00:00
Scott Phillips
d521181881 (Scott Phillips) This is a collection of fixes to the base dri2xhtml style display.
SF#1896726 - if dates don't exist for the item don't put in ()
  SF#1895967 - don't display labels for fields that don't exist
  SF#1896039 - display the metadata schema
  SF#1896025 - display the new section for communities and collections
  SF#1896129 - show a message if an item has no files.
  SF#1896981 - full item display dosen't list the files.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2717 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 21:28:24 +00:00
Mark Diggory
2e4644afb5 Remove unneccessary dependency on lni-core and make a executable jar with all the dependencies.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2716 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 21:19:33 +00:00
Graham Triggs
0a4f58cdfc Fix long standing bug with date validation in resource policy
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2715 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 14:25:56 +00:00
Graham Triggs
b9fc33ec64 Fix long standing bug with checking the dates on a resource policy
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2714 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-27 14:23:45 +00:00
Scott Phillips
43e335b3f2 (ScottPhillips) Removed unused tags.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2713 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-26 18:22:29 +00:00
Mark Diggory
e7965570a7 changes
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2712 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-23 00:56:44 +00:00
Mark Diggory
b7d40e3cf9 Place Messages.properties appropriately in resources and adjust documentation.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2711 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-23 00:54:26 +00:00
Mark Diggory
01ea1632e2 remove old directories
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2710 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-23 00:27:10 +00:00
Mark Diggory
61f8b077c7 Reorganize Language file to support easier editing, processing and management
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2709 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-23 00:25:30 +00:00
Mark Diggory
03c322c64c new proper location for properties files.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2708 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-22 23:42:35 +00:00
Tim Donohue
890a2ee33c Fixed Bug: SF #1899748 Comments box in feedback form display problem
Changed FeedbackForm aspect to no longer specify a size for the "comment" textarea.  That way the size can be controlled in your XMLUI theme.  So, right now, it defaults to a smaller size and looks better in Firefox & I.E.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2707 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-22 18:06:28 +00:00
Tim Donohue
1a6c18fbf8 Fixed bug: SF#1899717 - Forced back to beginning of submission process
Changed the XMLUI to disable submitting forms when 'enter' is pressed, when the user is submitting a new item to DSpace.  This same logic already existed for the JSPUI.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2706 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-22 17:48:06 +00:00
Scott Phillips
f9aa8b801b (Scott Phillips) Fixed language tags in the restricted item code that were not translatable into other languages because "item", "community", "collection" were being passed in as parameters to the string.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2705 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-21 18:01:06 +00:00
Claudia Juergen
68defbecef Update of German jspui language pack.
Status: compliant to 1.5beta1

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2704 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-21 12:33:09 +00:00
Tim Donohue
d946e8c23f Fixed bug SF#1897293 - Submission field Series/Report No. is ignored.
Changed the dc.relation.ispartofseries (Series/Report field) to the "series" input-type in input-forms.xml.  Added documentation around the "series" input type (which was strangely missing).  A few other small fixes to get JSP-UI & XML-UI to work the same for series.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2703 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 22:46:41 +00:00
Mark Diggory
dfd8595b59 Adjust RSS feed location to be consistent with JSPUI https://sourceforge.net/tracker/index.php?func=detail&aid=1760739&group_id=19984&atid=119984
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2702 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 22:08:55 +00:00
Mark Diggory
236afd120e Adjust RSS feed location to be consistent with JSPUI https://sourceforge.net/tracker/index.php?func=detail&aid=1760739&group_id=19984&atid=119984
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2701 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 22:08:46 +00:00
Scott Phillips
e23a975e55 (Scott Phillips) SF#1895992 - No README at top level of src
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2700 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 21:05:04 +00:00
Scott Phillips
6656ea5543 (Scott Phillips) SF#1895881 - missing tag in language pack
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2699 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 20:55:29 +00:00
Scott Phillips
bca7af0390 (Scott Phillips) SF#1895858 - unable to send feedback email.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2698 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 20:50:09 +00:00
Tim Donohue
ac5809a9f6 Adding back in links to Submission Configuration documentation (in /docs/submission.html). They must've been accidentally removed before the 1.5 beta1 release.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2697 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 19:03:17 +00:00
Tim Donohue
7ad7ebb6b2 Very minor changes to install docs
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2696 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 17:57:08 +00:00
Tim Donohue
35a82face2 Fix to bug SF#1897927 - Checksum checker does not work. The ConfigurationManager was failing to load the default configuration file when "getProperties()" was called from Checksum checker.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2695 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 17:41:17 +00:00
Mark Diggory
a2438160c8 Adding SortOption.DESCENDING to correct issue with sort order. https://sourceforge.net/tracker/?func=detail&atid=119984&aid=1897968&group_id=19984
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2694 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 16:26:14 +00:00
Mark Diggory
5ac0d297ca Removing someones typo...
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2693 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 16:05:53 +00:00
Stuart Lewis
23c854e74e (Stuart Lewis) Updated upgrade instructions to include new crosswalk files for SWORD and metadata in html head
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2692 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 09:34:19 +00:00
Mark Diggory
36f31fe3ff Fix for https://sourceforge.net/tracker/?func=detail&atid=119984&aid=1896468&group_id=19984
Adding in missing tables that were recently added to dsatabase-schema.sql

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2691 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-20 00:31:24 +00:00
Mark Diggory
41acdb8e42 Add in dtd and input-forms to update directions. https://sourceforge.net/tracker/?func=detail&atid=119984&aid=1897039&group_id=19984
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2690 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-19 22:48:24 +00:00
Scott Phillips
dec9d3d458 (Scott Phillips) SF#1867394 Enable the option to include the xmlui.xconf inside the webapp's WEB-INF folder. If no configuration is found there then it will fall back to looking in the dspace/config directory.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2689 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-19 17:42:52 +00:00
Mark Diggory
edb3d434b0 Adjustments to layout
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2688 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-19 04:59:00 +00:00
Mark Diggory
ffe2255213 Updates to the documentation based on feedback from the test-a-thon.
Corrections to Maven based build and installation on Windows. 
Changed Copyright to be under The DSpace Foundation.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2687 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-19 04:48:26 +00:00
Mark Diggory
0a677d7b03 svn ignore
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2686 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-16 17:13:22 +00:00
Mark Diggory
8293cad4e4 svn ignore
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2685 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-16 17:13:18 +00:00
Graham Triggs
d92276f5e1 Fix jump to for descending browse lists and date indexes
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2684 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-15 23:58:32 +00:00
Scott Phillips
c4354d213d (Scott Phillips) Fixed compile error in LogAnalyser.java - a miss typed method name.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2683 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-15 18:53:03 +00:00
Graham Triggs
e1b2c3b014 Port of new browse pagination code from 1.5 branch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2682 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-15 15:40:02 +00:00
Graham Triggs
45360e6341 Fix problem with unique metadata browses
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2681 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-15 15:30:34 +00:00
Stuart Lewis
9d7502c90d (Stuart Lewis) Updates to the stats scripts. (1) Better error reporting. (2) Adding the ability to enter start dates - these had been removed with the Java replacements for the previous Perl scripts. (3) Added upgrade instructions. (4) Tidied up dstat.cfg. (5) Hostname and service name now taken from dspace.cfg rather than dstat.cfg.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2680 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-15 15:07:39 +00:00
Graham Triggs
85c5a11771 Fix issue with the new pagination code when the browse tables are empty
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2679 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-15 14:54:48 +00:00
Graham Triggs
4829eda0b7 Fix pagination issues by using offsets
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2678 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-14 22:46:41 +00:00
Scott Phillips
e0db2d669a (Scott Phillips) Removed the indication that item mapper only searches authors when it actually searches any field.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2677 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-14 16:34:28 +00:00
Scott Phillips
bd18e7b1f3 (Dustin Slater) Updates to improve the visual style of the classic theme.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2676 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-14 16:05:10 +00:00
Scott Phillips
c077d8332f (Scott Phillips) SF#1893334 Fixed the missing trail not being displayed when browsing.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2675 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-14 16:03:51 +00:00
Stuart Lewis
4abd038cdd SWORD metadata registry - updated to make it 'complete', so it can standalone without the main dspace DC metadata registry.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2674 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-14 13:54:16 +00:00
Mark Diggory
49d92a70bd Adjust names of profiles so they make more sense.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2673 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-14 00:09:31 +00:00
Mark Diggory
365e6b8758 Use dspace-assembly-plugin version 1.1 in these projects.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2672 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-14 00:03:45 +00:00
Scott Phillips
4c0a043933 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2671 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 21:36:32 +00:00
Scott Phillips
96fd10b9bb [maven-release-plugin] prepare release dspace-1_5-beta1
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2669 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 21:35:51 +00:00
Mark Diggory
ac737c3c5d Make modules dir always on.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2668 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 20:50:37 +00:00
Mark Diggory
04ec225b77 include dspace for packaging and release, but not for deployment
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2667 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 20:48:38 +00:00
Mark Diggory
853e938c32 regenerate wsdl and code only whe -Dregenerate-wsdl=true is designated as a parameter.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2666 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 19:50:11 +00:00
Mark Diggory
f16f5129bd Correct some reporitory settings in POM so the dspace and snapshot repos are not always consulted.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2665 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 19:22:07 +00:00
Mark Diggory
a7d6b07c86 Use full version release of plugins now.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2664 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 19:09:27 +00:00
Graham Triggs
4e59bbf78e Rewrote query for selecting distinct values scoped to comm/coll due to deficiency in Postgres
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2663 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 16:29:20 +00:00
Graham Triggs
901c669991 Added missing DISTINCT on view for distinct query
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2662 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 16:24:47 +00:00
Graham Triggs
54b6e7b54b Changed the way browsing metadata indexes works when comm/coll scoped due to Postgres deficiency
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2661 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 16:20:19 +00:00
Graham Triggs
d78e5a3fc1 Make metadatavalue updates kinder to the database by only writing / deleting the difference between the current DB values and the in-memory values
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2660 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 06:41:18 +00:00
Mark Diggory
53d1247a63 Wait to make full release until its present in central repo. Build breaks otherwise.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2659 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 04:50:32 +00:00
Scott Phillips
9ce8ccd6c5 (Scott Phillips) Updated upgrade documentation to include item-submission.xml
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2658 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 03:33:59 +00:00
Scott Phillips
ac1bf1175c (Scott Phillips) Fixed an NPE where when attempting to URL encode a null string.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2657 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 02:07:12 +00:00
Scott Phillips
4d16a7b6e4 (Scott Phillips) Fixed an NPE in the withdrawn item that was preventing the page from loading.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2656 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 02:05:29 +00:00
Mark Diggory
0bef9480d2 Use locally release versions under org.dspace for Maven plugins, these are maintained at dspace-sandbox.googlecode.com
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2655 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-13 00:29:34 +00:00
Mark Diggory
a05f7e33bc Use official released i18n report plugin under org.dspace group id.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2654 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 23:31:18 +00:00
Graham Triggs
4f5478b05e getMetadata now returns an empty array rather than null
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2653 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 22:58:21 +00:00
Mark Diggory
2f5341b9d5 Assembly not properly creating webapp directories, they need to be expanded for web.xml to be properly filtered during the ant build.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2652 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 22:32:57 +00:00
Graham Triggs
b7a081a39a Add indexes to foreign key columns to avoid database contention
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2651 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 21:40:22 +00:00
Scott Phillips
e4b54d178e (Scott Phillips) Updated release script to build binary packages.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2650 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 20:46:31 +00:00
Scott Phillips
7ebeaf1358 (Elliot Metsger) SF# 1867408 Fixed errors where paragraphs were being translated into the DRI document out of order.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2649 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 19:56:25 +00:00
Scott Phillips
a7110ecb16 git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2648 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2008-02-12 19:54:19 +00:00
Scott Phillips
e4812dbac5 (Jay Paz) Fixed a bug in the accessability of forms. Some fields were not having <labels> associated with them which makes it hard for screen readers or other alternative browsers to understand a form.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2647 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 18:30:29 +00:00
Scott Phillips
dad83eee50 (Scott Phillips) Fixed bug where the XMLTest aspect had the wrong default location, they were moved to the resource bundle.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2646 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 18:29:10 +00:00
Scott Phillips
f664232287 (Jay Paz) Fix to bug where lists where being wrapped within a paragraph thus creating an invalid dri and html documents.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2645 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 18:28:23 +00:00
Graham Triggs
02a1297bc7 Fix problem with null browse index (can be null for browsing withdrawn items - will be set later)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2644 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 14:59:38 +00:00
Graham Triggs
fb506433d5 Fix problem with null browse index (can be null for browsing withdrawn items - will be set later)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2643 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 14:54:57 +00:00
Graham Triggs
175176c0e9 Eliminate unnecessary item.update()
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2642 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 05:07:57 +00:00
Scott Phillips
1ebf74f9b6 (JamesCreel) The Kubrick theme, an generic non-university branded theme. This is an example theme provided with the base of dspace providing some examples on how to construct a theme using seperate style sheets, and XSL.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2641 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 00:16:09 +00:00
Graham Triggs
64c801a760 Eliminate most unnecessary changes to the database when values haven't been altered (reduces contention, and unnecessary constraint validation)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2640 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 00:03:28 +00:00
Graham Triggs
95ce6e31bc Eliminate most unnecessary changes to the database when values haven't been altered (reduces contention, and unnecessary constraint validation)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2639 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-12 00:03:08 +00:00
Tim Donohue
05253c036b Updated 1.5 Documentation based on decision on path names in DSpace 1.5. [dspace-source] will refer to the source of either the 'dspace-1.5.tar.gz' or the 'dspace-1.5-src.tar.gz' (which will be the two distribution options via sourceforge). Also a few other smaller documentation changes.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2638 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-11 20:29:39 +00:00
Mark Diggory
07de727e27 Adjust release descriptors
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2637 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-11 19:55:23 +00:00
Scott Phillips
93521b35ff (ScottPhillips) Added a switch to enable the themepath parameter to an HTTP request directing which theme to load. This can be turned on via the xmlui.themes.allowoverrides configuration parameter which defaults to off.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2636 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-11 18:20:01 +00:00
Stuart Lewis
2cd82e602d SWORD metadata registry
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2635 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-11 16:31:27 +00:00
Graham Triggs
debbfcc0c4 Fix problem mapping distinct metadata values to items
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2634 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-11 12:23:52 +00:00
Graham Triggs
6a4967c492 Fix problem mapping distinct metadata values to items
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2633 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-11 12:23:22 +00:00
Graham Triggs
800e2142c9 Fix problem searching by author in item mapping. Remove even more database contention (when editing / mapping items)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2632 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-10 20:48:37 +00:00
Graham Triggs
4fe54b6079 Fix problem searching by author in item mapping. Remove even more database contention (when editing / mapping items)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2631 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-10 20:46:27 +00:00
Stuart Lewis
be03336a63 (Chris Yates) SF Patch #1888652 Statistics Rewritten In Java
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2630 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-10 19:09:14 +00:00
Graham Triggs
8ab178f623 Further reduce db contention when an item is updated
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2629 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-10 17:23:01 +00:00
Graham Triggs
1050b4f54f Further reduce db contention when an item is updated
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2628 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-10 17:22:28 +00:00
Graham Triggs
60c869ace5 Remove unused parts of the API, reduce db contention when an item is updated
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2627 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-10 16:51:36 +00:00
Graham Triggs
5462c12830 Remove unused parts of the API, reduce db contention when an item is updated
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2626 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-10 16:51:01 +00:00
Graham Triggs
ad0851eddd Ensure item_count tables are correctly defined, including primary keys
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2625 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-09 22:48:17 +00:00
Graham Triggs
684da8831d Ensure item_count tables are correctly defined, including primary keys
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2624 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-09 22:47:41 +00:00
Graham Triggs
4f118f56bc Bring itemRemoved() in line with trunk
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2623 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-09 22:23:57 +00:00
Graham Triggs
e894a2875d Fix problems with port of code from 1.5 branch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2622 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-09 22:22:56 +00:00
Graham Triggs
e76a6a09c2 Add indexes to foreign key constraints to avoid table locking issues. Clean up some of the API for the browse tables.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2621 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-09 00:59:15 +00:00
Graham Triggs
f1a0135638 Add indexes to foreign key constraints to avoid table locking issues. Clean up some of the API for the browse tables.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2620 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-09 00:58:44 +00:00
Graham Triggs
6ba6658d41 Fix reversion of efficient index pruning
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2619 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-09 00:01:04 +00:00
Graham Triggs
59306488a0 Updated efficiency and clarity of browse code. Much faster indexing at slight cost of lookup. Fix to normalisation code.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2618 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-08 23:47:56 +00:00
Scott Phillips
5f03b20dcc (ScottPhillips) Updated the usage of [dspace-source] to be in-line with that used in directories.html
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2617 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-08 02:53:53 +00:00
Scott Phillips
a2a02166cf (ScottPhillips) Minor updates to the directory descriptions.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2616 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-08 02:53:15 +00:00
Scott Phillips
142639ea24 (Scott Phillips)
Added upgrade instructions for DSpace 1.4.2 to DSpace 1.5

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2615 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-08 02:36:07 +00:00
Scott Phillips
fba8c514fa (Scott Phillips)
Split index-all into index-init and index-update. index-init is run to re-initalize after a configuration change while index-update will just update the index for all items. This simplifies upgrading an existing DSpace by having one easy indexing command to run after the upgrade.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2614 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-08 02:35:01 +00:00
Graham Triggs
f1549c6460 Updated efficiency and clarity of browse code. Much faster indexing at slight cost of lookup. Fix to normalisation code.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2613 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-08 00:56:30 +00:00
Mark Diggory
e27161bbca Remove I18N : Eliminate I18N class from core and adjust the only two locations it is still used in ChecksumChecker to use I18nUtil.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2612 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-08 00:02:37 +00:00
Tim Donohue
eafc594282 minor edits/fixes
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2611 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 21:34:27 +00:00
Tim Donohue
34e7fb245f Updated 'directories.html' with new 1.5 directory structure. Also added a section describing directory structure of the XML-UI web app.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2610 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 21:22:09 +00:00
Tim Donohue
2bbe5d8e65 Changed documented paths in configure.html as to where to customize Messages.properties
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2609 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 21:21:03 +00:00
Mark Diggory
1be495683d Copy of Messages.properties for customization purposes.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2608 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 20:35:28 +00:00
Mark Diggory
0881d201eb New home for customized i18n files
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2607 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 20:33:54 +00:00
Tim Donohue
a9d85fda04 Updated configuration instructions to detail how to now customize JSPs.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2606 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 19:30:35 +00:00
Tim Donohue
0d24be11b1 Updated install instructions based on the newest build architecture.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2605 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 19:15:34 +00:00
Richard Jones
ce332ac1f5 further refactoring to core identifier classes. Just comments and neater code.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2604 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 19:09:43 +00:00
Mark Diggory
729af4b97c correct pom inheritance and dependency management
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2603 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 18:29:03 +00:00
Mark Diggory
257094f3e9 svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2602 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 18:14:50 +00:00
Mark Diggory
6de23b1860 Add dspace-sword overlay
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2601 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 18:14:15 +00:00
Mark Diggory
5b18028aef filter out dspace-sword-webapp so its not placed in webapps (overlay is placed there instead)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2600 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 18:13:27 +00:00
Mark Diggory
ac9129535d Add skinny war generation to dspace-sword-webapp to support overlays
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2599 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 18:12:19 +00:00
Richard Jones
f2c42fea07 Add the new SWORD module to the 1.5.x branch. This includes the SWORD code, re-structured to meet the standards already laid out for the 1.5 release (top level project, with sub api and webapp projects). In addition to this the following additions have been made to the main part of DSpace, which will need to be removed again if SWORD is modularised out again:
- sword-swap-ingest.xsl has been included into config/crosswalks
- sword configuration has been added to dspace.cfg
- loading of the required fields for swap ingest has been added to the main build.xml
- references to dspace-sword have been added to all the relevant pom.xml files in the main for DSpace

Furthermore, this commit includes the source code for the common sword libraries.  These need really to be in the main maven repository, which I will work on as soon as possible before the 1.5 beta release.

This module has been tested to work previously, so it has not been extensively tested again.  Dependency issues in the build system may remain, which have notyet been discovered.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2598 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-07 14:04:21 +00:00
Richard Jones
04cb4c5ed5 Core URI system refactoring, including javadocs, better modularity, and the change of IdentifierFactory to IdentifierService, in line with other naming conventions
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2597 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-06 17:57:52 +00:00
Graham Triggs
f0dc55127b Make the browse indexing more robust to suspect data
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2596 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-06 16:57:17 +00:00
Graham Triggs
6a4f72cb39 Make the browse indexing more robust to suspect data
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2595 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-06 16:56:52 +00:00
Richard Jones
c258dcd32a a whole pile of changes, some of which work, and some of which don't ;) Mostly this big commit is to include the latest changes to manakin, which currently aren't functional, along with some refactoring, commenting and general tidying up of the core set of identifier classes
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2594 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-04 18:19:07 +00:00
Graham Triggs
ebbb8d7bce Fix issue with second level browse (ie items for a particular subject) not allowing you to use the page controls
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2593 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-04 15:02:28 +00:00
Graham Triggs
16c0d1599e Fix issue with second level browse (ie items for a particular subject) not allowing you to use the page controls
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2592 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-04 15:01:35 +00:00
Scott Phillips
33749b9ca8 (ScottPhillips) Documentation updates and the addition of Manakin.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2591 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-04 12:40:49 +00:00
Richard Jones
3ee8048868 basic working features of storing identifiers as metadata fields. This is integrated with the submission system to a large degree, although there is still a known issue that identifiers are being generated and discarded unnecessarily during workflow. The whole process of identifiers for in-submission items needs to be looked at.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2590 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-31 17:45:32 +00:00
Graham Triggs
c323833651 Small fix to indexing of dates
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2589 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-31 16:52:34 +00:00
Graham Triggs
ab71001443 Small fix to indexing of dates
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2588 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-31 16:52:09 +00:00
Richard Jones
1e7af72a76 re-enable xml-ui with rudimentary identifier support. This involves having fitted a new resolving mechanism to work with the xmlui way of obtaining DSpaceObjects, and decoupling the handle specific dependencies. This has appeared to be successful with regard to communities and collections, but it is not currently possible to submit items through the UI.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2587 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-30 16:53:34 +00:00
Mark Diggory
d20b75b75b Add in profile for building source and bootstrap release. Use it via 'mvn -Prelease package'
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2586 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-30 14:30:29 +00:00
Mark Diggory
97fc12b70c Ignore project targets.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2585 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-29 23:44:35 +00:00
Mark Diggory
eb606228b6 Importing the changes from the binary build prototype (mis-named). Provides example overlays where customization can occur.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2584 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-29 23:43:58 +00:00
Richard Jones
d378aef30f mass commit of broken code for identifiers. Fixes coming up over the next couple of weeks.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2583 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-29 14:28:53 +00:00
Graham Triggs
eb4879f342 PDF Filter can optionally extract text into a temporary file instead of memory (useful for very large PDFs)
PDF Filter can optionally skip bitstream extraction when an OutOfMemoryException is thrown (workaround to PDFBox error)
PDFBox version bumped to 0.7.3 to be in line with previous DSpace distributions
Lucene bumped to version 2.3.0 - no source changes required, compatible with existing indexes, indexing has up to 8x performance improvement

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2582 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 22:01:54 +00:00
Graham Triggs
07f131cebf PDF Filter can optionally extract text into a temporary file instead of memory (useful for very large PDFs)
PDF Filter can optionally skip bitstream extraction when an OutOfMemoryException is thrown (workaround to PDFBox error)
PDFBox version bumped to 0.7.3 to be in line with previous DSpace distributions
Lucene bumped to version 2.3.0 - no source changes required, compatible with existing indexes, indexing has up to 8x performance improvement

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2581 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 22:01:22 +00:00
Mark Diggory
e4a098926f Complete JSPUI reorganization. Remove empty directories.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2580 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 02:55:27 +00:00
Mark Diggory
2c34bf1bf8 Complete JSPUI reorganization. Merge changes from 1.5 including java and webapp relocations and pom edits.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2579 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 02:52:17 +00:00
Mark Diggory
d4c59b332f Complete JSPUI reorganization. Create initial directory structure.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2578 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 02:37:58 +00:00
Mark Diggory
0b5dece2da svn-ignore changes
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2577 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 02:13:44 +00:00
Mark Diggory
18015db26b svn ignore target and project files
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2576 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 02:05:05 +00:00
Mark Diggory
265a5e074c Complete JSPUI reorganization. Exclude OAI and JSPUI jars from showing in dspace/lib
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2575 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 01:37:53 +00:00
Mark Diggory
ae92d58737 Complete JSPUI reorganization. Adjust modules in dspace/pom.xml to reflect new jspui projects.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2574 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 01:35:20 +00:00
Mark Diggory
3aaaf4df55 Use SNAPSHOT for dspace-assembly-plugin
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2573 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 01:29:08 +00:00
Mark Diggory
97fefa48fa Complete JSPUI reorganization. Delete empty directories
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2572 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 01:28:23 +00:00
Mark Diggory
a598fba1b7 Complete JSPUI reorganization. Make required directory moves.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2571 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 01:26:50 +00:00
Mark Diggory
03a615480e Complete JSPUI reorganization. Make POM adjustments in parents.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2570 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 01:25:03 +00:00
Mark Diggory
02a619ae81 Complete JSPUI reorganization.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2569 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-27 01:24:08 +00:00
Graham Triggs
380a9f02ac Minor corrections following the generalisation of sort ordering
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2568 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-25 16:09:21 +00:00
Graham Triggs
2e21feaaf8 Minor corrections following the generalisation of sort ordering
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2567 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-25 16:06:40 +00:00
Richard Jones
af7ef46521 add legacy url support for handles. This means all urls of the form [dspace-url]/handle/<handle> will still work (as they may have been bookmarked through the browse address bar). It does also mean that handles with the new formulation in the url (resource/hdl/<handle>) can also be resolved through the old mechanism.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2566 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-23 15:57:42 +00:00
Graham Triggs
18b7f3462a Add email validation to FeedbackServlet (Fix SF bug 1827579)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2565 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-22 22:44:55 +00:00
Graham Triggs
0e2a014641 Add email validation to FeedbackServlet (Fix SF bug 1827579)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2564 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-22 22:41:19 +00:00
Richard Jones
f2f2569022 fix title display of item on jsp-ui
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2563 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-22 15:39:59 +00:00
Graham Triggs
fa9917a311 Fixed erroneous comment text
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2562 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-22 15:35:14 +00:00
Graham Triggs
443083b140 Add search ordering controls to Manakin
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2561 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-18 05:36:21 +00:00
Graham Triggs
3159fd2457 Add search ordering controls to Manakin
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2560 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-17 23:13:20 +00:00
Graham Triggs
5c64a51dc1 Completed search reordering controls, made ItemListTag equivalent to BrowseListTag
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2559 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 21:55:24 +00:00
Tim Donohue
d69626c9ce Fixing order of copy processes in 'ant update'. Previously it was overwriting everything in [dspace]/etc, and *then* backing that up to [dspace]/etc.bak-{build.date}. Fixed it to perform backup of /etc first!
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2558 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 20:30:51 +00:00
Tim Donohue
80de1bdeed Fixing order of copy processes in 'ant update'. Previously it was overwriting everything in [dspace]/etc, and *then* backing that up to [dspace]/etc.back-{build.date}. Fixed it to perform backup of /etc first!
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2557 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 20:29:31 +00:00
Tim Donohue
72a7e39505 Adding 'target' directory to svn:ignore for both dspace-oai-api and dspace-oai-webapp
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2556 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 17:34:05 +00:00
Tim Donohue
04dd8f3a2d Adding 'target' directory to svn:ignore for both dspace-oai-api and dspace-oai-webapp
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2555 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 17:29:25 +00:00
Tim Donohue
622f9cbdb9 Added .settings (Eclipse Settings folder) and .tomcatplugin (Eclipse Tomcat Plugin settings) to svn:ignore
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2554 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 17:23:28 +00:00
Graham Triggs
86883adad0 Completed search reordering controls, made ItemListTag equivalent to BrowseListTag
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2553 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 16:46:44 +00:00
Graham Triggs
e382daaa1c Replace internal Sun Base64 encoder with Commons-codec
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2552 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 10:51:30 +00:00
Graham Triggs
e74ee7391c Replace internal Sun Base64 encoder with Commons-codec
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2551 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 10:50:38 +00:00
Graham Triggs
46bfab5efb Added distinct year indexing for dates
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2550 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 10:25:52 +00:00
Graham Triggs
c816a34268 Added distinct year indexing for dates
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2549 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-16 10:25:16 +00:00
Mark Diggory
b4eb8eb806 Merge across branch and trunk so that history is consistent and conflicts no longer exist.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2548 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 23:39:24 +00:00
Mark Diggory
835a79a4f4 This directory is no longer used.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2547 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 23:34:36 +00:00
Mark Diggory
c4c468d9fc Merge changes to trunk: Reorganize dspace-oai plugin to be structured identically to dspace-xmlui and dspace-lni plugins.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2546 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 23:32:30 +00:00
Mark Diggory
64670b0d4e minor correction in parent
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2545 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 22:41:57 +00:00
Mark Diggory
62500276c6 This directory is no longer used.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2544 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 22:39:48 +00:00
Mark Diggory
83f5fa4991 Reorganize dspace-oai plugin to be structured identically to dspace-xmlui and dspace-lni plugins.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2543 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 22:36:36 +00:00
Tim Donohue
fe152ed100 Updated 'echo' comments that are returned when running 'ant update' or 'ant fresh_install'. The comments had not been fully updated for the 1.5 build/install process.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2542 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 22:29:12 +00:00
Graham Triggs
2c79734f13 Fix ordering of community/collection/item, and add controls to alter number of results per page and sorting in search
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2541 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 21:43:15 +00:00
Graham Triggs
d6f05c84b0 Missing order parameter from page links
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2540 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 21:42:38 +00:00
Graham Triggs
f0238b980c Updated to use new index fields
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2539 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 21:34:38 +00:00
Graham Triggs
7c41217e92 Fix ordering of community/collection/item, and add controls to alter number of results per page and sorting in search
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2538 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 21:26:35 +00:00
Mark Diggory
dbd1629978 Remove vestigial History tables from database schema and add DROP TABLE in update schemas.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2537 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 19:58:25 +00:00
Mark Diggory
5e5cd8cf4f Remove vestigial History tables from database schema and add DROP TABLE in update schemas.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2536 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 19:58:12 +00:00
Tim Donohue
8a6ae1c449 Updated 'echo' comments that are returned when running 'ant update' or 'ant fresh_install'. The comments had not been fully updated for the 1.5 build/install process.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2535 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 18:28:32 +00:00
Graham Triggs
1b0797b4ec Make default search sorting Relevance in DESCENDING order (most relevant first), allows resorting to Relevance ASCENDING, and other options
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2534 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 16:44:52 +00:00
Graham Triggs
4f540ea77b Make default search sorting Relevance in DESCENDING order (most relevant first), allows resorting to Relevance ASCENDING, and other options
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2533 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 16:44:17 +00:00
Graham Triggs
00f7b2b8cf Fix problem with ordering community / collection / items
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2532 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 15:59:53 +00:00
Graham Triggs
327349224c Fix problem with ordering community / collection / items
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2531 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 15:59:29 +00:00
Graham Triggs
1c068b2132 Fix problem with DatabaseManager retrieving column information if the database contains multiple schemas
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2530 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 13:50:15 +00:00
Graham Triggs
501398ec1d Fix problem with DatabaseManager retrieving column information if the database contains multiple schemas
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2529 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 13:49:52 +00:00
Graham Triggs
42fca0e90c Fix quote parsing, remove oro dependency
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2528 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 13:37:06 +00:00
Graham Triggs
be1878ae64 Fix quote parsing, remove oro dependency
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2527 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-15 13:36:30 +00:00
Graham Triggs
1a5d6859cc Fix incorrectly thrown IOException
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2526 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-14 20:21:25 +00:00
Stuart Lewis
d725244ffd (Stuart Lewis) SF Patch #1642563 bin/update-handle-prefix rewritten in Java
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2525 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-14 16:40:45 +00:00
Tim Donohue
e03e592c8e Upgrade instructions in 1.5.x branch were missing the latest instructions to upgrade from 1.4.x to 1.4.2
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2524 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-14 15:48:18 +00:00
Graham Triggs
5a8b211d44 Disabled unnecessary Lucene workaround
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2523 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-14 15:08:59 +00:00
Graham Triggs
1720f60664 Disabled unnecessary Lucene workaround
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2522 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-14 15:06:54 +00:00
Graham Triggs
a2f335d697 Improved resilience of query object when index is lacking necessary information, improve efficiency of search results by not using handles if the resource ID is available
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2521 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-13 19:19:19 +00:00
Graham Triggs
089d3cc9c2 Moved AbstractTextFilterOFD from browse to sort package
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2520 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-13 16:15:35 +00:00
Graham Triggs
654462dbe0 Moved AbstractTextFilter to sort from browse
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2519 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-13 16:01:52 +00:00
Stuart Lewis
6d374b3a5b (Stuart Lewis) SF Patch #1642563 bin/update-handle-prefix rewritten in Java
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2518 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-12 15:51:04 +00:00
Tim Donohue
4beb0fa2bf An initial stab at updated installation instructions for DSpace 1.5. If there are details you see missing, feel free to add to it.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2517 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-11 22:41:04 +00:00
Mark Diggory
ed7d1af3b1 Fix missing ConfigurationLoad class.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2516 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-11 18:33:24 +00:00
Mark Diggory
f3f982b69a Fix missing ConfigurationLoad class.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2515 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-11 18:33:19 +00:00
Mark Diggory
7a966171ac Corrected compilation error
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2514 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 23:58:04 +00:00
Mark Diggory
68d057a2fd Corrected compilation error
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2513 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 23:44:33 +00:00
Mark Diggory
ffebcd417c bring along etc directory into install so that any sql upgrade code can be run from either dspace.home or from target/dspace-./
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2512 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 22:11:28 +00:00
Mark Diggory
e199e7f17e bring along etc directory into install so that any sql upgrade code can be run from either dspace.home or from target/dspace-./
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2511 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 22:07:32 +00:00
Graham Triggs
6d898a5e19 First part of search update - reduce search size, add in fields for sorting content, lessen dependency on handles
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2510 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 14:25:26 +00:00
Graham Triggs
20f921b7c8 First part of search update - reduce search size, add in fields for sorting content, lessen dependency on handles
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2509 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 14:04:16 +00:00
Graham Triggs
d86af20a5a First part of search update - reduce search size, add in fields for sorting content, lessen dependency on handles
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2508 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 14:03:36 +00:00
Richard Jones
e56e75648c add group resolution to getObject
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2507 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 10:20:48 +00:00
Richard Jones
071e1d2b9c extend identification mechanism to include Group objects. These could now technically be made resolvable through the UI using a unique URL.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2506 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-10 08:43:50 +00:00
Richard Jones
68f8572e8a extend identification mechanism to include EPerson objects. These could now technically be made resolvable through the UI using a unique URL.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2505 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-09 17:54:36 +00:00
Richard Jones
d8cfa7304c extend identification mechanism to non-DSpaceObject objects. This introduces a SimpleIdentifier which offers a basic wrapper for UUIDs, which is in turn extended by ObjectIdentifier to allow DSpaceObjects to take advantage of this type heirarchy. DSpaceIdentifier has been renamed ResolvableIdentifier which ObjectIdentifier and ExternalIdentifier now implement, so that it is clear that objects can be obtained from identifiers implementing this interface, but not from the SimpleIdentifier. With the addition of an Identifiable interface, we can now tag classes to be identifiable, with their choice of exactly which identifier mechanisms they wish to support. There is also the beginning of formal exception handling.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2504 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-09 11:47:36 +00:00
Mark Diggory
bc468a3047 Adding missing import statement to UploadStep.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2503 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-09 00:37:35 +00:00
Mark Diggory
2b945729f4 Merge from 1.5.x branch:
If the Auth Method href or title key is null, do not show it in the list of options.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2502 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-09 00:28:37 +00:00
Mark Diggory
062a102c51 Merge to trunk:
Reordering Submission Aspect after EPerson Aspect corrects bug where "My Account" title disappears when logged in. Unsure why bug occurs.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2501 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-09 00:09:48 +00:00
Mark Diggory
4b4828ef0e Reordering Submission Aspect after EPerson Aspect corrects bug where "My Account" title disappears when logged in. Unsure why bug occurs.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2500 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-09 00:04:54 +00:00
Mark Diggory
9a2b9a68ea Do not include Item either if case is true.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2499 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 23:39:28 +00:00
Mark Diggory
063dc1ffd7 If the Auth Method href or title key is null, do not show it in the list of options.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2498 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 23:21:47 +00:00
Tim Donohue
f83ebc1dd4 Fixes to DTD based on merged version of the item-submission.xml
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2497 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 22:50:29 +00:00
Tim Donohue
bdcd65d78c Fixes to DTD based on merged version of the item-submission.xml
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2496 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 22:50:05 +00:00
Tim Donohue
65d56b57bb Merging recent Config Submission changes from 1.5.x Branch into Trunk:
(From earlier today)
Small bug fix to allow JSPUI and XMLUI to both allow skipping file upload during submission, if it is enabled in the dspace.cfg.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2495 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 20:06:57 +00:00
Tim Donohue
49386c1c5d Merging recent Config Submission changes from 1.5.x Branch into Trunk:
(From earlier today)
Merged 'item-submission-JSPUI.xml' and 'item-submission-XMLUI.xml' files into a single 'item-submission.xml' configuration file (based on suggestions from Graham Triggs).  

Small updates throughout API for Configurable Submission to support this merged configuration file (majority of changes in dspace-api and dspace-jspui modules).   Also includes updates to Configurable Submission documentation and small updates to I18N to make the XMLUI and JSPUI keys more parallel.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2494 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 20:02:59 +00:00
Tim Donohue
50cbccfd26 Merging recent Config Submission changes from 1.5.x Branch into Trunk:
(From Jan 4)
Various bug fixes to JSP-UI file upload step:
Fixed NPE when no file selected to upload.  Fixed small bug in processing of upload-error.jsp (was not returning to file upload screen).  Fixed ability to enable *skipping* uploading a file during JSPUI submission (some of the code never made it into 1.5 codebase during my original Config Submission patch, so this feature was not working properly).

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2493 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 19:45:52 +00:00
Tim Donohue
cf734f6bfd Small bug fix to allow JSPUI and XMLUI to both allow skipping file upload during submission, if it is enabled in the dspace.cfg.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2492 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 18:56:45 +00:00
Tim Donohue
80356f5c2e Merged 'item-submission-JSPUI.xml' and 'item-submission-XMLUI.xml' files into a single 'item-submission.xml' configuration file (based on suggestions from Graham Triggs).
Small updates throughout API for Configurable Submission to support this merged configuration file (majority of changes in dspace-api and dspace-jspui modules).   Also includes updates to Configurable Submission documentation and small updates to I18N to make the XMLUI and JSPUI keys more parallel.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2491 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 17:53:25 +00:00
Graham Triggs
cec1b19e54 Fix feed generation to use descending order (so most recent items come first)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2490 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 12:18:53 +00:00
Graham Triggs
0b8f5dc31c Fix feed generation to use descending order (so most recent items come first)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2489 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 12:16:33 +00:00
James Rutherford
c6599aafcb Moved all database creation SQL into the main database_schema.sql, removing the old DAO-specific file. Updated the build.xml to reflect changes.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2488 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-08 11:04:41 +00:00
Graham Triggs
eb10adb3e3 Make it possible to specify multiple metadata fields to be used in a 'unique metadata' index - ie. dc.contributor.author,dc.contributor.advisor for the author list
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2487 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-07 15:52:55 +00:00
Graham Triggs
007081224a Make it possible to specify multiple metadata fields to be used in a 'unique metadata' index - ie. dc.contributor.author,dc.contributor.advisor for the author list
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2486 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-07 15:52:27 +00:00
Richard Jones
1e73ff0119 add external identifier assignment to all DSpaceObjects through their *DAOCore classes. This now extends the assignment of external identifiers to bundles and bitstreams too. It could be left up to the external identifier implementation to decide which object types it actually assignes identifiers to (e.g. the Handle mechanism could decide not to assign handles if the object type is Bundle or Bitstream). I have not implemented this selectiveness, though, and intend to leave identifier assignment throughout the entire DSpaceObject hierarchy for consistency unless convinced otherwise.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2485 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-07 15:50:50 +00:00
Richard Jones
bc51fa9c16 fix bug with resolution of canonical form identifiers resulting in infinite recursion to stack overflow
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2484 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-07 15:22:42 +00:00
Richard Jones
ae540b120a propagate API changes for URL generation throughout source code. Now all cases where URLs are required should use IdentifierFactory.getURL(DSpaceObject), which will generate the appropriate URL as specified by configuration. It also means that where the appropriate URL cannot be generated, it can fall back to the internal UUID based URL. Note that there may be copy-and-paste bugs in this code, but so far no errors have been observed. Keep your eyes peeled.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2483 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-07 14:30:51 +00:00
Graham Triggs
d1f8015bb5 Added missing copyright messages
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2482 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-05 06:31:33 +00:00
Tim Donohue
7301b832db Various bug fixes to JSP-UI file upload step:
Fixed NPE when no file selected to upload.  Fixed small bug in processing of upload-error.jsp (was not returning to file upload screen).  Fixed ability to enable *skipping* uploading a file during JSPUI submission (some of the code never made it into 1.5 codebase during my original Config Submission patch, so this feature was not working properly).

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2481 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-04 22:45:19 +00:00
Richard Jones
775078c133 initial code to allow arbitrary identifier schemes to be used as the basis for the DSpace standard url scheme. If a namespace is set in the configuration, the IdentifierFactory will attempt to construct an internal style url based on this scheme, and fall back to standard object identifiers if unsuccessful. This requires a change in the way that URLs for objects are constructed for the UI, which has so far only been implemented in the BrowseListTag as a demonstrator. This needs to be further rolled out across the code base.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2480 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-04 17:33:41 +00:00
Richard Jones
45d50eab9f re-introduce the LNI module into the build process. I can't verify directly that this is functioning correctly, but the code compiles and looks correct. Further testing will be required to ensure that identifier management is being done properly. I have endeavoured to make additional changes to the DAVDSpaceObject which make sure that LNI resource paths are now actually assembled using the canonical forms of the UUIDs associated with items, and not their handles, which ought to mean that the resolution code is now also working. Further work is needed to move the LNI away from its reliance on the semantics of handles, but this is too much for the moment.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2479 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-04 16:20:27 +00:00
Richard Jones
2f28156197 modifications to jspui to include external identifiers at the top of community and collection pages, and uuids at the bottom
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2478 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-04 15:54:40 +00:00
Richard Jones
6728570e14 Fix for bug throwing NPE when invalid identifier is offered through the URL
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2477 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-04 14:48:48 +00:00
Richard Jones
958e4c64b3 updates to ObjectIdentifier API, and addition of an ObjectIdentifierMint which will be responsible for ensuring that ObjectIdentifiers are created properly, and also with the job of insulating the user from the DAO abstraction where necessary. There is also improved generalisation of identifier resolution so that a single call to IdentifierFactory.resolve() will attempt to generate a DSpaceIdentifier from the given string using a number of methods. Pass to this canonical forms, or url segments, and it will attempt to generate a valid object identifier.
Note that invalid identifiers currently generate a null pointer exception.  Fix coming up.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2476 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-04 14:33:05 +00:00
James Rutherford
ac60cf682a Removed the Supervisor class (should have been included in the last commit).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2475 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-04 14:26:47 +00:00
James Rutherford
0e4ec3ad58 Renamed Supervisor to be SupervisionManager (to make it more consistent with convention elsewhere). Also made SupervisionManager and ArchiveManager abstract, as they are both just collections of static helper methods, and it wouldn't make sense to instantiate either of them.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2474 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-04 14:25:38 +00:00
Tim Donohue
faa1749a25 Ack...sorry, I updated the wrong SVN...my mistake!
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2473 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-03 18:19:46 +00:00
Tim Donohue
7aae860821 test update
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2472 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-03 18:18:22 +00:00
James Rutherford
fd86daa826 Tidying up.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2471 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-03 11:29:44 +00:00
Graham Triggs
5ed6765f73 Centralise Thumbnail logic, and improve DB efficiency in generating thumbnail links on item lists (in testing, at least 4x better)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2470 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-01-02 09:30:40 +00:00
Graham Triggs
0499f077b9 Added "db.poolname" configuration (so that multiple applications can share a single DBCP). Also add a shutdown method to allow web applications to clean up on undeploy.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2469 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-29 22:20:07 +00:00
Graham Triggs
ada69cdad8 Added "db.poolname" configuration (so that multiple applications can share a single DBCP). Also add a shutdown method to allow web applications to clean up on undeploy.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2468 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-29 22:19:26 +00:00
Graham Triggs
38587c5295 Fix SF Bug: 1744488 - Mapped items listed multiple times in feeds / recent submissions
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2467 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-25 22:45:58 +00:00
Graham Triggs
8ed598e202 Fix SF Bug: 1744488 - Mapped items listed multiple times in feeds / recent submissions
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2466 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-25 22:45:23 +00:00
Andrea Bollini
7bb17bd0aa [ 1856368 ] Patch for Bug #1856364 Wrong label for First/Last name
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2465 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-24 10:13:23 +00:00
Andrea Bollini
9e987b6f96 [ 1856368 ] Patch for Bug #1856364 Wrong label for First/Last name
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2464 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-24 10:11:36 +00:00
Andrea Bollini
9ab3f20879 [ 1856368 ] Patch for Bug #1856364 Wrong label for First/Last name
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2463 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-24 10:09:52 +00:00
Andrea Bollini
a581adcec6 [ 1856368 ] Patch for Bug #1856364 Wrong label for First/Last name
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2462 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-22 12:43:21 +00:00
Andrea Bollini
f0dad44126 [ 1856368 ] Patch for Bug #1856364 Wrong label for First/Last name
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2461 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-22 12:43:08 +00:00
Andrea Bollini
833bdef713 [ 1856368 ] Patch for Bug #1856364 Wrong label for First/Last name
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2460 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-22 12:42:46 +00:00
Richard Jones
26c4e7b776 migration tools for moving existing handles over into the new external identifier system. Before proceeding with working on trunk please update your database as per the database-schema_15-16.sql file and run Upgrade15To16
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2459 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-21 12:27:38 +00:00
Richard Jones
9b9522d190 Complete initial implementation of the external identification mechanism. This includes a generalised object and storage model for external identifiers, as well as tools to manage the plugin stack for allowing pluggable identification mechanisms. There is a partial implementation of all the handle kit, which is still to be finalised, but which allows for assignment of handles to all DSpaceObjects, and will currently resolve handles only to DSpace Items. This new object model and process is then implemented throughout the dspace-api, and dspace-jspui modules, but will currently not work with the dspace-xmlui module (it will not currently compile against the dspace-api module, and will continue to remain inactive until the API for external and internal identifiers has been stabilised and changes can be propagated) or the dspace-lni module. There are additional changes to the dspace-jspui module which improve the display mechanics for both external and internal identifiers. Please note: the changes have not been tested in all contexts, and bugs will undoubtedly remain in areas such as RSS feeds, statistical reports, and so on.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2458 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-21 12:25:59 +00:00
Graham Triggs
4332d1e05b Fix retrieval of Locale for an EPerson so that if the language isn't set, an NPE isn't thrown
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2457 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-20 18:30:15 +00:00
Graham Triggs
9237c9e5ef Fix retrieval of Locale for an EPerson so that if the language isn't set, an NPE isn't thrown
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2456 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-20 18:22:51 +00:00
James Rutherford
ec864182d6 Minor bugfix in the ObjectIdentifier.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2455 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-19 15:53:52 +00:00
James Rutherford
d14a30259b Minor refactoring in the ItemProxy.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2454 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-19 15:49:52 +00:00
Scott Phillips
1001bb887a (Conal Tuohy) SF# 1769052 fix URI-parsing bug in AspectGenerator
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2453 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-18 00:14:42 +00:00
Scott Phillips
b98479ab30 (Scott Phillips) Added top level target directory (and eclipse tomcat plugin generated directory 'work') to the ignored list.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2452 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-17 23:53:42 +00:00
Scott Phillips
d062e0db04 (Samu Viita) Added JSPUI-like logging of bitstreams downloads.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2451 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-17 23:37:29 +00:00
Scott Phillips
49e047fff4 (Scott Phillips) Cleaned up import directives
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2450 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-17 23:20:15 +00:00
Richard Jones
62392b0b2a minor re-naming and addition of relevant code licences for object identifiers
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2449 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-17 11:32:02 +00:00
Graham Triggs
2c13df1777 Fix to SF bug #1827521 - recent submissions not showing sub-community submissions.
- adds communities2item table maintenance back into browse, includes new SQL to query the community hierarchy more efficiently than the Item/Community API
- by extension, fixes a problem where items in an upgraded database can't be deleted due to their existence in communities2item
- also, changes ItemDAO to use communities2item instead of community2item, so RSS feeds will work on the same basis of recent submissions, and include the sub-community content

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2448 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-16 22:57:51 +00:00
Graham Triggs
3b4e9a778e Fix to SF bug #1827521 - recent submissions not showing sub-community submissions.
- adds communities2item table maintenance back into browse, includes new SQL to query the community hierarchy more efficiently than the Item/Community API
- by extension, fixes a problem where items in an upgraded database can't be deleted due to their existence in communities2item
- also, changes Harvest to use communities2item instead of community2item, so RSS feeds will work on the same basis of recent submissions, and include the sub-community content

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2447 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-16 22:41:40 +00:00
Richard Jones
1472b0f277 initial pass at 1.5 to 1.6 migration tools. This is pretty much hacked together to demonstrate the new UUID work, and still needs to be looked at properly.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2446 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 16:21:54 +00:00
Richard Jones
977a58d054 fix uuid assignment and storage mechanism throughout core object model. This adds relevant ObjectIdentifier management techniques to the object model, and manages their creation, assignment, update and removal through the DAO layer. It also adds a de-normalised index of uuids for rapid access to the content objects. The URIServlet is updated to be able to resolve UUID based URLs to the DSpaceObject which they pertain to. Currently, the handle and other external identifier mechanisms are not in line with this code, so they will not function yet. Also attached are database schema files for creating the relevant underlying storage in postgres.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2445 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 16:19:54 +00:00
Mark Diggory
8b0cff1ec0 r8832@libaxis1 (orig r2438): mdiggory | 2007-12-13 21:59:51 -0500
Add in X509 Auth Key for xmlui


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2444 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 05:01:26 +00:00
Mark Diggory
0ac67b690b r8831@libaxis1 (orig r2437): grahamtriggs | 2007-12-13 18:48:50 -0500
Improved efficiency of scoped browsing by replacing an IN with an EXISTS


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2443 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 05:01:14 +00:00
Mark Diggory
52ca47925c r8830@libaxis1 (orig r2436): grahamtriggs | 2007-12-13 18:04:59 -0500
Improve efficiency of pruning excess information from browse tables


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2442 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 05:01:03 +00:00
Mark Diggory
2a9f0b81c3 r8829@libaxis1 (orig r2435): mdiggory | 2007-12-13 14:26:33 -0500
Allow X509Authentication to be triggered from Login Choices page as well. Default is old behavior, This allows one to maintain the site under http and only protect certificate login page with https for certificate authentication. Implicit X509 Authentication is not ideal in relation to default Internet Explorer behavior.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2441 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 05:00:53 +00:00
Mark Diggory
bc62127426 r8828@libaxis1 (orig r2434): grahamtriggs | 2007-12-13 12:37:59 -0500
*Massively* sped up the index prune methods (which means instatiating / withdrawing / editing items is *much* faster)


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2440 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 05:00:39 +00:00
Mark Diggory
44992c0364 r8826@libaxis1 (orig r2432): grahamtriggs | 2007-12-13 10:33:53 -0500
Significantly speed up the submission process, by reducing the work the browse code does if it can assume that the item has never been indexed


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2439 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 05:00:31 +00:00
Mark Diggory
1b2178a688 Add in X509 Auth Key for xmlui
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2438 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-14 02:59:51 +00:00
Graham Triggs
bac57b5e0c Improved efficiency of scoped browsing by replacing an IN with an EXISTS
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2437 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 23:48:50 +00:00
Graham Triggs
08a038b17d Improve efficiency of pruning excess information from browse tables
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2436 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 23:04:59 +00:00
Mark Diggory
f7f8500155 Allow X509Authentication to be triggered from Login Choices page as well. Default is old behavior, This allows one to maintain the site under http and only protect certificate login page with https for certificate authentication. Implicit X509 Authentication is not ideal in relation to default Internet Explorer behavior.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2435 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 19:26:33 +00:00
Graham Triggs
7bd52205f6 *Massively* sped up the index prune methods (which means instatiating / withdrawing / editing items is *much* faster)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2434 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 17:37:59 +00:00
James Rutherford
47aca7c1e3 Removed unnecessary calls to the child DAO.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2433 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 15:38:25 +00:00
Graham Triggs
ef4151816e Significantly speed up the submission process, by reducing the work the browse code does if it can assume that the item has never been indexed
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2432 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 15:33:53 +00:00
James Rutherford
5ba515a91f Tidying up.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2431 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 15:12:03 +00:00
James Rutherford
5eb2087bfc Fixed some NPEs and a typo in the input forms DTD.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2430 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 11:54:46 +00:00
James Rutherford
8657a33dbc Some code tidying around the DAOs, plus updated them so that delete() no longer calls update() before removing the object.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2429 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 11:14:39 +00:00
James Rutherford
7091b0c32b Fixed a minor typo in the configuration.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2428 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-13 10:25:01 +00:00
James Rutherford
fd510a7588 Refactored the Group DAOs to take advantage of the refined stackable DAO mechanism. Also fixed a logic error in the update() method of the Group DAO.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2427 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-12 18:55:12 +00:00
James Rutherford
0b66062da8 Migrated org.dspace.storage.dao to org.dspace.dao, and rearranged the stackable DAO interfaces & classes a bit. I've also refactored the EPerson DAOs to take advantage of the refined mechanism.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2426 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-12 15:01:00 +00:00
James Rutherford
410854970e Migrated org.dspace.storage.dao to org.dspace.dao, and rearranged the stackable DAO interfaces & classes a bit. I've also refactored the EPerson DAOs to take advantage of the refined mechanism.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2425 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-12 14:52:52 +00:00
Richard Jones
1975a3945a include in the 'uri' file the canonical forms of all the identifiers associated with an item
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2424 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-11 14:48:17 +00:00
Mark Diggory
467fab985d r8785@libaxis1 (orig r2421): mdiggory | 2007-12-10 16:34:12 -0500
Enable METS OAI Crosswalk by default.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2423 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-11 05:00:21 +00:00
Mark Diggory
982b2caffd r8784@libaxis1 (orig r2420): mdiggory | 2007-12-10 16:31:39 -0500
correct dateCreated and dateIssued mappings in mods-submission xsl


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2422 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-11 05:00:15 +00:00
Mark Diggory
97694bf58a Enable METS OAI Crosswalk by default.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2421 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-10 21:34:12 +00:00
Mark Diggory
d3e0e07a58 correct dateCreated and dateIssued mappings in mods-submission xsl
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2420 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-10 21:31:39 +00:00
James Rutherford
d117658cba Fixed merge conflicts in MediaFilterManager. It builds OK, but still needs testing.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2419 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-10 18:10:16 +00:00
Mark Diggory
e5ec28d621 Restore Version to "SNAPSHOT"
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2418 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-10 17:15:04 +00:00
Mark Diggory
f1c004f5b0 This commit introduces the DAO prototype to trunk. This merge contains the works of James Rutherford (jrutherford) et. al. found in the DAO prototype branch revision number 1502 located here:
http://dspace-sandbox.googlecode.com/svn/branches/dao-prototype/

Further details can be found at the following WIKI page http://wiki.dspace.org/DSpace_1.6


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2417 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-10 17:00:07 +00:00
James Rutherford
89683e07e2 Fixed a bug in the cleanup script where any arguments passed in would be ignored.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2416 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-06 11:47:48 +00:00
Mark Diggory
2c520a93ae r8722@libaxis1 (orig r2414): grahamtriggs | 2007-12-03 09:30:56 -0500
Made a number of methods in the submission steps protected instead of private, to make it easier to extend the provided steps


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2415 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-04 05:00:32 +00:00
Graham Triggs
1f32543a19 Made a number of methods in the submission steps protected instead of private, to make it easier to extend the provided steps
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2414 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-03 14:30:56 +00:00
Mark Diggory
ce6c29b497 r8715@libaxis1 (orig r2412): grahamtriggs | 2007-12-01 06:17:19 -0500
Updated schema to remove the old browse tables that are no longer used


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2413 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-02 05:00:17 +00:00
Graham Triggs
65ceafe5e2 Updated schema to remove the old browse tables that are no longer used
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2412 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-01 11:17:19 +00:00
Mark Diggory
aa26ca4418 r8710@libaxis1 (orig r2410): tdonohue | 2007-11-30 13:14:41 -0500
Small addition of a "Skip" flag to MediaFilterManager/filter-media. Allows one to specific a list of identifiers (communities/collections/items) to SKIP during filtering process.  Updated documentation to explain this new flag.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2411 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-12-01 05:00:17 +00:00
Tim Donohue
e891212fdf Small addition of a "Skip" flag to MediaFilterManager/filter-media. Allows one to specific a list of identifiers (communities/collections/items) to SKIP during filtering process. Updated documentation to explain this new flag.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2410 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-30 18:14:41 +00:00
Mark Diggory
8989efa87c r8690@libaxis1 (orig r2407): tdonohue | 2007-11-29 12:55:45 -0500
Small bug fix to MediaFilterManager (found a cast to MediaFilter rather than to new FormatFilter).  Fixed some comments.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2409 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-30 05:00:44 +00:00
Mark Diggory
e15942f3e6 r8682@libaxis1 (orig r2406): grahamtriggs | 2007-11-29 06:58:05 -0500
Improved browse configuration (ability to hide sort options from the browse controls, can set left-hand navigation to asc and/or desc lists). Improves normalisation of titles.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2408 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-30 05:00:35 +00:00
Tim Donohue
6e377ffd94 Small bug fix to MediaFilterManager (found a cast to MediaFilter rather than to new FormatFilter). Fixed some comments.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2407 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-29 17:55:45 +00:00
Graham Triggs
603b82a006 Improved browse configuration (ability to hide sort options from the browse controls, can set left-hand navigation to asc and/or desc lists). Improves normalisation of titles.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2406 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-29 11:58:05 +00:00
Mark Diggory
6ec4d775d3 r8654@libaxis1 (orig r2400): grahamtriggs | 2007-11-28 17:34:57 -0500
Changed getBrowseIndices to respect order in dspace.cfg


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2405 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-29 05:00:58 +00:00
Mark Diggory
e9c1c748af r8653@libaxis1 (orig r2399): mdiggory | 2007-11-28 16:27:02 -0500
Add capability to filter bitstream which match a specific name.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2404 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-29 05:00:51 +00:00
Mark Diggory
820e9a6a94 r8652@libaxis1 (orig r2398): mdiggory | 2007-11-28 16:07:34 -0500
New options for ItemImporter to support bitstream permissions and descriptions


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2403 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-29 05:00:44 +00:00
Mark Diggory
7658488c18 r8651@libaxis1 (orig r2397): grahamtriggs | 2007-11-28 12:53:16 -0500
Fixed missing contexts to ItemCounter constructors


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2402 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-29 05:00:34 +00:00
Mark Diggory
20842da442 r8650@libaxis1 (orig r2396): tdonohue | 2007-11-28 11:06:58 -0500
Removed comments which had "UIUC" in them...whoops!


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2401 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-29 05:00:25 +00:00
Graham Triggs
68bc714dfd Changed getBrowseIndices to respect order in dspace.cfg
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2400 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-28 22:34:57 +00:00
Mark Diggory
c88190c161 Add capability to filter bitstream which match a specific name.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2399 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-28 21:27:02 +00:00
Mark Diggory
25e83a7b0e New options for ItemImporter to support bitstream permissions and descriptions
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2398 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-28 21:07:34 +00:00
Graham Triggs
6c401c9e55 Fixed missing contexts to ItemCounter constructors
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2397 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-28 17:53:16 +00:00
Tim Donohue
055a30715f Removed comments which had "UIUC" in them...whoops!
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2396 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-28 16:06:58 +00:00
Mark Diggory
cea5f6f57c r8625@libaxis1 (orig r2393): tdonohue | 2007-11-27 17:03:24 -0500
Applying SF patch #1589429 - "Self-Named" Media Filters (i.e. MediaFilter Plugins!)
 [This original patch was modified slightly to leave the existing MediaFilter abstract class intact, 
 and instead create a new FormatFilter interface which MediaFilter now implements]


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2395 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-28 05:35:58 +00:00
Mark Diggory
5cc08f3b6e r8624@libaxis1 (orig r2392): stuartlewis | 2007-11-27 05:02:09 -0500
(Richard Jones) S.F. Patch 1659868 Improved database level debugging


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2394 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-28 05:35:39 +00:00
Tim Donohue
2afd7ffefa Applying SF patch #1589429 - "Self-Named" Media Filters (i.e. MediaFilter Plugins!)
[This original patch was modified slightly to leave the existing MediaFilter abstract class intact, 
and instead create a new FormatFilter interface which MediaFilter now implements]

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2393 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-27 22:03:24 +00:00
Stuart Lewis
133de48176 (Richard Jones) S.F. Patch 1659868 Improved database level debugging
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2392 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-27 10:02:09 +00:00
Stuart Lewis
4cf8e13002 (Richard Jones) SF Patch 1659868 - improved database level debugging
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2391 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-27 09:37:01 +00:00
Mark Diggory
03f1939833 r8505@libaxis1 (orig r2369): mdiggory | 2007-11-26 15:21:28 -0500
add in missing language-packs


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2390 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:29:13 +00:00
Mark Diggory
54072fbddf r8504@libaxis1 (orig r2368): tdonohue | 2007-11-26 13:02:40 -0500
Fixed bug in Manakin Configurable Submission flow - It was causing an infinite loop, if your first submission step was a non-interactive (i.e. no-UI) step.  Also fixed a small bug to ensure that clicking "Previous" button will always bring you back to the last step you completed which had a UI.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2389 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:29:08 +00:00
Mark Diggory
fd02be6284 r8502@libaxis1 (orig r2367): grahamtriggs | 2007-11-26 08:46:35 -0500
Solve problem with 404 pages leaking contexts / connections due to not being run under a servlet


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2388 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:29:01 +00:00
Mark Diggory
a106e7b3ab r8501@libaxis1 (orig r2366): grahamtriggs | 2007-11-26 06:03:40 -0500
Fixed connection / context leak in ItemCounter


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2387 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:28:52 +00:00
Mark Diggory
293b1f3538 r8500@libaxis1 (orig r2365): grahamtriggs | 2007-11-26 05:24:51 -0500
And the update script - changed 'number' column to 'count' as number is a reserved word in Oracle


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2386 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:28:44 +00:00
Mark Diggory
d09592f42f r8499@libaxis1 (orig r2364): grahamtriggs | 2007-11-26 05:21:46 -0500
Changed 'number' column to 'count' as number is a reserved word in Oracle


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2385 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:28:33 +00:00
Mark Diggory
3669cfcdbc r8498@libaxis1 (orig r2363): grahamtriggs | 2007-11-26 04:51:43 -0500
Fix problems with strength counter (SQLException doesn't nest Throwable, incorrect cast of Community dso)


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2384 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:28:26 +00:00
Mark Diggory
d1725ea785 r8497@libaxis1 (orig r2362): grahamtriggs | 2007-11-26 04:10:39 -0500
More Oracle compatibility fixes - date truncation


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2383 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:28:18 +00:00
Mark Diggory
fb80ff2d2a r8490@libaxis1 (orig r2361): grahamtriggs | 2007-11-25 17:24:26 -0500
Fix Oracle compatibility - must supply sequence value on insert


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2382 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:28:05 +00:00
Mark Diggory
9a5065452d r8488@libaxis1 (orig r2359): grahamtriggs | 2007-11-25 12:25:41 -0500
Add BMP to the default list of formats read by the JPEGFilter, as it is supported in Java 5


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2381 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:27:56 +00:00
Mark Diggory
c485143eed r8487@libaxis1 (orig r2358): grahamtriggs | 2007-11-25 08:29:44 -0500
Renamed recent.submissions.index to recent.submissions.sort-option
 This is to avoid confusion with index names and sort options - also updated configuration documentation to correctly refer to sort-option and not index


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2380 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:27:49 +00:00
Mark Diggory
0d31c38ba6 r8485@libaxis1 (orig r2357): grahamtriggs | 2007-11-24 18:08:54 -0500
Removed authorlinks and subjectlinks configuration, as they were no longer used following Andrea's update


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2379 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:27:31 +00:00
Mark Diggory
bee6adc4f5 r8483@libaxis1 (orig r2356): grahamtriggs | 2007-11-23 09:14:12 -0500
Fixed missing localizations in help links


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2378 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:27:24 +00:00
Mark Diggory
aba19a44ea r8479@libaxis1 (orig r2355): grahamtriggs | 2007-11-22 05:22:56 -0500
Add ability to customise the item list display for different browse indexes and sort options


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2377 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:27:12 +00:00
Mark Diggory
a8801282b8 r8475@libaxis1 (orig r2354): grahamtriggs | 2007-11-21 07:39:54 -0500
Fixed browsing of authors in Item Mapper so that you only need to specify a partial name


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2376 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:27:02 +00:00
Mark Diggory
1228d50de5 r8444@libaxis1 (orig r2352): mdiggory | 2007-11-19 23:27:03 -0500
Use full release versions.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2375 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:26:48 +00:00
Mark Diggory
ce61b36b4e r8442@libaxis1 (orig r2350): mdiggory | 2007-11-19 20:56:07 -0500
Correction to bug discovered by Larry Stone (81906): https://webmail.mit.edu/horde/services/go.php?url=https%3A%2F%2Fsourceforge.net%2Ftracker%2F%3Ffunc%3Ddetail%26atid%3D319984%26aid%3D1834865%26group_id%3D19984


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2374 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:26:43 +00:00
Mark Diggory
c6278b0fd8 r8430@libaxis1 (orig r2348): mdiggory | 2007-11-15 18:00:44 -0500
move resolution of dspace-assembly-plugin into parent pom, correcting issues downstream in build process where it cannot be resolved.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2373 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:26:38 +00:00
Mark Diggory
0b67f72e52 r8384@libaxis1 (orig r2346): mdiggory | 2007-11-14 12:35:10 -0500
Reinitialize Browse tables anytime IntializeDatabase is called.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2372 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:26:28 +00:00
Mark Diggory
77d2093a82 r8374@libaxis1 (orig r2345): mdiggory | 2007-11-13 13:46:35 -0500
attach assembly back into package phase.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2371 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:26:20 +00:00
Mark Diggory
e415222b21 r8342@libaxis1 (orig r2343): mdiggory | 2007-11-12 20:29:37 -0500
Adjust scm location to be in the branch.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2370 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:26:10 +00:00
Mark Diggory
db254d753b add in missing language-packs
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2369 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 20:21:28 +00:00
Tim Donohue
0bfdc89689 Fixed bug in Manakin Configurable Submission flow - It was causing an infinite loop, if your first submission step was a non-interactive (i.e. no-UI) step. Also fixed a small bug to ensure that clicking "Previous" button will always bring you back to the last step you completed which had a UI.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2368 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 18:02:40 +00:00
Graham Triggs
3b9a53bba7 Solve problem with 404 pages leaking contexts / connections due to not being run under a servlet
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2367 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 13:46:35 +00:00
Graham Triggs
9f382c3438 Fixed connection / context leak in ItemCounter
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2366 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 11:03:40 +00:00
Graham Triggs
6326ffae55 And the update script - changed 'number' column to 'count' as number is a reserved word in Oracle
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2365 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 10:24:51 +00:00
Graham Triggs
54058b0aff Changed 'number' column to 'count' as number is a reserved word in Oracle
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2364 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 10:21:46 +00:00
Graham Triggs
3ddbccad9b Fix problems with strength counter (SQLException doesn't nest Throwable, incorrect cast of Community dso)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2363 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 09:51:43 +00:00
Graham Triggs
105c772e57 More Oracle compatibility fixes - date truncation
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2362 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-26 09:10:39 +00:00
Graham Triggs
e807a057de Fix Oracle compatibility - must supply sequence value on insert
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2361 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-25 22:24:26 +00:00
Stuart Lewis
9529cf5899 (Richard Jones) SF Patch 1659868 - improved database level debugging
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2360 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-25 22:12:01 +00:00
Graham Triggs
80e9508ff9 Add BMP to the default list of formats read by the JPEGFilter, as it is supported in Java 5
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2359 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-25 17:25:41 +00:00
Graham Triggs
378291b327 Renamed recent.submissions.index to recent.submissions.sort-option
This is to avoid confusion with index names and sort options - also updated configuration documentation to correctly refer to sort-option and not index

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2358 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-25 13:29:44 +00:00
Graham Triggs
5aac8da542 Removed authorlinks and subjectlinks configuration, as they were no longer used following Andrea's update
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2357 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-24 23:08:54 +00:00
Graham Triggs
571351dcfd Fixed missing localizations in help links
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2356 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-23 14:14:12 +00:00
Graham Triggs
ac26ef5b64 Add ability to customise the item list display for different browse indexes and sort options
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2355 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-22 10:22:56 +00:00
Graham Triggs
a7cfd21ed1 Fixed browsing of authors in Item Mapper so that you only need to specify a partial name
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2354 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-21 12:39:54 +00:00
Mark Diggory
cff493c639 Use full release versions.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2353 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-20 04:27:51 +00:00
Mark Diggory
1642fd3bf7 Use full release versions.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2352 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-20 04:27:03 +00:00
Mark Diggory
5f594f20bc Correction to bug discovered by Larry Stone (81906): https://webmail.mit.edu/horde/services/go.php?url=https%3A%2F%2Fsourceforge.net%2Ftracker%2F%3Ffunc%3Ddetail%26atid%3D319984%26aid%3D1834865%26group_id%3D19984
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2351 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-20 01:58:42 +00:00
Mark Diggory
8b6d99a327 Correction to bug discovered by Larry Stone (81906): https://webmail.mit.edu/horde/services/go.php?url=https%3A%2F%2Fsourceforge.net%2Ftracker%2F%3Ffunc%3Ddetail%26atid%3D319984%26aid%3D1834865%26group_id%3D19984
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2350 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-20 01:56:07 +00:00
Mark Diggory
db797f1379 Again attach assembly of directory to package phase.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2349 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-19 16:16:01 +00:00
Mark Diggory
0d532b146b move resolution of dspace-assembly-plugin into parent pom, correcting issues downstream in build process where it cannot be resolved.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2348 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-15 23:00:44 +00:00
Mark Diggory
ed5ab3198f move resolution of dspace-assembly-plugin into parent pom, correcting issues downstream in build process where it cannot be resolved.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2347 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-15 22:48:54 +00:00
Mark Diggory
08ac88062e Reinitialize Browse tables anytime IntializeDatabase is called.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2346 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-14 17:35:10 +00:00
Mark Diggory
a96e2d97f2 attach assembly back into package phase.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2345 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-13 18:46:35 +00:00
Mark Diggory
287304ff9b typo
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2344 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-13 02:10:44 +00:00
Mark Diggory
a0e8586ed7 Adjust scm location to be in the branch.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2343 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-13 01:29:37 +00:00
Mark Diggory
8aa7904dfd 1.) Adjust scm location to be in the trunk.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2342 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-13 01:20:19 +00:00
Mark Diggory
a6ee92f761 1.) Adjust version to be SNAPSHOT, the version for any dspace project module in the trunk.
2.) Adjust scm location to be in the trunk.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2341 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-13 01:06:00 +00:00
Mark Diggory
ed0bc8eaf3 Merge back to trunk from dspace-1_5_x branch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2340 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 23:49:18 +00:00
Mark Diggory
2001749ce0 Wrap SQLExceptions in ItemCounter with ItemCountExceptions and wrap ItemCountExceptions in Collection and Community in RuntimeExceptions.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2339 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 23:39:13 +00:00
Richard Jones
29aa8314fc add missing import statements in Community and Collection for item counter
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2338 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 16:11:01 +00:00
Richard Jones
813ca2b557 add missing import statements in Community and Collection for item counter
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2337 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 16:09:33 +00:00
Mark Diggory
8fc1889d77 Add snapshot repository details to all poms so that parents can be properly resolved when individual projects are checked out.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2336 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 15:54:32 +00:00
Mark Diggory
a22fc9ae8d Add snapshot repository details to all poms so that parents can be properly resolved when individual projects are checked out.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2335 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 15:54:27 +00:00
Mark Diggory
384bdd11d2 Add snapshot repository details to all poms so that parents can be properly resolved when individual projects are checked out.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2334 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 15:54:24 +00:00
Mark Diggory
04eb99c09d Add snapshot repository details to all poms so that parents can be properly resolved when individual projects are checked out.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2333 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 15:54:18 +00:00
Mark Diggory
6fd1e2f241 Add snapshot repository details to all poms so that parents can be properly resolved when individual projects are checked out.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2332 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 15:54:13 +00:00
Mark Diggory
35405b8c30 Add snapshot repository details to all poms so that parents can be properly resolved when individual projects are checked out.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2331 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 15:54:06 +00:00
Mark Diggory
6b337b8fe1 Add snapshot repository details to all poms so that parents can be properly resolved when individual projects are checked out.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2330 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 15:53:58 +00:00
Richard Jones
242d43a696 Option to generate community and collection "strength" as a batch job
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2329 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 12:00:32 +00:00
Richard Jones
8d7b59f45d Option to generate community and collection "strength" as a batch job
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2328 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 11:59:47 +00:00
Graham Triggs
8a7e41a5fe Moved CreativeCommons xsl files from java directory to resources so that they are correctly added to the JAR
(otherwise, CreativeCommons class can't be created due to missing resources in static initialisation)

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2327 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-12 10:20:27 +00:00
Mark Diggory
c966ccc19a Phase 2 of build process refactoring:
Remove obsolete dspace-pom project.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2326 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-11 05:43:31 +00:00
Mark Diggory
bdfb2db765 Phase 2 of build process refactoring: Add capability to produce skinny wars as secondary artifacts of webapp projects.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2325 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-11 05:34:31 +00:00
Mark Diggory
661cec65f7 Adjusting generated maven website locations.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2324 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-10 22:23:21 +00:00
Mark Diggory
51cf0347e5 Phase 1 of build process refactoring.
1.) move parent pom to top level directory and change name to dspace-parent
2.) adjust parents of all weapps to be module in next directory up instead of dspace/pom.xml
3.) add in db driver selection and dspace.config selection into webapp poms.
4.) Add all child projects as modules in dspace-parent.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2323 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-10 21:21:23 +00:00
Mark Diggory
8c970ff63e Adjust versions so build will work until these get into the central repository.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2322 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-07 22:28:38 +00:00
Scott Phillips
e82de9cb24 (Scott Phillips) Removed the geronimo java mail library which is allready explicitly provided. This prevent any action that resulted in mail being sent, such as registering a new user or submitting an item.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2321 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-07 20:21:33 +00:00
Tim Donohue
977d3cc8fb More fixes to spelling & grammar within Manakin's messages.xml.
Some of these were suggested by Dorothea Salo (U of Wisconsin).

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2320 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-07 18:25:56 +00:00
Mark Diggory
dd4473d449 license
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2319 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-07 17:31:46 +00:00
Tim Donohue
13a4855053 Fixes to spelling & grammar within Manakin's messages.xml
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2318 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-07 16:39:06 +00:00
Tim Donohue
72ad21bd50 Fixed misspelled template "standardAttribues". Renamed to "standardAttributes", and fixed all references to it.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2317 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-07 15:39:31 +00:00
Mark Diggory
24867750c9 dropping excess info logging.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2316 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-06 22:44:39 +00:00
Mark Diggory
b1df1f0d68 CreativeCommons RDF processing based on XSL Transform.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2315 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-06 22:33:58 +00:00
Mark Diggory
c305b3bbf0 CreativeCommons RDF processing based on XSL Transform.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2314 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-06 22:28:48 +00:00
Mark Diggory
e570f0bc39 CreativeCommons license cleanup CLI
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2313 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-06 22:27:50 +00:00
Graham Triggs
c46b3d9d3b Fixed generation of the Creative Commons RDF, including the parsing change for the cc namespace.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2312 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-06 12:43:56 +00:00
Mark Diggory
c5c4049a99 Merging formating changes back from branch.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2311 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:58:36 +00:00
Mark Diggory
acfcf672f1 Correcting poor formatting in poms...
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2310 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:52:06 +00:00
Mark Diggory
6c059873da Merging differences back to trunk.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2309 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:47:18 +00:00
Mark Diggory
a7b6b492ac r7979@libaxis1 (orig r2276): tdonohue | 2007-10-29 11:16:11 -0400
Small bug fix to Pluggable Style Selection.  If an item is still an InProgressSubmission, it will not yet have an "owning collection".
 This was causing errors when attempting to preview or remove an InProgressSubmission in JSPUI.
 


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2308 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:30:31 +00:00
Mark Diggory
edf376a79e r7758@libaxis1 (orig r2273): mdiggory | 2007-10-25 14:10:22 -0400
Adjusting versioning to 1.5-alpha


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2307 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:30:24 +00:00
Mark Diggory
eed1641525 r7757@libaxis1 (orig r2272): mdiggory | 2007-10-25 14:10:16 -0400
Adjusting versioning to 1.5-alpha


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2306 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:29:09 +00:00
Mark Diggory
e721b8c7f4 r7756@libaxis1 (orig r2271): mdiggory | 2007-10-25 14:10:13 -0400
Adjusting versioning to 1.5-alpha


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2305 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:28:50 +00:00
Mark Diggory
fc57cf6355 r7755@libaxis1 (orig r2270): mdiggory | 2007-10-25 14:09:59 -0400
Adjusting versioning to 1.5-alpha


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2304 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:27:22 +00:00
Mark Diggory
65d1e27286 r7754@libaxis1 (orig r2269): mdiggory | 2007-10-25 14:09:55 -0400
Adjusting versioning to 1.5-alpha


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2303 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:26:57 +00:00
Mark Diggory
0574003c81 r7753@libaxis1 (orig r2268): mdiggory | 2007-10-25 14:09:51 -0400
Adjusting versioning to 1.5-alpha


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2302 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:26:33 +00:00
Mark Diggory
0802d795f1 r7752@libaxis1 (orig r2267): mdiggory | 2007-10-25 14:09:48 -0400
Adjusting versioning to 1.5-alpha


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2301 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:25:06 +00:00
Mark Diggory
fab8e8c42e r7751@libaxis1 (orig r2266): mdiggory | 2007-10-25 14:09:45 -0400
Adjusting versioning to 1.5-alpha


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2300 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:24:42 +00:00
Mark Diggory
3fe78f4e88 Move back to maven.dspace.org - deployment and removal of release repo def (central repo now used).
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2299 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:16:24 +00:00
Mark Diggory
e362deb21a Move back to maven.dspace.org
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2298 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-05 18:04:38 +00:00
Scott Phillips
1b9c6949c3 (Scott Phillips) Setting the .tomcat-plugin file and work/ directories used by eclipse to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2297 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 02:24:13 +00:00
Scott Phillips
0ccf16a338 (Scott Phillips) Setting the .tomcat-plugin file and work/ directories used by eclipse to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2296 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 02:24:10 +00:00
Scott Phillips
457b4419ab (Scott Phillips) Setting the .tomcat-plugin file and work/ directories used by eclipse to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2295 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 02:24:07 +00:00
Scott Phillips
de10d39b0b (Scott Phillips) Setting the .tomcat-plugin file used by eclipse to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2294 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 01:44:10 +00:00
Scott Phillips
0183c6374b (Scott Phillips) Setting the .settings directory used by eclipse to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2293 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 01:25:11 +00:00
Scott Phillips
12f08b2ffe (Scott Phillips) Setting the .settings directory used by eclipse to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2292 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 01:24:42 +00:00
Scott Phillips
d307a5bc8f (Scott Phillips) Setting the .settings directory used by eclipse to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2291 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 01:23:57 +00:00
Mark Diggory
dcfcad3640 Correcting "machine error" that created this folder.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2290 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 01:01:38 +00:00
Mark Diggory
b41463e2d4 Share project 'dspace-1_5_x' into 'https://dspace.svn.sourceforge.net/svnroot/dspace'
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2289 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-11-01 00:55:25 +00:00
Scott Phillips
11d58113c5 (Scott Phillips) Setting the target directory to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2288 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-31 21:55:10 +00:00
Scott Phillips
032d9ecdb5 (Scott Phillips) Setting .settings, used by eclipse, to ignored.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2287 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-31 21:54:35 +00:00
Mark Diggory
b47c404580 Correct identifier issues with repositories and switch over to using S.F. location for snapshot and release.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2286 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-30 20:20:14 +00:00
Mark Diggory
15a4f59cdd Correct identifier issues with repositories and switch over to using S.F. location for snapshot and release.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2285 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-30 19:40:55 +00:00
Mark Diggory
e99f6e5f4a adjust location of scm in dspace 1.5 branch.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2284 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-30 02:43:34 +00:00
Mark Diggory
735670adaa Adjust pluginRepositories to new locations.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2283 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-30 02:35:01 +00:00
Mark Diggory
fb35b49079 Adjust pluginRepositories to new locations.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2283 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-30 02:35:01 +00:00
Mark Diggory
38576313d8 Adjust versioning and snapshot location.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2282 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-30 02:19:02 +00:00
Mark Diggory
b0e84b5186 typo
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2281 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-29 22:09:56 +00:00
Mark Diggory
a117130eca Keep snapshot over scp for continuum.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2280 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-29 20:39:00 +00:00
Mark Diggory
bb7247c334 uniqueVersion = false to reduce number of snapshot copies.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2279 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-29 20:20:23 +00:00
Mark Diggory
a6cee54fd6 1.) Use strictly just "SNAPSHOT" for trunk with no version number.
2.) use local directory/svn sandbox for snapshot release.
3.) adjust versioning info in README

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2278 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-29 20:19:38 +00:00
Mark Diggory
27b2335cc4 Commiting adjustments to handle next "version"
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2277 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-29 19:40:58 +00:00
Tim Donohue
134852de5d Small bug fix to Pluggable Style Selection. If an item is still an InProgressSubmission, it will not yet have an "owning collection".
This was causing errors when attempting to preview or remove an InProgressSubmission in JSPUI.


git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2276 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-29 15:16:11 +00:00
Mark Diggory
6737f2158d Adjusting versioning to 1.5-alpha
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2273 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 18:10:22 +00:00
Mark Diggory
c5bae35cd9 Adjusting versioning to 1.5-alpha
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2272 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 18:10:16 +00:00
Mark Diggory
e20553e792 Adjusting versioning to 1.5-alpha
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2271 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 18:10:13 +00:00
Mark Diggory
f9fbf6a09c Adjusting versioning to 1.5-alpha
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2270 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 18:09:59 +00:00
Mark Diggory
f846f9bbf7 Adjusting versioning to 1.5-alpha
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2269 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 18:09:55 +00:00
Mark Diggory
3e5f37c74c Adjusting versioning to 1.5-alpha
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2268 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 18:09:51 +00:00
Mark Diggory
2540cebcaf Adjusting versioning to 1.5-alpha
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2267 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 18:09:48 +00:00
Mark Diggory
ded661235e Adjusting versioning to 1.5-alpha
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2266 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 18:09:45 +00:00
Mark Diggory
b9d2d57e27 Testing SVK smerge from branch to trunk.
r7715@libaxis1 (orig r2260):  ScottPhillips | 2007-10-24 12:02:30 -0400
 (Scott Phillips) Branch for DSpace 1.5.X set of releases
 r7736@libaxis1 (orig r2263):  bollini | 2007-10-25 08:39:31 -0400
 [1818000] Pluggable Style Selection strategy for item display
 r7737@libaxis1 (orig r2264):  bollini | 2007-10-25 08:41:44 -0400
 [1818000] Pluggable Style Selection strategy for item display


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2265 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 15:32:28 +00:00
Andrea Bollini
f7a83f2a02 [1818000] Pluggable Style Selection strategy for item display
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2264 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 12:41:44 +00:00
Andrea Bollini
58b2bcac44 [1818000] Pluggable Style Selection strategy for item display
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2263 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 12:39:31 +00:00
Andrea Bollini
4746c74340 [1818000] Pluggable Style Selection strategy for item display
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2262 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 12:24:58 +00:00
Andrea Bollini
7c9ca505f5 [1818000] Pluggable Style Selection strategy for item display
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2261 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-25 12:21:41 +00:00
Scott Phillips
e757a57b5b (Scott Phillips) Branch for DSpace 1.5.X set of releases
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2260 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-24 16:02:30 +00:00
Graham Triggs
8c2692ea7d Add the capability to define in which order the index should be listed by default (ascending or descending)
Also, removed two uses of 'magic' strings - replaced with static values from SortOption

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2259 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-24 11:47:31 +00:00
Graham Triggs
024ba53adf Defensive coding to avoid a FeedException when there is no description
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2258 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-23 10:34:47 +00:00
Graham Triggs
30c3a05a38 Added SQL to bring Oracle schema inline with Postgres updates
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2257 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-22 14:41:10 +00:00
Andrea Bollini
8c3b4ead62 display item page use the same configuration then browse system
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2256 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-22 14:16:33 +00:00
Richard Jones
4d1706b383 (Andre Bollini)
add null checks to dc metadata lookups in BrowseItem

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2255 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-22 12:12:51 +00:00
Andrea Bollini
1db6ad8882 more info in Exception message
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2254 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-19 16:42:53 +00:00
Andrea Bollini
140c9f25e6 added an initial configuration for webui.content_disposition_threshold (8Mb) and some info about
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2253 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-15 13:46:58 +00:00
Andrea Bollini
8d2b38eead added missed review initial question code
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2252 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-14 20:40:07 +00:00
Scott Phillips
8c12c74796 (Scott Phillips) Modify artifact preview to be more general than just thumbnails. This allows the possibility for themes to override the template to provide any icon it can for an items.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2251 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-12 22:21:37 +00:00
Stuart Lewis
5f35de8ebd (Robert Tansley) SF Patch #1566572 Item metadata in XHTML head <meta> elements
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2250 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-11 15:55:37 +00:00
James Rutherford
e303e57762 Fixed a minor bug in QDC.properties.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2249 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-11 10:53:17 +00:00
Graham Triggs
6c40b8a3b2 Fix Oracle sequence resetting
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2248 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-05 16:01:40 +00:00
Graham Triggs
2eab772d8f Corrected population of checksum_history
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2247 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-04 09:37:20 +00:00
Scott Phillips
a6d36acfcb (Scott Phillips) Setting default Manakin configuration paramaters.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2246 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 16:59:37 +00:00
Mark Diggory
e13f47b984 change parameter names to avoid risk of infinite loop
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2245 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 16:24:01 +00:00
Mark Diggory
9dcd497c56 change parameter names to avoid risk of infinite loop
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2244 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 16:22:42 +00:00
Mark Diggory
2d62e0fbf6 Remove dependency on Jena as the history system went away.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2243 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 15:30:33 +00:00
Mark Diggory
79edaa9f19 Removing bouncycastle, changing location of tm-extractors
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2242 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 15:08:27 +00:00
Graham Triggs
6d458762fc Corrected timestamp insertion in most_recent_checksum
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2241 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 14:52:24 +00:00
Graham Triggs
5a21e42fa5 Fixed definition of checksum_results
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2240 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 14:35:06 +00:00
Mark Diggory
fbfe181584 Use official Lucene jars in Maven repository.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2239 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 11:39:07 +00:00
Scott Phillips
4e5e1d0eb2 (Scott Phillips) Added a unique theme ID, which will be used by the feathers theme engine to provide easier theme development.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2238 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 03:15:55 +00:00
Scott Phillips
8cc1f28f56 (Scott Phillips) Added the rend attribute to xrefs, at it says they should have in the DRI schema.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2237 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 01:20:57 +00:00
Scott Phillips
b6bd305149 (Scott Phillips) Added the rend attribute to xrefs, at it says they should have in the DRI schema.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2236 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 01:17:32 +00:00
Scott Phillips
5d64526285 (Scott Phillips) Added the rend attribute to xrefs, at it says they should have in the DRI schema.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2235 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 01:16:11 +00:00
Scott Phillips
886ef957d6 (Scott Phillips) Fixed bug where if forced SSL for authenticated sessions is turned on and multiple authentication mechansms are installed the user would not be redirected to the proper authentication mechanisms if they were allready on a secure connection.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2234 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 00:42:30 +00:00
Scott Phillips
ca7d4defc9 (Scott Phillips) If a bitstream has access is restricted and the user is allready logged in instead of asking them to login again display an error page that tells the user they do not have suffecient priveleges to access the bitstream.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2233 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-03 00:13:58 +00:00
Scott Phillips
5fb0c5bbde (Scott Phillips) Tweaked default caching parameters based upon testing under live conditions at the TDL repository. The problem with the previous repository is that under even normal conditions components (i.e. transformers, generators, etc) would not be released from the cache and eventualy would suck all the available memory out of the JVM unless you had absolutely obsene amounts of available memory. Thse pramaters tweak the JVM to preform with just 64 megabytes of available memory and will always expire items from the cache after 24 hours or sooner.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2232 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 23:33:13 +00:00
Scott Phillips
b3d228444b (Scott Phillips) Remove the bitstream bitrange feature from downloading bitstreams. Adding this header causes some problems on the windows-based PDF viewers.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2231 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 23:15:23 +00:00
Scott Phillips
dc7bee8347 (Scott Phillips) Modified ItemImport so that when testing, i.e. the -t flag, each metadata field that is being added is check to see if it exists. If the field does not exist then an error message is printed, and the test continues.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2230 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 23:06:56 +00:00
Scott Phillips
bf971ddca1 (Scott Phillips) Removed the DSpaceResourceManager as a specific transformer to manage the opening and closing of DSpace context. Sometimes under high loads cocoon will not complete the lifecycle of transformers which would creat contitions where DSpace contexts / database connections would be leaked. To fix this the cocoon servlet wrapper is modified to handle closing ony open DSpace contexts when the servlet exits.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2229 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 22:26:31 +00:00
Mark Diggory
82c6717dfa sql.dir no longer a used property.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2228 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 20:59:22 +00:00
Mark Diggory
ecddeec8e5 Make servlet-api provided here as well.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2227 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 20:58:20 +00:00
Mark Diggory
16e4d90cce creating separate repositories for release and snapshot dspace dependencies.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2226 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 20:47:40 +00:00
Mark Diggory
05d74ee438 Adding servlet api to dspace-lni-client now that its designated as provided.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2225 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 17:24:34 +00:00
Mark Diggory
c4babb5a7d Adding servlet api to dspace-lni now that its designated as provided.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2224 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 17:10:15 +00:00
Mark Diggory
9f89b31db3 Adding servlet api to dspace-oai now that its designated as provided.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2223 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-10-02 17:08:27 +00:00
Graham Triggs
72cceaf478 Mark servlet-api dependency as provided (by application container)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2222 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-29 20:43:22 +00:00
Graham Triggs
f9bdb78071 Added initialisation code to avoid file locking problems on windows
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2221 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-29 20:42:25 +00:00
Graham Triggs
a85b083e75 Added servlet-api dependency to resolve compilation problem
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2220 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-29 20:34:44 +00:00
Graham Triggs
4a194fa770 Fixed compilation error
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2219 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-29 20:19:28 +00:00
James Rutherford
6e35504357 (Chris yates)
- SF Patch #1759438 Multilingualism Language Switch - DSpace Header (updated to be compatible with new browse & submission systems).

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2218 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-28 13:17:04 +00:00
Claudia Juergen
fe2b7fd5d0 Removed reference to TxSpace
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2217 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-27 10:41:51 +00:00
Claudia Juergen
e7ce357377 Typo in xmlui.dri2xhtml.structural.contact-link
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2216 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-27 09:24:59 +00:00
James Rutherford
9ead74b923 Fixed a bug in RDFCrosswalk (it threw an NPE if an item didn't have any thumbnails).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2215 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-26 09:44:36 +00:00
Graham Triggs
961d03ea33 Fix itemRemoved method to correctly clear entries from the general item / withdrawn item tables.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2214 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-24 20:35:21 +00:00
Graham Triggs
c39aa5b780 Always make item removal update the browse tables (may have entries in 'admin' tables).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2213 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-24 20:17:11 +00:00
Stuart Lewis
e42cb88744 (Stuart Lewis) SF Patch #1799575 New EPersonConsumer event consumer
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2212 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-21 13:48:48 +00:00
Graham Triggs
aeab047b6e Repaired invalid character from i18n patch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2211 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-21 04:32:57 +00:00
Graham Triggs
74dbc81a42 Fixed include of authentication classes following package move
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2210 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-20 22:01:22 +00:00
Stuart Lewis
567a726316 git-svn-id: http://scm.dspace.org/svn/repo/trunk@2209 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2007-09-20 15:24:32 +00:00
Claudia Juergen
4a85015b9c (Brian Helm)
SF Patch 1794700  Bug fix for stat-monthly and stat-report-monthly

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2208 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-19 14:46:50 +00:00
Claudia Juergen
93e46412bb (Brian Helm)
SF Patch 1794700  Bug fix for stat-monthly and stat-report-monthly

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2207 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-19 14:45:54 +00:00
Claudia Juergen
70ddde04db Galician Translation of Messages.properties based on DSpace 1.4.2
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2206 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-19 12:02:55 +00:00
Graham Triggs
bcf7cc64a5 Fix a 'starts with' browsing bug
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2205 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-18 16:13:17 +00:00
Mark Diggory
bf4d523f18 These projects will become available in 1.6 and will not be used in 1.5.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2204 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-18 15:56:01 +00:00
Mark Diggory
84589147ff restore "file:" scheme on log4j prarameters.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2203 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-18 04:17:21 +00:00
Mark Diggory
a66fd04fb5 typo
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2202 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-18 03:35:40 +00:00
Mark Diggory
a01d03d89f disable logging so log4j can log to console properly.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2201 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-17 18:56:23 +00:00
Mark Diggory
08d4b0c908 Hardwire initialization and destruction of Browse tables into IntializeDatabase.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2200 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-17 18:44:55 +00:00
Mark Diggory
c9561398b0 .Use current Ant/Java approach for database initialization and registry creation
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2199 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-17 18:43:32 +00:00
Graham Triggs
a9225f6022 Added ability to specify a character set to be used when sending an email. Can be set as a default value in dspace.cfg, or (overridden) by an email template by specifying a charset: line.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2198 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-17 15:39:36 +00:00
Graham Triggs
6a90077cb1 Ensure that the item is in the archive and eligible for indexing before adding it to Lucene
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2197 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-17 15:38:10 +00:00
Graham Triggs
800a77bfe1 Added getPoliciesForGroup method, updated API to make use of Java 5 syntax
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2196 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-13 15:15:09 +00:00
Mark Diggory
fb1e307117 Correct issues with invalid mods content generation.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2195 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-10 20:59:26 +00:00
Mark Diggory
ea52e2c1e0 reinsert assembly:assembly call
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2194 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-10 03:02:36 +00:00
Mark Diggory
d720a48c32 correct postgres dependency
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2193 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-08 16:46:29 +00:00
Mark Diggory
912516b126 Reinsert dspace/pom.xml into dependency hierarchy and move database dependencies downstream.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2192 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-08 14:26:30 +00:00
Mark Diggory
553c915626 Reinsert dspace/pom.xml into dependency hierarchy and move database dependencies downstream.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2191 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-08 14:20:40 +00:00
Mark Diggory
f98c875d14 More reasonable defaults for testing.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2190 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-07 19:09:49 +00:00
Mark Diggory
0a051502aa Minor name change.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2189 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-07 19:04:04 +00:00
Mark Diggory
99e5a0b313 Moving database driver config and dspace config downstream to dspace/pom.xml
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2188 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-07 16:26:50 +00:00
Mark Diggory
2f5fd4bfd3 package hierarchy for sql files
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2187 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-07 16:02:15 +00:00
Mark Diggory
5bb74802a6 Correct artifact name.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2186 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-06 19:08:26 +00:00
Mark Diggory
89b4fe7ced Initial checkin of the dspace-storage-oracle addon to support all things Oracle
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2185 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-06 18:57:36 +00:00
Mark Diggory
28dc14ef02 Share project 'dspace-storage-oracle' into 'https://dspace.svn.sourceforge.net/svnroot/dspace'
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2184 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-06 18:56:37 +00:00
Mark Diggory
6705365605 Initial checkin of the dspace-postgres-storage addon to support all things Postgres.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2183 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-06 18:55:59 +00:00
Mark Diggory
51d19e12c6 Share project 'dspace-storage-postgres' into 'https://dspace.svn.sourceforge.net/svnroot/dspace'
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2182 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-06 18:54:20 +00:00
James Rutherford
fa2fcea6b5 Fixed a minor bug in the SubmissionConfigReader constructor
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2181 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-06 17:09:35 +00:00
Claudia Juergen
90796abf55 Updated German Translation to revision 2171 of Messages.properties
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2180 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-06 13:39:50 +00:00
Mark Diggory
a90289e324 Add in jdbc driver url
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2179 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-04 03:22:29 +00:00
Mark Diggory
5813c372e9 Correcting web.xml in xmlui to support initializing DSpace in the application.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2178 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-04 02:44:49 +00:00
Mark Diggory
729bfb9a86 Correcting web.xml in xmlui to support initializing DSpace in the application.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2177 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-09-04 02:44:24 +00:00
Mark Diggory
7fedefef06 correcting some minor mistakes in previous commit.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2176 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-31 05:17:56 +00:00
Mark Diggory
ceb1f5b020 Migrating database selection criteria to maven profiles.xml. Includes:
1.) profiles-example.xml that can be copied to profiles.xml as an example
2.) adjustements to poms to support usage of profiles to overide properties.
3.) svnignore to assure profiles.xml isn't managed in svn.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2175 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-31 05:14:11 +00:00
Graham Triggs
4f7b5c8424 Fixed metadata mapping so that it can export metadata items that contain a dollar sign!
Also added extra protection for items without bitstreams.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2174 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-30 11:10:07 +00:00
Graham Triggs
4b3599386c Added copyright comments.
(that's the problem with code folding them out of the way - you don't notice when they are missing

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2173 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-28 15:59:28 +00:00
Stuart Lewis
c5d0ca8979 SF Patch 1743188 Patch for Request #1145499 - Move Items - fixing small code formating mistake
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2172 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-28 15:54:08 +00:00
Stuart Lewis
a4c696de8c SF Patch 1743188 Patch for Request #1145499 - Move Items
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2171 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-28 15:05:50 +00:00
Stuart Lewis
0ab5d3bad4 SF Patch #1591871 Docs for google and html sitemaps
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2170 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-28 11:05:15 +00:00
Stuart Lewis
d7de5c47fa Updated configure help doc to reflect new package (org.dspace.authenticate)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2169 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-28 06:25:27 +00:00
Robert Tansley
311eb7ae28 (Robert Tansley / Barhatov Andrew)
- Authentication code moved to new org.dspace.authenticate package
- Added IP Authentication (SF patch #1566820).


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2168 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-27 22:40:09 +00:00
Mark Diggory
0b1664c114 remove usage of apache snapshot repository.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2167 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-26 03:20:07 +00:00
Mark Diggory
3dd9ca2fe7 1.) Add in filtering by dspace.config (inherited by all children of the parent pom).
2.) open repostory updates to be once daily.
3.) Add documentation about various configurations.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2166 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-25 20:46:52 +00:00
Mark Diggory
c7c6efd432 Organize Imports.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2165 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-25 04:32:57 +00:00
Mark Diggory
5178afaabe Cleanup for loops and collections.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2164 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-25 04:31:17 +00:00
Mark Diggory
62a5122f6e 1.) Adding null pointer guards against collections being null
2.) Improving logic of Browse and Search consumers because both API support the same method for both the update and add of items and internally manage decisions about the appropriateness of the item to be indexed.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2163 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-25 04:18:03 +00:00
Mark Diggory
b3cc5dffd2 Removing Async configuration which will be provided in addon.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2162 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-24 22:40:26 +00:00
Graham Triggs
aa8f711055 Individual indexItem / itemRemoved additionally call prune methods at the end to ensure that excess data is removed from the browse indeces.
The batch reindex process does *not* prune until the end of execution.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2161 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-24 21:51:04 +00:00
Graham Triggs
958a45faf9 Adds xmlui interface to withdrawn item browser. Fixes a minor issue in the BrowseEngine.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2160 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-24 16:09:08 +00:00
Claudia Juergen
ce93f942cb Welsh language pack
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2159 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-24 10:01:23 +00:00
Stuart Lewis
6736b6c2d7 SF Patch #1720105 Add SMTP port as configurable parameter
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2158 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-23 13:04:07 +00:00
Stuart Lewis
c2a5c1f564 SF Patch #1720105 Add SMTP port as configurable parameter
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2157 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-23 13:00:25 +00:00
Stuart Lewis
a87167901f Updated with two recent patches - #1737792 #1724330
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2156 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-23 12:33:27 +00:00
Stuart Lewis
6c2a7ff2c1 [ 1724330 ] Removes "null" being displayed in community-home.jsp
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2155 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-23 11:18:26 +00:00
Stuart Lewis
b6c6e4ecf8 [ 1724330 ] Removes "null" being displayed in community-home.jsp
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2154 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-23 11:17:57 +00:00
Stuart Lewis
1d045ca3d4 [ 1737792 ] Patch for bug 1552760 - Submit interface looks bad in Safari (+ removal of message for Netscape users in choose-file.jsp + removal of supporting text and images in the help file)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2153 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-23 10:55:13 +00:00
Stuart Lewis
172b421ef9 [ 1737792 ] Patch for bug 1552760 - Submit interface looks bad in Safari (+ removal of message for Netscape users in choose-file.jsp + removal of supporting text and images in the help file)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2152 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-23 10:54:42 +00:00
Mark Diggory
fb7d827091 Correct log4j typo.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2151 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-22 20:17:09 +00:00
Mark Diggory
7eb5995011 Cleanup/Clarify Commandline options for 1.5.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2150 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-22 04:05:18 +00:00
Tim Donohue
38ac17aaed Added functionality to allow the User Interface to determine which item-submission.xml to use for Configuration Submission.
- There are still two item-submission.xml files:  item-submission-JSPUI.xml and item-submission-XMLUI.xml
 - Now, the JSPUI will automatically load item-submission-JSPUI.xml, and the XMLUI will load item-submission-XMLUI.xml
 - Also updated doc/submission.html to inform users how this works
 - Updated some various comments, and updated error messages to report the item-submission.xml which caused the error

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2149 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-21 16:23:21 +00:00
Mark Diggory
fe1b824f6a adjust parent project so its source resolves in continuum.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2148 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-21 03:15:55 +00:00
Graham Triggs
83d64cf139 Improve functionality/layout of withdrawn items list
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2147 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-20 23:06:09 +00:00
Mark Diggory
44e4a632d6 Correcting mistake in earlier commit
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2146 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-20 18:43:33 +00:00
Mark Diggory
9bca17fd9d 1.) Improve options for configuring log4j so that individual log4j properties files can be selected in the configuration and/or easily overriden.
2.) Eliminate separate intialization of log4j in xmlui because ConfigurationManager is responsible for it.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2145 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-20 14:13:55 +00:00
Graham Triggs
4d3985d466 Fixed browse index for withdrawn items. Moved DB access from BrowseItem into a DAO. Added jsp interface for browsing withdrawn items.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2144 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-19 21:25:58 +00:00
Mark Diggory
009e066a5f If the projects parent is only gotten from the repo, need to include the repo location to resolve it.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2143 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-16 19:26:09 +00:00
Mark Diggory
e99104f554 use classpath resources instead of old method.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2142 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-16 00:16:20 +00:00
Mark Diggory
81a1b6fc68 Add example xmlui.xconf file to configuration.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2141 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-16 00:09:09 +00:00
Mark Diggory
fd282cbfa1 svn-ignore .classpath and .project
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2140 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-15 20:21:20 +00:00
Mark Diggory
8ff63e9eaf Adding generated LNI classes so that application can compile in Eclipse on first checkout.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2139 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-15 20:17:00 +00:00
Mark Diggory
5135f56945 Adding generated LNI classes so that application can compile in Eclipse on first checkout.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2138 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-15 20:15:54 +00:00
Mark Diggory
4c5da605d8 git-svn-id: http://scm.dspace.org/svn/repo/trunk@2137 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2007-08-15 20:12:18 +00:00
Mark Diggory
a17c147851 svn-ignore .classpath and .project
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2136 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-15 20:09:53 +00:00
Mark Diggory
95dafaf596 Use dspace-pom for parent, without relative reference.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2135 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-15 20:08:19 +00:00
Mark Diggory
5d4bb55fc6 Use dspace-pom for parent, without relative reference.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2134 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-15 20:04:47 +00:00
Mark Diggory
ec7deb7bc9 Correct assembly of wars.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2133 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-15 20:01:04 +00:00
Mark Diggory
a69e83693d Adding in support to build submodules of XMLUI and LNI when checked out at same level as other modules (I.E. to support Eclipse).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2132 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-15 15:39:31 +00:00
Mark Diggory
f83a3bb0f9 Correct line delimiters.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2130 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-10 16:16:29 +00:00
Mark Diggory
92c7b97989 correct compilation error
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2129 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-10 16:10:28 +00:00
Mark Diggory
44d011344f Correct line delimiters.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2128 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-10 16:02:30 +00:00
Mark Diggory
639d1e0627 Correct line delimiters.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2127 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-10 15:54:35 +00:00
Graham Triggs
326be22de0 Refactored browse patch. Improves performance / reduces db overhead by only have one table for all 'item' browses (with columns for different sorting options).
All sorting options are available on *all* 'item' browses - at the top level, changing a ie. from title to issue date, will make all corresponding UI hints follow.
Also, maintains a separate table of all withdrawn items. This is currently not exposed in the UI, but can be easily (it's a current feature request).

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2126 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-09 19:43:23 +00:00
Graham Triggs
b430ce75a7 Metadata Exporter (Implements request: #1444364).
Also, consolidates the schema namespace registry into the schema type xml, with single import step.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2125 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-08 11:34:59 +00:00
Graham Triggs
401df0ec30 SF Patch 1740579 - Patch for bug 1740454 (Concurrency)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2124 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-07 23:22:09 +00:00
Graham Triggs
ce443e40bc More stable metadata import (SFP 1670093). Also:
- fix database_schema.sql errors (Postgres).
 - fix browse index ant task

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2123 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-07 22:54:53 +00:00
Mark Diggory
8449d51050 The didl UUID functionality is only used by the DIDL OAI crosswalk, 1.6 will utilize default java UUID support, moving this into OAI to assure it is not used similarly in the core.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2122 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-06 17:39:43 +00:00
Mark Diggory
b881c7e13a Adding in validation against dtd for submission configuration files. Correcting inputforms.dtd to support schema and vocabulary.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2121 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-06 17:31:12 +00:00
Mark Diggory
ad59c4bcca Move support for log4j console and dtds out of etc. These are better off being next to the other similar files and/or made available to xml editors.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2120 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-06 17:16:59 +00:00
Mark Diggory
5b69ba619c Move support for log4j console and dtds out of etc. These are better off being next to the other similar files and/or made available to xml editors.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2119 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-06 17:16:19 +00:00
Mark Diggory
aac785370a Move support for log4j console and dtds out of etc. These are better off being next to the other similar files and/or made available to xml editors.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2118 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-06 17:16:03 +00:00
Graham Triggs
f8667ff13f Fix missing ICU dependency for browse code
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2117 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-06 14:50:42 +00:00
Mark Diggory
97d189b828 This is a merge back to trunk of Graham Triggs work to port Configurable Browse to Manakin from the sandbox.
grahamtriggs | 2007-08-01 11:55:51 -0400
  Added IBM ICU dependency
  First attempt at integrating the configurable browse patch
  First attempt at integrating the UI changes for Configurable Browse
  Configurable browse patch - web.xml
  Java code modifications from Configurable Browse patch
  JSP changes from the Configurable Browse patch
  Removed browse changes that should have been committed to the browse branch
  Documentation, config and scripts for configurable browse
  Re-adding Configurable Browse changes following merge
  Messages for the configurable browse
  Fixed use of DCDate for i18n patch
  First attempt to make xmlui compatible with the new BrowseIndex, although not fully use the configuration
  First attempt to make xmlui compatible with new Browse API. Browse basically works, but it's more costly than needs be (unnecessary Item.find()), and only works if you use the default Browse configuration.  
  Fixed problem with second level browse (items for author / subject)
  Updates xmlui components to handle BrowseItem DSOs, ArtifactBrowser now passes these directly. r407@libaxis1:  grahamtriggs | 2007-08-06 09:14:05 -0400
  Minor fixes to make class easier to use
  Fix to only display sort by options on a second level browse
  Updates the ArtifactBrowser, to replace all browse functionality with entirely customisable browse code
  Update the browse index creation on fresh_install
  Fixed problem with indexing non-archived items
  Added caching support (key generation / validity)
  Moved internal class to bottom of file
  Browse code changes
 


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2116 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-06 14:39:38 +00:00
Graham Triggs
abd590081f Removed processing / postProcessing call from doPreProcessing (caused two Items to be created per submission)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2115 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-06 13:53:21 +00:00
James Rutherford
8d21494e13 Fixed line endings
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2114 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-05 10:38:39 +00:00
Graham Triggs
bbde6d286b Added missing page_reached column for Configurable Submission
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2113 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-03 12:19:33 +00:00
Mark Diggory
162ec97882 Use stable version of assembly plugin, some users having problems resolving snapshots.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2110 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-31 16:35:20 +00:00
Mark Diggory
1608c50628 (Flavio Botelho)
- S.F. Patch 1764069 Replaces "String" with "Integer" in PreparedStatement 
  Parameters where appropiate. (Added deleteByValue as another case where change is neccessary).

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2109 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-31 03:14:18 +00:00
Mark Diggory
dab5e6ecb9 Organize Imports to remove unneeded imports and expand *'s.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2108 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-30 17:26:50 +00:00
Graham Triggs
d889cec26c Fixed profile activation, split for all modules, updated comments
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2107 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-28 18:42:43 +00:00
Graham Triggs
8070702d22 Remove leftover property activations that sometimes cause problems
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2106 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-27 20:56:28 +00:00
Graham Triggs
2d7156ef18 Changes to profile activation, and initial effort to move legacy ant tasks into Maven
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2105 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-27 16:11:19 +00:00
Mark Diggory
234445252c Correction in formating.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2104 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-27 15:54:35 +00:00
Graham Triggs
da82e15a43 Fixes to ConfigurationManager
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2103 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-27 15:54:15 +00:00
James Rutherford
f6eef44817 (James Rutherford)
- Removed unnecessary and unused edu.mit.dspace.MITSpecialGroup


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2102 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-27 14:50:00 +00:00
Graham Triggs
adbdf9cf54 Removing accidental commit of dspace.cfg.initial
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2101 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-27 12:03:42 +00:00
Graham Triggs
288b8648f4 Added Graham Triggs to developer list
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2100 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-27 10:50:47 +00:00
Mark Diggory
335f9511f8 changes.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2098 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-25 17:20:04 +00:00
Mark Diggory
2834ce7642 Guard against output invalid unqualified Dublin Core.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2095 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-25 16:54:48 +00:00
Graham Triggs
98fc9b8786 S.F. Patch 1679972 OAIDCCrosswalk NPE and invalid character fix
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2094 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-25 16:09:22 +00:00
Graham Triggs
aadd02c274 S.F. Patch 1679972 OAIDCCrosswalk NPE and invalid character fix
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2093 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-25 16:03:57 +00:00
Graham Triggs
17913eb318 git-svn-id: http://scm.dspace.org/svn/repo/trunk@2092 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2007-07-25 13:49:01 +00:00
Graham Triggs
1ae8d57367 git-svn-id: http://scm.dspace.org/svn/repo/trunk@2091 9c30dcfa-912a-0410-8fc2-9e0234be79fd 2007-07-25 13:48:55 +00:00
Graham Triggs
806ad1b131 SF Patch 1749196 Oracle compatibility for Bitstream Checker
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2089 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-24 15:11:41 +00:00
Graham Triggs
c5b1b46924 SF Patch 1749196 Oracle compatibility for Bitstream Checker
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2088 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-24 15:11:22 +00:00
Tim Donohue
bba752c819 I realized I forgot to update the CHANGES document last week when I added the Configurable Submission to trunk :)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2087 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-24 14:16:54 +00:00
Scott Phillips
a510d007a8 (Scott Phillips) Removing un-used package/directory
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2086 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-23 14:42:51 +00:00
Scott Phillips
8b6c0fc219 (Scott Phillips) Removed un-used DIMDisseminationCrosswalk. This was used in previous version of Manakin, and it is still usefull because it is a SAX-based crosswalk which that scales nicely. Perhaps later it could be refactored back into standard crosswalks mechanism for DSpace if DSpace ever sports SAX based crosswalks.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2085 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-23 14:41:30 +00:00
Scott Phillips
b56678be8c (Scott Phillips) Removed un-used DIMDisseminationCrosswalk. This was used in previous version of Manakin, and it is still usefull because it is a SAX-based crosswalk which that scales nicely. Perhaps later it could be refactored back into standard crosswalks mechanism for DSpace if DSpace ever sports SAX based crosswalks.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2084 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-23 14:40:00 +00:00
Scott Phillips
60fa6de7d5 (Jay Paz) Fixed incorrect import's for EPerson related classes.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2083 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-23 13:59:57 +00:00
Tim Donohue
574da36a0b Updated XML-UI with Configurable Submission code:
- Updated the existing Submission Aspect so that it supports the Configurable Submission
- Updated all of the existing Submission Step Transformers to work with Configurable Submission

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2082 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-20 20:54:39 +00:00
Tim Donohue
5630e097e6 Added JSP-UI changes for the Configurable Submission:
- Updated all submit/ JSPs
- Removed old SubmitServlet
- Added a new SubmissionController to manage submission process
- Added JSP specific processing classes to org.dspace.app.webui.submit.step.*

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2081 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-20 20:52:58 +00:00
Tim Donohue
58eba9f179 Added the Configurable Submission configuration file and docs:
- New configuration files: item-submission.xml (JSP-UI) and item-submission-XMLUI.xml (XML-UI)
- Updated the database schema
- Updated documentation for the Configurable Submission (esp. submission.html)


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2080 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-20 20:50:41 +00:00
Tim Donohue
242d0ff146 Added the base Configurable Submission code to dspace-api. This includes updates to the following:
- Added a new "list" type to the input-forms.xml, which will allow you to display metadata options in radio buttons or checboxes
- Added the base Configurable Submission step processing classes (org.dspace.submit.step.*) which perform all processing for both the JSP-UI and XML-UI
- Added the classes which read the configuration file (item-submission.xml)


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2079 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-20 20:49:01 +00:00
Mark Diggory
38382014b6 Remove Older HistoryManager which is no longer called in code. (Part of Event System Changes).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2078 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-20 20:02:53 +00:00
Mark Diggory
1bbebf4026 [ 1633596 ] Event System for DSpace 1.5 CHANGES
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2077 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-20 16:12:17 +00:00
Mark Diggory
cc2313bd3c Merging in DSpace Event Mechanism Branch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2076 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-19 19:40:48 +00:00
Mark Diggory
9871cadf7e Merging in DSpace Event Mechanism Branch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2075 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-19 19:40:27 +00:00
Mark Diggory
b835f46d7d Merging in DSpace Event Mechanism Branch
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2074 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-19 19:40:11 +00:00
Mark Diggory
e8b21b6760 Chages addapted from: S.F. Patch 1751638 Set http disposition header to force download of large bitstreams
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2073 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-19 16:45:10 +00:00
Mark Diggory
710781b796 Comments and Formating corrections.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2072 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-19 16:08:14 +00:00
Mark Diggory
d33dae1210 activate all profiles by default, if you want to exclude a feature, select the profiles you wish to have active with 'mvn -Poai,jspui,your_profile_here package'
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2071 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-17 23:21:47 +00:00
Mark Diggory
c289644ce4 Add in our new DSpace I18N report plugin to generate an I18N report on the Messages.properties in the site documentation.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2069 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-13 21:18:54 +00:00
Mark Diggory
76f2e1df07 DSpace Logo and Add XMLUI and LNI into Navigation.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2068 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-13 16:06:32 +00:00
Mark Diggory
3962d7e77e This change is to invert our dependency on language packs so we can access dspace-api and Messages.properties during maven compilation and run custom reports to evalauate Messages.properties entries against the translations.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2067 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-12 22:26:10 +00:00
Mark Diggory
36fae591f1 Restoring ASCII properties files from svn history.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2066 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-12 19:59:07 +00:00
Mark Diggory
5a4d85ce36 example default vhost configuration file for Tomcat 5.5 or greater.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2065 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 19:00:57 +00:00
Mark Diggory
711e5ebe40 svn:ignore .classpath and .project files
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2064 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 18:59:19 +00:00
Mark Diggory
91c5d7d6f2 restore dependencies that are required to package a wing distribution as it is not dependent on dspace-api (but this still uses dependencyManagement upstream in dspace-pom to determine versions).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2063 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 18:57:35 +00:00
Mark Diggory
b1c4e6421c correct for presence of lang, which is absent as a dependency due to the fact that this addon has no dependency on dspace-api
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2062 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 18:50:58 +00:00
Mark Diggory
ad19d3e86c Add dspace.dir into web.xml for later filtering.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2061 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 07:16:18 +00:00
Mark Diggory
f7513fb8a6 1.) Remove dspace.configuration filtering from Maven build process.
2.) refine versions of dependencies shared across project via dependencyManagement in dspace-pom project.
3.) refine versioning across projects that share dspace-pom. version is inherited from parent and dependencies to dspace-xx projects are bound to current version defined in dspace-pom.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2060 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 07:15:23 +00:00
Mark Diggory
f0bbed9424 Remove configuration from assembly stage. Provide configuration filtering of web.xml's and dspace.dir/config in a ant build.xml for the time being.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2059 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 07:02:26 +00:00
Mark Diggory
94b3f8eb59 provide configuration filtering of web.xml's and dspace.dir/config in a ant build.xml for the time being.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2058 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 06:59:15 +00:00
Scott Phillips
969ae84461 (Alexey Maslov)
- Updated the metadata handlers
  * MODS and DC now can handle the virtual object store changes
  * XSL templates across all handlers have been broken down into smaller components
  * Created a generic handler for all METS sections that are metadata-agnostic (like the fileSec secion)

- Refactored the themes according to recommended best practices for theme development  

- Fixed a bug in the item and container adapters to handle non-DIM metadata types

- Added the XSI namespace declaration to the abstract adapter

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2057 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 01:53:54 +00:00
Scott Phillips
5b0a13bd73 (Alexey Maslov)
- Updated the metadata handlers
  * MODS and DC now can handle the virtual object store changes
  * XSL templates across all handlers have been broken down into smaller components
  * Created a generic handler for all METS sections that are metadata-agnostic (like the fileSec secion)

- Refactored the themes according to recommended best practices for theme development  

- Fixed a bug in the item and container adapters to handle non-DIM metadata types

- Added the XSI namespace declaration to the abstract adapter

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2056 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 01:52:46 +00:00
Mark Diggory
c9d6ffe546 1.) rename project slightly
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2055 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 00:14:22 +00:00
Mark Diggory
6ea6175b13 Adjust site deployment and scm locations.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2054 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 00:13:04 +00:00
Mark Diggory
33577af1b3 1.) rename project slightly
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2053 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 00:07:42 +00:00
Mark Diggory
d105e74102 1.) rename project slightly
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2052 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 00:05:41 +00:00
Mark Diggory
4454dd570c 1.) correct parent inheritance
2.) rename project slightly

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2051 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 00:03:51 +00:00
Mark Diggory
4b2d88b874 1.) remove odd rename of war file (doesn't commute to name of war in packager).
2.) rename project slightly

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2050 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-11 00:01:06 +00:00
Scott Phillips
4eb0e5615d (Scott Phillips) Set Maven's target directories to be ignored for each of the Manakin projects.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2049 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-09 21:19:58 +00:00
Robert Tansley
5d3ea7fae4 Commented out Disallow: /browse-title; if an installation does not use sitemaps, they would not get indexed at all.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2048 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-09 17:05:24 +00:00
Richard Jones
c3bda443e3 update web.xml to use oai specific configuration loader
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2047 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-09 16:38:07 +00:00
Richard Jones
f9a93bc655 oai specific configuration loader; just a wrapper for the usual config loader for this web app
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2046 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-09 16:37:36 +00:00
Scott Phillips
fde5c09d41 (Scott Phillips) Adding Manakin, version 1.1, to DSpace. This new cocoon-based interface utilizes XML and XSLT to provide interface themability for specific community and collections while also providing interface level modularity thruogh the use of Manakin aspects.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2045 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-07 00:02:39 +00:00
Scott Phillips
b4399e950a (Scott phillips) Moved the DCInput, DCInputSet, and DCInputReader utility classes out of the JSPUI and into a generalized utility package for any dspace application. This is needed because Manakin also uses these classes.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2044 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-06 23:59:33 +00:00
Mark Diggory
0c7bdff878 Guarding Community and Collection names from causing NPEs in DSIndexer when null.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2042 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-06 02:03:07 +00:00
Mark Diggory
c2590feb4a Correct comments.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2041 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-02 20:43:06 +00:00
Mark Diggory
2f8b96b94d Templates are transformed at compile time in Maven.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2040 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-02 20:41:19 +00:00
Mark Diggory
09a9c7f99a Bringing LNI service into the trunk
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2039 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-28 02:46:33 +00:00
Mark Diggory
de4a138b38 Correct paths to scm and project website
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2038 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 17:09:27 +00:00
Mark Diggory
14f42f898c further tuning assembly to support transitive evaluation of dependencies and correct issue with war extension and deployment.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2037 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 17:07:37 +00:00
Mark Diggory
95c8f11128 Correct paths to scm and project website
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2036 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 17:05:46 +00:00
Mark Diggory
10f515f173 Correct paths to scm and project website
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2035 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 17:04:16 +00:00
Mark Diggory
0f546fb2f7 Correct paths to scm and project website
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2034 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 17:02:18 +00:00
Mark Diggory
2ef9ebcacf Correct paths to scm and project website
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2033 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 17:01:27 +00:00
Mark Diggory
4b923302a5 Maven Site Generation Improvements.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2032 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 16:39:04 +00:00
Mark Diggory
096c26052d The previous commit was a mistake, this rolls back that change. Collections and communities must be removed from their parent by classes external to the content package.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2031 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 00:26:58 +00:00
Mark Diggory
017441f214 Setting delete methods to be public so they can be called by code outside the content package.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2030 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-27 00:08:16 +00:00
Mark Diggory
f6a4425e9d Build.xml is now under src/main/config and deployed into the generated distribution by the maven assembly.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2029 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-26 21:06:11 +00:00
Mark Diggory
785d21ddc1 Placing build.xml here where it will be deployed into the generated distribution.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2028 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-26 02:11:38 +00:00
Mark Diggory
90a490b836 new location distribution build.xml
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2027 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-26 02:10:14 +00:00
Mark Diggory
7d89510d37 Retract previous commit of Eclipse project files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2026 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-21 19:33:17 +00:00
Mark Diggory
695f1a1470 Retract previous commit of Eclipse project files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2025 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-21 19:32:23 +00:00
Mark Diggory
67456258f3 Retract previous commit of Eclipse project files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2024 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-21 19:31:09 +00:00
Mark Diggory
0f0d154df4 Retract previous commit of Eclipse project files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2023 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-21 19:29:16 +00:00
Mark Diggory
978ecf206d Retract previous commit of Eclipse project files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2022 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-21 19:28:15 +00:00
Mark Diggory
abf16cc00b Retract previous commit of Eclipse project files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2021 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-21 19:26:13 +00:00
Mark Diggory
3dba86e80f Configuration filtering is now completed in Maven "Assembly" packaging.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2019 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-18 17:26:04 +00:00
Mark Diggory
57670aadd0 Assemble in appropriate dspace config designated in configuration.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2018 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-18 17:19:58 +00:00
Mark Diggory
57312a97ce Adding project files to ease developer setup in Eclipse.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2017 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-18 17:08:17 +00:00
Mark Diggory
11c67cdfa1 Remove unused imports.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2016 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-18 16:57:48 +00:00
Claudia Juergen
78f9f47048 (Jordi Prats)
- SF patch 1693412
Corrected some faults in the Spanish Messages 

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2015 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-18 07:36:15 +00:00
Mark Diggory
df2442adba UIUtil package name error
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2014 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-14 19:18:21 +00:00
Mark Diggory
82ae5ccdfd RDF Crosswalk supplied by patch: [ 1638892 ] OAI Crosswalk for DWell UI. (this does not include the dwell ui)
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2013 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-14 19:00:31 +00:00
James Rutherford
4c4b57d172 (James Rutherford)
- SF Patch #1620700 Add Community and Sub-Community to OAI Sets


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2012 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-13 08:23:34 +00:00
James Rutherford
d415f88751 (James Rutherford)
- SF Patch #1638569 for SF Bug #1638565 Database Upgrade 12 to 13 missing content on new colums


git-svn-id: http://scm.dspace.org/svn/repo/trunk@2011 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-13 07:54:39 +00:00
James Rutherford
e6921c0343 (James Rutherford)
- Fixed SF bug #1614546 get rid of unused mets_bitstream_id column

Fresh installs will no longer create this unused column, and the 1.4 -> 1.5
updater script will remove the column if it exists.



git-svn-id: http://scm.dspace.org/svn/repo/trunk@2009 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-12 18:13:51 +00:00
Mark Diggory
740e9e5319 remove lang pack tasks from script
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2008 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-08 16:16:59 +00:00
Mark Diggory
440a1e2ed9 really need to maintain relative location of dspace-pom parent.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2007 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-08 12:38:10 +00:00
Mark Diggory
a3af7aee9b add maven.dspace.org as a plugin repo
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2006 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-08 12:34:26 +00:00
Mark Diggory
e72970423a really need to maintain relative location of dspace-pom parent.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2005 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-08 12:26:19 +00:00
Mark Diggory
fd58d0133d Share project 'dspace-pom' into 'https://dspace.svn.sourceforge.net/svnroot/dspace'
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2004 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-08 12:24:43 +00:00
Mark Diggory
2672caf7d8 Share project 'dspace-pom' into 'https://dspace.svn.sourceforge.net/svnroot/dspace'
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2003 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-08 12:24:18 +00:00
Mark Diggory
42ac93ec02 Adjust POM to support template filtering of properties files and separate dspace-pom project (currently resolved via maven repo) for dspace maven build defaults.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2002 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-08 04:09:17 +00:00
Mark Diggory
b20259e13d Comments on changes to language-packs
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2001 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-08 04:06:31 +00:00
Mark Diggory
145ce2d48f Returning to usage of dspace/pom.xml as parent for DSpace Maven Projects / Addons.
Filter dspace.dir in web.xml on construction of the war.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@2000 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-07 20:33:57 +00:00
Mark Diggory
4dd0fcdeb4 Filter dspace.dir in web.xml on construction of the war.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1999 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-07 20:33:03 +00:00
Mark Diggory
de536de99d Returning to usage of dspace/pom.xml as parent for DSpace Maven Projects / Addons.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1998 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-07 20:32:10 +00:00
Mark Diggory
08b8d4e4ef Returning to usage of dspace/pom.xml as parent for DSpace Maven Projects / Addons
Language Packs can be compiled into your dspace distro via the addition of '-P lang' to the active profiles, they are inactive by default. This profile resides in the dspace-api pom.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1997 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-07 20:31:27 +00:00
Mark Diggory
c7709e7451 Returning to usage of dspace/pom.xml as parent for DSpace Maven Projects / Addons
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1996 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-07 20:30:09 +00:00
Mark Diggory
698d543bce Language Packs are now a DSpace Addon. They can be compiled into your dspace distro via the addition of '-P lang' to the active profiles, they are inactive by default. IF a UTF-8 properties file exists, then the non-UTF-* file has been removed, the Maven build process supports native2ascii conversion on packaging of the Jar.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1995 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-07 20:17:46 +00:00
James Rutherford
c961fb0f6a Fixed SF bug #1727034 Method MetadataField.unique() is incorrect for null values
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1994 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-07 11:43:11 +00:00
Claudia Juergen
3d16b52fe7 Updated to Messages.properties revision 1990
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1993 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-05 13:33:32 +00:00
Claudia Juergen
60a0dac75e (Elin Stangeland)
Updated Norwegian Messages files for DSpace 1.4.2

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1992 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-05 13:09:26 +00:00
Mark Diggory
70d5880e71 Lets loose a directory level here.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1991 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-01 20:49:00 +00:00
Mark Diggory
da04d66c4f Moving Messages.properties into dspace-api/src/main/resources where it will automatically be compiled into dspace-api.jar for deployment into WARs and CLI application.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1990 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-01 16:40:29 +00:00
Mark Diggory
e04d5ac4c2 Add resource to support moving Messages.properties.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1989 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-06-01 16:31:32 +00:00
Mark Diggory
830260647c failonerror="no"
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1988 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-31 16:06:45 +00:00
Mark Diggory
f69689a454 Reintroduce functionality available via "install_code" target
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1987 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-31 15:57:56 +00:00
James Rutherford
2f07826c94 Fixed a minor typo.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1986 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-31 10:33:27 +00:00
Mark Diggory
1735ec79a4 Adjusted paths to produce new source distribution properly.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1985 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 20:48:08 +00:00
Mark Diggory
1e39acb5b2 "make-release-package" will be to produce a source distribution of specific Addons in the trunk. We will move it up to trunk and change paths to produce the releases.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1984 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 20:32:43 +00:00
Mark Diggory
fbcb26ced5 Change to be "bin" instead of postgres-assembly (which its not).
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1983 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 20:28:54 +00:00
Mark Diggory
69d0431d78 Use Maven Repositories to resolve Dependencies. If we ever want to have an Ant analog to Maven in the future, it is more than likely that it will use similar dependency resolution.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1982 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 19:57:00 +00:00
Mark Diggory
1124e684bb Use Maven Repositories to resolve Dependencies. If we ever want to have an Ant analog to Maven in the future, it is more than likely that it will use similar dependency resolution.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1981 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 19:56:37 +00:00
Mark Diggory
1edfd2b0fa Use Maven Repositories to resolve Dependencies. If we ever want to have an Ant analog to Maven in the future, it is more than likely that it will use similar dependency resolution.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1980 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 19:55:43 +00:00
Mark Diggory
53d932e003 Add in assembly to package phase so that "assembly:assembly" can be left off the command-line
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1979 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 19:37:39 +00:00
Mark Diggory
a8b10a9ce0 Shorten jar and war names to be more conventional.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1978 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 19:31:13 +00:00
Mark Diggory
13b2188e47 Changes to date.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1977 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 18:22:39 +00:00
Mark Diggory
bb92d22f08 Removing build stages from build.xml until further notice
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1976 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 18:18:53 +00:00
James Rutherford
aef4abaf94 fixed line endings
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1975 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-30 09:20:24 +00:00
Mark Diggory
adbc332aad Include release assembly that builds archives (tar.gz, tar.bz2, zip), correct issue with selecting postgres or oracle profile to build.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1974 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-29 17:45:11 +00:00
Mark Diggory
87d828a6f6 Include release assembly that builds archives (tar.gz, tar.bz2, zip), correct issue with selecting postgres or oracle profile to build.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1973 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-29 17:43:30 +00:00
Mark Diggory
46dbdccf99 dspace-maven plugin shouldn't have been included in build process yet.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1972 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-29 17:11:11 +00:00
Mark Diggory
ee973b5a5f Remove parent inheritance
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1971 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-29 15:02:07 +00:00
Mark Diggory
da8b996f80 Remove parent inheritance
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1970 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-29 15:01:22 +00:00
Mark Diggory
776e9c74f6 Remove parent inheritance
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1969 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-29 15:00:30 +00:00
Mark Diggory
e6e52487d1 Improved assembly that is not "profile" dependent.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1968 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-29 14:57:09 +00:00
Mark Diggory
3b8894c14d Add Maven Project descriptors and svn-ignores
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1963 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 18:51:02 +00:00
Mark Diggory
22e15ada14 Refactor AccountManager to remove dependency on webapp.util.UIUtil.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1962 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 18:36:35 +00:00
Mark Diggory
9e96b0dfdb Move DSpace Kernel Dependencies to dspace-api AddOn
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1961 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 16:42:11 +00:00
Mark Diggory
b82e5a019b Move Webapp dependencies out to Webapp Addons
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1960 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 16:24:54 +00:00
Mark Diggory
346a90f58f Move web.xml configurations to webapps.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1959 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 16:24:24 +00:00
Mark Diggory
808c79776c Move JSPUI Webapp resources to webapp.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1958 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 16:23:52 +00:00
Mark Diggory
ba4e7f6b9e Move DSpace kernel codebase to dspace-api
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1957 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 16:23:06 +00:00
Mark Diggory
faa66ba48c Move Webapp sources out to addons
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1956 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 16:22:17 +00:00
Mark Diggory
54ef740be8 New modular AddOn directory structure.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1955 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 16:21:15 +00:00
Mark Diggory
b2eedf6ebf First Stage of Reorganization: Refactoring of UIUtil to support separation of webui from kernel. See:
http://wiki.dspace.org/index.php/SimpleAddonMechanism/CodeReorganization#Preparation

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1954 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-23 15:57:40 +00:00
Claudia Juergen
b1a8866440 - Corrected month name display for Chinese and Japanese month
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1951 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-22 08:45:29 +00:00
Claudia Juergen
3efb8a396d (Claudia Juergen)
SF Patch #1722557 for SF Bug #1549290 Suggest Features uses hard coded strings

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1950 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-21 11:18:52 +00:00
Claudia Juergen
027b66733d (Claudia Juergen)
SF Patch #1722557 for SF Bug #1549290 Suggest Features uses hard coded strings

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1949 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-21 11:16:57 +00:00
Claudia Juergen
24422f5a05 SF Patch 1450491 i18n configurable multilingualism support
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1947 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-18 13:50:29 +00:00
Mark Diggory
3235a26b57 Organize imports to eliminate unused dependencies.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1946 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-17 03:35:52 +00:00
James Rutherford
6dbaf9293c Fixed a couple of minor bugs in TableRowIterator.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1941 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-15 09:23:25 +00:00
Mark Diggory
fc1367e9ec Merging the following 1.4.x branch changes back to trunk.
r2514@libaxis1 (orig r1874):  cjuergen | 2007-04-25 07:58:05 -0400
 Error in jsp.tools.confirm-delete-community.confirm
 Referred to collection instead of community.
 r2561@libaxis1 (orig r1878):  mdiggory | 2007-04-30 23:23:52 -0400
 1.) Correct issues with InstallItem by double-checking handle if its null in Item.getHandle(); 
 2.) Change createIndex to index preemptively, same as updateIndex.
 r2562@libaxis1 (orig r1879):  stuartlewis | 2007-05-03 10:06:08 -0400
 SF Patch #1711982 Updates to short_description (null) field when editing/creat


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1880 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-03 19:15:14 +00:00
Claudia Juergen
b1b099cee8 Error in jsp.tools.confirm-delete-community.confirm
Referred to collection instead of community.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1877 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-25 12:23:56 +00:00
Claudia Juergen
161053571d Error in jsp.tools.confirm-delete-community.confirm
Referred to collection instead of community.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1876 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-25 12:04:22 +00:00
Claudia Juergen
fc8ec5d367 Error in jsp.tools.confirm-delete-community.confirm
Referred to collection instead of community.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1875 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-25 12:00:44 +00:00
Claudia Juergen
9ff7741375 Error in jsp.tools.confirm-delete-community.confirm
Referred to collection instead of community.

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1873 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-25 11:54:33 +00:00
James Rutherford
3071413e10 added some deprecation warnings
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1872 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-25 09:23:46 +00:00
Claudia Juergen
db8948ee19 Updated Bouncy Castle Package to jdk15 bouncy castle version 1.36
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1871 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-24 07:32:15 +00:00
Mark Diggory
ca7bd0428e Upgrading BouncyCastle jars to jdk-1.5 versions.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1869 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-23 19:13:10 +00:00
Mark Diggory
8d36d4dbd5 Restoring the work of the following patches (note this includes the file restorations on the previous commit 1867):
- SF Patch #1659868 Improved database level debugging
- SF Patch #1659901 Import community and collection structure
- SF Patch #1659837 ItemIterator now deals with item ids also
- SF Patch #1659796 Create administrator wtih command line options
- SF Patch #1659841 Add option to clear context object cache

(Stuart Lewis)
- SF Patch #1641678 [dspace]/bin scripts for import and export
- SF Patch #1642336 Restrict domains of self-registered users
- SF Patch #1587225 Google and html sitemap generator

(Dorothea Salo)
- SF Patch #1557948 Link subjects and authors on item pages

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1868 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-23 18:11:16 +00:00
Mark Diggory
89566dec3d Restore files deleted (on 1.4.x branch) in merge, this is also restoring history on these files.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1867 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-23 17:11:06 +00:00
Mark Diggory
f548bd0d58 Merging revisions upto 1.4.2-beta back to trunk. Below is a list of the revisions included in this merge.
r2271@libaxis1 (orig r1780):  jrutherford | 2007-04-10 09:41:17 -0400
 Branching for 1.4.x development.
 
 r2272@libaxis1 (orig r1781):  jrutherford | 2007-04-10 12:31:50 -0400
 Removed the following patches:
 =========
 (Andrea Bollini)
 - SF Patch #1687815 Search function for select eperson JSPUI
 
 (Richard Jones)
 - SF Patch #1659868 Improved database level debugging
 - SF Patch #1659901 Import community and collection structure
 - SF Patch #1659837 ItemIterator now deals with item ids also
 - SF Patch #1659796 Create administrator wtih command line options
 - SF Patch #1659841 Add option to clear context object cache
 
 (Stuart Lewis)
 - SF Patch #1641678 [dspace]/bin scripts for import and export
 - SF Patch #1642336 Restrict domains of self-registered users
 - SF Patch #1587225 Google and html sitemap generator
 
 (Monika Mevenkamp)
 - SF Patch #1654466 dsprop convenience script
 
 (Dorothea Salo)
 - SF Patch #1557948 Link subjects and authors on item pages
 
 r2276@libaxis1 (orig r1785):  cjuergen | 2007-04-11 08:09:26 -0400
 (James Rutherford)
 - SF Patch #1695702 Update SubmitServlet to use default.language instead of "en" for SF bug 1636792 default.language not applied to new submissions
 r2277@libaxis1 (orig r1786):  cjuergen | 2007-04-11 08:13:24 -0400
 updated year in copyright statement
 r2280@libaxis1 (orig r1789):  mdiggory | 2007-04-11 15:39:28 -0400
 (Mark Diggory/Graham Triggs)
 - SF Patch 1655583 Fixes issues with FilterMedia, the UI and Index locking, includes 
   a lucene upgrade to support better management of index locking.
 r2281@libaxis1 (orig r1790):  jrutherford | 2007-04-12 04:40:31 -0400
 Fixed a bug in DSIndexer where there was a Long/long mixup.
 
 r2284@libaxis1 (orig r1793):  jrutherford | 2007-04-12 06:36:23 -0400
 updated to reflect the removal of lucene-sandbox.jar and the update of
 lucene.jar
 
 r2285@libaxis1 (orig r1794):  mdiggory | 2007-04-12 12:57:15 -0400
 Missing file for  [ 1655583 ] Avoid index lock with filter-media
 r2286@libaxis1 (orig r1795):  mdiggory | 2007-04-12 16:44:29 -0400
 rolling back DSpaceServletContextListener to previous revision.
 r2287@libaxis1 (orig r1796):  jrutherford | 2007-04-14 08:02:09 -0400
 (James Rutherford)
 - SF Patch #1699903 for SF Bug #1695692 make-release-package still uses CVS commands
 
 
 r2288@libaxis1 (orig r1797):  mdiggory | 2007-04-14 23:04:59 -0400
  [ 1655583 ] Avoid index lock with filter-media: More internal solution for orphaned file handles in Microsoft Windows. Close any open IndexSearcher on finalization, works in Servlet Engine or CLI.  Removed IndexReader from DSIndexer, get it from DSQuery so it can be managed there likewise.
 r2289@libaxis1 (orig r1798):  mdiggory | 2007-04-14 23:15:34 -0400
  [ 1655583 ] Correct small logic error introduced in last commit.
 r2290@libaxis1 (orig r1799):  jrutherford | 2007-04-17 08:15:58 -0400
 (Flavio Botelho)
 - SF Patch #1601946 for SF Bug #1601875 - Makes javascript idependent to form position
 
 r2455@libaxis1 (orig r1856):  jrutherford | 2007-04-20 06:40:41 -0400
 (Claudia Juergen)
 - SF Patch #1702177 For SF bug #1638605 bin/cleanup fails on deleted primary bitstream
 
 
 r2456@libaxis1 (orig r1857):  stuartlewis | 2007-04-20 08:33:26 -0400
 SF Patch #1445573 Stats not working in Oracle
 r2457@libaxis1 (orig r1858):  stuartlewis | 2007-04-20 08:36:01 -0400
 SF Patch #1445573 Stats not working in Oracle
 r2458@libaxis1 (orig r1859):  cjuergen | 2007-04-20 09:02:19 -0400
 Bouncy Castle libs required by the current pdfbox.jar for text extraction of encrypted pdf's
 r2459@libaxis1 (orig r1860):  cjuergen | 2007-04-20 09:02:49 -0400
 Bouncy Castle libs required by the current pdfbox.jar for text extraction of encrypted pdf's
 r2460@libaxis1 (orig r1861):  cjuergen | 2007-04-20 09:03:14 -0400
 License for Bouncy Castle libs required by the current pdfbox.jar for text extraction of encrypted pdf's
 r2461@libaxis1 (orig r1862):  cjuergen | 2007-04-20 09:03:29 -0400
 License for Bouncy Castle libs required by the current pdfbox.jar for text extraction of encrypted pdf's


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1866 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-23 14:20:41 +00:00
James Rutherford
d714758e92 Switched some method calls to use varargs properly (should eliminate all
compile-time warnings about varargs).


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1865 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-23 10:28:41 +00:00
James Rutherford
81bd334582 Switched to using the varargs versions of various methods.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1864 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-23 10:20:16 +00:00
James Rutherford
de0fcf4781 Added a 'help' target to the build file. Now it is possible to run 'ant help'
to get a list of all available targets with short descriptions.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1855 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-19 13:22:25 +00:00
James Rutherford
603d4d0d76 Changed source and target to 1.5; trunk now requires JDK 1.5 or greater.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1800 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-18 13:37:10 +00:00
Claudia Juergen
230405a1bf Removed references to UPC
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1792 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-12 10:26:24 +00:00
Claudia Juergen
399251be86 updated year in copyright statement
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1784 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-11 11:27:52 +00:00
Claudia Juergen
6cae9d556a (Grupo de Usuarios de DSpace de España (GUDE))
Spanish language pack for DSpace 1.4.1

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1783 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-11 09:07:52 +00:00
Claudia Juergen
86c16ad09f (Grupo de Usuarios de DSpace de España (GUDE))
Catalan language pack for DSpace 1.4.1

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1782 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-11 09:07:14 +00:00
James Rutherford
99751294c9 (Stuart Lewis)
- SF Patch #1587225 Google and html sitemap generator


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1779 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-09 12:06:58 +00:00
James Rutherford
00d924f0db (Stuart Lewis)
- SF Patch #1587225 Google and html sitemap generator

Note that this patch was modified to work with jdk 1.4. Once we are using jdk
1.5 or higher, the annotations can go back in.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1778 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-09 12:03:14 +00:00
James Rutherford
6e5a54f707 (Richard Jones)
- SF Patch #1659841 Add option to clear context object cache


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1777 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-09 10:51:02 +00:00
James Rutherford
15db86801e (Richard Jones)
- SF Patch #1659796 Create administrator wtih command line options

Also updated create-adminstrator script and simplified dsprop script.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1776 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-09 10:47:06 +00:00
James Rutherford
2d02aa4e2b (Monika Mevenkamp)
- SF Patch #1654466 dsprop convenience script


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1775 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-09 10:14:48 +00:00
Stuart Lewis
a64dbf8e37 Corrected typo in comment
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1768 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-06 20:16:10 +00:00
James Rutherford
1e64faade1 (Monika Mevenkamp)
- SF Patch #1654469 stat scripts always return exit code 1


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1767 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-06 16:45:17 +00:00
James Rutherford
8091277eb7 (Stuart Lewis)
- SF Patch #1642336 Restrict domains of self-registered users


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1766 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-06 14:51:06 +00:00
James Rutherford
236951fa78 (Stuart Lewis)
- SF Patch #1670110 for SF Bug #1670106 Onebox and textarea fail when visibility set to workflow
- SF Patch #1628889 Improve file size descriptions in ItemTag
- SF Patch #1641678 [dspace]/bin scripts for import and export


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1765 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-06 14:15:48 +00:00
Andrea Bollini
e24d27cf74 SF Patch #1687815 Search function for select eperson JSPUI
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1764 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-06 09:09:52 +00:00
Andrea Bollini
e35be80261 (Andrea Bollini)
SF Patch #1689150 improvement of ControlledVocabulary

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1763 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-06 09:03:14 +00:00
Robert Tansley
f0c5ceec69 (Robert Tansley)
- Fixes to QueryArgs and RegisterServlet that cause NullPointerExceptions on
  invalid input


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1762 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-05 22:35:52 +00:00
Stuart Lewis
9b6c5729e4 SF Patch #1665400 Oracle schema changes for CLOB columns
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1761 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-05 15:35:38 +00:00
Robert Tansley
5d4033bae9 Adding svn:ignore for local/ directory
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1760 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-05 15:31:47 +00:00
Stuart Lewis
e027147bc2 SF Patch #1660752 Workaround Numeric/Integer handling in Oracle
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1759 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-05 15:26:37 +00:00
James Rutherford
2708a082d6 (James Rutherford)
- SF Patch #1694943 for SF feature request #1691277 Importing: Workaround for ext3 subdirectory limitation


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1758 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-05 14:01:44 +00:00
Stuart Lewis
cd3468fba3 SF Patch #1688523 Bug fix - OAI harvest and Oracle
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1757 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-05 13:31:47 +00:00
James Rutherford
979b743325 (Richard Jones)
- SF Patch #1659837 ItemIterator now deals with item ids also


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1756 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-05 11:09:16 +00:00
Claudia Juergen
a4c2a78300 (Claudia Juergen)
Fix for SF Bug #1690573 dspace-admin, edit item trailing white spaces

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1755 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-04 11:40:55 +00:00
Robert Tansley
8a8b87ecd7 Setting svn:ignore to ignore postgresql JDBC driver jar
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1754 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-03 20:47:04 +00:00
Robert Tansley
7586d842ff Updated svn:ignore to ignore Eclipse project files and build/
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1753 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-03 20:26:21 +00:00
Robert Tansley
1373ad370c Updated svn:ignore to ignore Eclipse project files and build/
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1752 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-03 20:24:35 +00:00
Stuart Lewis
d5cb57a50a SF Patch #1659901 Import community and collection structure
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1751 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-30 12:37:40 +00:00
Stuart Lewis
b8f91d989a SF Patch #1659901 Import community and collection structure
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1750 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-30 11:12:17 +00:00
Claudia Juergen
80c7f6bc48 (Stuart Lewis)
- SF Patch #1628889 Improve file size descriptions in ItemTag

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1749 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-30 09:19:12 +00:00
Stuart Lewis
e6e7c5a0ca SF Patch 1676370 Bug #1648070 Statistics does not use navbar="admin"
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1737 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-12 13:47:23 +00:00
Stuart Lewis
dd9e736e6e SF Patch #1659868 Improved database level debugging
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1736 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-12 13:20:41 +00:00
Stuart Lewis
0ebb61bd12 SF Patch #1659868 Improved database level debugging
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1735 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-12 13:20:16 +00:00
Mark Diggory
0c48621b3b Correcting typo in mods/mets crosswalk (causes errors in OAI). Have to point out storing xml as values of a java properties file not only unvalidatable but also not horrible to internationalize. This should seriously be considered for replacement/rearchitecture.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1734 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-10 03:20:54 +00:00
Claudia Juergen
fb8f13300e (Claudia Juergen)
Fix for SF Bug #1653151 Checker file shows filter-media (just a typo in header)
Fixed bin/index-all similar typo

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1733 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-05 16:08:44 +00:00
Claudia Juergen
ec71506205 (StuartLewis)
SF Patch #1670110 for SF Bug #1670106 Onebox and textarea fail when visibility set to workflow

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1732 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-05 15:59:46 +00:00
Claudia Juergen
1ede94f58c French Messages.properties compliant to DSpace 1.4.1
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1729 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-03-05 14:32:37 +00:00
1640 changed files with 283030 additions and 64125 deletions

15
LICENSING_NOTICE.txt Normal file
View File

@@ -0,0 +1,15 @@
Licensing Notice
Fedora Commons joined with the DSpace Foundation and began operating under
the new name DuraSpace in July 2009. DuraSpace holds the copyrights of
the DSpace Foundation, Inc.
The DSpace Foundation, Inc. is a 501(c)3 corporation established in July 2007
with a mission to promote and advance the dspace platform enabling management,
access and preservation of digital works. The Foundation was able to transfer
the legal copyright from Hewlett-Packard Company (HP) and Massachusetts
Institute of Technology (MIT) to the DSpace Foundation in October 2007. Many
of the files in the source code may contain a copyright statement stating HP
and MIT posses the copyright, in these instances please note that the copy
right has transfered to the DSpace foundation, and subsequently to Duraspace.

47
README Normal file
View File

@@ -0,0 +1,47 @@
Installation instructions are included in this release package under
- dspace/docs/html/index.html
or
- dspace/docs/pdf/DSpace-Manual.pdf
DSpace version information can be found in this release package under
- dspace/CHANGES
Documentation for the most recent stable release may be viewed online at
dspace.org:
- http://dspace.org/current-release/latest-release/
Installation instructions for other version may be different, so you
are encouraged to obtain the corresponding documentation package from
SourceForge, or to download the latest documentation snapshot from SVN
To obtain files from the SVN repository and build, please see:
- https://scm.dspace.org/svn/repo/dspace/tags/
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
- http://jira.dspace.org/
To contribute to DSpace, please see:
- http://wiki.dspace.org/index.php/HowToContribute
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/
Copyright (c) 2002-2010, DuraSpace. All rights reserved.

201
dspace-api/pom.xml Normal file
View File

@@ -0,0 +1,201 @@
<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>
<name>DSpace Kernel :: API and Implementation</name>
<description>DSpace core data model and service APIs.</description>
<url>http://projects.dspace.org/dspace-api</url>
<!--
A Parent POM that Maven inherits DSpace Defaults
POM atrributes from.
-->
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>1.6.0</version>
</parent>
<repositories>
<repository>
<id>maven.dspace.org-snapshot</id>
<name>DSpace Maven Snapshot Repository</name>
<url>http://maven.dspace.org/snapshot</url>
<releases>
<enabled>false</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
</repositories>
<!--
The Subversion repository location is used by Continuum to update against
when changes have occured, this spawns a new build cycle and releases snapshots
into the snapshot repository below.
-->
<scm>
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0/dspace</connection>
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0/dspace</developerConnection>
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0/dspace</url>
</scm>
<!--
Runtime and Compile Time dependencies for DSpace.
-->
<dependencies>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>handle</artifactId>
<version>6.2</version>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>jargon</artifactId>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>mets</artifactId>
</dependency>
<dependency>
<groupId>org.textmining</groupId>
<artifactId>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>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<exclusions>
<exclusion>
<artifactId>xom</artifactId>
<groupId>xom</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
</dependency>
<dependency>
<groupId>pdfbox</groupId>
<artifactId>pdfbox</artifactId>
</dependency>
<dependency>
<groupId>org.fontbox</groupId>
<artifactId>fontbox</artifactId>
</dependency>
<dependency>
<groupId>org.jempbox</groupId>
<artifactId>jempbox</artifactId>
</dependency>
<dependency>
<groupId>poi</groupId>
<artifactId>poi</artifactId>
</dependency>
<dependency>
<groupId>rome</groupId>
<artifactId>rome</artifactId>
</dependency>
<dependency>
<groupId>rome</groupId>
<artifactId>modules</artifactId>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xmlParserAPIs</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>oclc-harvester2</artifactId>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-services-api</artifactId>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-services-impl</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -0,0 +1,264 @@
/*
* CreateAdministrator.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.administer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
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.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.I18nUtil;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
/**
* A command-line tool for creating an initial administrator for setting up a
* DSpace site. Prompts for an e-mail address, last name, first name and
* password from standard input. An administrator group is then created and the
* data passed in used to create an e-person in that group.
* <P>
* Alternatively, it can be used to take the email, first name, last name and
* desired password as arguments thus:
*
* CreateAdministrator -e [email] -f [first name] -l [last name] -p [password]
*
* This is particularly convenient for automated deploy scripts that require an
* initial administrator, for example, before deployment can be completed
*
* @author Robert Tansley
* @author Richard Jones
*
* @version $Revision$
*/
public class CreateAdministrator
{
/** DSpace Context object */
private Context context;
/**
* 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
*/
public static void main(String[] argv)
throws Exception
{
CommandLineParser parser = new PosixParser();
Options options = new Options();
CreateAdministrator ca = new CreateAdministrator();
options.addOption("e", "email", true, "administrator email address");
options.addOption("f", "first", true, "administrator first name");
options.addOption("l", "last", true, "administrator lastt name");
options.addOption("c", "language", true, "administrator language");
options.addOption("p", "password", true, "administrator password");
CommandLine line = parser.parse(options, argv);
if (line.hasOption("e") && line.hasOption("f") && line.hasOption("l") &&
line.hasOption("c") && line.hasOption("p"))
{
ca.createAdministrator(line.getOptionValue("e"),
line.getOptionValue("f"), line.getOptionValue("l"),
line.getOptionValue("c"), line.getOptionValue("p"));
}
else
{
ca.negotiateAdministratorDetails();
}
}
/**
* constructor, which just creates and object with a ready context
*
* @throws Exception
*/
private CreateAdministrator()
throws Exception
{
context = new Context();
}
/**
* Method which will negotiate with the user via the command line to
* obtain the administrator's details
*
* @throws Exception
*/
private void negotiateAdministratorDetails()
throws Exception
{
// For easier reading of typing
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Creating an initial administrator account");
boolean dataOK = false;
String email = null;
String firstName = null;
String lastName = null;
String password1 = null;
String password2 = null;
String language = I18nUtil.DEFAULTLOCALE.getLanguage();
while (!dataOK)
{
System.out.print("E-mail address: ");
System.out.flush();
email = input.readLine().trim();
System.out.print("First name: ");
System.out.flush();
firstName = input.readLine().trim();
System.out.print("Last name: ");
System.out.flush();
lastName = input.readLine().trim();
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().trim();
language = I18nUtil.getSupportedLocale(new Locale(language)).getLanguage();
}
System.out.println("WARNING: Password will appear on-screen.");
System.out.print("Password: ");
System.out.flush();
password1 = input.readLine().trim();
System.out.print("Again to confirm: ");
System.out.flush();
password2 = input.readLine().trim();
if (!password1.equals("") && password1.equals(password2))
{
// password OK
System.out.print("Is the above data correct? (y or n): ");
System.out.flush();
String s = input.readLine().trim();
if (s.toLowerCase().startsWith("y"))
{
dataOK = true;
}
}
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);
}
/**
* Create the administrator with the given details. If the user
* already exists then they are simply upped to administrator status
*
* @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
*/
private void createAdministrator(String email, String first, String last,
String language, String pw)
throws Exception
{
// Of course we aren't an administrator yet so we need to
// circumvent authorisation
context.setIgnoreAuthorization(true);
// Find administrator group
Group admins = Group.find(context, 1);
if (admins == null)
{
throw new Exception("Error, no admin group (group 1) found");
}
// Create the administrator e-person
EPerson eperson = EPerson.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);
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();
admins.addMember(eperson);
admins.update();
context.complete();
System.out.println("Administrator account created");
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -0,0 +1,318 @@
package org.dspace.administer;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.cli.CommandLine;
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.xml.serialize.Method;
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.core.Context;
import org.xml.sax.SAXException;
/**
* @author Graham Triggs
*
* This class creates an xml document as passed in the arguments and
* from the metadata schemas for the repository.
*
* The form of the XML is as follows
*
* <metadata-schemas>
* <schema>
* <name>dc</name>
* <namespace>http://dublincore.org/documents/dcmi-terms/</namespace>
* </schema>
* </metadata-schemas>
*/
public class MetadataExporter
{
/**
* @param args
* @throws ParseException
* @throws SAXException
* @throws IOException
* @throws SQLException
* @throws RegistryExportException
*/
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();
options.addOption("f", "file", true, "output xml file for registry");
options.addOption("s", "schema", true, "the name of the schema to export");
CommandLine line = parser.parse(options, args);
String file = null;
String schema = null;
if (line.hasOption('f'))
{
file = line.getOptionValue('f');
}
else
{
usage();
System.exit(0);
}
if (line.hasOption('s'))
{
schema = line.getOptionValue('s');
}
saveRegistry(file, schema);
}
public static void saveRegistry(String file, String schema) throws SQLException, IOException, SAXException, RegistryExportException
{
// create a context
Context context = new Context();
context.setIgnoreAuthorization(true);
OutputFormat xmlFormat = new OutputFormat(Method.XML, "UTF-8", true);
xmlFormat.setLineWidth(120);
xmlFormat.setIndent(4);
XMLSerializer xmlSerializer = new XMLSerializer(new BufferedWriter(new FileWriter(file)), xmlFormat);
// XMLSerializer xmlSerializer = new XMLSerializer(System.out, xmlFormat);
xmlSerializer.startDocument();
xmlSerializer.startElement("dspace-dc-types", null);
// Save the schema defintion(s)
saveSchema(context, xmlSerializer, schema);
MetadataField[] mdFields = null;
// If a single schema has been specified
if (schema != null && !"".equals(schema))
{
// Get the id of that schema
MetadataSchema mdSchema = MetadataSchema.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
{
// Get the metadata fields for all the schemas
mdFields = MetadataField.findAll(context);
}
// Output the metadata fields
for (MetadataField mdField : mdFields)
{
saveType(context, xmlSerializer, mdField);
}
xmlSerializer.endElement("dspace-dc-types");
xmlSerializer.endDocument();
// abort the context, as we shouldn't have changed it!!
context.abort();
}
/**
* 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
*/
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);
saveSchema(xmlSerializer, mdSchema);
}
else
{
// Find all schemas
MetadataSchema[] mdSchemas = MetadataSchema.findAll(context);
for (MetadataSchema mdSchema : mdSchemas)
{
saveSchema(xmlSerializer, mdSchema);
}
}
}
/**
* Serialize a single schema (namespace) registry entry
*
* @param xmlSerializer
* @param mdSchema
* @throws SAXException
* @throws 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)
{
throw new RegistryExportException("no schema to export");
}
String name = mdSchema.getName();
String namespace = mdSchema.getNamespace();
if (name == null || "".equals(name))
{
System.out.println("name is null, skipping");
return;
}
if (namespace == null || "".equals(namespace))
{
System.out.println("namespace is null, skipping");
return;
}
// Output the parent tag
xmlSerializer.startElement("dc-schema", null);
// Output the schema name
xmlSerializer.startElement("name", null);
xmlSerializer.characters(name.toCharArray(), 0, name.length());
xmlSerializer.endElement("name");
// Output the schema namespace
xmlSerializer.startElement("namespace", null);
xmlSerializer.characters(namespace.toCharArray(), 0, namespace.length());
xmlSerializer.endElement("namespace");
xmlSerializer.endElement("dc-schema");
}
/**
* Serialize a single metadata field registry entry to xml
*
* @param context
* @param xmlSerializer
* @param mdField
* @throws SAXException
* @throws RegistryExportException
* @throws SQLException
* @throws 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)
{
throw new RegistryExportException("no field to export");
}
// Get the data from the metadata field
String schemaName = getSchemaName(context, mdField);
String element = mdField.getElement();
String qualifier = mdField.getQualifier();
String scopeNote = mdField.getScopeNote();
// We must have a schema and element
if (schemaName == null || element == null)
{
throw new RegistryExportException("incomplete field information");
}
// Output the parent tag
xmlSerializer.startElement("dc-type", null);
// Output the schema name
xmlSerializer.startElement("schema", null);
xmlSerializer.characters(schemaName.toCharArray(), 0, schemaName.length());
xmlSerializer.endElement("schema");
// Output the element
xmlSerializer.startElement("element", null);
xmlSerializer.characters(element.toCharArray(), 0, element.length());
xmlSerializer.endElement("element");
// Output the qualifier, if present
if (qualifier != null)
{
xmlSerializer.startElement("qualifier", null);
xmlSerializer.characters(qualifier.toCharArray(), 0, qualifier.length());
xmlSerializer.endElement("qualifier");
}
else
{
xmlSerializer.comment("unqualified");
}
// Output the scope note, if present
if (scopeNote != null)
{
xmlSerializer.startElement("scope_note", null);
xmlSerializer.characters(scopeNote.toCharArray(), 0, scopeNote.length());
xmlSerializer.endElement("scope_note");
}
else
{
xmlSerializer.comment("no scope note");
}
xmlSerializer.endElement("dc-type");
}
/**
* Helper method to retrieve a schema name for the field.
* Caches the name after looking up the id.
*/
static Map<Integer, String> schemaMap = new HashMap<Integer, String>();
private static String getSchemaName(Context context, MetadataField mdField) throws SQLException, RegistryExportException
{
// Get name from cache
String name = schemaMap.get(new Integer(mdField.getSchemaID()));
if (name == null)
{
// Name not retrieved before, so get the schema now
MetadataSchema mdSchema = MetadataSchema.find(context, mdField.getSchemaID());
if (mdSchema != null)
{
name = mdSchema.getName();
schemaMap.put(new Integer(mdSchema.getSchemaID()), name);
}
else
{
// Can't find the schema
throw new RegistryExportException("Can't get schema name for field");
}
}
return name;
}
/**
* Print the usage message to stdout
*/
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";
System.out.println(usage);
}
}

View File

@@ -0,0 +1,296 @@
/*
* MetadataImporter.java
*
* Copyright (c) 2006, Imperial College London. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Imperial College nor the names of their
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.administer;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.apache.commons.cli.CommandLine;
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.administer.DCType;
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;
import org.dspace.core.LogManager;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.NamedNodeMap;
import org.xml.sax.SAXException;
/**
* @author Richard Jones
*
* This class takes an xml document as passed in the arguments and
* uses it to create metadata elements in the Metadata Registry if
* they do not already exist
*
* The format of the XML file is as follows:
*
* <dspace-dc-types>
* <dc-type>
* <schema>icadmin</schema>
* <element>status</element>
* <qualifier>dateset</qualifier>
* <scope_note>the workflow status of an item</scope_note>
* </dc-type>
*
* [....]
*
* </dspace-dc-types>
*/
public class MetadataImporter
{
/**
* main method for reading user input from the command line
*/
public static void main(String[] args)
throws ParseException, SQLException, IOException, TransformerException,
ParserConfigurationException, AuthorizeException, SAXException,
NonUniqueMetadataException, RegistryImportException
{
boolean forceUpdate = false;
// create an options object and populate it
CommandLineParser parser = new PosixParser();
Options options = new Options();
options.addOption("f", "file", true, "source xml file for DC fields");
options.addOption("u", "update", false, "update an existing schema");
CommandLine line = parser.parse(options, args);
String file = null;
if (line.hasOption('f'))
{
file = line.getOptionValue('f');
}
else
{
usage();
System.exit(0);
}
forceUpdate = line.hasOption('u');
loadRegistry(file, forceUpdate);
}
/**
* Load the data from the specified file path into the database
*
* @param file the file path containing the source data
*/
public static void loadRegistry(String file, boolean forceUpdate)
throws SQLException, IOException, TransformerException, ParserConfigurationException,
AuthorizeException, SAXException, NonUniqueMetadataException, RegistryImportException
{
// create a context
Context context = new Context();
context.setIgnoreAuthorization(true);
// read the XML
Document document = RegistryImporter.loadXML(file);
// Get the nodes corresponding to types
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++)
{
Node n = schemaNodes.item(i);
loadSchema(context, n, forceUpdate);
}
// Get the nodes corresponding to types
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++)
{
Node n = typeNodes.item(i);
loadType(context, n);
}
context.complete();
}
/**
* 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
*/
private static void loadSchema(Context context, Node node, boolean updateExisting)
throws SQLException, IOException, TransformerException,
AuthorizeException, NonUniqueMetadataException, RegistryImportException
{
// Get the values
String name = RegistryImporter.getElementData(node, "name");
String namespace = RegistryImporter.getElementData(node, "namespace");
if (name == null || "".equals(name))
{
throw new RegistryImportException("Name of schema must be supplied");
}
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);
if (s == null)
{
// Schema does not exist - create
MetadataSchema schema = new MetadataSchema(namespace, name);
schema.create(context);
System.out.println("created");
}
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");
return;
}
// It's a different namespace - have we been told to update?
if (updateExisting)
{
// Update the existing schema namespace and continue to type import
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 registerd with different namespace - use -u to update");
}
}
}
/**
* Process a node in the metadata registry XML file. The node must
* 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
*/
private static void loadType(Context context, Node node)
throws SQLException, IOException, TransformerException,
AuthorizeException, NonUniqueMetadataException, RegistryImportException
{
// Get the values
String schema = RegistryImporter.getElementData(node, "schema");
String element = RegistryImporter.getElementData(node, "element");
String qualifier = RegistryImporter.getElementData(node, "qualifier");
String scopeNote = RegistryImporter.getElementData(node, "scope_note");
// If the schema is not provided default to DC
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);
if (schemaObj == null)
{
throw new RegistryImportException("Schema '" + schema + "' is not registered");
}
MetadataField mf = MetadataField.findByElement(context, schemaObj.getSchemaID(), element, qualifier);
if (mf != null)
{
System.out.println("already exists, skipping");
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");
}
/**
* Print the usage message to stdout
*/
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";
System.out.println(usage);
}
}

View File

@@ -0,0 +1,84 @@
/*
* RegistryImportException.java
*
* Copyright (c) 2006, Imperial College London. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Imperial College nor the names of their
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.administer;
/**
* @author Graham Triggs
*
* An exception to report any problems with registry exports
*/
public class RegistryExportException extends Exception
{
private Exception e;
/**
* Create an empty authorize exception
*/
public RegistryExportException()
{
super();
}
/**
* create an exception with only a message
*
* @param message
*/
public RegistryExportException(String message)
{
super(message);
}
/**
* create an exception with an inner exception and a message
*
* @param message
* @param e
*/
public RegistryExportException(String message, Throwable e)
{
super(message, e);
}
/**
* create an exception with an inner exception
*
* @param e
*/
public RegistryExportException(Throwable e)
{
super(e);
}
}

View File

@@ -0,0 +1,84 @@
/*
* RegistryImportException.java
*
* Copyright (c) 2006, Imperial College London. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Imperial College nor the names of their
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.administer;
/**
* @author Richard Jones
*
* An exception to report any problems with registry imports
*/
public class RegistryImportException extends Exception
{
private Exception e;
/**
* Create an empty authorize exception
*/
public RegistryImportException()
{
super();
}
/**
* create an exception with only a message
*
* @param message
*/
public RegistryImportException(String message)
{
super(message);
}
/**
* create an exception with an inner exception and a message
*
* @param message
* @param e
*/
public RegistryImportException(String message, Throwable e)
{
super(message, e);
}
/**
* create an exception with an inner exception
*
* @param e
*/
public RegistryImportException(Throwable e)
{
super(e);
}
}

View File

@@ -0,0 +1,183 @@
/*
* RegistryImporter.java
*
* Copyright (c) 2006, Imperial College London. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Imperial College nor the names of their
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.administer;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.apache.commons.cli.CommandLine;
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.administer.DCType;
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;
import org.dspace.core.LogManager;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.NamedNodeMap;
import org.xml.sax.SAXException;
/**
* @author Richard Jones
*
* This class provides the tools that registry importers might need to
* use. Basically some utility methods. And actually, although it says
* I am the author, really I ripped these methods off from other
* classes
*/
public class RegistryImporter
{
/**
* Load in the XML from file.
*
* @param filename
* the filename to load from
*
* @return the DOM representation of the XML file
*/
public static Document loadXML(String filename)
throws IOException, ParserConfigurationException, SAXException
{
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
Document document = builder.parse(new File(filename));
return document;
}
/**
* Get the CDATA of a particular element. For example, if the XML document
* contains:
* <P>
* <code>
* &lt;foo&gt;&lt;mimetype&gt;application/pdf&lt;/mimetype&gt;&lt;/foo&gt;
* </code>
* passing this the <code>foo</code> node and <code>mimetype</code> will
* return <code>application/pdf</code>.
* </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
*
* @return the CDATA as a <code>String</code>
*/
public static String getElementData(Node parentElement, String childName)
throws TransformerException
{
// Grab the child node
Node childNode = XPathAPI.selectSingleNode(parentElement, childName);
if (childNode == null)
{
// No child node, so no values
return null;
}
// Get the #text
Node dataNode = childNode.getFirstChild();
if (dataNode == null)
{
return null;
}
// Get the data
String value = dataNode.getNodeValue().trim();
return value;
}
/**
* Get repeated CDATA for a particular element. For example, if the XML
* document contains:
* <P>
* <code>
* &lt;foo&gt;
* &lt;bar&gt;val1&lt;/bar&gt;
* &lt;bar&gt;val2&lt;/bar&gt;
* &lt;/foo&gt;
* </code>
* passing this the <code>foo</code> node and <code>bar</code> will
* return <code>val1</code> and <code>val2</code>.
* </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
*
* @return the CDATA as a <code>String</code>
*/
public static String[] getRepeatedElementData(Node parentElement,
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++)
{
// Get the #text node
Node dataNode = childNodes.item(i).getFirstChild();
// Get the data
data[i] = dataNode.getNodeValue().trim();
}
return data;
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -140,6 +138,7 @@ public class RegistryLoader
context.abort();
}
System.err.println("Error: \n - " + e.getMessage());
System.exit(1);
}
}

View File

@@ -0,0 +1,616 @@
/*
* StructBuilder.java
*
* Copyright (c) 2006, Imperial College. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Imperial College nor the names of their
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.administer;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Enumeration;
import java.util.Hashtable;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
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.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
* This class deals with importing community and collection structures from
* an XML file.
*
* The XML file structure needs to be:
*
* <import_structure>
* <community>
* <name>....</name>
* <community>...</community>
* <collection>
* <name>....</name>
* </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
* 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 */
private static Hashtable collectionMap = new Hashtable();
/** a hashtable to hold metadata for the community being worked on */
private static Hashtable communityMap = new Hashtable();
/**
* 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]
*
* 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.
*/
public static void main(String[] argv)
throws Exception
{
CommandLineParser parser = new PosixParser();
Options options = new Options();
options.addOption( "f", "file", true, "file");
options.addOption( "e", "eperson", true, "eperson");
options.addOption("o", "output", true, "output");
CommandLine line = parser.parse( options, argv );
String file = null;
String eperson = null;
String output = null;
if (line.hasOption('f'))
{
file = line.getOptionValue('f');
}
if (line.hasOption('e'))
{
eperson = line.getOptionValue('e');
}
if (line.hasOption('o'))
{
output = line.getOptionValue('o');
}
if (output == null || eperson == null || file == null)
{
usage();
System.exit(0);
}
// create a context
Context context = new Context();
// set the context
context.setCurrentUser(EPerson.findByEmail(context, eperson));
// load the XML
Document document = loadXML(file);
// run the preliminary validation, to be sure that the the XML document
// is properly structured
validate(document);
// load the mappings into the member variable hashmaps
communityMap.put("name", "name");
communityMap.put("description", "short_description");
communityMap.put("intro", "introductory_text");
communityMap.put("copyright", "copyright_text");
communityMap.put("sidebar", "side_bar_text");
collectionMap.put("name", "name");
collectionMap.put("description", "short_description");
collectionMap.put("intro", "introductory_text");
collectionMap.put("copyright", "copyright_text");
collectionMap.put("sidebar", "side_bar_text");
collectionMap.put("license", "license");
collectionMap.put("provenance", "provenance_description");
// get the top level community list
NodeList first = XPathAPI.selectNodeList(document, "/import_structure/community");
// run the import starting with the top level communities
Element[] elements = handleCommunities(context, first, null);
// generate the output
Element root = xmlOutput.getRootElement();
for (int i = 0; i < elements.length; i++)
{
root.addContent(elements[i]);
}
// finally write the string into the output file
try
{
BufferedWriter out = new BufferedWriter(new FileWriter(output));
out.write(new XMLOutputter().outputString(xmlOutput));
out.close();
}
catch (IOException e)
{
System.out.println("Unable to write to output file " + output);
System.exit(0);
}
context.complete();
}
/**
* Output the usage information
*/
private static void usage()
{
System.out.println("Usage: java StructBuilder -f <source XML file> -o <output file> -e <eperson email>");
System.out.println("Communitities will be created from the top level, and a map of communities to handles will be returned in the output file");
return;
}
/**
* Validate the XML document. This method does not return, but if validation
* fails it generates an error and ceases execution
*
* @param document the XML document object
* @throws TransformerException
*
*/
private static void validate(org.w3c.dom.Document document)
throws TransformerException
{
StringBuffer err = new StringBuffer();
boolean trip = false;
err.append("The following errors were encountered parsing the source XML\n");
err.append("No changes have been made to the DSpace instance\n\n");
NodeList first = XPathAPI.selectNodeList(document, "/import_structure/community");
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)
{
err.append(errs);
trip = true;
}
if (trip)
{
System.out.println(err.toString());
System.exit(0);
}
}
/**
* Validate the communities section of the XML document. This returns a string
* containing any errors encountered, or null if there were no errors
*
* @param communities the NodeList of communities to validate
* @param level the level in the XML document that we are at, for the purposes
* 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
{
StringBuffer err = new StringBuffer();
boolean trip = false;
String errs = null;
for (int i = 0; i < communities.getLength(); i++)
{
Node n = communities.item(i);
NodeList name = XPathAPI.selectNodeList(n, "name");
if (name.getLength() != 1)
{
String pos = Integer.toString(i + 1);
err.append("-The level " + level + " community in position " + pos);
err.append(" does not contain exactly one name field\n");
trip = true;
}
// validate sub communities
NodeList subCommunities = XPathAPI.selectNodeList(n, "community");
String comErrs = validateCommunities(subCommunities, level + 1);
if (comErrs != null)
{
err.append(comErrs);
trip = true;
}
// validate collections
NodeList collections = XPathAPI.selectNodeList(n, "collection");
String colErrs = validateCollections(collections, level + 1);
if (colErrs != null)
{
err.append(colErrs);
trip = true;
}
}
if (trip)
{
errs = err.toString();
}
return errs;
}
/**
* validate the collection section of the XML document. This generates a
* string containing any errors encountered, or returns null if no errors
*
* @param collections a NodeList of collections to validate
* @param level the level in the XML document for the purposes of error reporting
*
* @return the errors to be generated by the calling method, or null if none
*/
private static String validateCollections(NodeList collections, int level)
throws TransformerException
{
StringBuffer err = new StringBuffer();
boolean trip = false;
String errs = null;
for (int i = 0; i < collections.getLength(); i++)
{
Node n = collections.item(i);
NodeList name = XPathAPI.selectNodeList(n, "name");
if (name.getLength() != 1)
{
String pos = Integer.toString(i + 1);
err.append("-The level " + level + " collection in position " + pos);
err.append(" does not contain exactly one name field\n");
trip = true;
}
}
if (trip)
{
errs = err.toString();
}
return errs;
}
/**
* Load in the XML from file.
*
* @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
{
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
org.w3c.dom.Document document = builder.parse(new File(filename));
return document;
}
/**
* 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)
{
String value = node.getNodeValue();
if (node.hasChildNodes())
{
Node first = node.getFirstChild();
if (first.getNodeType() == Node.TEXT_NODE)
{
return first.getNodeValue().trim();
}
}
return value;
}
/**
* Take a node list of communities and build the structure from them, delegating
* to the relevant methods in this class for sub-communities and collections
*
* @param context the context of the request
* @param communities a nodelist of communities to create along with their subjstructures
* @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
{
Element[] elements = new Element[communities.getLength()];
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);
}
// default the short description to be an empty string
community.setMetadata("short_description", " ");
// now update the metadata
Node tn = communities.item(i);
Enumeration keys = communityMap.keys();
while (keys.hasMoreElements())
{
Node node = null;
String key = (String) keys.nextElement();
NodeList nl = XPathAPI.selectNodeList(tn, key);
if (nl.getLength() == 1)
{
node = nl.item(0);
community.setMetadata((String) communityMap.get(key), getStringValue(node));
}
}
// FIXME: at the moment, if the community already exists by name
// then this will throw a PSQLException on a duplicate key
// violation
// Ideally we'd skip this row and continue to create sub
// communities
// and so forth where they don't exist, but it's proving
// difficult
// to isolate the community that already exists without hitting
// the database directly.
community.update();
// build the element with the handle that identifies the new
// community
// along with all the information that we imported here
// This looks like a lot of repetition of getting information
// from above
// but it's here to keep it separate from the create process in
// case
// we want to move it or make it switchable later
element.setAttribute("identifier", community.getHandle());
Element nameElement = new Element("name");
nameElement.setText(community.getMetadata("name"));
element.addContent(nameElement);
if (community.getMetadata("short_description") != null)
{
Element descriptionElement = new Element("description");
descriptionElement.setText(community.getMetadata("short_description"));
element.addContent(descriptionElement);
}
if (community.getMetadata("introductory_text") != null)
{
Element introElement = new Element("intro");
introElement.setText(community.getMetadata("introductory_text"));
element.addContent(introElement);
}
if (community.getMetadata("copyright_text") != null)
{
Element copyrightElement = new Element("copyright");
copyrightElement.setText(community.getMetadata("copyright_text"));
element.addContent(copyrightElement);
}
if (community.getMetadata("side_bar_text") != null)
{
Element sidebarElement = new Element("sidebar");
sidebarElement.setText(community.getMetadata("side_bar_text"));
element.addContent(sidebarElement);
}
// handle sub communities
NodeList subCommunities = XPathAPI.selectNodeList(tn, "community");
Element[] subCommunityElements = handleCommunities(context, subCommunities, community);
// handle collections
NodeList collections = XPathAPI.selectNodeList(tn, "collection");
Element[] collectionElements = handleCollections(context, collections, community);
int j;
for (j = 0; j < subCommunityElements.length; j++)
{
element.addContent(subCommunityElements[j]);
}
for (j = 0; j < collectionElements.length; j++)
{
element.addContent(collectionElements[j]);
}
elements[i] = element;
}
return elements;
}
/**
* Take a node list of collections and create the structure from them
*
* @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
{
Element[] elements = new Element[collections.getLength()];
for (int i = 0; i < collections.getLength(); i++)
{
Element element = new Element("collection");
Collection collection = parent.createCollection();
// default the short description to the empty string
collection.setMetadata("short_description", " ");
// import the rest of the metadata
Node tn = collections.item(i);
Enumeration keys = collectionMap.keys();
while (keys.hasMoreElements())
{
Node node = null;
String key = (String) keys.nextElement();
NodeList nl = XPathAPI.selectNodeList(tn, key);
if (nl.getLength() == 1)
{
node = nl.item(0);
collection.setMetadata((String) collectionMap.get(key), getStringValue(node));
}
}
collection.update();
element.setAttribute("identifier", collection.getHandle());
Element nameElement = new Element("name");
nameElement.setText(collection.getMetadata("name"));
element.addContent(nameElement);
if (collection.getMetadata("short_description") != null)
{
Element descriptionElement = new Element("description");
descriptionElement.setText(collection.getMetadata("short_description"));
element.addContent(descriptionElement);
}
if (collection.getMetadata("introductory_text") != null)
{
Element introElement = new Element("intro");
introElement.setText(collection.getMetadata("introductory_text"));
element.addContent(introElement);
}
if (collection.getMetadata("copyright_text") != null)
{
Element copyrightElement = new Element("copyright");
copyrightElement.setText(collection.getMetadata("copyright_text"));
element.addContent(copyrightElement);
}
if (collection.getMetadata("side_bar_text") != null)
{
Element sidebarElement = new Element("sidebar");
sidebarElement.setText(collection.getMetadata("side_bar_text"));
element.addContent(sidebarElement);
}
if (collection.getMetadata("license") != null)
{
Element sidebarElement = new Element("license");
sidebarElement.setText(collection.getMetadata("license"));
element.addContent(sidebarElement);
}
if (collection.getMetadata("provenance_description") != null)
{
Element sidebarElement = new Element("provenance");
sidebarElement.setText(collection.getMetadata("provenance_description"));
element.addContent(sidebarElement);
}
elements[i] = element;
}
return elements;
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -0,0 +1,291 @@
/*
* BulkEditChange.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.bulkedit;
import org.dspace.content.Item;
import org.dspace.content.DCValue;
import org.dspace.content.Collection;
import java.util.ArrayList;
/**
* 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 */
private Item item;
/** The ArrayList of hashtables with the new elements */
private ArrayList<DCValue> adds;
/** The ArrayList of hashtables with the removed elements */
private ArrayList<DCValue> removes;
/** The ArrayList of hashtablles with the unchanged elements */
private ArrayList<DCValue> constant;
/** The ArrayList of the complete set of new values (constant + adds) */
private ArrayList<DCValue> complete;
/** The Arraylist of old collections the item has been moved from */
private ArrayList<Collection> oldOwningCollections;
/** The Arraylist of new collections the item has been moved into */
private ArrayList<Collection> newOwningCollections;
/** Is this a new item */
private boolean newItem;
/** Have any changes actually been made? */
private boolean empty;
/**
* Initalise a change holder for a new item
*/
public BulkEditChange()
{
// Set the item to be null
item = null;
newItem = true;
empty = true;
// Initialise the arrays
adds = new ArrayList<DCValue>();
removes = new ArrayList<DCValue>();
constant = new ArrayList<DCValue>();
complete = new ArrayList<DCValue>();
oldOwningCollections = new ArrayList<Collection>();
newOwningCollections = new ArrayList<Collection>();
}
/**
* Initalise a new change holder for an existing item
*
* @param i The Item to store
*/
public BulkEditChange(Item i)
{
// Store the item
item = i;
newItem = false;
empty = true;
// Initalise the arrays
adds = new ArrayList<DCValue>();
removes = new ArrayList<DCValue>();
constant = new ArrayList<DCValue>();
complete = new ArrayList<DCValue>();
oldOwningCollections = new ArrayList<Collection>();
newOwningCollections = new ArrayList<Collection>();
}
/**
* Store the item - used when a new item is created
*
* @param i The item
*/
public void setItem(Item i)
{
// Store the item
item = i;
}
/**
* Add an added metadata value
*
* @param dcv The value to add
*/
public void registerAdd(DCValue dcv)
{
// Add the added value
adds.add(dcv);
complete.add(dcv);
empty = false;
}
/**
* Add a removed metadata value
*
* @param dcv The value to remove
*/
public void registerRemove(DCValue dcv)
{
// Add the removed value
removes.add(dcv);
empty = false;
}
/**
* Add an unchanged metadata value
*
* @param dcv The value to keep unchanged
*/
public void registerConstant(DCValue dcv)
{
// Add the removed value
constant.add(dcv);
complete.add(dcv);
}
/**
* Add a new owning Collection
*
* @param c The new owning Collection
*/
public void registerNewOwningCollection(Collection c)
{
// Add the new owning Collection\
newOwningCollections.add(c);
empty = false;
}
/**
* Add an old owning Collection
*
* @param c The old owning Collection
*/
public void registerOldOwningCollection(Collection c)
{
// Add the old owning Collection\
oldOwningCollections.add(c);
empty = false;
}
/**
* Get the DSpace Item that these changes are applicable to.
*
* @return The item
*/
public Item getItem()
{
// Return the item
return item;
}
/**
* Get the list of elements and their values that have been added.
*
* @return the list of elements and their values that have been added.
*/
public ArrayList<DCValue> getAdds()
{
// Return the array
return adds;
}
/**
* Get the list of elements and their values that have been removed.
*
* @return the list of elements and their values that have been removed.
*/
public ArrayList<DCValue> getRemoves()
{
// Return the array
return removes;
}
/**
* Get the list of unchanged values
*
* @return the list of unchanged values
*/
public ArrayList<DCValue> getConstant()
{
// Return the array
return constant;
}
/**
* Get the list of all values
*
* @return the list of all values
*/
public ArrayList<DCValue> getComplete()
{
// Return the array
return complete;
}
/**
* Get the list of new owning Collections
*
* @return the list of new owning collections
*/
public ArrayList<Collection> getNewOwningCollections()
{
// Return the array
return newOwningCollections;
}
/**
* Get the list of old owning Collections
*
* @return the list of old owning collections
*/
public ArrayList<Collection> getOldOwningCollections()
{
// Return the array
return oldOwningCollections;
}
/**
* Does this change object represent a new item?
*
* @return Whether or not this is for a new item
*/
public boolean isNewItem()
{
// Return the new item status
return newItem;
}
/**
* Have any changes actually been recorded, or is this empty?
*
* @return Whether or not changes have been made
*/
public boolean hasChanges()
{
return !empty;
}
}

View File

@@ -0,0 +1,577 @@
/*
* DSpaceCSV.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.bulkedit;
import org.dspace.content.*;
import org.dspace.content.Collection;
import org.dspace.core.ConfigurationManager;
import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.io.*;
/**
* Utility class to read and write CSV files
*
* @author Stuart Lewis
*/
public class DSpaceCSV
{
/** The headings of the CSV file */
private ArrayList<String> headings;
/** An array list of CSV lines */
private ArrayList<DSpaceCSVLine> lines;
/** A counter of how many CSV lines this object holds */
private int counter;
/** The value separator (defaults to double pipe '||') */
protected static String valueSeparator;
/** The value separator in an escaped form for using in regexs */
protected static String escpaedValueSeparator;
/** The field separator (defaults to comma) */
protected static String fieldSeparator;
/** The field separator in an escaped form for using in regexs */
protected static String escapedFieldSeparator;
/** Whether to export all metadata such as handles and provenance information */
private boolean exportAll;
/** A list of metadata elements to ignore */
private Hashtable ignore;
/**
* Create a new instance of a CSV line holder
*
* @param exportAll Whether to export all metadata such as handles and provenance information
*/
public DSpaceCSV(boolean exportAll)
{
// Initalise the class
init();
// Stoee the exportAll setting
this.exportAll = exportAll;
}
/**
* Create a new instance, reading the lines in from file
*
* @param f The file to read from
*
* @throws Exception thrown if there is an error reading or processing the file
*/
public DSpaceCSV(File f) throws Exception
{
// Initalise the class
init();
// Open the CSV file
BufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream(f),"UTF8"));
// Read the heading line
String head = input.readLine();
String[] headingElements = head.split(escapedFieldSeparator);
for (String element : headingElements)
{
// Remove surrounding quotes if there are any
if ((element.startsWith("\"")) && (element.endsWith("\"")))
{
element = element.substring(1, element.length() - 1);
}
if (!"id".equals(element))
{
// Store the heading
headings.add(element);
}
}
// Read each subsequent line
String line;
while ((line = input.readLine()) != null){
// Are there an odd number of quotes?
while (((" " + line + " ").split("\"").length)%2 == 0)
{
line = line + "\n" + input.readLine();
}
// Parse the item metadata
addItem(line);
}
}
/**
* Initalise this class with values from dspace.cfg
*/
private void init()
{
// Set the value separator
setValueSeparator();
// Set the field separator
setFieldSeparator();
// Create the headings
headings = new ArrayList<String>();
// Create the blank list of items
lines = new ArrayList<DSpaceCSVLine>();
// Initalise the counter
counter = 0;
// Set the metadata fields to ignore
ignore = new Hashtable();
String toIgnore = ConfigurationManager.getProperty("bulkedit.ignore-on-export");
if ((toIgnore == null) || ("".equals(toIgnore.trim())))
{
// Set a default value
toIgnore = "dc.date.accession, dc.date.available, " +
"dc.description.provenance";
}
String[] toIgnoreArray = toIgnore.split(",");
for (String toIgnoreString : toIgnoreArray)
{
if (!"".equals(toIgnoreString.trim()))
{
ignore.put(toIgnoreString.trim(), toIgnoreString.trim());
}
}
}
/**
* Set the value separator for multiple values stored in one csv value.
*
* Is set in dspace.cfg as bulkedit.valueseparator
*
* If not set, defaults to double pipe '||'
*/
private void setValueSeparator()
{
// Get the value separator
valueSeparator = ConfigurationManager.getProperty("bulkedit.valueseparator");
if ((valueSeparator != null) && (!"".equals(valueSeparator.trim())))
{
valueSeparator = valueSeparator.trim();
}
else
{
valueSeparator = "||";
}
// Now store the escaped version
Pattern spchars = Pattern.compile("([\\\\*+\\[\\](){}\\$.?\\^|])");
Matcher match = spchars.matcher(valueSeparator);
escpaedValueSeparator = match.replaceAll("\\\\$1");
}
/**
* Set the field separator use to separate fields in the csv.
*
* Is set in dspace.cfg as bulkedit.fieldseparator
*
* If not set, defaults to comma ','.
*
* Special values are 'tab', 'hash' and 'semicolon' which will
* get substituted from the text to the value.
*/
private void setFieldSeparator()
{
// Get the value separator
fieldSeparator = ConfigurationManager.getProperty("bulkedit.fieldseparator");
if ((fieldSeparator != null) && (!"".equals(fieldSeparator.trim())))
{
fieldSeparator = fieldSeparator.trim();
if ("tab".equals(fieldSeparator))
{
fieldSeparator = "\t";
}
else if ("semicolon".equals(fieldSeparator))
{
fieldSeparator = ";";
}
else if ("hash".equals(fieldSeparator))
{
fieldSeparator = "#";
}
else
{
fieldSeparator = fieldSeparator.trim();
}
}
else
{
fieldSeparator = ",";
}
// Now store the escaped version
Pattern spchars = Pattern.compile("([\\\\*+\\[\\](){}\\$.?\\^|])");
Matcher match = spchars.matcher(fieldSeparator);
escapedFieldSeparator = match.replaceAll("\\\\$1");
}
/**
* Add a DSpace item to the CSV file
*
* @param i The DSpace item
*
* @throws Exception if something goes wrong with adding the Item
*/
public void addItem(Item i) throws Exception
{
// Create the CSV line
DSpaceCSVLine line = new DSpaceCSVLine(i.getID());
// Add in owning collections
Collection[] collections = i.getCollections();
for (Collection c : collections)
{
line.add("collection", c.getHandle());
}
// Populate it
DCValue md[] = i.getMetadata(Item.ANY, Item.ANY, Item.ANY, Item.ANY);
for (DCValue value : md)
{
// Get the key (schema.element)
String key = value.schema + "." + value.element;
// Add the qualifer if there is one (schema.element.qualifier)
if (value.qualifier != null)
{
key = key + "." + value.qualifier;
}
// 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 + "]";
}
// Store the item
if (exportAll || okToExport(value))
{
line.add(key, value.value);
if (!headings.contains(key))
{
headings.add(key);
}
}
}
lines.add(line);
counter++;
}
/**
* Add an item to the CSV file, from a CSV line of elements
*
* @param line The line of elements
* @throws Exception Thrown if an error occurs when adding the item
*/
public void addItem(String line) throws Exception
{
// Check to see if the last character is a field separator, which hides the last empy column
boolean last = false;
if (line.endsWith(fieldSeparator))
{
// Add a space to the end, then remove it later
last = true;
line += " ";
}
// Split up on field separator
String[] parts = line.split(escapedFieldSeparator);
ArrayList<String> bits = new ArrayList<String>();
bits.addAll(Arrays.asList(parts));
// Merge parts with embedded separators
boolean alldone = false;
while (!alldone)
{
boolean found = false;
int i = 0;
for (String part : bits)
{
int bitcounter = part.length() - part.replaceAll("\"", "").length();
if ((part.startsWith("\"")) && ((!part.endsWith("\"")) || ((bitcounter %2) == 1)))
{
found = true;
String add = bits.get(i) + fieldSeparator + bits.get(i + 1);
bits.remove(i);
bits.add(i, add);
bits.remove(i + 1);
break;
}
i++;
}
alldone = !found;
}
// Deal with quotes around the elements
int i = 0;
for (String part : bits)
{
if ((part.startsWith("\"")) && (part.endsWith("\"")))
{
part = part.substring(1, part.length() - 1);
bits.set(i, part);
}
i++;
}
// Remove embedded quotes
i = 0;
for (String part : bits)
{
if (part.contains("\"\""))
{
part = part.replaceAll("\"\"", "\"");
bits.set(i, part);
}
i++;
}
// Add elements to a DSpaceCSVLine
String id = parts[0].replaceAll("\"", "");
DSpaceCSVLine csvLine;
// Is this an existing item, or a new item (where id = '+')
if ("+".equals(id))
{
csvLine = new DSpaceCSVLine();
}
else
{
try
{
csvLine = new DSpaceCSVLine(Integer.parseInt(id));
}
catch (NumberFormatException nfe)
{
System.err.println("Invalid item identifier: " + id);
System.err.println("Please check your CSV file for informaton. " +
"Item id must be numeric, or a '+' to add a new item");
throw(nfe);
}
}
// Add the rest of the parts
i = 0;
for (String part : bits)
{
if (i > 0)
{
// Is this a last empty item?
if ((last) && (i == headings.size()))
{
part = "";
}
// Make sure we register that this column was there
csvLine.add(headings.get(i - 1), null);
String[] elements = part.split(escpaedValueSeparator);
for (String element : elements)
{
if ((element != null) && (!"".equals(element)))
{
csvLine.add(headings.get(i - 1), element);
}
}
}
i++;
}
lines.add(csvLine);
counter++;
}
/**
* Get the lines in CSV holders
*
* @return The lines
*/
public ArrayList<DSpaceCSVLine> getCSVLines()
{
// Return the lines
return lines;
}
/**
* Get the CSV lines as an array of CSV formatted strings
*
* @return the array of CSV formatted Strings
*/
public String[] getCSVLinesAsStringArray()
{
// Create the headings line
String[] csvLines = new String[counter + 1];
csvLines[0] = "id" + fieldSeparator + "collection";
Collections.sort(headings);
for (String value : headings)
{
csvLines[0] = csvLines[0] + fieldSeparator + value;
}
Iterator<DSpaceCSVLine> i = lines.iterator();
int c = 1;
while (i.hasNext())
{
csvLines[c++] = i.next().toCSV(headings);
}
return csvLines;
}
/**
* 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 void save(String filename) throws IOException
{
// Save the file
BufferedWriter out = new BufferedWriter(
new OutputStreamWriter(
new FileOutputStream(filename), "UTF8"));
for (String csvLine : getCSVLinesAsStringArray()) {
out.write(csvLine + "\n");
}
out.flush();
out.close();
}
/**
* Is it Ok to export this value? When exportAll is set to false, we don't export
* some of the metadata elements.
*
* The list can be configured via the key bulkedit.ignore-on-export in dspace.cfg
*
* @param md The DCValue to examine
* @return Whether or not it is OK to export this element
*/
private boolean okToExport(DCValue md)
{
// First check the metadata format, and K all non DC elements
if (!"dc".equals(md.schema))
{
return true;
}
// Now compare with the list to ignore
String key = md.schema + "." + md.element;
if (md.qualifier != null)
{
key += "." + md.qualifier;
}
if (ignore.get(key) != null) {
return false;
}
// Must be OK, so don't ignore
return true;
}
/**
* Return the csv file as one long formatted string
*
* @return The formatted String as a csv
*/
public String toString()
{
// Return the csv as one long string
StringBuffer csvLines = new StringBuffer();
String[] lines = this.getCSVLinesAsStringArray();
for (String line : lines)
{
csvLines.append(line).append("\n");
}
return csvLines.toString();
}
/**
* Test main method to check the marshalling and unmarshalling of strings in and out of CSV format
*
* @param args Not used
* @throws Exception Thrown if something goes wrong
*/
public static void main(String[] args) throws Exception
{
// Test the CSV parsing
String[] csv = {"id,\"dc.title\",dc.contributor.author,dc.description.abstract",
"1,Easy line,\"Lewis, Stuart\",A nice short abstract",
"2,Two authors,\"Lewis, Stuart||Bloggs, Joe\",Two people wrote this item",
"3,Three authors,\"Lewis, Stuart||Bloggs, Joe||Loaf, Meat\",Three people wrote this item",
"4,\"Two line\ntitle\",\"Lewis, Stuart\",abstract",
"5,\"\"\"Embedded quotes\"\" here\",\"Lewis, Stuart\",\"Abstract with\ntwo\nnew lines\"",
"6,\"\"\"Unbalanced embedded\"\" quotes\"\" here\",\"Lewis, Stuart\",\"Abstract with\ntwo\nnew lines\"",};
// Write the string to a file
String filename = "test.csv";
BufferedWriter out = new BufferedWriter(
new OutputStreamWriter(
new FileOutputStream(filename), "UTF8"));
for (String csvLine : csv) {
out.write(csvLine + "\n");
}
out.flush();
out.close();
System.gc();
// test the CSV parsing
DSpaceCSV dcsv = new DSpaceCSV(new File(filename));
String[] lines = dcsv.getCSVLinesAsStringArray();
for (String line : lines)
{
System.out.println(line);
}
// Delete the test file
File toDelete = new File(filename);
toDelete.delete();
}
}

View File

@@ -0,0 +1,212 @@
/*
* DSpaceCSVLine.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.bulkedit;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Enumeration;
import java.util.Iterator;
/**
* Utility class to store a line from a CSV file
*
* @author Stuart Lewis
*/
public class DSpaceCSVLine
{
/** The item id of the item represented by this line. -1 is for a new item */
private int id;
/** The elements in this line in a hashtable, keyed by the metadata type */
private Hashtable<String, ArrayList> items;
/**
* Create a new CSV line
*
* @param id The item ID of the line
*/
public DSpaceCSVLine(int id)
{
// Store the ID + separator, and initalise the hashtable
this.id = id;
items = new Hashtable<String, ArrayList>();
}
/**
* Create a new CSV line for a new item
*/
public DSpaceCSVLine()
{
// Set the ID to be -1, and initalise the hashtable
this.id = -1;
this.items = new Hashtable<String, ArrayList>();
}
/**
* Get the item ID that this line represents
*
* @return The item ID
*/
public int getID()
{
// Return the ID
return id;
}
/**
* Add a new metadata value to this line
*
* @param key The metadata key (e.g. dc.contributor.author)
* @param value The metadata value
*/
public void add(String key, String value)
{
// Create the array list if we need to
if (items.get(key) == null)
{
items.put(key, new ArrayList<String>());
}
// Store the item if it is not null
if (value != null)
{
items.get(key).add(value);
}
}
/**
* Get all the values that match the given metadata key. Will be null if none exist.
*
* @param key The metadata key
* @return All the elements that match
*/
public ArrayList<String> get(String key)
{
// Return any relevant values
return items.get(key);
}
/**
* Get all the metadata keys that are represented in this line
*
* @return An enumeration of all the keys
*/
public Enumeration<String> keys()
{
// Return the keys
return items.keys();
}
/**
* 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
* @return The CSV formatted String
*/
protected String toCSV(ArrayList<String> headings)
{
// Add the id
String bits = "\"" + id + "\"" + DSpaceCSV.fieldSeparator;
bits += valueToCSV(items.get("collection")) + DSpaceCSV.fieldSeparator;
// Add the rest of the elements
Iterator<String> i = headings.iterator();
String key;
while (i.hasNext())
{
key = i.next();
if ((items.get(key) != null) && (!"collection".equals(key)))
{
bits = bits + valueToCSV(items.get(key));
}
if (i.hasNext())
{
bits = bits + DSpaceCSV.fieldSeparator;
}
}
return bits;
}
/**
* Internal method to create a CSV formatted String joining a given set of elements
*
* @param values The values to create the string from
* @return The line as a CSV formatted String
*/
private String valueToCSV(ArrayList<String> values)
{
// Concatenate any fields together
String s = "";
// Check there is some content
if (values == null)
{
return s;
}
// Get on with the work
if (values.size() == 1)
{
s = values.get(0);
}
else
{
Iterator i = values.iterator();
while (i.hasNext())
{
s = s + i.next();
if (i.hasNext())
{
s = s + DSpaceCSV.valueSeparator;
}
}
}
// Replace internal quotes with two sets of quotes
s = s.replaceAll("\"", "\"\"");
// Wrap in quotes
s = "\"" + s + "\"";
// Return the csv formatted string
return s;
}
}

View File

@@ -0,0 +1,297 @@
/*
* MetadataExport.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.bulkedit;
import org.apache.commons.cli.*;
import org.apache.log4j.Logger;
import org.dspace.content.*;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.handle.HandleManager;
import java.util.ArrayList;
import java.sql.SQLException;
/**
* Metadata exporter to allow the batch export of metadata into a file
*
* @author Stuart Lewis
*/
public class MetadataExport
{
/** The Context */
private Context c;
/** The items to export */
private ItemIterator toExport;
/** Whether to export all metadata, or just normally edited metadata */
private boolean exportAll;
/** log4j logger */
private static Logger log = Logger.getLogger(MetadataExport.class);
/**
* Set up a new metadata export
*
* @param c The Context
* @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)
{
// Store the export settings
this.c = c;
this.toExport = toExport;
this.exportAll = exportAll;
}
/**
* Method to export a community (and sub-communites and collections)
*
* @param c The Context
* @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
{
// Try to export the community
this.c = c;
this.toExport = new ItemIterator(c, buildFromCommunity(toExport, new ArrayList(), 0));
this.exportAll = exportAll;
}
catch (SQLException sqle)
{
// Something went wrong...
System.err.println("Error running exporter:");
sqle.printStackTrace(System.err);
System.exit(1);
}
}
/**
* Build an array list of item ids that are in a community (include sub-communities and collections)
*
* @param community The community to build from
* @param itemIDs The itemID (used for recuriosn - 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
*/
private ArrayList buildFromCommunity(Community community, ArrayList itemIDs, int indent)
throws SQLException
{
// Add all the collections
Collection[] collections = community.getCollections();
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);
}
}
}
// Add all the sub-communities
Community[] communities = community.getSubcommunities();
for (Community subCommunity : communities)
{
for (int i = 0; i < indent; i++) System.out.print(" ");
buildFromCommunity(subCommunity, itemIDs, indent + 1);
}
return itemIDs;
}
/**
* Run the export
*
* @return the exported CSV lines
*/
public DSpaceCSV export()
{
try
{
// Process each item
DSpaceCSV csv = new DSpaceCSV(exportAll);
while (toExport.hasNext())
{
csv.addItem(toExport.next());
}
// Return the results
return csv;
}
catch (Exception e)
{
return null;
}
}
/**
* Print the help message
*
* @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)
{
// print the help message
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("MetadataExport\n", options);
System.out.println("\nfull export: metadataexport -f filename");
System.out.println("partial export: metadataexport -i handle -f filename");
System.exit(exitCode);
}
/**
* main method to run the metadata exporter
*
* @param argv the command line arguments given
*/
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("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("h", "help", false, "help");
CommandLine line = null;
try
{
line = parser.parse(options, argv);
}
catch (ParseException pe)
{
System.err.println("Error with commands.");
printHelp(options, 1);
System.exit(0);
}
if (line.hasOption('h'))
{
printHelp(options, 0);
}
// Check a filename is given
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();
c.turnOffAuthorisationSystem();
// The things we'll export
ItemIterator toExport = null;
MetadataExport exporter = null;
// Export everything?
boolean exportAll = line.hasOption('a');
// Check we have an item OK
if (!line.hasOption('i'))
{
System.out.println("Exporting whole repository WARNING: May take some time!");
exporter = new MetadataExport(c, Item.findAll(c), exportAll);
}
else
{
String handle = line.getOptionValue('i');
DSpaceObject dso = HandleManager.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)
{
System.out.println("Exporting item '" + dso.getName() + "' (" + handle + ")");
ArrayList item = new ArrayList();
item.add(dso.getID());
exporter = new MetadataExport(c, new ItemIterator(c, item), exportAll);
}
else if (dso.getType() == Constants.COLLECTION)
{
System.out.println("Exporting collection '" + dso.getName() + "' (" + handle + ")");
Collection collection = (Collection)dso;
toExport = collection.getAllItems();
exporter = new MetadataExport(c, toExport, exportAll);
}
else if (dso.getType() == Constants.COMMUNITY)
{
System.out.println("Exporting community '" + dso.getName() + "' (" + handle + ")");
exporter = new MetadataExport(c, (Community)dso, exportAll);
}
else
{
System.err.println("Error identifying '" + handle + "'");
System.exit(1);
}
}
// Perform the export
DSpaceCSV csv = exporter.export();
// Save the files to the file
csv.save(filename);
// Finsh off and tidy up
c.restoreAuthSystemState();
c.complete();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
/*
* MetadataImportException.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.bulkedit;
/**
* Metadata importer exception
*
* @author Stuart Lewis
*/
public class MetadataImportException extends Exception
{
/**
* Instantiate a new MetadataImportException
*
* @param message the error message
*/
public MetadataImportException(String message)
{
super(message);
}
}

View File

@@ -1,6 +1,5 @@
/*
* Copyright (c) 2004-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -13,8 +12,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -258,6 +256,7 @@ public class ChecksumChecker
checker.setDispatcher(dispatcher);
checker.setCollector(logger);
checker.process();
System.exit(0);
}
/**

View File

@@ -0,0 +1,561 @@
/*
* Harvest.java
*
* Version: $Revision: 1 $
*
* Date: $Date: 2007-11-28 15:07:34 -0600 (Wed, 28 Nov 2007) $
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.harvest;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
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.xpath.XPathAPI;
import org.dspace.app.itemimport.ItemImport;
import org.dspace.authorize.AuthorizeException;
import org.dspace.authorize.AuthorizeManager;
import org.dspace.authorize.ResourcePolicy;
import org.dspace.browse.IndexBrowse;
import org.dspace.content.Bitstream;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.Bundle;
import org.dspace.content.Collection;
import org.dspace.content.DSpaceObject;
import org.dspace.content.FormatIdentifier;
import org.dspace.harvest.HarvestedCollection;
import org.dspace.content.InstallItem;
import org.dspace.content.Item;
import org.dspace.content.ItemIterator;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.harvest.OAIHarvester;
import org.dspace.content.WorkspaceItem;
import org.dspace.harvest.OAIHarvester.HarvestingException;
import org.dspace.content.crosswalk.CrosswalkException;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.handle.HandleManager;
import org.dspace.workflow.WorkflowManager;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
* Test class for harvested collections.
*
* @author Alexey Maslov
*/
public class Harvest
{
private static Context context;
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("p", "purge", false, "delete all items in the collection");
options.addOption("r", "run", false, "run the standrad harvest procedure");
options.addOption("g", "ping", false, "test the OAI server and set");
options.addOption("o", "once", false, "run the harvest procedure with specified parameters");
options.addOption("s", "setup", false, "Set the collection up for harvesting");
options.addOption("S", "start", false, "start the harvest loop");
options.addOption("R", "reset", false, "reset harvest status on all collections");
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("h", "help", false, "help");
CommandLine line = parser.parse(options, argv);
String command = null;
String eperson = null;
String collection = null;
String oaiSource = null;
String oaiSetID = null;
String metadataKey = null;
int harvestType = 0;
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.exit(0);
}
if (line.hasOption('s')) {
command = "config";
}
if (line.hasOption('p')) {
command = "purge";
}
if (line.hasOption('r')) {
command = "run";
}
if (line.hasOption('g')) {
command = "ping";
}
if (line.hasOption('o')) {
command = "runOnce";
}
if (line.hasOption('S')) {
command = "start";
}
if (line.hasOption('R')) {
command = "reset";
}
if (line.hasOption('P')) {
command = "purgeAll";
}
if (line.hasOption('e')) {
eperson = line.getOptionValue('e');
}
if (line.hasOption('c')) {
collection = line.getOptionValue('c');
}
if (line.hasOption('t')) {
harvestType = Integer.parseInt(line.getOptionValue('t'));
} else {
harvestType = 0;
}
if (line.hasOption('a')) {
oaiSource = line.getOptionValue('a');
}
if (line.hasOption('i')) {
oaiSetID = line.getOptionValue('i');
}
if (line.hasOption('m')) {
metadataKey = line.getOptionValue('m');
}
// Instantiate our class
Harvest harvester = new Harvest();
harvester.context = new Context();
// Check our options
if (command == null)
{
System.out
.println("Error - no parameters specified (run with -h flag for details)");
System.exit(1);
}
// Run a single harvest cycle on a collection using saved settings.
else if (command.equals("run"))
{
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)");
System.exit(1);
}
harvester.runHarvest(collection, eperson);
}
// start the harvest loop
else if (command.equals("start"))
{
startHarvester();
}
// reset harvesting status
else if (command.equals("reset"))
{
resetHarvesting();
}
// purge all collections that are set up for harvesting (obviously for testing purposes only)
else if (command.equals("purgeAll"))
{
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);
}
context.complete();
}
// Delete all items in a collection. Useful for testing fresh harvests.
else if (command.equals("purge"))
{
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)");
System.exit(1);
}
harvester.purgeCollection(collection, eperson);
context.complete();
//TODO: implement this... remove all items and remember to unset "last-harvested" settings
}
// Configure a collection with the three main settings
else if (command.equals("config"))
{
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)
{
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");
System.out.println(" (run with -h flag for details)");
System.exit(1);
}
harvester.configureCollection(collection, harvestType, oaiSource, oaiSetID, metadataKey);
}
else if (command.equals("ping"))
{
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);
}
}
}
/**
* check
* @param collectionID
* @return
*/
private Collection checkCollection(String collectionID)
{
Collection collection = resolveCollection(collectionID);
try {
HarvestedCollection hc = HarvestedCollection.find(context, collection.getID());
if (!hc.isHarvestable()) {
System.out.println("Collection '"+ collection.getName() +"' is not set up for harvesting");
System.exit(1);
}
} catch (SQLException se) {
se.printStackTrace();
}
return collection;
}
/*
* Resolve the ID into a collection and check to see if its harvesting options are set. If so, return
* the collection, if not, bail out.
*/
private Collection resolveCollection(String collectionID) {
DSpaceObject dso;
Collection targetCollection = null;
try {
// is the ID a handle?
if (collectionID.indexOf('/') != -1)
{
// string has a / so it must be a handle - try and resolve it
dso = HandleManager.resolveToObject(context, collectionID);
// resolved, now make sure it's a collection
if (dso == null || dso.getType() != Constants.COLLECTION)
targetCollection = null;
else
targetCollection = (Collection)dso;
}
// not a handle, try and treat it as an integer collection
// database ID
else if (collectionID != null)
{
System.out.println("Looking up by id: " + collectionID + ", parsed as '" + Integer.parseInt(collectionID) + "', " + "in context: " + context);
targetCollection = Collection.find(context, Integer.parseInt(collectionID));
}
// was the collection valid?
if (targetCollection == null)
{
System.out.println("Cannot resolve " + collectionID + " to collection");
System.exit(1);
}
}
catch (SQLException se) {
se.printStackTrace();
}
return targetCollection;
}
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());
if (hc == null) {
hc = HarvestedCollection.create(context, collection.getID());
}
context.turnOffAuthorisationSystem();
hc.setHarvestParams(type, oaiSource, oaiSetId, mdConfigId);
hc.setHarvestStatus(HarvestedCollection.STATUS_READY);
hc.update();
context.restoreAuthSystemState();
context.complete();
}
catch (Exception e) {
System.out.println("Changes could not be committed");
e.printStackTrace();
System.exit(1);
}
finally {
context.restoreAuthSystemState();
}
}
/**
* Purges a collection of all harvest-related data and settings. All items in the collection will be deleted.
*
* @param collectionID
* @param email
*/
private void purgeCollection(String collectionID, String email) {
System.out.println("Purging collection of all items and reseting last_harvested and harvest_message: " + collectionID);
Collection collection = resolveCollection(collectionID);
try
{
EPerson eperson = EPerson.findByEmail(context, email);
context.setCurrentUser(eperson);
context.turnOffAuthorisationSystem();
ItemIterator it = collection.getAllItems();
IndexBrowse ib = new IndexBrowse(context);
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
if (i%50 == 0) {
context.commit();
i=0;
}
}
HarvestedCollection hc = HarvestedCollection.find(context, collection.getID());
if (hc != null) {
hc.setHarvestResult(null,"");
hc.setHarvestStatus(HarvestedCollection.STATUS_READY);
hc.setHarvestStartTime(null);
hc.update();
}
context.restoreAuthSystemState();
context.commit();
}
catch (Exception e) {
System.out.println("Changes could not be committed");
e.printStackTrace();
System.exit(1);
}
finally {
context.restoreAuthSystemState();
}
}
/**
* Run a single harvest cycle on the specified collection under the authorization of the supplied EPerson
*/
private void runHarvest(String collectionID, String email) {
System.out.println("Running: a harvest cycle on " + collectionID);
System.out.print("Initializing the harvester... ");
OAIHarvester harvester = null;
try {
Collection collection = resolveCollection(collectionID);
HarvestedCollection hc = HarvestedCollection.find(context, collection.getID());
harvester = new OAIHarvester(context, collection, hc);
System.out.println("success. ");
}
catch (HarvestingException hex) {
System.out.print("failed. ");
System.out.println(hex.getMessage());
System.exit(1);
} catch (SQLException se) {
// TODO Auto-generated catch block
se.printStackTrace();
}
try {
// Harvest will not work for an anonymous user
EPerson eperson = EPerson.findByEmail(context, email);
System.out.println("Harvest started... ");
context.setCurrentUser(eperson);
harvester.runHarvest();
context.complete();
}
catch (Exception e) {
// Not much else we can do at this point
e.printStackTrace();
System.exit(1);
}
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
*/
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);
//hc.setHarvestResult(null,"");
hc.setHarvestStartTime(null);
hc.setHarvestStatus(HarvestedCollection.STATUS_READY);
hc.update();
}
context.commit();
System.out.println("success. ");
}
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
{
System.out.print("Starting harvest loop... ");
OAIHarvester.startNewScheduler();
System.out.println("running. ");
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,59 @@
/*
* ItemExportException.java
*
* Version: $Revision $
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemexport;
/**
* An exception that can be thrown when error occur during item export
*/
public class ItemExportException extends Exception
{
public static final int EXPORT_TOO_LARGE = 0;
private int reason;
public ItemExportException(int r, String message)
{
super(message);
reason = r;
}
public int getReason()
{
return reason;
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -39,21 +37,11 @@
*/
package org.dspace.app.itemimport;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.*;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.*;
import java.util.zip.ZipFile;
import java.util.zip.ZipEntry;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -67,6 +55,8 @@ import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.apache.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.authorize.AuthorizeManager;
import org.dspace.authorize.ResourcePolicy;
import org.dspace.content.Bitstream;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.Bundle;
@@ -74,12 +64,14 @@ import org.dspace.content.Collection;
import org.dspace.content.FormatIdentifier;
import org.dspace.content.InstallItem;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.WorkspaceItem;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.handle.HandleManager;
import org.dspace.workflow.WorkflowManager;
import org.w3c.dom.Document;
@@ -108,6 +100,8 @@ public class ItemImport
{
static boolean useWorkflow = false;
static boolean useWorkflowSendEmail = false;
static boolean isTest = false;
static boolean isResume = false;
@@ -148,6 +142,7 @@ public class ItemImport
options.addOption("d", "delete", false,
"delete items listed in mapfile");
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");
@@ -155,6 +150,8 @@ public class ItemImport
"email of eperson doing importing");
options.addOption("w", "workflow", false,
"send submission through collection's workflow");
options.addOption("n", "notification", 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");
@@ -170,6 +167,7 @@ public class ItemImport
String mapfile = null;
String eperson = null; // db ID or email
String[] collections = null; // db ID or handles
int status = 0;
if (line.hasOption('h'))
{
@@ -177,6 +175,8 @@ public class ItemImport
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
@@ -205,6 +205,10 @@ public class ItemImport
if (line.hasOption('w'))
{
useWorkflow = true;
if (line.hasOption('n'))
{
useWorkflowSendEmail = true;
}
}
if (line.hasOption('t'))
@@ -245,6 +249,15 @@ public class ItemImport
.println("**Resume import** - attempting to import items not already imported");
}
boolean zip = false;
String zipfilename = "";
String ziptempdir = ConfigurationManager.getProperty("org.dspace.app.itemexport.work.dir");
if (line.hasOption('z'))
{
zip = true;
zipfilename = sourcedir + System.getProperty("file.separator") + line.getOptionValue('z');
}
// now validate
// must have a command set
if (command == null)
@@ -324,6 +337,36 @@ public class ItemImport
System.exit(1);
}
// does the zip file exist and can we write to the temp directory
if (zip)
{
File zipfile = new File(sourcedir);
if (!zipfile.canRead())
{
System.out.println("Zip file '" + sourcedir + "' does not exist, or is not readable.");
System.exit(1);
}
if (ziptempdir == null)
{
System.out.println("Unable to unzip import file as the key 'org.dspace.app.itemexport.work.dir' is not set in dspace.cfg");
System.exit(1);
}
zipfile = new File(ziptempdir);
if (!zipfile.isDirectory())
{
System.out.println("'" + ConfigurationManager.getProperty("org.dspace.app.itemexport.work.dir") +
"' as defined by the key 'org.dspace.app.itemexport.work.dir' in dspace.cfg " +
"is not a valid directory");
System.exit(1);
}
File tempdir = new File(ziptempdir);
tempdir.mkdirs();
sourcedir = ziptempdir + System.getProperty("file.separator") + line.getOptionValue("z");
ziptempdir = ziptempdir + System.getProperty("file.separator") +
line.getOptionValue("z") + System.getProperty("file.separator");
}
ItemImport myloader = new ItemImport();
// create a context
@@ -408,6 +451,48 @@ public class ItemImport
try
{
// If this is a zip archive, unzip it first
if (zip)
{
ZipFile zf = new ZipFile(zipfilename);
ZipEntry entry;
Enumeration entries = zf.entries();
while (entries.hasMoreElements())
{
entry = (ZipEntry)entries.nextElement();
if (entry.isDirectory())
{
new File(ziptempdir + entry.getName()).mkdir();
}
else
{
System.out.println("Extracting file: " + entry.getName());
int index = entry.getName().lastIndexOf('/');
if (index == -1)
{
// Was it created on Windows instead?
index = entry.getName().lastIndexOf('\\');
}
if (index > 0)
{
File dir = new File(ziptempdir + entry.getName().substring(0, index));
dir.mkdirs();
}
byte[] buffer = new byte[1024];
int len;
InputStream in = zf.getInputStream(entry);
BufferedOutputStream out = new BufferedOutputStream(
new FileOutputStream(ziptempdir + entry.getName()));
while((len = in.read(buffer)) >= 0)
{
out.write(buffer, 0, len);
}
in.close();
out.close();
}
}
}
c.setIgnoreAuthorization(true);
if (command.equals("add"))
@@ -439,6 +524,22 @@ public class ItemImport
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: " + ziptempdir);
ItemImport.deleteDirectory(new File(ziptempdir));
}
}
catch (Exception ex)
{
System.out.println("Unable to delete temporary zip archive location: " + ziptempdir);
}
if (mapOut != null)
@@ -450,6 +551,7 @@ public class ItemImport
{
System.out.println("***End of Test Run***");
}
System.exit(status);
}
private void addItems(Context c, Collection[] mycollections,
@@ -635,17 +737,26 @@ public class ItemImport
+ File.separatorChar);
// and the bitstreams from the contents file
// process contents file, add bistreams and bundles
processContentsFile(c, myitem, path + File.separatorChar + itemname,
"contents");
// process contents file, add bistreams and bundles, return any
// non-standard permissions
Vector options = processContentsFile(c, myitem, path
+ File.separatorChar + itemname, "contents");
if (useWorkflow)
{
// don't process handle file
// start up a workflow
if (!isTest)
{
// Should we send a workflow alert email or not?
if (useWorkflowSendEmail)
{
WorkflowManager.start(c, wi);
}
else
{
WorkflowManager.startWithoutNotify(c, wi);
}
// send ID to the mapfile
mapOutput = itemname + " " + myitem.getID();
@@ -667,6 +778,13 @@ public class ItemImport
mapOutput = itemname + " " + myhandle;
}
// set permissions if specified in contents file
if (options.size() > 0)
{
System.out.println("Processing options");
processOptions(c, myitem, options);
}
}
// now add to multiple collections if requested
@@ -782,7 +900,7 @@ public class ItemImport
// Load all metadata schemas into the item.
private void loadMetadata(Context c, Item myitem, String path)
throws SQLException, IOException, ParserConfigurationException,
SAXException, TransformerException
SAXException, TransformerException, AuthorizeException
{
// Load the dublin core metadata
loadDublinCore(c, myitem, path + "dublin_core.xml");
@@ -798,7 +916,7 @@ public class ItemImport
private void loadDublinCore(Context c, Item myitem, String filename)
throws SQLException, IOException, ParserConfigurationException,
SAXException, TransformerException //, AuthorizeException
SAXException, TransformerException, AuthorizeException
{
Document document = loadXML(filename);
@@ -828,11 +946,11 @@ public class ItemImport
for (int i = 0; i < dcNodes.getLength(); i++)
{
Node n = dcNodes.item(i);
addDCValue(myitem, schema, n);
addDCValue(c, myitem, schema, n);
}
}
private void addDCValue(Item i, String schema, Node n) throws TransformerException
private void addDCValue(Context c, Item i, String schema, Node n) throws TransformerException, SQLException, AuthorizeException
{
String value = getStringValue(n); //n.getNodeValue();
// compensate for empty value getting read as "null", which won't display
@@ -869,26 +987,26 @@ public class ItemImport
{
i.addMetadata(schema, element, qualifier, language, value);
}
else
{
// If we're just test the import, let's check that the actual metadata field exists.
MetadataSchema foundSchema = MetadataSchema.find(c,schema);
if (foundSchema == null)
{
System.out.println("ERROR: schema '"+schema+"' was not found in the registry.");
return;
}
/**
* Return the String value of a Node
*/
public String getStringValue(Node node)
{
String value = node.getNodeValue();
int schemaID = foundSchema.getSchemaID();
MetadataField foundField = MetadataField.findByElement(c, schemaID, element, qualifier);
if (node.hasChildNodes())
if (foundField == null)
{
Node first = node.getFirstChild();
if (first.getNodeType() == Node.TEXT_NODE)
{
return first.getNodeValue();
System.out.println("ERROR: Metadata field: '"+schema+"."+element+"."+qualifier+"' was not found in the registry.");
return;
}
}
return value;
}
/**
@@ -929,8 +1047,7 @@ public class ItemImport
}
catch (IOException e1)
{
System.err
.println("Non-critical problem releasing resources.");
System.err.println("Non-critical problem releasing resources.");
}
}
}
@@ -940,14 +1057,16 @@ public class ItemImport
/**
* Given a contents file and an item, stuffing it with bitstreams from the
* contents file
* contents file Returns a Vector of Strings with lines from the contents
* file that request non-default bitstream permission
*/
private void processContentsFile(Context c, Item i, String path,
private Vector processContentsFile(Context c, Item i, String path,
String filename) throws SQLException, IOException,
AuthorizeException
{
String contentspath = path + File.separatorChar + filename;
String line = "";
Vector options = new Vector();
System.out.println("\tProcessing contents file: " + contentspath);
@@ -978,8 +1097,7 @@ public class ItemImport
int iAssetstore = -1;
String sFilePath = null;
String sBundle = null;
StringTokenizer tokenizer =
new StringTokenizer(sRegistrationLine);
StringTokenizer tokenizer = new StringTokenizer(sRegistrationLine);
while (tokenizer.hasMoreTokens())
{
String sToken = tokenizer.nextToken();
@@ -1002,7 +1120,6 @@ public class ItemImport
else if (sToken.equals("-f") && tokenizer.hasMoreTokens())
{
sFilePath = tokenizer.nextToken();
}
else if (sToken.startsWith("bundle:"))
{
@@ -1023,33 +1140,114 @@ public class ItemImport
registerBitstream(c, i, iAssetstore, sFilePath, sBundle);
System.out.println("\tRegistering Bitstream: " + sFilePath
+ "\tAssetstore: " + iAssetstore
+ "\tBundle: " + sBundle);
+ "\tBundle: " + sBundle
+ "\tDescription: " + sBundle);
continue; // process next line in contents file
}
// look for a bundle name
String bundleMarker = "\tbundle:";
int bitstreamEndIndex = line.indexOf("\t");
int markerIndex = line.indexOf(bundleMarker);
if (markerIndex == -1)
if (bitstreamEndIndex == -1)
{
// no bundle found
processContentFileEntry(c, i, path, line, null);
// no extra info
processContentFileEntry(c, i, path, line, null, false);
System.out.println("\tBitstream: " + line);
}
else
{
// found bundle
String bundleName = line.substring(markerIndex
+ bundleMarker.length());
String bitstreamName = line.substring(0, markerIndex);
bitstreamName = bitstreamName.trim();
processContentFileEntry(c, i, path, bitstreamName,
bundleName);
System.out.println("\tBitstream: " + bitstreamName
+ "\tBundle: " + bundleName);
String bitstreamName = line.substring(0, bitstreamEndIndex);
boolean bundleExists = false;
boolean permissionsExist = false;
boolean descriptionExists = false;
// look for a bundle name
String bundleMarker = "\tbundle:";
int bMarkerIndex = line.indexOf(bundleMarker);
int bEndIndex = 0;
if (bMarkerIndex > 0)
{
bEndIndex = line.indexOf("\t", bMarkerIndex + 1);
if (bEndIndex == -1)
{
bEndIndex = line.length();
}
bundleExists = true;
}
// look for permissions
String permissionsMarker = "\tpermissions:";
int pMarkerIndex = line.indexOf(permissionsMarker);
int pEndIndex = 0;
if (pMarkerIndex > 0)
{
pEndIndex = line.indexOf("\t", pMarkerIndex + 1);
if (pEndIndex == -1)
{
pEndIndex = line.length();
}
permissionsExist = true;
}
// look for descriptions
String descriptionMarker = "\tdescription:";
int dMarkerIndex = line.indexOf(descriptionMarker);
int dEndIndex = 0;
if (dMarkerIndex > 0)
{
dEndIndex = line.indexOf("\t", dMarkerIndex + 1);
if (dEndIndex == -1)
{
dEndIndex = line.length();
}
descriptionExists = true;
}
// is this the primary bitstream?
String primaryBitstreamMarker = "\tprimary:true";
boolean primary = false;
String primaryStr = "";
if (line.contains(primaryBitstreamMarker))
{
primary = true;
primaryStr = "\t **Setting as primary bitstream**";
}
if (bundleExists)
{
String bundleName = line.substring(bMarkerIndex
+ bundleMarker.length(), bEndIndex).trim();
processContentFileEntry(c, i, path, bitstreamName, bundleName, primary);
System.out.println("\tBitstream: " + bitstreamName +
"\tBundle: " + bundleName +
primaryStr);
}
else
{
processContentFileEntry(c, i, path, bitstreamName, null, primary);
System.out.println("\tBitstream: " + bitstreamName + primaryStr);
}
if (permissionsExist || descriptionExists)
{
String extraInfo = bitstreamName;
if (permissionsExist)
{
extraInfo = extraInfo
+ line.substring(pMarkerIndex, pEndIndex);
}
if (descriptionExists)
{
extraInfo = extraInfo
+ line.substring(dMarkerIndex, dEndIndex);
}
options.add(extraInfo);
}
}
}
}
@@ -1060,11 +1258,22 @@ public class ItemImport
is.close();
}
}
return options;
}
// each entry represents a bitstream....
public void processContentFileEntry(Context c, Item i, String path,
String fileName, String bundleName) throws SQLException,
/**
* each entry represents a bitstream....
* @param c
* @param i
* @param path
* @param fileName
* @param bundleName
* @throws SQLException
* @throws IOException
* @throws AuthorizeException
*/
private void processContentFileEntry(Context c, Item i, String path,
String fileName, String bundleName, boolean primary) throws SQLException,
IOException, AuthorizeException
{
String fullpath = path + File.separatorChar + fileName;
@@ -1118,6 +1327,13 @@ public class ItemImport
BitstreamFormat bf = FormatIdentifier.guessFormat(c, bs);
bs.setFormat(bf);
// Is this a the primary bitstream?
if (primary)
{
targetBundle.setPrimaryBitstreamID(bs.getID());
targetBundle.update();
}
bs.update();
}
}
@@ -1134,7 +1350,7 @@ public class ItemImport
* @throws IOException
* @throws AuthorizeException
*/
public void registerBitstream(Context c, Item i, int assetstore,
private void registerBitstream(Context c, Item i, int assetstore,
String bitstreamPath, String bundleName )
throws SQLException, IOException, AuthorizeException
{
@@ -1191,72 +1407,261 @@ public class ItemImport
}
}
// XML utility methods
public String getAttributeValue(Node n, String myattributename)
/**
*
* Process the Options to apply to the Item. The options are tab delimited
*
* Options:
* 48217870-MIT.pdf permissions: -r 'MIT Users' description: Full printable version (MIT only)
* permissions:[r|w]-['group name']
* description: 'the description of the file'
*
* where:
* [r|w] (meaning: read|write)
* ['MIT Users'] (the group name)
*
* @param c
* @param myItem
* @param options
* @throws SQLException
* @throws AuthorizeException
*/
private void processOptions(Context c, Item myItem, Vector options)
throws SQLException, AuthorizeException
{
String myvalue = "";
for (int i = 0; i < options.size(); i++)
{
String line = options.elementAt(i).toString();
System.out.println("\tprocessing " + line);
boolean permissionsExist = false;
boolean descriptionExists = false;
String permissionsMarker = "\tpermissions:";
int pMarkerIndex = line.indexOf(permissionsMarker);
int pEndIndex = 0;
if (pMarkerIndex > 0)
{
pEndIndex = line.indexOf("\t", pMarkerIndex + 1);
if (pEndIndex == -1)
{
pEndIndex = line.length();
}
permissionsExist = true;
}
String descriptionMarker = "\tdescription:";
int dMarkerIndex = line.indexOf(descriptionMarker);
int dEndIndex = 0;
if (dMarkerIndex > 0)
{
dEndIndex = line.indexOf("\t", dMarkerIndex + 1);
if (dEndIndex == -1)
{
dEndIndex = line.length();
}
descriptionExists = true;
}
int bsEndIndex = line.indexOf("\t");
String bitstreamName = line.substring(0, bsEndIndex);
int actionID = -1;
String groupName = "";
Group myGroup = null;
if (permissionsExist)
{
String thisPermission = line.substring(pMarkerIndex
+ permissionsMarker.length(), pEndIndex);
// get permission type ("read" or "write")
int pTypeIndex = thisPermission.indexOf("-");
// get permission group (should be in single quotes)
int groupIndex = thisPermission.indexOf("'", pTypeIndex);
int groupEndIndex = thisPermission.indexOf("'", groupIndex + 1);
// if not in single quotes, assume everything after type flag is
// group name
if (groupIndex == -1)
{
groupIndex = thisPermission.indexOf(" ", pTypeIndex);
groupEndIndex = thisPermission.length();
}
groupName = thisPermission.substring(groupIndex + 1,
groupEndIndex);
if (thisPermission.toLowerCase().charAt(pTypeIndex + 1) == 'r')
{
actionID = Constants.READ;
}
else if (thisPermission.toLowerCase().charAt(pTypeIndex + 1) == 'w')
{
actionID = Constants.WRITE;
}
try
{
myGroup = Group.findByName(c, groupName);
}
catch (SQLException sqle)
{
System.out.println("SQL Exception finding group name: "
+ groupName);
// do nothing, will check for null group later
}
}
String thisDescription = "";
if (descriptionExists)
{
thisDescription = line.substring(
dMarkerIndex + descriptionMarker.length(), dEndIndex)
.trim();
}
Bitstream bs = null;
boolean notfound = true;
if (!isTest)
{
// find bitstream
Bitstream[] bitstreams = myItem.getNonInternalBitstreams();
for (int j = 0; j < bitstreams.length && notfound; j++)
{
if (bitstreams[j].getName().equals(bitstreamName))
{
bs = bitstreams[j];
notfound = false;
}
}
}
if (notfound && !isTest)
{
// this should never happen
System.out.println("\tdefault permissions set for "
+ bitstreamName);
}
else if (!isTest)
{
if (permissionsExist)
{
if (myGroup == null)
{
System.out.println("\t" + groupName
+ " not found, permissions set to default");
}
else if (actionID == -1)
{
System.out
.println("\tinvalid permissions flag, permissions set to default");
}
else
{
System.out.println("\tSetting special permissions for "
+ bitstreamName);
setPermission(c, myGroup, actionID, bs);
}
}
if (descriptionExists)
{
System.out.println("\tSetting description for "
+ bitstreamName);
bs.setDescription(thisDescription);
bs.update();
}
}
}
}
/**
* Set the Permission on a Bitstream.
*
* @param c
* @param g
* @param actionID
* @param bs
* @throws SQLException
* @throws AuthorizeException
*/
private void setPermission(Context c, Group g, int actionID, Bitstream bs)
throws SQLException, AuthorizeException
{
if (!isTest)
{
// remove the default policy
AuthorizeManager.removeAllPolicies(c, bs);
// add the policy
ResourcePolicy rp = ResourcePolicy.create(c);
rp.setResource(bs);
rp.setAction(actionID);
rp.setGroup(g);
rp.update();
}
else
{
if (actionID == Constants.READ)
{
System.out.println("\t\tpermissions: READ for " + g.getName());
}
else if (actionID == Constants.WRITE)
{
System.out.println("\t\tpermissions: WRITE for " + g.getName());
}
}
}
// XML utility methods
/**
* Lookup an attribute from a DOM node.
* @param n
* @param name
* @return
*/
private String getAttributeValue(Node n, String name)
{
NamedNodeMap nm = n.getAttributes();
for (int i = 0; i < nm.getLength(); i++)
{
Node node = nm.item(i);
String name = node.getNodeName();
String value = node.getNodeValue();
if (myattributename.equals(name))
if (name.equals(node.getNodeName()))
{
return value;
return node.getNodeValue();
}
}
return myvalue;
return "";
}
// XML utility methods stolen from administer.
/**
* Get the CDATA of a particular element. For example, if the XML document
* contains:
* <P>
* <code>
* &lt;foo&gt;&lt;mimetype&gt;application/pdf&lt;/mimetype&gt;&lt;/foo&gt;
* </code>
* passing this the <code>foo</code> node and <code>mimetype</code> will
* return <code>application/pdf</code>.
* </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
*
* @return the CDATA as a <code>String</code>
* Return the String value of a Node.
* @param node
* @return
*/
private String getElementData(Node parentElement, String childName)
throws TransformerException
private String getStringValue(Node node)
{
// Grab the child node
Node childNode = XPathAPI.selectSingleNode(parentElement, childName);
String value = node.getNodeValue();
if (childNode == null)
if (node.hasChildNodes())
{
// No child node, so no values
return null;
Node first = node.getFirstChild();
if (first.getNodeType() == Node.TEXT_NODE)
{
return first.getNodeValue();
}
// Get the #text
Node dataNode = childNode.getFirstChild();
if (dataNode == null)
{
return null;
}
// Get the data
String value = dataNode.getNodeValue().trim();
return value;
}
@@ -1276,4 +1681,31 @@ public class ItemImport
return builder.parse(new File(filename));
}
/**
* Delete a directory and its child files and directories
* @param path The directory to delete
* @return Whether the deletion was successful or not
*/
private static boolean deleteDirectory(File path)
{
if (path.exists())
{
File[] files = path.listFiles();
for (int i = 0; i < files.length; i++)
{
if (files[i].isDirectory())
{
deleteDirectory(files[i]);
}
else
{
files[i].delete();
}
}
}
boolean pathDeleted = path.delete();
return (pathDeleted);
}
}

View File

@@ -0,0 +1,110 @@
/*
* ActionManager.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* Container for UpdateActions
* 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
= new LinkedHashMap<Class<? extends UpdateAction>, UpdateAction>();
public UpdateAction getUpdateAction(Class<? extends UpdateAction> actionClass)
throws InstantiationException, IllegalAccessException
{
UpdateAction action = registry.get(actionClass);
if (action == null)
{
action = actionClass.newInstance();
registry.put(actionClass, action);
}
return action;
}
/**
*
* @return whether any actions have been registered with this manager
*/
public boolean hasActions()
{
return !registry.isEmpty();
}
/**
* This implementation guarantees the iterator order is the same as the order
* in which updateActions have been added
*
* @return iterator for UpdateActions
*/
public Iterator<UpdateAction> iterator()
{
return new Iterator<UpdateAction>()
{
private Iterator<Class<? extends UpdateAction>> itr = registry.keySet().iterator();
public boolean hasNext()
{
return itr.hasNext();
}
public UpdateAction next()
{
return registry.get(itr.next());
}
//not supported
public void remove()
{
throw new UnsupportedOperationException();
}
};
}
}

View File

@@ -0,0 +1,232 @@
/*
* AddBitstreamsAction.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;
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.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.core.Context;
import org.dspace.eperson.Group;
/**
* Action to add bitstreams listed in item contents file to the item in DSpace
*
*
*/
public class AddBitstreamsAction extends UpdateBitstreamsAction {
public AddBitstreamsAction()
{
//empty
}
/**
* Adds bitstreams from the archive as listed in the contents file.
*
* @param context
* @param ItemArchive
* @param isTest
* @param suppressUndo
* @throws IllegalArgumentException
* @throws ParseException
* @throws IOException
* @throws AuthorizeException
* @throws SQLException
*/
public void execute(Context context, ItemArchive itarch, boolean isTest, boolean suppressUndo)
throws IllegalArgumentException, 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())
{
ItemUpdate.pr("Contents is empty - no bitstreams to add");
return;
}
ItemUpdate.pr("Contents bitstream count: " + contents.size());
String[] files = dir.list(ItemUpdate.fileFilter);
List<String> fileList = new ArrayList<String>();
for (String filename : files)
{
fileList.add(filename);
ItemUpdate.pr("file: " + filename);
}
for (ContentsEntry ce : contents)
{
//validate match to existing file in archive
if (!fileList.contains(ce.filename))
{
throw new IllegalArgumentException("File listed in contents is missing: " + ce.filename);
}
}
//now okay to add
for (ContentsEntry ce : contents)
{
addBitstream(context, itarch, item, dir, ce, suppressUndo, isTest);
}
}
private void addBitstream(Context context, ItemArchive itarch, Item item, File dir,
ContentsEntry ce, boolean suppressUndo, boolean isTest)
throws IOException, IllegalArgumentException, SQLException, AuthorizeException, ParseException
{
ItemUpdate.pr("contents entry for bitstream: " + ce.toString());
File f = new File(dir, ce.filename);
// get an input stream
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(f));
Bitstream bs = null;
String newBundleName = ce.bundlename;
if (ce.bundlename == null) // should be required but default convention established
{
if (ce.filename.equals("license.txt"))
{
newBundleName = "LICENSE";
}
else
{
newBundleName = "ORIGINAL";
}
}
ItemUpdate.pr(" Bitstream " + ce.filename + " to be added to bundle: " + newBundleName);
if (!isTest)
{
// find the bundle
Bundle[] bundles = item.getBundles(newBundleName);
Bundle targetBundle = null;
if (bundles.length < 1)
{
// not found, create a new one
targetBundle = item.createBundle(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))
{
throw new IllegalArgumentException("Duplicate bundle + filename cannot be added: "
+ b.getName() + " + " + bsm.getName());
}
}
}
// select first bundle
targetBundle = bundles[0];
}
bs = targetBundle.createBitstream(bis);
bs.setName(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);
if (ce.description != null)
{
bs.setDescription(ce.description);
}
if ((ce.permissionsActionId != -1) && (ce.permissionsGroupName != null))
{
Group group = Group.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 (alterProvenance && !targetBundle.getName().equals("THUMBMNAIL")
&& !targetBundle.getName().equals("TEXT"))
{
DtoMetadata dtom = DtoMetadata.create("dc.description.provenance", "en", "");
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)
{
itarch.addUndoDeleteContents(bs.getID());
}
}
}
}

View File

@@ -0,0 +1,150 @@
/*
* AddMetadataAction.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.sql.SQLException;
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.core.Context;
/**
* Action to add metadata to item
*
*/
public class AddMetadataAction extends UpdateMetadataAction {
/**
* Adds metadata specified in the source archive
*
* @param context
* @param ItemArchive
* @param isTest
* @param suppressUndo
* @throws AuthorizeException
* @throws SQLException
*/
public void execute(Context context, ItemArchive itarch, boolean isTest, 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))
{
// 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);
boolean found = false;
for (DCValue dcv : ardcv)
{
if (dcv.value.equals(dtom.value))
{
found = true;
break;
}
}
if (found)
{
ItemUpdate.pr("Warning: No new metadata found to add to item " + dirname
+ " for element " + f);
}
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);
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);
if (foundField == null)
{
ItemUpdate.pr("ERROR: Metadata field: '" + dtom.schema + "." + dtom.element + "."
+ dtom.qualifier + "' not found in registry; found on item " + dirname);
}
}
}
else
{
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, dtom.value);
ItemUpdate.pr("Metadata added: " + dtom.toString());
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));
}
}
}
}
break; // don't need to check if this field matches any other target fields
}
}
}
}
}

View File

@@ -0,0 +1,80 @@
/*
* BitstreamFilter.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.io.IOException;
import java.util.Properties;
import java.io.InputStream;
import java.io.FileInputStream;
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 {
protected Properties props = null;
/**
* The filter method
*
* @param bitstream
* @return whether the bitstream matches the criteria
* @throws BitstreamFilterException
*/
public abstract boolean accept(Bitstream bitstream) throws BitstreamFilterException;
/**
*
* @param filepath - The complete path for the properties file
* @throws IOException
*/
public void initProperties(String filepath)
throws IOException
{
props = new Properties();
InputStream in = new FileInputStream(filepath);
props.load(in);
in.close();
}
}

View File

@@ -0,0 +1,96 @@
/*
* BitstreamFilterByBundleName.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.sql.SQLException;
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()
{
//empty
}
/**
* Filter bitstream based on bundle name found in properties file
*
* @param bitstream
* @throws BitstreamFilterException
* @returns whether bitstream is in bundle
*
*/
public boolean accept(Bitstream bitstream)
throws BitstreamFilterException
{
if (bundleName == null)
{
bundleName = props.getProperty("bundle");
if (bundleName == null)
{
throw new BitstreamFilterException("Property 'bundle' not found.");
}
}
try
{
Bundle[] bundles = bitstream.getBundles();
for (Bundle b : bundles)
{
if (b.getName().equals(bundleName))
{
return true;
}
}
}
catch(SQLException e)
{
throw new BitstreamFilterException(e);
}
return false;
}
}

View File

@@ -0,0 +1,80 @@
/*
* BitstreamFilterByFilename.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.util.regex.*;
import org.dspace.content.Bitstream;
/**
* BitstreamFilter implementation to filter by filename pattern
*
*/
public class BitstreamFilterByFilename extends BitstreamFilter {
private Pattern pattern;
private String filenameRegex;
public BitstreamFilterByFilename()
{
//empty
}
/**
* Tests bitstream by matching the regular expression in the
* properties against the bitstream name
*
* @returns whether bitstream name matches the regular expression
*/
public boolean accept(Bitstream bitstream) throws BitstreamFilterException
{
if (filenameRegex == null)
{
filenameRegex = props.getProperty("filename");
if (filenameRegex == null)
{
throw new BitstreamFilterException("BitstreamFilter property 'filename' not found.");
}
pattern = Pattern.compile(filenameRegex);
}
Matcher m = pattern.matcher(bitstream.getName());
return m.matches();
}
}

View File

@@ -0,0 +1,59 @@
/*
* BitstreamFilterException.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
/**
* Exception class for BitstreamFilters
*
*/
public class BitstreamFilterException extends Exception
{
private static final long serialVersionUID = 1L;
public BitstreamFilterException() {}
public BitstreamFilterException(String msg)
{
super(msg);
}
public BitstreamFilterException(Exception e)
{
super(e);
}
}

View File

@@ -0,0 +1,183 @@
/*
* ContentsEntry.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.text.ParseException;
import java.util.regex.*;
import org.dspace.core.Constants;
/**
* Holds the elements of a line in the Contents Entry file
*
* Based on private methods in ItemImport
*
* Lacking a spec or full documentation for the file format,
* it looks from the source code that the ordering or elements is not fixed
*
* e.g.:
* 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 static final String HDR_BUNDLE = "bundle:";
public static final String HDR_PERMISSIONS = "permissions:";
public static final String HDR_DESCRIPTION = "description:";
public static final Pattern permissionsPattern = Pattern.compile("-([rw])\\s*'?([^']+)'?");
final String filename;
final String bundlename;
final String permissionsGroupName;
final int permissionsActionId;
final String description;
private ContentsEntry(String filename,
String bundlename,
int permissionsActionId,
String permissionsGroupName,
String description)
{
this.filename = filename;
this.bundlename = bundlename;
this.permissionsActionId = permissionsActionId;
this.permissionsGroupName = permissionsGroupName;
this.description = description;
}
/**
* Factory method parses a line from the Contents Entry file
*
* @param line
* @return the parsed ContentsEntry object
* @throws ParseException
*/
public static ContentsEntry parse(String line)
throws ParseException
{
String[] ar = line.split("\t");
ItemUpdate.pr("ce line split: " + ar.length);
String[] arp = new String[4];
arp[0] = ar[0]; //bitstream name doesn't have header and is always first
String groupName = null;
int actionId = -1;
if (ar.length > 1)
{
for (int i=1; i < ar.length; i++)
{
ItemUpdate.pr("ce " + i + " : " + ar[i]);
if (ar[i].startsWith(HDR_BUNDLE))
{
arp[1] = ar[i].substring(HDR_BUNDLE.length()).trim();
}
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())
{
String action = m.group(1); //
if (action.equals("r"))
{
actionId = Constants.READ;
}
else if (action.equals("w"))
{
actionId = Constants.WRITE;
}
groupName = m.group(2).trim();
}
}
else if (ar[i].startsWith(HDR_DESCRIPTION))
{
arp[3] = ar[i].substring(HDR_DESCRIPTION.length()).trim();
}
else
{
throw new ParseException("Unknown text in contents file: " + ar[i], 0);
}
}
}
return new ContentsEntry(arp[0], arp[1], actionId, groupName, arp[3]);
}
public String toString()
{
StringBuilder sb = new StringBuilder(filename);
if (bundlename != null)
{
sb.append(HDR_BUNDLE).append(" ").append(bundlename);
}
if (permissionsGroupName != null)
{
sb.append(HDR_PERMISSIONS);
if (permissionsActionId == Constants.READ)
{
sb.append(" -r ");
}
else if (permissionsActionId == Constants.WRITE)
{
sb.append(" -w ");
}
sb.append(permissionsGroupName);
}
if (description != null)
{
sb.append(HDR_DESCRIPTION).append(" ").append(description);
}
return sb.toString();
}
}

View File

@@ -0,0 +1,143 @@
/*
* DeleteBitstreamsAction.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
import org.dspace.content.DCDate;
import org.dspace.content.Item;
import org.dspace.core.Context;
/**
* Action to delete bitstreams
*
* Undo not supported for this UpdateAction
*
* Derivatives of the bitstream to be deleted are not also deleted
*
*/
public class DeleteBitstreamsAction extends UpdateBitstreamsAction
{
/**
* Delete bitstream from item
*
* @param context
* @param ItemArchive
* @param isTest
* @param suppressUndo
* @throws IllegalArgumentException
* @throws ParseException
* @throws IOException
* @throws AuthorizeException
* @throws SQLException
*/
public void execute(Context context, ItemArchive itarch, boolean isTest, boolean suppressUndo)
throws IllegalArgumentException, IOException, SQLException, AuthorizeException, ParseException
{
File f = new File(itarch.getDirectory(), ItemUpdate.DELETE_CONTENTS_FILE);
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())
{
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)
{
ItemUpdate.pr("Bitstream not found by id: " + id);
}
else
{
Bundle[] bundles = bs.getBundles();
for (Bundle b : bundles)
{
if (isTest)
{
ItemUpdate.pr("Delete bitstream with id = " + id);
}
else
{
b.removeBitstream(bs);
ItemUpdate.pr("Deleted bitstream with id = " + id);
}
}
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];
ItemUpdate.pr("Append provenance with: " + append);
if (!isTest)
{
MetadataUtilities.appendMetadata(item, dtom, false, append);
}
}
}
}
catch(SQLException e)
{
ItemUpdate.pr("Error finding bitstream from id: " + id + " : " + e.toString());
}
}
}
}
}
}

View File

@@ -0,0 +1,159 @@
/*
* DeleteBitstreamsByFilterAction.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
import org.dspace.content.DCDate;
import org.dspace.content.Item;
import org.dspace.core.Context;
/**
* Action to delete bitstreams using a specified filter implementing BitstreamFilter
* Derivatives for the target bitstreams are not deleted.
*
* The dc.description.provenance field is amended to reflect the deletions
*
* Note: Multiple filters are impractical if trying to manage multiple properties files
* in a commandline environment
*
*
*/
public class DeleteBitstreamsByFilterAction extends UpdateBitstreamsAction {
private BitstreamFilter filter;
/**
* Set filter
*
* @param filter
*/
public void setBitstreamFilter(BitstreamFilter filter)
{
this.filter = filter;
}
/**
* Get filter
* @return filter
*/
public BitstreamFilter getBitstreamFilter()
{
return filter;
}
/**
* Delete bitstream
*
* @param context
* @param ItemArchive
* @param isTest
* @param suppressUndo
* @throws IllegalArgumentException
* @throws ParseException
* @throws IOException
* @throws AuthorizeException
* @throws SQLException
*/
public void execute(Context context, ItemArchive itarch, boolean isTest, boolean suppressUndo)
throws AuthorizeException, BitstreamFilterException, IOException, ParseException, SQLException
{
List<String> deleted = new ArrayList<String>();
Item item = itarch.getItem();
Bundle[] bundles = item.getBundles();
for (Bundle b : bundles)
{
Bitstream[] bitstreams = b.getBitstreams();
String bundleName = b.getName();
for (Bitstream bs : bitstreams)
{
if (filter.accept(bs))
{
if (isTest)
{
ItemUpdate.pr("Delete from bundle " + bundleName + " bitstream " + bs.getName()
+ " with id = " + bs.getID());
}
else
{
//provenance is not maintained for derivative bitstreams
if (!bundleName.equals("THUMBMNAIL") && !bundleName.equals("TEXT"))
{
deleted.add(bs.getName());
}
b.removeBitstream(bs);
ItemUpdate.pr("Deleted " + bundleName + " bitstream " + bs.getName()
+ " with id = " + bs.getID());
}
}
}
}
if (alterProvenance && !deleted.isEmpty())
{
StringBuilder sb = new StringBuilder(" Bitstreams deleted on ");
sb.append(DCDate.getCurrent()).append(": ");
for (String s : deleted)
{
sb.append(s).append(", ");
}
DtoMetadata dtom = DtoMetadata.create("dc.description.provenance", "en", "");
ItemUpdate.pr("Append provenance with: " + sb.toString());
if (!isTest)
{
MetadataUtilities.appendMetadata(item, dtom, false, sb.toString());
}
}
}
}

View File

@@ -0,0 +1,94 @@
/*
* DeleteMetadataAction.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.text.ParseException;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DCValue;
import org.dspace.content.Item;
import org.dspace.core.Context;
/**
* Action to delete metadata
*
*
*/
public class DeleteMetadataAction extends UpdateMetadataAction {
/**
* Delete metadata from item
*
* @param context
* @param ItemArchive
* @param isTest
* @param suppressUndo
* @throws ParseException
* @throws AuthorizeException
*/
public void execute(Context context, ItemArchive itarch, boolean isTest, boolean suppressUndo)
throws AuthorizeException, ParseException
{
Item item = itarch.getItem();
for (String f : targetFields)
{
DtoMetadata dummy = DtoMetadata.create(f, Item.ANY, "");
DCValue[] ardcv = item.getMetadata(f);
ItemUpdate.pr("Metadata to be deleted: ");
for (DCValue 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));
}
}
item.clearMetadata(dummy.schema, dummy.element, dummy.qualifier, Item.ANY);
}
}
}
}

View File

@@ -0,0 +1,54 @@
/*
* DerivativeTextBitstreamFilter.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.util.Properties;
/**
* Bitstream filter to delete from TEXT bundle
*
*/
public class DerivativeTextBitstreamFilter extends BitstreamFilterByBundleName {
public DerivativeTextBitstreamFilter()
{
props = new Properties();
props.setProperty("bundle", "TEXT");
}
}

View File

@@ -0,0 +1,186 @@
/*
* DtoMetadata.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.text.ParseException;
import org.dspace.content.Item;
/**
* A data transfer object class enhancement of org.dspace.content.DCValue, which is deprecated
* Name intended to not conflict with DSpace API classes for similar concepts but not usable in this context
*
* Adds some utility methods
*
* Really not at all general enough but supports Dublin Core and the compound form notation <schema>.<element>[.<qualifier>]
*
* Does not support wildcard for qualifier
*
*
*/
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)
{
this.schema = schema;
this.element = element;
this.qualifier = qualifier;
this.language = language;
this.value = value;
}
/**
* 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
* @return DtoMetadata object
*/
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("")))
{
throw new IllegalArgumentException("Invalid qualifier: " + qualifier);
}
return new DtoMetadata(schema, element, qualifier, language, value);
}
/**
* Factory method to create metadata object
*
*
* @param compoundForm of the form <schema>.<element>[.<qualifier>]
* @param language null or empty
* @param value
*/
public static DtoMetadata create(String compoundForm, String language, String value)
throws ParseException, IllegalArgumentException
{
String[] ar = MetadataUtilities.parseCompoundForm(compoundForm);
String qual = null;
if (ar.length > 2)
{
qual = ar[2];
}
return create(ar[0], ar[1], qual, language, value);
}
/**
* 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)
{
String[] ar = compoundForm.split("\\s*\\.\\s*"); //MetadataUtilities.parseCompoundForm(compoundForm);
if ((ar.length < 2) || (ar.length > 3))
{
return false;
}
if (!this.schema.equals(ar[0]) || !this.element.equals(ar[1]))
{
return false;
}
if (ar.length == 2)
{
if (this.qualifier != null)
{
return false;
}
}
if (ar.length == 3)
{
if (this.qualifier == null)
{
return false;
}
if (wildcard && ar[2].equals(Item.ANY))
{
return true;
}
if (!this.qualifier.equals(ar[2]))
{
return false;
}
}
return true;
}
public String toString()
{
String s = "\tSchema: " + schema + " Element: " + element;
if (qualifier != null)
{
s+= " Qualifier: " + qualifier;
}
s+= " Language: " + ((language == null) ? "[null]" : language);
s += " Value: " + value;
return s;
}
public String getValue()
{
return value;
}
}

View File

@@ -0,0 +1,354 @@
/*
* ItemArchive.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
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.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerConfigurationException;
import org.dspace.storage.rdbms.DatabaseManager;
import org.dspace.content.ItemIterator;
import org.dspace.storage.rdbms.TableRowIterator;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.core.Context;
import org.dspace.handle.HandleManager;
import org.w3c.dom.Document;
/**
* Encapsulates the Item in the context of the DSpace Archive Format
*
*/
public class ItemArchive {
static public final String DUBLIN_CORE_XML = "dublin_core.xml";
private static DocumentBuilder builder = null;
private static Transformer transformer = null;
private List<DtoMetadata> dtomList = null;
private List<DtoMetadata> undoDtomList = new ArrayList<DtoMetadata>();
private List<Integer> undoAddContents = new ArrayList<Integer>(); // for undo of add
private Item item;
private File dir; // directory name in source archive for this item
private String dirname; //convenience
//constructors
private ItemArchive()
{
// nothing
}
/** factory method
*
* Minimal requirements for dublin_core.xml for this application
* is the presence of dc.identifier.uri
* which must contain the handle for the item
*
* @param context - The DSpace context
* @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
*
*/
public static ItemArchive create(Context context, File dir, String itemField)
throws Exception
{
ItemArchive itarch = new ItemArchive();
itarch.dir = dir;
itarch.dirname = dir.getName();
InputStream is = new FileInputStream(new File(dir, DUBLIN_CORE_XML));
itarch.dtomList = MetadataUtilities.loadDublinCore(getDocumentBuilder(), is);
ItemUpdate.pr("Loaded metadata with " + itarch.dtomList.size() + " fields");
if (itemField == null)
{
itarch.item = itarch.itemFromHandleInput(context); // sets the item instance var and seeds the undo list
}
else
{
itarch.item = itarch.itemFromMetadataField(context, itemField);
}
if (itarch.item == null)
{
throw new Exception("Item not instantiated: " + itarch.dirname);
}
ItemUpdate.prv("item instantiated: " + itarch.item.getHandle());
return itarch;
}
private static DocumentBuilder getDocumentBuilder()
throws ParserConfigurationException
{
if (builder == null)
{
builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
}
return builder;
}
private static Transformer getTransformer()
throws TransformerConfigurationException
{
if (transformer == null)
{
transformer = TransformerFactory.newInstance().newTransformer();
}
return transformer;
}
/**
* Getter for the DSpace item referenced in the archive
* @return DSpace item
*/
public Item getItem()
{
return item;
}
/**
* Getter for directory in archive on disk
* @return directory in archive
*/
public File getDirectory()
{
return dir;
}
/**
* Getter for directory name in archive
* @return directory name in archive
*/
public String getDirectoryName()
{
return dirname;
}
/**
* Add metadata field to undo list
* @param 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()
{
return dtomList;
}
/**
* Add bitstream id to delete contents file
* @param bitstreamId
*/
public void addUndoDeleteContents(int bitstreamId)
{
this.undoAddContents.add(bitstreamId);
}
/**
* Obtain item from DSpace based on handle
* This is the default implementation
* that uses the dc.identifier.uri metadatafield
* that contains the item handle as its value
*
*/
private Item itemFromHandleInput(Context context)
throws SQLException, Exception
{
DtoMetadata dtom = getMetadataField("dc.identifier.uri");
if (dtom == null)
{
throw new Exception("No dc.identier.uri field found for handle");
}
this.addUndoMetadataField(dtom); //seed the undo list with the uri
String uri = dtom.value;
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)
{
item = (Item) dso;
}
else
{
ItemUpdate.pr("Warning: item not instantiated");
throw new IllegalArgumentException("Item " + handle + " not instantiated.");
}
return item;
}
/**
* 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
*/
private Item itemFromMetadataField(Context context, String itemField)
throws SQLException, AuthorizeException, Exception
{
DtoMetadata dtom = getMetadataField(itemField);
Item item = 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);
int count = 0;
while (itr.hasNext())
{
item = itr.next();
count++;
}
itr.close();
ItemUpdate.prv("items matching = " + count );
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))
{
return dtom;
}
}
return null;
}
/**
* write undo directory and files to Disk in archive format
*
*
* @param undoDir - the root directory of the undo archive
*/
public void writeUndo(File undoDir)
throws IOException, ParserConfigurationException, TransformerConfigurationException,
TransformerException, FileNotFoundException
{
// create directory for item
File dir = new File(undoDir, dirname);
dir.mkdir();
OutputStream 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)
{
PrintWriter pw = null;
try
{
File f = new File(dir, ItemUpdate.DELETE_CONTENTS_FILE);
pw = new PrintWriter(new BufferedWriter(new FileWriter(f)));
for (Integer i : undoAddContents)
{
pw.println(i);
}
}
finally
{
pw.close();
}
}
}
} //end class

View File

@@ -0,0 +1,642 @@
/*
* ItemUpdate.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
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.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
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.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
/**
*
* Provides some batch editing capabilities for items in DSpace:
* Metadata fields - Add, Delete
* Bitstreams - Add, Delete
*
* The design has been for compatibility with ItemImporter
* in the use of the DSpace archive format which is used to
* specify changes on a per item basis. The directory names
* to correspond to each item are arbitrary and will only be
* used for logging purposes. The reference to the item is
* from a required dc.identifier with the item handle to be
* included in the dublin_core.xml (or similar metadata) file.
*
* Any combination of these actions is permitted in a single run of this class
* The order of actions is important when used in combination.
* It is the responsibility of the calling class (here, ItemUpdate)
* to register UpdateAction classes in the order to which they are
* to be performed.
*
*
* It is unfortunate that so much code needs to be borrowed
* from ItemImport as it is not reusable in private methods, etc.
* 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 {
static public String SUPPRESS_UNDO_FILENAME = "suppress_undo";
static public final String CONTENTS_FILE = "contents";
static public final String DELETE_CONTENTS_FILE = "delete_contents";
static public String HANDLE_PREFIX = null;
static public Map<String, String> filterAliases = new HashMap<String, String>();
static public boolean verbose = false;
static
{
filterAliases.put("ORIGINAL", "org.dspace.app.itemupdate.OriginalBitstreamFilter");
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)
{
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)
{
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;
/**
*
* @param argv
*/
public static void main(String[] argv)
{
// create an options object and populate it
CommandLineParser parser = new PosixParser();
Options options = new Options();
//processing basis for detemining items
//item-specific changes with metadata in source directory with dublic_core.xml files
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("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");
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("F", "filter-properties", true, "filter class name; only for deleting bitstream");
options.addOption("v", "verbose", false, "verbose logging");
//special run states
options.addOption("t", "test", false, "test run - do not actually import items");
options.addOption("P", "provenance", false, "suppress altering provenance field for bitstream changes");
options.addOption("h", "help", false, "help");
int status = 0;
boolean isTest = false;
boolean alterProvenance = true;
String itemField = null;
String metadataIndexName = null;
Context context = null;
ItemUpdate iu = new ItemUpdate();
try
{
CommandLine line = parser.parse(options, argv);
if (line.hasOption('h'))
{
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("ItemUpdate", options);
pr("");
pr("Examples:");
pr(" adding metadata: ItemUpdate -e jsmith@mit.edu -s sourcedir -a dc.contributor -a dc.subject ");
pr(" deleting metadata: ItemUpdate -e jsmith@mit.edu -s sourcedir -d dc.description.other");
pr(" adding bitstreams: ItemUpdate -e jsmith@mit.edu -s sourcedir -A -i dc.identifier");
pr(" deleting bitstreams: ItemUpdate -e jsmith@mit.edu -s sourcedir -D ORIGINAL ");
pr("");
System.exit(0);
}
if (line.hasOption('v'))
{
verbose = true;
}
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
{
pr("Missing source archive option");
System.exit(1);
}
String sourcedir = line.getOptionValue('s');
if (line.hasOption('t')) //test
{
isTest = true;
pr("**Test Run** - not actually updating items.");
}
if (line.hasOption('i'))
{
itemField = line.getOptionValue('i');
}
if (line.hasOption('d'))
{
String[] targetFields = line.getOptionValues('d');
DeleteMetadataAction delMetadataAction = (DeleteMetadataAction) iu.actionMgr.getUpdateAction(DeleteMetadataAction.class);
delMetadataAction.addTargetFields(targetFields);
//undo is an add
for (String field : targetFields)
{
iu.undoActionList.add(" -a " + field + " ");
}
pr("Delete metadata for fields: ");
for (String s : targetFields)
{
pr(" " + s);
}
}
if (line.hasOption('a'))
{
String[] targetFields = line.getOptionValues('a');
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)
{
iu.undoActionList.add(" -d " + field + " ");
}
for (String field : targetFields)
{
iu.undoActionList.add(" -a " + field + " ");
}
pr("Add metadata for fields: ");
for (String s : targetFields)
{
pr(" " + s);
}
}
if (line.hasOption('D')) // undo not supported
{
pr("Delete bitstreams ");
String[] filterNames = line.getOptionValues('D');
if ((filterNames != null) && (filterNames.length > 1))
{
pr("Error: Only one filter can be a used at a time.");
System.exit(1);
}
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);
delAction.setAlterProvenance(alterProvenance);
}
else
{
// check if param is on ALIAS list
String filterClassname = filterAliases.get(filterName);
if (filterClassname == null)
{
filterClassname = filterName;
}
BitstreamFilter filter = null;
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)
{
pr("Error: Failure instantiating bitstream filter class: " + filterClassname);
System.exit(1);
}
String filterPropertiesName = line.getOptionValue('F');
if (filterPropertiesName != null) //not always required
{
try
{
// TODO try multiple relative locations, e.g. source dir
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);
System.exit(1);
}
}
DeleteBitstreamsByFilterAction delAction =
(DeleteBitstreamsByFilterAction) iu.actionMgr.getUpdateAction(DeleteBitstreamsByFilterAction.class);
delAction.setAlterProvenance(alterProvenance);
delAction.setBitstreamFilter(filter);
//undo not supported
}
}
if (line.hasOption('A'))
{
pr("Add bitstreams ");
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())
{
pr("Error - an action must be specified");
System.exit(1);
}
else
{
pr("Actions to be performed: ");
for (UpdateAction ua : iu.actionMgr)
{
pr(" " + ua.getClass().getName());
}
}
pr("ItemUpdate - initializing run on " + (new Date()).toString());
context = new Context();
iu.setEPerson(context, iu.eperson);
context.setIgnoreAuthorization(true);
HANDLE_PREFIX = ConfigurationManager.getProperty("handle.canonical.prefix");
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())
{
context.abort();
context.setIgnoreAuthorization(false);
}
e.printStackTrace();
pr(e.toString());
status = 1;
}
if (isTest)
{
pr("***End of Test Run***");
}
else
{
pr("End.");
}
System.exit(status);
}
private void processArchive(Context context, String sourceDirPath, String itemField,
String metadataIndexName, boolean alterProvenance, boolean isTest)
throws Exception
{
// open and process the source directory
File sourceDir = new File(sourceDirPath);
if ((sourceDir == null) || !sourceDir.exists() || !sourceDir.isDirectory())
{
pr("Error, cannot open archive source directory " + sourceDirPath);
throw new Exception("error with archive source directory " + sourceDirPath);
}
String[] dircontents = sourceDir.list(directoryFilter); //just the names, not the path
Arrays.sort(dircontents);
//Undo is suppressed to prevent undo of undo
boolean suppressUndo = false;
File fSuppressUndo = new File(sourceDir, SUPPRESS_UNDO_FILENAME);
if (fSuppressUndo.exists())
{
suppressUndo = true;
}
File undoDir = null; //sibling directory of source archive
if (!suppressUndo && !isTest)
{
undoDir = initUndoArchive(sourceDir);
}
int itemCount = 0;
int successItemCount = 0;
for (String dirname : dircontents)
{
itemCount++;
pr("");
pr("processing item " + dirname);
try
{
ItemArchive itarch = ItemArchive.create(context, new File(sourceDir, dirname), itemField);
for (UpdateAction action : actionMgr)
{
pr("action: " + action.getClass().getName());
action.execute(context, itarch, isTest, suppressUndo);
if (!isTest)
{
if (!suppressUndo)
{
itarch.writeUndo(undoDir);
}
}
}
if (!isTest)
{
Item item = itarch.getItem();
item.update(); //need to update before commit
context.commit();
item.decache();
}
ItemUpdate.pr("Item " + dirname + " completed");
successItemCount++;
}
catch(Exception e)
{
pr("Exception processing item " + dirname + ": " + e.toString());
}
}
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)
{
sb.append(" -i ").append(itemField);
}
if (!alterProvenance)
{
sb.append(" -P ");
}
if (isTest)
{
sb.append(" -t ");
}
for (String actionOption : undoActionList)
{
sb.append(actionOption);
}
PrintWriter pw = null;
try
{
File cmdFile = new File (undoDir.getParent(), undoDir.getName() + "_command.sh");
pw = new PrintWriter(new BufferedWriter(new FileWriter(cmdFile)));
pw.println(sb.toString());
}
finally
{
pw.close();
}
}
pr("");
pr("Done processing. Successful items: " + successItemCount + " of " + itemCount + " items in source archive");
pr("");
}
/**
*
* 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
*/
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");
}
String sourceDirName = sourceDir.getName();
int seqNo = 1;
File undoDir = new File(parentDir, "undo_" + sourceDirName + "_" + seqNo);
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 ");
}
//Undo is suppressed to prevent undo of undo
File fSuppressUndo = new File(undoDir, ItemUpdate.SUPPRESS_UNDO_FILENAME);
try
{
fSuppressUndo.createNewFile();
}
catch(IOException e)
{
pr("ERROR creating Suppress Undo File " + e.toString());
throw e;
}
return undoDir;
}
//private void write
private 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."); }
EPerson myEPerson = null;
if (eperson.indexOf('@') != -1)
{
// @ sign, must be an email
myEPerson = EPerson.findByEmail(context, eperson);
}
else
{
myEPerson = EPerson.find(context, Integer.parseInt(eperson));
}
if (myEPerson == null)
{
pr("Error, eperson cannot be found: " + eperson);
throw new Exception("Invalid EPerson");
}
context.setCurrentUser(myEPerson);
}
/**
* 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
*/
static void pr(String s)
{
System.out.println(s);
}
/**
* print if verbose flag is set
* @param s
*/
static void prv(String s)
{
if (verbose)
{
System.out.println(s);
}
}
} //end of class

View File

@@ -0,0 +1,561 @@
/*
* MetadataUtilities.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
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.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;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.apache.xpath.XPathAPI;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
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
* which might have general utility outside of the specific use
* in context in ItemUpdate.
*
* The XML methods were based on those in ItemImport
*
*
*/
public class MetadataUtilities {
/**
*
* Working around Item API to delete a value-specific DCValue
* 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 -
*
* @return true if metadata field is found with matching value and was deleted
*/
public static boolean deleteMetadataByValue(Item item, DtoMetadata dtom, boolean isLanguageStrict)
{
DCValue[] 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);
}
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))
{
found = true;
}
else
{
vals.add(dcv.value);
}
}
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);
}
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals.toArray(new String[0]));
}
return found;
}
/**
* Append text to value metadata field to item
*
* @param item
* @param dtom
* @param isLanguageStrict
* @param textToAppend
* @throws IllegalArgumentException - When target metadata field is not found
*/
public static void appendMetadata(Item item, DtoMetadata dtom, boolean isLanguageStrict,
String textToAppend)
throws IllegalArgumentException
{
DCValue[] 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 (ar.length == 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
{
// 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);
}
}
if (isLanguageStrict)
{
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language);
}
else
{
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
}
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals.toArray(new String[0]));
}
/**
* Modification of method from ItemImporter.loadDublinCore
* as a Factory method
*
* @param docBuilder -
* @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
*/
public static List<DtoMetadata> loadDublinCore(DocumentBuilder docBuilder, InputStream is)
throws SQLException, IOException, ParserConfigurationException,
SAXException, TransformerException, AuthorizeException
{
Document document = docBuilder.parse(is);
List<DtoMetadata> dtomList = new ArrayList<DtoMetadata>();
// Get the schema, for backward compatibility we will default to the
// dublin core schema if the schema name is not available in the import file
String schema = null;
NodeList metadata = XPathAPI.selectNodeList(document, "/dublin_core");
Node schemaAttr = metadata.item(0).getAttributes().getNamedItem("schema");
if (schemaAttr == null)
{
schema = MetadataSchema.DC_SCHEMA;
}
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++)
{
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)
{
value = "";
}
String element = getAttributeValue(n, "element");
if (element != null)
{
element = element.trim();
}
String qualifier = getAttributeValue(n, "qualifier");
if (qualifier != null)
{
qualifier = qualifier.trim();
}
String language = getAttributeValue(n, "language");
if (language != null)
{
language = language.trim();
}
if (qualifier.equals("none") || "".equals(qualifier))
{
qualifier = null;
}
// a goofy default, but consistent with DSpace treatment elsewhere
if (language == null)
{
language = "en";
}
else if (language.equals(""))
{
language = ConfigurationManager.getProperty("default.language");
}
DtoMetadata dtom = DtoMetadata.create(schema, element, qualifier, language, value);
ItemUpdate.pr(dtom.toString());
dtomList.add(dtom);
}
return dtomList;
}
/**
* Write dublin_core.xml
*
* @param docBuilder
* @param dtomList
* @return xml document
* @throws ParserConfigurationException
* @throws TransformerConfigurationException
* @throws TransformerException
*/
public static Document writeDublinCore(DocumentBuilder docBuilder, List<DtoMetadata> dtomList)
throws ParserConfigurationException, TransformerConfigurationException, TransformerException
{
Document doc = docBuilder.newDocument();
Element root = doc.createElement("dublin_core");
doc.appendChild(root);
for (DtoMetadata dtom : dtomList)
{
Element mel = doc.createElement("dcvalue");
mel.setAttribute("element", dtom.element);
if (dtom.qualifier == null)
{
mel.setAttribute("qualifier", "none");
}
else
{
mel.setAttribute("qualifier", dtom.qualifier);
}
if ((dtom.language == null) || (dtom.language.equals("")))
{
mel.setAttribute("language", "en");
}
else
{
mel.setAttribute("language", dtom.language);
}
mel.setTextContent(dtom.value);
root.appendChild(mel);
}
return doc;
}
/**
* write xml document to output stream
* @param doc
* @param transformer
* @param out
* @throws IOException
* @throws TransformerException
*/
public static void writeDocument(Document doc, Transformer transformer, OutputStream out)
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
*/
private static String getAttributeValue(Node n, String name)
{
NamedNodeMap nm = n.getAttributes();
for (int i = 0; i < nm.getLength(); i++)
{
Node node = nm.item(i);
if (name.equals(node.getNodeName()))
{
return node.getNodeValue();
}
}
return "";
}
/**
* Return the String value of a Node.
* @param node
* @return
*/
private static String getStringValue(Node node)
{
String value = node.getNodeValue();
if (node.hasChildNodes())
{
Node first = node.getFirstChild();
if (first.getNodeType() == Node.TEXT_NODE)
{
return first.getNodeValue();
}
}
return value;
}
/**
* 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
*/
public static List<ContentsEntry> readContentsFile(File f)
throws FileNotFoundException, IOException, ParseException
{
List<ContentsEntry> list = new ArrayList<ContentsEntry>();
BufferedReader in = null;
try
{
in = new BufferedReader(new FileReader(f));
String line = null;
while ((line = in.readLine()) != null)
{
line = line.trim();
if ("".equals(line))
{
continue;
}
ItemUpdate.pr("Contents entry: " + line);
list.add(ContentsEntry.parse(line));
}
}
finally
{
try
{
in.close();
}
catch(IOException e)
{
//skip
}
}
return list;
}
/**
*
* @param f
* @return
* @throws FileNotFoundException
* @throws IOException
*/
public static List<Integer> readDeleteContentsFile(File f)
throws FileNotFoundException, IOException
{
List<Integer> list = new ArrayList<Integer>();
BufferedReader in = null;
try
{
in = new BufferedReader(new FileReader(f));
String line = null;
while ((line = in.readLine()) != null)
{
line = line.trim();
if ("".equals(line))
{
continue;
}
int n = 0;
try
{
n = Integer.parseInt(line);
list.add(n);
}
catch(NumberFormatException e)
{
ItemUpdate.pr("Error reading delete contents line:" + e.toString());
}
}
}
finally
{
try
{
in.close();
}
catch(IOException e)
{
//skip
}
}
return list;
}
/**
* Get display of DCValue
*
* @param dcv
* @return string displaying elements of the DCValue
*/
public static String getDCValueString(DCValue dcv)
{
return "schema: " + dcv.schema + "; element: " + dcv.element + "; qualifier: " + dcv.qualifier +
"; language: " + dcv.language + "; value: " + dcv.value;
}
/**
*
* @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)
{
StringBuilder sb = new StringBuilder();
sb.append(schema).append(".").append(element);
if (qualifier != null)
{
sb.append(".").append(qualifier);
}
return sb.toString();
}
/**
* Parses metadata field given in the form <schema>.<element>[.<qualifier>|.*]
* checks for correct number of elements (2 or 3) and for empty strings
*
* @return String Array
* @throws ParseException if validity checks fail
*
*/
public static String[] parseCompoundForm(String compoundForm)
throws ParseException
{
String[] ar = compoundForm.split("\\s*\\.\\s*"); //trim ends
if (ar[0].equals(""))
{
throw new ParseException("schema is empty string: " + compoundForm, 0);
}
if ((ar.length < 2) || (ar.length > 3) || ar[1].equals(""))
{
throw new ParseException("element is malformed or empty string: " + compoundForm, 0);
}
return ar;
}
}

View File

@@ -0,0 +1,85 @@
/*
* OriginalBitstreamFilter.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.sql.SQLException;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
/**
* Filter all bitstreams in the ORIGINAL bundle
* Also delete all derivative bitstreams, i.e.
* all bitstreams in the TEXT and THUMBNAIL bundles
*/
public class OriginalBitstreamFilter extends BitstreamFilterByBundleName
{
public OriginalBitstreamFilter()
{
//empty
}
/**
* Tests bitstreams for containment in an ORIGINAL bundle
*
* @returns true if the bitstream is in the ORIGINAL bundle
*
* @throws BitstreamFilterException
*/
public boolean accept(Bitstream bitstream)
throws BitstreamFilterException
{
try
{
Bundle[] bundles = bitstream.getBundles();
for (Bundle b : bundles)
{
if (b.getName().equals("ORIGINAL"))
{
return true;
}
}
}
catch(SQLException e)
{
throw new BitstreamFilterException(e);
}
return false;
}
}

View File

@@ -0,0 +1,89 @@
/*
* OriginalWithDerivativesBitstreamFilter.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.sql.SQLException;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
/**
* Filter all bitstreams in the ORIGINAL 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 OriginalWithDerivativesBitstreamFilter()
{
//empty
}
/**
* Tests bitstream for membership in specified bundles (ORIGINAL, TEXT, THUMBNAIL)
*
* @param bitstream
* @throws BitstreamFilterException
* @returns true if bitstream is in specified bundles
*/
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))
{
return true;
}
}
}
}
catch(SQLException e)
{
throw new BitstreamFilterException(e);
}
return false;
}
}

View File

@@ -0,0 +1,54 @@
/*
* ThumbnailBitstreamFilter.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.util.Properties;
/**
* Bitstream filter targetting the THUMBNAIL bundle
*
*/
public class ThumbnailBitstreamFilter extends BitstreamFilterByBundleName {
public ThumbnailBitstreamFilter()
{
props = new Properties();
props.setProperty("bundle", "THUMBNAIL");
}
}

View File

@@ -0,0 +1,60 @@
/*
* UpdateAction.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import org.dspace.core.Context;
/**
* Interface for actions to update an item
*
*/
public interface UpdateAction
{
/**
* Action to update item
*
* @param context
* @param itarch
* @param isTest
* @param suppressUndo
* @throws Exception
*/
public void execute(Context context, ItemArchive itarch, boolean isTest, boolean suppressUndo)
throws Exception;
}

View File

@@ -0,0 +1,69 @@
/*
* UpdateBitstreamsAction.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
/**
* Base class for Bitstream actions
*
*
*/
public abstract class UpdateBitstreamsAction implements UpdateAction {
protected boolean alterProvenance = true;
/**
* Set variable to indicate that the dc.description.provenance field may
* be changed as a result of Bitstream changes by ItemUpdate
* @param 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()
{
return alterProvenance;
}
}

View File

@@ -0,0 +1,100 @@
/*
* UpdateMetadataAction.java
*
* Version: $Revision: 3984 $
*
* Date: $Date: 2009-06-29 22:33:25 -0400 (Mon, 29 Jun 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.itemupdate;
import java.util.HashSet;
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> )
* 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 {
protected Set<String> targetFields = new HashSet<String>();
/**
* Get target fields
*
* @return set of fields to update
*/
public Set<String> getTargetFields() {
return targetFields;
}
/**
* Set target fields
*
* @param targetFields
*/
public void addTargetFields(Set<String> targetFields) {
for (String tf : targetFields)
{
this.targetFields.add(tf);
}
}
/**
* Add array of target fields to update
* @param targetFields
*/
public void addTargetFields(String[] targetFields) {
for (String tf : targetFields)
{
this.targetFields.add(tf);
}
}
/**
* Add single field to update
*
* @param targetField
*/
public void addTargetField(String targetField) {
this.targetFields.add(targetField);
}
}

View File

@@ -0,0 +1,285 @@
/*
* ScriptLauncher.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, Duraspace. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Duraspace nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.launcher;
import org.dspace.core.ConfigurationManager;
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.
*
* @author Stuart Lewis
* @author Mark Diggory
*/
public class ScriptLauncher
{
/** The service manager kernel */
private static transient DSpaceKernelImpl kernelImpl;
/**
* Execute the DSpace script launcher
*
* @param args Any parameters required to be passed to the scripts it executes
* @throws Exception
*/
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);
}
// Initalise the service manager kernel
try {
kernelImpl = DSpaceKernelInit.getKernel(null);
if (!kernelImpl.isRunning())
{
kernelImpl.start(ConfigurationManager.getProperty("dspace.dir"));
}
} catch (Exception e)
{
// Failed to start so destroy it and log and throw an exception
try
{
kernelImpl.destroy();
}
catch (Exception e1)
{
// Nothing to do
}
String message = "Failure during filter init: " + e.getMessage();
System.err.println(message + ":" + e);
throw new RuntimeException(message, e);
}
// Parse the configuration file looking for the command entered
Document doc = getConfig();
String request = args[0];
Element root = doc.getRootElement();
List<Element> commands = root.getChildren("command");
for (Element command : commands)
{
if (request.equalsIgnoreCase(command.getChild("name").getValue()))
{
// Run each step
List<Element> steps = command.getChildren("step");
for (Element step : steps)
{
// Instantiate the class
Class target = null;
String className = step.getChild("class").getValue();
try
{
target = Class.forName(className,
true,
Thread.currentThread().getContextClassLoader());
}
catch (ClassNotFoundException e)
{
System.err.println("Error in launcher.xml: Invalid class name: " + className);
System.exit(1);
}
// Strip the leading argument from the args, and add the arguments
// Set <passargs>false</passargs> if the arguments should not be passed on
String[] useargs = args.clone();
Class[] argTypes = {useargs.getClass()};
boolean passargs = true;
if ((step.getAttribute("passuserargs") != null) &&
("false".equalsIgnoreCase(step.getAttribute("passuserargs").getValue())))
{
passargs = false;
}
if ((args.length == 1) || (!passargs))
{
useargs = new String[0];
}
else
{
String[] argsnew = new String[useargs.length - 1];
for (int i = 1; i < useargs.length; i++)
{
argsnew[i - 1] = useargs[i];
}
useargs = argsnew;
}
// Add any extra properties
List<Element> bits = step.getChildren("argument");
if (step.getChild("argument") != null)
{
String[] argsnew = new String[useargs.length + bits.size()];
int i = 0;
for (Element arg : bits)
{
argsnew[i++] = arg.getValue();
}
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);
if (requestService == null) {
throw new IllegalStateException("Could not get the DSpace RequestService to start the request transaction");
}
// Establish a request related to the current session
// that will trigger the various request listeners
requestService.startRequest();
// Run the main() method
try
{
Object[] arguments = {useargs};
// Useful for debugging, so left in the code...
/**System.out.print("About to execute: " + className);
for (String param : useargs)
{
System.out.print(" " + param);
}
System.out.println("");**/
Method main = target.getMethod("main", argTypes);
Object output = main.invoke(null, arguments);
// ensure we close out the request (happy request)
requestService.endRequest(null);
}
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);
}
}
// Destroy the service kernel
if (kernelImpl != null)
{
kernelImpl.destroy();
kernelImpl = null;
}
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);
}
/**
* Load the launcher configuration file
*
* @return The XML configuration file Document
*/
private static Document getConfig()
{
// Load the launcher configuration file
String config = ConfigurationManager.getProperty("dspace.dir") +
System.getProperty("file.separator") + "config" +
System.getProperty("file.separator") + "launcher.xml";
SAXBuilder saxBuilder = new SAXBuilder();
Document doc = null;
try
{
doc = saxBuilder.build(config);
}
catch (Exception e)
{
System.err.println("Unable to load the launcher configuration file: [dspace]/config/launcher.xml");
System.err.println(e.getMessage());
System.exit(1);
}
return doc;
}
/**
* Display the commands that the current launcher config file knows about
*/
private static void display()
{
Document doc = getConfig();
List<Element> commands = doc.getRootElement().getChildren("command");
System.out.println("Usage: dspace [command-name] {parameters}");
for (Element command : commands)
{
System.out.println(" - " + command.getChild("name").getValue() +
": " + command.getChild("description").getValue());
}
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2006, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2006, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -182,7 +180,7 @@ public class BrandedPreviewJPEGFilter extends MediaFilter
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"),
item == null ? "" : "hdl:" + item.getHandle());
MediaFilterManager.getCurrentItem() == null ? "" : "hdl:" + MediaFilterManager.getCurrentItem().getHandle());
g2d.drawImage(brandImage, (int)0, (int)ysize, (int) xsize, (int) 20, null);

View File

@@ -0,0 +1,133 @@
/*
* FormatFilter.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.mediafilter;
import java.io.InputStream;
import org.dspace.content.Bitstream;
import org.dspace.content.Item;
import org.dspace.core.Context;
/**
* Public interface for any class which transforms or converts content/bitstreams
* 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
{
/**
* Get a filename for a newly created filtered bitstream
*
* @param sourceName
* name of source bitstream
* @return filename generated by the filter - for example, document.pdf
* becomes document.pdf.txt
*/
public String getFilteredName(String sourceName);
/**
* @return name of the bundle this filter will stick its generated
* Bitstreams
*/
public String getBundleName();
/**
* @return name of the bitstream format (say "HTML" or "Microsoft Word")
* returned by this filter look in the bitstream format registry or
* mediafilter.cfg for valid format strings.
*/
public String getFormatString();
/**
* @return string to describe the newly-generated Bitstream's - how it was
* produced is a good idea
*/
public String getDescription();
/**
* @param source
* input stream
*
* @return result of filter's transformation, written out to a bitstream
*/
public InputStream getDestinationStream(InputStream source)
throws Exception;
/**
* Perform any pre-processing of the source bitstream *before* the actual
* filtering takes place in MediaFilterManager.processBitstream().
* <p>
* Return true if pre-processing is successful (or no pre-processing
* 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
*
* @return true if bitstream processing should continue,
* false if this bitstream should be skipped
*/
public boolean preProcessBitstream(Context c, Item item, Bitstream source)
throws Exception;
/**
* Perform any post-processing of the generated bitstream *after* this
* filter has already been run.
* <p>
* Return true if pre-processing is successful (or no pre-processing
* 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
* this filter.
*/
public void postProcessBitstream(Context c, Item item, Bitstream generatedBitstream)
throws Exception;
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -0,0 +1,100 @@
/*
* MediaFilter.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.mediafilter;
import org.dspace.content.Bitstream;
import org.dspace.content.Item;
import org.dspace.core.Context;
/**
* Abstract class which defines the default settings for a *simple* Media or Format Filter.
* This class may be extended by any class which wishes to define a simple filter to be run
* 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
{
/**
* Perform any pre-processing of the source bitstream *before* the actual
* filtering takes place in MediaFilterManager.processBitstream().
* <p>
* Return true if pre-processing is successful (or no pre-processing
* 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
*
* @return true if bitstream processing should continue,
* false if this bitstream should be skipped
*/
public boolean preProcessBitstream(Context c, Item item, Bitstream source)
throws Exception
{
return true; //default to no pre-processing
}
/**
* Perform any post-processing of the generated bitstream *after* this
* filter has already been run.
* <p>
* Return true if pre-processing is successful (or no pre-processing
* 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
* this filter.
*/
public void postProcessBitstream(Context c, Item item, Bitstream generatedBitstream)
throws Exception
{
//default to no post-processing necessary
}
}

View File

@@ -0,0 +1,767 @@
/*
* MediaFilterManager.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.mediafilter;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
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.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 String MEDIA_FILTER_PLUGINS_KEY = "filter.plugins";
//prefix (in dspace.cfg) for all filter properties
public static String FILTER_PREFIX = "filter";
//suffix (in dspace.cfg) for input formats supported by each filter
public static String INPUT_FORMATS_SUFFIX = "inputFormats";
public static boolean updateIndex = true; // default to updating index
public static boolean isVerbose = false; // default to not verbose
public static boolean isQuiet = false; // default is noisy
public static boolean isForce = false; // default to not forced
public static String identifier = null; // object scope limiter
public static int max2Process = Integer.MAX_VALUE; // maximum number items to process
public static int processed = 0; // number items processed
private static Item currentItem = null; // current item being processed
private static FormatFilter[] filterClasses = null;
private static Map filterFormats = new HashMap();
private static List 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 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 filterList = new ArrayList();
//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: ");
java.util.Iterator i = filterFormats.keySet().iterator();
while(i.hasNext())
{
String filterName = (String) 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.setIgnoreAuthorization(true);
// 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.updateIndex(c);
}
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 fmts = (List)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();
String name = myBitstream.getName();
long size = myBitstream.getSize();
String checksum = myBitstream.getChecksum() + " ("+myBitstream.getChecksumAlgorithm()+")";
int assetstore = myBitstream.getStoreNumber();
// Printout helpfull information to find the errored bistream.
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();
}
}
}
return filtered;
}
/**
* processBitstream is 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

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -41,11 +39,25 @@ package org.dspace.app.mediafilter;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.Writer;
import java.io.File;
import java.io.FileWriter;
import java.io.FileInputStream;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;
import java.io.FileOutputStream;
import java.io.CharArrayWriter;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.Iterator;
import org.apache.log4j.Logger;
import org.pdfbox.pdfparser.PDFParser;
import org.pdfbox.pdmodel.PDDocument;
import org.pdfbox.pdmodel.PDPage;
import org.pdfbox.pdmodel.common.PDStream;
import org.pdfbox.util.PDFTextStripper;
import org.dspace.core.ConfigurationManager;
/*
*
@@ -97,44 +109,76 @@ public class PDFFilter extends MediaFilter
public InputStream getDestinationStream(InputStream source)
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();
PDFParser parser = null;
String extractedText = null;
PDDocument pdfDoc = null;
Writer writer = null;
File tempTextFile = null;
ByteArrayOutputStream byteStream = null;
if (useTemporaryFile)
{
tempTextFile = File.createTempFile("dspacepdfextract" + source.hashCode(), ".txt");
tempTextFile.deleteOnExit();
writer = new OutputStreamWriter(new FileOutputStream(tempTextFile));
}
else
{
byteStream = new ByteArrayOutputStream();
writer = new OutputStreamWriter(byteStream);
}
try
{
parser = new PDFParser(source);
parser.parse();
extractedText = pts.getText(new PDDocument(parser.getDocument()));
pdfDoc = PDDocument.load(source);
pts.writeText(pdfDoc, writer);
}
finally
{
try
{
parser.getDocument().close();
if (pdfDoc != null)
pdfDoc.close();
}
catch(Exception e)
{
log.error("Error closing temporary PDF file: " + e.getMessage(), e);
}
log.error("Error closing PDF file: " + e.getMessage(), e);
}
// if verbose flag is set, print out extracted text
// to STDOUT
if (MediaFilterManager.isVerbose)
try
{
System.out.println(extractedText);
writer.close();
}
// generate an input stream with the extracted text
byte[] textBytes = extractedText.getBytes();
ByteArrayInputStream bais = new ByteArrayInputStream(textBytes);
return bais; // will this work? or will the byte array be out of scope?
catch(Exception e)
{
log.error("Error closing temporary extract file: " + e.getMessage(), e);
}
}
if (useTemporaryFile)
{
return new FileInputStream(tempTextFile);
}
else
{
byte[] bytes = byteStream.toByteArray();
return new ByteArrayInputStream(bytes);
}
}
catch (OutOfMemoryError oome)
{
log.error("Error parsing PDF document " + oome.getMessage(), oome);
if (!ConfigurationManager.getBooleanProperty("pdffilter.skiponmemoryexception", false))
{
throw oome;
}
}
return null;
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -0,0 +1,178 @@
package org.dspace.app.mediafilter;
/*
* $HeadURL: $
*
* Version: $Revision: $
*
* Date: $Date: $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import org.apache.log4j.Logger;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Utils;
/**
* Text MediaFilter for PDF sources
*
* This filter produces extracted text suitable for building an index,
* but not for display to end users.
* It forks a process running the "pdftotext" program from the
* XPdf suite -- see http://www.foolabs.com/xpdf/
* This is a suite of open-source PDF tools that has been widely ported
* to Unix platforms and the ones we use (pdftoppm, pdftotext) even
* run on Win32.
*
* This was written for the FACADE project but it is not directly connected
* to any of the other FACADE-specific software. The FACADE UI expects
* to find thumbnail images for 3D PDFs generated by this filter.
*
* Requires DSpace config properties keys:
*
* xpdf.path.pdftotext -- path to "pdftotext" executable (required!)
*
* @author Larry Stone
* @see org.dspace.app.mediafilter.MediaFilter
*/
public class XPDF2Text extends MediaFilter
{
private static Logger log = Logger.getLogger(XPDF2Text.class);
// Command to get text from pdf; @infile@, @COMMAND@ are placeholders
private static final String XPDF_PDFTOTEXT_COMMAND[] =
{
"@COMMAND@", "-q", "-enc", "UTF-8", "@infile@", "-"
};
// executable path that comes from DSpace config at runtime.
private String pdftotextPath = null;
public String getFilteredName(String oldFilename)
{
return oldFilename + ".txt";
}
public String getBundleName()
{
return "TEXT";
}
public String getFormatString()
{
return "Text";
}
public String getDescription()
{
return "Extracted Text";
}
public InputStream getDestinationStream(InputStream sourceStream)
throws Exception
{
// get configured value for path to XPDF command:
if (pdftotextPath == null)
{
pdftotextPath = ConfigurationManager.getProperty("xpdf.path.pdftotext");
if (pdftotextPath == null)
throw new IllegalStateException("No value for key \"xpdf.path.pdftotext\" in DSpace configuration! Should be path to XPDF pdftotext executable.");
}
File sourceTmp = File.createTempFile("DSfilt",".pdf");
sourceTmp.deleteOnExit(); // extra insurance, we'll delete it here.
int status = -1;
try
{
// make local temp copy of source PDF since PDF tools
// require a file for random access.
// XXX fixme could optimize if we ever get an interface to grab asset *files*
OutputStream sto = new FileOutputStream(sourceTmp);
Utils.copy(sourceStream, sto);
sto.close();
sourceStream.close();
String pdfCmd[] = XPDF_PDFTOTEXT_COMMAND.clone();
pdfCmd[0] = pdftotextPath;
pdfCmd[4] = sourceTmp.toString();
log.debug("Running command: "+Arrays.deepToString(pdfCmd));
Process pdfProc = Runtime.getRuntime().exec(pdfCmd);
InputStream stdout = pdfProc.getInputStream();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Utils.copy(new BufferedInputStream(stdout), baos);
stdout.close();
baos.close();
status = pdfProc.waitFor();
String msg = null;
if (status == 1)
msg = "pdftotext failed opening input: file="+sourceTmp.toString();
else if (status == 3)
msg = "pdftotext permission failure (perhaps copying of text from this document is not allowed - check PDF file's internal permissions): file="+sourceTmp.toString();
else if (status != 0)
msg = "pdftotext failed, maybe corrupt PDF? status="+String.valueOf(status);
if (msg != null)
{
log.error(msg);
throw new IOException(msg);
}
return new ByteArrayInputStream(baos.toByteArray());
}
catch (InterruptedException e)
{
log.error("Failed in pdftotext subprocess: ",e);
throw e;
}
finally
{
sourceTmp.delete();
if (status != 0)
log.error("PDF conversion proc failed, returns="+status+", file="+sourceTmp);
}
}
}

View File

@@ -0,0 +1,310 @@
package org.dspace.app.mediafilter;
/*
* $HeadURL: $
*
* Version: $Revision: $
*
* Date: $Date: $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.regex.MatchResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.imageio.ImageIO;
import org.apache.log4j.Logger;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Utils;
/**
* Thumbnail MediaFilter for PDF sources
*
* This filter generates thumbnail images for PDF documents, _including_
* 3D PDF documents with 2D "poster" images. Since the PDFBox library
* does not understand these, and fails to render a lot of other PDFs,
* this filter forks a process running the "pdftoppm" program from the
* XPdf suite -- see http://www.foolabs.com/xpdf/
* This is a suite of open-source PDF tools that has been widely ported
* to Unix platforms and the ones we use (pdftoppm, pdfinfo) even
* run on Win32.
*
* This was written for the FACADE project but it is not directly connected
* to any of the other FACADE-specific software. The FACADE UI expects
* to find thumbnail images for 3D PDFs generated by this filter.
*
* Requires DSpace config properties keys:
*
* xpdf.path.pdftoppm -- absolute path to "pdftoppm" executable (required!)
* xpdf.path.pdfinfo -- absolute path to "pdfinfo" executable (required!)
* thumbnail.maxwidth -- borrowed from thumbnails, max dim of generated image
*
* @author Larry Stone
* @see org.dspace.app.mediafilter.MediaFilter
*/
public class XPDF2Thumbnail extends MediaFilter
{
private static Logger log = Logger.getLogger(XPDF2Thumbnail.class);
// maximum size of either preview image dimension
private static final int MAX_PX = 800;
// maxium DPI - use common screen res, 100dpi.
private static final int MAX_DPI = 100;
// command to get image from PDF; @FILE@, @OUTPUT@ are placeholders
private static final String XPDF_PDFTOPPM_COMMAND[] =
{
"@COMMAND@", "-q", "-f", "1", "-l", "1",
"-r", "@DPI@", "@FILE@", "@OUTPUTFILE@"
};
// command to get image from PDF; @FILE@, @OUTPUT@ are placeholders
private static final String XPDF_PDFINFO_COMMAND[] =
{
"@COMMAND@", "-f", "1", "-l", "1", "-box", "@FILE@"
};
// executable path for "pdftoppm", comes from DSpace config at runtime.
private String pdftoppmPath = null;
// executable path for "pdfinfo", comes from DSpace config at runtime.
private String pdfinfoPath = null;
// match line in pdfinfo output that describes file's MediaBox
private static final Pattern MEDIABOX_PATT = Pattern.compile(
"^Page\\s+\\d+\\s+MediaBox:\\s+([\\.\\d-]+)\\s+([\\.\\d-]+)\\s+([\\.\\d-]+)\\s+([\\.\\d-]+)");
// also from thumbnail.maxwidth in config
private int maxwidth = 0;
// backup default for size, on the large side.
final private int DEFAULT_MAXWIDTH = 500;
public String getFilteredName(String oldFilename)
{
return oldFilename + ".jpg";
}
public String getBundleName()
{
return "THUMBNAIL";
}
public String getFormatString()
{
return "JPEG";
}
public String getDescription()
{
return "Generated Thumbnail";
}
// canonical MediaFilter method to generate the thumbnail as stream.
public InputStream getDestinationStream(InputStream sourceStream)
throws Exception
{
// sanity check: xpdf paths are required. can cache since it won't change
if (pdftoppmPath == null || pdfinfoPath == null)
{
pdftoppmPath = ConfigurationManager.getProperty("xpdf.path.pdftoppm");
pdfinfoPath = ConfigurationManager.getProperty("xpdf.path.pdfinfo");
if (pdftoppmPath == null)
throw new IllegalStateException("No value for key \"xpdf.path.pdftoppm\" in DSpace configuration! Should be path to XPDF pdftoppm executable.");
if (pdfinfoPath == null)
throw new IllegalStateException("No value for key \"xpdf.path.pdfinfo\" in DSpace configuration! Should be path to XPDF pdfinfo executable.");
maxwidth = ConfigurationManager.getIntProperty("thumbnail.maxwidth");
if (maxwidth == 0)
maxwidth = DEFAULT_MAXWIDTH;
}
// make local file copy of source PDF since the PDF tools
// require a file for random access.
// XXX fixme would be nice to optimize this if we ever get
// XXX a DSpace method to access (optionally!) the _file_ of
// a Bitstream in the asset store, only when there is one of course.
File sourceTmp = File.createTempFile("DSfilt",".pdf");
sourceTmp.deleteOnExit();
int status = 0;
BufferedImage source = null;
try
{
OutputStream sto = new FileOutputStream(sourceTmp);
Utils.copy(sourceStream, sto);
sto.close();
sourceStream.close();
// First get max physical dim of bounding box of first page
// to compute the DPI to ask for.. otherwise some AutoCAD
// drawings can produce enormous files even at 75dpi, for
// 48" drawings..
// run pdfinfo, look for MediaBox description in the output, e.g.
// "Page 1 MediaBox: 0.00 0.00 612.00 792.00"
//
int dpi = 0;
String pdfinfoCmd[] = XPDF_PDFINFO_COMMAND.clone();
pdfinfoCmd[0] = pdfinfoPath;
pdfinfoCmd[pdfinfoCmd.length-1] = sourceTmp.toString();
try
{
MatchResult mediaBox = null;
Process pdfProc = Runtime.getRuntime().exec(pdfinfoCmd);
BufferedReader lr = new BufferedReader(new InputStreamReader(pdfProc.getInputStream()));
String line;
for (line = lr.readLine(); line != null; line = lr.readLine())
{
// if (line.matches(MEDIABOX_PATT))
Matcher mm = MEDIABOX_PATT.matcher(line);
if (mm.matches())
mediaBox = mm.toMatchResult();
}
int istatus = pdfProc.waitFor();
if (istatus != 0)
log.error("XPDF pdfinfo proc failed, exit status="+istatus+", file="+sourceTmp);
if (mediaBox == null)
{
log.error("Sanity check: Did not find \"MediaBox\" line in output of XPDF pdfinfo, file="+sourceTmp);
throw new IllegalArgumentException("Failed to get MediaBox of PDF with pdfinfo, cannot compute thumbnail.");
}
else
{
float x0 = Float.parseFloat(mediaBox.group(1));
float y0 = Float.parseFloat(mediaBox.group(2));
float x1 = Float.parseFloat(mediaBox.group(3));
float y1 = Float.parseFloat(mediaBox.group(4));
int maxdim = (int)Math.max(Math.abs(x1 - x0), Math.abs(y1 - y0));
dpi = Math.min(MAX_DPI, (MAX_PX * 72 / maxdim));
log.debug("DPI: pdfinfo method got dpi="+dpi+" for max dim="+maxdim+" (points, 1/72\")");
}
}
catch (InterruptedException e)
{
log.error("Failed transforming file for preview: ",e);
throw new IllegalArgumentException("Failed transforming file for thumbnail: ",e);
}
catch (NumberFormatException e)
{
log.error("Failed interpreting pdfinfo results, check regexp: ",e);
throw new IllegalArgumentException("Failed transforming file for thumbnail: ",e);
}
// Render page 1 using xpdf's pdftoppm
// Requires Sun JAI imageio additions to read ppm directly.
// this will get "-000001.ppm" appended to it by pdftoppm
File outPrefixF = File.createTempFile("prevu","out");
String outPrefix = outPrefixF.toString();
outPrefixF.delete();
String pdfCmd[] = XPDF_PDFTOPPM_COMMAND.clone();
pdfCmd[0] = pdftoppmPath;
pdfCmd[pdfCmd.length-3] = String.valueOf(dpi);
pdfCmd[pdfCmd.length-2] = sourceTmp.toString();
pdfCmd[pdfCmd.length-1] = outPrefix;
File outf = new File(outPrefix+"-000001.ppm");
log.debug("Running xpdf command: "+Arrays.deepToString(pdfCmd));
try
{
Process pdfProc = Runtime.getRuntime().exec(pdfCmd);
status = pdfProc.waitFor();
log.debug("PDFTOPPM output is: "+outf+", exists="+outf.exists());
source = ImageIO.read(outf);
}
catch (InterruptedException e)
{
log.error("Failed transforming file for preview: ",e);
throw new IllegalArgumentException("Failed transforming file for preview: ",e);
}
finally
{
outf.delete();
}
}
finally
{
sourceTmp.delete();
if (status != 0)
log.error("PDF conversion proc failed, exit status="+status+", file="+sourceTmp);
}
if (source == null)
throw new IOException("Unknown failure while transforming file to preview: no image produced.");
// Scale image and return in-memory stream
BufferedImage toenail = scaleImage(source, maxwidth*3/4, maxwidth);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(toenail, "jpeg", baos);
return new ByteArrayInputStream(baos.toByteArray());
}
// scale the image, preserving aspect ratio, if at least one
// dimension is not between min and max.
private static BufferedImage scaleImage(BufferedImage source,
int min, int max)
{
int xsize = source.getWidth(null);
int ysize = source.getHeight(null);
int msize = Math.max(xsize, ysize);
BufferedImage result = null;
// scale the image if it's outside of requested range.
// ALSO pass through if min and max are both 0
if ((min == 0 && max == 0) ||
(msize >= min && Math.min(xsize, ysize) <= max))
return source;
else
{
int xnew = xsize * max / msize;
int ynew = ysize * max / msize;
result = new BufferedImage(xnew, ynew, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = result.createGraphics();
g2d.drawImage(source, 0, 0, xnew, ynew, null);
return result;
}
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -70,7 +68,7 @@ import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.core.Utils;
import org.dspace.handle.HandleManager;
import org.dspace.app.webui.util.UIUtil;
import org.dspace.app.util.Util;
import edu.harvard.hul.ois.mets.Agent;
import edu.harvard.hul.ois.mets.AmdSec;
@@ -178,7 +176,8 @@ public class METSExport
}
ItemIterator items = null;
try
{
if (line.hasOption('c'))
{
String handle = getHandleArg(line.getOptionValue('c'));
@@ -213,8 +212,15 @@ public class METSExport
{
writeAIP(context, items.next(), dest);
}
}
finally
{
if (items != null)
items.close();
}
context.abort();
System.exit(0);
}
/**
@@ -241,10 +247,19 @@ public class METSExport
+ File.separator + "config" + File.separator + "dc2mods.cfg";
// Read it in
InputStream is = new FileInputStream(configFile);
InputStream is = null;
try
{
is = new FileInputStream(configFile);
dcToMODS = new Properties();
dcToMODS.load(is);
}
finally
{
if (is != null)
try { is.close(); } catch (IOException ioe) { }
}
}
/**
* Write out the AIP for the given item to the given directory. A new
@@ -409,6 +424,12 @@ public class METSExport
{
Bitstream[] bitstreams = bundles[i].getBitstreams();
// Unusual condition, but if no bitstreams, skip this bundle
if (bitstreams.length == 0)
{
continue;
}
// First: we skip the license bundle, since it's included
// elsewhere
if (bitstreams[0].getFormat().getID() == licenseFormat)
@@ -436,7 +457,7 @@ public class METSExport
+ "/"
+ bitstreams[bits].getSequenceID()
+ "/"
+ UIUtil.encodeBitstreamName(bitstreams[bits].getName(),
+ Util.encodeBitstreamName(bitstreams[bits].getName(),
"UTF-8");
edu.harvard.hul.ois.mets.File file = new edu.harvard.hul.ois.mets.File();
@@ -562,12 +583,15 @@ public class METSExport
// Assume license will be in its own bundle
Bitstream[] bitstreams = bundles[i].getBitstreams();
if (bitstreams.length > 0)
{
if (bitstreams[0].getFormat().getID() == licenseFormat)
{
// Read the license into a string
return bitstreams[0].retrieve();
}
}
}
// Oops! No license!
return null;
@@ -645,13 +669,30 @@ public class METSExport
System.err.println("WARNING: No MODS mapping for " + propName);
}
else
{
String value = dc[i].value;
// Replace all $'s with \$ so it doesn't trip up the replaceAll!
if (value != null && value.length() > 0)
{
// RegExp note: Yes, there really does need to be this many backslashes!
// To have \$ inserted in the replacement, both the backslash and the dollar
// have to be escaped (backslash) - so the replacemenet string has to be
// passed as \\\$. All of those backslashes then have to escaped in the literal
// for them to be in string used!!!
value = dc[i].value.replaceAll("\\$", "\\\\\\$");
}
if (!(("description.provenance".equals(propName)) &&
((ConfigurationManager.getBooleanProperty("oai.mets.hide-provenance", false)))))
{
// Replace '%s' with DC value (with entities encoded)
modsXML.append(modsMapping.replaceAll("%s", Utils
.addEntities(dc[i].value)));
.addEntities(value)));
modsXML.append("\n"); // For readability
}
}
}
PreformedXML pXML = new PreformedXML(modsXML.toString());
xmlData.getContent().add(pXML);

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -0,0 +1,281 @@
/*
* AbstractMETSDisseminator.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.sitemap;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.Date;
import java.util.zip.GZIPOutputStream;
/**
* Base class for creating sitemaps of various kinds. A sitemap consists of one
* or more files which list significant URLs on a site for search engines to
* efficiently crawl. Dates of modification may also be included. A sitemap
* index file that links to each of the sitemap files is also generated. It is
* this index file that search engines should be directed towards.
* <P>
* Provides most of the required functionality, subclasses need just implement a
* few methods that specify the "boilerplate" and text for including URLs.
* <P>
* Typical usage:
* <pre>
* AbstractGenerator g = new FooGenerator(...);
* while (...) {
* g.addURL(url, date);
* }
* g.finish();
* </pre>
*
* @author Robert Tansley
*/
public abstract class AbstractGenerator
{
/** Number of files written so far */
protected int fileCount;
/** Number of bytes written to current file */
protected int bytesWritten;
/** Number of URLs written to current file */
protected int urlsWritten;
/** Directory files are written to */
protected File outputDir;
/** Current output */
protected PrintStream currentOutput;
/** Size in bytes of trailing boilerplate */
private int trailingByteCount;
/**
* Initialize this generator to write to the given directory. This must be
* called by any subclass constructor.
*
* @param outputDirIn
* directory to write sitemap files to
*/
public AbstractGenerator(File outputDirIn)
{
fileCount = 0;
outputDir = outputDirIn;
trailingByteCount = getTrailingBoilerPlate().length();
currentOutput = null;
}
/**
* Start writing a new sitemap file.
*
* @throws IOException
* if an error occurs creating the file
*/
protected void startNewFile() throws IOException
{
String lbp = getLeadingBoilerPlate();
OutputStream fo = new FileOutputStream(new File(outputDir,
getFilename(fileCount)));
if (useCompression())
{
fo = new GZIPOutputStream(fo);
}
currentOutput = new PrintStream(fo);
currentOutput.print(lbp);
bytesWritten = lbp.length();
urlsWritten = 0;
}
/**
* Add the given URL to the sitemap.
*
* @param url
* Full URL to add
* @param lastMod
* Date URL was last modified, or {@code null}
* @throws IOException
* if an error occurs writing
*/
public void addURL(String url, Date lastMod) throws IOException
{
// Kick things off if this is the first call
if (currentOutput == null)
{
startNewFile();
}
String newURLText = getURLText(url, lastMod);
if (bytesWritten + newURLText.length() + trailingByteCount > getMaxSize()
|| urlsWritten + 1 > getMaxURLs())
{
closeCurrentFile();
startNewFile();
}
currentOutput.print(newURLText);
bytesWritten += newURLText.length();
urlsWritten++;
}
/**
* Finish with the current sitemap file.
*
* @throws IOException
* if an error occurs writing
*/
protected void closeCurrentFile() throws IOException
{
currentOutput.print(getTrailingBoilerPlate());
currentOutput.close();
fileCount++;
}
/**
* Complete writing sitemap files and write the index files. This is invoked
* when all calls to {@link AbstractGenerator#addURL(String, Date)} have
* been completed, and invalidates the generator.
*
* @return number of sitemap files written.
*
* @throws IOException
* if an error occurs writing
*/
public int finish() throws IOException
{
closeCurrentFile();
OutputStream fo = new FileOutputStream(new File(outputDir,
getIndexFilename()));
if (useCompression())
{
fo = new GZIPOutputStream(fo);
}
PrintStream out = new PrintStream(fo);
writeIndex(out, fileCount);
out.close();
return fileCount;
}
/**
* Return marked-up text to be included in a sitemap about a given URL.
*
* @param url
* URL to add information about
* @param lastMod
* date URL was last modified, or {@code null} if unknown or not
* applicable
* @return the mark-up to include
*/
public abstract String getURLText(String url, Date lastMod);
/**
* Return the boilerplate at the top of a sitemap file.
*
* @return The boilerplate markup.
*/
public abstract String getLeadingBoilerPlate();
/**
* Return the boilerplate at the end of a sitemap file.
*
* @return The boilerplate markup.
*/
public abstract String getTrailingBoilerPlate();
/**
* Return the maximum size in bytes that an individual sitemap file should
* be.
*
* @return the size in bytes.
*/
public abstract int getMaxSize();
/**
* Return the maximum number of URLs that an individual sitemap file should
* contain.
*
* @return the maximum number of URLs.
*/
public abstract int getMaxURLs();
/**
* Return whether the written sitemap files and index should be
* GZIP-compressed.
*
* @return {@code true} if GZIP compression should be used, {@code false}
* otherwise.
*/
public abstract boolean useCompression();
/**
* Return the filename a sitemap at the given index should be stored at.
*
* @param number
* index of the sitemap file (zero is first).
* @return the filename to write the sitemap to.
*/
public abstract String getFilename(int number);
/**
* Get the filename the index should be written to.
*
* @return the filename of the index.
*/
public abstract String getIndexFilename();
/**
* Write the index file.
*
* @param output
* stream to write the index to
* @param sitemapCount
* number of sitemaps that were generated
* @throws IOException
* if an IO error occurs
*/
public abstract void writeIndex(PrintStream output, int sitemapCount)
throws IOException;
}

View File

@@ -0,0 +1,381 @@
/*
* GenerateSitemaps.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.sitemap;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.sql.SQLException;
import java.util.Date;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.Item;
import org.dspace.content.ItemIterator;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
/**
* Command-line utility for generating HTML and Sitemaps.org protocol Sitemaps.
*
* @author Robert Tansley
* @author Stuart Lewis
*/
public class GenerateSitemaps
{
/** Logger */
private static Logger log = Logger.getLogger(GenerateSitemaps.class);
public static void main(String[] args) throws Exception
{
final String usage = GenerateSitemaps.class.getCanonicalName();
CommandLineParser parser = new PosixParser();
HelpFormatter hf = new HelpFormatter();
Options options = new Options();
options.addOption("h", "help", false, "help");
options.addOption("s", "no_sitemaps", false,
"do not generate sitemaps.org protocol sitemap");
options.addOption("b", "no_htmlmap", false,
"do not generate a basic HTML sitemap");
options.addOption("a", "ping_all", false,
"ping configured search engines");
options
.addOption("p", "ping", true,
"ping specified search engine URL");
CommandLine line = null;
try
{
line = parser.parse(options, args);
}
catch (ParseException pe)
{
hf.printHelp(usage, options);
System.exit(1);
}
if (line.hasOption('h'))
{
hf.printHelp(usage, options);
System.exit(0);
}
if (line.getArgs().length != 0)
{
hf.printHelp(usage, options);
System.exit(1);
}
/*
* Sanity check -- if no sitemap generation or pinging to do, print
* usage
*/
if (line.getArgs().length != 0 || line.hasOption('b')
&& line.hasOption('s') && !line.hasOption('g')
&& !line.hasOption('m') && !line.hasOption('y')
&& !line.hasOption('p'))
{
System.err
.println("Nothing to do (no sitemap to generate, no search engines to ping)");
hf.printHelp(usage, options);
System.exit(1);
}
// Note the negation (CLI options indicate NOT to generate a sitemap)
if (!line.hasOption('b') || !line.hasOption('s'))
{
generateSitemaps(!line.hasOption('b'), !line.hasOption('s'));
}
if (line.hasOption('a'))
{
pingConfiguredSearchEngines();
}
if (line.hasOption('p'))
{
try
{
pingSearchEngine(line.getOptionValue('p'));
}
catch (MalformedURLException me)
{
System.err
.println("Bad search engine URL (include all except sitemap URL)");
System.exit(1);
}
}
System.exit(0);
}
/**
* Generate sitemap.org protocol and/or basic HTML sitemaps.
*
* @param makeHTMLMap
* if {@code true}, generate an HTML sitemap.
* @param makeSitemapOrg
* if {@code true}, generate an sitemap.org sitemap.
* @throws SQLException
* if a database error occurs.
* @throws IOException
* if IO error occurs.
*/
public static void generateSitemaps(boolean makeHTMLMap,
boolean makeSitemapOrg) throws SQLException, IOException
{
String sitemapStem = ConfigurationManager.getProperty("dspace.url")
+ "/sitemap";
String htmlMapStem = ConfigurationManager.getProperty("dspace.url")
+ "/htmlmap";
String handleURLStem = ConfigurationManager.getProperty("dspace.url")
+ "/handle/";
File outputDir = new File(ConfigurationManager.getProperty("sitemap.dir"));
if (!outputDir.exists()) {
outputDir.mkdir();
}
AbstractGenerator html = null;
AbstractGenerator sitemapsOrg = null;
if (makeHTMLMap)
{
html = new HTMLSitemapGenerator(outputDir, htmlMapStem + "?map=",
null);
}
if (makeSitemapOrg)
{
sitemapsOrg = new SitemapsOrgGenerator(outputDir, sitemapStem
+ "?map=", null);
}
Context c = new Context();
Community[] comms = Community.findAll(c);
for (int i = 0; i < comms.length; i++)
{
String url = handleURLStem + comms[i].getHandle();
if (makeHTMLMap)
html.addURL(url, null);
if (makeSitemapOrg)
sitemapsOrg.addURL(url, null);
}
Collection[] colls = Collection.findAll(c);
for (int i = 0; i < colls.length; i++)
{
String url = handleURLStem + colls[i].getHandle();
if (makeHTMLMap)
html.addURL(url, null);
if (makeSitemapOrg)
sitemapsOrg.addURL(url, null);
}
ItemIterator allItems = Item.findAll(c);
try
{
int itemCount = 0;
while (allItems.hasNext())
{
Item i = allItems.next();
String url = handleURLStem + i.getHandle();
Date lastMod = i.getLastModified();
if (makeHTMLMap)
html.addURL(url, lastMod);
if (makeSitemapOrg)
sitemapsOrg.addURL(url, lastMod);
i.decache();
itemCount++;
}
if (makeHTMLMap)
{
int files = html.finish();
log.info(LogManager.getHeader(c, "write_sitemap",
"type=html,num_files=" + files + ",communities="
+ comms.length + ",collections=" + colls.length
+ ",items=" + itemCount));
}
if (makeSitemapOrg)
{
int files = sitemapsOrg.finish();
log.info(LogManager.getHeader(c, "write_sitemap",
"type=html,num_files=" + files + ",communities="
+ comms.length + ",collections=" + colls.length
+ ",items=" + itemCount));
}
}
finally
{
if (allItems != null)
allItems.close();
}
c.abort();
}
/**
* Ping all search engines configured in {@code dspace.cfg}.
*
* @throws UnsupportedEncodingException
* theoretically should never happen
*/
public static void pingConfiguredSearchEngines()
throws UnsupportedEncodingException
{
String engineURLProp = ConfigurationManager
.getProperty("sitemap.engineurls");
String engineURLs[] = null;
if (engineURLProp != null)
{
engineURLs = engineURLProp.trim().split("\\s*,\\s*");
}
if (engineURLProp == null || engineURLs == null
|| engineURLs.length == 0 || engineURLs[0].trim().equals(""))
{
log.warn("No search engine URLs configured to ping");
return;
}
for (int i = 0; i < engineURLs.length; i++)
{
try
{
pingSearchEngine(engineURLs[i]);
}
catch (MalformedURLException me)
{
log.warn("Bad search engine URL in configuration: "
+ engineURLs[i]);
}
}
}
/**
* Ping the given search engine.
*
* @param engineURL
* Search engine URL minus protocol etc, e.g.
* {@code www.google.com}
* @return {@code true} if the operation was successful
* @throws MalformedURLException
* if the passed in URL is malformed
* @throws UnsupportedEncodingException
* theoretically should never happen
*/
public static void pingSearchEngine(String engineURL)
throws MalformedURLException, UnsupportedEncodingException
{
// Set up HTTP proxy
if ((ConfigurationManager.getProperty("http.proxy.host") != null)
&& (ConfigurationManager.getProperty("http.proxy.port") != null))
{
System.setProperty("proxySet", "true");
System.setProperty("proxyHost", ConfigurationManager
.getProperty("http.proxy.host"));
System.getProperty("proxyPort", ConfigurationManager
.getProperty("http.proxy.port"));
}
String sitemapURL = ConfigurationManager.getProperty("dspace.url")
+ "/sitemap";
URL url = new URL(engineURL + URLEncoder.encode(sitemapURL, "UTF-8"));
try
{
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
connection.getInputStream()));
String inputLine;
StringBuffer resp = new StringBuffer();
while ((inputLine = in.readLine()) != null)
{
resp.append(inputLine).append("\n");
}
in.close();
if (connection.getResponseCode() == 200)
{
log.info("Pinged " + url.toString() + " successfully");
}
else
{
log.warn("Error response pinging " + url.toString() + ":\n"
+ resp);
}
}
catch (IOException e)
{
log.warn("Error pinging " + url.toString(), e);
}
}
}

View File

@@ -0,0 +1,144 @@
/*
* HTMLSitemapGenerator.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.sitemap;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Date;
/**
* Class for generating HTML "sitemaps" which contain links to various pages in
* a DSpace site. This should improve search engine coverage of the DSpace site
* and limit the server load caused by crawlers.
*
* @author Robert Tansley
* @author Stuart Lewis
*/
public class HTMLSitemapGenerator extends AbstractGenerator
{
/** Stem of URLs sitemaps will eventually appear at */
private String indexURLStem;
/** Tail of URLs sitemaps will eventually appear at */
private String indexURLTail;
/**
* Construct an HTML sitemap generator, writing files to the given
* directory, and with the sitemaps eventually exposed at starting with the
* given URL stem and tail.
*
* @param outputDirIn
* Directory to write sitemap files to
* @param urlStem
* start of URL that sitemap files will appear at, e.g.
* {@code http://dspace.myu.edu/sitemap?sitemap=}
* @param urlTail
* end of URL that sitemap files will appear at, e.g.
* {@code .html} or {@code null}
*/
public HTMLSitemapGenerator(File outputDirIn, String urlStem, String urlTail)
{
super(outputDirIn);
indexURLStem = urlStem;
indexURLTail = (urlTail == null ? "" : urlTail);
}
public String getFilename(int number)
{
return "sitemap" + number + ".html";
}
public String getLeadingBoilerPlate()
{
return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n"
+ "<html><head><title>URL List</title></head><body><ul>";
}
public int getMaxSize()
{
// 50k
return 51200;
}
public int getMaxURLs()
{
return 1000;
}
public String getTrailingBoilerPlate()
{
return "</ul></body></html>\n";
}
public String getURLText(String url, Date lastMod)
{
StringBuffer urlText = new StringBuffer();
urlText.append("<li><a href=\"").append(url).append("\">").append(url)
.append("</a></li>\n");
return urlText.toString();
}
public boolean useCompression()
{
return false;
}
public String getIndexFilename()
{
return "sitemap_index.html";
}
public void writeIndex(PrintStream output, int sitemapCount)
throws IOException
{
output.println(getLeadingBoilerPlate());
for (int i = 0; i < sitemapCount; i++)
{
output.print("<li><a href=\"" + indexURLStem + i + indexURLTail
+ "\">sitemap " + i);
output.print("</a></li>\n");
}
output.println(getTrailingBoilerPlate());
}
}

View File

@@ -0,0 +1,159 @@
/*
* SitemapsOrgGenerator.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.sitemap;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Class for generating <a href="http://sitemaps.org/">Sitemaps</a> to improve
* search engine coverage of the DSpace site and limit the server load caused by
* crawlers.
*
* @author Robert Tansley
* @author Stuart Lewis
*/
public class SitemapsOrgGenerator extends AbstractGenerator
{
/** Stem of URLs sitemaps will eventually appear at */
private String indexURLStem;
/** Tail of URLs sitemaps will eventually appear at */
private String indexURLTail;
/** The correct date format */
private DateFormat w3dtfFormat = new SimpleDateFormat(
"yyyy-MM-dd'T'HH:mm:ss'Z'");
/**
* Construct a sitemaps.org protocol sitemap generator, writing files to the
* given directory, and with the sitemaps eventually exposed at starting
* with the given URL stem and tail.
*
* @param outputDirIn
* Directory to write sitemap files to
* @param urlStem
* start of URL that sitemap files will appear at, e.g.
* {@code http://dspace.myu.edu/sitemap?sitemap=}
* @param urlTail
* end of URL that sitemap files will appear at, e.g.
* {@code .html} or {@code null}
*/
public SitemapsOrgGenerator(File outputDirIn, String urlStem, String urlTail)
{
super(outputDirIn);
indexURLStem = urlStem;
indexURLTail = (urlTail == null ? "" : urlTail);
}
public String getFilename(int number)
{
return "sitemap" + number + ".xml.gz";
}
public String getLeadingBoilerPlate()
{
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">";
}
public int getMaxSize()
{
// 10 Mb
return 10485760;
}
public int getMaxURLs()
{
return 50000;
}
public String getTrailingBoilerPlate()
{
return "</urlset>";
}
public String getURLText(String url, Date lastMod)
{
StringBuffer urlText = new StringBuffer();
urlText.append("<url><loc>").append(url).append("</loc>");
if (lastMod != null)
{
urlText.append("<lastmod>").append(w3dtfFormat.format(lastMod))
.append("</lastmod>");
}
urlText.append("</url>\n");
return urlText.toString();
}
public boolean useCompression()
{
return true;
}
public String getIndexFilename()
{
return "sitemap_index.xml.gz";
}
public void writeIndex(PrintStream output, int sitemapCount)
throws IOException
{
String now = w3dtfFormat.format(new Date());
output.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
output
.println("<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">");
for (int i = 0; i < sitemapCount; i++)
{
output.print("<sitemap><loc>" + indexURLStem + i + indexURLTail
+ "</loc>");
output.print("<lastmod>" + now + "</lastmod></sitemap>\n");
}
output.println("</sitemapindex>");
}
}

View File

@@ -0,0 +1,420 @@
/*
* CreateStatReport.java
*
* Date: $Date: 2008-01-08
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.statistics;
import java.io.File;
import java.io.FileInputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Properties;
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.dspace.core.Context;
import org.dspace.core.ConfigurationManager;
/**
* This class allows the running of the DSpace statistic tools
*
* Usage: java CreateStatReport -r <statistic to run>
* Available: <stat-initial> <stat-general> <stat-monthly> <stat-report-initial>
* <stat-report-general> <stat-report-monthly>
*
* @author Chris Yates
*
*/
public class CreateStatReport {
/**Current date and time*/
private static Calendar calendar = null;
/**Reporting start date and time*/
private static Calendar reportStartDate = null;
/**Path of log directory*/
private static String outputLogDirectory = null;
/**Path of reporting directory*/
private static String outputReportDirectory = null;
/**File suffix for log files*/
private static String outputSuffix = ".dat";
/**User context*/
private static Context context;
/** the config file from which to configure the analyser */
private static String configFile = ConfigurationManager.getProperty("dspace.dir") +
File.separator + "config" + File.separator +
"dstat.cfg";
/*
* Main method to be run from the command line executes individual statistic methods
*
* Usage: java CreateStatReport -r <statistic to run>
*/
public static void main(String[] argv) throws Exception {
// Open the statistics config file
FileInputStream fis = new java.io.FileInputStream(new File(configFile));
Properties config = new Properties();
config.load(fis);
int startMonth = 0;
int startYear = 2005;
try
{
startYear = Integer.parseInt(config.getProperty("start.year", "1").trim());
} catch (NumberFormatException nfe)
{
System.err.println("start.year is incorrectly set in dstat.cfg. Must be a number (e.g. 2005).");
System.exit(0);
}
try
{
startMonth = Integer.parseInt(config.getProperty("start.month", "2005").trim());
} catch (NumberFormatException nfe)
{
System.err.println("start.month is incorrectly set in dstat.cfg. Must be a number between 1 and 12.");
System.exit(0);
}
reportStartDate = new GregorianCalendar(startYear, startMonth - 1, 1);
calendar = new GregorianCalendar();
// create context as super user
context = new Context();
context.setIgnoreAuthorization(true);
//get paths to directories
outputLogDirectory = ConfigurationManager.getProperty("log.dir") + File.separator;
outputReportDirectory = ConfigurationManager.getProperty("report.dir") + File.separator;
//read in command line variable to determine which statistic to run
CommandLineParser parser = new PosixParser();
Options options = new Options();
options.addOption("r", "report", true, "report");
CommandLine line = parser.parse(options, argv);
String statAction = null;
if(line.hasOption('r'))
{
statAction = line.getOptionValue('r');
}
if (statAction == null) {
usage();
System.exit(0);
}
//call appropriate statistics method
if(statAction.equals("stat-monthly")) {
statMonthly();
}
if(statAction.equals("stat-general")) {
statGeneral();
}
if(statAction.equals("stat-initial")) {
statInitial();
}
if(statAction.equals("stat-report-general")) {
statReportGeneral();
}
if(statAction.equals("stat-report-initial")) {
statReportInitial();
}
if(statAction.equals("stat-report-monthly")) {
statReportMonthly();
}
}
/**
* This method generates a report from the first of the current month to the end of the current month.
*
* @throws Exception
*/
private static void statMonthly() throws Exception {
//Output Prefix
String outputPrefix = "dspace-log-monthly-";
// set up our command line variables
String myLogDir = null;
String myFileTemplate = null;
String myConfigFile = null;
StringBuffer myOutFile = null;
Date myStartDate = null;
Date myEndDate = null;
boolean myLookUp = false;
Calendar start = new GregorianCalendar( calendar.get(Calendar.YEAR),
calendar.get(Calendar.MONTH),
calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
myStartDate = start.getTime();
Calendar end = new GregorianCalendar( calendar.get(Calendar.YEAR),
calendar.get(Calendar.MONTH),
calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
myEndDate = end.getTime();
myOutFile = new StringBuffer(outputLogDirectory);
myOutFile.append(outputPrefix);
myOutFile.append(calendar.get(Calendar.YEAR));
myOutFile.append("-");
myOutFile.append(calendar.get(Calendar.MONTH)+1);
myOutFile.append(outputSuffix);
LogAnalyser.processLogs(context, myLogDir, myFileTemplate, myConfigFile, myOutFile.toString(), myStartDate, myEndDate, myLookUp);
}
/**
* This method generates a full report based on the full log period
*
* @throws Exception
*/
private static void statGeneral() throws Exception {
//Output Prefix
String outputPrefix = "dspace-log-general-";
// set up our command line variables
String myLogDir = null;
String myFileTemplate = null;
String myConfigFile = null;
StringBuffer myOutFile = null;
Date myStartDate = null;
Date myEndDate = null;
boolean myLookUp = false;
myOutFile = new StringBuffer(outputLogDirectory);
myOutFile.append(outputPrefix);
myOutFile.append(calendar.get(Calendar.YEAR));
myOutFile.append("-");
myOutFile.append(calendar.get(Calendar.MONTH)+1);
myOutFile.append("-");
myOutFile.append(calendar.get(Calendar.DAY_OF_MONTH));
myOutFile.append(outputSuffix);
LogAnalyser.processLogs(context, myLogDir, myFileTemplate, myConfigFile, myOutFile.toString(), myStartDate, myEndDate, myLookUp);
}
/**
* This script starts from the year and month specified below and loops each month until the current month
* generating a monthly aggregation files for the DStat system.
*
* @throws Exception
*/
private static void statInitial() throws Exception {
//Output Prefix
String outputPrefix = "dspace-log-monthly-";
// set up our command line variables
String myLogDir = null;
String myFileTemplate = null;
String myConfigFile = null;
StringBuffer myOutFile = null;
Date myStartDate = null;
Date myEndDate = null;
boolean myLookUp = false;
Calendar reportEndDate = new GregorianCalendar( calendar.get(Calendar.YEAR),
calendar.get(Calendar.MONTH),
calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
while(reportStartDate.before(reportEndDate)) {
Calendar start = new GregorianCalendar( reportStartDate.get(Calendar.YEAR),
reportStartDate.get(Calendar.MONTH),
reportStartDate.getActualMinimum(Calendar.DAY_OF_MONTH));
myStartDate = start.getTime();
Calendar end = new GregorianCalendar( reportStartDate.get(Calendar.YEAR),
reportStartDate.get(Calendar.MONTH),
reportStartDate.getActualMaximum(Calendar.DAY_OF_MONTH));
myEndDate = end.getTime();
myOutFile = new StringBuffer(outputLogDirectory);
myOutFile.append(outputPrefix);
myOutFile.append(reportStartDate.get(Calendar.YEAR));
myOutFile.append("-");
myOutFile.append(reportStartDate.get(Calendar.MONTH)+1);
myOutFile.append(outputSuffix);
LogAnalyser.processLogs(context, myLogDir, myFileTemplate, myConfigFile, myOutFile.toString(), myStartDate, myEndDate, myLookUp);
reportStartDate.add(Calendar.MONTH, 1);
}
}
/**
* This method generates a full report based on the full log period
*
* @throws Exception
*/
private static void statReportGeneral() throws Exception {
//Prefix
String inputPrefix = "dspace-log-general-";
String outputPrefix = "report-general-";
String myFormat = "html";
StringBuffer myInput = null;
StringBuffer myOutput = null;
String myMap = null;
myInput = new StringBuffer(outputLogDirectory);
myInput.append(inputPrefix);
myInput.append(calendar.get(Calendar.YEAR));
myInput.append("-");
myInput.append(calendar.get(Calendar.MONTH)+1);
myInput.append("-");
myInput.append(calendar.get(Calendar.DAY_OF_MONTH));
myInput.append(outputSuffix);
myOutput = new StringBuffer(outputReportDirectory);
myOutput.append(outputPrefix);
myOutput.append(calendar.get(Calendar.YEAR));
myOutput.append("-");
myOutput.append(calendar.get(Calendar.MONTH)+1);
myOutput.append("-");
myOutput.append(calendar.get(Calendar.DAY_OF_MONTH));
myOutput.append(".");
myOutput.append(myFormat);
ReportGenerator.processReport(context, myFormat, myInput.toString(), myOutput.toString(), myMap);
}
/**
* This script starts from the year and month specified below and loops each month until the current month
* generating monthly reports from the DStat aggregation files
*
* @throws Exception
*/
private static void statReportInitial() throws Exception {
//Prefix
String inputPrefix = "dspace-log-monthly-";
String outputPrefix = "report-";
String myFormat = "html";
StringBuffer myInput = null;
StringBuffer myOutput = null;
String myMap = null;
Calendar reportEndDate = new GregorianCalendar( calendar.get(Calendar.YEAR),
calendar.get(Calendar.MONTH),
calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
while(reportStartDate.before(reportEndDate)) {
myInput = new StringBuffer(outputLogDirectory);
myInput.append(inputPrefix);
myInput.append(reportStartDate.get(Calendar.YEAR));
myInput.append("-");
myInput.append(reportStartDate.get(Calendar.MONTH)+1);
myInput.append(outputSuffix);
myOutput = new StringBuffer(outputReportDirectory);
myOutput.append(outputPrefix);
myOutput.append(reportStartDate.get(Calendar.YEAR));
myOutput.append("-");
myOutput.append(reportStartDate.get(Calendar.MONTH)+1);
myOutput.append(".");
myOutput.append(myFormat);
ReportGenerator.processReport(context, myFormat, myInput.toString(), myOutput.toString(), myMap);
reportStartDate.add(Calendar.MONTH, 1);
}
}
/**
* This method generates a report from the aggregation files which have been run for the most recent month
*
* @throws Exception
*/
private static void statReportMonthly() throws Exception
{
//Prefix
String inputPrefix = "dspace-log-monthly-";
String outputPrefix = "report-";
String myFormat = "html";
StringBuffer myInput = null;
StringBuffer myOutput = null;
String myMap = null;
myInput = new StringBuffer(outputLogDirectory);
myInput.append(inputPrefix);
myInput.append(calendar.get(Calendar.YEAR));
myInput.append("-");
myInput.append(calendar.get(Calendar.MONTH)+1);
myInput.append(outputSuffix);
myOutput = new StringBuffer(outputReportDirectory);
myOutput.append(outputPrefix);
myOutput.append(calendar.get(Calendar.YEAR));
myOutput.append("-");
myOutput.append(calendar.get(Calendar.MONTH)+1);
myOutput.append(".");
myOutput.append(myFormat);
ReportGenerator.processReport(context, myFormat, myInput.toString(), myOutput.toString(), myMap);
}
/*
* Output the usage information
*/
private static void usage() throws Exception {
System.out.println("Usage: java CreateStatReport -r <statistic to run>");
System.out.println("Available: <stat-initial> <stat-general> <stat-monthly> <stat-report-initial> <stat-report-general> <stat-report-monthly>");
return;
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -44,6 +42,7 @@ import org.dspace.app.statistics.Report;
import org.dspace.app.statistics.Stat;
import org.dspace.app.statistics.Statistics;
import org.dspace.app.statistics.ReportTools;
import org.dspace.core.ConfigurationManager;
import java.text.DateFormat;
@@ -54,13 +53,14 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.io.*;
/**
* This class provides HTML reports for the ReportGenerator class
*
* @author Richard Jones
*/
public class HTMLReport extends Report
public class HTMLReport implements Report
{
// FIXME: all of these methods should do some content escaping before
// outputting anything
@@ -80,6 +80,10 @@ public class HTMLReport extends Report
/** end date for report */
private Date end = null;
/** the output file to which to write aggregation data */
private static String output = ConfigurationManager.getProperty("dspace.dir") +
File.separator + "log" + File.separator + "report";
/**
* constructor for HTML reporting
*/
@@ -88,6 +92,14 @@ public class HTMLReport extends Report
// empty constructor
}
public void setOutput(String newOutput)
{
if (newOutput != null)
{
output = newOutput;
}
}
/**
* return a string containing the report as generated by this class
*
@@ -120,6 +132,23 @@ public class HTMLReport extends Report
// output the footer and return
frag.append(footer());
// NB: HTMLReport now takes responsibility to write the output file,
// so that the Report/ReportGenerator can have more general usage
// finally write the string into the output file
try
{
FileOutputStream fos = new FileOutputStream(output);
OutputStreamWriter osr = new OutputStreamWriter(fos, "UTF-8");
PrintWriter out = new PrintWriter(osr);
out.write(frag.toString());
out.close();
}
catch (IOException e)
{
System.out.println("Unable to write to output file " + output);
System.exit(0);
}
return frag.toString();
}
@@ -398,7 +427,7 @@ public class HTMLReport extends Report
frag.append("<a href=\"" + stats[i].getReference() + "\" ");
frag.append("target=\"_blank\">");
}
frag.append(stats[i].getKey());
frag.append(this.clean(stats[i].getKey()));
if (stats[i].getReference() != null)
{
frag.append("</a>");
@@ -476,4 +505,18 @@ public class HTMLReport extends Report
return "";
}
/**
* Clean Stirngs for display in HTML
*
* @param s The String to clean
* @return The cleaned String
*/
private String clean(String s)
{
// Clean up the statistics keys
s = s.replace("<", "&lt;");
s = s.replaceAll(">", "&gt;");
return s;
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -44,6 +42,7 @@ import org.dspace.app.statistics.LogLine;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.dspace.storage.rdbms.DatabaseManager;
import org.dspace.storage.rdbms.TableRow;
@@ -52,9 +51,6 @@ import java.sql.SQLException;
import java.lang.Long;
import java.lang.StringBuffer;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -100,19 +96,19 @@ public class LogAnalyser
/////////////////
/** aggregator for all actions performed in the system */
private static Map actionAggregator = new HashMap();
private static Map actionAggregator;
/** aggregator for all searches performed */
private static Map searchAggregator = new HashMap();
private static Map searchAggregator;
/** aggregator for user logins */
private static Map userAggregator = new HashMap();
private static Map userAggregator;
/** aggregator for item views */
private static Map itemAggregator = new HashMap();
private static Map itemAggregator;
/** aggregator for current archive state statistics */
private static Map archiveStats = new HashMap();
private static Map archiveStats;
/** warning counter */
private static int warnCount = 0;
@@ -125,19 +121,19 @@ public class LogAnalyser
//////////////////
/** list of actions to be included in the general summary */
private static List generalSummary = new ArrayList();
private static List generalSummary;
/** list of words not to be aggregated */
private static List excludeWords = new ArrayList();
private static List excludeWords;
/** list of search types to be ignored, such as "author:" */
private static List excludeTypes = new ArrayList();
private static List excludeTypes;
/** list of characters to be excluded */
private static List excludeChars = new ArrayList();
private static List excludeChars;
/** list of item types to be reported on in the current state */
private static List itemTypes = new ArrayList();
private static List itemTypes;
/** bottom limit to output for search word analysis */
private static int searchFloor;
@@ -224,20 +220,18 @@ public class LogAnalyser
////////////////////////
/** the log directory to be analysed */
private static String logDir = ConfigurationManager.getProperty("dspace.dir") +
File.separator + "log";
private static String logDir = ConfigurationManager.getProperty("log.dir");
/** the regex to describe the file name format */
private static String fileTemplate = "dspace\\.log.*";
/** the config file from which to configure the analyser */
private static String configFile = ConfigurationManager.getProperty("dspace.dir") +
public static String configFile = ConfigurationManager.getProperty("dspace.dir") +
File.separator + "config" + File.separator +
"dstat.cfg";
/** the output file to which to write aggregation data */
private static String outFile = ConfigurationManager.getProperty("dspace.dir") +
File.separator + "log" + File.separator + "dstat.dat";
private static String outFile = ConfigurationManager.getProperty("log.dir") + File.separator + "dstat.dat";
/** the starting date of the report */
private static Date startDate = null;
@@ -350,10 +344,21 @@ public class LogAnalyser
// together in a single aggregating object
// if the timer has not yet been started, then start it
if (startTime != null)
{
startTime = new GregorianCalendar();
}
//instantiate aggregators
actionAggregator = new HashMap();
searchAggregator = new HashMap();
userAggregator = new HashMap();
itemAggregator = new HashMap();
archiveStats = new HashMap();
//instantiate lists
generalSummary = new ArrayList();
excludeWords = new ArrayList();
excludeTypes = new ArrayList();
excludeChars = new ArrayList();
itemTypes = new ArrayList();
// set the parameters for this analysis
setParameters(myLogDir, myFileTemplate, myConfigFile, myOutFile, myStartDate, myEndDate, myLookUp);
@@ -416,12 +421,12 @@ public class LogAnalyser
{
// first find out if we are constraining by date and
// if so apply the restrictions
if (logLine.beforeDate(startDate))
if ((startDate != null) && (!logLine.afterDate(startDate)))
{
continue;
}
if (logLine.afterDate(endDate))
if ((endDate !=null) && (!logLine.beforeDate(endDate)))
{
break;
}
@@ -535,15 +540,13 @@ public class LogAnalyser
archiveStats.put(itemTypes.get(i), getNumItems(context, (String) itemTypes.get(i)));
}
// now do the host lookup
try
// now do the host name and url lookup
hostName = ConfigurationManager.getProperty("dspace.hostname").trim();
name = ConfigurationManager.getProperty("dspace.name").trim();
url = ConfigurationManager.getProperty("dspace.url").trim();
if ((url != null) && (!url.endsWith("/")))
{
InetAddress addr = InetAddress.getLocalHost();
hostName = addr.getHostName();
}
catch (UnknownHostException e)
{
hostName = "unknown host";
url = url + "/";
}
// do the average views analysis
@@ -767,6 +770,7 @@ public class LogAnalyser
{
BufferedWriter out = new BufferedWriter(new FileWriter(outFile));
out.write(summary.toString());
out.flush();
out.close();
}
catch (IOException e)
@@ -898,6 +902,20 @@ public class LogAnalyser
public static void readConfig(String configFile)
throws IOException
{
//instantiate aggregators
actionAggregator = new HashMap();
searchAggregator = new HashMap();
userAggregator = new HashMap();
itemAggregator = new HashMap();
archiveStats = new HashMap();
//instantiate lists
generalSummary = new ArrayList();
excludeWords = new ArrayList();
excludeTypes = new ArrayList();
excludeChars = new ArrayList();
itemTypes = new ArrayList();
// prepare our standard file readers and buffered readers
FileReader fr = null;
BufferedReader br = null;
@@ -910,7 +928,7 @@ public class LogAnalyser
}
catch (IOException e)
{
System.out.println("Failed to read config file");
System.out.println("Failed to read config file: " + configFile);
System.exit(0);
}
@@ -975,16 +993,6 @@ public class LogAnalyser
{
userEmail = value;
}
if (key.equals("host.url"))
{
url = value;
}
if (key.equals("host.name"))
{
name = value;
}
}
}
@@ -1147,10 +1155,10 @@ public class LogAnalyser
{
// set up a new log line object
LogLine logLine = new LogLine(parseDate(match.group(1).trim()),
match.group(2).trim(),
match.group(3).trim(),
match.group(4).trim(),
match.group(5).trim());
LogManager.unescapeLogField(match.group(2)).trim(),
LogManager.unescapeLogField(match.group(3)).trim(),
LogManager.unescapeLogField(match.group(4)).trim(),
LogManager.unescapeLogField(match.group(5)).trim());
return logLine;
}
@@ -1174,6 +1182,12 @@ public class LogAnalyser
public static Integer getNumItems(Context context, String type)
throws SQLException
{
boolean oracle = false;
if ("oracle".equals(ConfigurationManager.getProperty("db.name")))
{
oracle = true;
}
// FIXME: this method is clearly not optimised
// FIXME: we don't yet collect total statistics, such as number of items
@@ -1197,8 +1211,16 @@ public class LogAnalyser
// start the date constraint query buffer
StringBuffer dateQuery = new StringBuffer();
dateQuery.append("SELECT item_id " +
"FROM metadatavalue " +
if (oracle)
{
dateQuery.append("SELECT /*+ ORDERED_PREDICATES */ item_id ");
}
else
{
dateQuery.append("SELECT item_id ");
}
dateQuery.append("FROM metadatavalue " +
"WHERE metadata_field_id = (" +
" SELECT metadata_field_id " +
" FROM metadatafieldregistry " +
@@ -1206,24 +1228,42 @@ public class LogAnalyser
" AND qualifier = 'accessioned') ");
if (startDate != null)
{
if (oracle)
{
dateQuery.append(" AND TO_TIMESTAMP( TO_CHAR(text_value), "+
"'yyyy-mm-dd\"T\"hh24:mi:ss\"Z\"' ) > TO_DATE('" +
unParseDate(startDate) + "', 'yyyy-MM-dd') ");
}
else
{
dateQuery.append(" AND text_value::timestamp > '" +
unParseDate(startDate) + "'::timestamp ");
}
}
if (endDate != null)
{
if (oracle)
{
dateQuery.append(" AND TO_TIMESTAMP( TO_CHAR(text_value), "+
"'yyyy-mm-dd\"T\"hh24:mi:ss\"Z\"' ) < TO_DATE('" +
unParseDate(endDate) + "', 'yyyy-MM-dd') ");
}
else
{
dateQuery.append(" AND text_value::timestamp < '" +
unParseDate(endDate) + "'::timestamp ");
}
}
// build the final query
StringBuffer query = new StringBuffer();
query.append("SELECT COUNT(*) AS number " +
query.append("SELECT COUNT(*) AS num " +
"FROM item " +
"WHERE in_archive = true " +
"AND withdrawn = false ");
"WHERE in_archive = " + (oracle ? "1 " : "true ") +
"AND withdrawn = " + (oracle ? "0 " : "false "));
if (startDate != null || endDate != null)
{
@@ -1239,9 +1279,18 @@ public class LogAnalyser
TableRow row = DatabaseManager.querySingle(context, query.toString());
Integer numItems;
if (oracle)
{
numItems = new Integer(row.getIntColumn("num"));
}
else
{
// for some reason the number column is of "long" data type!
Long count = new Long(row.getLongColumn("number"));
return new Integer(count.intValue());
Long count = new Long(row.getLongColumn("num"));
numItems = new Integer(count.intValue());
}
return numItems;
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -48,30 +46,18 @@ import java.util.Date;
import java.util.List;
/**
* Abstract class to define an interface to a generic report generating
* Sn interface to a generic report generating
* class, and to provide the polymorphism necessary to allow the report
* generator to generate any number of different formats of report
*
* Note: This used to be an abstract class, but has been made an interface as there wasn't
* any logic contained within it. It's also been made public, so that you can create a Report
* type without monkeying about in the statistics package.
*
* @author Richard Jones
*/
abstract class Report
public interface Report
{
/** a list of the statistics blocks being managed by this class */
private List blocks = new ArrayList();
/** the title for the page */
private String pageTitle = null;
/** the main title for the page */
private String mainTitle = null;
/** start date for report */
private Date start = null;
/** end date for report */
private Date end = null;
/**
* output any top headers that this page needs
*

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -88,19 +86,19 @@ public class ReportGenerator
/////////////////
/** aggregator for all actions performed in the system */
private static Map actionAggregator = new HashMap();
private static Map actionAggregator;
/** aggregator for all searches performed */
private static Map searchAggregator = new HashMap();
private static Map searchAggregator;
/** aggregator for user logins */
private static Map userAggregator = new HashMap();
private static Map userAggregator;
/** aggregator for item views */
private static Map itemAggregator = new HashMap();
private static Map itemAggregator;
/** aggregator for current archive state statistics */
private static Map archiveStats = new HashMap();
private static Map archiveStats;
//////////////////
@@ -147,7 +145,7 @@ public class ReportGenerator
private static int warnings;
/** the list of results to be displayed in the general summary */
private static List generalSummary = new ArrayList();
private static List generalSummary;
//////////////////
// regular expressions
@@ -164,22 +162,15 @@ public class ReportGenerator
private static Calendar startTime = null;
/** a map from log file action to human readable action */
private static Map actionMap = new HashMap();
private static Map actionMap = null;
/////////////////
// report generator config data
////////////////
/** the format of the report to be output */
private static String format = null;
/** the input file to build the report from */
private static String input = null;
/** the output file to which to write aggregation data */
private static String output = ConfigurationManager.getProperty("dspace.dir") +
File.separator + "log" + File.separator + "report";
/** the log file action to human readable action map */
private static String map = ConfigurationManager.getProperty("dspace.dir") +
File.separator + "config" + File.separator + "dstat.map";
@@ -239,6 +230,9 @@ public class ReportGenerator
* aggregation data and output a file containing the report in the
* requested format
*
* this method is retained for backwards compatibility, but delegates the actual
* wprk to a new method
*
* @param context the DSpace context in which this action is performed
* @param myFormat the desired output format (currently on HTML supported)
* @param myInput the aggregation file to be turned into a report
@@ -248,11 +242,48 @@ public class ReportGenerator
String myInput, String myOutput,
String myMap)
throws Exception, SQLException
{
// create the relevant report type
// FIXME: at the moment we only support HTML report generation
Report report = null;
if (myFormat.equals("html"))
{
report = new HTMLReport();
((HTMLReport)report).setOutput(myOutput);
}
if (myMap != null)
{
map = myMap;
}
ReportGenerator.processReport(context, report, myInput);
}
/**
* using the pre-configuration information passed here, read in the
* aggregation data and output a file containing the report in the
* requested format
*/
public static void processReport(Context context, Report report,
String myInput)
throws Exception, SQLException
{
startTime = new GregorianCalendar();
/** instantiate aggregators */
actionAggregator = new HashMap();
searchAggregator = new HashMap();
userAggregator = new HashMap();
itemAggregator = new HashMap();
archiveStats = new HashMap();
actionMap = new HashMap();
/** instantite lists */
generalSummary = new ArrayList();
// set the parameters for this analysis
setParameters(myFormat, myInput, myOutput, myMap);
setParameters(myInput);
// pre prepare our standard file readers and buffered readers
FileReader fr = null;
@@ -264,14 +295,6 @@ public class ReportGenerator
// load the log file action to human readable action map
readMap(map);
// create the relevant report type
// FIXME: at the moment we only support HTML report generation
Report report = null;
if (format.equals("html"))
{
report = new HTMLReport();
}
report.setStartDate(startDate);
report.setEndDate(endDate);
report.setMainTitle(name, serverName);
@@ -340,7 +363,8 @@ public class ReportGenerator
String info = null;
for (i = 0; i < items.length; i++)
{
if (i < itemLookup)
// Allow negative value to say that all items should be looked up
if (itemLookup < 0 || i < itemLookup)
{
info = getItemInfo(context, items[i].getKey());
}
@@ -448,20 +472,7 @@ public class ReportGenerator
report.addBlock(process);
// finally write the string into the output file
try
{
FileOutputStream fos = new FileOutputStream(output);
OutputStreamWriter osr = new OutputStreamWriter(fos, "UTF-8");
PrintWriter out = new PrintWriter(osr);
out.write(report.render());
out.close();
}
catch (IOException e)
{
System.out.println("Unable to write to output file " + output);
System.exit(0);
}
report.render();
return;
}
@@ -550,6 +561,8 @@ public class ReportGenerator
FileReader fr = null;
BufferedReader br = null;
try
{
// read in the map file, printing a warning if none is found
String record = null;
try
@@ -575,6 +588,15 @@ public class ReportGenerator
}
}
}
finally
{
if (br != null)
try { br.close(); } catch (IOException ioe) { }
if (fr != null)
try { fr.close(); } catch (IOException ioe) { }
}
}
/**
@@ -583,34 +605,15 @@ public class ReportGenerator
* the command line with args or calling the processReport method statically
* from elsewhere
*
* @param myFormat the log file directory to be analysed
* @param myInput regex for log file names
* @param myOutput config file to use for dstat
* @param myMap the action map file to use for translations
*/
public static void setParameters(String myFormat, String myInput,
String myOutput, String myMap)
public static void setParameters(String myInput)
{
if (myFormat != null)
{
format = myFormat;
}
if (myInput != null)
{
input = myInput;
}
if (myOutput != null)
{
output = myOutput;
}
if (myMap != null)
{
map = myMap;
}
return;
}
@@ -637,10 +640,14 @@ public class ReportGenerator
}
catch (IOException e)
{
System.out.println("Failed to read input file");
System.exit(0);
System.out.println("Failed to read input file: " + input);
return;
}
// first initialise a date format object to do our date processing
// if necessary
SimpleDateFormat sdf = new SimpleDateFormat("dd'/'MM'/'yyyy");
// FIXME: although this works, it is not very elegant
// loop through the aggregator file and read in the values
while ((record = br.readLine()) != null)
@@ -687,64 +694,48 @@ public class ReportGenerator
}
// if the line is real, then we carry on
// first initialise a date format object to do our date processing
// if necessary
SimpleDateFormat sdf = new SimpleDateFormat("dd'/'MM'/'yyyy");
// read the analysis contents in
if (section.equals("archive"))
{
archiveStats.put(key, value);
}
if (section.equals("action"))
else if (section.equals("action"))
{
actionAggregator.put(key, value);
}
if (section.equals("user"))
else if (section.equals("user"))
{
userAggregator.put(key, value);
}
if (section.equals("search"))
else if (section.equals("search"))
{
searchAggregator.put(key, value);
}
if (section.equals("item"))
else if (section.equals("item"))
{
itemAggregator.put(key, value);
}
// read the config details used to make this report in
if (section.equals("user_email"))
else if (section.equals("user_email"))
{
userEmail = value;
}
if (section.equals("item_floor"))
else if (section.equals("item_floor"))
{
itemFloor = Integer.parseInt(value);
}
if (section.equals("search_floor"))
else if (section.equals("search_floor"))
{
searchFloor = Integer.parseInt(value);
}
if (section.equals("host_url"))
else if (section.equals("host_url"))
{
url = value;
}
if (section.equals("item_lookup"))
else if (section.equals("item_lookup"))
{
itemLookup = Integer.parseInt(value);
}
if (section.equals("avg_item_views"))
else if (section.equals("avg_item_views"))
{
try
{
@@ -755,43 +746,35 @@ public class ReportGenerator
avgItemViews = 0;
}
}
if (section.equals("server_name"))
else if (section.equals("server_name"))
{
serverName = value;
}
if (section.equals("service_name"))
else if (section.equals("service_name"))
{
name = value;
}
if (section.equals("start_date"))
else if (section.equals("start_date"))
{
startDate = sdf.parse(value);
}
if (section.equals("end_date"))
else if (section.equals("end_date"))
{
endDate = sdf.parse(value);
}
if (section.equals("analysis_process_time"))
else if (section.equals("analysis_process_time"))
{
processTime = Integer.parseInt(value);
}
if (section.equals("general_summary"))
else if (section.equals("general_summary"))
{
generalSummary.add(value);
}
if (section.equals("log_lines"))
else if (section.equals("log_lines"))
{
logLines = Integer.parseInt(value);
}
if (section.equals("warnings"))
else if (section.equals("warnings"))
{
warnings = Integer.parseInt(value);
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*

View File

@@ -0,0 +1,395 @@
/*
* StatisticsLoader.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.statistics;
import org.apache.commons.lang.time.DateUtils;
import org.dspace.core.ConfigurationManager;
import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.io.File;
import java.io.FilenameFilter;
import java.text.SimpleDateFormat;
import java.text.ParseException;
/**
* Helper class for loading the analysis / report files from the reports directory
*/
public class StatisticsLoader
{
private static Map<String, StatsFile> monthlyAnalysis = null;
private static Map<String, StatsFile> monthlyReports = null;
private static StatsFile generalAnalysis = null;
private static StatsFile generalReport = null;
private static Date lastLoaded = null;
private static int fileCount = 0;
private static Pattern analysisMonthlyPattern;
private static Pattern analysisGeneralPattern;
private static Pattern reportMonthlyPattern;
private static Pattern reportGeneralPattern;
private static SimpleDateFormat monthlySDF;
private static SimpleDateFormat generalSDF;
// one time initialisation of the regex patterns and formatters we will use
static
{
analysisMonthlyPattern = Pattern.compile("dspace-log-monthly-([0-9][0-9][0-9][0-9]-[0-9]+)\\.dat");
analysisGeneralPattern = Pattern.compile("dspace-log-general-([0-9]+-[0-9]+-[0-9]+)\\.dat");
reportMonthlyPattern = Pattern.compile("report-([0-9][0-9][0-9][0-9]-[0-9]+)\\.html");
reportGeneralPattern = Pattern.compile("report-general-([0-9]+-[0-9]+-[0-9]+)\\.html");
monthlySDF = new SimpleDateFormat("yyyy'-'M");
generalSDF = new SimpleDateFormat("yyyy'-'M'-'dd");
}
/**
* Get an array of the dates of the report files
* @return
*/
public static Date[] getMonthlyReportDates()
{
return sortDatesDescending(getDatesFromMap(monthlyReports));
}
/**
* Get an array of the dates of the analysis files
* @return
*/
public static Date[] getMonthlyAnalysisDates()
{
return sortDatesDescending(getDatesFromMap(monthlyAnalysis));
}
/**
* Convert the formatted dates that are the keys of the map into a date array
* @param monthlyMap
* @return
*/
protected static Date[] getDatesFromMap(Map<String, StatsFile> monthlyMap)
{
Set<String> keys = monthlyMap.keySet();
Date[] dates = new Date[keys.size()];
int i = 0;
for (String date : keys)
{
try
{
dates[i] = monthlySDF.parse(date);
}
catch (ParseException pe)
{
}
i++;
}
return dates;
}
/**
* Sort the date array in descending (reverse chronological) order
* @param dates
* @return
*/
protected static Date[] sortDatesDescending(Date[] dates)
{
Arrays.sort(dates, new Comparator<Date>() {
SimpleDateFormat sdf = monthlySDF;
public int compare(Date d1, Date d2)
{
if (d1 == null && d2 == null)
return 0;
else if (d1 == null)
return -1;
else if (d2 == null)
return 1;
else if (d1.before(d2))
return 1;
else if (d2.before(d1))
return -1;
return 0;
}
});
return dates;
}
/**
* Get the analysis file for a given date
* @param date
* @return
*/
public static File getAnalysisFor(String date)
{
StatisticsLoader.syncFileList();
StatsFile sf = (monthlyAnalysis == null ? null : monthlyAnalysis.get(date));
return sf == null ? null : sf.file;
}
/**
* Get the report file for a given date
* @param date
* @return
*/
public static File getReportFor(String date)
{
StatisticsLoader.syncFileList();
StatsFile sf = (monthlyReports == null ? null : monthlyReports.get(date));
return sf == null ? null : sf.file;
}
/**
* Get the current general analysis file
* @return
*/
public static File getGeneralAnalysis()
{
StatisticsLoader.syncFileList();
return generalAnalysis == null ? null : generalAnalysis.file;
}
/**
* Get the current general report file
* @return
*/
public static File getGeneralReport()
{
StatisticsLoader.syncFileList();
return generalReport == null ? null : generalReport.file;
}
/**
* Syncronize the cached list of analysis / report files with the reports directory
*
* We synchronize if:
*
* 1) The number of files is different (ie. files have been added or removed)
* 2) We haven't cached anything yet
* 3) The cache was last generate over an hour ago
*/
private static void syncFileList()
{
// Get an array of all the analysis and report files present
File[] fileList = StatisticsLoader.getAnalysisAndReportFileList();
if (fileList != null && fileList.length != fileCount)
StatisticsLoader.loadFileList(fileList);
else if (lastLoaded == null)
StatisticsLoader.loadFileList(fileList);
else if (DateUtils.addHours(lastLoaded, 1).before(new Date()))
StatisticsLoader.loadFileList(fileList);
}
/**
* Generate the cached file list from the array of files
* @param fileList
*/
private static synchronized void loadFileList(File[] fileList)
{
// If we haven't been passed an array of files, get one now
if (fileList == null || fileList.length == 0)
{
fileList = StatisticsLoader.getAnalysisAndReportFileList();
}
// Create new maps for the monthly analyis / reports
Map<String, StatsFile> newMonthlyAnalysis = new HashMap<String, StatsFile>();
Map<String, StatsFile> newMonthlyReports = new HashMap<String, StatsFile>();
StatsFile newGeneralAnalysis = null;
StatsFile newGeneralReport = null;
if (fileList != null)
{
for (File thisFile : fileList)
{
StatsFile statsFile = null;
// If we haven't identified this file yet
if (statsFile == null)
{
// See if it is a monthly analysis file
statsFile = makeStatsFile(thisFile, analysisMonthlyPattern, monthlySDF);
if (statsFile != null)
{
// If it is, add it to the map
newMonthlyAnalysis.put(statsFile.dateStr, statsFile);
}
}
// If we haven't identified this file yet
if (statsFile == null)
{
// See if it is a monthly report file
statsFile = makeStatsFile(thisFile, reportMonthlyPattern, monthlySDF);
if (statsFile != null)
{
// If it is, add it to the map
newMonthlyReports.put(statsFile.dateStr, statsFile);
}
}
// If we haven't identified this file yet
if (statsFile == null)
{
// See if it is a general analysis file
statsFile = makeStatsFile(thisFile, analysisGeneralPattern, generalSDF);
if (statsFile != null)
{
// If it is, ensure that we are pointing to the most recent file
if (newGeneralAnalysis == null || statsFile.date.after(newGeneralAnalysis.date))
{
newGeneralAnalysis = statsFile;
}
}
}
// If we haven't identified this file yet
if (statsFile == null)
{
// See if it is a general report file
statsFile = makeStatsFile(thisFile, reportGeneralPattern, generalSDF);
if (statsFile != null)
{
// If it is, ensure that we are pointing to the most recent file
if (newGeneralReport == null || statsFile.date.after(newGeneralReport.date))
{
newGeneralReport = statsFile;
}
}
}
}
}
// Store the newly discovered values in the member cache
monthlyAnalysis = newMonthlyAnalysis;
monthlyReports = newMonthlyReports;
generalAnalysis = newGeneralAnalysis;
generalReport = newGeneralReport;
lastLoaded = new Date();
}
/**
* Generate a StatsFile entry for this file. The pattern and date formatters are used to
* identify the file as a particular type, and extract the relevant information.
* If the file is not identified by the formatter provided, then we return null
* @param thisFile
* @param thisPattern
* @param sdf
* @return
*/
private static StatsFile makeStatsFile(File thisFile, Pattern thisPattern, SimpleDateFormat sdf)
{
Matcher matcher = thisPattern.matcher(thisFile.getName());
if (matcher.matches())
{
StatsFile sf = new StatsFile();
sf.file = thisFile;
sf.path = thisFile.getPath();
sf.dateStr = matcher.group(1).trim();
try
{
sf.date = sdf.parse(sf.dateStr);
}
catch (ParseException e)
{
}
return sf;
}
return null;
}
/**
* Get an array of all the analysis and report files
* @return
*/
private static File[] getAnalysisAndReportFileList()
{
File reportDir = new File(ConfigurationManager.getProperty("log.dir"));
if (reportDir != null)
{
return reportDir.listFiles(new AnalysisAndReportFilter());
}
return null;
}
/**
* Simple class for holding information about an analysis/report file
*/
private static class StatsFile
{
File file;
String path;
Date date;
String dateStr;
}
/**
* Filter used to restrict files in the reports directory to just analysis or report types
*/
private static class AnalysisAndReportFilter implements FilenameFilter
{
public boolean accept(File dir, String name)
{
if (analysisMonthlyPattern.matcher(name).matches())
return true;
if (analysisGeneralPattern.matcher(name).matches())
return true;
if (reportMonthlyPattern.matcher(name).matches())
return true;
if (reportGeneralPattern.matcher(name).matches())
return true;
return false;
}
}
}

View File

@@ -0,0 +1,72 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>org.dspace.app.statistics package</title>
<!--
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
-->
</head>
<body>
<p>
Defines usage event instrumentation points and provides implementations for
testing.
</p>
<p>
This package makes usage instrumentation (for statistics, or whatever else
you may fancy) pluggable, while avoiding any unnecessary assumptions about how
usage events may be transmitted, persisted, or processed.
</p>
<p>
At appropriate points in the processing of user actions, events may be
assembled and "fired". What happens when an event is fired is configurable
via the PluginManager. One must configure a plugin for the AbstractUsageEvent
class, defined in this package, to select an event processing implementation.
</p>
<p>
Three "stock" implementations are provided.
</p>
<dl>
<dt>{@link org.dspace.app.statistics.PassiveUsageEvent PassiveUsageEvent}</dt>
<dd>absorbs events without taking action, resulting in behavior identical
to that of DSpace before this package was added. This is the default
if no plugin is configured.</dd>
<dt>{@link org.dspace.app.statistics.UsageEventTabFileLogger UsageEventTabFileLogger}</dt>
<dd>writes event records to a file in Tab Separated Values format.</dd>
<dt>{@link org.dspace.app.statistics.UsageEventXMLLogger UsageEventXMLLogger}</dt>
<dd>writes event records to a file in an XML format. Suitable mainly for
testing.</dd>
</dl>
</body>
</html>

View File

@@ -0,0 +1,652 @@
/*
* AuthorizeUtil.java
*
* Version: $Revision: 3980 $
*
* Date: $Date: 2009-06-26 19:07:25 +0200 (ven, 26 giu 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.sql.SQLException;
import org.dspace.authorize.AuthorizeConfiguration;
import org.dspace.authorize.AuthorizeException;
import org.dspace.authorize.AuthorizeManager;
import org.dspace.authorize.ResourcePolicy;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.Item;
import org.dspace.core.Constants;
import org.dspace.core.Context;
/**
* This class is an addition to the AuthorizeManager that perform authorization
* check on not crud (ADD, WRITE, etc.) actions.
*
* @author bollini
*
*/
public class AuthorizeUtil
{
/**
* Is allowed manage (create, remove, edit) bitstream's policies in the
* current context?
*
* @param context
* the DSpace Context Object
* @param bitstream
* the bitstream that the policy refer to
* @throws AuthorizeException
* if the current context (current user) is not allowed to
* manage the bitstream's policies
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageBitstreamPolicy(Context context,
Bitstream bitstream) throws AuthorizeException, SQLException
{
Bundle bundle = bitstream.getBundles()[0];
authorizeManageBundlePolicy(context, bundle);
}
/**
* Is allowed manage (create, remove, edit) bundle's policies in the
* current context?
*
* @param context
* the DSpace Context Object
* @param bundle
* the bundle that the policy refer to
* @throws AuthorizeException
* if the current context (current user) is not allowed to
* manage the bundle's policies
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageBundlePolicy(Context context,
Bundle bundle) throws AuthorizeException, SQLException
{
Item item = bundle.getItems()[0];
authorizeManageItemPolicy(context, item);
}
/**
* Is allowed manage (create, remove, edit) item's policies in the
* current context?
*
* @param context
* the DSpace Context Object
* @param item
* the item that the policy refer to
* @throws AuthorizeException
* if the current context (current user) is not allowed to
* manage the item's policies
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageItemPolicy(Context context, Item item)
throws AuthorizeException, SQLException
{
if (AuthorizeConfiguration.canItemAdminManagePolicies())
{
AuthorizeManager.authorizeAction(context, item, Constants.ADMIN);
}
else if (AuthorizeConfiguration.canCollectionAdminManageItemPolicies())
{
AuthorizeManager.authorizeAction(context, item
.getOwningCollection(), Constants.ADMIN);
}
else if (AuthorizeConfiguration.canCommunityAdminManageItemPolicies())
{
AuthorizeManager
.authorizeAction(context, item.getOwningCollection()
.getCommunities()[0], Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin are allowed to manage item policies");
}
}
/**
* Is allowed manage (create, remove, edit) collection's policies in the
* current context?
*
* @param context
* the DSpace Context Object
* @param collection
* the collection that the policy refer to
* @throws AuthorizeException
* if the current context (current user) is not allowed to
* manage the collection's policies
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageCollectionPolicy(Context context,
Collection collection) throws AuthorizeException, SQLException
{
if (AuthorizeConfiguration.canCollectionAdminManagePolicies())
{
AuthorizeManager.authorizeAction(context, collection,
Constants.ADMIN);
}
else if (AuthorizeConfiguration
.canCommunityAdminManageCollectionPolicies())
{
AuthorizeManager.authorizeAction(context, collection
.getCommunities()[0], Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin are allowed to manage collection policies");
}
}
/**
* Is allowed manage (create, remove, edit) community's policies in the
* current context?
*
* @param context
* the DSpace Context Object
* @param community
* the community that the policy refer to
* @throws AuthorizeException
* if the current context (current user) is not allowed to
* manage the community's policies
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageCommunityPolicy(Context context,
Community community) throws AuthorizeException, SQLException
{
if (AuthorizeConfiguration.canCommunityAdminManagePolicies())
{
AuthorizeManager.authorizeAction(context, community,
Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin are allowed to manage community policies");
}
}
/**
* Throw an AuthorizeException if the current user is not a System Admin
*
* @param context
* the DSpace Context Object
* @throws AuthorizeException
* if the current user is not a System Admin
* @throws SQLException
* if a db error occur
*/
public static void requireAdminRole(Context context)
throws AuthorizeException, SQLException
{
if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin are allowed to perform this action");
}
}
/**
* Is the current user allowed to manage (add, remove, replace) the item's
* CC License
*
* @param context
* the DSpace Context Object
* @param item
* the item that the CC License refer to
* @throws AuthorizeException
* if the current user is not allowed to
* manage the item's CC License
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageCCLicense(Context context, Item item)
throws AuthorizeException, SQLException
{
try
{
AuthorizeManager.authorizeAction(context, item, Constants.ADD);
AuthorizeManager.authorizeAction(context, item, Constants.REMOVE);
}
catch (AuthorizeException authex)
{
if (AuthorizeConfiguration.canItemAdminManageCCLicense())
{
AuthorizeManager
.authorizeAction(context, item, Constants.ADMIN);
}
else if (AuthorizeConfiguration.canCollectionAdminManageCCLicense())
{
AuthorizeManager.authorizeAction(context, item
.getParentObject(), Constants.ADMIN);
}
else if (AuthorizeConfiguration.canCommunityAdminManageCCLicense())
{
AuthorizeManager.authorizeAction(context, item
.getParentObject().getParentObject(), Constants.ADMIN);
}
else
{
requireAdminRole(context);
}
}
}
/**
* Is the current user allowed to manage (create, remove, edit) the
* collection's template item?
*
* @param context
* the DSpace Context Object
* @param collection
* the collection
* @throws AuthorizeException
* if the current user is not allowed to manage the collection's
* template item
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageTemplateItem(Context context,
Collection collection) throws AuthorizeException, SQLException
{
boolean isAuthorized = collection.canEditBoolean(false);
if (!isAuthorized
&& AuthorizeConfiguration
.canCollectionAdminManageTemplateItem())
{
AuthorizeManager.authorizeAction(context, collection,
Constants.ADMIN);
}
else if (!isAuthorized
&& AuthorizeConfiguration
.canCommunityAdminManageCollectionTemplateItem())
{
Community[] communities = collection.getCommunities();
Community parent = communities != null && communities.length > 0 ? communities[0]
: null;
AuthorizeManager.authorizeAction(context, parent, Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"You are not authorized to create a template item for the collection");
}
}
/**
* Can the current user manage (create, remove, edit) the submitters group of
* the collection?
*
* @param context
* the DSpace Context Object
* @param collection
* the collection
* @throws AuthorizeException
* if the current user is not allowed to manage the collection's
* submitters group
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageSubmittersGroup(Context context,
Collection collection) throws AuthorizeException, SQLException
{
if (AuthorizeConfiguration.canCollectionAdminManageSubmitters())
{
AuthorizeManager.authorizeAction(context, collection,
Constants.ADMIN);
}
else if (AuthorizeConfiguration
.canCommunityAdminManageCollectionSubmitters())
{
AuthorizeManager.authorizeAction(context, collection
.getCommunities()[0], Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin are allowed to manage collection submitters");
}
}
/**
* Can the current user manage (create, remove, edit) the workflow groups of
* the collection?
*
* @param context
* the DSpace Context Object
* @param collection
* the collection
* @throws AuthorizeException
* if the current user is not allowed to manage the collection's
* workflow groups
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageWorkflowsGroup(Context context,
Collection collection) throws AuthorizeException, SQLException
{
if (AuthorizeConfiguration.canCollectionAdminManageWorkflows())
{
AuthorizeManager.authorizeAction(context, collection,
Constants.ADMIN);
}
else if (AuthorizeConfiguration
.canCommunityAdminManageCollectionWorkflows())
{
AuthorizeManager.authorizeAction(context, collection
.getCommunities()[0], Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin are allowed to manage collection workflow");
}
}
/**
* Can the current user create/edit the admins group of the collection?
* please note that the remove action need a separate check
*
* @see #authorizeRemoveAdminGroup(Context, Collection)
*
* @param context
* the DSpace Context Object
* @param collection
* the collection
* @throws AuthorizeException
* if the current user is not allowed to create/edit the
* collection's admins group
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageAdminGroup(Context context,
Collection collection) throws AuthorizeException, SQLException
{
if (AuthorizeConfiguration.canCollectionAdminManageAdminGroup())
{
AuthorizeManager.authorizeAction(context, collection,
Constants.ADMIN);
}
else if (AuthorizeConfiguration
.canCommunityAdminManageCollectionAdminGroup())
{
AuthorizeManager.authorizeAction(context, collection
.getCommunities()[0], Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin are allowed to manage collection admin");
}
}
/**
* Can the current user remove the admins group of the collection?
* please note that the create/edit actions need separate check
*
* @see #authorizeManageAdminGroup(Context, Collection)
*
* @param context
* the DSpace Context Object
* @param collection
* the collection
* @throws AuthorizeException
* if the current user is not allowed to remove the
* collection's admins group
* @throws SQLException
* if a db error occur
*/
public static void authorizeRemoveAdminGroup(Context context,
Collection collection) throws AuthorizeException, SQLException
{
Community[] parentCommunities = collection.getCommunities();
if (AuthorizeConfiguration
.canCommunityAdminManageCollectionAdminGroup()
&& parentCommunities != null && parentCommunities.length > 0)
{
AuthorizeManager.authorizeAction(context, collection
.getCommunities()[0], Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin can remove the admin group of a collection");
}
}
/**
* Can the current user create/edit the admins group of the community?
* please note that the remove action need a separate check
*
* @see #authorizeRemoveAdminGroup(Context, Collection)
*
* @param context
* the DSpace Context Object
* @param community
* the community
* @throws AuthorizeException
* if the current user is not allowed to create/edit the
* community's admins group
* @throws SQLException
* if a db error occur
*/
public static void authorizeManageAdminGroup(Context context,
Community community) throws AuthorizeException, SQLException
{
if (AuthorizeConfiguration.canCommunityAdminManageAdminGroup())
{
AuthorizeManager.authorizeAction(context, community,
Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin are allowed to manage community admin");
}
}
/**
* Can the current user remove the admins group of the community?
* please note that the create/edit actions need separate check
*
* @see #authorizeManageAdminGroup(Context, Community)
*
* @param context
* the DSpace Context Object
* @param community
* the community
* @throws AuthorizeException
* if the current user is not allowed to remove the
* collection's admins group
* @throws SQLException
* if a db error occur
*/
public static void authorizeRemoveAdminGroup(Context context,
Community community) throws SQLException, AuthorizeException
{
Community parentCommunity = community.getParentCommunity();
if (AuthorizeConfiguration.canCommunityAdminManageAdminGroup()
&& parentCommunity != null)
{
AuthorizeManager.authorizeAction(context, parentCommunity,
Constants.ADMIN);
}
else if (!AuthorizeManager.isAdmin(context))
{
throw new AuthorizeException(
"Only system admin can remove the admin group of the community");
}
}
/**
* Can the current user remove or edit the supplied policy?
*
* @param context
* the DSpace Context Object
* @param rp
* a resource policy
* @throws AuthorizeException
* if the current context (current user) is not allowed to
* remove/edit the policy
* @throws SQLException
* if a db error occur
*/
public static void authorizeManagePolicy(Context c, ResourcePolicy rp)
throws SQLException, AuthorizeException
{
switch (rp.getResourceType())
{
case Constants.BITSTREAM:
authorizeManageBitstreamPolicy(c, Bitstream.find(c, rp
.getResourceID()));
break;
case Constants.BUNDLE:
authorizeManageBundlePolicy(c, Bundle.find(c, rp.getResourceID()));
break;
case Constants.ITEM:
authorizeManageItemPolicy(c, Item.find(c, rp.getResourceID()));
break;
case Constants.COLLECTION:
authorizeManageCollectionPolicy(c, Collection.find(c, rp
.getResourceID()));
break;
case Constants.COMMUNITY:
authorizeManageCommunityPolicy(c, Community.find(c, rp
.getResourceID()));
break;
default:
requireAdminRole(c);
break;
}
}
/**
* Can the current user withdraw the item?
*
* @param context
* the DSpace Context Object
* @param item
* the item
* @throws SQLException
* if a db error occur
* @throws AuthorizeException
* if the current user is not allowed to perform the item
* withdraw
*/
public static void authorizeWithdrawItem(Context context, Item item)
throws SQLException, AuthorizeException
{
boolean authorized = false;
if (AuthorizeConfiguration.canCollectionAdminPerformItemWithdrawn())
{
authorized = AuthorizeManager.authorizeActionBoolean(context, item
.getOwningCollection(), Constants.ADMIN);
}
else if (AuthorizeConfiguration.canCommunityAdminPerformItemWithdrawn())
{
authorized = AuthorizeManager
.authorizeActionBoolean(context, item.getOwningCollection()
.getCommunities()[0], Constants.ADMIN);
}
if (!authorized)
{
authorized = AuthorizeManager.authorizeActionBoolean(context, item
.getOwningCollection(), Constants.REMOVE, false);
}
// authorized
if (!authorized)
{
throw new AuthorizeException(
"To withdraw item must be COLLECTION_ADMIN or have REMOVE authorization on owning Collection");
}
}
/**
* Can the current user reistate the item?
*
* @param context
* the DSpace Context Object
* @param item
* the item
* @throws SQLException
* if a db error occur
* @throws AuthorizeException
* if the current user is not allowed to perform the item
* reistate
*/
public static void authorizeReinstateItem(Context context, Item item)
throws SQLException, AuthorizeException
{
Collection[] colls = item.getCollections();
for (int i = 0; i < colls.length; i++)
{
if (!AuthorizeConfiguration
.canCollectionAdminPerformItemReinstatiate())
{
if (AuthorizeConfiguration
.canCommunityAdminPerformItemReinstatiate()
&& AuthorizeManager.authorizeActionBoolean(context,
colls[i].getCommunities()[0], Constants.ADMIN))
{
// authorized
}
else
{
AuthorizeManager.authorizeAction(context, colls[i],
Constants.ADD, false);
}
}
else
{
AuthorizeManager.authorizeAction(context, colls[i],
Constants.ADD);
}
}
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -38,7 +36,7 @@
* DAMAGE.
*/
package org.dspace.app.webui.util;
package org.dspace.app.util;
import java.util.List;
import java.util.Map;
@@ -89,9 +87,27 @@ public class DCInput
/** if non-null, visibility scope restriction */
private String visibility = null;
/** if non-null, readonly out of the visibility scope */
private String readOnly = null;
/** the name of the controlled vocabulary to use */
private String vocabulary = null;
/** is the entry closed to vocabulary terms? */
private boolean closedVocabulary = false;
/**
* The scope of the input sets, this restricts hidden metadata fields from
* view during workflow processing.
*/
public static String WORKFLOW_SCOPE = "workflow";
/**
* The scope of the input sets, this restricts hidden metadata fields from
* view by the end user during submission.
*/
public static String SUBMISSION_SCOPE = "submit";
/**
* Class constructor for creating a DCInput object based on the contents of
* a HashMap
@@ -117,7 +133,8 @@ public class DCInput
label = (String) fieldMap.get("label");
inputType = (String) fieldMap.get("input-type");
// these types are list-controlled
if ("dropdown".equals(inputType) || "qualdrop_value".equals(inputType))
if ("dropdown".equals(inputType) || "qualdrop_value".equals(inputType)
|| "list".equals(inputType))
{
valueListName = (String) fieldMap.get("value-pairs-name");
valueList = (List) listMap.get(valueListName);
@@ -126,7 +143,11 @@ public class DCInput
warning = (String) fieldMap.get("required");
required = (warning != null && warning.length() > 0);
visibility = (String) fieldMap.get("visibility");
readOnly = (String) fieldMap.get("readonly");
vocabulary = (String) fieldMap.get("vocabulary");
String closedVocabularyStr = (String) fieldMap.get("closedVocabulary");
closedVocabulary = "true".equalsIgnoreCase(closedVocabularyStr)
|| "yes".equalsIgnoreCase(closedVocabularyStr);
}
/**
@@ -145,6 +166,31 @@ public class DCInput
return (visibility == null || visibility.equals(scope));
}
/**
* Is this DCInput for display in readonly mode in the given scope?
* If the scope differ from which in visibility field then we use the out attribute
* of the visibility element. Possible values are: hidden (default) and readonly.
* If the DCInput is visible in the scope then this methods must return false
*
* @param scope
* String identifying the scope that this input's readonly visibility
* should be tested for
*
* @return whether the input should be displayed in a readonly way or fully hidden
*/
public boolean isReadOnly(String scope)
{
if (isVisible(scope))
{
return false;
}
else
{
return readOnly != null && readOnly.equalsIgnoreCase("readonly");
}
}
/**
* Get the repeatable flag for this row
*
@@ -203,8 +249,7 @@ public class DCInput
*/
public String getWarning()
{
return "<tr><td colspan=\"4\" class=\"submitFormWarn\">" + warning
+ "</td></tr>";
return warning;
}
/**
@@ -234,8 +279,7 @@ public class DCInput
*/
public String getHints()
{
return "<tr><td colspan=\"4\" class=\"submitFormHelp\">" + hint
+ "</td></tr>";
return hint;
}
/**
@@ -349,4 +393,21 @@ public class DCInput
return null;
}
/**
* The closed attribute of the vocabulary tag for this field as set in
* input-forms.xml
*
* <code>
* <field>
* .....
* <vocabulary closed="true">nsrc</vocabulary>
* </field>
* </code>
* @return the closedVocabulary flags: true if the entry should be restricted
* only to vocabulary terms, false otherwise
*/
public boolean isClosedVocabulary() {
return closedVocabulary;
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -38,7 +36,7 @@
* DAMAGE.
*/
package org.dspace.app.webui.util;
package org.dspace.app.util;
import java.util.ArrayList;
import java.util.List;

View File

@@ -0,0 +1,743 @@
/*
* DCInputsReader.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.io.File;
import java.util.List;
import java.util.Vector;
import java.util.HashMap;
import java.util.Iterator;
import org.xml.sax.SAXException;
import org.w3c.dom.*;
import javax.xml.parsers.*;
import org.apache.log4j.Logger;
import org.dspace.content.MetadataSchema;
import org.dspace.core.ConfigurationManager;
/**
* Submission form generator for DSpace. Reads and parses the installation
* form definitions file, input-forms.xml, from the configuration directory.
* A forms definition details the page and field layout of the metadata
* collection pages used by the submission process. Each forms definition
* starts with a unique name that gets associated with that form set.
*
* The file also specifies which collections use which form sets. At a
* minimum, the definitions file must define a default mapping from the
* placeholder collection #0 to the distinguished form 'default'. Any
* collections that use a custom form set are listed paired with the name
* of the form set they use.
*
* The definitions file also may contain sets of value pairs. Each value pair
* will contain one string that the user reads, and a paired string that will
* supply the value stored in the database if its sibling display value gets
* selected from a choice list.
*
* @author Brian S. Hughes
* @version $Revision$
*/
public class DCInputsReader
{
/**
* The ID of the default collection. Will never be the ID of a named
* collection
*/
public static final String DEFAULT_COLLECTION = "default";
/** Name of the form definition XML file */
static final String FORM_DEF_FILE = "input-forms.xml";
/** Keyname for storing dropdown value-pair set name */
static final String PAIR_TYPE_NAME = "value-pairs-name";
/** log4j logger */
private static Logger log = Logger.getLogger(DCInputsReader.class);
/** The fully qualified pathname of the form definition XML file */
private String defsFile = ConfigurationManager.getProperty("dspace.dir")
+ File.separator + "config" + File.separator + FORM_DEF_FILE;
/**
* Reference to the collections to forms map, computed from the forms
* definition file
*/
private HashMap whichForms = null;
/**
* Reference to the forms definitions map, computed from the forms
* definition file
*/
private HashMap formDefns = null;
/**
* Reference to the forms which allow, disallow or mandate files to be
* uploaded.
*/
private HashMap formFileUploadDefns = null;
/**
* Reference to the value-pairs map, computed from the forms defition file
*/
private HashMap valuePairs = null; // Holds display/storage pairs
/**
* Mini-cache of last DCInputSet requested. If submissions are not typically
* form-interleaved, there will be a modest win.
*/
private DCInputSet lastInputSet = null;
/**
* Parse an XML encoded submission forms template file, and create a hashmap
* containing all the form information. This hashmap will contain three top
* level structures: a map between collections and forms, the definition for
* each page of each form, and lists of pairs of values that populate
* selection boxes.
*/
public DCInputsReader()
throws DCInputsReaderException
{
buildInputs(defsFile);
}
public DCInputsReader(String fileName)
throws DCInputsReaderException
{
buildInputs(fileName);
}
private void buildInputs(String fileName)
throws DCInputsReaderException
{
whichForms = new HashMap();
formDefns = new HashMap();
valuePairs = new HashMap();
String uri = "file:" + new File(fileName).getAbsolutePath();
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder db = factory.newDocumentBuilder();
Document doc = db.parse(uri);
doNodes(doc);
checkValues();
}
catch (FactoryConfigurationError fe)
{
throw new DCInputsReaderException("Cannot create Submission form parser",fe);
}
catch (Exception e)
{
throw new DCInputsReaderException("Error creating submission forms: "+e);
}
}
public Iterator getPairsNameIterator()
{
return valuePairs.keySet().iterator();
}
public List getPairs(String name)
{
return (Vector)valuePairs.get(name);
}
/**
* Returns the set of DC inputs used for a particular collection, or the
* default set if no inputs defined for the collection
*
* @param collectionHandle
* collection's unique Handle
* @return DC input set
* @throws DCInputsReaderException
* if no default set defined
*/
public DCInputSet getInputs(String collectionHandle)
throws DCInputsReaderException
{
String formName = (String)whichForms.get(collectionHandle);
if (formName == null)
{
formName = (String)whichForms.get(DEFAULT_COLLECTION);
}
if (formName == null)
{
throw new DCInputsReaderException("No form designated as default");
}
// check mini-cache, and return if match
if ( lastInputSet != null && lastInputSet.getFormName().equals( formName ) )
{
return lastInputSet;
}
// cache miss - construct new DCInputSet
Vector pages = (Vector)formDefns.get(formName);
if ( pages == null )
{
throw new DCInputsReaderException("Missing the " + formName + " form");
}
lastInputSet = new DCInputSet(formName, pages, valuePairs);
return lastInputSet;
}
/**
* Return the number of pages the inputs span for a desginated collection
* @param collectionHandle collection's unique Handle
* @return number of pages of input
* @throws DCInputsReaderException if no default set defined
*/
public int getNumberInputPages(String collectionHandle)
throws DCInputsReaderException
{
return getInputs(collectionHandle).getNumberPages();
}
/**
* Process the top level child nodes in the passed top-level node. These
* should correspond to the collection-form maps, the form definitions, and
* the display/storage word pairs.
*/
private void doNodes(Node n)
throws SAXException, DCInputsReaderException
{
if (n == null)
{
return;
}
Node e = getElement(n);
NodeList nl = e.getChildNodes();
int len = nl.getLength();
boolean foundMap = false;
boolean foundDefs = false;
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
if ((nd == null) || isEmptyTextNode(nd))
{
continue;
}
String tagName = nd.getNodeName();
if (tagName.equals("form-map"))
{
processMap(nd);
foundMap = true;
}
else if (tagName.equals("form-definitions"))
{
processDefinition(nd);
foundDefs = true;
}
else if (tagName.equals("form-value-pairs"))
{
processValuePairs(nd);
}
// Ignore unknown nodes
}
if (!foundMap)
{
throw new DCInputsReaderException("No collection to form map found");
}
if (!foundDefs)
{
throw new DCInputsReaderException("No form definition found");
}
}
/**
* Process the form-map section of the XML file.
* Each element looks like:
* <name-map collection-handle="hdl" form-name="name" />
* Extract the collection handle and form name, put name in hashmap keyed
* by the collection handle.
*/
private void processMap(Node e)
throws SAXException
{
NodeList nl = e.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
if (nd.getNodeName().equals("name-map"))
{
String id = getAttribute(nd, "collection-handle");
String value = getAttribute(nd, "form-name");
String content = getValue(nd);
if (id == null)
{
throw new SAXException("name-map element is missing collection-handle attribute");
}
if (value == null)
{
throw new SAXException("name-map element is missing form-name attribute");
}
if (content != null && content.length() > 0)
{
throw new SAXException("name-map element has content, it should be empty.");
}
whichForms.put(id, value);
} // ignore any child node that isn't a "name-map"
}
}
/**
* Process the form-definitions section of the XML file. Each element is
* formed thusly: <form name="formname">...pages...</form> Each pages
* subsection is formed: <page number="#"> ...fields... </page> Each field
* is formed from: dc-element, dc-qualifier, label, hint, input-type name,
* required text, and repeatable flag.
*/
private void processDefinition(Node e)
throws SAXException, DCInputsReaderException
{
int numForms = 0;
NodeList nl = e.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
// process each form definition
if (nd.getNodeName().equals("form"))
{
numForms++;
String formName = getAttribute(nd, "name");
if (formName == null)
{
throw new SAXException("form element has no name attribute");
}
Vector pages = new Vector(); // the form contains pages
formDefns.put(formName, pages);
NodeList pl = nd.getChildNodes();
int lenpg = pl.getLength();
for (int j = 0; j < lenpg; j++)
{
Node npg = pl.item(j);
// process each page definition
if (npg.getNodeName().equals("page"))
{
String pgNum = getAttribute(npg, "number");
if (pgNum == null)
{
throw new SAXException("Form " + formName + " has no identified pages");
}
Vector page = new Vector();
pages.add(page);
NodeList flds = npg.getChildNodes();
int lenflds = flds.getLength();
for (int k = 0; k < lenflds; k++)
{
Node nfld = flds.item(k);
if ( nfld.getNodeName().equals("field") )
{
// process each field definition
HashMap field = new HashMap();
page.add(field);
processPageParts(formName, pgNum, nfld, field);
String error = checkForDups(formName, field, pages);
if (error != null)
{
throw new SAXException(error);
}
}
}
} // ignore any child that is not a 'page'
}
// sanity check number of pages
if (pages.size() < 1)
{
throw new DCInputsReaderException("Form " + formName + " has no pages");
}
}
}
if (numForms == 0)
{
throw new DCInputsReaderException("No form definition found");
}
}
/**
* Process parts of a field
* At the end, make sure that input-types 'qualdrop_value' and
* 'twobox' are marked repeatable. Complain if dc-element, label,
* or input-type are missing.
*/
private void processPageParts(String formName, String page, Node n, HashMap field)
throws SAXException
{
NodeList nl = n.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
if ( ! isEmptyTextNode(nd) )
{
String tagName = nd.getNodeName();
String value = getValue(nd);
field.put(tagName, value);
if (tagName.equals("input-type"))
{
if (value.equals("dropdown")
|| value.equals("qualdrop_value")
|| value.equals("list"))
{
String pairTypeName = getAttribute(nd, PAIR_TYPE_NAME);
if (pairTypeName == null)
{
throw new SAXException("Form " + formName + ", field " +
field.get("dc-element") +
"." + field.get("dc-qualifier") +
" has no name attribute");
}
else
{
field.put(PAIR_TYPE_NAME, pairTypeName);
}
}
}
else if (tagName.equals("vocabulary"))
{
String closedVocabularyString = getAttribute(nd, "closed");
field.put("closedVocabulary", closedVocabularyString);
}
}
}
String missing = null;
if (field.get("dc-element") == null)
{
missing = "dc-element";
}
if (field.get("label") == null)
{
missing = "label";
}
if (field.get("input-type") == null)
{
missing = "input-type";
}
if ( missing != null )
{
String msg = "Required field " + missing + " missing on page " + page + " of form " + formName;
throw new SAXException(msg);
}
String type = (String)field.get("input-type");
if (type.equals("twobox") || type.equals("qualdrop_value"))
{
String rpt = (String)field.get("repeatable");
if ((rpt == null) ||
((!rpt.equalsIgnoreCase("yes")) &&
(!rpt.equalsIgnoreCase("true"))))
{
String msg = "The field \'"+field.get("label")+"\' must be repeatable";
throw new SAXException(msg);
}
}
}
/**
* Check that this is the only field with the name dc-element.dc-qualifier
* If there is a duplicate, return an error message, else return null;
*/
private String checkForDups(String formName, HashMap field, Vector pages)
{
int matches = 0;
String err = null;
String schema = (String)field.get("dc-schema");
String elem = (String)field.get("dc-element");
String qual = (String)field.get("dc-qualifier");
if ((schema == null) || (schema.equals("")))
{
schema = MetadataSchema.DC_SCHEMA;
}
String schemaTest;
for (int i = 0; i < pages.size(); i++)
{
Vector pg = (Vector)pages.get(i);
for (int j = 0; j < pg.size(); j++)
{
HashMap fld = (HashMap)pg.get(j);
if ((fld.get("dc-schema") == null) ||
(((String)fld.get("dc-schema")).equals("")))
{
schemaTest = MetadataSchema.DC_SCHEMA;
}
else
{
schemaTest = (String)fld.get("dc-schema");
}
// Are the schema and element the same? If so, check the qualifier
if ((((String)fld.get("dc-element")).equals(elem)) &&
(schemaTest.equals(schema)))
{
String ql = (String)fld.get("dc-qualifier");
if (qual != null)
{
if ((ql != null) && ql.equals(qual))
{
matches++;
}
}
else if (ql == null)
{
matches++;
}
}
}
}
if (matches > 1)
{
err = "Duplicate field " + schema + "." + elem + "." + qual + " detected in form " + formName;
}
return err;
}
/**
* Process the form-value-pairs section of the XML file.
* Each element is formed thusly:
* <value-pairs name="..." dc-term="...">
* <pair>
* <display>displayed name-</display>
* <storage>stored name</storage>
* </pair>
* For each value-pairs element, create a new vector, and extract all
* the pairs contained within it. Put the display and storage values,
* respectively, in the next slots in the vector. Store the vector
* in the passed in hashmap.
*/
private void processValuePairs(Node e)
throws SAXException
{
NodeList nl = e.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
String tagName = nd.getNodeName();
// process each value-pairs set
if (tagName.equals("value-pairs"))
{
String pairsName = getAttribute(nd, PAIR_TYPE_NAME);
String dcTerm = getAttribute(nd, "dc-term");
if (pairsName == null)
{
String errString =
"Missing name attribute for value-pairs for DC term " + dcTerm;
throw new SAXException(errString);
}
Vector pairs = new Vector();
valuePairs.put(pairsName, pairs);
NodeList cl = nd.getChildNodes();
int lench = cl.getLength();
for (int j = 0; j < lench; j++)
{
Node nch = cl.item(j);
String display = null;
String storage = null;
if (nch.getNodeName().equals("pair"))
{
NodeList pl = nch.getChildNodes();
int plen = pl.getLength();
for (int k = 0; k < plen; k++)
{
Node vn= pl.item(k);
String vName = vn.getNodeName();
if (vName.equals("displayed-value"))
{
display = getValue(vn);
}
else if (vName.equals("stored-value"))
{
storage = getValue(vn);
if (storage == null)
{
storage = "";
}
} // ignore any children that aren't 'display' or 'storage'
}
pairs.add(display);
pairs.add(storage);
} // ignore any children that aren't a 'pair'
}
} // ignore any children that aren't a 'value-pair'
}
}
/**
* Check that all referenced value-pairs are present
* and field is consistent
*
* Throws DCInputsReaderException if detects a missing value-pair.
*/
private void checkValues()
throws DCInputsReaderException
{
// Step through every field of every page of every form
Iterator ki = formDefns.keySet().iterator();
while (ki.hasNext())
{
String idName = (String)ki.next();
Vector pages = (Vector)formDefns.get(idName);
for (int i = 0; i < pages.size(); i++)
{
Vector page = (Vector)pages.get(i);
for (int j = 0; j < page.size(); j++)
{
HashMap fld = (HashMap)page.get(j);
// verify reference in certain input types
String type = (String)fld.get("input-type");
if (type.equals("dropdown")
|| type.equals("qualdrop_value")
|| type.equals("list"))
{
String pairsName = (String)fld.get(PAIR_TYPE_NAME);
Vector v = (Vector)valuePairs.get(pairsName);
if (v == null)
{
String errString = "Cannot find value pairs for " + pairsName;
throw new DCInputsReaderException(errString);
}
}
// if visibility restricted, make sure field is not required
String visibility = (String)fld.get("visibility");
if (visibility != null && visibility.length() > 0 )
{
String required = (String)fld.get("required");
if (required != null && required.length() > 0)
{
String errString = "Field '" + (String)fld.get("label") +
"' is required but invisible";
throw new DCInputsReaderException(errString);
}
}
}
}
}
}
private Node getElement(Node nd)
{
NodeList nl = nd.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node n = nl.item(i);
if (n.getNodeType() == Node.ELEMENT_NODE)
{
return n;
}
}
return null;
}
private boolean isEmptyTextNode(Node nd)
{
boolean isEmpty = false;
if (nd.getNodeType() == Node.TEXT_NODE)
{
String text = nd.getNodeValue().trim();
if (text.length() == 0)
{
isEmpty = true;
}
}
return isEmpty;
}
/**
* Returns the value of the node's attribute named <name>
*/
private String getAttribute(Node e, String name)
{
NamedNodeMap attrs = e.getAttributes();
int len = attrs.getLength();
if (len > 0)
{
int i;
for (i = 0; i < len; i++)
{
Node attr = attrs.item(i);
if (name.equals(attr.getNodeName()))
{
return attr.getNodeValue().trim();
}
}
}
//no such attribute
return null;
}
/**
* Returns the value found in the Text node (if any) in the
* node list that's passed in.
*/
private String getValue(Node nd)
{
NodeList nl = nd.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node n = nl.item(i);
short type = n.getNodeType();
if (type == Node.TEXT_NODE)
{
return n.getNodeValue().trim();
}
}
// Didn't find a text node
return null;
}
}

View File

@@ -0,0 +1,87 @@
/*
* DCInputsReaderException.java
*
* Version: $Revision: 3761 $
*
* Date: $Date: 2009-05-07 00:18:02 -0400 (Thu, 07 May 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
/**
* This is a superclass for exceptions representing a failure when
* importing or exporting a package. E.g., unacceptable package format
* or contents. Implementations should throw one of the more specific
* exceptions. This class is intended for declarations and catch clauses.
*
* @author Larry Stone
* @version $Revision: 3761 $
*/
public class DCInputsReaderException extends Exception
{
/**
* No-args constructor.
*/
public DCInputsReaderException()
{
super();
}
/**
* Constructor for a given message.
* @param message diagnostic message.
*/
public DCInputsReaderException(String message)
{
super(message);
}
/**
* Constructor for a given cause.
* @param cause throwable that caused this exception
*/
public DCInputsReaderException(Throwable cause)
{
super(cause);
}
/**
* Constructor to create a new exception wrapping it around another exception.
* @param message diagnostic message.
* @param cause throwable that caused this exception
*/
public DCInputsReaderException(String message, Throwable cause)
{
super(message, cause);
}
}

View File

@@ -0,0 +1,172 @@
/*
* DSpaceContextListener.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import org.dspace.core.ConfigurationManager;
import org.dspace.storage.rdbms.DatabaseManager;
import org.apache.log4j.Logger;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;
import java.beans.Introspector;
import java.net.URL;
import java.net.URLConnection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.util.Enumeration;
/**
* Class to initialize / cleanup resources used by DSpace when the web application
* is started or stopped
*/
public class DSpaceContextListener implements ServletContextListener
{
private static Logger log = Logger.getLogger(DSpaceContextListener.class);
/**
* The DSpace config parameter, this is where the path to the DSpace
* configuration file can be obtained
*/
public static final String DSPACE_CONFIG_PARAMETER = "dspace-config";
/**
* Initialize any resources required by the application
* @param event
*/
public void contextInitialized(ServletContextEvent event)
{
// On Windows, URL caches can cause problems, particularly with undeployment
// So, here we attempt to disable them if we detect that we are running on Windows
try
{
String osName = System.getProperty("os.name");
if (osName != null && osName.toLowerCase().contains("windows"))
{
URL url = new URL("http://localhost/");
URLConnection urlConn = url.openConnection();
urlConn.setDefaultUseCaches(false);
}
}
catch (Throwable t)
{
log.error(t.getMessage(), t);
// Any errors thrown in disabling the caches aren't significant to
// the normal execution of the application, so we ignore them
}
// Paths to the various config files
String dspaceConfig = null;
/**
* Stage 1
*
* Locate the dspace config
*/
// first check the local per webapp parameter, then check the global parameter.
dspaceConfig = event.getServletContext().getInitParameter(DSPACE_CONFIG_PARAMETER);
// Finaly, if no config parameter found throw an error
if (dspaceConfig == null || "".equals(dspaceConfig))
{
throw new RuntimeException(
"\n\nDSpace has failed to initialize. This has occurred because it was unable to determine \n" +
"where the dspace.cfg file is located. The path to the configuration file should be stored \n" +
"in a context variable, '"+DSPACE_CONFIG_PARAMETER+"', in the global context. \n" +
"No context variable was found in either location.\n\n");
}
/**
* Stage 2
*
* Load the dspace config. Also may load log4j configuration.
* (Please rely on ConfigurationManager or Log4j to configure logging)
*
*/
try
{
ConfigurationManager.loadConfig(dspaceConfig);
}
catch (Throwable t)
{
throw new RuntimeException(
"\n\nDSpace has failed to initialize, during stage 2. Error while attempting to read the \n" +
"DSpace configuration file (Path: '"+dspaceConfig+"'). \n" +
"This has likely occurred because either the file does not exist, or it's permissions \n" +
"are set incorrectly, or the path to the configuration file is incorrect. The path to \n" +
"the DSpace configuration file is stored in a context variable, 'dspace-config', in \n" +
"either the local servlet or global context.\n\n",t);
}
}
/**
* Clean up resources used by the application when stopped
*
* @param event
*/
public void contextDestroyed(ServletContextEvent event)
{
try
{
// Remove the database pool
DatabaseManager.shutdown();
// Clean out the introspector
Introspector.flushCaches();
// Remove any drivers registered by this classloader
for (Enumeration e = DriverManager.getDrivers(); e.hasMoreElements();)
{
Driver driver = (Driver) e.nextElement();
if (driver.getClass().getClassLoader() == getClass().getClassLoader())
{
DriverManager.deregisterDriver(driver);
}
}
}
catch (Throwable e)
{
log.error("Failed to cleanup ClassLoader for webapp", e);
}
}
}

View File

@@ -0,0 +1,369 @@
/*
* DailyFileApender.java
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.io.File;
import java.io.IOException;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import org.apache.commons.lang.time.DateUtils;
import org.apache.log4j.FileAppender;
import org.apache.log4j.Logger;
import org.apache.log4j.helpers.LogLog;
import org.apache.log4j.spi.LoggingEvent;
/**
* Special log appender for log4j. Adds the current date (ie. year-mon) to
* the end of the file name, so that rolling on to the next log is simply
* a case of starting a new one - no renaming of old logs.
*
* This is advisable if you are using Windows, and have multiple applications
* (ie. dspace, dspace-oai, dspace-sword) that all want to write to the same log file,
* as each would otherwise try to rename the old files during rollover.
*
* An example log4j.properties (one log per month, retains three months of logs)
*
* log4j.rootCategory=INFO, A1
* log4j.appender.A1=org.dspace.app.util.DailyFileAppender
* log4j.appender.A1.File=@@log.dir@@/dspace.log
* log4j.appender.A1.DatePattern=yyyy-MM
* log4j.appender.A1.MaxLogs=3
* log4j.appender.A1.layout=org.apache.log4j.PatternLayout
* log4j.appender.A1.layout.ConversionPattern=%d %-5p %c @ %m%n
*
*/
public class DailyFileAppender extends FileAppender
{
private static Logger log = Logger.getLogger(DailyFileAppender.class);
/**
* The fixed date pattern to be used if one is not specified.
*/
private static String DATE_PATTERN = "yyyy-MM-dd";
/**
* The folder under which daily folders are created. This can be a absolute path
* or relative path also.
* e.g. JavaLogs/CPRILog or F:/LogFiles/CPRILog
*/
private String mstrFileName;
/**
* Used internally and contains the name of the date derived from current system date.
*/
private Date mstrDate = new Date(System.currentTimeMillis());
/**
* Holds the user specified DatePattern,
*/
private String mstrDatePattern = DATE_PATTERN;
private boolean mMonthOnly = false;
/**
* The date formatter object used for parsing the user specified DatePattern.
*/
private SimpleDateFormat mobjSDF;
private boolean mWithHostName = false;
private int mMaxLogs = 0;
/**
* Default constructor. This is required as the appender class is dynamically
* loaded.
*/
public DailyFileAppender()
{
super();
}
/* (non-Javadoc)
* @see org.apache.log4j.FileAppender#activateOptions()
*/
public void activateOptions()
{
setFileName();
cleanupOldFiles();
super.activateOptions();
}
/*------------------------------------------------------------------------------
* Getters
*----------------------------------------------------------------------------*/
public String getDatePattern()
{
return this.mstrDatePattern;
}
public String getFile()
{
return this.mstrFileName;
}
public boolean getWithHost()
{
return mWithHostName;
}
public int getMaxLogs()
{
return mMaxLogs;
}
/*------------------------------------------------------------------------------
* Setters
*----------------------------------------------------------------------------*/
public void setDatePattern(String pstrPattern)
{
this.mstrDatePattern = checkPattern(pstrPattern);
if (mstrDatePattern.contains("dd") || mstrDatePattern.contains("DD"))
mMonthOnly = false;
else
mMonthOnly = true;
}
public void setFile(String file)
{
// Trim spaces from both ends. The users probably does not want
// trailing spaces in file names.
String val = file.trim();
mstrFileName = val;
}
public void setWithHost(boolean wh)
{
mWithHostName = wh;
}
public void setMaxLogs(int ml)
{
mMaxLogs = ml;
}
/*------------------------------------------------------------------------------
* Methods
*----------------------------------------------------------------------------*/
/* (non-Javadoc)
* @see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)
*/
protected void subAppend(LoggingEvent pobjEvent)
{
Date dtNow = new Date(System.currentTimeMillis());
boolean rollover = false;
if (mMonthOnly)
{
Calendar now = Calendar.getInstance();
Calendar cur = Calendar.getInstance();
now.setTime(dtNow);
cur.setTime(mstrDate);
rollover = !(now.get(Calendar.YEAR) == cur.get(Calendar.YEAR) && now.get(Calendar.MONTH) == cur.get(Calendar.MONTH));
}
else
{
rollover = !(DateUtils.isSameDay(dtNow, mstrDate));
}
if (rollover)
{
try
{
rollOver(dtNow);
}
catch (IOException IOEx)
{
LogLog.error("rollOver() failed!", IOEx);
}
}
super.subAppend(pobjEvent);
}
/*------------------------------------------------------------------------------
* Helpers
*----------------------------------------------------------------------------*/
/**
* The helper function to vaildate the DatePattern.
* @param pstrPattern The DatePattern to be validated.
* @return The validated date pattern or defautlt DATE_PATTERN
*/
private String checkPattern(String pstrPattern)
{
String strRet = null;
SimpleDateFormat objFmt = new SimpleDateFormat(DATE_PATTERN);
try
{
this.mobjSDF = new SimpleDateFormat(pstrPattern);
strRet = pstrPattern;
}
catch (NullPointerException NPExIgnore)
{
LogLog.error("Invalid DatePattern " + pstrPattern, NPExIgnore);
this.mobjSDF = objFmt;
strRet = DATE_PATTERN;
}
catch (IllegalArgumentException IlArgExIgnore)
{
LogLog.error("Invalid DatePattern " + pstrPattern, IlArgExIgnore);
this.mobjSDF = objFmt;
strRet = DATE_PATTERN;
}
finally
{
objFmt = null;
}
return strRet;
}
/**
* This function is responsible for performing the actual file rollover.
* @param pstrName The name of the new folder based on current system date.
* @throws IOException
*/
static private boolean deletingFiles = false;
private void cleanupOldFiles()
{
// If we need to delete log files
if (mMaxLogs > 0 && !deletingFiles)
{
deletingFiles = true;
// Determine the final file extension with the hostname
String hostFileExt = null;
try
{
hostFileExt = "." + java.net.InetAddress.getLocalHost().getHostName();
}
catch (UnknownHostException e)
{
LogLog.error("Unable to retrieve host name");
}
try
{
// Array to hold the logs we are going to keep
File[] logsToKeep = new File[mMaxLogs];
// Get a 'master' file handle, and the parent directory from it
File logMaster = new File(mstrFileName);
File logDir = logMaster.getParentFile();
if (logDir.isDirectory())
{
// Iterate all the files in that directory
File[] logArr = logDir.listFiles();
for (File curLog : logArr)
{
log.info("Comparing '" + curLog.getAbsolutePath() + "' to '" + mstrFileName + "'");
String name = curLog.getAbsolutePath();
// First, see if we are not using hostname, or the log file ends with this host
if (!mWithHostName || (hostFileExt != null && name.endsWith(hostFileExt)))
{
// Check that the file is indeed one we want (contains the master file name)
if (name.contains(mstrFileName))
{
// Iterate through the array of logs we are keeping
for (int i = 0; curLog != null && i < logsToKeep.length; i++)
{
// Have we exhausted the 'to keep' array?
if (logsToKeep[i] == null)
{
// Empty space, retain this log file
logsToKeep[i] = curLog;
curLog = null;
}
// If the 'kept' file is older than the current one
else if (logsToKeep[i].getName().compareTo(curLog.getName()) < 0)
{
// Replace tested entry with current file
File temp = logsToKeep[i];
logsToKeep[i] = curLog;
curLog = temp;
}
}
// If we have a 'current' entry at this point, it's a log we don't want
if (curLog != null)
{
log.info("Deleting log " + curLog.getName());
curLog.delete();
}
}
}
}
}
}
catch (Exception e)
{
// Don't worry about exceptions
}
finally
{
deletingFiles = false;
}
}
}
private void rollOver(Date dtNow) throws IOException
{
mstrDate = dtNow;
setFileName();
this.setFile(fileName, true, bufferedIO, bufferSize);
cleanupOldFiles();
}
private void setFileName()
{
fileName = mstrFileName + "." + mobjSDF.format(mstrDate);
if (mWithHostName)
{
try
{
fileName += "." + java.net.InetAddress.getLocalHost().getHostName();
}
catch (UnknownHostException e)
{
LogLog.error("Unable to retrieve host name");
}
}
}
}

View File

@@ -0,0 +1,176 @@
/*
* MetadataExposure.java
*
* Version: $Revision: 3734 $
*
* Date: $Date: 2009-04-24 00:00:19 -0400 (Fri, 24 Apr 2009) $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.util.Map;
import java.util.Set;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Enumeration;
import java.sql.SQLException;
import org.apache.log4j.Logger;
import org.dspace.authorize.AuthorizeManager;
import org.dspace.core.Constants;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
/**
* Static utility class to manage configuration for exposure (hiding) of
* certain Item metadata fields.
*
* This class answers the question, "is the user allowed to see this
* metadata field?" Any external interface (UI, OAI-PMH, etc) that
* disseminates metadata should consult it before disseminating the value
* of a metadata field.
*
* Since the MetadataExposure.isHidden() method gets called in a lot of inner
* loops, it is important to implement it efficiently, in both time and
* memory utilization. It computes an answer without consuming ANY memory
* (e.g. it does not build any temporary Strings) and in close to constant
* time by use of hash tables. Although most sites will only hide a few
* fields, we can't predict what the usage will be so it's better to make it
* scalable.
*
* Algorithm is as follows:
* 1. If a Context is provided and it has a user who is Administrator,
* always grant access (return false).
* 2. Return true if field is on the hidden list, false otherwise.
*
* The internal maps are populated from DSpace Configuration at the first
* call, in case the properties are not available in the static context.
*
* Configuration Properties:
* ## hide a single metadata field
* #metadata.hide.SCHEMA.ELEMENT[.QUALIFIER] = true
* # example: dc.type
* metadata.hide.dc.type = true
* # example: dc.description.provenance
* metadata.hide.dc.description.provenance = true
*
* @author Larry Stone
* @version $Revision: 3734 $
*/
public class MetadataExposure
{
private static Logger log = Logger.getLogger(MetadataExposure.class);
private static Map<String,Set<String>> hiddenElementSets = null;
private static Map<String,Map<String,Set<String>>> hiddenElementMaps = null;
private static final String CONFIG_PREFIX = "metadata.hide.";
public static boolean isHidden(Context context, String schema, String element, String qualifier)
throws SQLException
{
// the administrator's override
if (context != null && AuthorizeManager.isAdmin(context))
return false;
// for schema.element, just check schema->elementSet
init();
if (qualifier == null)
{
Set<String> elts = hiddenElementSets.get(schema);
return elts == null ? false : elts.contains(element);
}
// for schema.element.qualifier, just schema->eltMap->qualSet
else
{
Map<String,Set<String>> elts = hiddenElementMaps.get(schema);
if (elts == null)
return false;
Set<String> quals = elts.get(element);
return quals == null ? false : quals.contains(qualifier);
}
}
// load maps from configuration unless it's already done.
private static void init()
{
if (hiddenElementSets == null)
{
hiddenElementSets = new HashMap<String,Set<String>>();
hiddenElementMaps = new HashMap<String,Map<String,Set<String>>>();
Enumeration pne = ConfigurationManager.propertyNames();
while (pne.hasMoreElements())
{
String key = (String)pne.nextElement();
if (key.startsWith(CONFIG_PREFIX))
{
String mdField = key.substring(CONFIG_PREFIX.length());
String segment[] = mdField.split("\\.", 3);
// got schema.element.qualifier
if (segment.length == 3)
{
Map<String,Set<String>> eltMap = hiddenElementMaps.get(segment[0]);
if (eltMap == null)
{
eltMap = new HashMap<String,Set<String>>();
hiddenElementMaps.put(segment[0], eltMap);
}
if (!eltMap.containsKey(segment[1]))
{
eltMap.put(segment[1], new HashSet<String>());
}
eltMap.get(segment[1]).add(segment[2]);
}
// got schema.element
else if (segment.length == 2)
{
if (!hiddenElementSets.containsKey(segment[0]))
{
hiddenElementSets.put(segment[0], new HashSet<String>());
}
hiddenElementSets.get(segment[0]).add(segment[1]);
}
// oops..
else
{
log.warn("Bad format in hidden metadata directive, field=\""+mdField+"\", config property="+key);
}
}
}
}
}
}

View File

@@ -0,0 +1,381 @@
/*
* OpenSearch.java
*
* Version: $Revision: 1.20 $
*
* Date: $Date: 2005/08/25 17:20:27 $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import java.net.URLEncoder;
import java.io.UnsupportedEncodingException;
import org.w3c.dom.Document;
import org.jdom.DocType;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.Namespace;
import org.jdom.output.DOMOutputter;
import org.jdom.output.XMLOutputter;
import org.apache.log4j.Logger;
import org.dspace.content.Bitstream;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DCDate;
import org.dspace.content.DCValue;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Constants;
import org.dspace.handle.HandleManager;
import org.dspace.search.QueryResults;
import com.sun.syndication.feed.WireFeed;
import com.sun.syndication.feed.atom.Category;
import com.sun.syndication.feed.atom.Content;
import com.sun.syndication.feed.atom.Feed;
import com.sun.syndication.feed.atom.Entry;
import com.sun.syndication.feed.atom.Link;
import com.sun.syndication.feed.atom.Person;
import com.sun.syndication.feed.rss.Channel;
import com.sun.syndication.feed.rss.Description;
import com.sun.syndication.feed.rss.Image;
import com.sun.syndication.io.WireFeedOutput;
import com.sun.syndication.feed.module.opensearch.OpenSearchModule;
import com.sun.syndication.feed.module.opensearch.entity.OSQuery;
import com.sun.syndication.feed.module.opensearch.impl.OpenSearchModuleImpl;
import com.sun.syndication.io.FeedException;
/**
* Utility Class with static methods for producing OpenSearch-compliant search results,
* and the OpenSearch description document.
* <p>
* OpenSearch is a specification for describing and advertising search-engines
* and their result formats. Commonly, RSS and Atom formats are used, which
* the current implementation supports, as is HTML (used directly in browsers).
* NB: this is baseline OpenSearch, no extensions currently supported.
* </p>
* <p>
* The value of the "scope" parameter should either be absent (which means no
* scope restriction), or the handle of a community or collection.
* </p>
*
* @author Richard Rodgers
*
*/
public class OpenSearch
{
private static final Logger log = Logger.getLogger(OpenSearch.class);
// are open search queries enabled?
private static boolean enabled = false;
// supported results formats
private static List<String> formats = null;
// Namespaces used
private static final String osNs = "http://a9.com/-/spec/opensearch/1.1/";
// base search UI URL
private static String uiUrl = null;
// base search service URL
private static String svcUrl = null;
static
{
enabled = ConfigurationManager.getBooleanProperty("websvc.opensearch.enable");
svcUrl = ConfigurationManager.getProperty("dspace.url") + "/" +
ConfigurationManager.getProperty("websvc.opensearch.svccontext");
uiUrl = ConfigurationManager.getProperty("dspace.url") + "/" +
ConfigurationManager.getProperty("websvc.opensearch.uicontext");
// read rest of config info if enabled
formats = new ArrayList<String>();
if (enabled)
{
String fmtsStr = ConfigurationManager.getProperty("websvc.opensearch.formats");
if ( fmtsStr != null )
{
for (String fmt : fmtsStr.split(","))
{
formats.add(fmt);
}
}
}
}
/**
* Returns list of supported formats
*
* @return list of format names - 'rss', 'atom' or 'html'
*/
public static List<String> getFormats()
{
return formats;
}
/**
* Returns a mime-type associated with passed format
*
* @param format the results document format (rss, atom, html)
* @return content-type mime-type
*/
public static String getContentType(String format)
{
return "html".equals(format) ? "text/html" :
"application/" + format + "+xml; charset=UTF-8";
}
/**
* Returns the OpenSearch service document appropriate for given scope
*
* @param scope - null for entire repository, or handle or community or collection
* @return document the service document
* @throws IOException
*/
public static Document getDescriptionDoc(String scope) throws IOException
{
return jDomToW3(getServiceDocument(scope));
}
/**
* Returns OpenSearch Servic Document as a string
*
* @param scope - null for entire repository, or handle or community or collection
* @return service document as a string
*/
public static String getDescription(String scope)
{
return new XMLOutputter().outputString(getServiceDocument(scope));
}
/**
* Returns a formatted set of search results as a string
*
* @param format results format - html, rss or atom
* @param query - the search query
* @param qResults - the query results to be formatted
* @param scope - search scope, null or community/collection handle
* @param results the retreived DSpace objects satisfying search
* @param labels labels to apply - format specific
* @return formatted search results
* @throws IOException
*/
public static String getResultsString(String format, String query, QueryResults qResults,
DSpaceObject scope, DSpaceObject[] results,
Map<String, String> labels) throws IOException
{
try
{
return getResults(format, query, qResults, scope, results, labels).outputString();
}
catch (FeedException e)
{
log.error(e.toString(), e);
throw new IOException("Unable to generate feed");
}
}
/**
* Returns a formatted set of search results as a document
*
* @param format results format - html, rss or atom
* @param query - the search query
* @param qResults - the query results to be formatted
* @param scope - search scope, null or community/collection handle
* @param results the retreived DSpace objects satisfying search
* @param labels labels to apply - format specific
* @return formatted search results
* @throws IOException
*/
public static Document getResultsDoc(String format, String query, QueryResults qResults,
DSpaceObject scope, DSpaceObject[] results, Map<String, String> labels)
throws IOException
{
try
{
return getResults(format, query, qResults, scope, results, labels).outputW3CDom();
}
catch (FeedException e)
{
log.error(e.toString(), e);
throw new IOException("Unable to generate feed");
}
}
private static SyndicationFeed getResults(String format, String query, QueryResults qResults,
DSpaceObject scope, DSpaceObject[] results, Map<String, String> labels)
{
// Encode results in requested format
if ("rss".equals(format))
format = "rss_2.0";
else if ("atom".equals(format))
format = "atom_1.0";
SyndicationFeed feed = new SyndicationFeed(labels.get(SyndicationFeed.MSG_UITYPE));
feed.populate(null, scope, results, labels);
feed.setType(format);
feed.addModule(openSearchMarkup(query, qResults));
return feed;
}
/*
* Generates the OpenSearch elements which are added to the RSS or Atom feeds as foreign markup
* wrapped in a module
*
* @param query the search query
* @param qRes the search results
* @return module
*/
private static OpenSearchModule openSearchMarkup(String query, QueryResults qRes)
{
OpenSearchModule osMod = new OpenSearchModuleImpl();
osMod.setTotalResults(qRes.getHitCount());
osMod.setStartIndex(qRes.getStart());
osMod.setItemsPerPage(qRes.getPageSize());
OSQuery osq = new OSQuery();
osq.setRole("request");
try
{
osq.setSearchTerms(URLEncoder.encode(query, "UTF-8"));
}
catch(UnsupportedEncodingException e)
{
log.error(e);
}
osq.setStartPage(1 + (qRes.getStart() / qRes.getPageSize()));
osMod.addQuery(osq);
return osMod;
}
/**
* Returns as a document the OpenSearch service document
*
* @param scope - null for the entire repository, or a collection/community handle
* @return Service Document
*/
private static org.jdom.Document getServiceDocument(String scope)
{
Namespace ns = Namespace.getNamespace(osNs);
Element root = new Element("OpenSearchDescription", ns);
root.addContent(new Element("ShortName", ns).setText(ConfigurationManager.getProperty("websvc.opensearch.shortname")));
root.addContent(new Element("LongName", ns).setText(ConfigurationManager.getProperty("websvc.opensearch.longname")));
root.addContent(new Element("Description", ns).setText(ConfigurationManager.getProperty("websvc.opensearch.description")));
root.addContent(new Element("InputEncoding", ns).setText("UTF-8"));
root.addContent(new Element("OutputEncoding", ns).setText("UTF-8"));
// optional elements
String sample = ConfigurationManager.getProperty("websvc.opensearch.samplequery");
if (sample != null && sample.length() > 0)
{
Element sq = new Element("Query", ns).setAttribute("role", "example");
root.addContent(sq.setAttribute("searchTerms", sample));
}
String tags = ConfigurationManager.getProperty("websvc.opensearch.tags");
if (tags != null && tags.length() > 0)
{
root.addContent(new Element("Tags", ns).setText(tags));
}
String contact = ConfigurationManager.getProperty("mail.admin");
if (contact != null && contact.length() > 0)
{
root.addContent(new Element("Contact", ns).setText(contact));
}
String faviconUrl = ConfigurationManager.getProperty("websvc.opensearch.faviconurl");
if (faviconUrl != null && faviconUrl.length() > 0)
{
String dim = String.valueOf(16);
String type = faviconUrl.endsWith("ico") ? "image/vnd.microsoft.icon" : "image/png";
Element fav = new Element("Image", ns).setAttribute("height", dim).setAttribute("width", dim).
setAttribute("type", type).setText(faviconUrl);
root.addContent(fav);
}
// service URLs
for (String format : formats)
{
Element url = new Element("Url", ns).setAttribute("type", getContentType(format));
StringBuffer template = new StringBuffer();
if ("html".equals(format))
{
template.append(uiUrl);
}
else
{
template.append(svcUrl);
}
template.append("?query={searchTerms}");
if(! "html".equals(format))
{
template.append("&start={startIndex?}&rpp={count?}&format=");
template.append(format);
}
if (scope != null)
{
template.append("&scope=");
template.append(scope);
}
url.setAttribute("template", template.toString());
root.addContent(url);
}
return new org.jdom.Document(root);
}
/**
* Converts a JDOM document to a W3C one
* @param jdomDoc
* @return W3C Document object
* @throws IOException
*/
private static Document jDomToW3(org.jdom.Document jdomDoc) throws IOException
{
DOMOutputter domOut = new DOMOutputter();
try
{
return domOut.output(jdomDoc);
}
catch(JDOMException jde)
{
throw new IOException("JDOM output exception");
}
}
}

View File

@@ -0,0 +1,209 @@
/*
* SubmissionConfig.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.util.Vector;
import java.util.Map;
import java.io.Serializable;
import org.apache.log4j.Logger;
/**
* Class representing a single Item Submission config definition, organized into
* steps. This class represents the structure of a single 'submission-process'
* node in the item-submission.xml configuration file.
*
* Note: Implements Serializable as it will be saved to the current session during submission.
* Please ensure that nothing is added to this class that isn't also serializable
*
* @see org.dspace.app.util.SubmissionConfigReader
* @see org.dspace.app.util.SubmissionStepConfig
*
* @author Tim Donohue, based on DCInputSet by Brian S. Hughes
* @version $Revision$
*/
public class SubmissionConfig implements Serializable
{
/** name of the item submission process */
private String submissionName = null;
/** the configuration classes for the steps in this submission process */
private SubmissionStepConfig[] submissionSteps = null;
/** whether or not this submission process is being used in a workflow * */
private boolean isWorkflow = false;
/** log4j logger */
private static Logger log = Logger.getLogger(SubmissionConfig.class);
/**
* Constructs a new Submission Configuration object, based on the XML
* configuration file (item-submission.xml)
*
* @param submissionName
* the submission process name
* @param steps
* the vector listing of step information to build
* SubmissionStepConfig objects for this submission process
* @param isWorkflowProcess
* whether this submission process is being used in a workflow or
* not. If it is a workflow process this may limit the steps that
* are available for editing.
*/
public SubmissionConfig(String submissionName, Vector steps,
boolean isWorkflowProcess)
{
this.submissionName = submissionName;
this.isWorkflow = isWorkflowProcess;
// initialize a vector of SubmissionStepConfig objects
Vector stepConfigs = new Vector();
// loop through our steps, and create SubmissionStepConfig objects
for (int stepNum = 0; stepNum < steps.size(); stepNum++)
{
Map stepInfo = (Map) steps.get(stepNum);
SubmissionStepConfig step = new SubmissionStepConfig(stepInfo);
// Only add this step to the process if either:
// (a) this is not a workflow process OR
// (b) this is a workflow process, and this step is editable in a
// workflow
if ((!this.isWorkflow)
|| ((this.isWorkflow) && step.isWorkflowEditable()))
{
// set the number of the step (starts at 0) and add it
step.setStepNumber(stepConfigs.size());
stepConfigs.add(step);
log.debug("Added step '" + step.getProcessingClassName()
+ "' as step #" + step.getStepNumber()
+ " of submission process " + submissionName);
}
}
// get steps as an array of Strings
submissionSteps = (SubmissionStepConfig[]) stepConfigs
.toArray(new SubmissionStepConfig[0]);
}
/**
* Return the name of the item submission process definition
*
* @return the name of the submission process
*/
public String getSubmissionName()
{
return submissionName;
}
/**
* Return the number of steps in this submission process
*
* @return number of steps
*/
public int getNumberOfSteps()
{
return submissionSteps.length;
}
/**
* Return whether or not this submission process is being used in a
* workflow!
*
* @return true, if it's a workflow process. false, otherwise.
*/
public boolean isWorkflow()
{
return isWorkflow;
}
/**
* Retrieve a particular Step configuration in this Item Submission Process
* configuration. The first step is numbered "0" (although step #0 is the
* implied "select collection" step).
* <p>
* If you want to retrieve the step after the "select collection" step, you
* should retrieve step #1.
*
* If the specified step isn't found, null is returned.
*
* @param stepNum
* desired step to retrieve
*
* @return the SubmissionStepConfig object for the step
*/
public SubmissionStepConfig getStep(int stepNum)
{
if ((stepNum > submissionSteps.length - 1) || (stepNum < 0))
{
return null;
}
else
{
return submissionSteps[stepNum];
}
}
/**
* Returns whether or not there are more steps which follow the specified
* "stepNum". For example, if you specify stepNum=4, then this method checks
* to see if there is a Step #5. The first step is numbered "0".
*
* @param stepNum
* the current step.
*
* @return true, if a step at "stepNum+1" exists. false, otherwise.
*/
public boolean hasMoreSteps(int stepNum)
{
if (getStep(stepNum + 1) != null)
{
return true;
}
else
{
return false;
}
}
}

View File

@@ -0,0 +1,689 @@
/*
* SubmissionConfigReader.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.io.File;
import java.util.Vector;
import java.util.HashMap;
import java.util.Map;
import java.lang.Exception;
import javax.servlet.ServletException;
import org.xml.sax.SAXException;
import org.w3c.dom.*;
import javax.xml.parsers.*;
import org.apache.log4j.Logger;
import org.dspace.core.ConfigurationManager;
/**
* Item Submission configuration generator for DSpace. Reads and parses the
* installed submission process configuration file, item-submission.xml, from
* the configuration directory. This submission process definiton details the
* ordering of the steps (and number of steps) that occur during the Item
* Submission Process. There may be multiple Item Submission processes defined,
* where each definition is assigned a unique name.
*
* The file also specifies which collections use which Item Submission process.
* At a minimum, the definitions file must define a default mapping from the
* placeholder collection # to the distinguished submission process 'default'.
* Any collections that use a custom submission process are listed paired with
* the name of the item submission process they use.
*
* @see org.dspace.app.util.SubmissionConfig
* @see org.dspace.app.util.SubmissionStepConfig
*
* @author Tim Donohue based on DCInputsReader by Brian S. Hughes
* @version $Revision$
*/
public class SubmissionConfigReader
{
/**
* The ID of the default collection. Will never be the ID of a named
* collection
*/
public static final String DEFAULT_COLLECTION = "default";
/** Prefix of the item submission definition XML file */
static final String SUBMIT_DEF_FILE_PREFIX = "item-submission";
/** Suffix of the item submission definition XML file */
static final String SUBMIT_DEF_FILE_SUFFIX = ".xml";
/** log4j logger */
private static Logger log = Logger.getLogger(SubmissionConfigReader.class);
/** The fully qualified pathname of the directory containing the Item Submission Configuration file */
private String configDir = ConfigurationManager.getProperty("dspace.dir")
+ File.separator + "config" + File.separator;
/**
* Hashmap which stores which submission process configuration is used by
* which collection, computed from the item submission config file
* (specifically, the 'submission-map' tag)
*/
private HashMap collectionToSubmissionConfig = null;
/**
* Reference to the global submission step definitions defined in the
* "step-definitions" section
*/
private HashMap stepDefns = null;
/**
* Reference to the item submission definitions defined in the
* "submission-definitions" section
*/
private HashMap submitDefns = null;
/**
* Mini-cache of last SubmissionConfig object requested (so that we don't
* always reload from scratch)
*/
private SubmissionConfig lastSubmissionConfig = null;
/**
* Load Submission Configuration from the
* item-submission.xml configuration file
*/
public SubmissionConfigReader() throws ServletException
{
buildInputs(configDir + SUBMIT_DEF_FILE_PREFIX + SUBMIT_DEF_FILE_SUFFIX);
}
/**
* Parse an XML encoded item submission configuration file.
* <P>
* Creates two main hashmaps:
* <ul>
* <li>Hashmap of Collection to Submission definition mappings -
* defines which Submission process a particular collection uses
* <li>Hashmap of all Submission definitions. List of all valid
* Submision Processes by name.
* </ul>
*/
private void buildInputs(String fileName) throws ServletException
{
collectionToSubmissionConfig = new HashMap();
submitDefns = new HashMap();
String uri = "file:" + new File(fileName).getAbsolutePath();
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder db = factory.newDocumentBuilder();
Document doc = db.parse(uri);
doNodes(doc);
}
catch (FactoryConfigurationError fe)
{
throw new ServletException(
"Cannot create Item Submission Configuration parser", fe);
}
catch (Exception e)
{
throw new ServletException(
"Error creating Item Submission Configuration: " + e);
}
}
/**
* Returns the Item Submission process config used for a particular
* collection, or the default if none is defined for the collection
*
* @param collectionHandle
* collection's unique Handle
* @param isWorkflow
* whether or not we are loading the submission process for a
* workflow
* @return the SubmissionConfig representing the item submission config
*
* @throws ServletException
* if no default submission process configuration defined
*/
public SubmissionConfig getSubmissionConfig(String collectionHandle,
boolean isWorkflow) throws ServletException
{
// get the name of the submission process config for this collection
String submitName = (String) collectionToSubmissionConfig
.get(collectionHandle);
if (submitName == null)
{
submitName = (String) collectionToSubmissionConfig
.get(DEFAULT_COLLECTION);
}
if (submitName == null)
{
throw new ServletException(
"No item submission process configuration designated as 'default' in 'submission-map' section of 'item-submission.xml'.");
}
log.debug("Loading submission process config named '" + submitName
+ "'");
// check mini-cache, and return if match
if (lastSubmissionConfig != null
&& lastSubmissionConfig.getSubmissionName().equals(submitName)
&& lastSubmissionConfig.isWorkflow() == isWorkflow)
{
log.debug("Found submission process config '" + submitName
+ "' in cache.");
return lastSubmissionConfig;
}
// cache miss - construct new SubmissionConfig
Vector steps = (Vector) submitDefns.get(submitName);
if (steps == null)
{
throw new ServletException(
"Missing the Item Submission process config '" + submitName
+ "' (or unable to load) from 'item-submission.xml'.");
}
log.debug("Submission process config '" + submitName
+ "' not in cache. Reloading from scratch.");
lastSubmissionConfig = new SubmissionConfig(submitName, steps,
isWorkflow);
log.debug("Submission process config has "
+ lastSubmissionConfig.getNumberOfSteps() + " steps listed.");
return lastSubmissionConfig;
}
/**
* Returns a particular global step definition based on its ID.
* <P>
* Global step definitions are those defined in the <step-definitions>
* section of the configuration file.
*
* @param stepID
* step's identifier
*
* @return the SubmissionStepConfig representing the step
*
* @throws ServletException
* if no default submission process configuration defined
*/
public SubmissionStepConfig getStepConfig(String stepID)
throws ServletException
{
// We should already have the step definitions loaded
if (stepDefns != null)
{
// retreive step info
Map stepInfo = (Map) stepDefns.get(stepID);
if (stepInfo != null)
return new SubmissionStepConfig(stepInfo);
}
return null;
}
/**
* Process the top level child nodes in the passed top-level node. These
* should correspond to the collection-form maps, the form definitions, and
* the display/storage word pairs.
*/
private void doNodes(Node n) throws SAXException, ServletException
{
if (n == null)
{
return;
}
Node e = getElement(n);
NodeList nl = e.getChildNodes();
int len = nl.getLength();
boolean foundMap = false;
boolean foundStepDefs = false;
boolean foundSubmitDefs = false;
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
if ((nd == null) || isEmptyTextNode(nd))
{
continue;
}
String tagName = nd.getNodeName();
if (tagName.equals("submission-map"))
{
processMap(nd);
foundMap = true;
}
else if (tagName.equals("step-definitions"))
{
processStepDefinition(nd);
foundStepDefs = true;
}
else if (tagName.equals("submission-definitions"))
{
processSubmissionDefinition(nd);
foundSubmitDefs = true;
}
// Ignore unknown nodes
}
if (!foundMap)
{
throw new ServletException(
"No collection to item submission map ('submission-map') found in 'item-submission.xml'");
}
if (!foundStepDefs)
{
throw new ServletException("No 'step-definitions' section found in 'item-submission.xml'");
}
if (!foundSubmitDefs)
{
throw new ServletException(
"No 'submission-definitions' section found in 'item-submission.xml'");
}
}
/**
* Process the submission-map section of the XML file. Each element looks
* like: <name-map collection-handle="hdl" submission-name="name" /> Extract
* the collection handle and item submission name, put name in hashmap keyed
* by the collection handle.
*/
private void processMap(Node e) throws SAXException
{
NodeList nl = e.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
if (nd.getNodeName().equals("name-map"))
{
String id = getAttribute(nd, "collection-handle");
String value = getAttribute(nd, "submission-name");
String content = getValue(nd);
if (id == null)
{
throw new SAXException(
"name-map element is missing collection-handle attribute in 'item-submission.xml'");
}
if (value == null)
{
throw new SAXException(
"name-map element is missing submission-name attribute in 'item-submission.xml'");
}
if (content != null && content.length() > 0)
{
throw new SAXException(
"name-map element has content in 'item-submission.xml', it should be empty.");
}
collectionToSubmissionConfig.put(id, value);
} // ignore any child node that isn't a "name-map"
}
}
/**
* Process the "step-definition" section of the XML file. Each element is
* formed thusly: <step id="unique-id"> ...step_fields... </step> The valid
* step_fields are: heading, processing-servlet.
* <P>
* Extract the step information (from the step_fields) and place in a
* HashMap whose key is the step's unique id.
*/
private void processStepDefinition(Node e) throws SAXException,
ServletException
{
int numStepDefns = 0;
stepDefns = new HashMap();
NodeList nl = e.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
// process each step definition
if (nd.getNodeName().equals("step"))
{
numStepDefns++;
String stepID = getAttribute(nd, "id");
if (stepID == null)
{
throw new SAXException(
"step element has no 'id' attribute in 'item-submission.xml', which is required in the 'step-definitions' section");
}
else if (stepDefns.containsKey(stepID))
{
throw new SAXException(
"There are two step elements with the id '" + stepID + "' in 'item-submission.xml'");
}
HashMap stepInfo = processStepChildNodes("step-definition", nd);
stepDefns.put(stepID, stepInfo);
} // ignore any child that is not a 'step'
}
// Sanity check number of step definitions
if (stepDefns.size() < 1)
{
throw new ServletException(
"step-definition section has no steps! A step with id='collection' is required in 'item-submission.xml'!");
}
// Sanity check to see that the required "collection" step is defined
if (!stepDefns.containsKey(SubmissionStepConfig.SELECT_COLLECTION_STEP))
{
throw new ServletException(
"The step-definition section is REQUIRED to have a step with id='"
+ SubmissionStepConfig.SELECT_COLLECTION_STEP
+ "' in 'item-submission.xml'! This step is used to ensure that a new item submission is assigned to a collection.");
}
// Sanity check to see that the required "complete" step is defined
if (!stepDefns.containsKey(SubmissionStepConfig.COMPLETE_STEP))
{
throw new ServletException(
"The step-definition section is REQUIRED to have a step with id='"
+ SubmissionStepConfig.COMPLETE_STEP
+ "' in 'item-submission.xml'! This step is used to perform all processing necessary at the completion of the submission (e.g. starting workflow).");
}
}
/**
* Process the "submission-definition" section of the XML file. Each element
* is formed thusly: <submission-process name="submitName">...steps...</submit-process>
* Each step subsection is formed: <step> ...step_fields... </step> (with
* optional "id" attribute, to reference a step from the <step-definition>
* section). The valid step_fields are: heading, class-name.
* <P>
* Extract the submission-process name and steps and place in a HashMap
* whose key is the submission-process's unique name.
*/
private void processSubmissionDefinition(Node e) throws SAXException,
ServletException
{
int numSubmitProcesses = 0;
Vector submitNames = new Vector();
// find all child nodes of the 'submission-definition' node and loop
// through
NodeList nl = e.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node nd = nl.item(i);
// process each 'submission-process' node
if (nd.getNodeName().equals("submission-process"))
{
numSubmitProcesses++;
String submitName = getAttribute(nd, "name");
if (submitName == null)
{
throw new SAXException(
"'submission-process' element has no 'name' attribute in 'item-submission.xml'");
}
else if (submitNames.contains(submitName))
{
throw new SAXException(
"There are two 'submission-process' elements with the name '"
+ submitName + "' in 'item-submission.xml'.");
}
submitNames.add(submitName);
// the 'submission-process' definition contains steps
Vector steps = new Vector();
submitDefns.put(submitName, steps);
// loop through all the 'step' nodes of the 'submission-process'
int stepNum = 0;
NodeList pl = nd.getChildNodes();
int lenStep = pl.getLength();
for (int j = 0; j < lenStep; j++)
{
Node nStep = pl.item(j);
stepNum++;
// process each 'step' definition
if (nStep.getNodeName().equals("step"))
{
// check for an 'id' attribute
String stepID = getAttribute(nStep, "id");
HashMap stepInfo;
// if this step has an id, load its information from the
// step-definition section
if ((stepID != null) && (stepID.length() > 0))
{
if (stepDefns.containsKey(stepID))
{
// load the step information from the
// step-definition
stepInfo = (HashMap) stepDefns.get(stepID);
}
else
{
throw new SAXException(
"The Submission process config named "
+ submitName
+ " contains a step with id="
+ stepID
+ ". There is no step with this 'id' defined in the 'step-definition' section of 'item-submission.xml'.");
}
// Ignore all children of a step element with an
// "id"
}
else
{
// get information about step from its children
// nodes
stepInfo = processStepChildNodes(
"submission-process", nStep);
}
steps.add(stepInfo);
} // ignore any child that is not a 'step'
}
// sanity check number of steps
if (steps.size() < 1)
{
throw new ServletException(
"Item Submission process config named "
+ submitName + " has no steps defined in 'item-submission.xml'");
}
// ALL Item Submission processes MUST BEGIN with selecting a
// Collection. So, automatically insert in the "collection" step
// (from the 'step-definition' section)
// Note: we already did a sanity check that this "collection"
// step exists.
steps.add(0, (HashMap) stepDefns
.get(SubmissionStepConfig.SELECT_COLLECTION_STEP));
// ALL Item Submission processes MUST END with the
// "Complete" processing step.
// So, automatically append in the "complete" step
// (from the 'step-definition' section)
// Note: we already did a sanity check that this "complete"
// step exists.
steps.add((HashMap) stepDefns
.get(SubmissionStepConfig.COMPLETE_STEP));
}
}
if (numSubmitProcesses == 0)
{
throw new ServletException(
"No 'submission-process' elements/definitions found in 'item-submission.xml'");
}
}
/**
* Process the children of the "step" tag of the XML file. Returns a HashMap
* of all the fields under that "step" tag, where the key is the field name,
* and the value is the field value.
*
*/
private HashMap processStepChildNodes(String configSection, Node nStep)
throws SAXException, ServletException
{
// initialize the HashMap of step Info
HashMap stepInfo = new HashMap();
NodeList flds = nStep.getChildNodes();
int lenflds = flds.getLength();
for (int k = 0; k < lenflds; k++)
{
// process each child node of a <step> tag
Node nfld = flds.item(k);
if (!isEmptyTextNode(nfld))
{
String tagName = nfld.getNodeName();
String value = getValue(nfld);
stepInfo.put(tagName, value);
}
}// end for each field
// check for ID attribute & save to step info
String stepID = getAttribute(nStep, "id");
if (stepID != null && stepID.length() > 0)
{
stepInfo.put("id", stepID);
}
// look for REQUIRED 'step' information
String missing = null;
if (stepInfo.get("processing-class") == null)
{
missing = "'processing-class'";
}
if (missing != null)
{
String msg = "Required field " + missing
+ " missing in a 'step' in the " + configSection
+ " of the item submission configuration file ('item-submission.xml')";
throw new SAXException(msg);
}
return stepInfo;
}
private Node getElement(Node nd)
{
NodeList nl = nd.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node n = nl.item(i);
if (n.getNodeType() == Node.ELEMENT_NODE)
{
return n;
}
}
return null;
}
private boolean isEmptyTextNode(Node nd)
{
boolean isEmpty = false;
if (nd.getNodeType() == Node.TEXT_NODE)
{
String text = nd.getNodeValue().trim();
if (text.length() == 0)
{
isEmpty = true;
}
}
return isEmpty;
}
/**
* Returns the value of the node's attribute named <name>
*/
private String getAttribute(Node e, String name)
{
NamedNodeMap attrs = e.getAttributes();
int len = attrs.getLength();
if (len > 0)
{
int i;
for (i = 0; i < len; i++)
{
Node attr = attrs.item(i);
if (name.equals(attr.getNodeName()))
{
return attr.getNodeValue().trim();
}
}
}
// no such attribute
return null;
}
/**
* Returns the value found in the Text node (if any) in the node list that's
* passed in.
*/
private String getValue(Node nd)
{
NodeList nl = nd.getChildNodes();
int len = nl.getLength();
for (int i = 0; i < len; i++)
{
Node n = nl.item(i);
short type = n.getNodeType();
if (type == Node.TEXT_NODE)
{
return n.getNodeValue().trim();
}
}
// Didn't find a text node
return null;
}
}

View File

@@ -0,0 +1,734 @@
/*
* SubmissionInfo.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
import org.dspace.content.InProgressSubmission;
import org.dspace.submit.AbstractProcessingStep;
import org.dspace.workflow.WorkflowItem;
/**
* Information about an item being editing with the submission UI
*
* @author Robert Tansley
* @version $Revision$
*/
public class SubmissionInfo
{
/** log4j logger */
private static Logger log = Logger.getLogger(SubmissionInfo.class);
/** The item which is being submitted */
private InProgressSubmission submissionItem = null;
/**
* The Submission process config, which holds all info about the submission
* process that this item is going through (including all steps, etc)
*/
private SubmissionConfig submissionConfig = null;
/**
* Handle of the collection where this item is being submitted
*/
private String collectionHandle = null;
/***************************************************************************
* Holds all information used to build the Progress Bar in a key,value set.
* Keys are the number of the step, followed by the number of the page
* within the step (e.g. "2.1" = The first page of Step 2) (e.g. "5.2" = The
* second page of Step 5) Values are the Headings to display for each step
* (e.g. "Describe")
**************************************************************************/
private HashMap progressBar = null;
/** The element or element_qualifier to show more input boxes for */
private String moreBoxesFor;
/** The element or element_qualifier to scroll to initially using anchor */
private String jumpToField;
/** If non-empty, form-relative indices of missing fields */
private List missingFields;
/** Specific bundle we're dealing with */
private Bundle bundle;
/** Specific bitstream we're dealing with */
private Bitstream bitstream;
/** Reader for submission process configuration file * */
private static SubmissionConfigReader submissionConfigReader;
/**
* Default Constructor - PRIVATE
* <p>
* Create a SubmissionInfo object
* using the load() method!
*
*/
private SubmissionInfo()
{
}
/**
* Loads all known submission information based on the given in progress
* submission and request object.
* <P>
* If subItem is null, then just loads the default submission information
* for a new submission.
*
* @param request
* The HTTP Servlet Request object
* @param subItem
* The in-progress submission we are loading information for
*
* @return a SubmissionInfo object
*
* @throws ServletException
* if an error occurs
*/
public static SubmissionInfo load(HttpServletRequest request, InProgressSubmission subItem) throws ServletException
{
boolean forceReload = false;
SubmissionInfo subInfo = new SubmissionInfo();
// load SubmissionConfigReader only the first time
// or if we're using a different UI now.
if (submissionConfigReader == null)
{
submissionConfigReader = new SubmissionConfigReader();
forceReload=true;
}
// save the item which is going through the submission process
subInfo.setSubmissionItem(subItem);
// Only if the submission item is created can we set its collection
String collectionHandle = SubmissionConfigReader.DEFAULT_COLLECTION;
if (subItem != null)
{
collectionHandle = subItem.getCollection().getHandle();
}
// save this collection handle to this submission info object
subInfo.setCollectionHandle(collectionHandle);
// load Submission Process config for this item's collection
// (Note: this also loads the Progress Bar info, since it is
// dependent on the Submission config)
loadSubmissionConfig(request, subInfo, forceReload);
return subInfo;
}
/**
* Is this submission in the workflow process?
*
* @return true if the current submission is in the workflow process
*/
public boolean isInWorkflow()
{
return ((this.submissionItem != null) && this.submissionItem instanceof WorkflowItem);
}
/**
* Return the current in progress submission
*
* @return the InProgressSubmission object representing the current
* submission
*/
public InProgressSubmission getSubmissionItem()
{
return this.submissionItem;
}
/**
* Updates the current in progress submission item
*
* @param subItem
* the new InProgressSubmission object
*/
public void setSubmissionItem(InProgressSubmission subItem)
{
this.submissionItem = subItem;
}
/**
* Return the current submission process config (which includes all steps
* which need to be completed for the submission to be successful)
*
* @return the SubmissionConfig object, which contains info on all the steps
* in the current submission process
*/
public SubmissionConfig getSubmissionConfig()
{
return this.submissionConfig;
}
/**
* Causes the SubmissionConfig to be completely reloaded from the XML
* configuration file (item-submission.xml).
* <P>
* Note: This also reloads the progress bar info, since the progress bar
* depends entirely on the submission process (and its steps).
*
* @param request
* The HTTP Servlet Request object
*
* @throws ServletException
* if an error occurs
*/
public void reloadSubmissionConfig(HttpServletRequest request)
throws ServletException
{
// Only if the submission item is created can we set its collection
String collectionHandle = SubmissionConfigReader.DEFAULT_COLLECTION;
if (this.submissionItem != null)
{
collectionHandle = submissionItem.getCollection().getHandle();
}
this.setCollectionHandle(collectionHandle);
// force a reload of the submission process configuration
loadSubmissionConfig(request, this, true);
}
/**
* Returns a particular global step definition based on its ID.
* <P>
* Global step definitions are those defined in the <step-definitions>
* section of the configuration file.
*
* @param stepID
* step's identifier
*
* @return the SubmissionStepConfig representing the step
*
* @throws ServletException
* if no default submission process configuration defined
*/
public SubmissionStepConfig getStepConfig(String stepID)
throws ServletException
{
return submissionConfigReader.getStepConfig(stepID);
}
/**
* Return text information suitable for logging.
* <p>
* This method is used by several of the Step classes
* to log major events during the submission process (e.g. when
* license agreement was accepted, when item was submitted,
* when it was available in DSpace, etc.)
*
* @return the type and ID of the submission, bundle and/or bitstream for
* logging
*/
public String getSubmissionLogInfo()
{
String info = "";
if (isInWorkflow())
{
info = info + "workflow_id=" + getSubmissionItem().getID();
}
else
{
info = info + "workspace_item_id" + getSubmissionItem().getID();
}
if (getBundle() != null)
{
info = info + ",bundle_id=" + getBundle().getID();
}
if (getBitstream() != null)
{
info = info + ",bitstream_id=" + getBitstream().getID();
}
return info;
}
/**
* Gets the handle of the collection to which this item is being submitted
*
* @return the collection handle
*/
public String getCollectionHandle()
{
return this.collectionHandle;
}
/**
* Sets the handle of the collection to which this item is being submitted
*
* @param handle
* the new collection handle
*/
public void setCollectionHandle(String handle)
{
this.collectionHandle = handle;
}
/**
* Return the information used to build the progress bar (this includes all
* the steps in this submission, as well as the ordering and names of the
* steps).
* <p>
* Returns a Hashmap, with the following specifics:
* <p>
* Keys are the number of the step, followed by the number of the page
* within the step
* <p>
* (e.g. "2.1" = The first page of Step 2)
* <p>
* (e.g. "5.2" = The second page of Step 5)
* <P>
* Values are the Headings to display for each step (e.g. "Describe")
*
* @return a Hashmap of Progress Bar information.
*/
public Map getProgressBarInfo()
{
return this.progressBar;
}
/**
* Return the current bitstream we're working with (This is used during
* upload processes, or user interfaces that are dealing with bitstreams)
*
* @return the Bitstream object for the bitstream
*/
public Bitstream getBitstream()
{
return this.bitstream;
}
/**
* Sets the current bitstream we're working with (This is used during upload
* processes, or user interfaces that are dealing with bitstreams)
*
* @param bits
* the bitstream
*/
public void setBitstream(Bitstream bits)
{
this.bitstream = bits;
}
/**
* Return the current bundle we're working with (This is used during upload
* processes, or user interfaces that are dealing with bundles/bitstreams)
*
* @return the Bundle object for the bundle
*/
public Bundle getBundle()
{
return this.bundle;
}
/**
* Sets the current bundle we're working with (This is used during upload
* processes, or user interfaces that are dealing with bundles/bitstreams)
*
* @param bund
* the bundle
*/
public void setBundle(Bundle bund)
{
this.bundle = bund;
}
/**
* Return form related indices of the required fields which were not filled
* out by the user.
*
* @return a List of empty fields which are required
*/
public List getMissingFields()
{
return this.missingFields;
}
/**
* Sets the form related indices of the required fields which were not
* filled out by the user.
*
* @param missing
* the List of empty fields which are required
*/
public void setMissingFields(List missing)
{
this.missingFields = missing;
}
/**
* Return metadata field which user has requested more input boxes be
* displayed (by pressing "Add More" on one of the "Describe" pages)
*
* @return the String name of the field element
*/
public String getMoreBoxesFor()
{
return this.moreBoxesFor;
}
/**
* Sets the metadata field which user has requested more input boxes be
* displayed (by pressing "Add More" on one of the "Describe" pages)
*
* @param fieldname
* the name of the field element on the page
*/
public void setMoreBoxesFor(String fieldname)
{
this.moreBoxesFor = fieldname;
}
/**
* Return metadata field which JSP should "jump to" (i.e. set focus on) when
* the JSP next loads. This is used during the Describe step.
*
* @return the String name of the field element
*/
public String getJumpToField()
{
return this.jumpToField;
}
/**
* Sets metadata field which JSP should "jump to" (i.e. set focus on) when
* the JSP next loads. This is used during the Describe step.
*
* @param fieldname
* the name of the field on the page
*/
public void setJumpToField(String fieldname)
{
this.jumpToField = fieldname;
}
/**
* Load necessary information to build the Progress Bar for the Item
* Submission Progress.
*
* This information is returned in the form of a HashMap (which is then
* stored as a part of the SubmissionInfo). The HashMap takes the following
* form:
*
* Keys - the number of the step, followed by the number of the page within
* the step (e.g. "2.1" = The first page of Step 2) (e.g. "5.2" = The second
* page of Step 5)
*
* Values - the headings to display for each step (e.g. "Describe",
* "Verify")
*
* @param request
* The HTTP Servlet Request object
* @param subInfo
* the SubmissionInfo object we are loading into
* @param forceReload
* If true, this method reloads from stratch (and overwrites
* cached progress bar info)
*
*/
private static void loadProgressBar(HttpServletRequest request,
SubmissionInfo subInfo, boolean forceReload)
{
LinkedHashMap progressBarInfo = null;
log.debug("Loading Progress Bar Info");
if (!forceReload)
{
// first, attempt to load from cache
progressBarInfo = (LinkedHashMap) loadProgressBarFromCache(request
.getSession());
}
if (progressBarInfo != null && log.isDebugEnabled())
{
log.debug("Found Progress Bar Info in cache: "
+ progressBarInfo.size()
+ " pages to display in progress bar");
}
// if unable to load from cache, must load from scratch
else
{
progressBarInfo = new LinkedHashMap();
// loop through all steps
for (int i = 0; i < subInfo.submissionConfig.getNumberOfSteps(); i++)
{
// get the current step info
SubmissionStepConfig currentStep = subInfo.submissionConfig
.getStep(i);
String stepNumber = Integer.toString(currentStep
.getStepNumber());
String stepHeading = currentStep.getHeading();
// as long as this step is visible, include it in
// the Progress Bar
if (currentStep.isVisible())
{
// default to just one page in this step
int numPages = 1;
try
{
// load the processing class for this step
ClassLoader loader = subInfo.getClass()
.getClassLoader();
Class stepClass = loader.loadClass(currentStep
.getProcessingClassName());
// call the "getNumberOfPages()" method of the class
// to get it's number of pages
AbstractProcessingStep step = (AbstractProcessingStep) stepClass
.newInstance();
// get number of pages from servlet
numPages = step.getNumberOfPages(request, subInfo);
}
catch (Exception e)
{
log.error(
"Error loading progress bar information from Step Class '"
+ currentStep.getProcessingClassName()
+ "' Error:", e);
}
// save each of the step's pages to the progress bar
for (int j = 1; j <= numPages; j++)
{
String pageNumber = Integer.toString(j);
// store ("stepNumber.pageNumber", Heading) for each
// page in the step
progressBarInfo.put(stepNumber + "." + pageNumber,
stepHeading);
}// end for each page
}
}// end for each step
log.debug("Loaded Progress Bar Info from scratch: "
+ progressBarInfo.size()
+ " pages to display in progress bar");
// cache this new progress bar
saveProgressBarToCache(request.getSession(), progressBarInfo);
}// end if null
// save progressBarInfo to submission Info
subInfo.progressBar = progressBarInfo;
}
/**
* Saves all progress bar information into session cache. This saves us from
* having to reload this same progress bar over and over again.
*
* @param session
* The HTTP Session object
* @param progressBarInfo
* The progress bar info to cache
*
*/
private static void saveProgressBarToCache(HttpSession session,
HashMap progressBarInfo)
{
// cache progress bar info to Session
session.setAttribute("submission.progressbar", progressBarInfo);
}
/**
* Attempts to retrieve progress bar information (for a particular
* collection) from session cache.
*
* If the progress bar info cannot be found, returns null
*
* @param session
* The HTTP Session object
*
* @return progressBarInfo HashMap (if found), or null (if not)
*
*/
private static HashMap loadProgressBarFromCache(HttpSession session)
{
return (HashMap) session.getAttribute("submission.progressbar");
}
/**
* Loads SubmissionConfig object for the given submission info object. If a
* SubmissionConfig object cannot be loaded, a Servlet Error is thrown.
* <p>
* This method just loads this SubmissionConfig object internally, so that
* it is available via a call to "getSubmissionConfig()"
*
* @param request
* The HTTP Servlet Request object
* @param subInfo
* the SubmissionInfo object we are loading into
* @param forceReload
* If true, this method reloads from stratch (and overwrites
* cached SubmissionConfig)
*
*/
private static void loadSubmissionConfig(HttpServletRequest request,
SubmissionInfo subInfo, boolean forceReload)
throws ServletException
{
log.debug("Loading Submission Config information");
if (!forceReload)
{
// first, try to load from cache
subInfo.submissionConfig = loadSubmissionConfigFromCache(request
.getSession(), subInfo.getCollectionHandle(), subInfo
.isInWorkflow());
}
if (subInfo.submissionConfig == null || forceReload)
{
// reload the proper Submission process config
// (by reading the XML config file)
subInfo.submissionConfig = submissionConfigReader
.getSubmissionConfig(subInfo.getCollectionHandle(), subInfo
.isInWorkflow());
// cache this new submission process configuration
saveSubmissionConfigToCache(request.getSession(),
subInfo.submissionConfig, subInfo.getCollectionHandle(),
subInfo.isInWorkflow());
// also must force reload Progress Bar info,
// since it's based on the Submission config
loadProgressBar(request, subInfo, true);
}
else
{
log.debug("Found Submission Config in session cache!");
// try and reload progress bar from cache
loadProgressBar(request, subInfo, false);
}
}
/**
* Saves SubmissionConfig object into session cache. This saves us from
* having to reload this object during every "Step".
*
* @param session
* The HTTP Session object
* @param subConfig
* The SubmissionConfig to cache
* @param collectionHandle
* The Collection handle this SubmissionConfig corresponds to
* @param isWorkflow
* Whether this SubmissionConfig corresponds to a workflow
*
*
*/
private static void saveSubmissionConfigToCache(HttpSession session,
SubmissionConfig subConfig, String collectionHandle,
boolean isWorkflow)
{
// cache the submission process config
// and the collection it corresponds to
session.setAttribute("submission.config", subConfig);
session.setAttribute("submission.config.collection", collectionHandle);
session.setAttribute("submission.config.isWorkflow", new Boolean(
isWorkflow));
}
/**
* Loads SubmissionConfig object from session cache for the given
* Collection. If a SubmissionConfig object cannot be found, null is
* returned.
*
* @param session
* The HTTP Session object
* @param collectionHandle
* The Collection handle of the SubmissionConfig to load
* @param isWorkflow
* whether or not we loading the Submission process for a
* workflow item
*
* @return The cached SubmissionConfig for this collection
*/
private static SubmissionConfig loadSubmissionConfigFromCache(
HttpSession session, String collectionHandle, boolean isWorkflow)
{
// attempt to load submission process config
// from cache for the current collection
String cachedHandle = (String) session
.getAttribute("submission.config.collection");
Boolean cachedIsWorkflow = (Boolean) session
.getAttribute("submission.config.isWorkflow");
// only load from cache if the collection handle and
// workflow item status both match!
if (collectionHandle.equals(cachedHandle)
&& isWorkflow == cachedIsWorkflow.booleanValue())
{
return (SubmissionConfig) session.getAttribute("submission.config");
}
else
{
return null;
}
}
}

View File

@@ -0,0 +1,256 @@
/*
* SubmissionStepConfig.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.util.Map;
import java.io.Serializable;
import org.apache.log4j.Logger;
/**
* Class representing configuration for a single step within an Item Submission
* Process. In other words, this is a single step in the SubmissionConfig class.
* This class represents the structure of a single 'step' node in the
* item-submission.xml configuration file.
*
* Note: Implements Serializable as it will be saved to the current session during submission.
* Please ensure that nothing is added to this class that isn't also serializable
*
* @see org.dspace.app.util.SubmissionConfigReader
* @see org.dspace.app.util.SubmissionConfig
*
* @author Tim Donohue
* @version $Revision$
*/
public class SubmissionStepConfig implements Serializable
{
/*
* The identifier for the Select Collection step
*/
public static String SELECT_COLLECTION_STEP = "collection";
/*
* The identifier for the Completion step
*/
public static String COMPLETE_STEP = "complete";
/**
* the id for this step ('id' only exists if this step is defined in the
* <step-definitions> section)
*/
private String id = null;
/** the heading for this step */
private String heading = null;
/** the name of the java processing class for this step */
private String processingClassName = null;
/** whether or not this step is editable during workflow (default=true) */
private boolean workflowEditable = true;
/**
* The full name of the JSP-UI binding class for this step. This field is
* ONLY used by the JSP-UI.
**/
private String jspBindingClassName = null;
/**
* The full name of the Manakin XML-UI Transformer class which will generate
* the necessary DRI for displaying this class in Manakin. This field is
* ONLY used by the Manakin XML-UI.
*/
private String xmlBindingClassName = null;
/** The number of this step in the current SubmissionConfig */
private int number = -1;
/** log4j logger */
private static Logger log = Logger.getLogger(SubmissionStepConfig.class);
/**
* Class constructor for creating an empty SubmissionStepConfig object
*/
public SubmissionStepConfig()
{
}
/**
* Class constructor for creating a SubmissionStepConfig object based on the
* contents of a HashMap initialized by the SubmissionConfig object.
*
* @param stepMap
* the HashMap containing all required information about this
* step
*/
public SubmissionStepConfig(Map stepMap)
{
id = (String) stepMap.get("id");
heading = (String) stepMap.get("heading");
processingClassName = (String) stepMap.get("processing-class");
jspBindingClassName = (String) stepMap.get("jspui-binding");
xmlBindingClassName = (String) stepMap.get("xmlui-binding");
String wfEditString = (String) stepMap.get("workflow-editable");
if (wfEditString != null && wfEditString.length() > 0)
{
workflowEditable = new Boolean(wfEditString).booleanValue();
}
}
/**
* Get the ID for this step. An ID is only defined if the step exists in the
* <step-definitions> section. This ID field is used to reference special
* steps (like the required step with id="collection")
*
* @return the step ID
*/
public String getId()
{
return id;
}
/**
* Get the heading for this step. This can either be a property from
* Messages.properties, or the actual heading text. If this "heading"
* contains a period(.) it is assumed to reference Messages.properties.
*
* @return the heading
*/
public String getHeading()
{
return heading;
}
/**
* Get the class which handles all processing for this step.
* <p>
* This class must extend the org.dspace.submit.AbstractProcessingStep class,
* and provide processing for BOTH the JSP-UI and XML-UI
*
* @return the class's full class path (e.g.
* "org.dspace.submit.step.MySampleStep")
*/
public String getProcessingClassName()
{
return processingClassName;
}
/**
* Retrieve the full class name of the Manakin Transformer which will
* generate this step's DRI, for display in Manakin XML-UI.
* <P>
* This class must extend the
* org.dspace.app.xmlui.aspect.submission.StepTransformer class.
* <P>
* This property is only used by the Manakin XML-UI, and therefore is not
* relevant if you are using the JSP-UI.
*
* @return the full java class name of the Transformer to use for this step
*/
public String getXMLUIClassName()
{
return xmlBindingClassName;
}
/**
* Retrieve the full class name of the JSP-UI "binding" class which will
* initialize and call the necessary JSPs for display in the JSP-UI
* <P>
* This class must extend the
* org.dspace.app.webui.submit.JSPStep class.
* <P>
* This property is only used by the JSP-UI, and therefore is not
* relevant if you are using the XML-UI (aka. Manakin).
*
* @return the full java class name of the JSPStep to use for this step
*/
public String getJSPUIClassName()
{
return jspBindingClassName;
}
/**
* Get the number of this step in the current Submission process config.
* Step numbers start with #0 (although step #0 is ALWAYS the special
* "select collection" step)
*
* @return the number of this step in the current SubmissionConfig
*/
public int getStepNumber()
{
return number;
}
/**
* Sets the number of this step in the current Submission process config.
* Step numbers start with #0 (although step #0 is ALWAYS the special
* "select collection" step)
*
* @param stepNum
* the step number.
*/
protected void setStepNumber(int stepNum)
{
this.number = stepNum;
}
/**
* Whether or not this step is editable during workflow processing. If
* "true", then this step will appear in the "Edit Metadata" stage of the
* workflow process.
*
* @return if step is editable in a workflow process
*/
public boolean isWorkflowEditable()
{
return workflowEditable;
}
/**
* Whether or not this step is visible within the Progress Bar. A step is
* only visible if it has been assigned a Heading, otherwise it's invisible
*
* @return if step is visible within the progress bar
*/
public boolean isVisible()
{
return ((heading != null) && (heading.length() > 0));
}
}

View File

@@ -0,0 +1,483 @@
/*
* SyndicationFeed.java
*
* Version: $Revision: 1.1 $
*
* Date: $Date: 2009/10/19 21:51:54 $
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.w3c.dom.Document;
import org.dspace.content.Bitstream;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DCDate;
import org.dspace.content.DCValue;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.MetadataSchema;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Constants;
import org.dspace.handle.HandleManager;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.synd.SyndFeedImpl;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndEntryImpl;
import com.sun.syndication.feed.synd.SyndImage;
import com.sun.syndication.feed.synd.SyndImageImpl;
import com.sun.syndication.feed.synd.SyndPerson;
import com.sun.syndication.feed.synd.SyndPersonImpl;
import com.sun.syndication.feed.synd.SyndContent;
import com.sun.syndication.feed.synd.SyndContentImpl;
import com.sun.syndication.feed.module.DCModuleImpl;
import com.sun.syndication.feed.module.DCModule;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.SyndFeedOutput;
import com.sun.syndication.io.FeedException;
import org.apache.log4j.Logger;
/**
* Invoke ROME library to assemble a generic model of a syndication
* for the given list of Items and scope. Consults configuration for the
* metadata bindings to feed elements. Uses ROME's output drivers to
* return any of the implemented formats, e.g. RSS 1.0, RSS 2.0, ATOM 1.0.
*
* The feed generator and OpenSearch call on this class so feed contents are
* uniform for both.
*
* @author Larry Stone
*/
public class SyndicationFeed
{
private static final Logger log = Logger.getLogger(SyndicationFeed.class);
/** i18n key values */
public static final String MSG_UNTITLED = "notitle";
public static final String MSG_LOGO_TITLE = "logo.title";
public static final String MSG_FEED_TITLE = "feed.title";
public static final String MSG_FEED_DESCRIPTION = "general-feed.description";
public static final String MSG_METADATA = "metadata.";
public static final String MSG_UITYPE = "ui.type";
// UI keywords
public static final String UITYPE_XMLUI = "xmlui";
public static final String UITYPE_JSPUI = "jspui";
// default DC fields for entry
private static String defaultTitleField = "dc.title";
private static String defaultAuthorField = "dc.contributor.author";
private static String defaultDateField = "dc.date.issued";
private static String defaultDescriptionFields = "dc.description.abstract, dc.description, dc.title.alternative, dc.title";
// metadata field for Item title in entry:
private static String titleField =
getDefaultedConfiguration("webui.feed.item.title", defaultTitleField);
// metadata field for Item publication date in entry:
private static String dateField =
getDefaultedConfiguration("webui.feed.item.date", defaultDateField);
// metadata field for Item description in entry:
private static String descriptionFields[] =
getDefaultedConfiguration("webui.feed.item.description", defaultDescriptionFields).split("\\s*,\\s*");
private static String authorField =
getDefaultedConfiguration("webui.feed.item.author", defaultAuthorField);
// metadata field for Item dc:creator field in entry's DCModule (no default)
private static String dcCreatorField = ConfigurationManager.getProperty("webui.feed.item.dc.creator");
// metadata field for Item dc:date field in entry's DCModule (no default)
private static String dcDateField = ConfigurationManager.getProperty("webui.feed.item.dc.date");
// metadata field for Item dc:author field in entry's DCModule (no default)
private static String dcDescriptionField = ConfigurationManager.getProperty("webui.feed.item.dc.description");
// -------- Instance variables:
// the feed object we are building
private SyndFeed feed = null;
// memory of UI that called us, "xmlui" or "jspui"
// affects Bitstream retrieval URL and I18N keys
private String uiType = null;
/**
* Constructor.
* @param ui either "xmlui" or "jspui"
*/
public SyndicationFeed(String ui)
{
feed = new SyndFeedImpl();
uiType = ui;
}
/**
* Returns list of metadata selectors used to compose the description element
*
* @return selector list - format 'schema.element[.qualifier]'
*/
public static String[] getDescriptionSelectors()
{
return descriptionFields;
}
/**
* Fills in the feed and entry-level metadata from DSpace objects.
*/
public void populate(HttpServletRequest request, DSpaceObject dso,
DSpaceObject items[], Map<String, String> labels)
{
String logoURL = null;
String objectURL = null;
String defaultTitle = null;
// dso is null for the whole site, or a search without scope
if (dso == null)
{
defaultTitle = ConfigurationManager.getProperty("dspace.name");
feed.setDescription(localize(labels, MSG_FEED_DESCRIPTION));
objectURL = resolveURL(request, null);
logoURL = ConfigurationManager.getProperty("webui.feed.logo.url");
}
else
{
Bitstream logo = null;
if (dso.getType() == Constants.COLLECTION)
{
Collection col = (Collection)dso;
defaultTitle = col.getMetadata("name");
feed.setDescription(col.getMetadata("short_description"));
logo = col.getLogo();
}
else if (dso.getType() == Constants.COMMUNITY)
{
Community comm = (Community)dso;
defaultTitle = comm.getMetadata("name");
feed.setDescription(comm.getMetadata("short_description"));
logo = comm.getLogo();
}
objectURL = resolveURL(request, dso);
if (logo != null)
logoURL = urlOfBitstream(request, logo);
}
feed.setTitle(labels.containsKey(MSG_FEED_TITLE) ?
localize(labels, MSG_FEED_TITLE) : defaultTitle);
feed.setLink(objectURL);
feed.setPublishedDate(new Date());
feed.setUri(objectURL);
// add logo if we found one:
if (logoURL != null)
{
// we use the path to the logo for this, the logo itself cannot
// be contained in the rdf. Not all RSS-viewers show this logo.
SyndImage image = new SyndImageImpl();
image.setLink(objectURL);
image.setTitle(localize(labels, MSG_LOGO_TITLE));
image.setUrl(logoURL);
feed.setImage(image);
}
// add entries for items
if (items != null)
{
List<SyndEntry> entries = new ArrayList<SyndEntry>();
for (DSpaceObject itemDSO : items)
{
if (itemDSO.getType() != Constants.ITEM)
continue;
Item item = (Item)itemDSO;
boolean hasDate = false;
SyndEntry entry = new SyndEntryImpl();
entries.add(entry);
String entryURL = resolveURL(request, item);
entry.setLink(entryURL);
entry.setUri(entryURL);
String title = getOneDC(item, titleField);
entry.setTitle(title == null ? localize(labels, MSG_UNTITLED) : title);
// "published" date -- should be dc.date.issued
String pubDate = getOneDC(item, dateField);
if (pubDate != null)
{
entry.setPublishedDate((new DCDate(pubDate)).toDate());
hasDate = true;
}
// date of last change to Item
entry.setUpdatedDate(item.getLastModified());
StringBuffer db = new StringBuffer();
for (String df : descriptionFields)
{
// Special Case: "(date)" in field name means render as date
boolean isDate = df.indexOf("(date)") > 0;
if (isDate)
df = df.replaceAll("\\(date\\)", "");
DCValue dcv[] = item.getMetadata(df);
if (dcv.length > 0)
{
String fieldLabel = labels.get(MSG_METADATA + df);
if (fieldLabel != null && fieldLabel.length()>0)
db.append(fieldLabel + ": ");
boolean first = true;
for (DCValue v : dcv)
{
if (first)
first = false;
else
db.append("; ");
db.append(isDate ? new DCDate(v.value).toString() : v.value);
}
db.append("\n");
}
}
if (db.length() > 0)
{
SyndContent desc = new SyndContentImpl();
desc.setType("text/plain");
desc.setValue(db.toString());
entry.setDescription(desc);
}
// This gets the authors into an ATOM feed
DCValue authors[] = item.getMetadata(authorField);
if (authors.length > 0)
{
List<SyndPerson> creators = new ArrayList<SyndPerson>();
for (DCValue author : authors)
{
SyndPerson sp = new SyndPersonImpl();
sp.setName(author.value);
creators.add(sp);
}
entry.setAuthors(creators);
}
// only add DC module if any DC fields are configured
if (dcCreatorField != null || dcDateField != null ||
dcDescriptionField != null)
{
DCModule dc = new DCModuleImpl();
if (dcCreatorField != null)
{
DCValue dcAuthors[] = item.getMetadata(dcCreatorField);
if (dcAuthors.length > 0)
{
List<String> creators = new ArrayList<String>();
for (DCValue author : dcAuthors)
creators.add(author.value);
dc.setCreators(creators);
}
}
if (dcDateField != null && !hasDate)
{
DCValue v[] = item.getMetadata(dcDateField);
if (v.length > 0)
dc.setDate((new DCDate(v[0].value)).toDate());
}
if (dcDescriptionField != null)
{
DCValue v[] = item.getMetadata(dcDescriptionField);
if (v.length > 0)
{
StringBuffer descs = new StringBuffer();
for (DCValue d : v)
{
if (descs.length() > 0)
descs.append("\n\n");
descs.append(d.value);
}
dc.setDescription(descs.toString());
}
}
entry.getModules().add(dc);
}
}
feed.setEntries(entries);
}
}
/**
* Sets the feed type for XML delivery, e.g. "rss_1.0", "atom_1.0"
* Must match one of ROME's configured generators, see rome.properties
* (currently rss_1.0, rss_2.0, atom_1.0, atom_0.3)
*/
public void setType(String feedType)
{
feed.setFeedType(feedType);
// XXX FIXME: workaround ROME 1.0 bug, it puts invalid image element in rss1.0
if (feedType.equals("rss_1.0"))
feed.setImage(null);
}
/**
* @return the feed we built as DOM Document
*/
public Document outputW3CDom()
throws FeedException
{
try
{
SyndFeedOutput feedWriter = new SyndFeedOutput();
return feedWriter.outputW3CDom(feed);
}
catch (FeedException e)
{
log.error(e);
throw e;
}
}
/**
* @return the feed we built as serialized XML string
*/
public String outputString()
throws FeedException
{
SyndFeedOutput feedWriter = new SyndFeedOutput();
return feedWriter.outputString(feed);
}
/**
* send the output to designated Writer
*/
public void output(java.io.Writer writer)
throws FeedException, IOException
{
SyndFeedOutput feedWriter = new SyndFeedOutput();
feedWriter.output(feed, writer);
}
/**
* @add a ROME plugin module (e.g. for OpenSearch) at the feed level
*/
public void addModule(Module m)
{
feed.getModules().add(m);
}
// utility to get config property with default value when not set.
private static String getDefaultedConfiguration(String key, String dfl)
{
String result = ConfigurationManager.getProperty(key);
return (result == null) ? dfl : result;
}
// returns absolute URL to download content of bitstream (which might not belong to any Item)
private String urlOfBitstream(HttpServletRequest request, Bitstream logo)
{
String name = logo.getName();
return resolveURL(request,null) +
(uiType.equalsIgnoreCase(UITYPE_XMLUI) ?"/bitstream/id/":"/retrieve/") +
logo.getID()+"/"+(name == null?"":name);
}
/**
* Return a url to the DSpace object, either use the official
* handle for the item or build a url based upon the current server.
*
* If the dspaceobject is null then a local url to the repository is generated.
*
* @param dso The object to refrence, null if to the repository.
* @return
*/
private String baseURL = null; // cache the result for null
private String resolveURL(HttpServletRequest request, DSpaceObject dso)
{
// If no object given then just link to the whole repository,
// since no offical handle exists so we have to use local resolution.
if (dso == null)
{
if (baseURL == null)
{
if (request == null)
baseURL = ConfigurationManager.getProperty("dspace.url");
else
{
baseURL = (request.isSecure()) ? "https://" : "http://";
baseURL += ConfigurationManager.getProperty("dspace.hostname");
baseURL += ":" + request.getServerPort();
baseURL += request.getContextPath();
}
}
return baseURL;
}
// return a link to handle in repository
else if (ConfigurationManager.getBooleanProperty("webui.feed.localresolve"))
{
return resolveURL(request, null) + "/handle/" + dso.getHandle();
}
// link to the Handle server or other persistent URL source
else
{
return HandleManager.getCanonicalForm(dso.getHandle());
}
}
// retrieve text for localization key, or mark untranslated
private String localize(Map<String, String> labels, String s)
{
return labels.containsKey(s) ? labels.get(s) : ("Untranslated:"+s);
}
// spoonful of syntactic sugar when we only need first value
private String getOneDC(Item item, String field)
{
DCValue dcv[] = item.getMetadata(field);
return (dcv.length > 0) ? dcv[0].value : null;
}
}

View File

@@ -0,0 +1,370 @@
/*
* Util.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.util;
import java.io.InputStream;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
import org.dspace.core.Constants;
/**
* Miscellaneous utility methods
*
* @author Robert Tansley
* @author Mark Diggory
* @version $Revision$
*/
public class Util {
// cache for source version result
private static String sourceVersion = null;
private static Logger log = Logger.getLogger(Util.class);
/**
* Utility method to convert spaces in a string to HTML non-break space
* elements.
*
* @param s
* string to change spaces in
* @return the string passed in with spaces converted to HTML non-break
* spaces
*/
public static String nonBreakSpace(String s) {
StringBuffer newString = new StringBuffer();
for (int i = 0; i < s.length(); i++)
{
char ch = s.charAt(i);
if (ch == ' ')
{
newString.append("&nbsp;");
}
else
{
newString.append(ch);
}
}
return newString.toString();
}
/**
* Encode a bitstream name for inclusion in a URL in an HTML document. This
* differs from the usual URL-encoding, since we want pathname separators to
* be passed through verbatim; this is required so that relative paths in
* bitstream names and HTML references work correctly.
* <P>
* If the link to a bitstream is generated with the pathname separators
* escaped (e.g. "%2F" instead of "/") then the Web user agent perceives it
* to be one pathname element, and relative URI paths within that document
* containing ".." elements will be handled incorrectly.
* <P>
*
* @param stringIn
* input string to encode
* @param encoding
* character encoding, e.g. UTF-8
* @return the encoded string
*/
public static String encodeBitstreamName(String stringIn, String encoding) throws java.io.UnsupportedEncodingException {
// FIXME: This should be moved elsewhere, as it is used outside the UI
StringBuffer out = new StringBuffer();
final String[] pctEncoding = { "%00", "%01", "%02", "%03", "%04",
"%05", "%06", "%07", "%08", "%09", "%0a", "%0b", "%0c", "%0d",
"%0e", "%0f", "%10", "%11", "%12", "%13", "%14", "%15", "%16",
"%17", "%18", "%19", "%1a", "%1b", "%1c", "%1d", "%1e", "%1f",
"%20", "%21", "%22", "%23", "%24", "%25", "%26", "%27", "%28",
"%29", "%2a", "%2b", "%2c", "%2d", "%2e", "%2f", "%30", "%31",
"%32", "%33", "%34", "%35", "%36", "%37", "%38", "%39", "%3a",
"%3b", "%3c", "%3d", "%3e", "%3f", "%40", "%41", "%42", "%43",
"%44", "%45", "%46", "%47", "%48", "%49", "%4a", "%4b", "%4c",
"%4d", "%4e", "%4f", "%50", "%51", "%52", "%53", "%54", "%55",
"%56", "%57", "%58", "%59", "%5a", "%5b", "%5c", "%5d", "%5e",
"%5f", "%60", "%61", "%62", "%63", "%64", "%65", "%66", "%67",
"%68", "%69", "%6a", "%6b", "%6c", "%6d", "%6e", "%6f", "%70",
"%71", "%72", "%73", "%74", "%75", "%76", "%77", "%78", "%79",
"%7a", "%7b", "%7c", "%7d", "%7e", "%7f", "%80", "%81", "%82",
"%83", "%84", "%85", "%86", "%87", "%88", "%89", "%8a", "%8b",
"%8c", "%8d", "%8e", "%8f", "%90", "%91", "%92", "%93", "%94",
"%95", "%96", "%97", "%98", "%99", "%9a", "%9b", "%9c", "%9d",
"%9e", "%9f", "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6",
"%a7", "%a8", "%a9", "%aa", "%ab", "%ac", "%ad", "%ae", "%af",
"%b0", "%b1", "%b2", "%b3", "%b4", "%b5", "%b6", "%b7", "%b8",
"%b9", "%ba", "%bb", "%bc", "%bd", "%be", "%bf", "%c0", "%c1",
"%c2", "%c3", "%c4", "%c5", "%c6", "%c7", "%c8", "%c9", "%ca",
"%cb", "%cc", "%cd", "%ce", "%cf", "%d0", "%d1", "%d2", "%d3",
"%d4", "%d5", "%d6", "%d7", "%d8", "%d9", "%da", "%db", "%dc",
"%dd", "%de", "%df", "%e0", "%e1", "%e2", "%e3", "%e4", "%e5",
"%e6", "%e7", "%e8", "%e9", "%ea", "%eb", "%ec", "%ed", "%ee",
"%ef", "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7",
"%f8", "%f9", "%fa", "%fb", "%fc", "%fd", "%fe", "%ff" };
byte[] bytes = stringIn.getBytes(encoding);
for (int i = 0; i < bytes.length; i++)
{
// Any unreserved char or "/" goes through unencoded
if ((bytes[i] >= 'A' && bytes[i] <= 'Z')
|| (bytes[i] >= 'a' && bytes[i] <= 'z')
|| (bytes[i] >= '0' && bytes[i] <= '9') || bytes[i] == '-'
|| bytes[i] == '.' || bytes[i] == '_' || bytes[i] == '~'
|| bytes[i] == '/')
{
out.append((char) bytes[i]);
}
else if (bytes[i] >= 0)
{
// encode other chars (byte code < 128)
out.append(pctEncoding[bytes[i]]);
}
else
{
// encode other chars (byte code > 127, so it appears as
// negative in Java signed byte data type)
out.append(pctEncoding[256 + bytes[i]]);
}
}
log.debug("encoded \"" + stringIn + "\" to \"" + out.toString() + "\"");
return out.toString();
}
/** Version of encodeBitstreamName with one parameter, uses default encoding
* <P>
* @param stringIn
* input string to encode
* @return the encoded string
*/
public static String encodeBitstreamName(String stringIn) throws java.io.UnsupportedEncodingException {
return encodeBitstreamName(stringIn, Constants.DEFAULT_ENCODING);
}
/**
* Formats the file size. Examples:
*
* - 50 = 50B
* - 1024 = 1KB
* - 1,024,000 = 1MB etc
*
* The numbers are formatted using java Locales
*
* @param in The number to covnert
* @return the file size as a String
*/
public static String formatFileSize(double in) {
// Work out the size of the file, and format appropriatly
// FIXME: When full i18n support is available, use the user's Locale
// rather than the default Locale.
NumberFormat nf = NumberFormat.getNumberInstance(Locale.getDefault());
DecimalFormat df = (DecimalFormat)nf;
df.applyPattern("###,###.##");
if (in < 1024)
{
df.applyPattern("0");
return df.format(in) + " " + "B";
}
else if (in < 1024000)
{
in = in / 1024;
return df.format(in) + " " + "kB";
}
else if (in < 1024000000)
{
in = in / 1024000;
return df.format(in) + " " + "MB";
}
else
{
in = in / 1024000000;
return df.format(in) + " " + "GB";
}
}
/**
* Obtain a parameter from the given request as an int. <code>-1</code> is
* returned if the parameter is garbled or does not exist.
*
* @param request
* the HTTP request
* @param param
* the name of the parameter
*
* @return the integer value of the parameter, or -1
*/
public static int getIntParameter(HttpServletRequest request, String param)
{
String val = request.getParameter(param);
try
{
return Integer.parseInt(val.trim());
}
catch (Exception e)
{
// Problem with parameter
return -1;
}
}
/**
* Obtain an array of int parameters from the given request as an int. null
* is returned if parameter doesn't exist. <code>-1</code> is returned in
* array locations if that particular value is garbled.
*
* @param request
* the HTTP request
* @param param
* the name of the parameter
*
* @return array of integers or null
*/
public static int[] getIntParameters(HttpServletRequest request,
String param)
{
String[] request_values = request.getParameterValues(param);
if (request_values == null)
{
return null;
}
int[] return_values = new int[request_values.length];
for (int x = 0; x < return_values.length; x++)
{
try
{
return_values[x] = Integer.parseInt(request_values[x]);
}
catch (Exception e)
{
// Problem with parameter, stuff -1 in this slot
return_values[x] = -1;
}
}
return return_values;
}
/**
* Obtain a parameter from the given request as a boolean.
* <code>false</code> is returned if the parameter is garbled or does not
* exist.
*
* @param request
* the HTTP request
* @param param
* the name of the parameter
*
* @return the integer value of the parameter, or -1
*/
public static boolean getBoolParameter(HttpServletRequest request,
String param)
{
return ((request.getParameter(param) != null) && request.getParameter(
param).equals("true"));
}
/**
* Get the button the user pressed on a submitted form. All buttons should
* start with the text <code>submit</code> for this to work. A default
* should be supplied, since often the browser will submit a form with no
* submit button pressed if the user presses enter.
*
* @param request
* the HTTP request
* @param def
* the default button
*
* @return the button pressed
*/
public static String getSubmitButton(HttpServletRequest request, String def)
{
Enumeration e = request.getParameterNames();
while (e.hasMoreElements())
{
String parameterName = (String) e.nextElement();
if (parameterName.startsWith("submit"))
{
return parameterName;
}
}
return def;
}
/**
* Gets Maven version string of the source that built this instance.
* @return string containing version, e.g. "1.5.2"; ends in "-SNAPSHOT" for development versions.
*/
public static String getSourceVersion()
{
if (sourceVersion == null)
{
Properties constants = new Properties();
try
{
InputStream cis = Util.class.getResourceAsStream
("/META-INF/maven/org.dspace/dspace-api/pom.properties");
constants.load(cis);
}
catch(Exception e)
{
log.error(e.getMessage(),e);
}
sourceVersion = constants.getProperty("version", "none");
}
return sourceVersion;
}
}

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -37,7 +35,7 @@
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.eperson;
package org.dspace.authenticate;
import java.io.IOException;
@@ -58,7 +56,6 @@ import org.dspace.core.Context;
import org.dspace.core.PluginManager;
import org.dspace.core.LogManager;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.AuthenticationMethod;
/**
* Access point for the stackable authentication methods.
@@ -299,6 +296,7 @@ public class AuthenticationManager
*/
public static int[] getSpecialGroups(Context context,
HttpServletRequest request)
throws SQLException
{
ArrayList gll = new ArrayList();
int totalLen = 0;

View File

@@ -5,8 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -19,8 +18,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
@@ -37,7 +35,7 @@
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.eperson;
package org.dspace.authenticate;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -162,28 +160,29 @@ public interface AuthenticationMethod {
public boolean isImplicit();
/**
* Get list of extra groups that user implicitly belongs to.
* Returns IDs of any EPerson-groups that the user authenticated by
* this request is <em>implicitly</em> a member of -- e.g.
* a group that depends on the client network-address.
* Get list of extra groups that user implicitly belongs to. Note that this
* method will be invoked regardless of the authentication status of the
* user (logged-in or not) e.g. a group that depends on the client
* network-address.
* <p>
* It might make sense to implement this method by itself in a separate
* authentication method that just adds special groups, if the
* code doesn't belong with any existing auth method.
* The stackable authentication system was designed expressly to
* separate functions into "stacked" methods to keep your
* site-specific code modular and tidy.
* authentication method that just adds special groups, if the code doesn't
* belong with any existing auth method. The stackable authentication system
* was designed expressly to separate functions into "stacked" methods to
* keep your site-specific code modular and tidy.
*
* @param context
* A valid DSpace context.
*
* @param request
* The request that started this operation, or null if not applicable.
* The request that started this operation, or null if not
* applicable.
*
* @return array of EPerson-group IDs, possibly 0-length, but
* never <code>null</code>.
* @return array of EPerson-group IDs, possibly 0-length, but never
* <code>null</code>.
*/
public int[] getSpecialGroups(Context context, HttpServletRequest request);
public int[] getSpecialGroups(Context context, HttpServletRequest request)
throws SQLException;
/**
* Authenticate the given or implicit credentials.

View File

@@ -0,0 +1,340 @@
/*
* IPAuthentication.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.authenticate;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
/**
* Adds users to special groups based on IP address. Configuration parameter
* form is:
* <P>
* {@code authentication.ip.<GROUPNAME> = <IPRANGE>[, <IPRANGE> ...]}
* <P>
* e.g. {@code authentication.ip.MIT = 18., 192.25.0.0/255.255.0.0}
* <P>
* Negative matches can be included by prepending the range with a '-'. For example if you want
* to include all of a class B network except for users of a contained class c network, you could use:
* <P>
* 111.222,-111.222.333.
* <p>
* For supported IP ranges see {@link org.dspace.authenticate.IPMatcher}.
*
* @version $Revision$
* @author Robert Tansley
*/
public class IPAuthentication implements AuthenticationMethod
{
/** Our logger */
private static Logger log = Logger.getLogger(IPAuthentication.class);
/** All the IP matchers */
private List<IPMatcher> ipMatchers;
/** All the negative IP matchers */
private List<IPMatcher> ipNegativeMatchers;
/**
* Maps IPMatchers to group names when we don't know group DB ID yet. When
* the DB ID is known, the IPMatcher is moved to ipMatcherGroupIDs and then
* points to the DB ID.
*/
private Map<IPMatcher, String> ipMatcherGroupNames;
/** Maps IPMatchers to group IDs (Integers) where we know the group DB ID */
private Map<IPMatcher, Integer> ipMatcherGroupIDs;
/**
* Initialize an IP authenticator, reading in the configuration. Note this
* will never fail if the configuration is bad -- a warning will be logged.
*/
public IPAuthentication()
{
ipMatchers = new ArrayList<IPMatcher>();
ipNegativeMatchers = new ArrayList<IPMatcher>();
ipMatcherGroupIDs = new HashMap<IPMatcher, Integer>();
ipMatcherGroupNames = new HashMap<IPMatcher, String>();
Enumeration e = ConfigurationManager.propertyNames();
while (e.hasMoreElements())
{
String propName = (String) e.nextElement();
if (propName.startsWith("authentication.ip."))
{
String[] nameParts = propName.split("\\.");
if (nameParts.length == 3)
{
addMatchers(nameParts[2], ConfigurationManager
.getProperty(propName));
}
else
{
log.warn("Malformed configuration property name: "
+ propName);
}
}
}
}
/**
* Add matchers for the given comma-delimited IP ranges and group.
*
* @param groupName
* name of group
* @param ipRanges
* IP ranges
*/
private void addMatchers(String groupName, String ipRanges)
{
String[] ranges = ipRanges.split("\\s*,\\s*");
for (String entry : ranges)
{
try
{
IPMatcher ipm;
if (entry.startsWith("-"))
{
ipm = new IPMatcher(entry.substring(1));
ipNegativeMatchers.add(ipm);
}
else
{
ipm = new IPMatcher(entry);
ipMatchers.add(ipm);
}
ipMatcherGroupNames.put(ipm, groupName);
if (log.isDebugEnabled())
{
log.debug("Configured " + entry + " for special group "
+ groupName);
}
}
catch (IPMatcherException ipme)
{
log.warn("Malformed IP range specified for group " + groupName,
ipme);
}
}
}
public boolean canSelfRegister(Context context, HttpServletRequest request,
String username) throws SQLException
{
return false;
}
public void initEPerson(Context context, HttpServletRequest request,
EPerson eperson) throws SQLException
{
}
public boolean allowSetPassword(Context context,
HttpServletRequest request, String username) throws SQLException
{
return false;
}
public boolean isImplicit()
{
return true;
}
public int[] getSpecialGroups(Context context, HttpServletRequest request)
throws SQLException
{
if (request == null)
{
return new int[0];
}
List<Integer> groupIDs = new ArrayList<Integer>();
String addr = request.getRemoteAddr();
for (IPMatcher ipm : ipMatchers)
{
try
{
if (ipm.match(addr))
{
// Do we know group ID?
Integer g = ipMatcherGroupIDs.get(ipm);
if (g != null)
{
groupIDs.add(g);
}
else
{
// See if we have a group name
String groupName = ipMatcherGroupNames.get(ipm);
if (groupName != null)
{
Group group = Group.findByName(context, groupName);
if (group != null)
{
// Add ID so we won't have to do lookup again
ipMatcherGroupIDs.put(ipm, new Integer(group
.getID()));
ipMatcherGroupNames.remove(ipm);
groupIDs.add(new Integer(group.getID()));
}
else
{
log.warn(LogManager.getHeader(context,
"configuration_error", "unknown_group="
+ groupName));
}
}
}
}
}
catch (IPMatcherException ipme)
{
log.warn(LogManager.getHeader(context, "configuration_error",
"bad_ip=" + addr), ipme);
}
}
// Now remove any negative matches
for (IPMatcher ipm : ipNegativeMatchers)
{
try
{
if (ipm.match(addr))
{
// Do we know group ID?
Integer g = ipMatcherGroupIDs.get(ipm);
if (g != null)
{
groupIDs.remove(g);
}
else
{
// See if we have a group name
String groupName = ipMatcherGroupNames.get(ipm);
if (groupName != null)
{
Group group = Group.findByName(context, groupName);
if (group != null)
{
// Add ID so we won't have to do lookup again
ipMatcherGroupIDs.put(ipm, new Integer(group
.getID()));
ipMatcherGroupNames.remove(ipm);
groupIDs.remove(new Integer(group.getID()));
}
else
{
log.warn(LogManager.getHeader(context,
"configuration_error", "unknown_group="
+ groupName));
}
}
}
}
}
catch (IPMatcherException ipme)
{
log.warn(LogManager.getHeader(context, "configuration_error",
"bad_ip=" + addr), ipme);
}
}
int[] results = new int[groupIDs.size()];
for (int i = 0; i < groupIDs.size(); i++)
{
results[i] = (groupIDs.get(i)).intValue();
}
if (log.isDebugEnabled())
{
StringBuffer gsb = new StringBuffer();
for (int i = 0; i < results.length; i++)
{
if (i > 0)
gsb.append(",");
gsb.append(results[i]);
}
log.debug(LogManager.getHeader(context, "authenticated",
"special_groups=" + gsb.toString()));
}
return results;
}
public int authenticate(Context context, String username, String password,
String realm, HttpServletRequest request) throws SQLException
{
return BAD_ARGS;
}
public String loginPageURL(Context context, HttpServletRequest request,
HttpServletResponse response)
{
return null;
}
public String loginPageTitle(Context context)
{
return null;
}
}

View File

@@ -0,0 +1,229 @@
/*
* IPMatcher.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.authenticate;
/**
* Quickly tests whether a given IPv4 4-byte address matches an IP range. An
* {@code IPMatcher} is initialized with a particular IP range specification.
* Calls to {@link IPMatcher#match(String) match} method will then quickly
* determine whether a given IP falls within that range.
* <p>
* Supported range specifications areL
* <p>
* <ul>
* <li>Full IP address, e.g. {@code 12.34.56.78}</li>
* <li>Partial IP address, e.g. {@code 12.34} (which matches any IP starting
* {@code 12.34})</li>
* <li>Network/netmask, e.g. {@code 18.25.0.0/255.255.0.0}</li>
* <li>CIDR slash notation, e.g. {@code 18.25.0.0/16}</li>
* </ul>
*
* @version $Revision$
* @author Robert Tansley
*/
public class IPMatcher
{
/** Network to match */
private byte[] network;
/** Network mask */
private byte[] netmask;
/**
* Construct an IPMatcher that will test for the given IP specification
*
* @param ipSpec
* IP specification (full or partial URL, network/netmask,
* network/cidr)
* @throws IPMatcherException
* if there is an error parsing the specification (i.e. it is
* somehow malformed)
*/
public IPMatcher(String ipSpec) throws IPMatcherException
{
// Boil all specs down to network + mask
network = new byte[4];
netmask = new byte[] { -1, -1, -1, -1 };
// Allow partial IP
boolean mustHave4 = false;
String ipPart = ipSpec;
String[] parts = ipSpec.split("/");
switch (parts.length)
{
case 2:
// Some kind of slash notation -- we'll need a full network IP
ipPart = parts[0];
mustHave4 = true;
String[] maskParts = parts[1].split("\\.");
if (maskParts.length == 1)
{
// CIDR slash notation
int x;
try
{
x = Integer.parseInt(maskParts[0]);
}
catch (NumberFormatException nfe)
{
throw new IPMatcherException(
"Malformed IP range specification " + ipSpec, nfe);
}
if (x < 0 || x > 32)
{
throw new IPMatcherException();
}
int fullMask = -1 << (32 - x);
netmask[0] = (byte) ((fullMask & 0xFF000000) >>> 24);
netmask[1] = (byte) ((fullMask & 0x00FF0000) >>> 16);
netmask[2] = (byte) ((fullMask & 0x0000FF00) >>> 8);
netmask[3] = (byte) (fullMask & 0x000000FF);
}
else
{
// full subnet specified
ipToBytes(parts[1], netmask, true);
}
case 1:
// Get IP
int partCount = ipToBytes(ipPart, network, mustHave4);
// If partial IP, set mask for remaining bytes
for (int i = 3; i >= partCount; i--)
{
netmask[i] = 0;
}
break;
default:
throw new IPMatcherException("Malformed IP range specification "
+ ipSpec);
}
}
/**
* Fill out a given four-byte array with the IP address specified in the
* given String
*
* @param ip
* IP address as a dot-delimited String
* @param bytes
* 4-byte array to fill out
* @param mustHave4
* if true, will require that the given IP string specify all
* four bytes
* @return the number of actual IP bytes found in the given IP address
* String
* @throws IPMatcherException
* if there is a problem parsing the IP string -- e.g. number
* outside of range 0-255, too many numbers, less than 4 numbers
* if {@code mustHave4} is true
*/
private int ipToBytes(String ip, byte[] bytes, boolean mustHave4)
throws IPMatcherException
{
String[] parts = ip.split("\\.");
if (parts.length > 4 || mustHave4 && parts.length != 4)
{
throw new IPMatcherException("Malformed IP specification " + ip);
}
try
{
for (int i = 0; i < parts.length; i++)
{
int p = Integer.parseInt(parts[i]);
if (p < 0 || p > 255)
{
throw new IPMatcherException("Malformed IP specification "
+ ip);
}
bytes[i] = (byte) (p < 128 ? p : p - 256);
}
}
catch (NumberFormatException nfe)
{
throw new IPMatcherException("Malformed IP specification " + ip,
nfe);
}
return parts.length;
}
/**
* Determine whether the given full IP falls within the range this
* {@code IPMatcher} was initialized with.
*
* @param ipIn
* IP address as dot-delimited String
* @return {@code true} if the IP matches the range of this
* {@code IPMatcher}; {@code false} otherwise
* @throws IPMatcherException
* if the IP passed in cannot be parsed correctly (i.e. is
* malformed)
*/
public boolean match(String ipIn) throws IPMatcherException
{
byte[] bytes = new byte[4];
ipToBytes(ipIn, bytes, true);
for (int i = 0; i < 4; i++)
{
if ((bytes[i] & netmask[i]) != (network[i] & netmask[i]))
{
return false;
}
}
return true;
}
}

View File

@@ -0,0 +1,67 @@
/*
* IPMatcherException.java
*
* Version: $Revision$
*
* Date: $Date$
*
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the DSpace Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.authenticate;
/**
* Thrown when there is a problem parsing an IP matcher specification.
*
* @version $Revision$
* @author Robert Tansley
*/
public class IPMatcherException extends Exception
{
public IPMatcherException()
{
super();
}
public IPMatcherException(String message)
{
super(message);
}
public IPMatcherException(Throwable cause)
{
super(cause);
}
public IPMatcherException(String message, Throwable cause)
{
super(message, cause);
}
}

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