Compare commits

...

28 Commits

Author SHA1 Message Date
Mark Diggory
ae955aad80 New location for DSpace Project
git-svn-id: http://scm.dspace.org/svn/repo/dspace/tags/dspace-1_4_2@3767 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2009-05-11 19:57:57 +00:00
James Rutherford
1269c66d1b Rolling back. This is a release tag; changes can't be made after the fact.
git-svn-id: http://scm.dspace.org/svn/repo/tags/dspace-1_4_2@2112 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-08-03 08:27:40 +00:00
Scott Phillips
da4542bd79 Added implicit authentication back.
git-svn-id: http://scm.dspace.org/svn/repo/tags/dspace-1_4_2@2111 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-07-31 23:30:39 +00:00
James Rutherford
f4e0907546 Tagging 1.4.2 release.
git-svn-id: http://scm.dspace.org/svn/repo/tags/dspace-1_4_2@1935 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-10 09:37:53 +00:00
James Rutherford
ca677557ff Documentation updates for 1.4.2 release.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1930 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-09 16:25:28 +00:00
Stuart Lewis
02ecfd9196 SF Patch #1711982 Updates to short_description (null) field when editing/creat
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1879 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-03 14:06:08 +00:00
Mark Diggory
36619da937 1.) Correct issues with InstallItem by double-checking handle if its null in Item.getHandle();
2.) Change createIndex to index preemptively, same as updateIndex.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1878 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-05-01 03:23:52 +00:00
Claudia Juergen
8271cb77ca Error in jsp.tools.confirm-delete-community.confirm
Referred to collection instead of community.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1874 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-25 11:58:05 +00:00
Claudia Juergen
f981b2cc52 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/branches/dspace-1_4_x@1862 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-20 13:03:29 +00:00
Claudia Juergen
f8eca59057 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/branches/dspace-1_4_x@1861 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-20 13:03:14 +00:00
Claudia Juergen
39164b3840 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/branches/dspace-1_4_x@1860 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-20 13:02:49 +00:00
Claudia Juergen
8a719b8e9f 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/branches/dspace-1_4_x@1859 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-20 13:02:19 +00:00
Stuart Lewis
348c70b805 SF Patch #1445573 Stats not working in Oracle
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1858 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-20 12:36:01 +00:00
Stuart Lewis
967a17da4e SF Patch #1445573 Stats not working in Oracle
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1857 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-20 12:33:26 +00:00
James Rutherford
69b7597185 (Claudia Juergen)
- SF Patch #1702177 For SF bug #1638605 bin/cleanup fails on deleted primary bitstream



git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1856 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-20 10:40:41 +00:00
James Rutherford
0be52e310c (Flavio Botelho)
- SF Patch #1601946 for SF Bug #1601875 - Makes javascript idependent to form position


git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1799 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-17 12:15:58 +00:00
Mark Diggory
8e3bf4b2e1 [ 1655583 ] Correct small logic error introduced in last commit.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1798 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-15 03:15:34 +00:00
Mark Diggory
19b9af17f4 [ 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.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1797 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-15 03:04:59 +00:00
James Rutherford
7d84a7e34b (James Rutherford)
- SF Patch #1699903 for SF Bug #1695692 make-release-package still uses CVS commands



git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1796 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-14 12:02:09 +00:00
Mark Diggory
83c1717fd0 rolling back DSpaceServletContextListener to previous revision.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1795 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-12 20:44:29 +00:00
Mark Diggory
fcb48a606f Missing file for [ 1655583 ] Avoid index lock with filter-media
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1794 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-12 16:57:15 +00:00
James Rutherford
de6ad67ac1 updated to reflect the removal of lucene-sandbox.jar and the update of
lucene.jar


git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1793 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-12 10:36:23 +00:00
James Rutherford
813309074c Fixed a bug in DSIndexer where there was a Long/long mixup.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1790 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-12 08:40:31 +00:00
Mark Diggory
f926b72643 (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.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1789 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-11 19:39:28 +00:00
Claudia Juergen
e4a8be53e0 updated year in copyright statement
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1786 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-11 12:13:24 +00:00
Claudia Juergen
568f483a37 (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

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1785 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-11 12:09:26 +00:00
James Rutherford
36e5885630 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


git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1781 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-10 16:31:50 +00:00
James Rutherford
2094ad4abc Branching for 1.4.x development.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_4_x@1780 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2007-04-10 13:41:17 +00:00
43 changed files with 1098 additions and 1870 deletions

View File

@@ -1,22 +1,27 @@
1.4.2 final
===========
(Mark Diggory)
- Fixed a bug introduced in patch 1655583
1.4.2 beta
===========
(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.
(Robert Tansley)
- Fixes to QueryArgs and RegisterServlet that cause NullPointerExceptions on
invalid input
(Andrea Bollini)
- SF Patch #1528142 Malformed OAI-PMH response: illegal bytes in UTF-8 for SF Bug #1490162
(Flavio Botelho)
- SF Patch #1601946 for SF Bug #1601875 - Makes javascript idependent to form position
(Christophe Destin)
- SF Patch #1582754 CreateAdministrator for dummies
Creation of admin via [dspace]/bin/create-administrator for a given email, irrespective of the email
belonging to an allready registered user.
(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
(Mike Judd)
- SF Patch #1528142 Malformed OAI-PMH response: illegal bytes in UTF-8 for SF Bug #1490162
@@ -32,12 +37,11 @@
- Fix for SF Bug #1653151 Checker file shows filter-media (just a typo in header)
- SF Patch #1676370 Bug #1648070 Statistics does not use navbar="admin"
- Fix for SF Bug #1690573 dspace-admin, edit item trailing white spaces
- SF Patch #1702177 For SF bug #1638605 bin/cleanup fails on deleted primary bitstream
(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
- SF Patch #1642336 Restrict domains of self-registered users
(Monika Mevenkamp)
- SF Patch #1654469 stat scripts always return exit code 1
@@ -48,14 +52,21 @@
(James Rutherford)
- SF Patch #1694943 for SF feature request #1691277 Importing: Workaround for ext3 subdirectory limitation
(Dorothea Salo)
- SF Patch #1557948 Link subjects and authors on item pages
- SF Patch #1695702 Update SubmitServlet to use default.language instead of "en" for SF bug 1636792 default.language not applied to new submissions
- SF Patch #1699903 for SF Bug #1695692 make-release-package still uses CVS commands
(Graham Triggs)
- SF Patch #1688523 Bug fix - OAI harvest and Oracle
- SF Patch #1660752 Workaround Numeric/Integer handling in Oracle
- SF Patch #1665400 Oracle schema changes for CLOB columns
- SF Patch #1655583 Avoid index lock with filter-media
(Phillip Franks, Gramham Triggs, Stuart Lewis, Chris Yates, James Rutherford)
- SF Patch #1445573 Stats not working in Oracle
(Chris Yates)
- SF Patch #1711982 Updates to short_description (null) field when editing/creat
1.4.1 final
===========

View File

@@ -3,11 +3,7 @@ bug tracker:
http://sourceforge.net/tracker/?group_id=19984&atid=119984
Oracle compatibility: this release does not support Oracle. Check for patches or updates
to this release to restore Oracle compatibility.
1609427 OAI server doesn't generate resumption token
1606789 When collection is deleted, mapped item remains in community
1606458 The MyDSpace page is very unstructured
1606456 wrong link to register
1606447 Cache strength information
@@ -17,7 +13,6 @@ to this release to restore Oracle compatibility.
1606439 Exception handling for deleting a metadata field
1604365 Unbalanced brackets cause search error
1596576 Stackable LDAP authentication does not work
1583372 DCDate.toString returns invalid string when hour is zero
1571645 NullPointerException possible in review.jsp
1552792 Not possible to uncheck a primary bitstream
1552760 Submit interface looks bad in Safari browser
@@ -29,13 +24,11 @@ to this release to restore Oracle compatibility.
1520527 PluginManager messy fail
1517528 Finishing a submission as a supervisor fails
1506556 Textareas in Oracle (VARCHAR datatype)
1490162 Malformed OAI-PMH response: illegal bytes in UTF-8
1472729 Permissions for Approval Users
1461607 errors on oracle -- database_schema_13-14.sql
1461606 oracle errors on-- database_schema.sql (ORACLE version!)
1460754 Problems with Long Java datatype and Oracle
1456594 Collection Administrator can delete any item
1456593 links to controlled vocab docs required
1456590 Values of templates are not visible for the user
1456587 Authorisation Policies
1456580 admin redirected after item withdrawn
@@ -60,10 +53,8 @@ to this release to restore Oracle compatibility.
1256920 Mapped Items not added to Community (DSpace 1.3.1)
1242527 Duplicate Items during submission
1238166 Multi Media and D-Space
1217068 Failed to complete review in workflow
1174342 Potencial Memory Issue for a large collection
1173600 Items Mapper has memory issue for a large collection
1169975 workspace item policy not updated after workflow change
1155173 Forms in custom 'skin' break group admin tool
1120726 Performance bottlekneck in Group.update()
1076506 Templates applied to imported items

View File

@@ -1,4 +1,4 @@
DSpace Version 1.4.1, 8-December-2006
DSpace Version 1.4.2, 8-May-2007
Installation instructions are included in this release package.
@@ -18,5 +18,5 @@ mailing list.
http://sourceforge.net/mail/?group_id=19984
Copyright (c) 2002-2006, Hewlett-Packard Company and Massachusetts
Copyright (c) 2002-2007, Hewlett-Packard Company and Massachusetts
Institute of Technology. All rights reserved.

View File

@@ -1,50 +0,0 @@
#!/bin/sh
###########################################################################
#
# export
#
# Version: $Revision$
#
# Date: $Date$
#
# Copyright (c) 2007, 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.
#
###########################################################################
# Shell script for running the item exporter.
# Get the DSPACE/bin directory
BINDIR=`dirname $0`
$BINDIR/dsrun org.dspace.app.itemexport.ItemExport $@

View File

@@ -1,50 +0,0 @@
#!/bin/sh
###########################################################################
#
# import
#
# Version: $Revision$
#
# Date: $Date$
#
# Copyright (c) 2007, 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.
#
###########################################################################
# Shell script for running the item importer.
# Get the DSPACE/bin directory
BINDIR=`dirname $0`
$BINDIR/dsrun org.dspace.app.itemimport.ItemImport $@

View File

@@ -1,50 +0,0 @@
#!/bin/sh
###########################################################################
#
# packager
#
# Version: $Revision$
#
# Date: $Date$
#
# Copyright (c) 2007, 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.
#
###########################################################################
# Shell script for running the packager.
# Get the DSPACE/bin directory
BINDIR=`dirname $0`
$BINDIR/dsrun org.dspace.app.packager.Packager $@

View File

@@ -222,12 +222,6 @@ handle.dir = ${dspace.dir}/handle-server
plugin.sequence.org.dspace.eperson.AuthenticationMethod = \
org.dspace.eperson.PasswordAuthentication
#### PasswordAuthentication options ####
# Only emails ending in the following domains are allowed to self-register
# Example - example.com domain : @example.com
# Example - MIT domain and all .ac.uk domains: @mit.edu, .ac.uk
# authentication.password.domain.valid = example.com
#### Example of configuring X.509 authentication
#### (to use it, add org.dspace.eperson.X509Authentication to auth stack above)
@@ -699,4 +693,4 @@ plugin.named.org.dspace.content.packager.PackageDisseminator = \
plugin.named.org.dspace.content.packager.PackageIngester = \
org.dspace.content.packager.PDFPackager = Adobe PDF, PDF, \
org.dspace.content.packager.DSpaceMETSIngester = METS
org.dspace.content.packager.DSpaceMETSIngester = METS

View File

@@ -1097,7 +1097,7 @@ jsp.tools.confirm-delete-collection.info3 = All associated authorisation policie
jsp.tools.confirm-delete-community.title = Delete Community
jsp.tools.confirm-delete-community.heading = Delete Community: {0}
jsp.tools.confirm-delete-community.confirm = Are you sure the collection <strong>{0}</strong> should be deleted? This will delete:
jsp.tools.confirm-delete-community.confirm = Are you sure the community <strong>{0}</strong> should be deleted? This will delete:
jsp.tools.confirm-delete-community.info1 = Any collections in the community that are not contained in other communities
jsp.tools.confirm-delete-community.info2 = Any items and incomplete submissions in those collections that aren't contained in other collections
jsp.tools.confirm-delete-community.info3 = The contents of those items
@@ -1198,9 +1198,6 @@ jsp.tools.eperson-list.close.button = Close
jsp.tools.eperson-list.heading = E-people {0}-{1} of {2}
jsp.tools.eperson-list.info1 = Clicking on the 'Add' button next to an e-person will add that e-person to the list on the main form.
jsp.tools.eperson-list.title = Select E-people
jsp.tools.eperson-list.search.query = Query
jsp.tools.eperson-list.search.submit = Search
jsp.tools.eperson-list.search.return-browse = return to e-person full list
jsp.tools.eperson-list.jump.one-back = &lt; 1 Page
jsp.tools.eperson-list.jump.five-back = &lt; 5 Pages
jsp.tools.eperson-list.jump.one-forward = 1 Page &gt;

View File

@@ -539,119 +539,36 @@ from/until/setSpec/offset
<p>This means the harvest is 'from' <code>2003-01-01</code>, has no 'until' date, is for collection hdl:1721.1/1234, and 300 records have already been sent to the harvester. (Actually, if the original OAI-PMH request doesn't specify a 'from' or 'until, OAICat fills them out automatically to '0000-00-00T00:00:00Z' and '9999-12-31T23:59:59Z' respectively. This means DSpace resumption tokens will always have from and until dates in them.)</p>
<!-- Struct Builder -->
<h2><a name="structbuilder" id="structbuilder">Community and Collection Structure Importer</a></h2>
<p>
This command-line tool gives you the ability to import a community and collection structure directly
from a source XML file. It is executed as follows:
</p>
<p><code>[dspace]/bin/structure-builder -f [source xml] -o [output xml file] -e [administrator email]</code></p>
<p>
This will examine the contents of <code>[source xml]</code>, import the structure into DSpace while logged in as the
supplied administrator, and then output the same structure to the output file, but including the handle for each
imported community and collection as an attribute.
</p>
<p>
The source xml document needs to be in the following format:
</p>
<pre>
&lt;import_structure&gt;
&lt;community&gt;
&lt;name&gt;Community Name&lt;/name&gt;
&lt;description&gt;Descriptive text&lt;/description&gt;
&lt;intro&gt;Introductory text&lt;/intro&gt;
&lt;copyright&gt;Special copyright notice&lt;/copyright&gt;
&lt;sidebar&gt;Sidebar text&lt;/sidebar&gt;
&lt;community&gt;
&lt;name&gt;Sub Community Name&lt;/name&gt;
&lt;community&gt; ...[ad infinitum]... &lt;/community&gt;
&lt;/community&gt;
&lt;collection&gt;
&lt;name&gt;Collection Name&lt;/name&gt;
&lt;description&gt;Descriptive text&lt;/description&gt;
&lt;intro&gt;Introductory text&lt;/intro&gt;
&lt;copyright&gt;Special copyright notice&lt;/copyright&gt;
&lt;sidebar&gt;Sidebar text&lt;/sidebar&gt;
&lt;license&gt;Special licence&lt;/license&gt;
&lt;provenance&gt;Provenance information&lt;/provenance&gt;
&lt;/collection&gt;
&lt;/community&gt;
&lt;/import_structure&gt;
</pre>
<p>
The resulting output document will be as follows:
</p>
<pre>
&lt;import_structure&gt;
&lt;community identifier="123456789/1"&gt;
&lt;name&gt;Community Name&lt;/name&gt;
&lt;description&gt;Descriptive text&lt;/description&gt;
&lt;intro&gt;Introductory text&lt;/intro&gt;
&lt;copyright&gt;Special copyright notice&lt;/copyright&gt;
&lt;sidebar&gt;Sidebar text&lt;/sidebar&gt;
&lt;community identifier="123456789/2"&gt;
&lt;name&gt;Sub Community Name&lt;/name&gt;
&lt;community identifier="123456789/3"&gt; ...[ad infinitum]... &lt;/community&gt;
&lt;/community&gt;
&lt;collection identifier="123456789/4"&gt;
&lt;name&gt;Collection Name&lt;/name&gt;
&lt;description&gt;Descriptive text&lt;/description&gt;
&lt;intro&gt;Introductory text&lt;/intro&gt;
&lt;copyright&gt;Special copyright notice&lt;/copyright&gt;
&lt;sidebar&gt;Sidebar text&lt;/sidebar&gt;
&lt;license&gt;Special licence&lt;/license&gt;
&lt;provenance&gt;Provenance information&lt;/provenance&gt;
&lt;/collection&gt;
&lt;/community&gt;
&lt;/import_structure&gt;
</pre>
<h3>Limitation</h3>
<ul>
<li>Currently this does not export community and collection structures, although it should only be a small modification to make it do so</li>
</ul>
<!-- end Struct Builder -->
<h2><a name="packager" id="packager">Package Importer and Exporter</a></h2>
<p>This command-line tool gives you access to the Packager plugins. It can <em>ingest</em> a package to create a new DSpace Item, or <em>disseminate</em> an Item as a package.</p>
<p>To see all the options, invoke it as: <pre><em>[dspace]</em>/bin/packager --help</pre> This mode also displays a list of the names of package ingesters and disseminators that are available.</p>
<p>To see all the options, invoke it as: <pre><em>[dspace]</em>/bin/dsrun org.dspace.app.packager.Packager --help</pre> This mode also displays a list of the names of package ingesters and disseminators that are available.</p>
<h3>Ingesting</h3>
<p>To ingest a package from a file, give the command: <pre><em>[dspace]</em>/bin/packager -e <em>user</em> -c <em>handle</em> -t <em>packager</em> <em>path</em></pre>
<p>To ingest a package from a file, give the command: <pre><em>[dspace]</em>/bin/dsrun org.dspace.app.packager.Packager -e <em>user</em> -c <em>handle</em> -t <em>packager</em> <em>path</em></pre>
Where <em>user</em> is the e-mail address of the E-Person under whose authority this runs; <em>handle</em> is the Handle of the collection into which the Item is added, <em>packager</em> is the plugin name of the
package ingester to use, and <em>path</em> is the path to the file to ingest (or <code>"-"</code> to read from the standard input).</p>
<p>Here is an example that loads a PDF file with internal metadata as a package:
<pre>/dspace/bin/packager -e florey@mit.edu -c 1721.2/13 -t pdf thesis.pdf</pre>
<pre>/dspace/bin/dsrun org.dspace.app.packager.Packager -e florey@mit.edu -c 1721.2/13 -t pdf thesis.pdf</pre>
</p>
<p>This example takes the result of retrieving a URL and ingests it:
<pre>wget -O - http://alum.mit.edu/jarandom/my-thesis.pdf | \
/dspace/bin/packager -e florey@mit.edu -c 1721.2/13 -t pdf -</pre></p>
/dspace/bin/dsrun org.dspace.app.packager.Packager -e florey@mit.edu -c 1721.2/13 -t pdf -</pre></p>
<h3>Disseminating</h3>
<p>To disseminate an Item as a package, give the command:
<pre><em>[dspace]</em>/bin/packager -e <em>user</em> -d -i <em>handle</em> -t <em>packager</em> <em>path</em></pre> Where <em>user</em> is the e-mail address of the E-Person under whose
<pre><em>[dspace]</em>/bin/dsrun org.dspace.app.packager.Packager -e <em>user</em> -d -i <em>handle</em> -t <em>packager</em> <em>path</em></pre> Where <em>user</em> is the e-mail address of the E-Person under whose
authority this runs; <em>handle</em> is the Handle of the Item to disseminate;
<em>packager</em> is the plugin name of the package disseminator to use; and <em>path</em> is the path to the file to
create (or <code>"-"</code> to write to the standard output).
This example writes an Item out as a METS package in the file "454.zip":
<pre>/dspace/bin/packager -e florey@mit.edu -d -i 1721.2/454 -t METS 454.zip</pre></p>
<pre>/dspace/bin/dsrun org.dspace.app.packager.Packager -e florey@mit.edu -d -i 1721.2/454 -t METS 454.zip</pre></p>
<h3>METS packages</h3>
@@ -717,22 +634,22 @@ archive_directory/
<p>To add items to a collection with an EPerson as the submitter, type:</p>
<pre>
[dspace]/bin/import --add --eperson=joe@user.com --collection=collectionID --source=items_dir --mapfile=mapfile
[dspace]/bin/dsrun org.dspace.app.itemimport.ItemImport --add --eperson=joe@user.com --collection=collectionID --source=items_dir --mapfile=mapfile
</pre>
<p>(or by using the short form)</p>
<pre>
[dspace]/bin/import -a -e joe@user.com -c collectionID -s items_dir -m mapfile
[dspace]/bin/dsrun org.dspace.app.itemimport.ItemImport -a -e joe@user.com -c collectionID -s items_dir -m mapfile
</pre>
<p>which would then cycle through the archive directory's items, import them, and then generate a map file which stores the mapping of item directories to item handles. Save this map file! Using the map file you can then 'unimport' with the command:</p>
<pre>
[dspace]/bin/import --delete --mapfile=mapfile
[dspace]/bin/dsrun org.dspace.app.itemimport.ItemImport --delete --mapfile=mapfile
</pre>
<p>The imported items listed in the map file would then be deleted. If you wish to replace previously imported items, you can give the command:</p>
<pre>
[dspace]/bin/import --replace --eperson=joe@user.com --collection=collectID --source=items_dir --mapfile=mapfile
[dspace]/bin/dsrun org.dspace.app.itemimport.ItemImport --replace --eperson=joe@user.com --collection=collectID --source=items_dir --mapfile=mapfile
</pre>
<p>Replacing items uses the map file to replace the old items and still retain their handles.</p>
@@ -745,12 +662,12 @@ archive_directory/
<p>The item exporter can export a single item or a collection of items, and creates a DSpace simple archive for each item to be exported. To export a collection's items you type:</p>
<pre>
[dspace]/bin/export --type=COLLECTION --id=collID --dest=dest_dir --number=seq_num
[dspace]/bin/dsrun org.dspace.app.itemexport.ItemExport --type=COLLECTION --id=collID --dest=dest_dir --number=seq_num
</pre>
<p>The keyword <code>COLLECTION</code> means that you intend to export an entire collection. The ID can either be the database ID or the handle. The exporter will begin numbering the simple archives with the sequence number that you supply. To export a single item use the keyword <code>ITEM</code> and give the item ID as an argument:</p>
<pre>
[dspace]/bin/export --type=ITEM --id=itemID --dest=dest_dir --number=seq_num
[dspace]/bin/dsrun org.dspace.app.itemexport.ItemExport --type=ITEM --id=itemID --dest=dest_dir --number=seq_num
</pre>
<p>Each exported item will have an additional file in its directory, named 'handle'. This will contain the handle that was assigned to the item, and this file will be read by the importer so that items exported and then imported to another machine will retain the item's original handle.</p>

View File

@@ -543,10 +543,6 @@ metadata.dc.description.abstract = Abstract</pre>
<li>
<p>Users are not members of any special (dynamic) e-person groups</p>
</li>
<li>
<p>You can restrict the domains from which new users are able to regiser. To enable this feature, uncomment the following line from dspace.cfg: <code>authentication.password.domain.valid = example.com</code> Example options might be '<code>@example.com</code>' to restrict registration to users with addresses ending in @example.com, or '<code>@example.com, .ac.uk</code>' to restrict registration to users with addresses ending in @example.com or with addresses in the .ac.uk domain.</p>
</li>
</ul>
<h3>LDAP Authentication</h3>

View File

@@ -10,6 +10,44 @@
<h1>DSpace System Documentation: Version History</h1>
<p><a href="index.html">Back to contents</a></p>
<h2><a name="version1_4_2">Changes in DSpace 1.4.2</a></h2>
<h3>General Improvements</h3>
<ul>
<li>Lots of improvements to DSIndexer</li>
<li>Improvements in controlled vocabulary support</li>
<li>Link to admin area in the navigation bar when logged in as an administrator</li>
<li>Refinement of enable suggest feature</li>
<li>Group display on MyDSpace page is now configurable</li>
<li>Lots of work on Oracle support</li>
<li>Fix for SF Bug #1653151 Checker file shows filter-media (just a typo in header)</li>
<li>Specify subdirectory limit in ItemExport</li>
<li>Stat scripts don't always return exit code 1</li>
<li>Improved file size descriptions in ItemTag</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>1638605 bin/cleanup fails on deleted primary bitstreams</li>
<li>1601946 Makes javascript independent to form position (in group/eperson selection)</li>
<li>1695692 make-release-package still uses CVS commands</li>
<li>1490162 dspace-admin, edit item trailing white spaces</li>
<li>1583372 DCDate.toString returns invalid string</li>
<li>1076506 Item import command line option for application of template</li>
<li>1606789 MyDSpace Group Membership Special Groups</li>
<li>1619439 When collection is deleted, mapped item remains in community</li>
<li>1217068 Failed to complete review in workflow</li>
<li>1606449 Improve usability of bitstream list in item display</li>
<li>1670106 Onebox and textarea fail when visibility set to workflow</li>
<li>1648070 Statistics does not use navbar="admin"</li>
<li>1456593 links to controlled vocab docs required</li>
<li>1653151 Checker file shows filter-media (just a typo in header)</li>
<li>1506556 Textareas in Oracle (VARCHAR datatype)</li>
<li>1460754 Problems with Long Java datatype and Oracle</li>
<li>1445573 Stats not working on Oracle </li>
</ul>
<h2><a name="version1_4_1">Changes in DSpace 1.4.1</a></h2>
<h3>General Improvements</h3>
@@ -548,6 +586,6 @@ error)</li>
expire.)</li>
</ul>
<hr>
<address> Copyright &copy; 2002-2006 MIT and Hewlett Packard </address>
<address> Copyright &copy; 2002-2007 MIT and Hewlett Packard </address>
</body>
</html>

View File

@@ -10,7 +10,7 @@
<P>Authors: Robert Tansley, Mick Bass, Margret Branschofsky, Grace Carpenter, Greg McClellan, David Stuve, and others</P>
<P>For DSpace Version: <strong>1.4.1</strong> (8-December-2006)</P>
<P>For DSpace Version: <strong>1.4.2</strong> (8-May-2007)</P>
<P><small>Documentation for other versions of DSpace are included with the source code.</small></P>
@@ -56,7 +56,8 @@
</LI>
<LI><A HREF="update.html">Updating a DSpace Installation</A>
<UL>
<LI><A HREF="update.html#14_141">Updating From 1.4 to 1.4.1</A></LI>
<LI><A HREF="update.html#141_142">Updating From 1.4.1 to 1.4.2</A></LI>
<LI><A HREF="update.html#14_14x">Updating From 1.4 to 1.4.x</A></LI>
<LI><A HREF="update.html#132_14">Updating From 1.3.x to 1.4.x</A></LI>
<LI><A HREF="update.html#131_132">Updating From 1.3.1 to 1.3.2</A></LI>
<LI><A HREF="update.html#12_13">Updating From 1.2.x to 1.3.x</A></LI>
@@ -135,7 +136,6 @@
<UL>
<LI><A HREF="application.html#webui">Web User Interface</A></LI>
<LI><A HREF="application.html#oai">OAI-PMH Data Provider</A></LI>
<li><a href="application.html#structbuilder">Community and Collection Structure Importer</a></li>
<LI><A HREF="application.html#packager">Package Importer and Exporter</a></LI>
<LI><A HREF="application.html#itemimporter">Item Importer and Exporter</A></LI>
<LI><A HREF="application.html#transferitem">Transferring Items Between DSpace Instances</A></LI>
@@ -149,6 +149,7 @@
</LI>
<LI><A HREF="history.html">Version History</A>
<UL>
<LI><A HREF="history.html#version1_4_2">Changes in DSpace 1.4.2</A></LI>
<LI><A HREF="history.html#version1_4_1">Changes in DSpace 1.4.1</A></LI>
<LI><A HREF="history.html#version1_4">Changes in DSpace 1.4</A></LI>
<LI><A HREF="history.html#version1_3_2">Changes in DSpace 1.3.2</A></LI>
@@ -171,7 +172,7 @@
<HR>
<ADDRESS>
Copyright &copy; 2002-2006 MIT and Hewlett Packard
Copyright &copy; 2002-2007 MIT and Hewlett Packard
</ADDRESS>
</BODY>
</HTML>

View File

@@ -12,21 +12,24 @@
<P>This section describes how to update a DSpace installation from one version to the next. Details of the differences between the functionality of each version are given in the <A HREF="history.html">Version History</A> section.</P>
<h2><a name="14_141">Updating From 1.4 to 1.4.1</a></h2>
<h2><a name="141_142">Updating From 1.4.1 to 1.4.2</a></h2>
See <A HREF="#14_14x">Updating From 1.4 to 1.4.x</A>; the same instructions apply.
<p>The changes in 1.4.1 are only code and configuration changes so the update is simply a matter of rebuilding the wars and slight changes to your config file.</p>
<h2><a name="14_14x">Updating From 1.4 to 1.4.x</a></h2>
<p>In the notes below <code><i>[dspace]</i></code> refers to the install directory for your existing DSpace installation, and <code><i>[dspace-1.4.1-source]</i></code> to the source directory for DSpace 1.4.1. Whenever you see these path references, be sure to replace them with the actual path names on your local system.</p>
<p>The changes in 1.4.x releases are only code and configuration changes so the update is simply a matter of rebuilding the wars and slight changes to your config file.</p>
<p>In the notes below <code><i>[dspace]</i></code> refers to the install directory for your existing DSpace installation, and <code><i>[dspace-1.4.x-source]</i></code> to the source directory for DSpace 1.4.x. Whenever you see these path references, be sure to replace them with the actual path names on your local system.</p>
<ol>
<li><p>Get the new DSpace 1.4.1 source code from <a href="http://sourceforge.net/projects/dspace/">the DSpace page on SourceForge</a> and unpack it somewhere. Do not unpack it on top of your existing installation!!</p></li>
<li><p>Get the new DSpace 1.4.x source code from <a href="http://sourceforge.net/projects/dspace/">the DSpace page on SourceForge</a> and unpack it somewhere. Do not unpack it on top of your existing installation!!</p></li>
<li><p>Copy the PostgreSQL driver JAR to the source tree. For example:</p>
<pre>cd <i>[dspace]</i>/lib
cp postgresql.jar <i>[dspace-1.4.1-source]</i>/lib</pre></li>
cp postgresql.jar <i>[dspace-1.4.x-source]</i>/lib</pre></li>
<li><strong>Note:</strong> Licensing conditions for the <code>handle.jar</code> file have changed. As a result, the latest version of the <code>handle.jar</code> file is not included in this distribution. It is recommended you read the <a href="http://www.handle.net/upgrade_6-2_DSpace.html">new license conditions</a> and decide whether you wish to update your installation's <code>handle.jar</code>. If you decide to update, you should replace the existing <code>handle.jar</code> in <i>[dspace-1.4.1-source]</i>/lib with the new version.</li>
<li><strong>Note:</strong> Licensing conditions for the <code>handle.jar</code> file have changed. As a result, the latest version of the <code>handle.jar</code> file is not included in this distribution. It is recommended you read the <a href="http://www.handle.net/upgrade_6-2_DSpace.html">new license conditions</a> and decide whether you wish to update your installation's <code>handle.jar</code>. If you decide to update, you should replace the existing <code>handle.jar</code> in <i>[dspace-1.4.x-source]</i>/lib with the new version.</li>
<li><p>Take down Tomcat (or whichever servlet container you're using).</p></li>
@@ -48,15 +51,15 @@ cp postgresql.jar <i>[dspace-1.4.1-source]</i>/lib</pre></li>
webui.html.max-depth-guess = 3</pre>
<p>If <code>webui.html.max-depth-guess</code> is not present in <code>dspace.cfg</code> the default value is used. If archiving entire web sites or deeply nested HTML documents it is advisable to change the default to a higher value more suitable for these types of materials.</p></li>
<li><p>Your 'localized' JSPs (those in jsp/local) now need to be maintained in the <em>source</em> directory. If you have locally modified JSPs in your <code><i>[dspace]</i>/jsp/local</code> directory, you will need to merge the changes in the new 1.4.1 versions into your locally modified ones. You can use the <code>diff</code> command to compare your JSPs against the 1.4.1 versions to do this. You can also check against the <a href="http://dspace.cvs.sourceforge.net/dspace/">DSpace CVS</a>.</p></li>
<li><p>Your 'localized' JSPs (those in jsp/local) now need to be maintained in the <em>source</em> directory. If you have locally modified JSPs in your <code><i>[dspace]</i>/jsp/local</code> directory, you will need to merge the changes in the new 1.4.x versions into your locally modified ones. You can use the <code>diff</code> command to compare your JSPs against the 1.4.x versions to do this. You can also check against the <a href="http://dspace.cvs.sourceforge.net/dspace/">DSpace CVS</a>.</p></li>
<li><p>In <code><i>[dspace-1.4.1-source]</i></code> run:</p>
<li><p>In <code><i>[dspace-1.4.x-source]</i></code> run:</p>
<pre>ant -Dconfig=<i>[dspace]</i>/config/dspace.cfg update</pre></li>
<li><p>Copy the <code>.war</code> Web application files in <code><i>[dspace-1.4.1-source]</i>/build</code> to the <code>webapps</code> sub-directory of your servlet container (e.g. Tomcat). e.g.:</p>
<li><p>Copy the <code>.war</code> Web application files in <code><i>[dspace-1.4.x-source]</i>/build</code> to the <code>webapps</code> sub-directory of your servlet container (e.g. Tomcat). e.g.:</p>
<pre>cp <i>[dspace-1.4.1-source]</i>/build/*.war <i>[tomcat]</i>/webapps</pre>
<pre>cp <i>[dspace-1.4.x-source]</i>/build/*.war <i>[tomcat]</i>/webapps</pre>
<p>If you're using Tomcat, you need to delete the directories corresponding to the old <code>.war</code> files. For example, if <code>dspace.war</code> is installed in <code><i>[tomcat]</i>/webapps/dspace.war</code>, you should delete the <code><i>[tomcat]</i>/webapps/dspace</code> directory. Otherwise, Tomcat will continue to use the old code in that directory. </p></li>
@@ -86,7 +89,7 @@ webui.html.max-depth-guess = 3</pre>
<pre>cd <i>[dspace]</i>/lib
cp postgresql.jar <i>[dspace-1.4.x-source]</i>/lib</pre></li>
<li><strong>Note:</strong> Licensing conditions for the <code>handle.jar</code> file have changed. As a result, the latest version of the <code>handle.jar</code> file is not included in this distribution. It is recommended you read the <a href="http://www.handle.net/upgrade_6-2_DSpace.html">new license conditions</a> and decide whether you wish to update your installation's <code>handle.jar</code>. If you decide to update, you should replace the existing <code>handle.jar</code> in <i>[dspace-1.4.1-source]</i>/lib with the new version.</li>
<li><strong>Note:</strong> Licensing conditions for the <code>handle.jar</code> file have changed. As a result, the latest version of the <code>handle.jar</code> file is not included in this distribution. It is recommended you read the <a href="http://www.handle.net/upgrade_6-2_DSpace.html">new license conditions</a> and decide whether you wish to update your installation's <code>handle.jar</code>. If you decide to update, you should replace the existing <code>handle.jar</code> in <i>[dspace-1.4.x-source]</i>/lib with the new version.</li>
<li><p>Take down Tomcat (or whichever servlet container you're using).</p></li>
@@ -675,7 +678,7 @@ ant -Dconfig=<i>[dspace]</i>/config/dspace.cfg update</PRE></LI>
<HR>
<ADDRESS>
Copyright &copy; 2002-2004 MIT and Hewlett Packard
Copyright &copy; 2002-2007 MIT and Hewlett Packard
</ADDRESS>
</BODY>
</HTML>

View File

@@ -85,7 +85,7 @@
</strong></p>
<% } %>
<form method="post" action="">
<form name="epersongroup" method="post" action="">
<center>
<table width="90%">

View File

@@ -146,7 +146,7 @@
<%-- <p>You can change this later using the relevant sections of the DSpace admin UI.</p> --%>
<p><fmt:message key="jsp.dspace-admin.wizard-permissions.change"/></p>
<form action="<%= request.getContextPath() %>/tools/collection-wizard" method="post">
<form name="epersongroup" action="<%= request.getContextPath() %>/tools/collection-wizard" method="post">
<center>
<table>
<%

View File

@@ -100,6 +100,11 @@
license = collection.getLicense();
}
if (shortDesc == null)
{
shortDesc = "";
}
if (copy == null)
{
copy = "";

View File

@@ -77,6 +77,11 @@
intro = community.getMetadata("introductory_text");
copy = community.getMetadata("copyright_text");
side = community.getMetadata("side_bar_text");
if (shortDesc == null)
{
shortDesc = "";
}
if (copy == null)
{

View File

@@ -45,11 +45,9 @@
- Attributes:
-
- epeople - EPerson[] - all epeople to browse
- sortby - Integer - field to sort by (constant from EPerson.java) (when show all)
- first - Integer - index of first eperson to display (when show all)
- sortby - Integer - field to sort by (constant from EPerson.java)
- first - Integer - index of first eperson to display
- multiple - if non-null, this is for selecting multiple epeople
- search - String - query string for search eperson
- offset - Integer - offset in a search result set
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
@@ -69,68 +67,25 @@
int sortBy = ((Integer)request.getAttribute("sortby" )).intValue();
int first = ((Integer)request.getAttribute("first")).intValue();
boolean multiple = (request.getAttribute("multiple") != null);
String search = (String) request.getAttribute("search");
if (search == null) search = "";
int offset = ((Integer)request.getAttribute("offset")).intValue();
// Make sure we won't run over end of list
int last;
if (search != null && !search.equals(""))
{
last = offset + PAGESIZE;
}
else
{
last = first + PAGESIZE;
}
int last = first + PAGESIZE;
if (last >= epeople.length) last = epeople.length - 1;
// Index of first eperson on last page
int jumpEnd = ((epeople.length - 1) / PAGESIZE) * PAGESIZE;
// Now work out values for next/prev page buttons
int jumpFiveBack;
if (search != null && !search.equals(""))
{
jumpFiveBack = offset - PAGESIZE * 5;
}
else
{
jumpFiveBack = first - PAGESIZE * 5;
}
int jumpFiveBack = first - PAGESIZE * 5;
if (jumpFiveBack < 0) jumpFiveBack = 0;
int jumpOneBack;
if (search != null && !search.equals(""))
{
jumpOneBack = offset - PAGESIZE;
}
else
{
jumpOneBack = first - PAGESIZE;
}
int jumpOneBack = first - PAGESIZE;
if (jumpOneBack < 0) jumpOneBack = 0;
int jumpOneForward;
if (search != null && !search.equals(""))
{
jumpOneForward = offset + PAGESIZE;
}
else
{
jumpOneForward = first + PAGESIZE;
}
if (jumpOneForward > epeople.length) jumpOneForward = jumpEnd;
int jumpFiveForward;
if (search != null && !search.trim().equals(""))
{
jumpFiveForward = offset + PAGESIZE * 5;
}
else
{
jumpFiveForward = first + PAGESIZE * 5;
}
int jumpOneForward = first + PAGESIZE;
if (jumpOneForward > epeople.length) jumpOneForward = first;
int jumpFiveForward = first + PAGESIZE * 5;
if (jumpFiveForward > epeople.length) jumpFiveForward = jumpEnd;
// What's the link?
@@ -138,16 +93,8 @@
if (sortBy == EPerson.EMAIL) sortByParam = "email";
if (sortBy == EPerson.ID) sortByParam = "id";
String jumpLink;
if (search != null && !search.equals(""))
{
jumpLink = request.getContextPath() + "/tools/eperson-list?multiple=" + multiple + "&sortby=" + sortByParam + "&first="+first+"&search="+search+"&offset=";
}
else
{
jumpLink = request.getContextPath() + "/tools/eperson-list?multiple=" + multiple + "&sortby=" + sortByParam + "&first=";
}
String sortLink = request.getContextPath() + "/tools/eperson-list?multiple=" + multiple + "&first=" + first + "&sortby=";
String jumpLink = request.getContextPath() + "/tools/eperson-list?multiple=" + multiple + "&amp;sortby=" + sortByParam + "&amp;first=";
String sortLink = request.getContextPath() + "/tools/eperson-list?multiple=" + multiple + "&amp;first=" + first + "&amp;sortby=";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -171,7 +118,7 @@ function addEPerson(id, email, name)
// Clear selected items from main e-people list
function clearEPeople()
{
var list = self.opener.document.forms[0].eperson_id;
var list = self.opener.document.epersongroup.eperson_id;
while (list.options.length > 0)
{
list.options[0] = null;
@@ -182,9 +129,10 @@ function clearEPeople()
</script>
</head>
<body class="pageContents">
<%-- <h3>E-people <%= first + 1 %>-<%= last + 1 %> of <%= epeople.length %></h3> --%>
<h3><fmt:message key="jsp.tools.eperson-list.heading">
<fmt:param><%= ((search != null && !search.equals(""))?offset:first) + 1 %></fmt:param>
<fmt:param><%= first + 1 %></fmt:param>
<fmt:param><%= last + 1 %></fmt:param>
<fmt:param><%= epeople.length %></fmt:param>
</fmt:message></h3>
@@ -196,23 +144,7 @@ function clearEPeople()
e-person to the list on the main form. </p> --%>
<p class="submitFormHelp"><fmt:message key="jsp.tools.eperson-list.info1"/></p>
<% } %>
<center>
<form method="get">
<input type="hidden" name="first" value="<%= first %>" />
<input type="hidden" name="sortby" value="<%= sortBy %>" />
<input type="hidden" name="multiple" value="<%= multiple %>" />
<label for="search"><fmt:message key="jsp.tools.eperson-list.search.query" /></label><input type="text" name="search" value="<%= search %>"/>
<input type="submit" value="<fmt:message key="jsp.tools.eperson-list.search.submit" />" />
<%
if (search != null && !search.equals(""))
{ %>
<br/>
<a href="<%= request.getContextPath() + "/tools/eperson-list?multiple=" + multiple + "&sortby=" + sortByParam + "&first="+first %>"><fmt:message key="jsp.tools.eperson-list.search.return-browse" /></a>
<%
}
%>
</form>
</center>
<%-- Controls for jumping around list--%>
<table width="99%">
<tr>
@@ -236,18 +168,6 @@ function clearEPeople()
<form method="get" action=""> <%-- Will never actually be posted, it's just so buttons will appear --%>
<table class="miscTable" align="center" summary="Epeople list">
<% if (search != null && !search.equals(""))
{ %>
<tr>
<th class="oddRowOddCol">&nbsp;</th>
<th class="oddRowEvenCol"><fmt:message key="jsp.tools.eperson-list.th.id" /></th>
<th class="oddRowOddCol"><fmt:message key="jsp.tools.eperson-list.th.email" /></th>
<th class="oddRowEvenCol"><fmt:message key="jsp.tools.eperson-list.th.lastname" /></th>
<th class="oddRowOddCol"><fmt:message key="jsp.tools.eperson-list.th.lastname" /></th>
</tr>
<% }
else
{ %>
<tr>
<th id="t1" class="oddRowOddCol">&nbsp;</th>
<th id="t2" class="oddRowEvenCol"><%
@@ -285,7 +205,7 @@ function clearEPeople()
<%-- <th class="oddRowOddCol">First Name</th> --%>
<th id="t5" class="oddRowOddCol"><fmt:message key="jsp.tools.eperson-list.th.firstname"/></th>
</tr>
<% }
<%
String row = "even";
// If this is a dialogue to select a *single* e-person, we want
@@ -295,7 +215,7 @@ function clearEPeople()
String closeWindow = (multiple ? "" : "window.close();");
for (int i = (search != null && !search.equals(""))?offset:first; i <= last; i++)
for (int i = first; i <= last; i++)
{
EPerson e = epeople[i];
// Make sure no quotes in full name will mess up our Javascript

View File

@@ -87,7 +87,7 @@
</table>
<center>
<form method="post" action="">
<form name="epersongroup" method="post" action="">
<p><label for="tgroup_name"><fmt:message key="jsp.tools.group-edit.name"/></label><input name="group_name" id="tgroup_name" value="<%=group.getName()%>"/></p>
<h3><fmt:message key="jsp.tools.group-edit.heading"/></h3>

View File

@@ -117,7 +117,7 @@ function addGroup(id, name)
// Clear selected items from main group list
function clearGroups()
{
var list = self.opener.document.forms[0].group_ids;
var list = self.opener.document.epersongroup.group_ids;
while (list.options.length > 0)
{
list.options[0] = null;

View File

@@ -52,17 +52,17 @@ var popupWindow;
// Add to list of e-people on this page -- invoked by eperson popup window
function addEPerson(id, email, name)
{
var newplace = window.document.forms[0].eperson_id.options.length;
var newplace = window.document.epersongroup.eperson_id.options.length;
if (newplace > 0 && window.document.forms[0].eperson_id.options[0].value == "")
if (newplace > 0 && window.document.epersongroup.eperson_id.options[0].value == "")
{
newplace = 0;
}
// First we check to see if e-person is already there
for (var i = 0; i < window.document.forms[0].eperson_id.options.length; i++)
for (var i = 0; i < window.document.epersongroup.eperson_id.options.length; i++)
{
if (window.document.forms[0].eperson_id.options[i].value == id)
if (window.document.epersongroup.eperson_id.options[i].value == id)
{
newplace = -1;
}
@@ -70,33 +70,33 @@ function addEPerson(id, email, name)
if (newplace > -1)
{
window.document.forms[0].eperson_id.options[newplace] = new Option(name + " (" + email + ")", id);
window.document.epersongroup.eperson_id.options[newplace] = new Option(name + " (" + email + ")", id);
}
}
// Add to list of groups on this page -- invoked by eperson popup window
function addGroup(id, name)
{
var newplace = window.document.forms[0].group_ids.options.length;
var newplace = window.document.epersongroup.group_ids.options.length;
if (newplace > 0 && window.document.forms[0].group_ids.options[0].value == "")
if (newplace > 0 && window.document.epersongroup.group_ids.options[0].value == "")
{
newplace = 0;
}
// First we check to see if group is already there
for (var i = 0; i < window.document.forms[0].group_ids.options.length; i++)
for (var i = 0; i < window.document.epersongroup.group_ids.options.length; i++)
{
// is it in the list already
if (window.document.forms[0].group_ids.options[i].value == id)
if (window.document.epersongroup.group_ids.options[i].value == id)
{
newplace = -1;
}
// are we trying to add the new group to the new group on an Edit Group page (recursive)
if (window.document.forms[0].group_id)
if (window.document.epersongroup.group_id)
{
if (window.document.forms[0].group_id.value == id)
if (window.document.epersongroup.group_id.value == id)
{
newplace = -1;
}
@@ -105,7 +105,7 @@ function addGroup(id, name)
if (newplace > -1)
{
window.document.forms[0].group_ids.options[newplace] = new Option(name + " (" + id + ")", id);
window.document.epersongroup.group_ids.options[newplace] = new Option(name + " (" + id + ")", id);
}
}
@@ -113,7 +113,7 @@ function addGroup(id, name)
// on pages with a dspace:selecteperson element in them
function finishEPerson()
{
selectAll(window.document.forms[0].eperson_id);
selectAll(window.document.epersongroup.eperson_id);
if (popupWindow != null)
{
@@ -125,7 +125,7 @@ function finishEPerson()
// on pages with a dspace:selecteperson element in them
function finishGroups()
{
selectAll(window.document.forms[0].group_ids);
selectAll(window.document.epersongroup.group_ids);
if (popupWindow != null)
{

View File

@@ -17,8 +17,7 @@ jdom.jar Java DOM API library (version 1.0)
jena.jar: The Jena RDF framework (version 1.4.0)
jstl.jar: Java Standard Tag Library (JSTL) API (version 1.0.6)
log4j.jar: Log4j, for system logging (version 1.2.14)
lucene.jar: Lucene search engine (version 2.0.0)
lucene-sandbox.jar: Lucene search engine (version - compiled against Lucene 2.0.0 jar)
lucene.jar: Lucene search engine (version 2.1.0)
mail.jar: JavaMail, used for sending e-mail (version 1.4)
mets.jar*: Harvard University Libraries METS toolkit (version 1.5.2)
oaicat.jar: OCLC's OAI data provider implementation (version 1.5.48)

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,9 @@
License
Copyright (c) 2000 - 2006 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,9 @@
License
Copyright (c) 2000 - 2006 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Binary file not shown.

Binary file not shown.

View File

@@ -1,39 +1,69 @@
#!/bin/sh
USAGE="$0 cvs-tag version"
USAGE="Usage: $0 <path> <svn_revision> <version>
* <path> is relative to the SVN root (eg: branches/dspace-1_4_x/dspace)
* <svn_revision> is the revision you want to build the release from
* <version> is the version number to release as (eg: 1.4.2)
Example:
./make-release-package branches/dspace-1_4_x/dspace 1795 1.4.2"
# Just in case you need to 'socksify' etc
CVS_COMMAND="cvs"
SVN="svn"
SVN_BASE_URL="https://dspace.svn.sourceforge.net/svnroot/dspace"
# Check we have required command-line arguments
if [ "$#" != "2" ]; then
echo $USAGE
exit 1
if [ "$#" != "3" ]; then
echo "${USAGE}"
exit 1
fi
FILENAME="dspace-$2-source"
mkdir tmp
if [ $? -eq 1 ]; then
# If mkdir failed, then tmp/ already exists, and we don't want to overwrite
# anything in there.
exit 1
fi
cd tmp
FILENAME="dspace-$3-source"
echo "Checking out core code..."
$CVS_COMMAND -Q export -r $1 dspace
$SVN export -r $2 "$SVN_BASE_URL/$1" dspace
# Don't need to include this script!
rm -f dspace/make-release-package
if [ $? -eq 1 ] || [ ! -d "dspace" ]; then
# SVN export failed
echo "SVN export failed. Check your path & revision number and try again."
cd ..
rmdir tmp
exit 1
fi
# Or silly cvsignore files
rm -f `find dspace -name .cvsignore`
if [ ! -f "dspace/make-release-package" ]; then
cat <<-EOF
ERROR: The file dspace/make-release-package doesn't exist. There must have
been a problem with the export. Check the contents of tmp/ to find out what
the problem was.
EOF
exit 1
else
# Don't need to include this script!
rm -f dspace/make-release-package
fi
echo "Creating tarball..."
mv dspace $FILENAME
tar -cf - $FILENAME | gzip -c > $FILENAME.tar.gz
tar czf $FILENAME.tgz $FILENAME
tar cjf $FILENAME.tbz2 $FILENAME
zip -r $FILENAME.zip $FILENAME
echo "Cleaning up..."
cd ..
mv tmp/$FILENAME.tar.gz .
mv tmp/$FILENAME.* .
rm -r tmp
echo "Package created as $FILENAME.tar.gz"
echo "Packages created:
* $FILENAME.tgz
* $FILENAME.tbz2
* $FILENAME.zip"

View File

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

@@ -77,7 +77,7 @@ import org.dspace.search.DSIndexer;
*/
public class MediaFilterManager
{
public static boolean createIndex = true; // default to creating index
public static boolean updateIndex = true; // default to updating index
public static boolean isVerbose = false; // default to not verbose
@@ -108,7 +108,7 @@ public class MediaFilterManager
options.addOption("f", "force", false,
"force all bitstreams to be processed");
options.addOption("n", "noindex", false,
"do NOT re-create search index after filtering bitstreams");
"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,
@@ -132,7 +132,7 @@ public class MediaFilterManager
if (line.hasOption('n'))
{
createIndex = false;
updateIndex = false;
}
if (line.hasOption('f'))
@@ -207,11 +207,11 @@ public class MediaFilterManager
}
}
// create search index?
if (createIndex)
// update search index?
if (updateIndex)
{
System.out.println("Creating search index:");
DSIndexer.createIndex(c);
System.out.println("Updating search index:");
DSIndexer.updateIndex(c);
}
c.complete();

View File

@@ -1174,6 +1174,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
@@ -1207,23 +1213,41 @@ public class LogAnalyser
if (startDate != null)
{
dateQuery.append(" AND text_value::timestamp > '" +
unParseDate(startDate) + "'::timestamp ");
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)
{
dateQuery.append(" AND text_value::timestamp < ' " +
unParseDate(endDate) + "'::timestamp ");
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 +1263,18 @@ public class LogAnalyser
TableRow row = DatabaseManager.querySingle(context, query.toString());
// for some reason the number column is of "long" data type!
Long count = new Long(row.getLongColumn("number"));
return new Integer(count.intValue());
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("num"));
numItems = new Integer(count.intValue());
}
return numItems;
}

View File

@@ -54,7 +54,6 @@ import org.dspace.core.Constants;
import org.dspace.core.Utils;
import java.io.IOException;
import java.net.URLEncoder;
import java.sql.SQLException;
import java.util.Enumeration;
@@ -281,8 +280,7 @@ public class ItemTag extends TagSupport
private void render() throws IOException
{
JspWriter out = pageContext.getOut();
HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
String configLine = ConfigurationManager
.getProperty("webui.itemdisplay." + style);
@@ -305,8 +303,6 @@ public class ItemTag extends TagSupport
String field = st.nextToken().trim();
boolean isDate = false;
boolean isLink = false;
boolean isAuthor = isAuthor(field);
boolean isSubject = isSubject(field);
// Find out if the field should rendered as a date or link
@@ -366,18 +362,6 @@ public class ItemTag extends TagSupport
// Parse the date
out.print(UIUtil.displayDate(dd, false, false));
}
else if (isAuthor)
{
out.print("<a href=\"" + request.getContextPath() + "/items-by-author?author="
+ URLEncoder.encode(values[j].value, "UTF-8") + "\">" + values[j].value
+ "</a>");
}
else if (isSubject)
{
out.print("<a href=\"" + request.getContextPath() + "/items-by-subject?subject="
+ URLEncoder.encode(values[j].value, "UTF-8") + "\">" + values[j].value
+ "</a>");
}
else
{
out.print(Utils.addEntities(values[j].value));
@@ -894,121 +878,4 @@ public class ItemTag extends TagSupport
}
}
}
/**
* Is the given field name an Author field?
*
* If undefined in dspace.cfg (webui.browse.index.author) it defaults
* to using any field containing 'creator'.
*
* @param field
* @return Whether or not the given String is an author
*/
private boolean isAuthor(String field)
{
// Does the user want to link to authors?
if (ConfigurationManager.getBooleanProperty("webui.authorlinks.enable", true) == false)
{
return false;
}
//Check whether a given metadata field should be considered an author field.
String authorField = ConfigurationManager.getProperty("webui.browse.index.author");
if (authorField == null)
{
if (field.indexOf("contributor") > 0 || field.indexOf("creator") > 0)
return true;
else
return false;
}
else
{
StringTokenizer st = new StringTokenizer(authorField, ",");
String aField;
while (st.hasMoreTokens())
{
aField = st.nextToken().trim();
// does dspace.cfg allow all qualifiers for this element?
if (aField.endsWith(".*"))
{
// does the field have a qualifier?
int i = field.lastIndexOf(".");
if (i != field.indexOf("."))
{
// lop off qualifier
field = field.substring(0, i);
}
}
// check field against dspace.cfg
if (aField.indexOf(field) >= 0)
return true;
}
//no match found
return false;
}
}
/**
* Is the given field name a Subject field?
*
* If undefined in dspace.cfg (webui.browse.index.subject) it defaults
* to using any field containing 'subject'.
*
* @param field
* @return Whether or not the given String is a subject
*/
private boolean isSubject(String field)
{
// Does the user want to link to subjects?
if (ConfigurationManager.getBooleanProperty("webui.subjectlinks.enable", false) == false)
{
return false;
}
// Check whether a given metadata field should be considered a subject field
String subjectField = ConfigurationManager.getProperty("webui.browse.index.subject");
if (subjectField == null)
{
if (field.indexOf("subject") > 0)
{
return true;
}
else
{
return false;
}
}
else
{
StringTokenizer st = new StringTokenizer(subjectField, ",");
String sField;
while (st.hasMoreTokens())
{
sField = st.nextToken().trim();
// does dspace.cfg allow all qualifiers for this element?
if (sField.endsWith(".*"))
{
// does the field have a qualifier?
int i = field.lastIndexOf(".");
if (i != field.indexOf("."))
{
// lop off qualifier
field = field.substring(0, i);
}
}
// check field against dspace.cfg
if (sField.indexOf(field) >= 0)
{
return true;
}
}
//no match found
return false;
}
}
}

View File

@@ -185,7 +185,7 @@ public class SelectEPersonTag extends TagSupport
out.print("<input type=\"button\" value=\""
+ LocaleSupport.getLocalizedMessage(pageContext,
"org.dspace.app.webui.jsptag.SelectEPersonTag.removeSelected")
+ "\" onclick=\"javascript:removeSelected(window.document.forms[0].eperson_id);\"/>");
+ "\" onclick=\"javascript:removeSelected(window.document.epersongroup.eperson_id);\"/>");
}
out.println("</td></tr></table>");

View File

@@ -181,7 +181,7 @@ public class SelectGroupTag extends TagSupport
out.print("<input type=\"button\" value=\""
+ LocaleSupport.getLocalizedMessage(pageContext,
"org.dspace.app.webui.jsptag.SelectGroupTag.removeSelected")
+ "\" onclick=\"javascript:removeSelected(window.document.forms[0].group_ids);\"/>");
+ "\" onclick=\"javascript:removeSelected(window.document.epersongroup.group_ids);\"/>");
}
out.println("</td></tr></table>");

View File

@@ -5,7 +5,7 @@
*
* Date: $Date$
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Copyright (c) 2002-2007, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -792,6 +792,8 @@ public class SubmitServlet extends DSpaceServlet
throws ServletException, IOException, SQLException, AuthorizeException
{
String buttonPressed = UIUtil.getSubmitButton(request, "submit_next");
String defaultLanguage =
ConfigurationManager.getProperty("default.language");
// Firstly, check for a click of the cancel button.
if (buttonPressed.equals("submit_cancel"))
@@ -879,7 +881,8 @@ public class SubmitServlet extends DSpaceServlet
{
if (!vals[z].equals(""))
{
item.addMetadata(dcSchema, dcElement, dcQualifier, "en", vals[z]);
item.addMetadata(dcSchema, dcElement, dcQualifier,
defaultLanguage, vals[z]);
}
}
}
@@ -888,7 +891,7 @@ public class SubmitServlet extends DSpaceServlet
(inputType.equals("textarea")))
{
readText(request, item, dcSchema, dcElement, dcQualifier,
inputs[j].getRepeatable(), "en");
inputs[j].getRepeatable(), defaultLanguage);
}
else
{

View File

@@ -61,14 +61,7 @@ import org.dspace.eperson.EPerson;
*/
public class EPersonListServlet extends DSpaceServlet
{
protected void doDSPost(Context context, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException,
SQLException, AuthorizeException
{
doDSGet(context, request, response);
}
protected void doDSGet(Context context, HttpServletRequest request,
protected void doDSGet(Context context, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException,
SQLException, AuthorizeException
{
@@ -95,37 +88,20 @@ public class EPersonListServlet extends DSpaceServlet
// What's the index of the first eperson to show? Default is 0
int first = UIUtil.getIntParameter(request, "first");
int offset = UIUtil.getIntParameter(request, "offset");
if (first == -1)
{
first = 0;
}
if (offset == -1)
{
offset = 0;
}
EPerson[] epeople;
String search = request.getParameter("search");
if (search != null && !search.equals(""))
{
epeople = EPerson.search(context, search);
request.setAttribute("offset", new Integer(offset));
}
else
{
// Retrieve the e-people in the specified order
epeople = EPerson.findAll(context, sortBy);
request.setAttribute("offset", new Integer(0));
}
// Retrieve the e-people in the specified order
EPerson[] epeople = EPerson.findAll(context, sortBy);
// Set attributes for JSP
request.setAttribute("sortby", new Integer(sortBy));
request.setAttribute("first", new Integer(first));
request.setAttribute("epeople", epeople);
request.setAttribute("search", search);
if (multiple)
{
request.setAttribute("multiple", new Boolean(true));

View File

@@ -478,6 +478,12 @@ public class Bitstream extends DSpaceObject
*/
void delete() throws SQLException
{
boolean oracle = false;
if ("oracle".equals(ConfigurationManager.getProperty("db.name")))
{
oracle = true;
}
// changed to a check on remove
// Check authorisation
//AuthorizeManager.authorizeAction(bContext, this, Constants.DELETE);
@@ -490,6 +496,12 @@ public class Bitstream extends DSpaceObject
// Remove policies
AuthorizeManager.removeAllPolicies(bContext, this);
// Remove references to primary bitstreams in bundle
String query = "update bundle set primary_bitstream_id = ";
query += (oracle ? "''" : "Null") + " where primary_bitstream_id = ? ";
DatabaseManager.updateQuery(bContext,
query, bRow.getIntColumn("bitstream_id"));
// Remove bitstream itself
BitstreamStorageManager.delete(bContext, bRow
.getIntColumn("bitstream_id"));

View File

@@ -41,9 +41,6 @@ package org.dspace.content;
import java.sql.SQLException;
import java.util.Iterator;
import java.util.ArrayList;
import org.dspace.core.Context;
import org.dspace.storage.rdbms.TableRow;
import org.dspace.storage.rdbms.TableRowIterator;
@@ -53,12 +50,8 @@ import org.dspace.storage.rdbms.TableRowIterator;
* items into memory one by one, since in many cases, it would not make sense to
* load a set of items into memory all at once. For example, loading in an
* entire community or site's worth of items wouldn't make sense.
*
* Note that this class is not a real Iterator, as it does not implement
* the Iterator interface
*
* @author Robert Tansley
* @author Richard Jones
* @version $Revision$
*/
public class ItemIterator
@@ -73,55 +66,29 @@ public class ItemIterator
/** The table row iterator of Item rows */
private TableRowIterator itemRows;
/** a real iterator which works over the item ids when present */
private Iterator iditr;
/**
* Construct an item iterator using a set of TableRow objects from
* the item table
* Construct an item iterator. This is not a public method, since this
* iterator is only created by CM API methods.
*
* @param context
* our context
* @param rows
* the rows that correspond to the Items to be iterated over
*/
public ItemIterator(Context context, TableRowIterator rows)
ItemIterator(Context context, TableRowIterator rows)
{
ourContext = context;
itemRows = rows;
}
/**
* Construct an item iterator using an array list of item ids
*
* @param context
* our context
* @param iids
* the array list to be iterated over
*/
public ItemIterator(Context context, ArrayList iids)
{
ourContext = context;
iditr = iids.iterator();
}
/**
* Find out if there are any more items to iterate over
*
* @return <code>true</code> if there are more items
* @throws SQLException
*/
public boolean hasNext() throws SQLException
{
if (iditr != null)
{
return iditr.hasNext();
}
else if (itemRows != null)
{
return itemRows.hasNext();
}
return false;
return itemRows.hasNext();
}
/**
@@ -129,125 +96,10 @@ public class ItemIterator
* are no more items.
*
* @return the next item, or <code>null</code>
* @throws SQLException
*/
public Item next() throws SQLException
{
if (iditr != null)
{
return nextByID();
}
else if (itemRows != null)
{
return nextByRow();
}
return null;
}
/**
* This private method knows how to get the next result out of the
* item id iterator
*
* @return the next item instantiated from the id
* @throws SQLException
*/
private Item nextByID()
throws SQLException
{
if (iditr.hasNext())
{
// get the id
int id = ((Integer) iditr.next()).intValue();
// Check cache
Item fromCache = (Item) ourContext.fromCache(Item.class, id);
if (fromCache != null)
{
return fromCache;
}
else
{
return Item.find(ourContext, id);
}
}
else
{
return null;
}
}
/**
* return the id of the next item.
*
* @return the next id or -1 if none
*/
public int nextID()
throws SQLException
{
if (iditr != null)
{
return nextByIDID();
}
else if (itemRows != null)
{
return nextByRowID();
}
return -1;
}
/**
* Sorry about the name of this one! It returns the ID of the item
* as opposed to the item itself when we are iterating over an ArrayList
* of item ids
*
* @return the item id, or -1 if none
*/
private int nextByIDID()
{
if (iditr.hasNext())
{
// get the id
int id = ((Integer) iditr.next()).intValue();
return id;
}
else
{
return -1;
}
}
/**
* Returns the ID of the item as opposed to the item itself when we are
* iterating over the TableRow array.
*
* @return the item id, or -1 if none
*/
private int nextByRowID()
throws SQLException
{
if (itemRows.hasNext())
{
TableRow row = itemRows.next();
return row.getIntColumn("item_id");
}
else
{
return -1;
}
}
/**
* Return the next item instantiated from the supplied TableRow
*
* @return the item or null if none
* @throws SQLException
*/
private Item nextByRow()
throws SQLException
{
if (itemRows.hasNext())
if (itemRows.hasNext())
{
// Convert the row into an Item object
TableRow row = itemRows.next();

View File

@@ -48,7 +48,6 @@ import java.sql.SQLException;
import java.util.ArrayList;
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;
@@ -82,45 +81,17 @@ public class PasswordAuthentication
private static Logger log = Logger.getLogger(PasswordAuthentication.class);
/**
* Look to see if this email address is allowed to register.
* <p>
* The configuration key authentication.password.domain.valid is examined
* in dspace.cfg to see what doamins are valid.
* <p>
* Example - aber.ac.uk domains : @aber.ac.uk
* Example - MIT domain and all .ac.uk domains: @mit.edu, .ac.uk
* Just return true since anyone can self-register by creating new
* EPerson.
* <p>NOTE: It may be desireable to have this consult a
* configuration parameter first.
*/
public boolean canSelfRegister(Context context,
HttpServletRequest request,
String email)
throws SQLException
String username)
throws SQLException
{
// Is there anything set in authentication.password.domain.valid?
String domains = ConfigurationManager.getProperty("authentication.password.domain.valid");
if ((domains == null) || (domains.trim().equals("")))
{
// No conditions set, so must be able to self register
return true;
}
else
{
// Itterate through all domains
String[] options = domains.trim().split(",");
String check;
email = email.trim().toLowerCase();
for (int i = 0; i < options.length; i++)
{
check = options[i].trim().toLowerCase();
if (email.endsWith(check))
{
// A match, so we can register this user
return true;
}
}
// No match
return false;
}
return true;
}
/**

File diff suppressed because it is too large Load Diff

View File

@@ -40,6 +40,7 @@
package org.dspace.search;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -83,21 +84,29 @@ public class DSQuery
static final String COMMUNITY = "" + Constants.COMMUNITY;
// cache a Lucene IndexSearcher for more efficient searches
private static Searcher searcher;
private static IndexSearcher searcher = null;
private static String indexDir = null;
private static String operator = null;
private static long lastModified;
/** log4j logger */
private static Logger log = Logger.getLogger(DSQuery.class);
static
{
String maxClauses = ConfigurationManager
.getProperty("search.max-clauses");
String maxClauses = ConfigurationManager.getProperty("search.max-clauses");
if (maxClauses != null)
{
BooleanQuery.setMaxClauseCount(Integer.parseInt(maxClauses));
}
indexDir = ConfigurationManager.getProperty("search.dir");
operator = ConfigurationManager.getProperty("search.operator");
}
/**
@@ -135,13 +144,11 @@ public class DSQuery
try
{
// grab a searcher, and do the search
Searcher searcher = getSearcher(ConfigurationManager
.getProperty("search.dir"));
Searcher searcher = getSearcher(c);
QueryParser qp = new QueryParser("default", DSIndexer.getAnalyzer());
log.info("Final query string: " + querystring);
String operator = ConfigurationManager.getProperty("search.operator");
if (operator == null || operator.equals("OR"))
{
qp.setDefaultOperator(QueryParser.OR_OPERATOR);
@@ -388,21 +395,66 @@ public class DSQuery
}
}
/*--------- private methods ----------*/
/*--------- protected methods ----------*/
/**
* get an IndexReader.
* @throws IOException
*/
protected static IndexReader getIndexReader()
throws IOException
{
return getSearcher(null).getIndexReader();
}
/**
* get an IndexSearcher, hopefully a cached one (gives much better
* performance.) checks to see if the index has been modified - if so, it
* creates a new IndexSearcher
*/
private static synchronized Searcher getSearcher(String indexDir)
protected static synchronized IndexSearcher getSearcher(Context c)
throws IOException
{
if (lastModified != IndexReader.getCurrentVersion(indexDir))
// If we have already opened a searcher, check to see if the index has been updated
// If it has, we need to close the existing searcher - we will open a new one later
if (searcher != null && lastModified != IndexReader.getCurrentVersion(indexDir))
{
// there's a new index, open it
try
{
// Close the cached IndexSearcher
searcher.close();
}
catch (IOException ioe)
{
// Index is probably corrupt. Log the error, but continue to either:
// 1) Return existing searcher (may yet throw exception, no worse than throwing here)
log.warn("DSQuery: Unable to check for updated index", ioe);
}
finally
{
searcher = null;
}
}
// There is no existing searcher - either this is the first execution,
// or the index has been updated and we closed the old index.
if (searcher == null)
{
// So, open a new searcher
lastModified = IndexReader.getCurrentVersion(indexDir);
searcher = new IndexSearcher(indexDir);
searcher = new IndexSearcher(indexDir){
/*
* TODO: Has Lucene fixed this bug yet?
* Lucene doesn't release read locks in
* windows properly on finalize. Our hack
* extend IndexSearcher to force close().
*/
protected void finalize() throws Throwable {
this.close();
super.finalize();
}
};
}
return searcher;

View File

@@ -150,16 +150,7 @@ public class DatabaseManager
{
if (log.isDebugEnabled())
{
StringBuffer sb = new StringBuffer();
for (int i = 0; i < parameters.length; i++)
{
if (i > 0)
{
sb.append(",");
}
sb.append(parameters[i].toString());
}
log.debug("Running query \"" + query + "\" with parameters: " + sb.toString());
log.debug("Running query \"" + query + "\"");
}
PreparedStatement statement = context.getDBConnection().prepareStatement(query);
@@ -257,18 +248,9 @@ public class DatabaseManager
public static TableRowIterator query(Context context, String query, Object[] parameters)
throws SQLException
{
if (log.isDebugEnabled())
if (log.isDebugEnabled())
{
StringBuffer sb = new StringBuffer();
for (int i = 0; i < parameters.length; i++)
{
if (i > 0)
{
sb.append(",");
}
sb.append(parameters[i].toString());
}
log.debug("Running query \"" + query + "\" with parameters: " + sb.toString());
log.debug("Running query \"" + query + "\"");
}
PreparedStatement statement = context.getDBConnection().prepareStatement(query);
@@ -526,16 +508,7 @@ public class DatabaseManager
if (log.isDebugEnabled())
{
StringBuffer sb = new StringBuffer();
for (int i = 0; i < parameters.length; i++)
{
if (i > 0)
{
sb.append(",");
}
sb.append(parameters[i].toString());
}
log.debug("Running query \"" + query + "\" with parameters: " + sb.toString());
log.debug("Running query \"" + query + "\"");
}
try