mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Compare commits
59 Commits
alert-auto
...
dspace-1.6
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ca73b41d05 | ||
![]() |
8995238be1 | ||
![]() |
628295e107 | ||
![]() |
6c49c32214 | ||
![]() |
a3a70825ce | ||
![]() |
0cea409f31 | ||
![]() |
24fbc03630 | ||
![]() |
6770810462 | ||
![]() |
11e85e4bed | ||
![]() |
eacde4aa32 | ||
![]() |
16c633b226 | ||
![]() |
6358b152eb | ||
![]() |
d9d91ce552 | ||
![]() |
bb0534d912 | ||
![]() |
394be66d74 | ||
![]() |
002b1c22b4 | ||
![]() |
5f1bcaa437 | ||
![]() |
d9f1e08fe7 | ||
![]() |
a7d52b7802 | ||
![]() |
6500a2e5ac | ||
![]() |
fdfab3da14 | ||
![]() |
edb9b9b8b1 | ||
![]() |
ef0cd21f64 | ||
![]() |
1b0f45a8d6 | ||
![]() |
1c6ebb0d4a | ||
![]() |
44a8a763a9 | ||
![]() |
ebc891d3d7 | ||
![]() |
c1317f8753 | ||
![]() |
cb401c2eb2 | ||
![]() |
0549c5947b | ||
![]() |
fdadd8aa9c | ||
![]() |
9fcd19153a | ||
![]() |
863d4d647a | ||
![]() |
42adb70f8d | ||
![]() |
da8285393c | ||
![]() |
e1f72043a7 | ||
![]() |
5d9691e010 | ||
![]() |
32da19a323 | ||
![]() |
2e307d5904 | ||
![]() |
815d9dd125 | ||
![]() |
aa1d546474 | ||
![]() |
e8e5bddd61 | ||
![]() |
4fcafbbcdb | ||
![]() |
8d107326e1 | ||
![]() |
dc5ecddc95 | ||
![]() |
2b51d2fbbf | ||
![]() |
c3f730bb4b | ||
![]() |
c207333067 | ||
![]() |
2501b276fc | ||
![]() |
216a7b4665 | ||
![]() |
0c0b6e6c25 | ||
![]() |
f2fde095c0 | ||
![]() |
072416ad3a | ||
![]() |
91bdd593c9 | ||
![]() |
668a4b7d14 | ||
![]() |
b4a55a7011 | ||
![]() |
f2be846fb9 | ||
![]() |
81e7c37073 | ||
![]() |
c82e847113 |
@@ -13,7 +13,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -39,9 +39,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace</url>
|
||||
</scm>
|
||||
|
||||
<!--
|
||||
|
@@ -66,11 +66,17 @@ public class BulkEditChange
|
||||
/** The ArrayList of the complete set of new values (constant + adds) */
|
||||
private ArrayList<DCValue> complete;
|
||||
|
||||
/** The Arraylist of old collections the item has been moved from */
|
||||
private ArrayList<Collection> oldOwningCollections;
|
||||
/** The Arraylist of old collections the item used to be mapped to */
|
||||
private ArrayList<Collection> oldMappedCollections;
|
||||
|
||||
/** The Arraylist of new collections the item has been moved into */
|
||||
private ArrayList<Collection> newOwningCollections;
|
||||
/** The Arraylist of new collections the item has been mapped into */
|
||||
private ArrayList<Collection> newMappedCollections;
|
||||
|
||||
/** The old owning collection */
|
||||
private Collection oldOwningCollection;
|
||||
|
||||
/** The new owning collection */
|
||||
private Collection newOwningCollection;
|
||||
|
||||
/** Is this a new item */
|
||||
private boolean newItem;
|
||||
@@ -88,14 +94,16 @@ public class BulkEditChange
|
||||
item = null;
|
||||
newItem = true;
|
||||
empty = true;
|
||||
oldOwningCollection = null;
|
||||
newOwningCollection = null;
|
||||
|
||||
// Initialise the arrays
|
||||
adds = new ArrayList<DCValue>();
|
||||
removes = new ArrayList<DCValue>();
|
||||
constant = new ArrayList<DCValue>();
|
||||
complete = new ArrayList<DCValue>();
|
||||
oldOwningCollections = new ArrayList<Collection>();
|
||||
newOwningCollections = new ArrayList<Collection>();
|
||||
oldMappedCollections = new ArrayList<Collection>();
|
||||
newMappedCollections = new ArrayList<Collection>();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,8 +123,8 @@ public class BulkEditChange
|
||||
removes = new ArrayList<DCValue>();
|
||||
constant = new ArrayList<DCValue>();
|
||||
complete = new ArrayList<DCValue>();
|
||||
oldOwningCollections = new ArrayList<Collection>();
|
||||
newOwningCollections = new ArrayList<Collection>();
|
||||
oldMappedCollections = new ArrayList<Collection>();
|
||||
newMappedCollections = new ArrayList<Collection>();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,29 +176,76 @@ public class BulkEditChange
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new owning Collection
|
||||
* Add a new mapped Collection
|
||||
*
|
||||
* @param c The new owning Collection
|
||||
* @param c The new mapped Collection
|
||||
*/
|
||||
public void registerNewOwningCollection(Collection c)
|
||||
public void registerNewMappedCollection(Collection c)
|
||||
{
|
||||
// Add the new owning Collection\
|
||||
newOwningCollections.add(c);
|
||||
// Add the new owning Collection
|
||||
newMappedCollections.add(c);
|
||||
empty = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an old owning Collection
|
||||
* Add an old mapped Collection
|
||||
*
|
||||
* @param c The old owning Collection
|
||||
* @param c The old mapped Collection
|
||||
*/
|
||||
public void registerOldOwningCollection(Collection c)
|
||||
public void registerOldMappedCollection(Collection c)
|
||||
{
|
||||
// Add the old owning Collection\
|
||||
oldOwningCollections.add(c);
|
||||
// Add the old owning Collection (if it isn't there already, or is an old collection)
|
||||
boolean found = false;
|
||||
|
||||
if ((this.getOldOwningCollection() != null) &&
|
||||
(this.getOldOwningCollection().getHandle().equals(c.getHandle())))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
|
||||
for (Collection collection : oldMappedCollections)
|
||||
{
|
||||
if (collection.getHandle().equals(c.getHandle()))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
oldMappedCollections.add(c);
|
||||
empty = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a change to the owning collection
|
||||
*
|
||||
* @param oldC The old owning collection
|
||||
* @param newC The new owning collection
|
||||
*/
|
||||
public void changeOwningCollection(Collection oldC, Collection newC)
|
||||
{
|
||||
// Store the old owning collection
|
||||
oldOwningCollection = oldC;
|
||||
|
||||
// Store the new owning collection
|
||||
newOwningCollection = newC;
|
||||
empty = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the owning collection of an item
|
||||
*
|
||||
* @param newC The new owning collection
|
||||
*/
|
||||
public void setOwningCollection(Collection newC)
|
||||
{
|
||||
// Store the new owning collection
|
||||
newOwningCollection = newC;
|
||||
//empty = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DSpace Item that these changes are applicable to.
|
||||
*
|
||||
@@ -247,25 +302,47 @@ public class BulkEditChange
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of new owning Collections
|
||||
* Get the list of new mapped Collections
|
||||
*
|
||||
* @return the list of new owning collections
|
||||
* @return the list of new mapped collections
|
||||
*/
|
||||
public ArrayList<Collection> getNewOwningCollections()
|
||||
public ArrayList<Collection> getNewMappedCollections()
|
||||
{
|
||||
// Return the array
|
||||
return newOwningCollections;
|
||||
return newMappedCollections;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of old owning Collections
|
||||
* Get the list of old mapped Collections
|
||||
*
|
||||
* @return the list of old owning collections
|
||||
* @return the list of old mapped collections
|
||||
*/
|
||||
public ArrayList<Collection> getOldOwningCollections()
|
||||
public ArrayList<Collection> getOldMappedCollections()
|
||||
{
|
||||
// Return the array
|
||||
return oldOwningCollections;
|
||||
return oldMappedCollections;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the old owning collection
|
||||
*
|
||||
* @return the old owning collection
|
||||
*/
|
||||
public Collection getOldOwningCollection()
|
||||
{
|
||||
// Return the old owning collection
|
||||
return oldOwningCollection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the new owning collection
|
||||
*
|
||||
* @return the new owning collection
|
||||
*/
|
||||
public Collection getNewOwningCollection()
|
||||
{
|
||||
// Return the new owning collection
|
||||
return newOwningCollection;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -265,11 +265,19 @@ public class DSpaceCSV
|
||||
// Create the CSV line
|
||||
DSpaceCSVLine line = new DSpaceCSVLine(i.getID());
|
||||
|
||||
// Add in owning collections
|
||||
// Add in owning collection
|
||||
String owningCollectionHandle = i.getOwningCollection().getHandle();
|
||||
line.add("collection", owningCollectionHandle);
|
||||
|
||||
// Add in any mapped collections
|
||||
Collection[] collections = i.getCollections();
|
||||
for (Collection c : collections)
|
||||
{
|
||||
line.add("collection", c.getHandle());
|
||||
// Only add if it is not the owning collection
|
||||
if (!c.getHandle().equals(owningCollectionHandle))
|
||||
{
|
||||
line.add("collection", c.getHandle());
|
||||
}
|
||||
}
|
||||
|
||||
// Populate it
|
||||
|
@@ -120,6 +120,10 @@ public class MetadataImport
|
||||
{
|
||||
// Get the item
|
||||
Item item = Item.find(c, id);
|
||||
if (item == null)
|
||||
{
|
||||
throw new MetadataImportException("Unknown item ID " + id);
|
||||
}
|
||||
BulkEditChange whatHasChanged = new BulkEditChange(item);
|
||||
|
||||
// Has it moved collection?
|
||||
@@ -224,10 +228,19 @@ public class MetadataImport
|
||||
}
|
||||
|
||||
// Record the addition to collections
|
||||
boolean first = true;
|
||||
for (String handle : collections)
|
||||
{
|
||||
Collection extra = (Collection)HandleManager.resolveToObject(c, handle);
|
||||
whatHasChanged.registerNewOwningCollection(extra);
|
||||
if (first)
|
||||
{
|
||||
whatHasChanged.setOwningCollection(extra);
|
||||
}
|
||||
else
|
||||
{
|
||||
whatHasChanged.registerNewMappedCollection(extra);
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
// Create the new item?
|
||||
@@ -454,10 +467,11 @@ public class MetadataImport
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare changes between an items owning collections and what is in the CSV file
|
||||
* Compare changes between an items owning collection and mapped collections
|
||||
* and what is in the CSV file
|
||||
*
|
||||
* @param item The item in question
|
||||
* @param collections The collection handles fro mthe CSV file
|
||||
* @param collections The collection handles from the CSV file
|
||||
* @param actualCollections The Collections from the actual item
|
||||
* @param bechange The bulkedit change object for this item
|
||||
* @param change Whether or not to actuate a change
|
||||
@@ -473,90 +487,138 @@ public class MetadataImport
|
||||
BulkEditChange bechange,
|
||||
boolean change) throws SQLException, AuthorizeException, IOException, MetadataImportException
|
||||
{
|
||||
// First, loop through the strings from the CSV
|
||||
// First, check the owning collection (as opposed to mapped collections) is the same of changed
|
||||
String oldOwner = item.getOwningCollection().getHandle();
|
||||
String newOwner = collections.get(0);
|
||||
// Resolve the handle to the collection
|
||||
Collection newCollection = (Collection)HandleManager.resolveToObject(c, newOwner);
|
||||
|
||||
// Check it resolved OK
|
||||
if (newCollection == null)
|
||||
{
|
||||
throw new MetadataImportException("'" + newOwner + "' is not a Collection! You must specify a valid collection ID");
|
||||
}
|
||||
|
||||
if (!oldOwner.equals(newOwner))
|
||||
{
|
||||
// Register the old and new owning collections
|
||||
bechange.changeOwningCollection(item.getOwningCollection(), (Collection)HandleManager.resolveToObject(c, newOwner));
|
||||
}
|
||||
|
||||
// Second, loop through the strings from the CSV of mapped collections
|
||||
boolean first = true;
|
||||
for (String csvcollection : collections)
|
||||
{
|
||||
// Look for it in the actual list of Collections
|
||||
boolean found = false;
|
||||
for (Collection collection : actualCollections)
|
||||
// Ignore the first collection as this is the owning collection
|
||||
if (!first)
|
||||
{
|
||||
// Is it there?
|
||||
if (csvcollection.equals(collection.getHandle()))
|
||||
// Look for it in the actual list of Collections
|
||||
boolean found = false;
|
||||
for (Collection collection : actualCollections)
|
||||
{
|
||||
found = true;
|
||||
if (collection.getID() != item.getOwningCollection().getID()) {
|
||||
// Is it there?
|
||||
if (csvcollection.equals(collection.getHandle()))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Was it found?
|
||||
if (!found)
|
||||
{
|
||||
// Register than change
|
||||
// Was it found?
|
||||
DSpaceObject dso = HandleManager.resolveToObject(c, csvcollection);
|
||||
if ((dso == null) || (dso.getType() != Constants.COLLECTION))
|
||||
{
|
||||
throw new MetadataImportException("Collection defined for item " + item.getID() +
|
||||
" (" + item.getHandle() + ") is not a collection");
|
||||
}
|
||||
else
|
||||
if (!found)
|
||||
{
|
||||
// Register the new mapped collection
|
||||
Collection col = (Collection)dso;
|
||||
bechange.registerNewOwningCollection(col);
|
||||
|
||||
// Execute the change
|
||||
if (change)
|
||||
{
|
||||
// Add the item to the community
|
||||
col.addItem(item);
|
||||
}
|
||||
bechange.registerNewMappedCollection(col);
|
||||
}
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
// Second, loop through the strings from the current item
|
||||
// Third, loop through the strings from the current item
|
||||
for (Collection collection : actualCollections)
|
||||
{
|
||||
// Look for it in the actual list of Collections
|
||||
boolean found = false;
|
||||
first = true;
|
||||
for (String csvcollection : collections)
|
||||
{
|
||||
// Is it there?
|
||||
if (collection.getHandle().equals(csvcollection))
|
||||
// Don't check the owning collection
|
||||
if ((first) && (collection.getID() == item.getOwningCollection().getID()))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!first)
|
||||
{
|
||||
// Is it there?
|
||||
if (collection.getHandle().equals(csvcollection))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
// Was it found?
|
||||
if (!found)
|
||||
{
|
||||
// Reocrd that it isn't there any more
|
||||
bechange.registerOldOwningCollection(collection);
|
||||
|
||||
// Execute the change
|
||||
if (change)
|
||||
{
|
||||
// Sanity check it is in another collection
|
||||
if (item.getCollections().length > 1)
|
||||
{
|
||||
collection.removeItem(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new MetadataImportException("Not removing item " + item.getHandle() +
|
||||
" from collection " + collection.getHandle() +
|
||||
" as it would leave it oprhaned!");
|
||||
}
|
||||
}
|
||||
// Record that it isn't there any more
|
||||
bechange.registerOldMappedCollection(collection);
|
||||
}
|
||||
}
|
||||
|
||||
// Now check the owning_collection (item table) is the same as
|
||||
// the first collection given in the CSV file entry
|
||||
if ((change) && (!collections.get(0).equals(item.getOwningCollection().getHandle())))
|
||||
// Process the changes
|
||||
if (change)
|
||||
{
|
||||
Collection owner = (Collection)HandleManager.resolveToObject(c, collections.get(0));
|
||||
item.setOwningCollection(Collection.find(c, owner.getID()));
|
||||
item.update();
|
||||
// Remove old mapped collections
|
||||
for (Collection c : bechange.getOldMappedCollections())
|
||||
{
|
||||
c.removeItem(item);
|
||||
}
|
||||
|
||||
// Add to new owned collection
|
||||
if (bechange.getNewOwningCollection() != null)
|
||||
{
|
||||
bechange.getNewOwningCollection().addItem(item);
|
||||
item.setOwningCollection(bechange.getNewOwningCollection());
|
||||
item.update();
|
||||
}
|
||||
|
||||
// Remove from old owned collection (if still a member)
|
||||
if (bechange.getOldOwningCollection() != null)
|
||||
{
|
||||
boolean found = false;
|
||||
for (Collection c : item.getCollections())
|
||||
{
|
||||
if (c.getID() == bechange.getOldOwningCollection().getID())
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (found)
|
||||
{
|
||||
bechange.getOldOwningCollection().removeItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
// Add to new mapped collections
|
||||
for (Collection c : bechange.getNewMappedCollections())
|
||||
{
|
||||
c.addItem(item);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,10 +757,11 @@ public class MetadataImport
|
||||
// Get the changes
|
||||
ArrayList<DCValue> adds = change.getAdds();
|
||||
ArrayList<DCValue> removes = change.getRemoves();
|
||||
ArrayList<Collection> newCollections = change.getNewOwningCollections();
|
||||
ArrayList<Collection> oldCollections = change.getOldOwningCollections();
|
||||
ArrayList<Collection> newCollections = change.getNewMappedCollections();
|
||||
ArrayList<Collection> oldCollections = change.getOldMappedCollections();
|
||||
if ((adds.size() > 0) || (removes.size() > 0) ||
|
||||
(newCollections.size() > 0) || (oldCollections.size() > 0))
|
||||
(newCollections.size() > 0) || (oldCollections.size() > 0) ||
|
||||
(change.getNewOwningCollection() != null) || (change.getOldOwningCollection() != null))
|
||||
{
|
||||
// Show the item
|
||||
Item i = change.getItem();
|
||||
@@ -727,34 +790,69 @@ public class MetadataImport
|
||||
changeCounter++;
|
||||
}
|
||||
|
||||
// Show new collections
|
||||
if (change.getNewOwningCollection() != null)
|
||||
{
|
||||
Collection c = change.getNewOwningCollection();
|
||||
if (c != null)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
if (!changed)
|
||||
{
|
||||
System.out.print(" + New owning collection (" + cHandle + "): ");
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.print(" + New owning collection (" + cHandle + "): ");
|
||||
}
|
||||
System.out.println(cName);
|
||||
}
|
||||
|
||||
c = change.getOldOwningCollection();
|
||||
if (c != null)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
if (!changed)
|
||||
{
|
||||
System.out.print(" + Old owning collection (" + cHandle + "): ");
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.print(" + Old owning collection (" + cHandle + "): ");
|
||||
}
|
||||
System.out.println(cName);
|
||||
}
|
||||
}
|
||||
|
||||
// Show new mapped collections
|
||||
for (Collection c : newCollections)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
if (!changed)
|
||||
{
|
||||
System.out.print(" + Add to collection (" + cHandle + "): ");
|
||||
System.out.print(" + Map to collection (" + cHandle + "): ");
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.print(" + Added to collection (" + cHandle + "): ");
|
||||
System.out.print(" + Mapped to collection (" + cHandle + "): ");
|
||||
}
|
||||
System.out.println(cName);
|
||||
}
|
||||
|
||||
// Show old collections
|
||||
// Show old mapped collections
|
||||
for (Collection c : oldCollections)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
if (!changed)
|
||||
{
|
||||
System.out.print(" + Remove from collection (" + cHandle + "): ");
|
||||
System.out.print(" + Um-map from collection (" + cHandle + "): ");
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.print(" + Removed from collection (" + cHandle + "): ");
|
||||
System.out.print(" + Un-mapped from collection (" + cHandle + "): ");
|
||||
}
|
||||
System.out.println(cName);
|
||||
}
|
||||
|
@@ -113,7 +113,21 @@ public class ScriptLauncher
|
||||
{
|
||||
// Instantiate the class
|
||||
Class target = null;
|
||||
String className = step.getChild("class").getValue();
|
||||
|
||||
// Is it the special case 'dsrun' where the user provides the class name?
|
||||
String className;
|
||||
if ("dsrun".equals(request))
|
||||
{
|
||||
if (args.length < 2)
|
||||
{
|
||||
System.err.println("Error in launcher.xml: Missing class name");
|
||||
System.exit(1);
|
||||
}
|
||||
className = args[1];
|
||||
}
|
||||
else {
|
||||
className = step.getChild("class").getValue();
|
||||
}
|
||||
try
|
||||
{
|
||||
target = Class.forName(className,
|
||||
@@ -136,16 +150,20 @@ public class ScriptLauncher
|
||||
{
|
||||
passargs = false;
|
||||
}
|
||||
if ((args.length == 1) || (!passargs))
|
||||
if ((args.length == 1) || (("dsrun".equals(request)) && (args.length == 2)) || (!passargs))
|
||||
{
|
||||
useargs = new String[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
String[] argsnew = new String[useargs.length - 1];
|
||||
for (int i = 1; i < useargs.length; i++)
|
||||
// The number of arguments to ignore
|
||||
// If dsrun is the command, ignore the next, as it is the class name not an arg
|
||||
int x = 1;
|
||||
if ("dsrun".equals(request)) x = 2;
|
||||
String[] argsnew = new String[useargs.length - x];
|
||||
for (int i = x; i < useargs.length; i++)
|
||||
{
|
||||
argsnew[i - 1] = useargs[i];
|
||||
argsnew[i - x] = useargs[i];
|
||||
}
|
||||
useargs = argsnew;
|
||||
}
|
||||
@@ -176,7 +194,7 @@ public class ScriptLauncher
|
||||
// Establish a request related to the current session
|
||||
// that will trigger the various request listeners
|
||||
requestService.startRequest();
|
||||
|
||||
|
||||
// Run the main() method
|
||||
try
|
||||
{
|
||||
@@ -189,33 +207,33 @@ public class ScriptLauncher
|
||||
System.out.print(" " + param);
|
||||
}
|
||||
System.out.println("");**/
|
||||
|
||||
|
||||
Method main = target.getMethod("main", argTypes);
|
||||
Object output = main.invoke(null, arguments);
|
||||
|
||||
// ensure we close out the request (happy request)
|
||||
requestService.endRequest(null);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Failure occurred in the request so we destroy it
|
||||
requestService.endRequest(e);
|
||||
|
||||
|
||||
if (kernelImpl != null)
|
||||
{
|
||||
kernelImpl.destroy();
|
||||
kernelImpl = null;
|
||||
}
|
||||
|
||||
|
||||
// Exceptions from the script are reported as a 'cause'
|
||||
Throwable cause = e.getCause();
|
||||
System.err.println("Exception: " + cause.getMessage());
|
||||
cause.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Destroy the service kernel
|
||||
@@ -224,7 +242,7 @@ public class ScriptLauncher
|
||||
kernelImpl.destroy();
|
||||
kernelImpl = null;
|
||||
}
|
||||
|
||||
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
@@ -235,7 +253,7 @@ public class ScriptLauncher
|
||||
kernelImpl.destroy();
|
||||
kernelImpl = null;
|
||||
}
|
||||
|
||||
|
||||
// The command wasn't found
|
||||
System.err.println("Command not found: " + args[0]);
|
||||
display();
|
||||
|
@@ -89,7 +89,7 @@ public class DailyReportEmailer
|
||||
* Send the report through email.
|
||||
*
|
||||
* @param attachment
|
||||
* the file conntaing the report
|
||||
* the file containing the report
|
||||
* @param numberOfBitstreams
|
||||
* the number of bitstreams reported
|
||||
*
|
||||
@@ -117,7 +117,7 @@ public class DailyReportEmailer
|
||||
// create the first part of the email
|
||||
BodyPart messageBodyPart = new MimeBodyPart();
|
||||
messageBodyPart
|
||||
.setText("This is the checksum checker report see attachement for details \n"
|
||||
.setText("This is the checksum checker report see attachment for details \n"
|
||||
+ numberOfBitstreams
|
||||
+ " Bitstreams found with POSSIBLE issues");
|
||||
multipart.addBodyPart(messageBodyPart);
|
||||
@@ -183,7 +183,7 @@ public class DailyReportEmailer
|
||||
"c",
|
||||
"Changed",
|
||||
false,
|
||||
"Send E-mail report for all bitstrems where checksum has been changed for today");
|
||||
"Send E-mail report for all bitstreams where checksum has been changed for today");
|
||||
options.addOption("a", "All", false, "Send all E-mail reports");
|
||||
|
||||
options.addOption("u", "Unchecked", false,
|
||||
|
@@ -384,7 +384,7 @@ public class DCDate
|
||||
*/
|
||||
public int getYear()
|
||||
{
|
||||
return getLocalCalendar() == null ? -1 : localCalendar.get(Calendar.YEAR);
|
||||
return ((getLocalCalendar() == null) || (!withinGranularity(DateGran.YEAR))) ? -1 : localCalendar.get(Calendar.YEAR);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -394,7 +394,7 @@ public class DCDate
|
||||
*/
|
||||
public int getMonth()
|
||||
{
|
||||
return getLocalCalendar() == null ? -1 : localCalendar.get(Calendar.MONTH) + 1;
|
||||
return ((getLocalCalendar() == null) || (!withinGranularity(DateGran.MONTH))) ? -1 : localCalendar.get(Calendar.MONTH) + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -404,7 +404,7 @@ public class DCDate
|
||||
*/
|
||||
public int getDay()
|
||||
{
|
||||
return getLocalCalendar() == null ? -1 : localCalendar.get(Calendar.DAY_OF_MONTH);
|
||||
return ((getLocalCalendar() == null) || (!withinGranularity(DateGran.DAY))) ? -1 : localCalendar.get(Calendar.DAY_OF_MONTH);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -524,6 +524,52 @@ public class DCDate
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if the requested level of granularity is within that of the date.
|
||||
*
|
||||
* @param dg
|
||||
* The requested level of granularity.
|
||||
* @return
|
||||
* true or false.
|
||||
*
|
||||
*/
|
||||
private boolean withinGranularity(DateGran dg)
|
||||
{
|
||||
if (granularity == DateGran.TIME)
|
||||
{
|
||||
if ((dg == DateGran.TIME) || (dg == DateGran.DAY) || (dg == DateGran.MONTH) || (dg == DateGran.YEAR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (granularity == DateGran.DAY)
|
||||
{
|
||||
if ((dg == DateGran.DAY) || (dg == DateGran.MONTH) || (dg == DateGran.YEAR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (granularity == DateGran.MONTH)
|
||||
{
|
||||
if ((dg == DateGran.MONTH) || (dg == DateGran.YEAR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (granularity == DateGran.YEAR)
|
||||
{
|
||||
if (dg == DateGran.YEAR)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple test program
|
||||
* Usage: java org.dspace.content.DCdate [DCDate | -l yyyy [mm [dd ..]]] ]
|
||||
|
@@ -262,6 +262,8 @@ public class LCNameAuthority implements ChoiceAuthority
|
||||
private int hits = -1;
|
||||
private String textValue = null;
|
||||
private String name = null;
|
||||
private String oname = null;
|
||||
private String bname = null;
|
||||
private String lccn = null;
|
||||
private String lastTag = null;
|
||||
private String lastCode = null;
|
||||
@@ -332,6 +334,10 @@ public class LCNameAuthority implements ChoiceAuthority
|
||||
// 100.a is the personal name
|
||||
else if (lastTag.equals("100") && lastCode.equals("a"))
|
||||
name = textValue;
|
||||
|
||||
if (lastTag.equals("100") && lastCode.equals("d") && (name != null))
|
||||
name = name+" "+textValue;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -203,7 +203,7 @@ public abstract class AbstractMETSIngester
|
||||
METSManifest manifest = null;
|
||||
wi = WorkspaceItem.create(context, collection, useTemplate);
|
||||
Item item = wi.getItem();
|
||||
Bundle contentBundle = item.createBundle(Constants.CONTENT_BUNDLE_NAME);
|
||||
Bundle contentBundle = null;
|
||||
Bundle mdBundle = null;
|
||||
ZipEntry ze;
|
||||
while ((ze = zip.getNextEntry()) != null)
|
||||
@@ -238,6 +238,11 @@ public abstract class AbstractMETSIngester
|
||||
}
|
||||
else
|
||||
{
|
||||
// we need to create the bundle only the first time
|
||||
if (contentBundle == null)
|
||||
{
|
||||
contentBundle = item.createBundle(Constants.CONTENT_BUNDLE_NAME);
|
||||
}
|
||||
bs = contentBundle.createBitstream(new PackageUtils.UnclosableInputStream(zip));
|
||||
bs.setSource(fname);
|
||||
bs.setName(fname);
|
||||
|
@@ -479,7 +479,7 @@ public class Group extends DSpaceObject
|
||||
// However, we only do this is we are looking up the special groups
|
||||
// of the current user, as we cannot look up the special groups
|
||||
// of a user who is not logged in.
|
||||
if ((c.getCurrentUser() != null) && (c.getCurrentUser().getID() == e.getID()))
|
||||
if ((c.getCurrentUser() == null) || (((c.getCurrentUser() != null) && (c.getCurrentUser().getID() == e.getID()))))
|
||||
{
|
||||
Group[] specialGroups = c.getSpecialGroups();
|
||||
for(Group special : specialGroups)
|
||||
|
@@ -289,7 +289,7 @@ public class Harvest
|
||||
itemInfo.item = Item.find(context, itemInfo.itemID);
|
||||
}
|
||||
|
||||
if ((nonAnon) || (itemInfo.item == null))
|
||||
if ((nonAnon) || (itemInfo.item == null) || (withdrawn && itemInfo.withdrawn))
|
||||
{
|
||||
infoObjects.add(itemInfo);
|
||||
itemCounter++;
|
||||
|
@@ -516,10 +516,14 @@ public class DescribeStep extends AbstractProcessingStep
|
||||
+ "_first");
|
||||
lasts = getRepeatedParameter(request, metadataField, metadataField
|
||||
+ "_last");
|
||||
auths = getRepeatedParameter(request, metadataField, metadataField
|
||||
|
||||
if(isAuthorityControlled)
|
||||
{
|
||||
auths = getRepeatedParameter(request, metadataField, metadataField
|
||||
+ "_authority");
|
||||
confs = getRepeatedParameter(request, metadataField, metadataField
|
||||
confs = getRepeatedParameter(request, metadataField, metadataField
|
||||
+ "_confidence");
|
||||
}
|
||||
|
||||
// Find out if the relevant "remove" button was pressed
|
||||
// TODO: These separate remove buttons are only relevant
|
||||
@@ -535,8 +539,11 @@ public class DescribeStep extends AbstractProcessingStep
|
||||
|
||||
firsts.remove(valToRemove);
|
||||
lasts.remove(valToRemove);
|
||||
auths.remove(valToRemove);
|
||||
confs.remove(valToRemove);
|
||||
if(isAuthorityControlled)
|
||||
{
|
||||
auths.remove(valToRemove);
|
||||
confs.remove(valToRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -684,6 +691,11 @@ public class DescribeStep extends AbstractProcessingStep
|
||||
.substring(removeButton.length()));
|
||||
|
||||
vals.remove(valToRemove);
|
||||
if(isAuthorityControlled)
|
||||
{
|
||||
auths.remove(valToRemove);
|
||||
confs.remove(valToRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -291,10 +291,14 @@ jsp.dspace-admin.metadataimport.apply = Apply changes
|
||||
jsp.dspace-admin.metadataimport.unknownerror = An unknown error has occured
|
||||
jsp.dspace-admin.metadataimport.changesforitem = Changes for item
|
||||
jsp.dspace-admin.metadataimport.newitem = New item
|
||||
jsp.dspace-admin.metadataimport.addtocollection = Add to collection
|
||||
jsp.dspace-admin.metadataimport.addedtocollection = Added to collection
|
||||
jsp.dspace-admin.metadataimport.removefromcollection = Remove from collection
|
||||
jsp.dspace-admin.metadataimport.removedfromcollection = Removed from collection
|
||||
jsp.dspace-admin.metadataimport.addtocollection = Map to collection
|
||||
jsp.dspace-admin.metadataimport.addedtocollection = Mapped to collection
|
||||
jsp.dspace-admin.metadataimport.removefromcollection = Un-map from collection
|
||||
jsp.dspace-admin.metadataimport.removedfromcollection = Un-mapped from collection
|
||||
jsp.dspace-admin.metadataimport.addtoownercollection = Add to new owning collection
|
||||
jsp.dspace-admin.metadataimport.addedtoownercollection = Added to new owning collection
|
||||
jsp.dspace-admin.metadataimport.removefromownercollection = Remove from owning collection
|
||||
jsp.dspace-admin.metadataimport.removedfromownercollection = Removed from owning collection
|
||||
jsp.dspace-admin.metadataimport.add = Add
|
||||
jsp.dspace-admin.metadataimport.added = Added
|
||||
jsp.dspace-admin.metadataimport.remove = Remove
|
||||
@@ -1073,6 +1077,21 @@ jsp.tools.edit-collection.form.label11 = Step:
|
||||
jsp.tools.edit-collection.form.label12 = Collection Administrators:
|
||||
jsp.tools.edit-collection.form.label13 = Item template:
|
||||
jsp.tools.edit-collection.form.label14 = Collection's Authorizations:
|
||||
jsp.tools.edit-collection.form.label15 = Harvesting Settings
|
||||
jsp.tools.edit-collection.form.label16 = Content Source
|
||||
jsp.tools.edit-collection.form.label17 = This is a standard DSpace collection
|
||||
jsp.tools.edit-collection.form.label18 = This collection harvests its content from an external source
|
||||
jsp.tools.edit-collection.form.label19 = OAI Provider
|
||||
jsp.tools.edit-collection.form.label20 = OAI Set Id
|
||||
jsp.tools.edit-collection.form.label21 = Metadata Format
|
||||
jsp.tools.edit-collection.form.label21.select.qdc = Qualified Dublin Core
|
||||
jsp.tools.edit-collection.form.label21.select.dc = Dublin Core
|
||||
jsp.tools.edit-collection.form.label21.select.dim = DSpace Intermediate Format
|
||||
jsp.tools.edit-collection.form.label22 = Content being Harvested
|
||||
jsp.tools.edit-collection.form.label23 = Harvest metadata only.
|
||||
jsp.tools.edit-collection.form.label24 = Harvest metadata and references to bitstreams (requires ORE support).
|
||||
jsp.tools.edit-collection.form.label25 = Harvest metadata and bitstreams (requires ORE support).
|
||||
jsp.tools.edit-collection.form.label26 = Last Harvest Result
|
||||
jsp.tools.edit-collection.form.label2 = Short Description
|
||||
jsp.tools.edit-collection.form.label3 = Introductory text (HTML):
|
||||
jsp.tools.edit-collection.form.label4 = Copyright text (plain text):
|
||||
@@ -1216,6 +1235,7 @@ jsp.tools.itemmap-info.button.continue = Continue
|
||||
jsp.tools.itemmap-info.heading = Item Map Info
|
||||
jsp.tools.itemmap-info.msg.added = Add item {0}
|
||||
jsp.tools.itemmap-info.msg.none-selected = No items selected, none added.
|
||||
jsp.tools.itemmap-info.msg.none-removed = No items selected, none removed.
|
||||
# In the following 2 messages the only parameter is an item ID
|
||||
jsp.tools.itemmap-info.msg.remove = Remove item {0}
|
||||
jsp.tools.itemmap-info.title = Item Map Info
|
||||
@@ -1234,6 +1254,7 @@ jsp.tools.move-item.collection.from.msg = Collection to
|
||||
jsp.tools.move-item.collection.to.msg = Collection to move to
|
||||
jsp.tools.move-item.item.name.msg = Name of the item to be moved
|
||||
jsp.tools.move-item.title = Moving an item
|
||||
jsp.tools.move-item.inheritpolicies = Inherit default policies of destination collection
|
||||
jsp.tools.upload-bitstream.info = Select the bitstream to upload
|
||||
jsp.tools.upload-bitstream.title = Upload Bitstream
|
||||
jsp.tools.upload-bitstream.upload = Upload
|
||||
@@ -1393,6 +1414,8 @@ org.dspace.eperson.Subscribe.authors
|
||||
org.dspace.eperson.Subscribe.id = ID:
|
||||
org.dspace.eperson.Subscribe.new-items = New Items:
|
||||
org.dspace.eperson.Subscribe.title = Title:
|
||||
org.dspace.statistics.util.LocationUtils.unknown-continent = Unknown Continent
|
||||
org.dspace.statistics.util.LocationUtils.unknown-country = Unknown Country
|
||||
org.dspace.workflow.WorkflowManager.step1 = It requires reviewing.
|
||||
org.dspace.workflow.WorkflowManager.step2 = The submission must be checked before inclusion in the archive.
|
||||
org.dspace.workflow.WorkflowManager.step3 = The metadata needs to be checked to ensure compliance with the collection's standards, and edited if necessary.
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-jspui</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -40,9 +40,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui/dspace-jspui-api</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui/dspace-jspui-api</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui/dspace-jspui-api</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui/dspace-jspui-api</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui/dspace-jspui-api</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui/dspace-jspui-api</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -731,7 +731,19 @@ public class ItemTag extends TagSupport
|
||||
{
|
||||
Bundle[] bundles = item.getBundles("ORIGINAL");
|
||||
|
||||
if (bundles.length == 0)
|
||||
boolean filesExist = false;
|
||||
|
||||
for (Bundle bnd : bundles)
|
||||
{
|
||||
filesExist = bnd.getBitstreams().length > 0;
|
||||
if (filesExist)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if user already has uploaded at least one file
|
||||
if (!filesExist)
|
||||
{
|
||||
out.println("<p>"
|
||||
+ LocaleSupport.getLocalizedMessage(pageContext,
|
||||
|
@@ -81,8 +81,8 @@ public class AuthorityChooseServlet extends DSpaceServlet {
|
||||
// };
|
||||
//
|
||||
// Choices result = new Choices(testValues,start,testValues.length,Choices.CF_ACCEPTED,false);
|
||||
Writer writer = response.getWriter();
|
||||
response.setContentType("text/xml; charset=\"utf-8\"");
|
||||
Writer writer = response.getWriter();
|
||||
// borrow xalan's serializer to let us use SAX choice menu generator
|
||||
Properties props =
|
||||
OutputPropertiesFactory.getDefaultMethodProperties(Method.XML);
|
||||
|
@@ -198,72 +198,6 @@ public class ItemMapServlet extends DSpaceServlet
|
||||
// show the page
|
||||
JSPManager.showJSP(request, response, jspPage);
|
||||
}
|
||||
/*
|
||||
* else if( action.equals("add") ) { int itemID =
|
||||
* UIUtil.getIntParameter(request, "item_id"); String handle =
|
||||
* (String)request.getParameter("handle"); boolean error = true; Item
|
||||
* itemToAdd = null;
|
||||
*
|
||||
* if( itemID > 0 ) { itemToAdd = Item.find(context, itemID);
|
||||
*
|
||||
* if( itemToAdd != null ) error = false; } else if(handle != null &&
|
||||
* !handle.equals("")) { DSpaceObject
|
||||
* dso=HandleManager.resolveToObject(context, handle);
|
||||
*
|
||||
* if(dso != null && dso.getType() == Constants.ITEM) { itemToAdd =
|
||||
* (Item)dso; error = false; } }
|
||||
*
|
||||
* //FIXME: error handling! if( !error ) { String myTitle =
|
||||
* itemToAdd.getDC("title",null,Item.ANY)[0].value; String ownerName =
|
||||
* itemToAdd.getOwningCollection().getMetadata("name");
|
||||
* // hook up item, but first, does it belong already? TableRowIterator
|
||||
* tri = DatabaseManager.query(context, "collection2item", "SELECT
|
||||
* collection2item.* FROM collection2item WHERE " + "collection_id=" +
|
||||
* myCollection.getID() + " AND item_id=" + itemToAdd.getID());
|
||||
*
|
||||
* if(tri.hasNext()) { request.setAttribute("message", "Item is already
|
||||
* part of that collection!"); } else { // Create mapping
|
||||
* myCollection.addItem( itemToAdd );
|
||||
* // set up a nice 'done' message request.setAttribute("message",
|
||||
* "Item added successfully: <br> " + myTitle + " <br> From Collection:
|
||||
* <br> " + ownerName);
|
||||
* }
|
||||
*
|
||||
* request.setAttribute("collection", myCollection);
|
||||
* // show this page when we're done jspPage = "itemmap-info.jsp";
|
||||
* // show the page JSPManager.showJSP(request, response, jspPage); }
|
||||
* else { // Display an error } } else if( action.equals("Add Entire
|
||||
* Collection") ) { int targetID = UIUtil.getIntParameter(request,
|
||||
* "collection2import");
|
||||
*
|
||||
* Collection targetCollection = Collection.find(context, targetID);
|
||||
* // get all items from that collection and add them if not // already
|
||||
* added
|
||||
* // get all items to be added ItemIterator i =
|
||||
* targetCollection.getItems(); Map toAdd = new HashMap(); String
|
||||
* message = "";
|
||||
*
|
||||
* while( i.hasNext() ) { Item myItem = i.next();
|
||||
*
|
||||
* toAdd.put(new Integer(myItem.getID()), myItem); }
|
||||
* // now see what we already have, removing dups from the 'toAdd' list
|
||||
* i = myCollection.getItems();
|
||||
*
|
||||
* while( i.hasNext() ) { Item myItem = i.next(); Integer myKey = new
|
||||
* Integer(myItem.getID());
|
||||
* // remove works even if key isn't present toAdd.remove(myKey); }
|
||||
* // what's left in toAdd should be added Iterator addKeys =
|
||||
* toAdd.keySet().iterator();
|
||||
*
|
||||
* while( addKeys.hasNext() ) { Item myItem =
|
||||
* (Item)toAdd.get(addKeys.next()); myCollection.addItem(myItem);
|
||||
* message += " <br> Added item ID: " + myItem.getID(); }
|
||||
*
|
||||
* request.setAttribute("message", message);
|
||||
* request.setAttribute("collection", myCollection);
|
||||
* // show this page when we're done jspPage = "itemmap-info.jsp";
|
||||
* // show the page JSPManager.showJSP(request, response, jspPage); }
|
||||
*/
|
||||
else if (action.equals("Remove"))
|
||||
{
|
||||
// get item IDs to remove
|
||||
@@ -271,29 +205,36 @@ public class ItemMapServlet extends DSpaceServlet
|
||||
String message = "remove";
|
||||
LinkedList removedItems = new LinkedList();
|
||||
|
||||
for (int j = 0; j < itemIDs.length; j++)
|
||||
{
|
||||
int i = Integer.parseInt(itemIDs[j]);
|
||||
removedItems.add(itemIDs[j]);
|
||||
if (itemIDs == null)
|
||||
{
|
||||
message = "none-removed";
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < itemIDs.length; j++)
|
||||
{
|
||||
int i = Integer.parseInt(itemIDs[j]);
|
||||
removedItems.add(itemIDs[j]);
|
||||
|
||||
Item myItem = Item.find(context, i);
|
||||
Item myItem = Item.find(context, i);
|
||||
|
||||
// make sure item doesn't belong to this collection
|
||||
if (!myItem.isOwningCollection(myCollection))
|
||||
{
|
||||
myCollection.removeItem(myItem);
|
||||
try
|
||||
// make sure item doesn't belong to this collection
|
||||
if (!myItem.isOwningCollection(myCollection))
|
||||
{
|
||||
IndexBrowse ib = new IndexBrowse(context);
|
||||
ib.itemChanged(myItem);
|
||||
}
|
||||
catch (BrowseException e)
|
||||
{
|
||||
log.error("caught exception: ", e);
|
||||
throw new ServletException(e);
|
||||
myCollection.removeItem(myItem);
|
||||
try
|
||||
{
|
||||
IndexBrowse ib = new IndexBrowse(context);
|
||||
ib.itemChanged(myItem);
|
||||
}
|
||||
catch (BrowseException e)
|
||||
{
|
||||
log.error("caught exception: ", e);
|
||||
throw new ServletException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
request.setAttribute("message", message);
|
||||
request.setAttribute("collection", myCollection);
|
||||
|
@@ -39,11 +39,7 @@
|
||||
*/
|
||||
package org.dspace.app.webui.submit.step;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
@@ -51,15 +47,12 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.dspace.app.util.DCInputsReader;
|
||||
import org.dspace.app.util.DCInputsReaderException;
|
||||
import org.dspace.app.util.Util;
|
||||
import org.dspace.app.util.SubmissionInfo;
|
||||
import org.dspace.app.webui.submit.JSPStep;
|
||||
import org.dspace.app.webui.submit.JSPStepManager;
|
||||
import org.dspace.app.webui.util.FileUploadRequest;
|
||||
import org.dspace.app.webui.util.JSPManager;
|
||||
import org.dspace.app.util.SubmissionInfo;
|
||||
import org.dspace.app.webui.util.UIUtil;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.Bitstream;
|
||||
@@ -67,7 +60,6 @@ import org.dspace.content.BitstreamFormat;
|
||||
import org.dspace.content.Bundle;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.FormatIdentifier;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.LogManager;
|
||||
@@ -217,8 +209,19 @@ public class JSPUploadStep extends JSPStep
|
||||
Bundle[] bundles = subInfo.getSubmissionItem().getItem()
|
||||
.getBundles("ORIGINAL");
|
||||
|
||||
boolean fileAlreadyUploaded = false;
|
||||
|
||||
for (Bundle bnd : bundles)
|
||||
{
|
||||
fileAlreadyUploaded = bnd.getBitstreams().length > 0;
|
||||
if (fileAlreadyUploaded)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if user already has uploaded at least one file
|
||||
if (bundles.length > 0)
|
||||
if (fileAlreadyUploaded)
|
||||
{
|
||||
// return to list of uploaded files
|
||||
showUploadFileList(context, request, response, subInfo, true,
|
||||
@@ -408,8 +411,23 @@ public class JSPUploadStep extends JSPStep
|
||||
{
|
||||
Bundle[] bundles = subInfo.getSubmissionItem().getItem().getBundles(
|
||||
"ORIGINAL");
|
||||
|
||||
if (justUploaded || bundles.length > 0)
|
||||
|
||||
boolean fileAlreadyUploaded = false;
|
||||
|
||||
if (!justUploaded)
|
||||
{
|
||||
for (Bundle bnd : bundles)
|
||||
{
|
||||
fileAlreadyUploaded = bnd.getBitstreams().length > 0;
|
||||
if (fileAlreadyUploaded)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if user already has uploaded at least one file
|
||||
if (justUploaded || fileAlreadyUploaded)
|
||||
{
|
||||
// The item already has files associated with it.
|
||||
showUploadFileList(context, request, response, subInfo,
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-jspui</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -40,9 +40,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui/dspace-jspui-webapp</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui/dspace-jspui-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui/dspace-jspui-webapp</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui/dspace-jspui-webapp</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui/dspace-jspui-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui/dspace-jspui-webapp</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
@@ -99,11 +99,12 @@
|
||||
// Get the changes
|
||||
ArrayList<DCValue> adds = change.getAdds();
|
||||
ArrayList<DCValue> removes = change.getRemoves();
|
||||
ArrayList<Collection> newCollections = change.getNewOwningCollections();
|
||||
ArrayList<Collection> oldCollections = change.getOldOwningCollections();
|
||||
ArrayList<Collection> newCollections = change.getNewMappedCollections();
|
||||
ArrayList<Collection> oldCollections = change.getOldMappedCollections();
|
||||
boolean first = false;
|
||||
if ((adds.size() > 0) || (removes.size() > 0) ||
|
||||
(newCollections.size() > 0) || (oldCollections.size() > 0))
|
||||
(newCollections.size() > 0) || (oldCollections.size() > 0) ||
|
||||
(change.getNewOwningCollection() != null) || (change.getOldOwningCollection() != null))
|
||||
{
|
||||
// Show the item
|
||||
if (!change.isNewItem())
|
||||
@@ -119,6 +120,60 @@
|
||||
first = true;
|
||||
}
|
||||
|
||||
// Show new owner collection
|
||||
if (change.getNewOwningCollection() != null)
|
||||
{
|
||||
Collection c = change.getNewOwningCollection();
|
||||
if (c != null)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
if (!first)
|
||||
{
|
||||
%><tr><td bgcolor="white"></td><%
|
||||
}
|
||||
else
|
||||
{
|
||||
first = false;
|
||||
}
|
||||
if (!changed)
|
||||
{
|
||||
%><td bgcolor="#4E9258" style="font-size:10pt"><fmt:message key="jsp.dspace-admin.metadataimport.addtoownercollection"/></td><td bgcolor="4E9258" style="font-size:10pt">(<%= cHandle %>): <%= cName %></td></tr><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><td bgcolor="#4E9258" style="font-size:10pt"><fmt:message key="jsp.dspace-admin.metadataimport.addedtoownercollection"/></td><td bgcolor="4E9258" style="font-size:10pt">(<%= cHandle %>): <%= cName %></td></tr><%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show old owner collection
|
||||
if (change.getOldOwningCollection() != null)
|
||||
{
|
||||
Collection c = change.getOldOwningCollection();
|
||||
if (c != null)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
if (!first)
|
||||
{
|
||||
%><tr><td bgcolor="white"></td><%
|
||||
}
|
||||
else
|
||||
{
|
||||
first = false;
|
||||
}
|
||||
if (!changed)
|
||||
{
|
||||
%><td bgcolor="#4E9258" style="font-size:10pt"><fmt:message key="jsp.dspace-admin.metadataimport.removefromownercollection"/></td><td bgcolor="4E9258" style="font-size:10pt">(<%= cHandle %>): <%= cName %></td></tr><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><td bgcolor="#4E9258" style="font-size:10pt"><fmt:message key="jsp.dspace-admin.metadataimport.removedfromownercollection"/></td><td bgcolor="4E9258" style="font-size:10pt">(<%= cHandle %>): <%= cName %></td></tr><%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show new collections
|
||||
for (Collection c : newCollections)
|
||||
{
|
||||
|
@@ -396,7 +396,7 @@
|
||||
=========================================================== --%>
|
||||
|
||||
<tr><td> </td></tr>
|
||||
<tr><td colspan="2"><center><h3>Harvesting Settings</h3></center></td></tr>
|
||||
<tr><td colspan="2"><center><h3><fmt:message key="jsp.tools.edit-collection.form.label15"/></h3></center></td></tr>
|
||||
|
||||
<%--
|
||||
oaiProviderValue = hc.getOaiSource();
|
||||
@@ -411,22 +411,22 @@
|
||||
--%>
|
||||
|
||||
<tr>
|
||||
<td class="submitFormLabel">Content Source</td>
|
||||
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-collection.form.label16"/></td>
|
||||
<td>
|
||||
<input type="radio" value="source_normal" <% if (harvestLevelValue == 0) { %> checked="checked" <% } %> name="source">This is a standard DSpace collection</input><br/>
|
||||
<input type="radio" value="source_harvested" <% if (harvestLevelValue > 0) { %> checked="checked" <% } %> name="source">This collection harvests its content from an external source</input><br/>
|
||||
<input type="radio" value="source_normal" <% if (harvestLevelValue == 0) { %> checked="checked" <% } %> name="source"><fmt:message key="jsp.tools.edit-collection.form.label17"/></input><br/>
|
||||
<input type="radio" value="source_harvested" <% if (harvestLevelValue > 0) { %> checked="checked" <% } %> name="source"><fmt:message key="jsp.tools.edit-collection.form.label18"/></input><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="submitFormLabel">OAI Provider</td>
|
||||
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-collection.form.label19"/></td>
|
||||
<td><input type="text" name="oai_provider" value="<%= oaiProviderValue %>" size="50" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="submitFormLabel">OAI Set Id</td>
|
||||
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-collection.form.label20"/></td>
|
||||
<td><input type="text" name="oai_setid" value="<%= oaiSetIdValue %>" size="50" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="submitFormLabel">Metadata Format</td>
|
||||
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-collection.form.label21"/></td>
|
||||
<td>
|
||||
<select name="metadata_format" >
|
||||
<%
|
||||
@@ -436,21 +436,19 @@
|
||||
while (pe.hasMoreElements())
|
||||
{
|
||||
String key = (String)pe.nextElement();
|
||||
|
||||
|
||||
if (key.startsWith(metaString)) {
|
||||
String metadataString = ConfigurationManager.getProperty(key);
|
||||
String metadataKey = key.substring(metaString.length());
|
||||
String displayName;
|
||||
|
||||
if (metadataString.indexOf(',') != -1)
|
||||
displayName = metadataString.substring(metadataString.indexOf(',') + 1);
|
||||
else
|
||||
displayName = metadataKey + "(" + metadataString + ")";
|
||||
|
||||
%>
|
||||
String label = "jsp.tools.edit-collection.form.label21.select." + metadataKey;
|
||||
|
||||
%>
|
||||
<option value="<%= metadataKey %>"
|
||||
<% if(metadataKey.equalsIgnoreCase(metadataFormatValue)) { %>
|
||||
selected="selected" <% } %> >
|
||||
<%= displayName %></option>
|
||||
<fmt:message key="<%=label%>"/>
|
||||
</option>
|
||||
<%
|
||||
}
|
||||
}
|
||||
@@ -459,15 +457,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="submitFormLabel">Content being Harvested</td>
|
||||
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-collection.form.label22"/></td>
|
||||
<td>
|
||||
<input type="radio" value="1" <% if (harvestLevelValue != 2 && harvestLevelValue != 3) { %> checked="checked" <% } %> name="harvest_level">Harvest metadata only.</input><br/>
|
||||
<input type="radio" value="2" <% if (harvestLevelValue == 2) { %> checked="checked" <% } %> name="harvest_level">Harvest metadata and references to bitstreams (requires ORE support).</input><br/>
|
||||
<input type="radio" value="3" <% if (harvestLevelValue == 3) { %> checked="checked" <% } %> name="harvest_level">Harvest metadata and bitstreams (requires ORE support).</input><br/>
|
||||
<input type="radio" value="1" <% if (harvestLevelValue != 2 && harvestLevelValue != 3) { %> checked="checked" <% } %> name="harvest_level"><fmt:message key="jsp.tools.edit-collection.form.label23"/></input><br/>
|
||||
<input type="radio" value="2" <% if (harvestLevelValue == 2) { %> checked="checked" <% } %> name="harvest_level"><fmt:message key="jsp.tools.edit-collection.form.label24"/></input><br/>
|
||||
<input type="radio" value="3" <% if (harvestLevelValue == 3) { %> checked="checked" <% } %> name="harvest_level"><fmt:message key="jsp.tools.edit-collection.form.label25"/></input><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="submitFormLabel">Last Harvest Result</td>
|
||||
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-collection.form.label26"/></td>
|
||||
<td><%= lastHarvestMsg %></td>
|
||||
</tr>
|
||||
<!--
|
||||
|
@@ -63,7 +63,7 @@
|
||||
<%
|
||||
Collection collection = (Collection)request.getAttribute("collection");
|
||||
|
||||
// supported values: "none-selected", "added", "remove"
|
||||
// supported values: "none-selected", "none-removed", "added", "remove"
|
||||
String message = (String)request.getAttribute("message");
|
||||
|
||||
LinkedList processedItems = (LinkedList)request.getAttribute("processedItems");
|
||||
@@ -76,6 +76,8 @@
|
||||
<p>
|
||||
<% if (message.equals("none-selected")) { %>
|
||||
<fmt:message key="jsp.tools.itemmap-info.msg.none-selected" />
|
||||
<% } else if (message.equals("none-removed")) { %>
|
||||
<fmt:message key="jsp.tools.itemmap-info.msg.none-removed" />
|
||||
<% } else if (message.equals("added")) { %>
|
||||
<%-- Iterate through processed items --%>
|
||||
<% for (int i=0; i<processedItems.size(); i++) { %>
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -40,9 +40,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-jspui</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-jspui</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-lni</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -33,9 +33,9 @@
|
||||
</repositories>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-client</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-client</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-client</url>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni/dspace-lni-client</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni/dspace-lni-client</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-lni</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -31,9 +31,9 @@
|
||||
</repositories>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-core</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-core</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-core</url>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni/dspace-lni-core</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni/dspace-lni-core</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-lni</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -33,9 +33,9 @@
|
||||
</repositories>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-webapp</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni/dspace-lni-webapp</url>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni/dspace-lni-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni/dspace-lni-webapp</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -38,9 +38,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-lni</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-lni</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-oai</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -40,9 +40,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai/dspace-oai-api</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai/dspace-oai-api</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai/dspace-oai-api</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai/dspace-oai-api</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai/dspace-oai-api</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai/dspace-oai-api</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -45,8 +45,6 @@ import org.apache.commons.codec.binary.Base64;
|
||||
import org.dspace.app.didl.UUIDFactory;
|
||||
import org.dspace.content.Bitstream;
|
||||
import org.dspace.content.Bundle;
|
||||
import org.dspace.content.DCDate;
|
||||
import org.dspace.content.DCValue;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.core.Context;
|
||||
@@ -72,9 +70,16 @@ public class DIDLCrosswalk extends Crosswalk
|
||||
/** default value if no oai.didl.maxresponse property is defined */
|
||||
public static int MAXRESPONSE_INLINE_BITSTREAM = 0;
|
||||
|
||||
/** another crosswalk that will be used to generate the metadata section */
|
||||
private Crosswalk metadataCrosswalk;
|
||||
|
||||
public DIDLCrosswalk(Properties properties)
|
||||
{
|
||||
super("urn:mpeg:mpeg21:2002:02-DIDL-NS http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-21_schema_files/did/didl.xsd ");
|
||||
|
||||
// FIXME this should be injected from the configuration...
|
||||
// but it is better than duplicate the OAIDCCrosswalk code!
|
||||
metadataCrosswalk = new OAIDCCrosswalk(properties);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,14 +95,7 @@ public class DIDLCrosswalk extends Crosswalk
|
||||
{
|
||||
Item item = ((HarvestedItemInfo) nativeItem).item;
|
||||
|
||||
Date d = ((HarvestedItemInfo) nativeItem).datestamp;
|
||||
String ITEMDATE = new DCDate(d).toString();
|
||||
|
||||
// Get all the DC
|
||||
DCValue[] allDC = item.getDC(Item.ANY, Item.ANY, Item.ANY);
|
||||
|
||||
StringBuffer metadata = new StringBuffer();
|
||||
StringBuffer metadata1 = new StringBuffer();
|
||||
String itemhandle=item.getHandle();
|
||||
String strMaxSize = ConfigurationManager.getProperty("oai.didl.maxresponse");
|
||||
int maxsize = MAXRESPONSE_INLINE_BITSTREAM;
|
||||
@@ -128,57 +126,10 @@ public class DIDLCrosswalk extends Crosswalk
|
||||
metadata.append("<didl:Descriptor>")
|
||||
.append("<didl:Statement mimeType=\"application/xml; charset=utf-8\">");
|
||||
|
||||
for (int i = 0; i < allDC.length; i++)
|
||||
{
|
||||
// Do not include description.provenance
|
||||
boolean description = allDC[i].element.equals("description");
|
||||
boolean provenance = allDC[i].qualifier != null &&
|
||||
allDC[i].qualifier.equals("provenance");
|
||||
|
||||
if (!(description && provenance))
|
||||
{
|
||||
// Escape XML chars <, > and &
|
||||
String value = allDC[i].value;
|
||||
|
||||
// First do &'s - need to be careful not to replace the
|
||||
// & in "&" again!
|
||||
int c = -1;
|
||||
while ((c = value.indexOf("&", c + 1)) > -1)
|
||||
{
|
||||
value = value.substring(0, c) +
|
||||
"&" +
|
||||
value.substring(c + 1);
|
||||
}
|
||||
|
||||
while ((c = value.indexOf("<")) > -1)
|
||||
{
|
||||
value = value.substring(0, c) +
|
||||
"<" +
|
||||
value.substring(c + 1);
|
||||
}
|
||||
|
||||
while ((c = value.indexOf(">")) > -1)
|
||||
{
|
||||
value = value.substring(0, c) +
|
||||
">" +
|
||||
value.substring(c + 1);
|
||||
}
|
||||
|
||||
metadata1.append("<dc:")
|
||||
.append(allDC[i].element)
|
||||
.append(">")
|
||||
.append(value)
|
||||
.append("</dc:")
|
||||
.append(allDC[i].element)
|
||||
.append(">");
|
||||
}
|
||||
}
|
||||
// delegate the metadata section to another crosswalk
|
||||
metadata.append(metadataCrosswalk.createMetadata(nativeItem));
|
||||
|
||||
metadata.append("<oai_dc:dc xmlns:oai_dc=\"http://www.openarchives.org/OAI/2.0/oai_dc/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd\">");
|
||||
|
||||
metadata.append(metadata1);
|
||||
|
||||
metadata.append("</oai_dc:dc>")
|
||||
metadata
|
||||
.append("</didl:Statement>")
|
||||
.append("</didl:Descriptor>");
|
||||
|
||||
@@ -191,12 +142,8 @@ public class DIDLCrosswalk extends Crosswalk
|
||||
{
|
||||
Bundle[] bundles= item.getBundles("ORIGINAL");
|
||||
|
||||
if (bundles.length == 0)
|
||||
if (bundles.length != 0)
|
||||
{
|
||||
metadata.append("<P>There are no files associated with this item.</P>");
|
||||
}
|
||||
else
|
||||
{
|
||||
/**cycle bundles**/
|
||||
for (int i = 0; i < bundles.length; i++)
|
||||
{
|
||||
|
@@ -52,16 +52,19 @@ import java.util.StringTokenizer;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeManager;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.core.Constants;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.LogManager;
|
||||
import org.dspace.core.Utils;
|
||||
import org.dspace.handle.HandleManager;
|
||||
import org.dspace.search.Harvest;
|
||||
import org.dspace.search.HarvestedItemInfo;
|
||||
import org.dspace.eperson.Group;
|
||||
|
||||
import ORG.oclc.oai.server.catalog.AbstractCatalog;
|
||||
import ORG.oclc.oai.server.verb.BadArgumentException;
|
||||
@@ -369,6 +372,28 @@ public class DSpaceOAICatalog extends AbstractCatalog
|
||||
"id_does_not_exist"));
|
||||
throw new IdDoesNotExistException(identifier);
|
||||
}
|
||||
|
||||
boolean includeAll = ConfigurationManager.getBooleanProperty("harvest.includerestricted.oai", true);
|
||||
|
||||
if (!includeAll)
|
||||
{
|
||||
Group[] authorizedGroups = AuthorizeManager.getAuthorizedGroups(context, itemInfo.item, Constants.READ);
|
||||
boolean authorized = false;
|
||||
for (int i = 0; i < authorizedGroups.length; i++)
|
||||
{
|
||||
if ((authorizedGroups[i].getID() == 0) && (!authorized))
|
||||
{
|
||||
authorized = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!authorized)
|
||||
{
|
||||
log.info(LogManager.getHeader(null, "oai_error",
|
||||
"id_not_accessible"));
|
||||
throw new IdDoesNotExistException(identifier);
|
||||
}
|
||||
}
|
||||
|
||||
String schemaURL;
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-oai</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -40,9 +40,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai/dspace-oai-webapp</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai/dspace-oai-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai/dspace-oai-webapp</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai/dspace-oai-webapp</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai/dspace-oai-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai/dspace-oai-webapp</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -40,9 +40,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-oai</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-oai</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
@@ -3,14 +3,14 @@
|
||||
<parent>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<groupId>org.dspace</groupId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-stats</artifactId>
|
||||
<name>DSpace Solr Statistics Logging Client Library</name>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
<description>Library of Shared UsageEvent and EventConsumer Tools for Logging to Solr.</description>
|
||||
|
||||
<repositories>
|
||||
@@ -36,9 +36,9 @@
|
||||
releases snapshots into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-stats</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-stats</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-stats</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-stats</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-stats</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-stats</url>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -115,7 +115,7 @@
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-api</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace.dependencies</groupId>
|
||||
|
@@ -168,13 +168,17 @@ public class Dataset {
|
||||
|
||||
public String[][] getMatrixFormatted(){
|
||||
DecimalFormat decimalFormat = new DecimalFormat(format);
|
||||
String [][]strMatrix = new String[matrix.length][matrix[0].length];
|
||||
for (int i = 0; i < matrix.length; i++) {
|
||||
for (int j = 0; j < matrix[i].length; j++) {
|
||||
strMatrix[i][j] = decimalFormat.format(matrix[i][j]);
|
||||
if (matrix.length == 0) {
|
||||
return new String[0][0];
|
||||
} else {
|
||||
String[][] strMatrix = new String[matrix.length][matrix[0].length];
|
||||
for (int i = 0; i < matrix.length; i++) {
|
||||
for (int j = 0; j < matrix[i].length; j++) {
|
||||
strMatrix[i][j] = decimalFormat.format(matrix[i][j]);
|
||||
}
|
||||
}
|
||||
return strMatrix;
|
||||
}
|
||||
return strMatrix;
|
||||
}
|
||||
|
||||
public void addValueToMatrix(int row, int coll, float value) {
|
||||
|
@@ -186,7 +186,8 @@ public class SolrLogger
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.error(e.getMessage());
|
||||
log.error("Failed DNS Lookup for IP:" + ip);
|
||||
log.debug(e.getMessage(),e);
|
||||
}
|
||||
|
||||
// Save the location information if valid, save the event without
|
||||
|
@@ -15,6 +15,7 @@ import java.util.Vector;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.lang.reflect.Array;
|
||||
import org.dspace.core.I18nUtil;
|
||||
|
||||
/**
|
||||
* Mapping between Country codes, English Country names,
|
||||
@@ -799,13 +800,21 @@ public class LocationUtils {
|
||||
{"OC", "Oceania"}};
|
||||
|
||||
public static String getCountryName(String countryCode){
|
||||
int index = countryCodeList.indexOf(countryCode);
|
||||
return countryNameList.get(index).toString();
|
||||
if (countryCode.length() > 0 && countryCodeList.contains(countryCode)) {
|
||||
int index = countryCodeList.indexOf(countryCode);
|
||||
return countryNameList.get(index).toString();
|
||||
} else {
|
||||
return I18nUtil.getMessage("org.dspace.statistics.util.LocationUtils.unknown-country");
|
||||
}
|
||||
}
|
||||
|
||||
public static String getContinentCode(String countryCode){
|
||||
int index = countryCodeList.indexOf(countryCode);
|
||||
return continentCodeList.get(index).toString();
|
||||
if(countryCode.length() > 0 && countryCodeList.contains(countryCode)) {
|
||||
int index = countryCodeList.indexOf(countryCode);
|
||||
return continentCodeList.get(index).toString();
|
||||
} else {
|
||||
return I18nUtil.getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent");
|
||||
}
|
||||
}
|
||||
|
||||
public static String getContinentName(String continentCode){
|
||||
|
@@ -242,8 +242,6 @@ public class StatisticsImporter
|
||||
|
||||
data += ("ip addr = " + ip);
|
||||
data += (", dns name = " + dns);
|
||||
data += (", country = " + country);
|
||||
data += (", city = " + city);
|
||||
if ((dns.endsWith(".googlebot.com.")) ||
|
||||
(dns.endsWith(".crawl.yahoo.net.")) ||
|
||||
(dns.endsWith(".search.msn.com.")))
|
||||
@@ -253,7 +251,6 @@ public class StatisticsImporter
|
||||
searchengines++;
|
||||
continue;
|
||||
}
|
||||
if (verbose) System.out.println(data);
|
||||
|
||||
// Get the geo information for the user
|
||||
Location location;
|
||||
@@ -264,6 +261,11 @@ public class StatisticsImporter
|
||||
countryCode = location.countryCode;
|
||||
longitude = location.longitude;
|
||||
latitude = location.latitude;
|
||||
if(verbose) {
|
||||
data += (", country = " + country);
|
||||
data += (", city = " + city);
|
||||
System.out.println(data);
|
||||
}
|
||||
try {
|
||||
continent = LocationUtils.getContinentCode(countryCode);
|
||||
} catch (Exception e) {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-sword</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -42,106 +42,87 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword/dspace-sword-api</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword/dspace-sword-api</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword/dspace-sword-api</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword/dspace-sword-api</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword/dspace-sword-api</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword/dspace-sword-api</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Leave this out for the moment, as the source is in the tree -->
|
||||
<!--
|
||||
<!-- Leave this out for the moment, as the source is in the tree -->
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>sword-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>sword-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>-->
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-api-lang</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-api-lang</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>xom</groupId>
|
||||
<artifactId>xom</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- additional dependencies for the sword-common code -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.15</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>jmxtools</artifactId>
|
||||
<groupId>com.sun.jdmk</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jms</artifactId>
|
||||
<groupId>javax.jms</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jmxri</artifactId>
|
||||
<groupId>com.sun.jmx</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- GUI client dependency
|
||||
<dependency>
|
||||
<groupId>org.jdesktop</groupId>
|
||||
<artifactId>swing-worker</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>xom</groupId>
|
||||
<artifactId>xom</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>1.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- additional dependencies for the sword-common code -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.15</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>jmxtools</artifactId>
|
||||
<groupId>com.sun.jdmk</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jms</artifactId>
|
||||
<groupId>javax.jms</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jmxri</artifactId>
|
||||
<groupId>com.sun.jmx</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xom</groupId>
|
||||
<artifactId>xom</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>1.3.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@@ -80,7 +80,7 @@ public class DSpaceSWORDServer implements SWORDServer
|
||||
{
|
||||
// gah. bloody variable scoping.
|
||||
// set up a dummy sword context for the "finally" block
|
||||
SWORDContext sc = new SWORDContext();
|
||||
SWORDContext sc = null;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -113,7 +113,10 @@ public class DSpaceSWORDServer implements SWORDServer
|
||||
finally
|
||||
{
|
||||
// this is a read operation only, so there's never any need to commit the context
|
||||
sc.abort();
|
||||
if (sc != null)
|
||||
{
|
||||
sc.abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +128,7 @@ public class DSpaceSWORDServer implements SWORDServer
|
||||
{
|
||||
// gah. bloody variable scoping.
|
||||
// set up a dummy sword context for the "finally" block
|
||||
SWORDContext sc = new SWORDContext();
|
||||
SWORDContext sc = null;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -163,7 +166,10 @@ public class DSpaceSWORDServer implements SWORDServer
|
||||
{
|
||||
// if, for some reason, we wind up here with a not null context
|
||||
// then abort it (the above should commit it if everything works fine)
|
||||
sc.abort();
|
||||
if (sc != null)
|
||||
{
|
||||
sc.abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +181,7 @@ public class DSpaceSWORDServer implements SWORDServer
|
||||
{
|
||||
// gah. bloody variable scoping.
|
||||
// set up a dummy sword context for the "finally" block
|
||||
SWORDContext sc = new SWORDContext();
|
||||
SWORDContext sc = null;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -208,7 +214,10 @@ public class DSpaceSWORDServer implements SWORDServer
|
||||
finally
|
||||
{
|
||||
// this is a read operation only, so there's never any need to commit the context
|
||||
sc.abort();
|
||||
if (sc != null)
|
||||
{
|
||||
sc.abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -129,7 +129,44 @@ public class SWORDAuthenticator
|
||||
throws SWORDException, SWORDErrorException, SWORDAuthenticationException
|
||||
{
|
||||
Context context = this.constructContext(request.getIPAddress());
|
||||
return this.authenticate(context, request);
|
||||
SWORDContext sc = null;
|
||||
try
|
||||
{
|
||||
sc = this.authenticate(context, request);
|
||||
}
|
||||
catch (SWORDException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (SWORDErrorException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (SWORDAuthenticationException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return sc;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,8 +183,45 @@ public class SWORDAuthenticator
|
||||
throws SWORDException, SWORDErrorException, SWORDAuthenticationException
|
||||
{
|
||||
Context context = this.constructContext(request.getIPAddress());
|
||||
return this.authenticate(context, request);
|
||||
}
|
||||
SWORDContext sc = null;
|
||||
try
|
||||
{
|
||||
sc = this.authenticate(context, request);
|
||||
}
|
||||
catch (SWORDException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (SWORDErrorException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (SWORDAuthenticationException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return sc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate the incoming service document request. Calls:
|
||||
@@ -194,7 +268,44 @@ public class SWORDAuthenticator
|
||||
throws SWORDException, SWORDErrorException, SWORDAuthenticationException
|
||||
{
|
||||
Context context = this.constructContext(deposit.getIPAddress());
|
||||
return this.authenticate(context, deposit);
|
||||
SWORDContext sc = null;
|
||||
try
|
||||
{
|
||||
sc = this.authenticate(context, deposit);
|
||||
}
|
||||
catch (SWORDException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (SWORDErrorException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (SWORDAuthenticationException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
if (context != null && context.isValid())
|
||||
{
|
||||
context.abort();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return sc;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-sword</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -40,9 +40,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword/dspace-sword-webapp</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword/dspace-sword-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword/dspace-sword-webapp</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword/dspace-sword-webapp</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword/dspace-sword-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword/dspace-sword-webapp</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
@@ -130,7 +130,7 @@
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-sword-api</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -42,9 +42,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-sword</url>
|
||||
</scm>
|
||||
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -40,9 +40,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-ui-shared</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-ui-shared</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-ui-shared</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-ui-shared</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-ui-shared</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-ui-shared</url>
|
||||
</scm>
|
||||
|
||||
<!--
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-xmlui</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -34,9 +34,9 @@
|
||||
</repositories>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-api</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-api</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-api/</url>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui/dspace-xmlui-api</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui/dspace-xmlui-api</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -77,18 +77,20 @@ public class MetadataImportConfirm extends AbstractDSpaceTransformer {
|
||||
private static final Message T_dspace_home = message("xmlui.general.dspace_home");
|
||||
private static final Message T_submit_return = message("xmlui.general.return");
|
||||
private static final Message T_trail = message("xmlui.administrative.metadataimport.general.trail");
|
||||
private static final Message T_changes = message("xmlui.administrative.metadataimport.general.changes");
|
||||
private static final Message T_new_item = message("xmlui.administrative.metadataimport.general.new_item");
|
||||
private static final Message T_no_changes = message("xmlui.administrative.metadataimport.general.no_changes");
|
||||
private static final Message T_changes = message("xmlui.administrative.metadataimport.general.changes");
|
||||
private static final Message T_new_item = message("xmlui.administrative.metadataimport.general.new_item");
|
||||
private static final Message T_no_changes = message("xmlui.administrative.metadataimport.general.no_changes");
|
||||
private static final Message T_title = message("xmlui.administrative.metadataimport.general.title");
|
||||
private static final Message T_head1 = message("xmlui.administrative.metadataimport.general.head1");
|
||||
|
||||
private static final Message T_success = message("xmlui.administrative.metadataimport.MetadataImportConfirm.success");
|
||||
private static final Message T_changes_committed = message("xmlui.administrative.metadataimport.MetadataImportConfirm.changes_committed");
|
||||
private static final Message T_item_addition = message("xmlui.administrative.metadataimport.MetadataImportConfirm.item_added");
|
||||
private static final Message T_item_deletion = message("xmlui.administrative.metadataimport.MetadataImportConfirm.item_removed");
|
||||
private static final Message T_collection_addition = message("xmlui.administrative.metadataimport.MetadataImportConfirm.collection_added");
|
||||
private static final Message T_collection_deletion = message("xmlui.administrative.metadataimport.MetadataImportConfirm.collection_removed");
|
||||
private static final Message T_success = message("xmlui.administrative.metadataimport.MetadataImportConfirm.success");
|
||||
private static final Message T_changes_committed = message("xmlui.administrative.metadataimport.MetadataImportConfirm.changes_committed");
|
||||
private static final Message T_item_addition = message("xmlui.administrative.metadataimport.MetadataImportConfirm.item_added");
|
||||
private static final Message T_item_deletion = message("xmlui.administrative.metadataimport.MetadataImportConfirm.item_removed");
|
||||
private static final Message T_collection_newowner = message("xmlui.administrative.metadataimport.MetadataImportConfirm.collection_newowner");
|
||||
private static final Message T_collection_oldowner = message("xmlui.administrative.metadataimport.MetadataImportConfirm.collection_oldowner");
|
||||
private static final Message T_collection_mapped = message("xmlui.administrative.metadataimport.MetadataImportConfirm.collection_mapped");
|
||||
private static final Message T_collection_unmapped = message("xmlui.administrative.metadataimport.MetadataImportConfirm.collection_unmapped");
|
||||
|
||||
|
||||
public void addPageMeta(PageMeta pageMeta) throws WingException
|
||||
@@ -105,10 +107,12 @@ public class MetadataImportConfirm extends AbstractDSpaceTransformer {
|
||||
// Get list of changes
|
||||
|
||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||
ArrayList<BulkEditChange> changes = null;
|
||||
ArrayList<BulkEditChange> changes = null;
|
||||
|
||||
if(request.getAttribute("changes") != null)
|
||||
changes = ((ArrayList<BulkEditChange>)request.getAttribute("changes"));
|
||||
if(request.getAttribute("changes") != null)
|
||||
{
|
||||
changes = ((ArrayList<BulkEditChange>)request.getAttribute("changes"));
|
||||
}
|
||||
|
||||
// DIVISION: metadata-import
|
||||
Division div = body.addInteractiveDivision("metadata-import",contextPath + "/admin/metadataimport", Division.METHOD_MULTIPART,"primary administrative");
|
||||
@@ -129,11 +133,12 @@ public class MetadataImportConfirm extends AbstractDSpaceTransformer {
|
||||
// Get the changes
|
||||
ArrayList<DCValue> adds = change.getAdds();
|
||||
ArrayList<DCValue> removes = change.getRemoves();
|
||||
ArrayList<Collection> newCollections = change.getNewOwningCollections();
|
||||
ArrayList<Collection> oldCollections = change.getOldOwningCollections();
|
||||
ArrayList<Collection> newCollections = change.getNewMappedCollections();
|
||||
ArrayList<Collection> oldCollections = change.getOldMappedCollections();
|
||||
|
||||
if ((adds.size() > 0) || (removes.size() > 0) ||
|
||||
(newCollections.size() > 0) || (oldCollections.size() > 0))
|
||||
(newCollections.size() > 0) || (oldCollections.size() > 0) ||
|
||||
(change.getNewOwningCollection() != null) || (change.getOldOwningCollection() != null))
|
||||
{
|
||||
Row headerrow = mdchanges.addRow(Row.ROLE_HEADER);
|
||||
// Show the item
|
||||
@@ -153,23 +158,51 @@ public class MetadataImportConfirm extends AbstractDSpaceTransformer {
|
||||
changeCounter++;
|
||||
}
|
||||
|
||||
// Show new collections
|
||||
// Show new owning collection
|
||||
if (change.getNewOwningCollection() != null)
|
||||
{
|
||||
Collection c = change.getNewOwningCollection();
|
||||
if (c != null)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
|
||||
colrow.addCellContent(T_collection_newowner);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
}
|
||||
|
||||
// Show old owning collection
|
||||
if (change.getOldOwningCollection() != null)
|
||||
{
|
||||
Collection c = change.getOldOwningCollection();
|
||||
if (c != null)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
|
||||
colrow.addCellContent(T_collection_oldowner);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
}
|
||||
|
||||
// Show new mapped collections
|
||||
for (Collection c : newCollections)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
|
||||
colrow.addCellContent(T_collection_addition);
|
||||
colrow.addCellContent(T_collection_mapped);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
|
||||
// Show old collections
|
||||
// Show old mapped collections
|
||||
for (Collection c : oldCollections)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
|
||||
colrow.addCellContent(T_collection_deletion);
|
||||
colrow.addCellContent(T_collection_unmapped);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
|
||||
|
@@ -78,19 +78,19 @@ public class MetadataImportUpload extends AbstractDSpaceTransformer {
|
||||
private static final Message T_submit_return = message("xmlui.general.return");
|
||||
private static final Message T_trail = message("xmlui.administrative.metadataimport.general.trail");
|
||||
private static final Message T_no_changes = message("xmlui.administrative.metadataimport.general.no_changes");
|
||||
private static final Message T_new_item = message("xmlui.administrative.metadataimport.general.new_item");
|
||||
private static final Message T_new_item = message("xmlui.administrative.metadataimport.general.new_item");
|
||||
private static final Message T_title = message("xmlui.administrative.metadataimport.general.title");
|
||||
private static final Message T_head1 = message("xmlui.administrative.metadataimport.general.head1");
|
||||
|
||||
private static final Message T_para = message("xmlui.administrative.metadataimport.MetadataImportUpload.hint");
|
||||
private static final Message T_submit_confirm = message("xmlui.administrative.metadataimport.MetadataImportUpload.submit_confirm");
|
||||
private static final Message T_submit_confirm = message("xmlui.administrative.metadataimport.MetadataImportUpload.submit_confirm");
|
||||
private static final Message T_changes_pending = message("xmlui.administrative.metadataimport.MetadataImportUpload.changes_pending");
|
||||
private static final Message T_item_addition = message("xmlui.administrative.metadataimport.MetadataImportUpload.item_add");
|
||||
private static final Message T_item_deletion = message("xmlui.administrative.metadataimport.MetadataImportUpload.item_remove");
|
||||
private static final Message T_collection_addition = message("xmlui.administrative.metadataimport.MetadataImportUpload.collection_add");
|
||||
private static final Message T_collection_deletion = message("xmlui.administrative.metadataimport.MetadataImportUpload.collection_remove");
|
||||
|
||||
|
||||
private static final Message T_item_addition = message("xmlui.administrative.metadataimport.MetadataImportUpload.item_add");
|
||||
private static final Message T_item_deletion = message("xmlui.administrative.metadataimport.MetadataImportUpload.item_remove");
|
||||
private static final Message T_collection_newowner = message("xmlui.administrative.metadataimport.MetadataImportUpload.collection_newowner");
|
||||
private static final Message T_collection_oldowner = message("xmlui.administrative.metadataimport.MetadataImportUpload.collection_oldowner");
|
||||
private static final Message T_collection_mapped = message("xmlui.administrative.metadataimport.MetadataImportUpload.collection_mapped");
|
||||
private static final Message T_collection_unmapped = message("xmlui.administrative.metadataimport.MetadataImportUpload.collection_unmapped");
|
||||
|
||||
public void addPageMeta(PageMeta pageMeta) throws WingException
|
||||
{
|
||||
@@ -106,136 +106,164 @@ public class MetadataImportUpload extends AbstractDSpaceTransformer {
|
||||
// Get list of changes
|
||||
|
||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||
ArrayList<BulkEditChange> changes = null;
|
||||
int num_changes = 0;
|
||||
ArrayList<BulkEditChange> changes = null;
|
||||
int num_changes = 0;
|
||||
|
||||
if(request.getAttribute("changes") != null)
|
||||
{
|
||||
changes = ((ArrayList<BulkEditChange>)request.getAttribute("changes"));
|
||||
num_changes = changes.size();
|
||||
}
|
||||
|
||||
if(request.getAttribute("changes") != null)
|
||||
{
|
||||
changes = ((ArrayList<BulkEditChange>)request.getAttribute("changes"));
|
||||
num_changes = changes.size();
|
||||
}
|
||||
|
||||
|
||||
// DIVISION: metadata-import
|
||||
Division div = body.addInteractiveDivision("metadata-import",contextPath + "/admin/metadataimport", Division.METHOD_MULTIPART,"primary administrative");
|
||||
div.setHead(T_head1);
|
||||
|
||||
if(num_changes > 0)
|
||||
if(num_changes > 0)
|
||||
{
|
||||
|
||||
div.addPara(T_para);
|
||||
|
||||
Table mdchanges = div.addTable("metadata-changes", num_changes, 2);
|
||||
|
||||
// Display the changes
|
||||
int changeCounter = 0;
|
||||
for (BulkEditChange change : changes)
|
||||
{
|
||||
// Get the changes
|
||||
ArrayList<DCValue> adds = change.getAdds();
|
||||
ArrayList<DCValue> removes = change.getRemoves();
|
||||
ArrayList<Collection> newCollections = change.getNewMappedCollections();
|
||||
ArrayList<Collection> oldCollections = change.getOldMappedCollections();
|
||||
|
||||
if ((adds.size() > 0) || (removes.size() > 0) ||
|
||||
(newCollections.size() > 0) || (oldCollections.size() > 0))
|
||||
{
|
||||
|
||||
div.addPara(T_para);
|
||||
|
||||
Table mdchanges = div.addTable("metadata-changes", num_changes, 2);
|
||||
|
||||
// Display the changes
|
||||
int changeCounter = 0;
|
||||
for (BulkEditChange change : changes)
|
||||
Row headerrow = mdchanges.addRow(Row.ROLE_HEADER);
|
||||
// Show the item
|
||||
if (!change.isNewItem())
|
||||
{
|
||||
// Get the changes
|
||||
ArrayList<DCValue> adds = change.getAdds();
|
||||
ArrayList<DCValue> removes = change.getRemoves();
|
||||
ArrayList<Collection> newCollections = change.getNewOwningCollections();
|
||||
ArrayList<Collection> oldCollections = change.getOldOwningCollections();
|
||||
|
||||
if ((adds.size() > 0) || (removes.size() > 0) ||
|
||||
(newCollections.size() > 0) || (oldCollections.size() > 0))
|
||||
{
|
||||
Row headerrow = mdchanges.addRow(Row.ROLE_HEADER);
|
||||
// Show the item
|
||||
if (!change.isNewItem())
|
||||
{
|
||||
Item i = change.getItem();
|
||||
Cell cell = headerrow.addCell();
|
||||
cell.addContent(T_changes_pending);
|
||||
cell.addContent(" " + i.getID() + "(" + i.getHandle() + ")");
|
||||
Item i = change.getItem();
|
||||
Cell cell = headerrow.addCell();
|
||||
cell.addContent(T_changes_pending);
|
||||
cell.addContent(" " + i.getID() + "(" + i.getHandle() + ")");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
headerrow.addCellContent(T_new_item);
|
||||
}
|
||||
headerrow.addCell();
|
||||
changeCounter++;
|
||||
}
|
||||
|
||||
// Show new collections
|
||||
for (Collection c : newCollections)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
|
||||
colrow.addCellContent(T_collection_addition);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
|
||||
// Show old collections
|
||||
for (Collection c : oldCollections)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
|
||||
colrow.addCellContent(T_collection_deletion);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
|
||||
// Show additions
|
||||
for (DCValue dcv : adds)
|
||||
{
|
||||
Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
|
||||
String md = dcv.schema + "." + dcv.element;
|
||||
if (dcv.qualifier != null)
|
||||
{
|
||||
md += "." + dcv.qualifier;
|
||||
}
|
||||
if (dcv.language != null)
|
||||
{
|
||||
md += "[" + dcv.language + "]";
|
||||
}
|
||||
|
||||
Cell cell = mdrow.addCell();
|
||||
cell.addContent(T_item_addition);
|
||||
cell.addContent(" (" + md + ")");
|
||||
mdrow.addCellContent(dcv.value);
|
||||
}
|
||||
|
||||
// Show removals
|
||||
for (DCValue dcv : removes)
|
||||
{
|
||||
Row mdrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
|
||||
String md = dcv.schema + "." + dcv.element;
|
||||
if (dcv.qualifier != null)
|
||||
{
|
||||
md += "." + dcv.qualifier;
|
||||
}
|
||||
if (dcv.language != null)
|
||||
{
|
||||
md += "[" + dcv.language + "]";
|
||||
}
|
||||
|
||||
Cell cell = mdrow.addCell();
|
||||
cell.addContent(T_item_deletion);
|
||||
cell.addContent(" (" + md + ")");
|
||||
mdrow.addCellContent(dcv.value);
|
||||
}
|
||||
}
|
||||
Para actions = div.addPara();
|
||||
Button applychanges = actions.addButton("submit_confirm");
|
||||
applychanges.setValue(T_submit_confirm);
|
||||
Button cancel = actions.addButton("submit_return");
|
||||
cancel.setValue(T_submit_return);
|
||||
else
|
||||
{
|
||||
headerrow.addCellContent(T_new_item);
|
||||
}
|
||||
headerrow.addCell();
|
||||
changeCounter++;
|
||||
}
|
||||
else
|
||||
|
||||
// Show new owning collection
|
||||
if (change.getNewOwningCollection() != null)
|
||||
{
|
||||
Para nochanges = div.addPara();
|
||||
nochanges.addContent(T_no_changes);
|
||||
Para actions = div.addPara();
|
||||
Button cancel = actions.addButton("submit_return");
|
||||
cancel.setValue(T_submit_return);
|
||||
Collection c = change.getNewOwningCollection();
|
||||
if (c != null)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
|
||||
colrow.addCellContent(T_collection_newowner);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
div.addHidden("administrative-continue").setValue(knot.getId());
|
||||
|
||||
// Show old owning collection
|
||||
if (change.getOldOwningCollection() != null)
|
||||
{
|
||||
Collection c = change.getOldOwningCollection();
|
||||
if (c != null)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
|
||||
colrow.addCellContent(T_collection_oldowner);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
}
|
||||
|
||||
// Show new mapped collections
|
||||
for (Collection c : newCollections)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
|
||||
colrow.addCellContent(T_collection_mapped);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
|
||||
// Show old mapped collections
|
||||
for (Collection c : oldCollections)
|
||||
{
|
||||
String cHandle = c.getHandle();
|
||||
String cName = c.getName();
|
||||
Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
|
||||
colrow.addCellContent(T_collection_unmapped);
|
||||
colrow.addCellContent(cHandle + " (" + cName + ")");
|
||||
}
|
||||
|
||||
// Show additions
|
||||
for (DCValue dcv : adds)
|
||||
{
|
||||
Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
|
||||
String md = dcv.schema + "." + dcv.element;
|
||||
if (dcv.qualifier != null)
|
||||
{
|
||||
md += "." + dcv.qualifier;
|
||||
}
|
||||
if (dcv.language != null)
|
||||
{
|
||||
md += "[" + dcv.language + "]";
|
||||
}
|
||||
|
||||
Cell cell = mdrow.addCell();
|
||||
cell.addContent(T_item_addition);
|
||||
cell.addContent(" (" + md + ")");
|
||||
mdrow.addCellContent(dcv.value);
|
||||
}
|
||||
|
||||
// Show removals
|
||||
for (DCValue dcv : removes)
|
||||
{
|
||||
Row mdrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
|
||||
String md = dcv.schema + "." + dcv.element;
|
||||
if (dcv.qualifier != null)
|
||||
{
|
||||
md += "." + dcv.qualifier;
|
||||
}
|
||||
if (dcv.language != null)
|
||||
{
|
||||
md += "[" + dcv.language + "]";
|
||||
}
|
||||
|
||||
Cell cell = mdrow.addCell();
|
||||
cell.addContent(T_item_deletion);
|
||||
cell.addContent(" (" + md + ")");
|
||||
mdrow.addCellContent(dcv.value);
|
||||
}
|
||||
}
|
||||
Para actions = div.addPara();
|
||||
Button applychanges = actions.addButton("submit_confirm");
|
||||
applychanges.setValue(T_submit_confirm);
|
||||
Button cancel = actions.addButton("submit_return");
|
||||
cancel.setValue(T_submit_return);
|
||||
}
|
||||
else
|
||||
{
|
||||
Para nochanges = div.addPara();
|
||||
nochanges.addContent(T_no_changes);
|
||||
Para actions = div.addPara();
|
||||
Button cancel = actions.addButton("submit_return");
|
||||
cancel.setValue(T_submit_return);
|
||||
}
|
||||
|
||||
|
||||
|
||||
div.addHidden("administrative-continue").setValue(knot.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -124,7 +124,7 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
||||
message("xmlui.ArtifactBrowser.CollectionViewer.head_recent_submissions");
|
||||
|
||||
/** How many recent submissions to include in the page */
|
||||
private static final int RECENT_SUBMISISONS = 5;
|
||||
private static final int RECENT_SUBMISSIONS = 5;
|
||||
|
||||
/** The cache of recently submitted items */
|
||||
private java.util.List<BrowseItem> recentSubmissionItems;
|
||||
@@ -355,9 +355,10 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
||||
return recentSubmissionItems;
|
||||
|
||||
String source = ConfigurationManager.getProperty("recent.submissions.sort-option");
|
||||
int numRecentSubmissions = ConfigurationManager.getIntProperty("recent.submissions.count", RECENT_SUBMISSIONS);
|
||||
BrowserScope scope = new BrowserScope(context);
|
||||
scope.setCollection(collection);
|
||||
scope.setResultsPerPage(RECENT_SUBMISISONS);
|
||||
scope.setResultsPerPage(numRecentSubmissions);
|
||||
|
||||
// FIXME Exception Handling
|
||||
try
|
||||
|
@@ -125,7 +125,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
||||
message("xmlui.ArtifactBrowser.CommunityViewer.head_recent_submissions");
|
||||
|
||||
/** How many recent submissions to list */
|
||||
private static final int RECENT_SUBMISISONS = 5;
|
||||
private static final int RECENT_SUBMISSIONS = 5;
|
||||
|
||||
/** The cache of recently submitted items */
|
||||
private java.util.List<BrowseItem> recentSubmittedItems;
|
||||
@@ -397,9 +397,10 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
||||
return recentSubmittedItems;
|
||||
|
||||
String source = ConfigurationManager.getProperty("recent.submissions.sort-option");
|
||||
int numRecentSubmissions = ConfigurationManager.getIntProperty("recent.submissions.count", RECENT_SUBMISSIONS);
|
||||
BrowserScope scope = new BrowserScope(context);
|
||||
scope.setCommunity(community);
|
||||
scope.setResultsPerPage(RECENT_SUBMISISONS);
|
||||
scope.setResultsPerPage(numRecentSubmissions);
|
||||
|
||||
// FIXME Exception Handling
|
||||
try
|
||||
|
@@ -128,6 +128,8 @@ public class ConfigurableBrowse extends AbstractDSpaceTransformer implements
|
||||
|
||||
private final static Message T_order = message("xmlui.ArtifactBrowser.ConfigurableBrowse.general.order");
|
||||
|
||||
private final static Message T_no_results= message("xmlui.ArtifactBrowser.ConfigurableBrowse.general.no_results");
|
||||
|
||||
private final static Message T_rpp = message("xmlui.ArtifactBrowser.ConfigurableBrowse.general.rpp");
|
||||
|
||||
private final static Message T_etal = message("xmlui.ArtifactBrowser.ConfigurableBrowse.general.etal");
|
||||
@@ -282,57 +284,65 @@ public class ConfigurableBrowse extends AbstractDSpaceTransformer implements
|
||||
// This div will hold the browsing results
|
||||
Division results = div.addDivision("browse-by-" + type + "-results", "primary");
|
||||
|
||||
// Add the pagination
|
||||
//results.setSimplePagination(itemsTotal, firstItemIndex, lastItemIndex, previousPage, nextPage)
|
||||
results.setSimplePagination(info.getTotal(), browseInfo.getOverallPosition() + 1,
|
||||
browseInfo.getOverallPosition() + browseInfo.getResultCount(), getPreviousPageURL(
|
||||
params, info), getNextPageURL(params, info));
|
||||
|
||||
// Reference all the browsed items
|
||||
ReferenceSet referenceSet = results.addReferenceSet("browse-by-" + type,
|
||||
ReferenceSet.TYPE_SUMMARY_LIST, type, null);
|
||||
|
||||
// Are we browsing items, or unique metadata?
|
||||
if (isItemBrowse(info))
|
||||
// If there are items to browse, add the pagination
|
||||
int itemsTotal = info.getTotal();
|
||||
if (itemsTotal > 0)
|
||||
{
|
||||
// Add the items to the browse results
|
||||
for (BrowseItem item : (java.util.List<BrowseItem>) info.getResults())
|
||||
//results.setSimplePagination(itemsTotal, firstItemIndex, lastItemIndex, previousPage, nextPage)
|
||||
results.setSimplePagination(itemsTotal, browseInfo.getOverallPosition() + 1,
|
||||
browseInfo.getOverallPosition() + browseInfo.getResultCount(), getPreviousPageURL(
|
||||
params, info), getNextPageURL(params, info));
|
||||
|
||||
// Reference all the browsed items
|
||||
ReferenceSet referenceSet = results.addReferenceSet("browse-by-" + type,
|
||||
ReferenceSet.TYPE_SUMMARY_LIST, type, null);
|
||||
|
||||
// Are we browsing items, or unique metadata?
|
||||
if (isItemBrowse(info))
|
||||
{
|
||||
referenceSet.addReference(item);
|
||||
// Add the items to the browse results
|
||||
for (BrowseItem item : (java.util.List<BrowseItem>) info.getResults())
|
||||
{
|
||||
referenceSet.addReference(item);
|
||||
}
|
||||
}
|
||||
else // browsing a list of unique metadata entries
|
||||
{
|
||||
// Create a table for the results
|
||||
Table singleTable = results.addTable("browse-by-" + type + "-results",
|
||||
browseInfo.getResultCount() + 1, 1);
|
||||
|
||||
// Add the column heading
|
||||
singleTable.addRow(Row.ROLE_HEADER).addCell().addContent(
|
||||
message("xmlui.ArtifactBrowser.ConfigurableBrowse." + type + ".column_heading"));
|
||||
|
||||
// Iterate each result
|
||||
for (String[] singleEntry : browseInfo.getStringResults())
|
||||
{
|
||||
// Create a Map of the query parameters for the link
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
queryParams.put(BrowseParams.TYPE, URLEncode(type));
|
||||
if (singleEntry[1] != null)
|
||||
{
|
||||
queryParams.put(BrowseParams.FILTER_VALUE[1], URLEncode(
|
||||
singleEntry[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
queryParams.put(BrowseParams.FILTER_VALUE[0], URLEncode(
|
||||
singleEntry[0]));
|
||||
}
|
||||
|
||||
// Create an entry in the table, and a linked entry
|
||||
Cell cell = singleTable.addRow().addCell();
|
||||
cell.addXref(super.generateURL(BROWSE_URL_BASE, queryParams),
|
||||
singleEntry[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // browsing a list of unique metadata entries
|
||||
else
|
||||
{
|
||||
// Create a table for the results
|
||||
Table singleTable = results.addTable("browse-by-" + type + "-results",
|
||||
browseInfo.getResultCount() + 1, 1);
|
||||
|
||||
// Add the column heading
|
||||
singleTable.addRow(Row.ROLE_HEADER).addCell().addContent(
|
||||
message("xmlui.ArtifactBrowser.ConfigurableBrowse." + type + ".column_heading"));
|
||||
|
||||
// Iterate each result
|
||||
for (String[] singleEntry : browseInfo.getStringResults())
|
||||
{
|
||||
// Create a Map of the query parameters for the link
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
queryParams.put(BrowseParams.TYPE, URLEncode(type));
|
||||
if (singleEntry[1] != null)
|
||||
{
|
||||
queryParams.put(BrowseParams.FILTER_VALUE[1], URLEncode(
|
||||
singleEntry[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
queryParams.put(BrowseParams.FILTER_VALUE[0], URLEncode(
|
||||
singleEntry[0]));
|
||||
}
|
||||
|
||||
// Create an entry in the table, and a linked entry
|
||||
Cell cell = singleTable.addRow().addCell();
|
||||
cell.addXref(super.generateURL(BROWSE_URL_BASE, queryParams),
|
||||
singleEntry[0]);
|
||||
}
|
||||
results.addPara(T_no_results);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -447,7 +447,11 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
fullName.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
fullName.addError(dcInput.getWarning());
|
||||
} else {
|
||||
fullName.addError(T_required_field);
|
||||
}
|
||||
if (dcInput.isRepeatable() && !readonly)
|
||||
fullName.enableAddOperation();
|
||||
if ((dcInput.isRepeatable() || dcValues.length > 1) && !readonly)
|
||||
@@ -543,7 +547,11 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
fullDate.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
fullDate.addError(dcInput.getWarning());
|
||||
} else {
|
||||
fullDate.addError(T_required_field);
|
||||
}
|
||||
if (dcInput.isRepeatable() && !readonly)
|
||||
fullDate.enableAddOperation();
|
||||
if ((dcInput.isRepeatable() || dcValues.length > 1) && !readonly)
|
||||
@@ -632,7 +640,11 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
fullSeries.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
fullSeries.addError(dcInput.getWarning());
|
||||
} else {
|
||||
fullSeries.addError(T_required_field);
|
||||
}
|
||||
if (dcInput.isRepeatable() && !readonly)
|
||||
fullSeries.enableAddOperation();
|
||||
if ((dcInput.isRepeatable() || dcValues.length > 1) && !readonly)
|
||||
@@ -698,7 +710,11 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
qualdrop.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
qualdrop.addError(dcInput.getWarning());
|
||||
} else {
|
||||
qualdrop.addError(T_required_field);
|
||||
}
|
||||
if (dcInput.isRepeatable() && !readonly)
|
||||
qualdrop.enableAddOperation();
|
||||
// Update delete based upon the filtered values.
|
||||
@@ -776,7 +792,11 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
textArea.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
textArea.addError(dcInput.getWarning());
|
||||
} else {
|
||||
textArea.addError(T_required_field);
|
||||
}
|
||||
if (dcInput.isRepeatable() && !readonly)
|
||||
textArea.enableAddOperation();
|
||||
if ((dcInput.isRepeatable() || dcValues.length > 1) && !readonly)
|
||||
@@ -845,7 +865,11 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
select.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
select.addError(dcInput.getWarning());
|
||||
} else {
|
||||
select.addError(T_required_field);
|
||||
}
|
||||
if (dcInput.isRepeatable() || dcValues.length > 1)
|
||||
{
|
||||
// Use the multiple functionality from the HTML
|
||||
@@ -900,7 +924,11 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
select.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
select.addError(dcInput.getWarning());
|
||||
} else {
|
||||
select.addError(T_required_field);
|
||||
}
|
||||
if (dcInput.isRepeatable() || dcValues.length > 1)
|
||||
{
|
||||
// Use the multiple functionality from the HTML
|
||||
@@ -974,8 +1002,12 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
listField.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
listField.addError(dcInput.getWarning());
|
||||
} else {
|
||||
listField.addError(T_required_field);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Setup each of the possible options
|
||||
java.util.List<String> pairs = dcInput.getPairs();
|
||||
@@ -1050,7 +1082,11 @@ public class DescribeStep extends AbstractSubmissionStep
|
||||
if (dcInput.isRequired())
|
||||
text.setRequired();
|
||||
if (isFieldInError(fieldName))
|
||||
if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
|
||||
text.addError(dcInput.getWarning());
|
||||
} else {
|
||||
text.addError(T_required_field);
|
||||
}
|
||||
if (dcInput.isRepeatable() && !readonly)
|
||||
text.enableAddOperation();
|
||||
if ((dcInput.isRepeatable() || dcValues.length > 1) && !readonly)
|
||||
|
@@ -184,32 +184,38 @@ public class DSpaceMETSGenerator extends AbstractGenerator
|
||||
if (parts.length == 2)
|
||||
{
|
||||
String type = parts[0];
|
||||
int id = Integer.valueOf(parts[1]);
|
||||
|
||||
if ("item".equals(type))
|
||||
{
|
||||
Item item = Item.find(context,id);
|
||||
if (item != null)
|
||||
adapter = new ItemAdapter(context,item,contextPath);
|
||||
}
|
||||
else if ("collection".equals(type))
|
||||
{
|
||||
Collection collection = Collection.find(context,id);
|
||||
if (collection != null)
|
||||
adapter = new ContainerAdapter(context, collection,contextPath);
|
||||
}
|
||||
else if ("community".equals(type))
|
||||
{
|
||||
Community community = Community.find(context,id);
|
||||
if (community != null)
|
||||
adapter = new ContainerAdapter(context, community,contextPath);
|
||||
}
|
||||
else if ("repository".equals(type))
|
||||
{
|
||||
if (ConfigurationManager.getProperty("handle.prefix").equals(String.valueOf(id)))
|
||||
adapter = new RepositoryAdapter(context,contextPath);
|
||||
}
|
||||
|
||||
String strid = parts[1];
|
||||
int id = 0;
|
||||
|
||||
// Handle prefixes must be treated as strings
|
||||
// all non-repository types need integer IDs
|
||||
if ("repository".equals(type))
|
||||
{
|
||||
if (ConfigurationManager.getProperty("handle.prefix").equals(strid))
|
||||
adapter = new RepositoryAdapter(context,contextPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
id = Integer.valueOf(parts[1]);
|
||||
if ("item".equals(type))
|
||||
{
|
||||
Item item = Item.find(context,id);
|
||||
if (item != null)
|
||||
adapter = new ItemAdapter(context,item,contextPath);
|
||||
}
|
||||
else if ("collection".equals(type))
|
||||
{
|
||||
Collection collection = Collection.find(context,id);
|
||||
if (collection != null)
|
||||
adapter = new ContainerAdapter(context, collection,contextPath);
|
||||
}
|
||||
else if ("community".equals(type))
|
||||
{
|
||||
Community community = Community.find(context,id);
|
||||
if (community != null)
|
||||
adapter = new ContainerAdapter(context, community,contextPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return adapter;
|
||||
|
@@ -564,7 +564,11 @@ public class AuthenticationUtil
|
||||
|
||||
// Return the path for which this request belongs too. Only urls
|
||||
// for this path may be resumed.
|
||||
return interruptedRequest.getServletPath();
|
||||
if (interruptedRequest.getServletPath() == null || interruptedRequest.getServletPath().length() == 0) {
|
||||
return interruptedRequest.getActualPath();
|
||||
} else {
|
||||
return interruptedRequest.getServletPath();
|
||||
}
|
||||
}
|
||||
|
||||
// No request was interrupted.
|
||||
|
@@ -117,6 +117,14 @@ public class RequestInfo
|
||||
{
|
||||
return this.servletPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the servlet path that this request is for.
|
||||
*/
|
||||
public String getActualPath()
|
||||
{
|
||||
return this.pathInfo + ((queryString == null || queryString.length() == 0) ? "" : "?"+queryString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap an incoming request to make it look like the request that the
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-xmlui</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -34,9 +34,9 @@
|
||||
</repositories>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-webapp</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-webapp</url>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui/dspace-xmlui-webapp</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui/dspace-xmlui-webapp</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
@@ -3,8 +3,8 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:configurator="http://cocoon.apache.org/schema/configurator"
|
||||
xmlns:avalon="http://cocoon.apache.org/schema/avalon" xmlns:servlet="http://cocoon.apache.org/schema/servlet"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
|
||||
http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd
|
||||
http://cocoon.apache.org/schema/avalon http://cocoon.apache.org/schema/avalon/cocoon-avalon-1.0.xsd
|
||||
http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
|
||||
@@ -17,7 +17,7 @@
|
||||
<!-- Activate Avalon Bridge -->
|
||||
<avalon:bridge />
|
||||
|
||||
<bean id="dspace.org.myApplication" class="org.apache.cocoon.servlet.SitemapServlet">
|
||||
<bean id="dspace.org.myApplication" class="org.apache.cocoon.sitemap.SitemapServlet">
|
||||
<servlet:context mount-path="" context-path="" />
|
||||
</bean>
|
||||
|
||||
|
@@ -168,6 +168,7 @@
|
||||
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.general.choose_year">(Choose year)</message>
|
||||
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.general.jump_year">Or type in a year: </message>
|
||||
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.general.jump_year_help">Browse for items that are from the given year.</message>
|
||||
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.general.no_results">Sorry, there are no results for this browse.</message>
|
||||
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.general.sort_by"> Sort by: </message>
|
||||
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.general.order"> Order: </message>
|
||||
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.general.rpp"> Results: </message><!-- /Page -->
|
||||
@@ -1277,6 +1278,8 @@
|
||||
<message key="xmlui.administrative.item.MoveItemForm.collection_help">Select the collection you wish to move this item to.</message>
|
||||
<message key="xmlui.administrative.item.MoveItemForm.collection_default">Select a collection...</message>
|
||||
<message key="xmlui.administrative.item.MoveItemForm.submit_move">Move</message>
|
||||
<message key="xmlui.administrative.item.MoveItemForm.inherit_policies">Inherit policies</message>
|
||||
<message key="xmlui.administrative.item.MoveItemForm.inherit_policies_help">Inherit the default policies of the destination collection</message>
|
||||
|
||||
<!-- org.dspace.app.xmlui.administrative.item.EditBitstreamForm -->
|
||||
<message key="xmlui.administrative.item.EditBitstreamForm.title">Edit Bitstream</message>
|
||||
@@ -1383,14 +1386,18 @@
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.changes_committed">Changes applied to item</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.item_added">Added: </message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.item_removed">Removed: </message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.collection_added">Added to collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.collection_removed">Removed from collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.collection_newowner">Added to owning collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.collection_oldowner">Removed from owning collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.collection_mapped">Mapped to collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportConfirm.collection_unmapped">Unmapped from collection</message>
|
||||
|
||||
<!-- org.dspace.app.xmlui.administrative.metadataimport.MetadataImportUpload -->
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.item_add">Add: </message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.item_remove">Remove: </message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.collection_add">Add to collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.collection_remove">Remove from collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.collection_newowner">Add to owning collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.collection_oldowner">Remove from owning collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.collection_mapped">Map to collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.collection_unmapped">Un-map from collection</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.changes_pending">Changes pending for item</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.submit_confirm">Apply changes</message>
|
||||
<message key="xmlui.administrative.metadataimport.MetadataImportUpload.hint">Pending changes are listed below for review</message>
|
||||
|
@@ -800,24 +800,40 @@
|
||||
</span>
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<span class="date">
|
||||
<!--
|
||||
<xsl:value-of select="substring(dim:field[@element='date' and @qualifier='issued']/node(),1,10)"/>
|
||||
-->
|
||||
<xsl:call-template name="month-name">
|
||||
<xsl:with-param name="date-time" select = "dim:field[@element='date' and @qualifier='issued']/node()"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="day-in-month">
|
||||
<xsl:with-param name="date-time" select = "dim:field[@element='date' and @qualifier='issued']/node()"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>, </xsl:text>
|
||||
<xsl:call-template name="year">
|
||||
<xsl:with-param name="date-time" select = "dim:field[@element='date' and @qualifier='issued']/node()"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:variable name="month-issued" select= "substring(dim:field[@element='date' and @qualifier='issued']/node(),6,2)"/>
|
||||
<xsl:variable name="day-issued" select= "substring(dim:field[@element='date' and @qualifier='issued']/node(),9,2)"/>
|
||||
|
||||
<xsl:if test="string-length($month-issued) > 0">
|
||||
|
||||
<xsl:call-template name="month-name">
|
||||
<xsl:with-param name="date-time" select = "dim:field[@element='date' and @qualifier='issued']/node()"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<xsl:if test="string-length($day-issued) > 0">
|
||||
|
||||
<xsl:call-template name="day-in-month">
|
||||
<xsl:with-param name="date-time" select = "dim:field[@element='date' and @qualifier='issued']/node()"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text>, </xsl:text>
|
||||
|
||||
</xsl:if>
|
||||
|
||||
<xsl:call-template name="year">
|
||||
<xsl:with-param name="date-time" select = "dim:field[@element='date' and @qualifier='issued']/node()"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</span>
|
||||
<xsl:text>)</xsl:text>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
@@ -829,7 +829,7 @@
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="string-length(dim:field[@element='rights'][not(@qualifier)])>0 or string-length(dim:field[@element='rights'][@qualifier='license'])>0">
|
||||
<xsl:if test="string-length(dim:field[@element='rights'][not(@qualifier)])>0">
|
||||
<div class="detail-view-rights-and-license">
|
||||
<xsl:if test="string-length(dim:field[@element='rights'][not(@qualifier)])>0">
|
||||
<p class="copyright-text">
|
||||
|
@@ -206,7 +206,7 @@
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<!-- Display the contents of 'Description' as long as at least one bitstream contains a description -->
|
||||
<xsl:if test="$context/mets:fileSec/mets:fileGrp/mets:file/mets:FLocat/@xlink:label != ''">
|
||||
<xsl:if test="$context/mets:fileSec/mets:fileGrp[@USE='CONTENT']/mets:file/mets:FLocat/@xlink:label != ''">
|
||||
<td>
|
||||
<xsl:value-of select="mets:FLocat[@LOCTYPE='URL']/@xlink:label"/>
|
||||
</td>
|
||||
|
@@ -552,9 +552,9 @@
|
||||
<xsl:value-of select="mods:note[1]"/>
|
||||
</p>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(mods:accessCondition[@type='useAndReproducation'])>0">
|
||||
<xsl:if test="string-length(mods:accessCondition[@type='useAndReproduction'])>0">
|
||||
<p class="copyright-text">
|
||||
<xsl:value-of select="mods:accessCondition[@type='useAndReproducation']"/>
|
||||
<xsl:value-of select="mods:accessCondition[@type='useAndReproduction']"/>
|
||||
</p>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(mods:extension/dim:field[@mdschema='dc' and @element='rights.license'])>0">
|
||||
@@ -583,9 +583,9 @@
|
||||
<xsl:value-of select="mods:note[1]"/>
|
||||
</p>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(mods:accessCondition[@type='useAndReproducation'])>0">
|
||||
<xsl:if test="string-length(mods:accessCondition[@type='useAndReproduction'])>0">
|
||||
<p class="copyright-text">
|
||||
<xsl:value-of select="mods:accessCondition[@type='useAndReproducation']"/>
|
||||
<xsl:value-of select="mods:accessCondition[@type='useAndReproduction']"/>
|
||||
</p>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-xmlui</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -31,9 +31,9 @@
|
||||
</repositories>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-wing</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-wing</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-wing</url>
|
||||
<connection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui/dspace-xmlui-wing</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui/dspace-xmlui-wing</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
@@ -67,15 +67,21 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.cocoon</groupId>
|
||||
<artifactId>cocoon-servlet-service-impl</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<groupId>org.apache.cocoon</groupId>
|
||||
<artifactId>cocoon-servlet-service-components</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.cocoon</groupId>
|
||||
<artifactId>cocoon-servlet-service-impl</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.cocoon</groupId>
|
||||
<artifactId>cocoon-linkrewriter-impl</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<groupId>org.dspace.dependencies.cocoon</groupId>
|
||||
<artifactId>dspace-cocoon-servlet-service-impl</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
@@ -38,9 +38,9 @@
|
||||
into the snapshot repository below.
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui</url>
|
||||
<connection>scm:svn:http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui</connection>
|
||||
<developerConnection>scm:svn:https://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui</developerConnection>
|
||||
<url>http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.1/dspace-xmlui</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
@@ -1,6 +1,84 @@
|
||||
1.6.0
|
||||
1.6.1
|
||||
=====
|
||||
|
||||
(Javier Garrido)
|
||||
- [DS-582] Basque translation (of jspui for DSpace 1.5.2)
|
||||
|
||||
(Mark Diggory)
|
||||
- [DS-571] Upgrade DSpace Services to next release 2.0.1
|
||||
|
||||
|
||||
(Dale Poulter)
|
||||
- [DS-557] LC Authority Names - Lookup Feature - names w/o dates
|
||||
|
||||
(Paulo Jobim)
|
||||
- [DS-471] Accessing site-level 'mets.xml' in XMLUI doesn't work properly for handle prefixes with periods (e.g. 2010.1)
|
||||
|
||||
(Yin Yin Latt)
|
||||
- [DS-565] Empty description column in Itemview Page - General-Handler.xsl
|
||||
- [DS-566] Side bar menu dropping when there is license text in collection - DIM-Handler.xsl
|
||||
|
||||
(Robin Taylor)
|
||||
- [DS-497] Date month and day get default values when user returns to describe form
|
||||
- [DS-501] Change kubrick.xsl to check for the presence of a day and month before displaying them
|
||||
|
||||
(Keiji Suzuki)
|
||||
- [DS-537] Malformed Japanese option values in the authority lookup window
|
||||
|
||||
(Peter Dietz)
|
||||
- [DS-509] SOLR returns ArrayIndexOutOfBounds with non-existent country code OR when there is no view/download data
|
||||
- [DS-542] verbose output for stats-log-importer displays spurious city/country from previous committed entry
|
||||
|
||||
(Kim Shepherd)
|
||||
- [DS-547] Value for Recent Submissions is not workin in the XMLUI
|
||||
- [DS-527] Withdrawn items not shown as deleted in OAI
|
||||
- [DS-548] Removing repeatable values in DescribeStep does not properly test for authority control
|
||||
- [DS-544] Removal of mapped items can lead to NPE
|
||||
|
||||
(Claudia Jurgen)
|
||||
- [DS-558] Error in update sequence script 1.5 to 1.6 Oracle
|
||||
- [DS-551] Export directories dspace.cfg and build.xml out of sync
|
||||
- [DS-543] Harvest not internationalized
|
||||
|
||||
(Serhij Dubyk)
|
||||
- [DS-500] Ukrainian for DSpace 1.6.0
|
||||
|
||||
(Andrea Bollini)
|
||||
- [DS-513] Connection leak in SWORD authentication process
|
||||
- [DS-581] DIDL doesn't respect the hidden fields and the oai_dc metadata section is different than the simple oai_dc implementation
|
||||
- [DS-580] DIDL format include HTML element if the item has no files
|
||||
- [DS-574] DSpaceMETSIngester creates empty original bundle
|
||||
- [DS-573] NPE resuming submission for item with an empty bundle original
|
||||
|
||||
(Caryn Neiswender)
|
||||
- [DS-518] Duplicate listing of dependencies in dspace-sword/pom.xml
|
||||
|
||||
(Keith Gilbertson)
|
||||
- [DS-123] xmlui browse in empty collection displays "Now showing items 1-0" of 0 - incorrect numbering
|
||||
- [DS-508] Attachment spelled as attachement in DailyReportEmailer
|
||||
- [DS-539] Misspelled attribute in MODS/METS output
|
||||
|
||||
(Stuart Lewis)
|
||||
- [DS-242] Special groups shown for logged in user rather than for user being examined
|
||||
- [DS-506] embargo-lifter command missing from launcher.xml
|
||||
- [DS-516] DSRUN does not start Service Manager
|
||||
- [DS-526] ItemUpdate - script update
|
||||
- [DS-572] Batch metadata editor fails to notice change of item's owning collection
|
||||
|
||||
(Mark Wood)
|
||||
- [DS-469] DCDate.displayDate(false,*) displays only year
|
||||
|
||||
(Ivan Masar)
|
||||
- [DS-515] Czech localization of 1.5.2
|
||||
|
||||
(Ben Bosman)
|
||||
- [DS-579] Required fields in submissions display wrong error message
|
||||
- [DS-538] restricted items are being returned in OAI GetRecord method while using harvest.includerestricted.oai
|
||||
- [DS-493] Url in browser is incorrect after login
|
||||
|
||||
1.6.0 final
|
||||
===========
|
||||
|
||||
(Alexey Maslov)
|
||||
- [DS-289] OAI-PMH + OAI-ORE harvesting support
|
||||
|
||||
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.checker.ChecksumChecker $@
|
||||
$BINDIR/dspace checker "$@"
|
@@ -47,7 +47,7 @@ BINDIR=`dirname $0`
|
||||
|
||||
echo "Cleaning the asset store"
|
||||
|
||||
$BINDIR/dsrun org.dspace.storage.bitstore.Cleanup "$@"
|
||||
$BINDIR/dspace cleanup "$@"
|
||||
|
||||
echo "Cleanup completed"
|
||||
|
||||
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.administer.CreateAdministrator "$@"
|
||||
$BINDIR/dspace create-administrator "$@"
|
||||
|
@@ -39,10 +39,27 @@
|
||||
# DAMAGE.
|
||||
#
|
||||
###########################################################################
|
||||
#
|
||||
# This is a simple shell script for running a command-line DSpace tool.
|
||||
# It sets the CLASSPATH appropriately before invoking Java.
|
||||
|
||||
# Script for running the DSpace launcher.
|
||||
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
DSPACEDIR=`cd "$BINDIR/.." ; pwd`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.launcher.ScriptLauncher $@
|
||||
# Get the JARs in $DSPACEDIR/jsp/WEB-INF/lib, separated by ':'
|
||||
JARS=`echo $DSPACEDIR/lib/*.jar | sed 's/ /\:/g'`
|
||||
|
||||
# Class path for DSpace will be:
|
||||
# Any existing classpath
|
||||
# The JARs (WEB-INF/lib/*.jar)
|
||||
# The WEB-INF/classes directory
|
||||
FULLPATH=$CLASSPATH:$JARS:$DSPACEDIR/config
|
||||
|
||||
#Allow user to specify java options through JAVA_OPTS variable
|
||||
if [ "$JAVA_OPTS" = "" ]; then
|
||||
#Default Java to use 256MB of memory
|
||||
JAVA_OPTS=-Xmx256m
|
||||
fi
|
||||
|
||||
# Now invoke Java
|
||||
java $JAVA_OPTS -classpath $FULLPATH org.dspace.app.launcher.ScriptLauncher "$@"
|
||||
|
@@ -38,4 +38,37 @@
|
||||
@REM #
|
||||
@REM ###########################################################################
|
||||
|
||||
@call dsrun.bat org.dspace.app.launcher.ScriptLauncher %*
|
||||
@echo off
|
||||
|
||||
set CURRENT_DIR=%cd%
|
||||
|
||||
REM Guess DSpace directory: CD to directory script is in; CD to parent
|
||||
chdir /D "%~p0"
|
||||
chdir ..
|
||||
|
||||
REM Check we can find dspace.cfg. Quit with an error if not.
|
||||
if exist "config\dspace.cfg" goto okExec
|
||||
echo Cannot find %cd%\config\dspace.cfg
|
||||
goto end
|
||||
|
||||
:okExec
|
||||
echo Using DSpace installation in: %cd%
|
||||
|
||||
REM Build a CLASSPATH
|
||||
set DSPACE_CLASSPATH=%CLASSPATH%;config
|
||||
for %%f in (lib\*.jar) DO CALL bin\buildpath.bat %%f
|
||||
|
||||
REM If JAVA_OPTS specified, use those options
|
||||
REM Otherwise, default Java to using 256MB of memory
|
||||
if "%JAVA_OPTS%"=="" set JAVA_OPTS=-Xmx256m
|
||||
|
||||
REM Execute Java
|
||||
java %JAVA_OPTS% -classpath "%DSPACE_CLASSPATH%" org.dspace.app.launcher.ScriptLauncher %*
|
||||
|
||||
REM Clean up DSPACE_CLASSPATH variable
|
||||
set DSPACE_CLASSPATH=
|
||||
|
||||
:end
|
||||
|
||||
REM Back to original dir
|
||||
chdir /D %CURRENT_DIR%
|
@@ -42,15 +42,7 @@
|
||||
# This is a simple shell script for running retrieving the value of a dspace
|
||||
# property
|
||||
|
||||
USAGE="dsprop <property.name>"
|
||||
|
||||
# Check we have at least one command-line argument
|
||||
if [ "$#" != "1" ]; then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.core.ConfigurationManager -property "$1"
|
||||
$BINDIR/dspace dsprop -property "$1"
|
||||
|
@@ -43,7 +43,7 @@
|
||||
# This is a simple shell script for running a command-line DSpace tool.
|
||||
# It sets the CLASSPATH appropriately before invoking Java.
|
||||
|
||||
USAGE="dsrun <classname> [arg1 [arg2 ...]]"
|
||||
USAGE="dspace dsrun <classname> [arg1 [arg2 ...]]"
|
||||
|
||||
# Check we have at least one command-line argument
|
||||
if [ "$#" = "0" ]; then
|
||||
@@ -51,24 +51,5 @@ if [ "$#" = "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Assume we're in the bin subdirectory of the DSpace installation directory
|
||||
BINDIR=`dirname $0`
|
||||
DSPACEDIR=`cd "$BINDIR/.." ; pwd`
|
||||
|
||||
# Get the JARs in $DSPACEDIR/jsp/WEB-INF/lib, separated by ':'
|
||||
JARS=`echo $DSPACEDIR/lib/*.jar | sed 's/ /\:/g'`
|
||||
|
||||
# Class path for DSpace will be:
|
||||
# Any existing classpath
|
||||
# The JARs (WEB-INF/lib/*.jar)
|
||||
# The WEB-INF/classes directory
|
||||
FULLPATH=$CLASSPATH:$JARS:$DSPACEDIR/config
|
||||
|
||||
#Allow user to specify java options through JAVA_OPTS variable
|
||||
if [ "$JAVA_OPTS" = "" ]; then
|
||||
#Default Java to use 256MB of memory
|
||||
JAVA_OPTS=-Xmx256m
|
||||
fi
|
||||
|
||||
# Now invoke Java
|
||||
java $JAVA_OPTS -classpath $FULLPATH "$@"
|
||||
$BINDIR/dspace dsrun "$@"
|
||||
|
@@ -43,49 +43,4 @@
|
||||
REM This is a simple shell script for running a command-line DSpace tool.
|
||||
REM sets the CLASSPATH appropriately before invoking Java.
|
||||
|
||||
REM Remember startup dir
|
||||
|
||||
set CURRENT_DIR=%cd%
|
||||
|
||||
|
||||
REM Guess DSpace directory: CD to directory script is in; CD to parent
|
||||
|
||||
chdir /D "%~p0"
|
||||
chdir ..
|
||||
|
||||
REM Check we can find dspace.cfg. Quit with an error if not.
|
||||
|
||||
if exist "config\dspace.cfg" goto okExec
|
||||
echo Cannot find %cd%\config\dspace.cfg
|
||||
goto end
|
||||
|
||||
|
||||
:okExec
|
||||
|
||||
echo Using DSpace installation in: %cd%
|
||||
|
||||
REM Build a CLASSPATH
|
||||
|
||||
set DSPACE_CLASSPATH=%CLASSPATH%;config
|
||||
for %%f in (lib\*.jar) DO CALL bin\buildpath.bat %%f
|
||||
|
||||
REM If JAVA_OPTS specified, use those options
|
||||
REM Otherwise, default Java to using 256MB of memory
|
||||
|
||||
if "%JAVA_OPTS%"=="" set JAVA_OPTS=-Xmx256m
|
||||
|
||||
REM Execute Java
|
||||
|
||||
java %JAVA_OPTS% -classpath "%DSPACE_CLASSPATH%" %*
|
||||
|
||||
|
||||
REM Clean up DSPACE_CLASSPATH variable
|
||||
|
||||
set DSPACE_CLASSPATH=
|
||||
|
||||
|
||||
:end
|
||||
|
||||
REM Back to original dir
|
||||
|
||||
chdir /D %CURRENT_DIR%
|
||||
@call dspace.bat dsrun %*
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.itemexport.ItemExport $@
|
||||
$BINDIR/dspace export "$@"
|
@@ -46,4 +46,4 @@
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
echo "Applying Media Filters"
|
||||
$BINDIR/dsrun org.dspace.app.mediafilter.MediaFilterManager $@
|
||||
$BINDIR/dspace filter-media "$@"
|
@@ -46,4 +46,4 @@
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
echo "Generating sitemaps"
|
||||
$BINDIR/dsrun org.dspace.app.sitemap.GenerateSitemaps $@
|
||||
$BINDIR/dspace generate-sitemaps "$@"
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.itemimport.ItemImport $@
|
||||
$BINDIR/dspace import "$@"
|
@@ -45,9 +45,5 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
echo "Creating browse index"
|
||||
$BINDIR/dsrun org.dspace.browse.IndexBrowse -f -r
|
||||
$BINDIR/dsrun org.dspace.browse.ItemCounter
|
||||
|
||||
echo "Creating search index"
|
||||
$BINDIR/dsrun org.dspace.search.DSIndexer -b
|
||||
echo "Creating browse and search indexes"
|
||||
$BINDIR/dspace index-init
|
@@ -45,9 +45,5 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
echo "Creating browse index"
|
||||
$BINDIR/dsrun org.dspace.browse.IndexBrowse -i
|
||||
$BINDIR/dsrun org.dspace.browse.ItemCounter
|
||||
|
||||
echo "Creating search index"
|
||||
$BINDIR/dsrun org.dspace.search.DSIndexer
|
||||
echo "Creating browse and search indexes"
|
||||
$BINDIR/dspace index-update
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.browse.ItemCounter $@
|
||||
$BINDIR/dspace itemcounter "$@"
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.bulkedit.MetadataExport $@
|
||||
$BINDIR/dspace metadata-export "$@"
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.bulkedit.MetadataImport $@
|
||||
$BINDIR/dspace metadata-import "$@"
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.packager.Packager $@
|
||||
$BINDIR/dspace packager "$@"
|
@@ -46,4 +46,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.statistics.CreateStatReport -r stat-general
|
||||
$BINDIR/dspace stat-general
|
@@ -48,4 +48,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.statistics.CreateStatReport -r stat-initial
|
||||
$BINDIR/dspace stat-initial
|
@@ -47,4 +47,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.statistics.CreateStatReport -r stat-monthly
|
||||
$BINDIR/dspace stat-monthly
|
@@ -46,4 +46,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.statistics.CreateStatReport -r stat-report-general
|
||||
$BINDIR/dspace stat-report-general
|
@@ -48,4 +48,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.statistics.CreateStatReport -r stat-report-initial
|
||||
$BINDIR/dspace stat-report-initial
|
@@ -47,4 +47,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.app.statistics.CreateStatReport -r stat-report-monthly
|
||||
$BINDIR/dspace stat-report-monthly
|
@@ -45,4 +45,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.administer.StructBuilder $@
|
||||
$BINDIR/dspace structure-builder "$@"
|
@@ -46,4 +46,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.eperson.Subscribe $@
|
||||
$BINDIR/dspace sub-daily "$@"
|
@@ -46,4 +46,4 @@
|
||||
# Get the DSPACE/bin directory
|
||||
BINDIR=`dirname $0`
|
||||
|
||||
$BINDIR/dsrun org.dspace.handle.UpdateHandlePrefix $@
|
||||
$BINDIR/dspace update-handle-prefix "$@"
|
@@ -57,7 +57,7 @@ dc.relation.isversionof = <mods:relatedItem type="otherVersion">%s</mods:related
|
||||
dc.relation.replaces = <mods:relatedItem type="preceding">%s</mods:relatedItem> | text()
|
||||
dc.relation.requires = <mods:note type="requires">%s</mods:note> | text()
|
||||
dc.relation.uri = <mods:relatedItem><mods:location><mods:url>%s</mods:url></mods:location></mods:relatedItem> | mods:location/mods:url/text()
|
||||
dc.rights = <mods:accessCondition type="useAndReproducation">%s</mods:accessCondition> | text()
|
||||
dc.rights = <mods:accessCondition type="useAndReproduction">%s</mods:accessCondition> | text()
|
||||
dc.rights.uri = <mods:accessCondition xlink:simpleLink="%s">%s</mods:accessCondition> | @xlink:simpleLink|text()
|
||||
dc.source = <mods:relatedItem type="original">%s</mods:relatedItem> | text()
|
||||
dc.source.uri = <mods:relatedItem type="original" xlink:simpleLink="%s">%s</mods:relatedItem> | @xlink:simpleLink|text()
|
||||
|
@@ -56,7 +56,7 @@ relation.requires = <mods:note type="requires">%s</mods:note>
|
||||
relation.uri = <mods:relatedItem><mods:location><mods:url>%s</mods:url></mods:location></mods:relatedItem>
|
||||
relation = <mods:relatedItem><mods:title>%s</mods:title></mods:relatedItem>
|
||||
rights.uri = <mods:accessCondition xlink:simpleLink="%s">%s</mods:accessCondition>
|
||||
rights = <mods:accessCondition type="useAndReproducation">%s</mods:accessCondition>
|
||||
rights = <mods:accessCondition type="useAndReproduction">%s</mods:accessCondition>
|
||||
source.uri = <mods:relatedItem type="original" xlink:simpleLink="%s">%s</mods:relatedItem>
|
||||
source = <mods:relatedItem type="original">%s</mods:relatedItem>
|
||||
subject.classification = <mods:classification>%s</mods:classification>
|
||||
|
@@ -1959,6 +1959,8 @@ plugin.named.org.dspace.sword.SWORDIngester = \
|
||||
|
||||
# Crosswalk settings; the {name} value must correspond to a declated ingestion crosswalk
|
||||
# harvester.oai.metadataformats.{name} = {namespace},{optional display name}
|
||||
# The display name is only used in the xmlui for the jspui there are entries in the
|
||||
# Messages.properties in the form jsp.tools.edit-collection.form.label21.select.{name}
|
||||
harvester.oai.metadataformats.dc = http://www.openarchives.org/OAI/2.0/oai_dc/, Simple Dublin Core
|
||||
harvester.oai.metadataformats.qdc = http://purl.org/dc/terms/, Qualified Dublin Core
|
||||
harvester.oai.metadataformats.dim = http://www.dspace.org/xmlns/dspace/dim, DSpace Intermediate Metadata
|
||||
@@ -2034,7 +2036,12 @@ harvester.unknownSchema = fail
|
||||
#---------------------------------------------------------------#
|
||||
|
||||
##### Usage Logging #####
|
||||
solr.log.server = ${dspace.baseUrl}/solr/statistics
|
||||
# set this to be the port you run the dspace "solr" webapp
|
||||
# on, by default, we are assuming a test configuration with
|
||||
# tomcat still running on port 8080
|
||||
solr.log.server = http://localhost:8080/solr/statistics
|
||||
|
||||
# The location for the Geo Database retrieved on update/installation
|
||||
solr.dbfile = ${dspace.dir}/config/GeoLiteCity.dat
|
||||
|
||||
# If enabled the statistics system will look for an X-Forward header
|
||||
|
@@ -49,6 +49,22 @@
|
||||
</step>
|
||||
</command>
|
||||
|
||||
<command>
|
||||
<name>dsrun</name>
|
||||
<description>Run a class directly</description>
|
||||
<step>
|
||||
<class>dsrun</class>
|
||||
</step>
|
||||
</command>
|
||||
|
||||
<command>
|
||||
<name>embargo-lifter</name>
|
||||
<description>Embargo manager tool used to check, list and lift embargoes</description>
|
||||
<step>
|
||||
<class>org.dspace.embargo.EmbargoManager</class>
|
||||
</step>
|
||||
</command>
|
||||
|
||||
<command>
|
||||
<name>export</name>
|
||||
<description>Export items or collections</description>
|
||||
@@ -141,7 +157,7 @@
|
||||
<name>itemupdate</name>
|
||||
<description>Item update tool for altering metadata and bitstream content in items</description>
|
||||
<step>
|
||||
<class>org.dspace.app.itemimport.ItemUpdate</class>
|
||||
<class>org.dspace.app.itemupdate.ItemUpdate</class>
|
||||
</step>
|
||||
</command>
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
<section remap="h3">
|
||||
<title>Themes</title>
|
||||
<para>A Theme is a collection of XSL stylesheets and supporting files like images, CSS styles, translations, and help documents. The XSL stylesheets are applied to the DRI Document to covert it into a readable format and give it structure and basic visual formatting in that format. The supporting files are used to provide the page with a specific look and feel, insert images and other media, translate the content, and perform other tasks. The currently used output format is XHTML and the supporting files are generally limited to CSS, images, and JavaScript. More output formats, like PDF or SVG, may be added in the future.</para>
|
||||
<para>A DSpace installation running Manakin may have several Themes associated with it. When applied to a page, a Theme determines most of the pageís look and feel. Different themes can be applied to different sets of DSpace pages allowing for both variety of styles between sets of pages and consistency within those sets. The xmlui.xconf configuration file determines which Themes are applied to which DSpace pages (see the <link linkend="docbook-configure.html-xmlui-configure">Configuration and Customization chapter</link> for more information on installing and configuring themes). Themes may be configured to apply to all pages of specific type, like browse-by-title, to all pages of a one particular community or collection or sets of communities and collections, and to any mix of the two. They can also be configured to apply to a singe arbitrary page or handle.</para>
|
||||
<para>A DSpace installation running Manakin may have several Themes associated with it. When applied to a page, a Theme determines most of the pageís look and feel. Different themes can be applied to different sets of DSpace pages allowing for both variety of styles between sets of pages and consistency within those sets. The xmlui.xconf configuration file determines which Themes are applied to which DSpace pages (see the <link linkend="docbook-xmlui.html">Chapter 7. Manakin [XMLUI] Configuration and Customization</link> for more information on installing and configuring themes). Themes may be configured to apply to all pages of specific type, like browse-by-title, to all pages of a one particular community or collection or sets of communities and collections, and to any mix of the two. They can also be configured to apply to a singe arbitrary page or handle.</para>
|
||||
</section>
|
||||
<section remap="h3">
|
||||
<title>Aspect Chains</title>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<chapter remap="h1">
|
||||
<chapter remap="h1">
|
||||
<title><anchor id="docbook-architecture.html"/>DSpace System Documentation: Architecture</title>
|
||||
<section remap="h2">
|
||||
<title><anchor id="docbook-architecture.html-overview" xreflabel="Overview"/>Overview</title>
|
||||
|
@@ -22,19 +22,19 @@
|
||||
<book>
|
||||
<bookinfo>
|
||||
<title>DSpace Manual</title>
|
||||
<subtitle>Release 1.6.0</subtitle>
|
||||
<subtitle>Release 1.6.1</subtitle>
|
||||
<author>
|
||||
<surname>The DuraSpace Foundation</surname>
|
||||
<surname>DuraSpace</surname>
|
||||
<affiliation>
|
||||
<address><email>webmaster@dspace.org</email></address>
|
||||
</affiliation>
|
||||
</author>
|
||||
<edition>1.6.0</edition>
|
||||
<pubdate>2010-03-02 11:45:00 EST</pubdate>
|
||||
<edition>1.6.1</edition>
|
||||
<pubdate>2010-05-21 12:00:00 EST</pubdate>
|
||||
<copyright>
|
||||
<year>2002-2010</year>
|
||||
<holder>
|
||||
<ulink url="http://www.duraspace.org/">The DuraSpace Foundation</ulink>
|
||||
<ulink url="http://www.duraspace.org/">DuraSpace</ulink>
|
||||
</holder>
|
||||
</copyright>
|
||||
<legalnotice>
|
||||
@@ -51,8 +51,8 @@
|
||||
</legalnotice>
|
||||
<revhistory>
|
||||
<revision>
|
||||
<revnumber>Version 1.6.0 </revnumber>
|
||||
<date>This text generated: 2010-03-02 11:45:00 EST EST</date>
|
||||
<revnumber>Version 1.6.1 </revnumber>
|
||||
<date>This text generated: 2010-05-21 12:00:00 EST EST</date>
|
||||
<authorinitials>JAT</authorinitials>
|
||||
</revision>
|
||||
</revhistory>
|
||||
@@ -63,8 +63,8 @@
|
||||
<preface>
|
||||
<title>Preface</title>
|
||||
<para/>
|
||||
<para>Welcome to Release 1.6.0. The committers have volunteered many hours to fix, re-write and contribute new software code for this release. New features have been added and documentation has been updated.</para>
|
||||
<para>Some of the new features include (not an exhaustive list):</para>
|
||||
<para>Welcome to Release 1.6.1. This is a "fix" release. The committers have volunteered many hours to fix, re-write and contribute new software code for this release. Documentation has been updated. No new features have been added to this release.</para>
|
||||
<para>The following is a list of the new features included (not an exhaustive list) for release 1.6.0 and are also contained in 1.6.1:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>SOLR Statistics.</para>
|
||||
@@ -91,10 +91,11 @@
|
||||
<para>Delegated Administration</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>The following people have contributed to this release of DSpace: @mire, BioMed Central, Andrea Bollini, Ben Bosman, Flavio Botelho, Peter Dietz, Mark Diggory, Tim Donohue, Enovation Solutions, Ladd Hanson, Leonie Hayes, Claudia Juergen, Keller, Fabio Kepler, Yin Yin Latt, Stuart Lewis, Bram Luyten, Van Ly, Alexey Maslov, Gabriela Mircea, Hardik Mishra, Venessa Newton-Wade, OhioLINK, Ekaterina Pechekhonova, Toni Prieto, Richard Rodgers, Ricardo Saraiva, Andreas Schwander, Kim Shepherd, Elin Stangeland, Larry Stone, Graham Triggs, Jeffrey Trimble, Kevin Van de velde, Steve Williams and Mark Wood. Many of them could not do this work without the support (release time and financial) of their institutions that they are associated with. We offer thanks to those institutions for supporting their staff to take time to contribute to the DSpace project.</para>
|
||||
<para>Documentation for this release was overhauled by Jeffrey Trimble, the Documentation Gardener, with many other contributing suggestions, changes, edits, and additions. Special thanks to Bram Luyten for pulling his hair out for re-ordering Chapter 5 to match the order of the <literal>dspace.cfg</literal> file and for the Documentation Gardener who is still picking his own hair up from that re-ordering.</para>
|
||||
<para>Stuart Lewis is the Release Co-ordinator and kept all of the committers inline and fixed things when broken. Many thanks Stuart.</para>
|
||||
<para>Additional thanks to Tim Donohue from DuraSpace Foundation on keeping all of us focused on the work at hand, and calming us when we got excited and for the general support for the DSpace project.</para>
|
||||
<para>The following people have contributed to this release of DSpace: @mire, BioMed Central, Andrea Bollini, Ben Bosman, Flavio Botelho, Peter Dietz, Mark Diggory, Tim Donohue, Serhij Dubyk, Enovation Solutions, Javier Garrido, Keith Gilbertson, Ladd Hanson, Leonie Hayes, Paulo Jobim, Claudia Juergen, Keller, Fabio Kepler, Yin Yin Latt, Stuart Lewis, Bram Luyten, Van Ly, Ivan Masar, Alexey Maslov, Gabriela Mircea, Hardik Mishra, Caryn, Neiswender, Venessa Newton-Wade, OhioLINK, Ekaterina Pechekhonova, Dale Poulter, Toni Prieto, Richard Rodgers, Ricardo Saraiva, Andreas Schwander, Kim Shepherd, Elin Stangeland, Larry Stone, Keiji Suzuki, Robin Taylor, Graham Triggs, Jeffrey Trimble, Kevin Van de velde, Steve Williams and Mark Wood. Many of them could not do this work without the support (release time and financial) of their institutions that they are associated with. We offer thanks to those institutions for supporting their staff to take time to contribute to the DSpace project.</para>
|
||||
<para>We apologize to any committer left off this list. DSpace has such a large, arctive development community that we sometimes loose track of all our contributors. Our ongoing list of all known people/institutions that contribute to DSpace can be found on our DSpace Contributors Wiki page (http://wiki.dspace.org/confluence/display/DSPACE/DSpaceContributors). Acknowledgements to those left off will be made in future releases.</para>
|
||||
<para>The Documentation Gardener for this release was Jeffrey Trimble with input from everyone. All typos are his fault. </para>
|
||||
<para>Kim Shepherd is the Release Co-ordinator of this release.</para>
|
||||
<para>Additional thanks to Tim Donohue from DuraSpace on keeping all of us focused on the work at hand, and calming us when we got excited and for the general support for the DSpace project.</para>
|
||||
</preface>
|
||||
<toc/>
|
||||
&art01;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -44,7 +44,7 @@ dspace.history = ${dspace.dir}/history</screen>
|
||||
<section remap="h3">
|
||||
<title><anchor id="docbook-configure.html-general-update" xreflabel="Update Reminder"/>Update Reminder</title>
|
||||
<subtitle>Things you should know about editing <literal>dspace.cfg</literal> files.</subtitle>
|
||||
<para>It is important to rememeber that there are <emphasis role="bold"> two <literal>dspace.cfg</literal> files after an installation of DSpace.</emphasis></para>
|
||||
<para>It is important to remember that there are <emphasis role="bold"> two <literal>dspace.cfg</literal> files after an installation of DSpace.</emphasis></para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>The "source" file that is found in <literal>[dspace-source]/dspace/config/dspace.cfg</literal></para>
|
||||
@@ -1642,7 +1642,7 @@ solr.spiderips.urls</screen>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="right">Informational Note:</entry>
|
||||
<entry>If no other language is explicitly stated in the <literal>inputforms.xml</literal>, the default language will be attributed to the metadata values.</entry>
|
||||
<entry>If no other language is explicitly stated in the <literal>input-forms.xml</literal>, the default language will be attributed to the metadata values.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
@@ -1943,7 +1943,7 @@ assetstore.dir.2 = /third/assetstore</screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>Should the be any conflict, like '2' referring to a local directory and to a set of SRB parameters, the program will select the local directory.</para>
|
||||
<para>If SRB is chosen from the first install of DSpace, it is suggested that 'assetstore.dir' (no integer appended) be retained to reference a local directory (as above under File Storage) because build.xml uses this value to do a mkdir. In this case, 'assetstore.incoming' can be set to 1 (i.e. uncomment the line in File Storage above) and the 'assetstore.dir' will not be used.</para>
|
||||
<para>If SRB is chosen from the first install of DSpace, it is suggested that 'assetstore.dir' (no integer appended) be retained to reference a local directory (as above under File Storage) because build.xml uses this value to do a <literal>mkdir</literal>. In this case, 'assetstore.incoming' can be set to 1 (i.e. uncomment the line in File Storage above) and the 'assetstore.dir' will not be used.</para>
|
||||
</section>
|
||||
<section remap="h3">
|
||||
<title><anchor id="docbook-configure.html-logging" xreflabel="Logging"/>Logging Configuration</title>
|
||||
@@ -4039,7 +4039,7 @@ Community|Collection|Item|Bundle+Add|Create|Modify|Modify_Metadata|Delete|Remove
|
||||
</section>
|
||||
<section remap="h3">
|
||||
<title><anchor id="docbook-configure.htmtl-embargo" xreflabel="Embargo"/>Embargo</title>
|
||||
<para>New in DSpace 1.6 is a feature to impose Embargos on thesis and dissertations.</para>
|
||||
<para>DSpace embargoes utilize standard metadata fields to hold both the 'terms' and the 'lift date'. Which fields you use are configurable, and no specific metadata element is dedicated or predefined for use in embargo. Rather, you specify exactly what field you want the embargo system to examine when it needs to find the terms or assign the lift date.</para>
|
||||
<informaltable>
|
||||
<?dbhtml table-width="100%"?>
|
||||
<?dbfo table-width="100%"?>
|
||||
@@ -4136,6 +4136,158 @@ Community|Collection|Item|Bundle+Add|Create|Modify|Modify_Metadata|Delete|Remove
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>Key Recommendations:</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para> If using existing metadata fields, avoid any that are automatically managed by DSpace. For example, fields like '<literal>date.issued</literal>' or '<literal>date.accessioned</literal>' are normally automatically assigned, and thus must not be recruited for embargo use.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Do not place the field for '<literal>lift date</literal>' in submission screens. This can potentially confuse submitters because they may feel that they can directly assign values to it. As noted in the life-cycle above, this is erroneous: the lift date gets assigned by the embargo system based on the terms. Any pre-existing value will be over-written. But see next recommendation for an exception.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>As the life-cycle discussion above makes clear, after the terms are applied, that field is no longer actionable in the embargo system. Conversely, the 'lift date' field is not actionable *until* the application. Thus you may want to consider configuring both the 'terms' and 'lift date' to use the same metadata field. In this way, during workflow you would see only the terms, and after item installation, only the lift date. If you wish the metadata to retain the terms for any reason, use two distinct fields instead.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
<section>
|
||||
<title>Detailed Operation</title>
|
||||
<para>After the fields defined for terms and lift date have been assigned in <literal>dspace.cfg</literal>, and created and configured wherever they will be used, you can begin to embargo items simply by entering data (dates, if using the default setter) in the terms field. They will automatically be embargoed as they exit workflow. For the embargo to be lifted on any item, however, a new administrative procedure must be added: the 'embargo lifter' must be invoked on a regular basis. This task examines all embargoed items, and if their 'lift date' has passed, it removes the access restrictions on the item. Good practice dictates automating this procedure using cron jobs or the like, rather than manually running it. The lifter is available as a target of the 1.6 DSpace launcher: see Section 8.</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Extending Embargo Functionality</title>
|
||||
<para>The 1.6 Embargo system supplies a default 'interpreter/imposition' class (the 'Setter') as well as a 'Lifter', but they are fairly rudimentary in several aspects.</para>
|
||||
<orderedlist numeration="upperalpha">
|
||||
<listitem>
|
||||
<para>Setter.</para>
|
||||
<para>The default setter recognizes only two expressions of terms: either a literal, non-relative date in the fixed format 'yyyy-mm-dd' (known as ISO 8601), or a special string used for open-ended embargo (the default configured value for this is 'forever', but this can be changed in dspace.cfg to 'toujours', 'unendlich', etc). It will perform a minimal sanity check that the date is not in the past. Similarly, the default setter will only remove all read policies as noted above, rather than applying more nuanced rules (e.g allow access to certain IP groups, deny the rest). Fortunately, the setter class itself is configurable and you can 'plug in' any behavior you like, provided it is written in java and conforms to the setter interface. The dspace.cfg property:</para>
|
||||
<screen># implementation of embargo setter plugin - replace with local implementation if applicable
|
||||
plugin.single.org.dspace.embargo.EmbargoSetter = org.dspace.embargo.DefaultEmbargoSetter</screen>
|
||||
<para>controls which setter to use.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Lifter.</para>
|
||||
<para>The default lifter behavior as described above—essentially applying the collection policy rules to the item—might also not be sufficient for all purposes. It also can be replaced with another class:</para>
|
||||
<screen># implementation of embargo lifter plugin--replace with local implementation if applicable
|
||||
plugin.single.org.dspace.embargo.EmbargoLifter = org.dspace.embargo.DefaultEmbargoLifter</screen>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
<section>
|
||||
<title>Step-by-Step Setup Examples</title>
|
||||
<orderedlist numeration="upperalpha">
|
||||
<listitem>
|
||||
<para>Simple Dates.</para>
|
||||
<para>If you want to enter simple calendar dates for when an embargo will expire, follow these steps.</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Select a metadata field. Let's use <literal>dc.description.embargo</literal>. This field does not exist in in the default DSpace metadata directory, so login as an administrator, go the metadata registry page, select the 'dc' schema, then add the metadata field.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Expose the metadata field. Edit <literal>[dspace]/config/input-forms.xml</literal> . If you have only one form—usually 'traditional', add it there. If you have multiple forms, add it only to the forms linked to collections for which embargo applies:</para>
|
||||
<screen><form name="traditional">
|
||||
<page number="1">
|
||||
…
|
||||
<field>
|
||||
<dc-schema>dc</dc-schema>
|
||||
<dc-element>description</dc-element>
|
||||
<dc-qualifier>embargo</dc-qualifier>
|
||||
<repeatable>false</repeatable>
|
||||
<label>Embargo Date</label>
|
||||
<input-type>onebox</input-type>
|
||||
<hint>If required, enter date 'yyyy-mm-dd' when embargo expires or 'forever'.</hint>
|
||||
<required></required>
|
||||
</field>
|
||||
</screen>
|
||||
<para>Note: if you want to require embargo terms for every item, put a phrase in the <required> element. Example:</para>
|
||||
<para><literal><required>You must enter an embargo date</required></literal></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Configure Embargo. Edit <literal>[dspace]/config/dspace.cfg</literal>. Find the Embargo properties and set these two:</para>
|
||||
<screen># DC metadata field to hold the user-supplied embargo terms
|
||||
embargo.field.terms = dc.description.embargo
|
||||
|
||||
# DC metadata field to hold computed "lift date" of embargo
|
||||
embargo.field.lift = dc.description.embargo</screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Restart DSpace application. This will pick up these changes. Now just enter future dates (if applicable) in web submission and the items will be placed under embargo. You can enter years ('2020'), years and months ('2020-12'), or also days ('2020-12-15'). </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Periodically run the lifter. Run the task:</para>
|
||||
<para><literal>[dspace]/bin/dspace embargo-lifter</literal></para>
|
||||
<para>You will want to run this task in a cron-scheduled or other repeating way. Item embargoes will be lifted as their dates pass.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Period Sets.</para>
|
||||
<para>If you wish to use a fixed set of time periods (e.g. 90 days, 6 months and 1 year) as embargo terms, follow these steps, which involve using a custom 'setter'.</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Select two metadata fields. Let's use '<literal>dc.embargo.terms</literal>' and '<literal>dc.embargo.lift</literal>'. These fields do not exist in the default DSpace metadata registry. Login as an administrator, go the metadata registry page, select the 'dc' schema, then add the metadata fields.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Expose the 'term' metadata field. The lift field will be assigned by the embargo system, so it should not be exposed directly. Edit <literal>[dspace]/config/input-forms.xml</literal> . If you have only one form (usually 'traditional') add it there. If you have multiple forms, add it only to the form(s) linked to collection(s) for which embargo applies. First, add the new field to the 'form definition':</para>
|
||||
<screen><form name="traditional">
|
||||
<page number="1">
|
||||
…
|
||||
<field>
|
||||
<dc-schema>dc</dc-schema>
|
||||
<dc-element>embargo</dc-element>
|
||||
<dc-qualifier>terms</dc-qualifier>
|
||||
<repeatable>false</repeatable>
|
||||
<label>Embargo Terms</label>
|
||||
<input-type value-pairs-name="embargo_terms">dropdown</input-type>
|
||||
<hint>If required, select embargo terms.</hint>
|
||||
<required></required>
|
||||
</field></screen>
|
||||
<para>Note: If you want to require embargo terms for every item, put a phrase in the <literal><required></literal> element, e.g.</para>
|
||||
<para><literal><required>You must select embargo terms</required></literal></para>
|
||||
<para>Observe that we have referenced a new value-pair list: "embargo_terms'. We must now define that as well (only once even if references by multiple forms):</para>
|
||||
<screen><form-value-pairs>
|
||||
…
|
||||
<value-pairs value-pairs-name="embargo_terms" dc-term="embargo.terms">
|
||||
<pair>
|
||||
<displayed-value>90 days</displayed-value>
|
||||
<stored-value>90 days</stored-value>
|
||||
</pair>
|
||||
<pair>
|
||||
<displayed-value>6 months</displayed-value>
|
||||
<stored-value>6 months</stored-value>
|
||||
</pair>
|
||||
<pair>
|
||||
<displayed-value>1 year</displayed-value>
|
||||
<stored-value>1 year</stored-value>
|
||||
</pair>
|
||||
</value-pairs>
|
||||
</screen>
|
||||
<para>Note: if desired, you could localize the language of the displayed value.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Configure Embargo. Edit /dspace/config/dspace.cfg. Find the Embargo properties and set the following properties:</para>
|
||||
<screen> # DC metadata field to hold the user-supplied embargo terms
|
||||
embargo.field.terms = dc.embargo.terms
|
||||
|
||||
# DC metadata field to hold computed "lift date" of embargo
|
||||
embargo.field.lift = dc.embargo.lift
|
||||
|
||||
# implementation of embargo setter plugin - replace with local implementation if applicable
|
||||
plugin.single.org.dspace.embargo.EmbargoSetter = org.dspace.embargo.DayTableEmbargoSetter</screen>
|
||||
<para>Now add a new property called '<literal>embargo.terms.days</literal>' as follows:</para>
|
||||
<screen> # DC metadata field to hold computed "lift date" of embargo
|
||||
embargo.terms.days = 90 days:90, 6 months:180, 1 year:365</screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>This step is the same as Step A.4 above, except that instead of entering a date, the submitter will select a value form a drop-down list.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Periodically run the lifter. Run the task:</para>
|
||||
<para><literal>[dspace]/bin/dspace embargo-lifter</literal></para>
|
||||
<para>You will want to run this task in a cron-scheduled or other repeating way. Item embargoes will be lifted as their dates pass.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
</section>
|
||||
<section remap="h3">
|
||||
<title><anchor id="docbook-configure.html-checksum" xreflabel="Checksum Checker Settings"/>Checksum Checker Settings</title>
|
||||
@@ -7227,7 +7379,7 @@ webui.itemlist.<sort or index name>.columns</screen>
|
||||
<row>
|
||||
<entry align="right">Informational Note:</entry>
|
||||
<entry>If you would like to use Google analytics to track general website statistics then use the following parameter to provide your analytics key. First sign up for an account at <ulink url="http://analytics.google.com"
|
||||
>http://analytics.google.com</ulink>, then create an entry for your repositories website. Google Analytics will give you a snipit of javascript code to place on your site, inside that snip it is your google analytics key usually found in the line: _uacct = "UA-XXXXXXX-X" Take this key (just the UA-XXXXXX-X part) and place it here in this parameter.</entry>
|
||||
>http://analytics.google.com</ulink>, then create an entry for your repositories website. Google Analytics will give you a snippet of javascript code to place on your site, inside that snip it is your google analytics key usually found in the line: _uacct = "UA-XXXXXXX-X" Take this key (just the UA-XXXXXX-X part) and place it here in this parameter.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<?dbfo row-height="5mm"?>
|
||||
@@ -7784,7 +7936,7 @@ hdl.handle.net, handle.test.edu</screen>
|
||||
</section>
|
||||
<section remap="h4">
|
||||
<title>Bitstream Format Registry</title>
|
||||
<para>The bitstream formats recognized by the system and levels of support are similarly stored in the bitstream format registry. This can also be edited at install-time via <literal>[dspace]/config/registries/bitstream-formats.xml</literal> or by the administation Web UI. The contents of the bitstream format registry are entirely up to you, though the system requires that the following two formats are present:</para>
|
||||
<para>The bitstream formats recognized by the system and levels of support are similarly stored in the bitstream format registry. This can also be edited at install-time via <literal>[dspace]/config/registries/bitstream-formats.xml</literal> or by the administration Web UI. The contents of the bitstream format registry are entirely up to you, though the system requires that the following two formats are present:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
@@ -8315,7 +8467,7 @@ sword.accept-packaging.[handle].METSDSpaceSIP.q = 1.0</screen>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="right">Informational Note:</entry>
|
||||
<entry>Should the server identify the sword version in a deposti response. It is recommended to leave this unchanged.</entry>
|
||||
<entry>Should the server identify the sword version in a deposit response. It is recommended to leave this unchanged.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<?dbfo row-height="5mm"?>
|
||||
@@ -8332,7 +8484,7 @@ sword.accept-packaging.[handle].METSDSpaceSIP.q = 1.0</screen>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="right">Informational Note:</entry>
|
||||
<entry>Should mediated deposit via sowrd be supported. If enabled, this will allow users to deposit content packages on behalf of other users.</entry>
|
||||
<entry>Should mediated deposit via sword be supported. If enabled, this will allow users to deposit content packages on behalf of other users.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<?dbfo row-height="5mm"?>
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user