mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
[DS-707] Various typo fixes, including a bug in bitstream handling over the bundle THUMBNAIL (THUMBMNAIL)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5461 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -93,7 +93,7 @@ public class CreateAdministrator
|
|||||||
|
|
||||||
options.addOption("e", "email", true, "administrator email address");
|
options.addOption("e", "email", true, "administrator email address");
|
||||||
options.addOption("f", "first", true, "administrator first name");
|
options.addOption("f", "first", true, "administrator first name");
|
||||||
options.addOption("l", "last", true, "administrator lastt name");
|
options.addOption("l", "last", true, "administrator last name");
|
||||||
options.addOption("c", "language", true, "administrator language");
|
options.addOption("c", "language", true, "administrator language");
|
||||||
options.addOption("p", "password", true, "administrator password");
|
options.addOption("p", "password", true, "administrator password");
|
||||||
|
|
||||||
|
@@ -92,7 +92,7 @@ public class MetadataExporter
|
|||||||
xmlSerializer.startDocument();
|
xmlSerializer.startDocument();
|
||||||
xmlSerializer.startElement("dspace-dc-types", null);
|
xmlSerializer.startElement("dspace-dc-types", null);
|
||||||
|
|
||||||
// Save the schema defintion(s)
|
// Save the schema definition(s)
|
||||||
saveSchema(context, xmlSerializer, schema);
|
saveSchema(context, xmlSerializer, schema);
|
||||||
|
|
||||||
MetadataField[] mdFields = null;
|
MetadataField[] mdFields = null;
|
||||||
|
@@ -224,7 +224,7 @@ public class MetadataImporter
|
|||||||
System.out.println("xml: " + namespace);
|
System.out.println("xml: " + namespace);
|
||||||
System.out.println("aborting - use -u to force the update");
|
System.out.println("aborting - use -u to force the update");
|
||||||
|
|
||||||
throw new RegistryImportException("schema already registerd with different namespace - use -u to update");
|
throw new RegistryImportException("schema already registered with different namespace - use -u to update");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -269,7 +269,7 @@ public class RegistryLoader
|
|||||||
String shortname = getElementData(node, "name");
|
String shortname = getElementData(node, "name");
|
||||||
String namespace = getElementData(node, "namespace");
|
String namespace = getElementData(node, "namespace");
|
||||||
|
|
||||||
// Check if the schema exists allready
|
// Check if the schema exists already
|
||||||
MetadataSchema schema = MetadataSchema.find(context, shortname);
|
MetadataSchema schema = MetadataSchema.find(context, shortname);
|
||||||
if (schema == null)
|
if (schema == null)
|
||||||
{
|
{
|
||||||
|
@@ -213,7 +213,7 @@ public class StructBuilder
|
|||||||
private static void usage()
|
private static void usage()
|
||||||
{
|
{
|
||||||
System.out.println("Usage: java StructBuilder -f <source XML file> -o <output file> -e <eperson email>");
|
System.out.println("Usage: java StructBuilder -f <source XML file> -o <output file> -e <eperson email>");
|
||||||
System.out.println("Communitities will be created from the top level, and a map of communities to handles will be returned in the output file");
|
System.out.println("Communities will be created from the top level, and a map of communities to handles will be returned in the output file");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ public class StructBuilder
|
|||||||
* to the relevant methods in this class for sub-communities and collections
|
* to the relevant methods in this class for sub-communities and collections
|
||||||
*
|
*
|
||||||
* @param context the context of the request
|
* @param context the context of the request
|
||||||
* @param communities a nodelist of communities to create along with their subjstructures
|
* @param communities a nodelist of communities to create along with their sub-structures
|
||||||
* @param parent the parent community of the nodelist of communities to create
|
* @param parent the parent community of the nodelist of communities to create
|
||||||
*
|
*
|
||||||
* @return an element array containing additional information regarding the
|
* @return an element array containing additional information regarding the
|
||||||
|
@@ -60,7 +60,7 @@ public class BulkEditChange
|
|||||||
/** The ArrayList of hashtables with the removed elements */
|
/** The ArrayList of hashtables with the removed elements */
|
||||||
private ArrayList<DCValue> removes;
|
private ArrayList<DCValue> removes;
|
||||||
|
|
||||||
/** The ArrayList of hashtablles with the unchanged elements */
|
/** The ArrayList of hashtables with the unchanged elements */
|
||||||
private ArrayList<DCValue> constant;
|
private ArrayList<DCValue> constant;
|
||||||
|
|
||||||
/** The ArrayList of the complete set of new values (constant + adds) */
|
/** The ArrayList of the complete set of new values (constant + adds) */
|
||||||
@@ -86,7 +86,7 @@ public class BulkEditChange
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initalise a change holder for a new item
|
* Initialise a change holder for a new item
|
||||||
*/
|
*/
|
||||||
public BulkEditChange()
|
public BulkEditChange()
|
||||||
{
|
{
|
||||||
@@ -107,7 +107,7 @@ public class BulkEditChange
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initalise a new change holder for an existing item
|
* Initialise a new change holder for an existing item
|
||||||
*
|
*
|
||||||
* @param i The Item to store
|
* @param i The Item to store
|
||||||
*/
|
*/
|
||||||
@@ -118,7 +118,7 @@ public class BulkEditChange
|
|||||||
newItem = false;
|
newItem = false;
|
||||||
empty = true;
|
empty = true;
|
||||||
|
|
||||||
// Initalise the arrays
|
// Initialise the arrays
|
||||||
adds = new ArrayList<DCValue>();
|
adds = new ArrayList<DCValue>();
|
||||||
removes = new ArrayList<DCValue>();
|
removes = new ArrayList<DCValue>();
|
||||||
constant = new ArrayList<DCValue>();
|
constant = new ArrayList<DCValue>();
|
||||||
|
@@ -68,7 +68,7 @@ public class DSpaceCSV
|
|||||||
protected static String valueSeparator;
|
protected static String valueSeparator;
|
||||||
|
|
||||||
/** The value separator in an escaped form for using in regexs */
|
/** The value separator in an escaped form for using in regexs */
|
||||||
protected static String escpaedValueSeparator;
|
protected static String escapedValueSeparator;
|
||||||
|
|
||||||
/** The field separator (defaults to comma) */
|
/** The field separator (defaults to comma) */
|
||||||
protected static String fieldSeparator;
|
protected static String fieldSeparator;
|
||||||
@@ -90,10 +90,10 @@ public class DSpaceCSV
|
|||||||
*/
|
*/
|
||||||
public DSpaceCSV(boolean exportAll)
|
public DSpaceCSV(boolean exportAll)
|
||||||
{
|
{
|
||||||
// Initalise the class
|
// Initialise the class
|
||||||
init();
|
init();
|
||||||
|
|
||||||
// Stoee the exportAll setting
|
// Store the exportAll setting
|
||||||
this.exportAll = exportAll;
|
this.exportAll = exportAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ public class DSpaceCSV
|
|||||||
*/
|
*/
|
||||||
public DSpaceCSV(File f, Context c) throws Exception
|
public DSpaceCSV(File f, Context c) throws Exception
|
||||||
{
|
{
|
||||||
// Initalise the class
|
// Initialise the class
|
||||||
init();
|
init();
|
||||||
|
|
||||||
// Open the CSV file
|
// Open the CSV file
|
||||||
@@ -177,7 +177,7 @@ public class DSpaceCSV
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initalise this class with values from dspace.cfg
|
* Initialise this class with values from dspace.cfg
|
||||||
*/
|
*/
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
@@ -193,7 +193,7 @@ public class DSpaceCSV
|
|||||||
// Create the blank list of items
|
// Create the blank list of items
|
||||||
lines = new ArrayList<DSpaceCSVLine>();
|
lines = new ArrayList<DSpaceCSVLine>();
|
||||||
|
|
||||||
// Initalise the counter
|
// Initialise the counter
|
||||||
counter = 0;
|
counter = 0;
|
||||||
|
|
||||||
// Set the metadata fields to ignore
|
// Set the metadata fields to ignore
|
||||||
@@ -238,7 +238,7 @@ public class DSpaceCSV
|
|||||||
// Now store the escaped version
|
// Now store the escaped version
|
||||||
Pattern spchars = Pattern.compile("([\\\\*+\\[\\](){}\\$.?\\^|])");
|
Pattern spchars = Pattern.compile("([\\\\*+\\[\\](){}\\$.?\\^|])");
|
||||||
Matcher match = spchars.matcher(valueSeparator);
|
Matcher match = spchars.matcher(valueSeparator);
|
||||||
escpaedValueSeparator = match.replaceAll("\\\\$1");
|
escapedValueSeparator = match.replaceAll("\\\\$1");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -454,7 +454,7 @@ public class DSpaceCSV
|
|||||||
|
|
||||||
// Make sure we register that this column was there
|
// Make sure we register that this column was there
|
||||||
csvLine.add(headings.get(i - 1), null);
|
csvLine.add(headings.get(i - 1), null);
|
||||||
String[] elements = part.split(escpaedValueSeparator);
|
String[] elements = part.split(escapedValueSeparator);
|
||||||
for (String element : elements)
|
for (String element : elements)
|
||||||
{
|
{
|
||||||
if ((element != null) && (!"".equals(element)))
|
if ((element != null) && (!"".equals(element)))
|
||||||
|
@@ -63,7 +63,7 @@ public class DSpaceCSVLine
|
|||||||
*/
|
*/
|
||||||
public DSpaceCSVLine(int id)
|
public DSpaceCSVLine(int id)
|
||||||
{
|
{
|
||||||
// Store the ID + separator, and initalise the hashtable
|
// Store the ID + separator, and initialise the hashtable
|
||||||
this.id = id;
|
this.id = id;
|
||||||
items = new Hashtable<String, ArrayList>();
|
items = new Hashtable<String, ArrayList>();
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,7 @@ public class DSpaceCSVLine
|
|||||||
*/
|
*/
|
||||||
public DSpaceCSVLine()
|
public DSpaceCSVLine()
|
||||||
{
|
{
|
||||||
// Set the ID to be -1, and initalise the hashtable
|
// Set the ID to be -1, and initialise the hashtable
|
||||||
this.id = -1;
|
this.id = -1;
|
||||||
this.items = new Hashtable<String, ArrayList>();
|
this.items = new Hashtable<String, ArrayList>();
|
||||||
}
|
}
|
||||||
|
@@ -290,7 +290,7 @@ public class MetadataExport
|
|||||||
// Save the files to the file
|
// Save the files to the file
|
||||||
csv.save(filename);
|
csv.save(filename);
|
||||||
|
|
||||||
// Finsh off and tidy up
|
// Finish off and tidy up
|
||||||
c.restoreAuthSystemState();
|
c.restoreAuthSystemState();
|
||||||
c.complete();
|
c.complete();
|
||||||
}
|
}
|
||||||
|
@@ -103,7 +103,7 @@ public class MetadataImportInvalidHeadingException extends Exception
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "Unknown metadata elemnt in heading: " + badHeading;
|
return "Unknown metadata element in heading: " + badHeading;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -120,7 +120,7 @@ public class Harvest
|
|||||||
Options options = new Options();
|
Options options = new Options();
|
||||||
|
|
||||||
options.addOption("p", "purge", false, "delete all items in the collection");
|
options.addOption("p", "purge", false, "delete all items in the collection");
|
||||||
options.addOption("r", "run", false, "run the standrad harvest procedure");
|
options.addOption("r", "run", false, "run the standard harvest procedure");
|
||||||
options.addOption("g", "ping", false, "test the OAI server and set");
|
options.addOption("g", "ping", false, "test the OAI server and set");
|
||||||
options.addOption("o", "once", false, "run the harvest procedure with specified parameters");
|
options.addOption("o", "once", false, "run the harvest procedure with specified parameters");
|
||||||
options.addOption("s", "setup", false, "Set the collection up for harvesting");
|
options.addOption("s", "setup", false, "Set the collection up for harvesting");
|
||||||
@@ -429,7 +429,7 @@ public class Harvest
|
|||||||
* @param email
|
* @param email
|
||||||
*/
|
*/
|
||||||
private void purgeCollection(String collectionID, String email) {
|
private void purgeCollection(String collectionID, String email) {
|
||||||
System.out.println("Purging collection of all items and reseting last_harvested and harvest_message: " + collectionID);
|
System.out.println("Purging collection of all items and resetting last_harvested and harvest_message: " + collectionID);
|
||||||
Collection collection = resolveCollection(collectionID);
|
Collection collection = resolveCollection(collectionID);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@@ -210,7 +210,7 @@ public class AddBitstreamsAction extends UpdateBitstreamsAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alterProvenance && !targetBundle.getName().equals("THUMBMNAIL")
|
if (alterProvenance && !targetBundle.getName().equals("THUMBNAIL")
|
||||||
&& !targetBundle.getName().equals("TEXT"))
|
&& !targetBundle.getName().equals("TEXT"))
|
||||||
{
|
{
|
||||||
DtoMetadata dtom = DtoMetadata.create("dc.description.provenance", "en", "");
|
DtoMetadata dtom = DtoMetadata.create("dc.description.provenance", "en", "");
|
||||||
|
@@ -124,7 +124,7 @@ public class DeleteBitstreamsByFilterAction extends UpdateBitstreamsAction {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//provenance is not maintained for derivative bitstreams
|
//provenance is not maintained for derivative bitstreams
|
||||||
if (!bundleName.equals("THUMBMNAIL") && !bundleName.equals("TEXT"))
|
if (!bundleName.equals("THUMBNAIL") && !bundleName.equals("TEXT"))
|
||||||
{
|
{
|
||||||
deleted.add(bs.getName());
|
deleted.add(bs.getName());
|
||||||
}
|
}
|
||||||
|
@@ -148,8 +148,8 @@ public class ItemUpdate {
|
|||||||
|
|
||||||
Options options = new Options();
|
Options options = new Options();
|
||||||
|
|
||||||
//processing basis for detemining items
|
//processing basis for determining items
|
||||||
//item-specific changes with metadata in source directory with dublic_core.xml files
|
//item-specific changes with metadata in source directory with dublin_core.xml files
|
||||||
options.addOption("s", "source", true, "root directory of source dspace archive ");
|
options.addOption("s", "source", true, "root directory of source dspace archive ");
|
||||||
|
|
||||||
//actions on items
|
//actions on items
|
||||||
|
@@ -74,7 +74,7 @@ public class ScriptLauncher
|
|||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initalise the service manager kernel
|
// Initialise the service manager kernel
|
||||||
try {
|
try {
|
||||||
kernelImpl = DSpaceKernelInit.getKernel(null);
|
kernelImpl = DSpaceKernelInit.getKernel(null);
|
||||||
if (!kernelImpl.isRunning())
|
if (!kernelImpl.isRunning())
|
||||||
|
@@ -124,7 +124,7 @@ public interface Report
|
|||||||
*
|
*
|
||||||
* @param explanation the explanatory or clarification text for the stats
|
* @param explanation the explanatory or clarification text for the stats
|
||||||
*
|
*
|
||||||
* @return a string contianing the formatted explanation
|
* @return a string containing the formatted explanation
|
||||||
*/
|
*/
|
||||||
abstract public String blockExplanation(String explanation);
|
abstract public String blockExplanation(String explanation);
|
||||||
|
|
||||||
|
@@ -200,7 +200,7 @@ public class StatisticsLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Syncronize the cached list of analysis / report files with the reports directory
|
* Synchronize the cached list of analysis / report files with the reports directory
|
||||||
*
|
*
|
||||||
* We synchronize if:
|
* We synchronize if:
|
||||||
*
|
*
|
||||||
@@ -233,7 +233,7 @@ public class StatisticsLoader
|
|||||||
fileList = StatisticsLoader.getAnalysisAndReportFileList();
|
fileList = StatisticsLoader.getAnalysisAndReportFileList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new maps for the monthly analyis / reports
|
// Create new maps for the monthly analysis / reports
|
||||||
Map<String, StatsFile> newMonthlyAnalysis = new HashMap<String, StatsFile>();
|
Map<String, StatsFile> newMonthlyAnalysis = new HashMap<String, StatsFile>();
|
||||||
Map<String, StatsFile> newMonthlyReports = new HashMap<String, StatsFile>();
|
Map<String, StatsFile> newMonthlyReports = new HashMap<String, StatsFile>();
|
||||||
|
|
||||||
|
@@ -116,7 +116,7 @@ public class DCInputsReader
|
|||||||
private HashMap formFileUploadDefns = null;
|
private HashMap formFileUploadDefns = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the value-pairs map, computed from the forms defition file
|
* Reference to the value-pairs map, computed from the forms definition file
|
||||||
*/
|
*/
|
||||||
private HashMap valuePairs = null; // Holds display/storage pairs
|
private HashMap valuePairs = null; // Holds display/storage pairs
|
||||||
|
|
||||||
|
@@ -105,7 +105,7 @@ public class DSpaceContextListener implements ServletContextListener
|
|||||||
// first check the local per webapp parameter, then check the global parameter.
|
// first check the local per webapp parameter, then check the global parameter.
|
||||||
dspaceConfig = event.getServletContext().getInitParameter(DSPACE_CONFIG_PARAMETER);
|
dspaceConfig = event.getServletContext().getInitParameter(DSPACE_CONFIG_PARAMETER);
|
||||||
|
|
||||||
// Finaly, if no config parameter found throw an error
|
// Finally, if no config parameter found throw an error
|
||||||
if (dspaceConfig == null || "".equals(dspaceConfig))
|
if (dspaceConfig == null || "".equals(dspaceConfig))
|
||||||
{
|
{
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* DailyFileApender.java
|
* DailyFileAppender.java
|
||||||
*
|
*
|
||||||
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
|
* Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -219,7 +219,7 @@ public class DailyFileAppender extends FileAppender
|
|||||||
* Helpers
|
* Helpers
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* The helper function to vaildate the DatePattern.
|
* The helper function to validate the DatePattern.
|
||||||
* @param pstrPattern The DatePattern to be validated.
|
* @param pstrPattern The DatePattern to be validated.
|
||||||
* @return The validated date pattern or defautlt DATE_PATTERN
|
* @return The validated date pattern or defautlt DATE_PATTERN
|
||||||
*/
|
*/
|
||||||
|
@@ -55,7 +55,7 @@ import org.dspace.core.ConfigurationManager;
|
|||||||
/**
|
/**
|
||||||
* Item Submission configuration generator for DSpace. Reads and parses the
|
* Item Submission configuration generator for DSpace. Reads and parses the
|
||||||
* installed submission process configuration file, item-submission.xml, from
|
* installed submission process configuration file, item-submission.xml, from
|
||||||
* the configuration directory. This submission process definiton details the
|
* the configuration directory. This submission process definition details the
|
||||||
* ordering of the steps (and number of steps) that occur during the Item
|
* ordering of the steps (and number of steps) that occur during the Item
|
||||||
* Submission Process. There may be multiple Item Submission processes defined,
|
* Submission Process. There may be multiple Item Submission processes defined,
|
||||||
* where each definition is assigned a unique name.
|
* where each definition is assigned a unique name.
|
||||||
|
@@ -477,7 +477,7 @@ public class SubmissionInfo
|
|||||||
* @param subInfo
|
* @param subInfo
|
||||||
* the SubmissionInfo object we are loading into
|
* the SubmissionInfo object we are loading into
|
||||||
* @param forceReload
|
* @param forceReload
|
||||||
* If true, this method reloads from stratch (and overwrites
|
* If true, this method reloads from scratch (and overwrites
|
||||||
* cached progress bar info)
|
* cached progress bar info)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -618,7 +618,7 @@ public class SubmissionInfo
|
|||||||
* @param subInfo
|
* @param subInfo
|
||||||
* the SubmissionInfo object we are loading into
|
* the SubmissionInfo object we are loading into
|
||||||
* @param forceReload
|
* @param forceReload
|
||||||
* If true, this method reloads from stratch (and overwrites
|
* If true, this method reloads from scratch (and overwrites
|
||||||
* cached SubmissionConfig)
|
* cached SubmissionConfig)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -194,7 +194,7 @@ public class Util {
|
|||||||
*
|
*
|
||||||
* The numbers are formatted using java Locales
|
* The numbers are formatted using java Locales
|
||||||
*
|
*
|
||||||
* @param in The number to covnert
|
* @param in The number to convert
|
||||||
* @return the file size as a String
|
* @return the file size as a String
|
||||||
*/
|
*/
|
||||||
public static String formatFileSize(double in) {
|
public static String formatFileSize(double in) {
|
||||||
|
@@ -57,10 +57,10 @@ import org.dspace.eperson.Group;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This LDAP authentication method is more complex than the simple 'LDAPAuthentication'
|
* This LDAP authentication method is more complex than the simple 'LDAPAuthentication'
|
||||||
* in that it allows authentication against structured heirarchical LDAP trees of
|
* in that it allows authentication against structured hierarchical LDAP trees of
|
||||||
* users. An initial bind is required using a user name and password in order to
|
* users. An initial bind is required using a user name and password in order to
|
||||||
* searchthe tree and find the DN of the user. A second bind is then required to
|
* search the tree and find the DN of the user. A second bind is then required to
|
||||||
* chack the credentials of the user by binding directly to their DN.
|
* check the credentials of the user by binding directly to their DN.
|
||||||
*
|
*
|
||||||
* @author Stuart Lewis, Chris Yates, Alex Barbieri, Flavio Botelho, Reuben Pasquini
|
* @author Stuart Lewis, Chris Yates, Alex Barbieri, Flavio Botelho, Reuben Pasquini
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
@@ -126,7 +126,7 @@ public class BrowseConsumer implements Consumer
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log.debug("consume() ingnoring event: " + event.toString());
|
log.debug("consume() ignoring event: " + event.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -195,7 +195,7 @@ public interface BrowseCreateDAO
|
|||||||
* @return true if exists, false if not
|
* @return true if exists, false if not
|
||||||
* @throws BrowseException
|
* @throws BrowseException
|
||||||
*/
|
*/
|
||||||
public boolean testTableExistance(String table) throws BrowseException;
|
public boolean testTableExistence(String table) throws BrowseException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop the given table name, and all other resources that are attached to it. In normal
|
* Drop the given table name, and all other resources that are attached to it. In normal
|
||||||
@@ -365,7 +365,7 @@ public interface BrowseCreateDAO
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* So that any left over indices for items which have been deleted can be assured to have
|
* So that any left over indices for items which have been deleted can be assured to have
|
||||||
* been removed, this method checks for indicies for items which are not in the item table.
|
* been removed, this method checks for indices for items which are not in the item table.
|
||||||
* If it finds an index which does not have an associated item it removes it.
|
* If it finds an index which does not have an associated item it removes it.
|
||||||
*
|
*
|
||||||
* @param table the index table to check
|
* @param table the index table to check
|
||||||
|
@@ -824,9 +824,9 @@ public class BrowseCreateDAOOracle implements BrowseCreateDAO
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.dspace.browse.BrowseCreateDAO#testTableExistance(java.lang.String)
|
* @see org.dspace.browse.BrowseCreateDAO#testTableExistence(java.lang.String)
|
||||||
*/
|
*/
|
||||||
public boolean testTableExistance(String table) throws BrowseException
|
public boolean testTableExistence(String table) throws BrowseException
|
||||||
{
|
{
|
||||||
// this method can kill the db connection, so we start up
|
// this method can kill the db connection, so we start up
|
||||||
// our own private context to do it
|
// our own private context to do it
|
||||||
|
@@ -833,9 +833,9 @@ public class BrowseCreateDAOPostgres implements BrowseCreateDAO
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.dspace.browse.BrowseCreateDAO#testTableExistance(java.lang.String)
|
* @see org.dspace.browse.BrowseCreateDAO#testTableExistence(java.lang.String)
|
||||||
*/
|
*/
|
||||||
public boolean testTableExistance(String table)
|
public boolean testTableExistence(String table)
|
||||||
throws BrowseException
|
throws BrowseException
|
||||||
{
|
{
|
||||||
// this method can kill the db connection, so we start up
|
// this method can kill the db connection, so we start up
|
||||||
|
@@ -88,7 +88,7 @@ public interface BrowseDAO
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This executes a query which returns a List object containing BrowseItem objects
|
* This executes a query which returns a List object containing BrowseItem objects
|
||||||
* represening the results of a full item browse.
|
* representing the results of a full item browse.
|
||||||
*
|
*
|
||||||
* @return List of BrowseItem objects
|
* @return List of BrowseItem objects
|
||||||
* @throws BrowseException
|
* @throws BrowseException
|
||||||
|
@@ -783,7 +783,7 @@ public class BrowseDAOPostgres implements BrowseDAO
|
|||||||
buildSelectStatementDistinct(queryBuf, params);
|
buildSelectStatementDistinct(queryBuf, params);
|
||||||
buildWhereClauseOpReset();
|
buildWhereClauseOpReset();
|
||||||
|
|
||||||
// assemble the focus clase if we are to have one
|
// assemble the focus clause if we are to have one
|
||||||
// it will look like one of the following, for example
|
// it will look like one of the following, for example
|
||||||
// sort_value <= myvalue
|
// sort_value <= myvalue
|
||||||
// sort_1 >= myvalue
|
// sort_1 >= myvalue
|
||||||
@@ -824,7 +824,7 @@ public class BrowseDAOPostgres implements BrowseDAO
|
|||||||
buildSelectStatement(queryBuf, params);
|
buildSelectStatement(queryBuf, params);
|
||||||
buildWhereClauseOpReset();
|
buildWhereClauseOpReset();
|
||||||
|
|
||||||
// assemble the focus clase if we are to have one
|
// assemble the focus clause if we are to have one
|
||||||
// it will look like one of the following, for example
|
// it will look like one of the following, for example
|
||||||
// sort_value <= myvalue
|
// sort_value <= myvalue
|
||||||
// sort_1 >= myvalue
|
// sort_1 >= myvalue
|
||||||
@@ -1195,7 +1195,7 @@ public class BrowseDAOPostgres implements BrowseDAO
|
|||||||
// be matched using
|
// be matched using
|
||||||
String focusComparator = getFocusComparator();
|
String focusComparator = getFocusComparator();
|
||||||
|
|
||||||
// assemble the focus clase if we are to have one
|
// assemble the focus clause if we are to have one
|
||||||
// it will look like one of the following
|
// it will look like one of the following
|
||||||
// - sort_value <= myvalue
|
// - sort_value <= myvalue
|
||||||
// - sort_1 >= myvalue
|
// - sort_1 >= myvalue
|
||||||
|
@@ -161,7 +161,7 @@ public class BrowseEngine
|
|||||||
// tell the browse query whether we are ascending or descending on the value
|
// tell the browse query whether we are ascending or descending on the value
|
||||||
dao.setAscending(scope.isAscending());
|
dao.setAscending(scope.isAscending());
|
||||||
|
|
||||||
// define a clause for the WHERE clause which will allow us to constraine
|
// define a clause for the WHERE clause which will allow us to constrain
|
||||||
// our browse to a specified community or collection
|
// our browse to a specified community or collection
|
||||||
if (scope.inCollection() || scope.inCommunity())
|
if (scope.inCollection() || scope.inCommunity())
|
||||||
{
|
{
|
||||||
@@ -272,7 +272,7 @@ public class BrowseEngine
|
|||||||
browseIndex.getMapTableName());
|
browseIndex.getMapTableName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// define a clause for the WHERE clause which will allow us to constraine
|
// define a clause for the WHERE clause which will allow us to constrain
|
||||||
// our browse to a specified community or collection
|
// our browse to a specified community or collection
|
||||||
if (scope.inCollection() || scope.inCommunity())
|
if (scope.inCollection() || scope.inCommunity())
|
||||||
{
|
{
|
||||||
@@ -480,7 +480,7 @@ public class BrowseEngine
|
|||||||
// set the ordering field (there is only one option)
|
// set the ordering field (there is only one option)
|
||||||
dao.setOrderField("sort_value");
|
dao.setOrderField("sort_value");
|
||||||
|
|
||||||
// assemble the focus clase if we are to have one
|
// assemble the focus clause if we are to have one
|
||||||
// it will look like one of the following
|
// it will look like one of the following
|
||||||
// - sort_value < myvalue
|
// - sort_value < myvalue
|
||||||
// = sort_1 > myvalue
|
// = sort_1 > myvalue
|
||||||
|
@@ -539,7 +539,7 @@ public class BrowseIndex
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the name of the colum that is used to store the default value column
|
* Get the name of the column that is used to store the default value column
|
||||||
*
|
*
|
||||||
* @return the name of the value column
|
* @return the name of the value column
|
||||||
*/
|
*/
|
||||||
|
@@ -53,7 +53,7 @@ import org.dspace.sort.SortOption;
|
|||||||
/**
|
/**
|
||||||
* The results of a Browse, including all the contextual information about
|
* The results of a Browse, including all the contextual information about
|
||||||
* the query, as well as the results and associated information to create
|
* the query, as well as the results and associated information to create
|
||||||
* pagable navigation.
|
* pageable navigation.
|
||||||
*
|
*
|
||||||
* @author Richard Jones
|
* @author Richard Jones
|
||||||
*/
|
*/
|
||||||
@@ -725,7 +725,7 @@ public class BrowseInfo
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an integer representing the number within the total set of results which
|
* Get an integer representing the number within the total set of results which
|
||||||
* marks the poisition of the last result in the current sub-set
|
* marks the position of the last result in the current sub-set
|
||||||
*
|
*
|
||||||
* @return the end point of the browse page
|
* @return the end point of the browse page
|
||||||
*/
|
*/
|
||||||
|
@@ -175,7 +175,7 @@ public class BrowseItem extends DSpaceObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the type of object. This object masquerates as an Item, so this
|
* Get the type of object. This object masquerades as an Item, so this
|
||||||
* returns the value of Constants.ITEM
|
* returns the value of Constants.ITEM
|
||||||
*
|
*
|
||||||
*@return Constants.ITEM
|
*@return Constants.ITEM
|
||||||
@@ -227,7 +227,7 @@ public class BrowseItem extends DSpaceObject
|
|||||||
* method will return <code>true</code> if the given schema,
|
* method will return <code>true</code> if the given schema,
|
||||||
* element, qualifier and language match the schema, element,
|
* element, qualifier and language match the schema, element,
|
||||||
* qualifier and language of the <code>DCValue</code> object passed
|
* qualifier and language of the <code>DCValue</code> object passed
|
||||||
* in. Any or all of the elemenent, qualifier and language passed
|
* in. Any or all of the element, qualifier and language passed
|
||||||
* in can be the <code>Item.ANY</code> wildcard.
|
* in can be the <code>Item.ANY</code> wildcard.
|
||||||
*
|
*
|
||||||
* @param schema
|
* @param schema
|
||||||
|
@@ -838,7 +838,7 @@ public class IndexBrowse
|
|||||||
String distinctComViewName = BrowseIndex.getTableName(i, true, false, false, true);
|
String distinctComViewName = BrowseIndex.getTableName(i, true, false, false, true);
|
||||||
|
|
||||||
output.message("Checking for " + tableName);
|
output.message("Checking for " + tableName);
|
||||||
if (dao.testTableExistance(tableName))
|
if (dao.testTableExistence(tableName))
|
||||||
{
|
{
|
||||||
output.message("...found");
|
output.message("...found");
|
||||||
|
|
||||||
@@ -865,7 +865,7 @@ public class IndexBrowse
|
|||||||
// done. Therefore we use a blank context to make the requests,
|
// done. Therefore we use a blank context to make the requests,
|
||||||
// not caring if it gets aborted or not
|
// not caring if it gets aborted or not
|
||||||
output.message("Checking for " + distinctTableName);
|
output.message("Checking for " + distinctTableName);
|
||||||
if (!dao.testTableExistance(distinctTableName))
|
if (!dao.testTableExistence(distinctTableName))
|
||||||
{
|
{
|
||||||
if (i < bis.length || i < 10)
|
if (i < bis.length || i < 10)
|
||||||
{
|
{
|
||||||
@@ -927,7 +927,7 @@ public class IndexBrowse
|
|||||||
*/
|
*/
|
||||||
private void dropItemTables(BrowseIndex bix) throws BrowseException
|
private void dropItemTables(BrowseIndex bix) throws BrowseException
|
||||||
{
|
{
|
||||||
if (dao.testTableExistance(bix.getTableName()))
|
if (dao.testTableExistence(bix.getTableName()))
|
||||||
{
|
{
|
||||||
String tableName = bix.getTableName();
|
String tableName = bix.getTableName();
|
||||||
String dropper = dao.dropIndexAndRelated(tableName, this.execute());
|
String dropper = dao.dropIndexAndRelated(tableName, this.execute());
|
||||||
|
@@ -82,12 +82,12 @@ public class LocaleOrderingFilter implements TextFilter
|
|||||||
int element;
|
int element;
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuffer buf = new StringBuffer();
|
||||||
|
|
||||||
// Iterate throught the elements of the collator
|
// Iterate through the elements of the collator
|
||||||
CollationElementIterator iter = collator.getCollationElementIterator(str);
|
CollationElementIterator iter = collator.getCollationElementIterator(str);
|
||||||
|
|
||||||
while ((element = iter.next()) != CollationElementIterator.NULLORDER)
|
while ((element = iter.next()) != CollationElementIterator.NULLORDER)
|
||||||
{
|
{
|
||||||
// Generate a hexadecimal string representaion of the Collation element
|
// Generate a hexadecimal string representation of the Collation element
|
||||||
// This can then be compared in a text sort ;-)
|
// This can then be compared in a text sort ;-)
|
||||||
String test = Integer.toString(element, 16);
|
String test = Integer.toString(element, 16);
|
||||||
buf.append(test);
|
buf.append(test);
|
||||||
|
@@ -53,7 +53,7 @@ public final class BitstreamInfo
|
|||||||
private DSpaceBitstreamInfo dspaceBitstream;
|
private DSpaceBitstreamInfo dspaceBitstream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates the bitstream info (metdata) was found in the database.
|
* Indicates the bitstream info (metadata) was found in the database.
|
||||||
*
|
*
|
||||||
* @todo Is this actually used for anything?
|
* @todo Is this actually used for anything?
|
||||||
*/
|
*/
|
||||||
|
@@ -401,7 +401,7 @@ public final class CheckerCommand
|
|||||||
/**
|
/**
|
||||||
* Get the collector that holds/logs the results for this process run.
|
* Get the collector that holds/logs the results for this process run.
|
||||||
*
|
*
|
||||||
* @return The ChecksumResultsCollecter being used.
|
* @return The ChecksumResultsCollector being used.
|
||||||
*/
|
*/
|
||||||
public ChecksumResultsCollector getCollector()
|
public ChecksumResultsCollector getCollector()
|
||||||
{
|
{
|
||||||
|
@@ -63,7 +63,7 @@ import org.dspace.core.ConfigurationManager;
|
|||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* The email reporter creates and sends emails to an administrator. This only
|
* The email reporter creates and sends emails to an administrator. This only
|
||||||
* reports information for todays date. It is expected this will be used just
|
* reports information for today's date. It is expected this will be used just
|
||||||
* after the checksum checker has been run.
|
* after the checksum checker has been run.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
@@ -154,9 +154,9 @@ public class DailyReportEmailer
|
|||||||
* <dt>-m</dt>
|
* <dt>-m</dt>
|
||||||
* <dd>Bitstreams missing from assetstore</dd>
|
* <dd>Bitstreams missing from assetstore</dd>
|
||||||
* <dt>-c</dt>
|
* <dt>-c</dt>
|
||||||
* <dd>Bitstreams whoses checksums were changed</dd>
|
* <dd>Bitstreams whose checksums were changed</dd>
|
||||||
* <dt>-n</dt>
|
* <dt>-n</dt>
|
||||||
* <dd>Bitstreams whoses checksums were changed</dd>
|
* <dd>Bitstreams whose checksums were changed</dd>
|
||||||
* <dt>-a</dt>
|
* <dt>-a</dt>
|
||||||
* <dd>Send all reports in one email</dd>
|
* <dd>Send all reports in one email</dd>
|
||||||
* </dl>
|
* </dl>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
but it is also simple to get programmatic access to ChecksumChecker
|
but it is also simple to get programmatic access to ChecksumChecker
|
||||||
if you wish, via a {@link org.dspace.checker.CheckerCommand} object.</p>
|
if you wish, via a {@link org.dspace.checker.CheckerCommand} object.</p>
|
||||||
|
|
||||||
<p>CheckerCommand is a simple Command object. You initalize it with
|
<p>CheckerCommand is a simple Command object. You initialize it with
|
||||||
a strategy for iterating through bitstreams to check (an implementation of
|
a strategy for iterating through bitstreams to check (an implementation of
|
||||||
{@link org.dspace.checker.BitstreamDispatcher}), and a object to collect
|
{@link org.dspace.checker.BitstreamDispatcher}), and a object to collect
|
||||||
the results (an implementation of @link org.dspace.checker.ChecksumResultsCollector})
|
the results (an implementation of @link org.dspace.checker.ChecksumResultsCollector})
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<h2>BitstreamDispatcher</h2>
|
<h2>BitstreamDispatcher</h2>
|
||||||
<p>The order in which bitstreams are checked and when a checking run terminates
|
<p>The order in which bitstreams are checked and when a checking run terminates
|
||||||
is controlled by implementations of BitstreamDispatcher, and you can extend the
|
is controlled by implementations of BitstreamDispatcher, and you can extend the
|
||||||
functionality of the package by writing your own implementatio of this simple
|
functionality of the package by writing your own implementation of this simple
|
||||||
interface, although the package includes several useful implementations that will
|
interface, although the package includes several useful implementations that will
|
||||||
probably suffice in most cases: - </p>
|
probably suffice in most cases: - </p>
|
||||||
|
|
||||||
|
@@ -113,7 +113,7 @@ public class Bitstream extends DSpaceObject
|
|||||||
// Panic if we can't find it
|
// Panic if we can't find it
|
||||||
if (bitstreamFormat == null)
|
if (bitstreamFormat == null)
|
||||||
{
|
{
|
||||||
throw new IllegalStateException("No Unknown bitsream format");
|
throw new IllegalStateException("No Unknown bitstream format");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ public class LicenseUtils
|
|||||||
* LicenseArgumentFormatter plugin (if defined)<br>
|
* LicenseArgumentFormatter plugin (if defined)<br>
|
||||||
* {6} the eperson object that will be formatted using the appropriate
|
* {6} the eperson object that will be formatted using the appropriate
|
||||||
* LicenseArgumentFormatter plugin (if defined)<br>
|
* LicenseArgumentFormatter plugin (if defined)<br>
|
||||||
* {x} any addittion argument supplied wrapped in the
|
* {x} any addition argument supplied wrapped in the
|
||||||
* LicenseArgumentFormatter based on his type (map key)
|
* LicenseArgumentFormatter based on his type (map key)
|
||||||
*
|
*
|
||||||
* @see LicenseArgumentFormatter
|
* @see LicenseArgumentFormatter
|
||||||
|
@@ -758,7 +758,7 @@ public class ConfigurationManager
|
|||||||
* via classpath or system properties.
|
* via classpath or system properties.
|
||||||
*/
|
*/
|
||||||
info("Using default log4j provided log configuration," +
|
info("Using default log4j provided log configuration," +
|
||||||
"if uninitended, check your dspace.cfg for (log.init.config)");
|
"if unintended, check your dspace.cfg for (log.init.config)");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -93,7 +93,7 @@ public class LogManager
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If any string within the log line contains a field seperator (:) they need to be escaped so as the
|
* If any string within the log line contains a field separator (:) they need to be escaped so as the
|
||||||
* line may be parsed and analysed later. This method will escape a log field.
|
* line may be parsed and analysed later. This method will escape a log field.
|
||||||
*
|
*
|
||||||
* Single slashes and colons will be escaped so that colons no longer appear in the logs
|
* Single slashes and colons will be escaped so that colons no longer appear in the logs
|
||||||
|
@@ -275,7 +275,7 @@ public class Utils
|
|||||||
* Copy stream-data from source to destination, with buffering. This is
|
* Copy stream-data from source to destination, with buffering. This is
|
||||||
* equivalent to passing {@link #copy}a
|
* equivalent to passing {@link #copy}a
|
||||||
* <code>java.io.BufferedInputStream</code> and
|
* <code>java.io.BufferedInputStream</code> and
|
||||||
* <code>java.io.BufferedOuputStream</code> to {@link #copy}, and
|
* <code>java.io.BufferedOutputStream</code> to {@link #copy}, and
|
||||||
* flushing the output stream afterwards. The streams are not closed after
|
* flushing the output stream afterwards. The streams are not closed after
|
||||||
* the copy.
|
* the copy.
|
||||||
*
|
*
|
||||||
@@ -405,7 +405,7 @@ public class Utils
|
|||||||
else if (tzSign == '-' || tzSign == '+')
|
else if (tzSign == '-' || tzSign == '+')
|
||||||
s = s.substring(0, s.length()-6) + "GMT" + s.substring(s.length()-6);
|
s = s.substring(0, s.length()-6) + "GMT" + s.substring(s.length()-6);
|
||||||
|
|
||||||
// try to parse without millseconds
|
// try to parse without milliseconds
|
||||||
ParseException lastError = null;
|
ParseException lastError = null;
|
||||||
for (int i = 0; i < parseFmt.length; ++i)
|
for (int i = 0; i < parseFmt.length; ++i)
|
||||||
{
|
{
|
||||||
|
@@ -325,7 +325,7 @@ public class EmbargoManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
// lift or check embargo on one Item, handle exceptions
|
// lift or check embargo on one Item, handle exceptions
|
||||||
// return flase on success, true if there was fatal exception.
|
// return false on success, true if there was fatal exception.
|
||||||
private static boolean processOneItem(Context context, Item item, CommandLine line, Date now)
|
private static boolean processOneItem(Context context, Item item, CommandLine line, Date now)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@@ -91,7 +91,7 @@ public interface EmbargoSetter
|
|||||||
/**
|
/**
|
||||||
* Check that embargo is properly set on Item. For example: no read access
|
* Check that embargo is properly set on Item. For example: no read access
|
||||||
* to bitstreams. It is expected to report any noteworthy
|
* to bitstreams. It is expected to report any noteworthy
|
||||||
* discrepencies by writing on the stream System.err, although
|
* discrepancies by writing on the stream System.err, although
|
||||||
* logging is also encouraged. Only report conditions that
|
* logging is also encouraged. Only report conditions that
|
||||||
* constitute a risk of exposing Bitstreams that should be under
|
* constitute a risk of exposing Bitstreams that should be under
|
||||||
* embargo -- e.g. readable Bitstreams or ORIGINAL bundles. A
|
* embargo -- e.g. readable Bitstreams or ORIGINAL bundles. A
|
||||||
|
@@ -47,7 +47,7 @@ import org.dspace.search.DSIndexer;
|
|||||||
import org.dspace.browse.IndexBrowse;
|
import org.dspace.browse.IndexBrowse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A sciprt to update the handle values in the database. This is typically used
|
* A script to update the handle values in the database. This is typically used
|
||||||
* when moving from a test machine (handle = 123456789) to a production service.
|
* when moving from a test machine (handle = 123456789) to a production service.
|
||||||
*
|
*
|
||||||
* @author Stuart Lewis
|
* @author Stuart Lewis
|
||||||
|
@@ -64,7 +64,7 @@ public class HarvestConsumer implements Consumer
|
|||||||
private static Logger log = Logger.getLogger(HarvestConsumer.class);
|
private static Logger log = Logger.getLogger(HarvestConsumer.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initalise the consumer
|
* Initialise the consumer
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@@ -78,7 +78,6 @@ import org.dspace.content.MetadataField;
|
|||||||
import org.dspace.content.MetadataSchema;
|
import org.dspace.content.MetadataSchema;
|
||||||
import org.dspace.content.NonUniqueMetadataException;
|
import org.dspace.content.NonUniqueMetadataException;
|
||||||
import org.dspace.content.WorkspaceItem;
|
import org.dspace.content.WorkspaceItem;
|
||||||
import org.dspace.harvest.OAIHarvester.HarvestingException;
|
|
||||||
import org.dspace.content.crosswalk.CrosswalkException;
|
import org.dspace.content.crosswalk.CrosswalkException;
|
||||||
import org.dspace.content.crosswalk.IngestionCrosswalk;
|
import org.dspace.content.crosswalk.IngestionCrosswalk;
|
||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
@@ -105,7 +104,7 @@ import ORG.oclc.oai.harvester2.verb.ListSets;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class handles OAI harvesting of externaly located records into this repository.
|
* This class handles OAI harvesting of externally located records into this repository.
|
||||||
*
|
*
|
||||||
* @author Alexey Maslov
|
* @author Alexey Maslov
|
||||||
*/
|
*/
|
||||||
@@ -138,9 +137,9 @@ public class OAIHarvester {
|
|||||||
Context ourContext;
|
Context ourContext;
|
||||||
|
|
||||||
// Namespace used by the ORE serialization format
|
// Namespace used by the ORE serialization format
|
||||||
// Set in dspace.cfg as harvester.oai.oreSerializationFormat.{ORESeialKey} = {ORESeialNS}
|
// Set in dspace.cfg as harvester.oai.oreSerializationFormat.{ORESerialKey} = {ORESerialNS}
|
||||||
private Namespace ORESeialNS;
|
private Namespace ORESerialNS;
|
||||||
private String ORESeialKey;
|
private String ORESerialKey;
|
||||||
|
|
||||||
// Namespace of the descriptive metadata that should be harvested in addition to the ORE
|
// Namespace of the descriptive metadata that should be harvested in addition to the ORE
|
||||||
// Set in dspace.cfg as harvester.oai.metadataformats.{MetadataKey} = {MetadataNS},{Display Name}
|
// Set in dspace.cfg as harvester.oai.metadataformats.{MetadataKey} = {MetadataNS},{Display Name}
|
||||||
@@ -170,11 +169,11 @@ public class OAIHarvester {
|
|||||||
Namespace ORESerializationNamespace = OAIHarvester.getORENamespace();
|
Namespace ORESerializationNamespace = OAIHarvester.getORENamespace();
|
||||||
|
|
||||||
if (ORESerializationNamespace == null) {
|
if (ORESerializationNamespace == null) {
|
||||||
log.error("No ORE serialization namespace declared; see dspace.cfg option \"harvester.oai.oreSerializationFormat.{ORESeialKey} = {ORESeialNS}\"");
|
log.error("No ORE serialization namespace declared; see dspace.cfg option \"harvester.oai.oreSerializationFormat.{ORESerialKey} = {ORESerialNS}\"");
|
||||||
throw new HarvestingException("No ORE serialization namespace specified");
|
throw new HarvestingException("No ORE serialization namespace specified");
|
||||||
} else {
|
} else {
|
||||||
ORESeialNS = Namespace.getNamespace(ORESerializationNamespace.getURI());
|
ORESerialNS = Namespace.getNamespace(ORESerializationNamespace.getURI());
|
||||||
ORESeialKey = ORESerializationNamespace.getPrefix();
|
ORESerialKey = ORESerializationNamespace.getPrefix();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the metadata options
|
// Set the metadata options
|
||||||
@@ -285,7 +284,7 @@ public class OAIHarvester {
|
|||||||
toDate = toDate.substring(0, dateGranularity.length());
|
toDate = toDate.substring(0, dateGranularity.length());
|
||||||
|
|
||||||
descMDPrefix = OAIResolveNamespaceToPrefix(oaiSource, metadataNS.getURI());
|
descMDPrefix = OAIResolveNamespaceToPrefix(oaiSource, metadataNS.getURI());
|
||||||
OREPrefix = OAIResolveNamespaceToPrefix(oaiSource, ORESeialNS.getURI());
|
OREPrefix = OAIResolveNamespaceToPrefix(oaiSource, ORESerialNS.getURI());
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException fe) {
|
catch (FileNotFoundException fe) {
|
||||||
log.error("The OAI server did not respond.");
|
log.error("The OAI server did not respond.");
|
||||||
@@ -300,7 +299,7 @@ public class OAIHarvester {
|
|||||||
throw new HarvestingException("The OAI server does not support this metadata format: " + metadataNS.getURI());
|
throw new HarvestingException("The OAI server does not support this metadata format: " + metadataNS.getURI());
|
||||||
}
|
}
|
||||||
if (OREPrefix == null && harvestRow.getHarvestType() != HarvestedCollection.TYPE_DMD) {
|
if (OREPrefix == null && harvestRow.getHarvestType() != HarvestedCollection.TYPE_DMD) {
|
||||||
throw new HarvestingException("The OAI server does not support ORE dissemination in the configured serialization format: " + ORESeialNS.getURI());
|
throw new HarvestingException("The OAI server does not support ORE dissemination in the configured serialization format: " + ORESerialNS.getURI());
|
||||||
}
|
}
|
||||||
|
|
||||||
Document oaiResponse = null;
|
Document oaiResponse = null;
|
||||||
@@ -461,7 +460,7 @@ public class OAIHarvester {
|
|||||||
Element oreREM = null;
|
Element oreREM = null;
|
||||||
if (harvestRow.getHarvestType() > 1) {
|
if (harvestRow.getHarvestType() > 1) {
|
||||||
oreREM = getMDrecord(harvestRow.getOaiSource(), itemOaiID, OREPrefix).get(0);
|
oreREM = getMDrecord(harvestRow.getOaiSource(), itemOaiID, OREPrefix).get(0);
|
||||||
ORExwalk = (IngestionCrosswalk)PluginManager.getNamedPlugin(IngestionCrosswalk.class, this.ORESeialKey);
|
ORExwalk = (IngestionCrosswalk)PluginManager.getNamedPlugin(IngestionCrosswalk.class, this.ORESerialKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore authorization
|
// Ignore authorization
|
||||||
|
@@ -82,7 +82,7 @@ public abstract class AbstractTextFilterOFD implements OrderFormatDelegate
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare the appropriate sort string for the given value in the
|
* Prepare the appropriate sort string for the given value in the
|
||||||
* given language. Languate should be supplied with the ISO-6390-1
|
* given language. Language should be supplied with the ISO-6390-1
|
||||||
* or ISO-639-2 standards. For example "en" or "eng".
|
* or ISO-639-2 standards. For example "en" or "eng".
|
||||||
*
|
*
|
||||||
* @param value the string value
|
* @param value the string value
|
||||||
|
@@ -49,7 +49,7 @@ public interface OrderFormatDelegate
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Prepare the appropriate sort string for the given value in the
|
* Prepare the appropriate sort string for the given value in the
|
||||||
* given language. Languate should be supplied with the ISO-6390-1
|
* given language. Language should be supplied with the ISO-6390-1
|
||||||
* or ISO-639-2 standards. For example "en" or "eng".
|
* or ISO-639-2 standards. For example "en" or "eng".
|
||||||
*
|
*
|
||||||
* @param value the string value
|
* @param value the string value
|
||||||
|
@@ -777,15 +777,15 @@ public class DatabaseManager
|
|||||||
ColumnInfo pk = getPrimaryKeyColumnInfo(table);
|
ColumnInfo pk = getPrimaryKeyColumnInfo(table);
|
||||||
ColumnInfo[] info = getNonPrimaryKeyColumns(table);
|
ColumnInfo[] info = getNonPrimaryKeyColumns(table);
|
||||||
|
|
||||||
String seperator = "";
|
String separator = "";
|
||||||
for (int i = 0; i < info.length; i++)
|
for (int i = 0; i < info.length; i++)
|
||||||
{
|
{
|
||||||
// Only update this column if it has changed
|
// Only update this column if it has changed
|
||||||
if (row.hasColumnChanged(info[i].getName()))
|
if (row.hasColumnChanged(info[i].getName()))
|
||||||
{
|
{
|
||||||
sql.append(seperator).append(info[i].getName()).append(" = ?");
|
sql.append(separator).append(info[i].getName()).append(" = ?");
|
||||||
columns.add(info[i]);
|
columns.add(info[i]);
|
||||||
seperator = ", ";
|
separator = ", ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -151,7 +151,7 @@ public abstract class InitialArticleWord implements TextFilter
|
|||||||
{
|
{
|
||||||
// No - move the initial article word to the end
|
// No - move the initial article word to the end
|
||||||
return new StringBuffer(str.substring(cutPos))
|
return new StringBuffer(str.substring(cutPos))
|
||||||
.append(wordSeperator)
|
.append(wordSeparator)
|
||||||
.append(str.substring(initialStart, initialEnd))
|
.append(str.substring(initialStart, initialEnd))
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
@@ -181,8 +181,8 @@ public abstract class InitialArticleWord implements TextFilter
|
|||||||
*/
|
*/
|
||||||
protected abstract String[] getArticleWords(String lang);
|
protected abstract String[] getArticleWords(String lang);
|
||||||
|
|
||||||
// Seperator to use when appending article to end
|
// Separator to use when appending article to end
|
||||||
private String wordSeperator = ", ";
|
private String wordSeparator = ", ";
|
||||||
|
|
||||||
// Flag to signify initial article word should be removed
|
// Flag to signify initial article word should be removed
|
||||||
// If false, then the initial article word is appended to the end
|
// If false, then the initial article word is appended to the end
|
||||||
|
@@ -82,7 +82,7 @@ public class MARC21InitialArticleWord extends InitialArticleWord
|
|||||||
|
|
||||||
Language l = Language.getLanguage(lang);
|
Language l = Language.getLanguage(lang);
|
||||||
|
|
||||||
// Is the lanugage in our map?
|
// Is the language in our map?
|
||||||
if (l != null && ianaArticleMap.containsKey(l.IANA))
|
if (l != null && ianaArticleMap.containsKey(l.IANA))
|
||||||
{
|
{
|
||||||
// Get the list of words for this language
|
// Get the list of words for this language
|
||||||
|
@@ -23,7 +23,7 @@ EPerson groups may be assigned to the three possible intermediate steps,
|
|||||||
where they are expected to act on the item at those steps. For example,
|
where they are expected to act on the item at those steps. For example,
|
||||||
if a Collection's owners desire a review step, they would create a Group
|
if a Collection's owners desire a review step, they would create a Group
|
||||||
of reviewers, and assign that Group to step 1. The members of step 1's
|
of reviewers, and assign that Group to step 1. The members of step 1's
|
||||||
Group will receive emails asking them to reiview the submission, and
|
Group will receive emails asking them to review the submission, and
|
||||||
will need to perform an action on the item before it can be rejected
|
will need to perform an action on the item before it can be rejected
|
||||||
back to the submitter or placed in the archive.
|
back to the submitter or placed in the archive.
|
||||||
</p>
|
</p>
|
||||||
|
@@ -968,7 +968,7 @@ public class MockBrowseCreateDAOOracle
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.dspace.browse.BrowseCreateDAO#testTableExistance(java.lang.String)
|
* @see org.dspace.browse.BrowseCreateDAO#testTableExistence(java.lang.String)
|
||||||
*/
|
*/
|
||||||
@Mock
|
@Mock
|
||||||
public boolean testTableExistance(String table) throws BrowseException
|
public boolean testTableExistance(String table) throws BrowseException
|
||||||
|
Reference in New Issue
Block a user