Merge pull request #4 from helix84/master

fix typos and some whitespace (also tracked in JIRA as DS-1158)
This commit is contained in:
Tim Donohue
2012-04-20 09:05:28 -07:00
183 changed files with 1247 additions and 1275 deletions

View File

@@ -388,7 +388,7 @@ public class ItemExport
}
/**
* Discover the different schemas in use and output a seperate metadata XML
* Discover the different schemas in use and output a separate metadata XML
* file for each schema.
*
* @param c
@@ -914,7 +914,7 @@ public class ItemExport
}
else
{
// nothing to do just ignore this type of DSPaceObject
// nothing to do just ignore this type of DSpaceObject
}
}

View File

@@ -746,7 +746,7 @@ public class ItemImport
+ File.separatorChar);
// and the bitstreams from the contents file
// process contents file, add bistreams and bundles, return any
// process contents file, add bitstreams and bundles, return any
// non-standard permissions
List<String> options = processContentsFile(c, myitem, path
+ File.separatorChar + itemname, "contents");

View File

@@ -604,7 +604,7 @@ public class GoogleMetadata
for (DCValue v : allMD)
{
// De-dup multiple occurances of field names in item
// De-dup multiple occurrences of field names in item
if (!expandedDC.contains(buildFieldName(v)))
{
expandedDC.add(buildFieldName(v));
@@ -1156,7 +1156,7 @@ public class GoogleMetadata
}
else
{
// Otherwise, add it as the first occurance of this field
// Otherwise, add it as the first occurrence of this field
ArrayList<String> newField = new ArrayList<String>();
newField.add(parsedPair[1].trim());
mdPairs.put(parsedPair[0].trim(), newField);

View File

@@ -517,7 +517,7 @@ public class SyndicationFeed
*
* If the dspaceobject is null then a local url to the repository is generated.
*
* @param dso The object to refrence, null if to the repository.
* @param dso The object to reference, null if to the repository.
* @return
*/
private String baseURL = null; // cache the result for null

View File

@@ -91,7 +91,7 @@ public class ShibAuthentication implements AuthenticationMethod
* is a unique identifier from the IdP that identifies a particular user. The
* NetID can be of almost any form such as a unique integer, string, or with
* Shibboleth 2.0 you can use "targeted ids". You will need to coordinate with
* your shibboleth federation or identity provider. There are three ways to
* your Shibboleth federation or identity provider. There are three ways to
* supply identity information to DSpace:
*
* 1) NetID from Shibboleth Header (best)
@@ -117,14 +117,14 @@ public class ShibAuthentication implements AuthenticationMethod
*
* If you are currently using Email based authentication (either 1 or 2) and
* want to upgrade to NetID based authentication then there is an easy path.
* Simply enable shibboleth to pass the NetID attribute and set the netid-header
* Simply enable Shibboleth to pass the NetID attribute and set the netid-header
* below to the correct value. When a user attempts to log in to DSpace first
* DSpace will look for an EPerson with the passed NetID, however when this
* fails DSpace will fall back to email based authentication. Then DSpace will
* update the user's EPerson account record to set their netted so all future
* authentications for this user will be based upon netted. One thing to note
* update the user's EPerson account record to set their netid so all future
* authentications for this user will be based upon netid. One thing to note
* is that DSpace will prevent an account from switching NetIDs. If an account
* all ready has a NetID set and then they try and authenticate with a
* already has a NetID set and then they try and authenticate with a
* different NetID the authentication will fail.
*
* @param context
@@ -159,17 +159,17 @@ public class ShibAuthentication implements AuthenticationMethod
public int authenticate(Context context, String username, String password,
String realm, HttpServletRequest request) throws SQLException {
// Check if sword compatability is allowed, and if so see if we can
// authenticate based upon a username and password. This is really helpfull
// if your repo uses shibboleth but you want some accounts to be able use
// sword. This allows this compatability without installing the password-based
// Check if sword compatibility is allowed, and if so see if we can
// authenticate based upon a username and password. This is really helpful
// if your repo uses Shibboleth but you want some accounts to be able use
// sword. This allows this compatibility without installing the password-based
// authentication method which has side effects such as allowing users to login
// with a username and password from the webui.
boolean swordCompatability = ConfigurationManager.getBooleanProperty("authentication-shibboleth","sword.compatability", true);
if ( swordCompatability &&
boolean swordCompatibility = ConfigurationManager.getBooleanProperty("authentication-shibboleth","sword.compatibility", true);
if ( swordCompatibility &&
username != null && username.length() > 0 &&
password != null && password.length() > 0 ) {
return swordCompatability(context, username, password, request);
return swordCompatibility(context, username, password, request);
}
if (request == null) {
@@ -185,7 +185,7 @@ public class ShibAuthentication implements AuthenticationMethod
if (log.isDebugEnabled()) {
log.debug("Starting Shibboleth Authentication");
String message = "Recieved the following headers:\n";
String message = "Received the following headers:\n";
Enumeration<String> headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
String headerName = headerNames.nextElement();
@@ -247,7 +247,7 @@ public class ShibAuthentication implements AuthenticationMethod
* the pre-defined DSpace group, so if the user loses their affiliation then the
* next time they login they will no longer be in the group.
*
* Depending upon the shibboleth attributed use in the role-header it may be
* Depending upon the shibboleth attributed use in the role-header, it may be
* scoped. Scoped is shibboleth terminology for identifying where an attribute
* originated from. For example a students affiliation may be encoded as
* "student@tamu.edu". The part after the @ sign is the scope, and the preceding
@@ -275,14 +275,14 @@ public class ShibAuthentication implements AuthenticationMethod
public int[] getSpecialGroups(Context context, HttpServletRequest request)
{
try {
// User has not successfully authenticated via shibboleth.
// User has not successfuly authenticated via shibboleth.
if ( request == null ||
context.getCurrentUser() == null ||
request.getSession().getAttribute("shib.authenticated") == null ) {
return new int[0];
}
// If we have all ready calculated the special groups then return them.
// If we have already calculated the special groups then return them.
if (request.getSession().getAttribute("shib.specialgroup") != null)
{
log.debug("Returning cached special groups.");
@@ -310,11 +310,11 @@ public class ShibAuthentication implements AuthenticationMethod
log.debug("Found Shibboleth role header: '"+roleHeader+"' = '"+affiliations+"'");
}
// Loop through each affilition
// Loop through each affiliation
Set<Integer> groups = new HashSet<Integer>();
if (affiliations != null) {
for ( String affiliation : affiliations) {
// If we ignore the affilation's scope then strip the scope if it exists.
// If we ignore the affiliation's scope then strip the scope if it exists.
if (ignoreScope) {
int index = affiliation.indexOf('@');
if (index != -1) {
@@ -355,8 +355,8 @@ public class ShibAuthentication implements AuthenticationMethod
log.error("Exception thrown while trying to lookup affiliation role for group name: '"+names[i].trim()+"'",sqle);
}
} // for each groupNames
} // foreach affilations
} // if affilaitons
} // foreach affiliations
} // if affiliations
log.info("Added current EPerson to special groups: "+groups);
@@ -538,8 +538,8 @@ public class ShibAuthentication implements AuthenticationMethod
/**
* Identify an existing EPerson based upon the shibboleth attributes provided on
* the request object. There are three case underwhich this can occure each in
* a fall back position to the previous method.
* the request object. There are three cases where this can occurr, each as
* a fallback for the previous method.
*
* 1) NetID from Shibboleth Header (best)
* The NetID-based method is superior because users may change their email
@@ -548,7 +548,7 @@ public class ShibAuthentication implements AuthenticationMethod
*
* 2) Email address from Shibboleth Header (okay)
* In the case where a NetID header is not available or not found DSpace
* will fall back to identifying a user based-upon their email address.
* will fall back to identifying a user based upon their email address.
*
* 3) Tomcat's Remote User (worst)
* In the event that neither Shibboleth headers are found then as a last
@@ -650,7 +650,7 @@ public class ShibAuthentication implements AuthenticationMethod
*
* In order to create a new eperson object there is a minimal set of metadata
* required: Email, First Name, and Last Name. If we don't have access to these
* three peices of information then we will be unable to create a new eperson
* three pieces of information then we will be unable to create a new eperson
* object, such as the case when Tomcat's Remote User field is used to identify
* a particular user.
*
@@ -688,7 +688,7 @@ public class ShibAuthentication implements AuthenticationMethod
return null; // TODO should this throw an exception?
}
// Truncate values parameters that are too big.
// Truncate values of parameters that are too big.
if (fname.length() > NAME_MAX_SIZE) {
log.warn("Truncating eperson's first name because it is longer than "+NAME_MAX_SIZE+": '"+fname+"'");
fname = fname.substring(0,NAME_MAX_SIZE);
@@ -736,9 +736,9 @@ public class ShibAuthentication implements AuthenticationMethod
/**
* After sucessfully authenticate a user this method will update the users attributes. The
* After we sucessfully authenticated a user, this method will update the users attributes. The
* user's email, name, or other attribute may have been changed since the last time they
* logged into DSpace. This method will update the database with their most recient information.
* logged into DSpace. This method will update the database with their most recent information.
*
* This method handles the basic DSpace metadata (email, first name, last name) along with
* additional metadata set using the setMetadata() methods on the eperson object. The
@@ -761,7 +761,7 @@ public class ShibAuthentication implements AuthenticationMethod
String fname = findSingleHeader(request,fnameHeader);
String lname = findSingleHeader(request,lnameHeader);
// Truncate values parameters that are too big.
// Truncate values of parameters that are too big.
if (fname.length() > NAME_MAX_SIZE) {
log.warn("Truncating eperson's first name because it is longer than "+NAME_MAX_SIZE+": '"+fname+"'");
fname = fname.substring(0,NAME_MAX_SIZE);
@@ -776,7 +776,7 @@ public class ShibAuthentication implements AuthenticationMethod
// 1) Update the minimum metadata
if (netid != null && eperson.getNetid() == null)
// Only update the netid if none has been previously set. This can occur when a repo switches
// to netid based authentication. The current users do not have netids and fall back to email based
// to netid based authentication. The current users do not have netids and fall back to email-based
// identification but once they login we update their record and lock the account to a particular netid.
eperson.setNetid(netid);
if (email != null)
@@ -822,12 +822,12 @@ public class ShibAuthentication implements AuthenticationMethod
}
/**
* Provide password-based authentication to enable sword compatability.
* Provide password-based authentication to enable sword compatibility.
*
* Sword compatability will allow this authentication method to work when using
* sword. Sort relies on username and password based authentication and is
* Sword compatibility will allow this authentication method to work when using
* sword. Sword relies on username and password based authentication and is
* entirely incapable of supporting shibboleth. This option allows you to
* authenticate username and passwords for sword sessions with out adding
* authenticate username and passwords for sword sessions without adding
* another authentication method onto the stack. You will need to ensure that
* a user has a password. One way to do that is to create the user via the
* create-administrator command line command and then edit their permissions.
@@ -838,11 +838,11 @@ public class ShibAuthentication implements AuthenticationMethod
* @param request The HTTP Request
* @return A valid DSpace Authentication Method status code.
*/
protected int swordCompatability(Context context, String username, String password, HttpServletRequest request) throws SQLException {
protected int swordCompatibility(Context context, String username, String password, HttpServletRequest request) throws SQLException {
EPerson eperson = null;
log.debug("Shibboleth Sword compatability activated.");
log.debug("Shibboleth Sword compatibility activated.");
try {
eperson = EPerson.findByEmail(context, username.toLowerCase());
} catch (AuthorizeException ae) {
@@ -867,7 +867,7 @@ public class ShibAuthentication implements AuthenticationMethod
// Password matched
AuthenticationManager.initEPerson(context, request, eperson);
context.setCurrentUser(eperson);
log.info(eperson.getEmail()+" has been authenticated via shibboleth using password-based sword compatability mode.");
log.info(eperson.getEmail()+" has been authenticated via shibboleth using password-based sword compatibility mode.");
return SUCCESS;
} else {
// Passsword failure
@@ -884,7 +884,7 @@ public class ShibAuthentication implements AuthenticationMethod
*
* During initalization the mapping of additional eperson metadata will be loaded from the DSpace.cfg
* and cached. While loading the metadata mapping this method will check the EPerson object to see
* if it suports the metadata field. If the field is not supported and autocreate is turned on then
* if it supports the metadata field. If the field is not supported and autocreate is turned on then
* the field will be automatically created.
*
* It is safe to call this methods multiple times.
@@ -936,7 +936,7 @@ public class ShibAuthentication implements AuthenticationMethod
log.debug("Loading additional eperson metadata mapping for: '"+header+"' = '"+name+"'");
map.put(header, name);
} else {
// The field dosn't exist, and we can't use it.
// The field doesn't exist, and we can't use it.
log.error("Skipping the additional eperson metadata mapping for: '"+header+"' = '"+name+"' because the field is not supported by the current configuration.");
}
} // foreach metadataStringList
@@ -947,9 +947,9 @@ public class ShibAuthentication implements AuthenticationMethod
}
/**
* Check the EPerson table deffinition to see if the metadata field name is supported. It
* Check the EPerson table definition to see if the metadata field name is supported. It
* checks for three things 1) that the field exists and 2) that the field is of the correct
* type, varchar, and 3) that the field's size is suffcient.
* type, varchar, and 3) that the field's size is sufficient.
*
* If either of these checks fail then false is returned.
*
@@ -1019,7 +1019,7 @@ public class ShibAuthentication implements AuthenticationMethod
* metadata field. All additional fields are created with type varchar( METADATA_MAX_SIZE )
*
* @param metadataName The name of the new metadata field.
* @return True if successfull, otherwise false.
* @return True if successful, otherwise false.
*/
private static synchronized boolean autoCreateEpersonMetadataField(String metadataName) throws SQLException {
@@ -1064,7 +1064,7 @@ public class ShibAuthentication implements AuthenticationMethod
* The header name uses a bit of fuzzy logic, so it will first try case
* sensitive, then it will try lowercase, and finally it will try uppercase.
*
* This method will not interpret the header value in anyway.
* This method will not interpret the header value in any way.
*
*
* @param request The HTTP request to look for headers values on.
@@ -1103,8 +1103,8 @@ public class ShibAuthentication implements AuthenticationMethod
if (value != null) {
// If there are multiple values encodded in the shibboleth attribute
// they are seperated by a semicolon, and any semicolons in the
// If there are multiple values encoded in the shibboleth attribute
// they are separated by a semicolon, and any semicolons in the
// attribute are escaped with a backslash. For this case we are just
// looking for the first attribute so we scan the value until we find
// the first unescaped semicolon and chop off everything else.
@@ -1127,7 +1127,7 @@ public class ShibAuthentication implements AuthenticationMethod
/**
* Find a particular Shibboleth header value and return the all values.
* The header name uses a bit of fuzzy logic, so it will first try case
* sensitive, then it will try lowercase, and finaly it will try uppercase.
* sensitive, then it will try lowercase, and finally it will try uppercase.
*
* Shibboleth attributes may contain multiple values separated by a
* semicolon and semicolons are escaped with a backslash. This method will
@@ -1145,7 +1145,7 @@ public class ShibAuthentication implements AuthenticationMethod
if (values == null)
return null;
// Shibboleth attributes are seperated by semicolons (and semicolons are
// Shibboleth attributes are separated by semicolons (and semicolons are
// escaped with a backslash). So here we will scan through the string and
// split on any unescaped semicolons.
List<String> valueList = new ArrayList<String>();
@@ -1186,32 +1186,3 @@ public class ShibAuthentication implements AuthenticationMethod
}

View File

@@ -592,7 +592,7 @@ public final class BrowseIndex
/**
* Is the browse index of display type single?
*
* @return true if singe, false if not
* @return true if single, false if not
*/
public boolean isMetadataIndex()
{

View File

@@ -430,11 +430,11 @@ public final class BitstreamInfoDAO extends DAOSupport
}
/**
* Returns the oldest bistream that in the set of bitstreams that are less
* Returns the oldest bitstream that in the set of bitstreams that are less
* than the specified date. If no bitstreams are found -1 is returned.
*
* @param lessThanDate
* @return id of olded bitstream or -1 if not bistreams are found
* @return id of olded bitstream or -1 if not bitstreams are found
*/
public int getOldestBitstream(Timestamp lessThanDate)
{

View File

@@ -128,7 +128,7 @@ public class InstallItem
// are not set then set them to today.
DCDate now = DCDate.getCurrent();
// If the item dosn't have a date.accessioned create one.
// If the item doesn't have a date.accessioned create one.
DCValue[] dateAccessioned = item.getDC("date", "accessioned", Item.ANY);
if (dateAccessioned.length == 0)
{
@@ -156,7 +156,7 @@ public class InstallItem
String handleref = HandleManager.getCanonicalForm(handle);
// Add handle as identifier.uri DC value.
// First check that identifier dosn't already exist.
// First check that identifier doesn't already exist.
boolean identifierExists = false;
DCValue[] identifiers = item.getDC("identifier", "uri", Item.ANY);
for (DCValue identifier : identifiers)

View File

@@ -18,7 +18,7 @@ package org.dspace.content.authority;
public interface ChoiceAuthority
{
/**
* Get all values from the authority that match the profferred value.
* Get all values from the authority that match the preferred value.
* Note that the offering was entered by the user and may contain
* mixed/incorrect case, whitespace, etc so the plugin should be careful
* to clean up user data before making comparisons.

View File

@@ -260,7 +260,7 @@ public class XSLTDisseminationCrosswalk
}
/**
* return true if this crosswalk prefers the list form over an singe
* return true if this crosswalk prefers the list form over an single
* element, otherwise false.
*
* @see DisseminationCrosswalk

View File

@@ -1537,7 +1537,7 @@ public abstract class AbstractMETSDisseminator
}
else
{ //no Handle assigned, so persistent(-ish) URI for bitstream is
// Format: {site-base-url}/retrieve/{bistream-internal-id}
// Format: {site-base-url}/retrieve/{bitstream-internal-id}
return ConfigurationManager
.getProperty("dspace.url")
+ "/retrieve/"

View File

@@ -776,7 +776,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester
// retrieve bundle name from manifest
String bundleName = METSManifest.getBundleName(mfile);
// Find or create the bundle where bitstrem should be attached
// Find or create the bundle where bitstream should be attached
Bundle bundle;
Bundle bns[] = item.getBundles(bundleName);
if (bns != null && bns.length > 0)

View File

@@ -422,7 +422,7 @@ public class METSManifest
}
// translate bundle name from METS to DSpace; METS may be "CONTENT"
// or "ORIGINAL" for the DSPace "ORIGINAL", rest are left alone.
// or "ORIGINAL" for the DSpace "ORIGINAL", rest are left alone.
private static String normalizeBundleName(String in)
{
if (in.equals("CONTENT"))

View File

@@ -248,11 +248,11 @@ public class PDFPackager
PackageUtils.createFile(pkgFile);
}
//open up output stream to copy bistream to file
//open up output stream to copy bitstream to file
FileOutputStream out = null;
try
{
//open up output stream to copy bistream to file
//open up output stream to copy bitstream to file
out = new FileOutputStream(pkgFile);
Utils.copy(pkgBs.retrieve(), out);
}

View File

@@ -19,7 +19,7 @@ import java.lang.annotation.RetentionPolicy;
* 'invocation mode' - optionally set by the caller on the curation object.
* Thus, it effectively means that if a task is iterating over a collection,
* the first error, or failure will halt the process.
* This insures that the status code and result of the failure are preserved.
* This ensures that the status code and result of the failure are preserved.
*
* @author richardrodgers
*/

View File

@@ -98,7 +98,7 @@ public class HandleManager
{
// Let the admin define a new prefix, if not then we'll use the
// CNRI default. This allows the admin to use "hdl:" if they want too or
// CNRI default. This allows the admin to use "hdl:" if they want to or
// use a locally branded prefix handle.myuni.edu.
String handlePrefix = ConfigurationManager.getProperty("handle.canonical.prefix");
if (handlePrefix == null || handlePrefix.length() == 0)

View File

@@ -116,11 +116,11 @@ mail.admin = dspace-help@myu.edu
# Recipient for new user registration emails
# registration.notify = email-address-here
# Set the default mail character set. This may be over ridden by providing a line
# Set the default mail character set. This may be overridden by providing a line
# inside the email template "charset: <encoding>", otherwise this default is used.
#mail.charset = UTF8
# A comma separated list of hostnames that are allowed to refer browsers to email forms.
# A comma-separated list of hostnames that are allowed to refer browsers to email forms.
# Default behaviour is to accept referrals only from dspace.hostname
#mail.allowed.referrers = localhost
@@ -187,7 +187,7 @@ assetstore.dir = ${dspace.dir}/assetstore
# - a set of SRB account parameters (host, port, zone, domain, username,
# password, home directory, and resource)
#
# Should the be any conflict, like '2' refering to a local directory and
# Should there be any conflict, like '2' refering to a local directory and
# to a set of SRB parameters, the program will select the local directory.
#
# If SRB is chosen from the first install of DSpace, it is suggested that
@@ -506,7 +506,7 @@ plugin.named.org.dspace.content.packager.PackageIngester = \
event.dispatcher.default.class = org.dspace.event.BasicDispatcher
event.dispatcher.default.consumers = search, browse, eperson, harvester
# The noindex dispatcher will not create search or browse indexs (usefull for batch item imports)
# The noindex dispatcher will not create search or browse indexes (useful for batch item imports)
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
event.dispatcher.noindex.consumers = eperson
@@ -575,7 +575,7 @@ org.dspace.app.itemexport.life.span.hours = 48
org.dspace.app.itemexport.max.size = 200
# For backwards compatability, the subscription emails by default include any modified items
# For backwards compatibility, the subscription emails by default include any modified items
# uncomment the following entry for only new items to be emailed
# eperson.subscription.onlynew = true
@@ -780,7 +780,7 @@ webui.itemlist.sort-option.2 = dateissued:dc.date.issued:date
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
# By default, the display of metadata in the browse indexes is case sensitive
# So, you will get seperate entries for the terms
# So, you will get separate entries for the terms
#
# Olive oil
# olive oil
@@ -820,7 +820,7 @@ webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
# Set the options for how the indexes are sorted
#
# All sort normalisations are carried out by the OrderFormatDelegate.
# All sorts of normalisations are carried out by the OrderFormatDelegate.
# The plugin manager can be used to specify your own delegates for each datatype.
#
# The default datatypes (and delegates) are:
@@ -1283,7 +1283,7 @@ plugin.single.org.dspace.app.webui.util.StyleSelection = \
default.locale = en
# All the Locales, that are supported by this instance of DSpace
# A comma seperated list of Locales. All types of Locales country, country_language, country_language_variant
# A comma-separated list of Locales. All types of Locales country, country_language, country_language_variant
# Note that the appropriate file are present, especially that all the Messages_x.properties are there
# may be used, e. g: webui.supported.locales = en, de
@@ -1345,7 +1345,7 @@ webui.suggest.enable = false
# A list of supported locales for Manakin. Manakin will look at a user's browser
# configuration for the first language that appears in this list to make available
# to in the interface. This parameter is a comma seperated list of Locales. All
# to in the interface. This parameter is a comma-separated list of Locales. All
# types of Locales country, country_language, country_language_variant
# Note that that if the approprate files are not present (i.e. Messages_XX_XX.xml)
# then Manakin will fall back through to a more general language.
@@ -1357,7 +1357,7 @@ webui.suggest.enable = false
#xmlui.force.ssl = true
# Determine if new users should be allowed to register or edit their own metadata.
# These parameters are usefull in congunction with shibboleth where you want to
# These parameters are useful in conjunction with shibboleth where you want to
# disallow registration and disable the user's ability to edit their metadata
# because both come from Shibboleth.
#xmlui.user.registration=true
@@ -1365,7 +1365,7 @@ webui.suggest.enable = false
# Determine if super administrators (those whom are in the Administrators group)
# can login as another user from the "edit eperson" page. This is usefull for
# can login as another user from the "edit eperson" page. This is useful for
# debugging problems in a running dspace instance, especially in the workflow
# process. The default value is false, i.e. no one may assume the login of another user.
#xmlui.user.assumelogin = true
@@ -1429,7 +1429,7 @@ webui.suggest.enable = false
# The default value is 250.
#xmlui.controlpanel.activity.max = 250
# Determine where the control panel's activity viwer recieves an events IP address
# Determine where the control panel's activity viwer receives an event's IP address
# from. If your DSpace is in a load balanced enviornment or otherwise behind a
# context-switch then you will need to set the paramater to the HTTP parameter that
# records the original IP address.
@@ -1566,7 +1566,7 @@ sword.slug.field = dc.identifier.slug
sword.accept-packaging.METSDSpaceSIP.identifier = http://purl.org/net/sword-types/METSDSpaceSIP
sword.accept-packaging.METSDSpaceSIP.q = 1.0
# A comma separated list of MIME types that SWORD will accept
# A comma-separated list of MIME types that SWORD will accept
sword.accepts = application/zip
# Collection Specific settings: these will be used on the collections

View File

@@ -119,11 +119,11 @@ mail.admin = dspace-help@myu.edu
# Recipient for new user registration emails
# registration.notify = email-address-here
# Set the default mail character set. This may be over ridden by providing a line
# Set the default mail character set. This may be overridden by providing a line
# inside the email template "charset: <encoding>", otherwise this default is used.
#mail.charset = UTF8
# A comma separated list of hostnames that are allowed to refer browsers to email forms.
# A comma-separated list of hostnames that are allowed to refer browsers to email forms.
# Default behaviour is to accept referrals only from dspace.hostname
#mail.allowed.referrers = localhost
@@ -190,7 +190,7 @@ assetstore.dir = ${dspace.dir}/assetstore
# - a set of SRB account parameters (host, port, zone, domain, username,
# password, home directory, and resource)
#
# Should the be any conflict, like '2' refering to a local directory and
# Should there be any conflict, like '2' refering to a local directory and
# to a set of SRB parameters, the program will select the local directory.
#
# If SRB is chosen from the first install of DSpace, it is suggested that
@@ -510,7 +510,7 @@ plugin.named.org.dspace.content.packager.PackageIngester = \
event.dispatcher.default.class = org.dspace.event.BasicDispatcher
event.dispatcher.default.consumers = search, browse, eperson, harvester
# The noindex dispatcher will not create search or browse indexs (usefull for batch item imports)
# The noindex dispatcher will not create search or browse indexes (useful for batch item imports)
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
event.dispatcher.noindex.consumers = eperson
@@ -579,7 +579,7 @@ org.dspace.app.itemexport.life.span.hours = 48
org.dspace.app.itemexport.max.size = 200
# For backwards compatability, the subscription emails by default include any modified items
# For backwards compatibility, the subscription emails by default include any modified items
# uncomment the following entry for only new items to be emailed
# eperson.subscription.onlynew = true
@@ -800,7 +800,7 @@ webui.itemlist.sort-option.2 = dateissued:dc.date.issued:date
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
# By default, the display of metadata in the browse indexes is case sensitive
# So, you will get seperate entries for the terms
# So, you will get separate entries for the terms
#
# Olive oil
# olive oil
@@ -840,7 +840,7 @@ webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
# Set the options for how the indexes are sorted
#
# All sort normalisations are carried out by the OrderFormatDelegate.
# All sorts of normalisations are carried out by the OrderFormatDelegate.
# The plugin manager can be used to specify your own delegates for each datatype.
#
# The default datatypes (and delegates) are:
@@ -1301,7 +1301,7 @@ plugin.single.org.dspace.app.webui.util.StyleSelection = \
default.locale = en
# All the Locales, that are supported by this instance of DSpace
# A comma seperated list of Locales. All types of Locales country, country_language, country_language_variant
# A comma-separated list of Locales. All types of Locales country, country_language, country_language_variant
# Note that the appropriate file are present, especially that all the Messages_x.properties are there
# may be used, e. g: webui.supported.locales = en, de
@@ -1363,7 +1363,7 @@ webui.suggest.enable = false
# A list of supported locales for Manakin. Manakin will look at a user's browser
# configuration for the first language that appears in this list to make available
# to in the interface. This parameter is a comma seperated list of Locales. All
# to in the interface. This parameter is a comma-separated list of Locales. All
# types of Locales country, country_language, country_language_variant
# Note that that if the approprate files are not present (i.e. Messages_XX_XX.xml)
# then Manakin will fall back through to a more general language.
@@ -1375,7 +1375,7 @@ webui.suggest.enable = false
#xmlui.force.ssl = true
# Determine if new users should be allowed to register or edit their own metadata.
# These parameters are usefull in congunction with shibboleth where you want to
# These parameters are useful in conjunction with shibboleth where you want to
# disallow registration and disable the user's ability to edit their metadata
# because both come from Shibboleth.
#xmlui.user.registration=true
@@ -1383,7 +1383,7 @@ webui.suggest.enable = false
# Determine if super administrators (those whom are in the Administrators group)
# can login as another user from the "edit eperson" page. This is usefull for
# can login as another user from the "edit eperson" page. This is useful for
# debugging problems in a running dspace instance, especially in the workflow
# process. The default value is false, i.e. no one may assume the login of another user.
#xmlui.user.assumelogin = true
@@ -1447,7 +1447,7 @@ webui.suggest.enable = false
# The default value is 250.
#xmlui.controlpanel.activity.max = 250
# Determine where the control panel's activity viwer recieves an events IP address
# Determine where the control panel's activity viwer receives an event's IP address
# from. If your DSpace is in a load balanced enviornment or otherwise behind a
# context-switch then you will need to set the paramater to the HTTP parameter that
# records the original IP address.
@@ -1584,7 +1584,7 @@ sword.slug.field = dc.identifier.slug
sword.accept-packaging.METSDSpaceSIP.identifier = http://purl.org/net/sword-types/METSDSpaceSIP
sword.accept-packaging.METSDSpaceSIP.q = 1.0
# A comma separated list of MIME types that SWORD will accept
# A comma-separated list of MIME types that SWORD will accept
sword.accepts = application/zip
# Collection Specific settings: these will be used on the collections

View File

@@ -5,8 +5,8 @@
<input-forms>
<!-- The form-map maps collection handles to forms. DSpace does not -->
<!-- require that a collection's name be unique, even within a community .-->
<!-- DSpace does however insure that each collection's handle is unique. -->
<!-- require a collection name to be unique, not even within a community. -->
<!-- DSpace does however ensure that each collection's handle is unique. -->
<!-- Form-map provides the means to associate a unique collection name -->
<!-- with a form. The form-map also provides the special handle "default" -->
<!-- (which is never a collection), here mapped to "traditional". Any -->
@@ -19,17 +19,17 @@
<!-- The form-definitions map lays out the detailed definition of all the -->
<!-- submission forms.Each separate form set has a unique name as an -->
<!-- submission forms. Each separate form set has a unique name as an -->
<!-- attribute. This name matches one of the names in the form-map. One -->
<!-- named form set has the name "traditional"; as this name suggests, -->
<!-- it is the old style and is also the default, which gets used when -->
<!-- the specified collection has no correspondingly named form set. -->
<!-- the specified collection has no correspondingly-named form set. -->
<!-- -->
<!-- Each form set contains an ordered set of pages; each page defines -->
<!-- one submission metadata entry screen. Each page has an ordered list -->
<!-- of field definitions, Each field definition corresponds to one -->
<!-- metatdata entry (a so-called row), which has a DC element name, a -->
<!-- displayed label, a text string prompt which is called a hint , and -->
<!-- displayed label, a text string prompt which is called a hint, and -->
<!-- an input-type. Each field also may hold optional elements: DC -->
<!-- qualifier name, a repeatable flag, and a text string whose presence -->
<!-- serves as a 'this field is required' flag. -->
@@ -39,7 +39,7 @@
<form name="traditional">
<page number="1">
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>author</dc-qualifier>
<repeatable>true</repeatable>
@@ -50,7 +50,7 @@
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>title</dc-element>
<dc-qualifier></dc-qualifier>
<repeatable>false</repeatable>
@@ -61,7 +61,7 @@
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>title</dc-element>
<dc-qualifier>alternative</dc-qualifier>
<repeatable>true</repeatable>
@@ -72,7 +72,7 @@
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>date</dc-element>
<dc-qualifier>issued</dc-qualifier>
<repeatable>false</repeatable>
@@ -85,7 +85,7 @@
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>publisher</dc-element>
<dc-qualifier></dc-qualifier>
<repeatable>false</repeatable>
@@ -96,7 +96,7 @@
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>identifier</dc-element>
<dc-qualifier>citation</dc-qualifier>
<repeatable>false</repeatable>
@@ -107,7 +107,7 @@
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>relation</dc-element>
<dc-qualifier>ispartofseries</dc-qualifier>
<repeatable>true</repeatable>
@@ -118,7 +118,7 @@
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>identifier</dc-element>
<dc-qualifier></dc-qualifier>
<!-- An input-type of qualdrop_value MUST be marked as repeatable -->
@@ -131,18 +131,18 @@ it, please enter the types and the actual numbers or codes below.</hint>
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>type</dc-element>
<dc-qualifier></dc-qualifier>
<repeatable>true</repeatable>
<label>Type</label>
<input-type value-pairs-name="common_types">dropdown</input-type>
<hint> Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key.</hint>
<hint>Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key.</hint>
<required></required>
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>language</dc-element>
<dc-qualifier>iso</dc-qualifier>
<repeatable>false</repeatable>
@@ -155,48 +155,48 @@ it, please enter the types and the actual numbers or codes below.</hint>
<page number="2">
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>subject</dc-element>
<dc-qualifier></dc-qualifier>
<!-- An input-type of twobox MUST be marked as repeatable -->
<repeatable>true</repeatable>
<label>Subject Keywords</label>
<input-type>twobox</input-type>
<hint> Enter appropriate subject keywords or phrases below. </hint>
<hint>Enter appropriate subject keywords or phrases below. </hint>
<required></required>
<vocabulary>srsc</vocabulary>
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>description</dc-element>
<dc-qualifier>abstract</dc-qualifier>
<repeatable>false</repeatable>
<label>Abstract</label>
<input-type>textarea</input-type>
<hint> Enter the abstract of the item below. </hint>
<hint>Enter the abstract of the item below. </hint>
<required></required>
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>description</dc-element>
<dc-qualifier>sponsorship</dc-qualifier>
<repeatable>false</repeatable>
<label>Sponsors</label>
<input-type>textarea</input-type>
<hint> Enter the names of any sponsors and/or funding codes in the box below. </hint>
<hint>Enter the names of any sponsors and/or funding codes in the box below. </hint>
<required></required>
</field>
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>description</dc-element>
<dc-qualifier></dc-qualifier>
<repeatable>false</repeatable>
<label>Description</label>
<input-type>textarea</input-type>
<hint> Enter any other description or comments in this box. </hint>
<hint>Enter any other description or comments in this box. </hint>
<required></required>
</field>
</page>
@@ -205,12 +205,12 @@ it, please enter the types and the actual numbers or codes below.</hint>
<form name="one">
<page number="1">
<field>
<dc-schema>dc</dc-schema>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>author</dc-qualifier>
<repeatable>true</repeatable>
<label>One: Authors</label>
<input-type>name</input-type>
<input-type>name</input-type>
<hint>Enter the names of the authors of this item below.</hint>
<required></required>
</field>

View File

@@ -9,7 +9,7 @@
<!-- The process-map maps collection handles to a particular Item -->
<!-- Submission Process. This requires that a collection's name be -->
<!-- unique, even within a community. DSpace does however insure that each-->
<!-- unique, even within a community. DSpace does however ensure that each-->
<!-- collection's handle is unique. Process-map provides the means to -->
<!-- associate a unique collection name with an Item Submission process. -->
<!-- The process-map also provides the special handle "default" (which is -->
@@ -123,7 +123,7 @@
<!-- -->
<!-- Each submit-process contains an ordered set of steps; each step -->
<!-- defines one "step" occurring during the process of submitting an -->
<!-- item. A step can either be reference by 'id' (in which case it must -->
<!-- item. A step can either be referenced by 'id' (in which case it must-->
<!-- be defined in <step-definitions> above), or defined completely here. -->
<!-- -->
<!-- If the step is not referred to by 'id', then the <step> REQUIRES the -->

View File

@@ -1,6 +1,6 @@
#### Shibboleth Authentication Configuration Settings ####
# Check https://mams.melcoe.mq.edu.au/zope/mams/pubs/Installation/dspace15/view
# for installation detail.
# for installation details.
#
# DSpace requires email as user's credential. There are 2 ways of providing
# email to DSpace:
@@ -36,7 +36,7 @@ autoregister = true
# ignore-scope is defaulted to 'false'.
# The value is specified in AAP.xml (Shib 1.3.x) or
# attribute-filter.xml (Shib 2.x). The value is CASE-Sensitive.
# The values provided in this header are separated by semi-colon or comma.
# The values provided in this header are separated by semicolon or comma.
# If your sp only provides scoped role header, you need to set
# role-header.ignore-Scope as true.
# for example if you only get Shib-EP-ScopedAffiliation instead of Shib-EP-ScopedAffiliation,
@@ -48,9 +48,9 @@ autoregister = true
role-header.ignore-scope = false
# when user is fully authN on IdP but would not like to release
# his/her roles to DSpace (for privacy reason?), what should be
# his/her roles to DSpace (for privacy reasons?), what should be
# the default roles be given to such users?
# The values are separated by semi-colon or comma
# The values are separated by semicolon or comma
# default-roles = Staff, Walk-ins
# The following mappings specify role mapping between IdP and Dspace.
@@ -68,4 +68,4 @@ role-header.ignore-scope = false
# Given sufficient demand, future release could support regex for the mapping
# special characters need to be escaped by \
role.Senior\ Researcher = Researcher, Staff
role.Librarian = Administrator
role.Librarian = Administrator

View File

@@ -234,7 +234,7 @@
<!-- The PatternReplaceFilter gives you the flexibility to use
Java Regular expression to replace any sequence of characters
matching a pattern with an arbitrary replacement string,
which may include back refrences to portions of the orriginal
which may include back references to portions of the original
string matched by the pattern.
See the Java Regular Expression documentation for more

View File

@@ -73,7 +73,7 @@ public class SolrServiceImpl implements SearchService, IndexingService {
private CommonsHttpSolrServer solr = null;
/**
* Non-Static Singelton instance of Configuration Service
* Non-Static Singleton instance of Configuration Service
*/
// private ConfigurationService configurationService;

View File

@@ -617,7 +617,7 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer implement
* Determine if the scope of the search should fixed or is changeable by the
* user.
* <p/>
* The search scope when preformed by url, i.e. they are at the url handle/xxxx/xx/search
* The search scope when performed by url, i.e. they are at the url handle/xxxx/xx/search
* then it is fixed. However at the global level the search is variable.
*
* @return true if the scope is variable, false otherwise.

View File

@@ -126,7 +126,7 @@ public class BrowseFacet extends AbstractDSpaceTransformer implements CacheableP
validity.add(dso);
}
// add reciently submitted items, serialize solr query contents.
// add recently submitted items, serialize solr query contents.
DiscoverResult response = getQueryResponse(dso);
validity.add("numFound:" + response.getDspaceObjects().size());

View File

@@ -149,7 +149,7 @@ public class CommunitySearch extends AbstractDSpaceTransformer implements Cachea
}
/**
* Display a single community (and refrence any sub communites or
* Display a single community (and reference any subcommunites or
* collections)
*/
public void addBody(Body body) throws SAXException, WingException,
@@ -222,4 +222,4 @@ public class CommunitySearch extends AbstractDSpaceTransformer implements Cachea
}
}

View File

@@ -130,7 +130,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
}
/**
* Insure that the context path is added to the page meta.
* Ensure that the context path is added to the page meta.
*/
public void addPageMeta(PageMeta pageMeta) throws SAXException,
WingException, UIException, SQLException, IOException,

View File

@@ -132,7 +132,7 @@ public class SearchFacetFilter extends AbstractDSpaceTransformer implements Cach
validity.add(dso);
}
// add reciently submitted items, serialize solr query contents.
// add recently submitted items, serialize solr query contents.
DiscoverResult response = getQueryResponse(dso);
validity.add("numFound:" + response.getDspaceObjects().size());

View File

@@ -34,7 +34,7 @@ import org.dspace.utils.DSpace;
import org.xml.sax.SAXException;
/**
* Preform a simple search of the repository. The user provides a simple one
* Perform a simple search of the repository. The user provides a simple one
* field query (the url parameter is named query) and the results are processed.
*
* @author Kevin Van de Velde (kevin at atmire dot com)

View File

@@ -33,7 +33,7 @@ public class SiteRecentSubmissions extends AbstractRecentSubmissionTransformer {
/**
* Display a single community (and refrence any sub communites or
* Display a single community (and reference any subcommunites or
* collections)
*/
public void addBody(Body body) throws SAXException, WingException,
@@ -66,4 +66,4 @@ public class SiteRecentSubmissions extends AbstractRecentSubmissionTransformer {
}
}
}
}

View File

@@ -199,7 +199,7 @@ $.Autocompleter = function(input, options) {
if ( options.multiple ) {
var words = trimWords($input.val());
if ( words.length > 1 ) {
var seperator = options.multipleSeparator.length;
var separator = options.multipleSeparator.length;
var cursorAt = $(input).selection().start;
var wordAt, progress = 0;
$.each(words, function(i, word) {
@@ -208,11 +208,11 @@ $.Autocompleter = function(input, options) {
wordAt = i;
return false;
}
progress += seperator;
progress += separator;
});
words[wordAt] = v;
// TODO this should set the cursor to the right position, but it gets overriden somewhere
//$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
//$.Autocompleter.Selection(input, progress + separator, progress + separator);
v = words.join( options.multipleSeparator );
}
v += options.multipleSeparator;
@@ -333,7 +333,7 @@ $.Autocompleter = function(input, options) {
if (!options.matchCase)
term = term.toLowerCase();
var data = cache.load(term);
// recieve the cached data
// receive the cached data
if (data && data.length) {
success(term, data);
// if an AJAX url has been supplied, try loading the data now

View File

@@ -177,7 +177,7 @@ public class HandleServlet extends DSpaceServlet
if (modSince != -1 && item.getLastModified().getTime() < modSince)
{
// Item has not been modified since requested date,
// hence bitstream has not; return 304
// hence bitstream has not been, either; return 304
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
}
else
@@ -380,7 +380,7 @@ public class HandleServlet extends DSpaceServlet
boolean suggestEnable = false;
if (!ConfigurationManager.getBooleanProperty("webui.suggest.enable"))
{
// do nothing, the suggestLink is allready set to false
// do nothing, the suggestLink is already set to false
}
else
{

View File

@@ -422,7 +422,7 @@
<p>Use this tool to set and clear policies for items or bitstreams across a whole collection. Be careful about using the <strong>Clear Policies</strong> button.</p>
<p>Select the collection from the top list and the group you want to give or remove permission for from the bottom list. Then select the type of object (item or bistream) that you want to edit permissions for. Then select the action from the drop-down.</p>
<p>Select the collection from the top list and the group you want to give or remove permission for from the bottom list. Then select the type of object (item or bitstream) that you want to edit permissions for. Then select the action from the drop-down.</p>
<p>For example, say you wanted to give everyone in a group 'privileged_users' <strong>Read</strong> access to all of the bitstreams in a restricted collection. You'd select 'privileged users' from the top list, 'bitstream' from the 'content type' drop-down, 'privileged_users' from the 'group' list, 'Read' from the 'action' drop-down, and click 'Add policy'.</p>
@@ -440,7 +440,7 @@
<h3><a name="editlicense"></a>Edit Default License</h3>
<p>You can use this tool to edit the default license of DSpace</p>
<p>The default license is used when no collection specific license is defined.</p>
<p>Note that changing the default license has no effect on allready published items.</p>
<p>Note that changing the default license has no effect on already published items.</p>
<p>Some substitution variables are available to make possible configure a contextual submission license:</p>
<ul>
<li><strong>%1$s</strong> will be translated in the "submitter first name"</li>

View File

@@ -5,7 +5,7 @@
*
* http://www.dspace.org/license/
*/
/* Print style sheet for DSpace */
/* Print stylesheet for DSpace */
body, a {
color: black;
background: white;

View File

@@ -12,7 +12,7 @@
margin-bottom:5px;
font-family:verdana;
color:#333;
}
}
#main {
border-left:1px solid #D0D0D0;
@@ -22,11 +22,11 @@
background:#fff;
margin-left:50px;
margin-right:50px;
}
}
/* Looks like you have to specify the width of #menu
or IE5 Mac stretches it all the way across the div, and
Opera streches it half way. */
Opera streches it halfway. */
#main #menu {
border-left:1px dotted #ccc;
@@ -35,17 +35,17 @@ Opera streches it half way. */
width:230px;
background:white;
margin:0px 0px 10px 10px;
}
}
td, h3, p,h1,pre {
margin:0px 20px 20px 20px;
font-size:11px;
line-height:140%;
}
}
.header {
padding-left: 10px;
padding-top:30px;
padding-left: 10px;
padding-top:30px;
}
.nav {
@@ -60,5 +60,5 @@ Opera streches it half way. */
}
.dent {
margin-left:64px;
}
margin-left:64px;
}

View File

@@ -911,7 +911,7 @@
throws java.io.IOException
{
DCValue[] unfiltered = item.getMetadata(schema, element, Item.ANY, Item.ANY);
// filter out both unqualified and qualified values occuring elsewhere in inputs
// filter out both unqualified and qualified values occurring elsewhere in inputs
List<DCValue> filtered = new ArrayList<DCValue>();
for (int i = 0; i < unfiltered.length; i++)
{

View File

@@ -126,7 +126,7 @@
}
else
{
// do nothing the date is allready set to "without date"
// do nothing the date is already set to "without date"
}
String contributor = LocaleSupport.getLocalizedMessage(pageContext, "jsp.general.without-contributor");
DCValue[] contributors = item.getMetadata("dc", "contributor", Item.ANY, Item.ANY);
@@ -137,7 +137,7 @@
}
else
{
// do nothing the contributor is allready set to anonymous
// do nothing the contributor is already set to anonymous
}
String title = LocaleSupport.getLocalizedMessage(pageContext, "jsp.general.untitled");
DCValue[] titles = item.getMetadata("dc", "title", null, Item.ANY);
@@ -148,7 +148,7 @@
}
else
{
// do nothing the title is allready set to untitled
// do nothing the title is already set to untitled
}

View File

@@ -32,8 +32,8 @@ public class DatasetDSpaceObjectGenerator extends DatasetGenerator {
dsoRepresentations.add(representation);
}
public void addDsoChild(int type, int max, boolean seperate, int nameLength){
DSORepresentation rep = new DSORepresentation(type, max, seperate);
public void addDsoChild(int type, int max, boolean separate, int nameLength){
DSORepresentation rep = new DSORepresentation(type, max, separate);
rep.setNameLength(nameLength);
dsoRepresentations.add(rep);
}

View File

@@ -81,8 +81,8 @@ public class StatisticsDataVisits extends StatisticsData
public Dataset createDataset(Context context) throws SQLException,
SolrServerException, ParseException
{
//Check if we already have one.
//If we do then give it back.
// Check if we already have one.
// If we do then give it back.
if(getDataset() != null)
{
return getDataset();
@@ -97,8 +97,8 @@ public class StatisticsDataVisits extends StatisticsData
processAxis(dataSet, datasetQueries);
}
//Now lets determine our values.
//First check if we have a date facet & if so find it.
// Now lets determine our values.
// First check if we have a date facet & if so find it.
DatasetTimeGenerator dateFacet = null;
if (getDatasetGenerators().get(0) instanceof DatasetTimeGenerator
|| (1 < getDatasetGenerators().size() && getDatasetGenerators()
@@ -118,7 +118,7 @@ public class StatisticsDataVisits extends StatisticsData
// 2. DETERMINE VALUES //
/////////////////////////
boolean showTotal = false;
//Check if we need our total
// Check if we need our total
if ((getDatasetGenerators().get(0) != null && getDatasetGenerators()
.get(0).isIncludeTotal())
|| (1 < getDatasetGenerators().size()
@@ -147,7 +147,7 @@ public class StatisticsDataVisits extends StatisticsData
addFilters(dateFilter);
}
//Determine our filterQuery
// Determine our filterQuery
String filterQuery = null;
for (int i = 0; i < getFilters().size(); i++) {
if(filterQuery == null)
@@ -164,34 +164,34 @@ public class StatisticsDataVisits extends StatisticsData
}
// System.out.println("FILTERQUERY: " + filterQuery);
//We determine our values on the queries resolved above
// We determine our values on the queries resolved above
Dataset dataset = null;
//Run over our queries.
//First how many queries do we have ?
// Run over our queries.
// First how many queries do we have ?
if(dateFacet != null){
//So do all the queries and THEN do the date facet
// So do all the queries and THEN do the date facet
for (int i = 0; i < datasetQueries.size(); i++) {
DatasetQuery dataSetQuery = datasetQueries.get(i);
if(dataSetQuery.getQueries().size() != 1){
//TODO: do this
// TODO: do this
}else{
String query = dataSetQuery.getQueries().get(0).getQuery();
if(dataSetQuery.getMax() == -1){
//We are asking from our current query all the visits faceted by date
// We are asking from our current query all the visits faceted by date
ObjectCount[] results = SolrLogger.queryFacetDate(query, filterQuery, dataSetQuery.getMax(), dateFacet.getDateType(), dateFacet.getStartDate(), dateFacet.getEndDate(), showTotal);
dataset = new Dataset(1, results.length);
//Now that we have our results put em in a matrix
// Now that we have our results put em in a matrix
for(int j = 0; j < results.length; j++){
dataset.setColLabel(j, results[j].getValue());
dataset.addValueToMatrix(0, j, results[j].getCount());
}
//TODO: change this !
//Now add the column label
// TODO: change this !
// Now add the column label
dataset.setRowLabel(0, getResultName(dataSetQuery.getName(), dataSetQuery, context));
dataset.setRowLabelAttr(0, getAttributes(dataSetQuery.getName(), dataSetQuery, context));
}else{
//We need to get the max objects and the next part of the query on them (next part beeing the datasettimequery
// We need to get the max objects and the next part of the query on them (next part beeing the datasettimequery
ObjectCount[] maxObjectCounts = SolrLogger.queryFacetField(query, filterQuery, dataSetQuery.getFacetField(), dataSetQuery.getMax(), false, null);
for (int j = 0; j < maxObjectCounts.length; j++) {
ObjectCount firstCount = maxObjectCounts[j];
@@ -199,19 +199,19 @@ public class StatisticsDataVisits extends StatisticsData
ObjectCount[] maxDateFacetCounts = SolrLogger.queryFacetDate(newQuery, filterQuery, dataSetQuery.getMax(), dateFacet.getDateType(), dateFacet.getStartDate(), dateFacet.getEndDate(), showTotal);
//Make sure we have a dataSet
// Make sure we have a dataSet
if(dataset == null)
{
dataset = new Dataset(maxObjectCounts.length, maxDateFacetCounts.length);
}
//TODO: this is a very dirty fix change this ! ! ! ! ! !
// TODO: this is a very dirty fix change this ! ! ! ! ! !
dataset.setRowLabel(j, getResultName(firstCount.getValue(), dataSetQuery, context));
dataset.setRowLabelAttr(j, getAttributes(firstCount.getValue(), dataSetQuery, context));
for (int k = 0; k < maxDateFacetCounts.length; k++) {
ObjectCount objectCount = maxDateFacetCounts[k];
//No need to add this many times
// No need to add this many times
if(j == 0)
{
dataset.setColLabel(k, objectCount.getValue());
@@ -226,15 +226,15 @@ public class StatisticsDataVisits extends StatisticsData
}
}
}else{
//We do NOT have a date facet so just do queries after each other
// We do NOT have a date facet so just do queries after each other
/*
for (int i = 0; i < datasetQueries.size(); i++) {
DatasetQuery datasetQuery = datasetQueries.get(i);
if(datasetQuery.getQueries().size() != 1){
//TODO: do this
// TODO: do this
}else{
String query = datasetQuery.getQueries().get(0);
//Loop over the queries & do em
// Loop over the queries & do em
// ObjectCount[] topCounts = SolrLogger.queryFacetField(query, );
}
}
@@ -248,16 +248,16 @@ public class StatisticsDataVisits extends StatisticsData
// }else{
// TODO: do this
// }
//Check if we have more queries that need to be done
// Check if we have more queries that need to be done
if(datasetQueries.size() == 2){
DatasetQuery secondDataSet = datasetQueries.get(1);
//Now do the second one
// Now do the second one
ObjectCount[] topCounts2 = queryFacetField(secondDataSet, secondDataSet.getQueries().get(0).getQuery(), filterQuery);
//Now that have results for both of them lets do x.y queries
// Now that have results for both of them lets do x.y queries
List<String> facetQueries = new ArrayList<String>();
for (ObjectCount count2 : topCounts2) {
String facetQuery = secondDataSet.getFacetField() + ":" + ClientUtils.escapeQueryChars(count2.getValue());
//Check if we also have a type present (if so this should be put into the query
// Check if we also have a type present (if so this should be put into the query)
if ("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
{
facetQuery += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
@@ -269,7 +269,7 @@ public class StatisticsDataVisits extends StatisticsData
ObjectCount count1 = topCounts1[i];
ObjectCount[] currentResult = new ObjectCount[topCounts2.length];
//Make sure we have a dataSet
// Make sure we have a dataSet
if(dataset == null)
{
dataset = new Dataset(topCounts2.length, topCounts1.length);
@@ -278,7 +278,7 @@ public class StatisticsDataVisits extends StatisticsData
dataset.setColLabelAttr(i, getAttributes(count1.getValue(), firsDataset, context));
String query = firsDataset.getFacetField() + ":" + ClientUtils.escapeQueryChars(count1.getValue());
//Check if we also have a type present (if so this should be put into the query
// Check if we also have a type present (if so this should be put into the query)
if("id".equals(firsDataset.getFacetField()) && firsDataset.getQueries().get(0).getDsoType() != -1)
{
query += " AND type:" + firsDataset.getQueries().get(0).getDsoType();
@@ -287,9 +287,9 @@ public class StatisticsDataVisits extends StatisticsData
Map<String, Integer> facetResult = SolrLogger.queryFacetQuery(query, filterQuery, facetQueries);
//TODO: the show total
//No need to add this many times
//TODO: dit vervangen door te displayen value
// TODO: the show total
// No need to add this many times
// TODO: dit vervangen door te displayen value
for (int j = 0; j < topCounts2.length; j++) {
ObjectCount count2 = topCounts2[j];
if(i == 0) {
@@ -297,15 +297,15 @@ public class StatisticsDataVisits extends StatisticsData
dataset.setRowLabelAttr(j, getAttributes(count2.getValue(), secondDataSet, context));
}
//Get our value the value is the same as the query
// Get our value the value is the same as the query
String facetQuery = secondDataSet.getFacetField() + ":" + ClientUtils.escapeQueryChars(count2.getValue());
//Check if we also have a type present (if so this should be put into the query
// Check if we also have a type present (if so this should be put into the query
if ("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
{
facetQuery += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
}
//We got our query so now get the value
// We got our query so now get the value
dataset.addValueToMatrix(j, i, facetResult.get(facetQuery));
}
@@ -313,20 +313,20 @@ public class StatisticsDataVisits extends StatisticsData
for (int j = 0; j < topCounts2.length; j++) {
ObjectCount count2 = topCounts2[j];
String query = firsDataset.getFacetField() + ":" + count1.getValue();
//Check if we also have a type present (if so this should be put into the query
// Check if we also have a type present (if so this should be put into the query
if("id".equals(firsDataset.getFacetField()) && firsDataset.getQueries().get(0).getDsoType() != -1)
query += " AND type:" + firsDataset.getQueries().get(0).getDsoType();
query += " AND " + secondDataSet.getFacetField() + ":" + count2.getValue();
//Check if we also have a type present (if so this should be put into the query
// Check if we also have a type present (if so this should be put into the query
if("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
query += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
long count = SolrLogger.queryFacetQuery(query, filterQuery);
//TODO: the show total
//No need to add this many times
//TODo: dit vervangen door te displayen value
// TODO: the show total
// No need to add this many times
// TODO: dit vervangen door te displayen value
if(i == 0) {
dataset.setRowLabel(j, getResultName(count2.getValue(), secondDataSet, context));
dataset.setRowLabelAttr(j, getAttributes(count2.getValue(), secondDataSet, context));
@@ -341,7 +341,7 @@ public class StatisticsDataVisits extends StatisticsData
// System.out.println("BOTH");
} else{
//Make sure we have a dataSet
// Make sure we have a dataSet
dataset = new Dataset(1, topCounts1.length);
for (int i = 0; i < topCounts1.length; i++) {
ObjectCount count = topCounts1[i];
@@ -365,38 +365,38 @@ public class StatisticsDataVisits extends StatisticsData
private void processAxis(DatasetGenerator datasetGenerator, List<DatasetQuery> queries) throws SQLException {
if(datasetGenerator instanceof DatasetDSpaceObjectGenerator){
DatasetDSpaceObjectGenerator dspaceObjAxis = (DatasetDSpaceObjectGenerator) datasetGenerator;
//Get the types involved
// Get the types involved
List<DSORepresentation> dsoRepresentations = dspaceObjAxis.getDsoRepresentations();
for (int i = 0; i < dsoRepresentations.size(); i++){
DatasetQuery datasetQuery = new DatasetQuery();
Integer dsoType = dsoRepresentations.get(i).getType();
boolean seperate = dsoRepresentations.get(i).getSeparate();
boolean separate = dsoRepresentations.get(i).getSeparate();
Integer dsoLength = dsoRepresentations.get(i).getNameLength();
//Check if our type is our current object
// Check if our type is our current object
if(currentDso != null && dsoType == currentDso.getType()){
Query query = new Query();
query.setDso(currentDso.getID(), currentDso.getType(), dsoLength);
datasetQuery.addQuery(query);
}else{
//TODO: only do this for bitstreams from an item
// TODO: only do this for bitstreams from an item
Query query = new Query();
if(currentDso != null && seperate && dsoType == Constants.BITSTREAM){
//CURRENTLY THIS IS ONLY POSSIBLE FOR AN ITEM ! ! ! ! ! ! !
//We need to get the separate bitstreams from our item and make a query for each of them
if(currentDso != null && separate && dsoType == Constants.BITSTREAM){
// CURRENTLY THIS IS ONLY POSSIBLE FOR AN ITEM ! ! ! ! ! ! !
// We need to get the separate bitstreams from our item and make a query for each of them
Item item = (Item) currentDso;
for (int j = 0; j < item.getBundles().length; j++) {
Bundle bundle = item.getBundles()[j];
for (int k = 0; k < bundle.getBitstreams().length; k++) {
Bitstream bitstream = bundle.getBitstreams()[k];
if(!bitstream.getFormat().isInternal()){
//Add a separate query for each bitstream
// Add a separate query for each bitstream
query.setDso(bitstream.getID(), bitstream.getType(), dsoLength);
}
}
}
} else {
//We have something else than our current object.
//So we need some kind of children from it, so put this in our query
// We have something else than our current object.
// So we need some kind of children from it, so put this in our query
query.setOwningDso(currentDso);
query.setDsoLength(dsoLength);
@@ -416,7 +416,7 @@ public class StatisticsDataVisits extends StatisticsData
break;
}
datasetQuery.setName(title);
//Put the type in so we only get the children of the type specified
// Put the type in so we only get the children of the type specified
query.setDsoType(dsoType);
}
datasetQuery.addQuery(query);
@@ -431,7 +431,7 @@ public class StatisticsDataVisits extends StatisticsData
DatasetTypeGenerator typeAxis = (DatasetTypeGenerator) datasetGenerator;
DatasetQuery datasetQuery = new DatasetQuery();
//First make sure our query is in order
// First make sure our query is in order
Query query = new Query();
if(currentDso != null)
{
@@ -439,7 +439,7 @@ public class StatisticsDataVisits extends StatisticsData
}
datasetQuery.addQuery(query);
//Then add the rest
// Then add the rest
datasetQuery.setMax(typeAxis.getMax());
datasetQuery.setFacetField(typeAxis.getType());
datasetQuery.setName(typeAxis.getType());
@@ -567,7 +567,7 @@ public class StatisticsDataVisits extends StatisticsData
}
// If possible reference this bitstream via a handle, however this may
// be null if a handle has not yet been assigned. In this case refrence the
// be null if a handle has not yet been assigned. In this case reference the
// item its internal id. In the last case where the bitstream is not associated
// with an item (such as a community logo) then reference the bitstreamID directly.
String identifier = null;

View File

@@ -14,13 +14,13 @@ import java.util.Set;
/**
* A Spare v4 IPTable implementation that uses nested HashMaps
* to optimize IP Address matching over ranges of IP Addresses.
* to optimize IP address matching over ranges of IP addresses.
*
* @author mdiggory at atmire.com
*/
public class IPTable {
/* A lookup tree for IP Addresses and SubnetRanges */
/* A lookup tree for IP addresses and SubnetRanges */
private Map<String, Map<String, Map<String, Set<String>>>> map =
new HashMap<String, Map<String, Map<String, Set<String>>>>();
@@ -123,7 +123,7 @@ public class IPTable {
if (subnets.length != 4)
{
throw new IPFormatException("needs to be single IP Address");
throw new IPFormatException("needs to be a single IP address");
}
Map<String, Map<String, Set<String>>> first = map.get(subnets[0]);

View File

@@ -33,7 +33,7 @@ public class SpiderDetector {
private static Logger log = Logger.getLogger(SpiderDetector.class);
/**
* Sparse HAshTable structure to hold IP Address Ranges.
* Sparse HashTable structure to hold IP address ranges.
*/
private static IPTable table = null;

View File

@@ -26,7 +26,7 @@ function getObjectModel()
/**
* Return the DSpace context for this request since each HTTP request generates
* a new context this object should never be stored and instead allways accessed
* a new context this object should never be stored and instead always accessed
* through this method so you are ensured that it is the correct one.
*/
function getDSContext()
@@ -35,7 +35,7 @@ function getDSContext()
}
/**
* The result object could potentialy contain a notice message and a list of
* The result object could potentially contain a notice message and a list of
* errors. If either of these are present then they are added to the sitemap's
* parameters.
*/
@@ -212,7 +212,7 @@ function getCollection(handle, serviceDoc, DSClient)
if (cocoon.request.get("deposit"))
{
// A collection, or rather the location of one, has been selected, so lets
// A collection, or rather the location of one, has been selected, so let's
// see what file type and package format combos are available.
// We have a new request so need to attach the service doc again.

View File

@@ -20,7 +20,7 @@ public class AtomDocumentRequest
/** The password */
private String password;
/** The IP Address */
/** The IP address */
private String IPAddress;
/** The location */

View File

@@ -60,7 +60,7 @@ public class Deposit
/** Deposit ID */
private String depositID;
/** The IP Address */
/** The IP address */
private String IPAddress;
/** The location */

View File

@@ -24,7 +24,7 @@ public class ServiceDocumentRequest
/** The onBehalf of name */
private String onBehalfOf;
/** The IP Address */
/** The IP address */
private String IPAddress;
/** The location */

View File

@@ -407,9 +407,9 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
cocoon.addLabel(T_COCOON_VERSION);
cocoon.addItem(org.apache.cocoon.Constants.VERSION);
//attempt to Display some basic info about Cocoon's Settings & Caches
// attempt to Display some basic info about Cocoon's Settings & Caches
//Get access to basic Cocoon Settings
// Get access to basic Cocoon Settings
if(this.settings!=null)
{
//Output Cocoon's Work Directory & Cache Directory
@@ -420,38 +420,38 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
}
// Check if we have access to Cocoon's Default Cache
//Cocoon's Main (Default) Store is used to store objects that are serializable
// Cocoon's Main (Default) Store is used to store objects that are serializable
if(this.storeDefault!=null)
{
//Store name is just the className (remove the package info though, just to save space)
// Store name is just the className (remove the package info though, just to save space)
String storeName = this.storeDefault.getClass().getName();
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
//display main store's cache info
// display main store's cache info
cocoon.addLabel(T_COCOON_MAIN_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storeDefault.hashCode())));
//display cache size & link to clear Cocoon's main cache
// display cache size & link to clear Cocoon's main cache
Item defaultSize = cocoon.addItem();
defaultSize.addContent(String.valueOf(this.storeDefault.size()) + " ");
defaultSize.addXref(contextPath + "/admin/panel?java=true&clearcache=true", T_COCOON_CACHE_CLEAR);
}
// Check if we have access to Cocoon's Persistent Cache
//Cocoon's Persistent Store may be used by the Default Cache/Store to delegate persistent storage
//(it's an optional store which may not exist)
// Cocoon's Persistent Store may be used by the Default Cache/Store to delegate persistent storage
// (it's an optional store which may not exist)
if(this.storePersistent!=null)
{
//Store name is just the className (remove the package info though, just to save space)
// Store name is just the className (remove the package info though, just to save space)
String storeName = this.storeDefault.getClass().getName();
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
//display persistent store's cache size info
// display persistent store's cache size info
cocoon.addLabel(T_COCOON_PERSISTENT_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storePersistent.hashCode())));
cocoon.addItem(String.valueOf(this.storePersistent.size()));
}
//Check if we have access to Cocoon's StoreJanitor
//The Store Janitor manages all of Cocoon's "transient caches/stores"
// Check if we have access to Cocoon's StoreJanitor
// The Store Janitor manages all of Cocoon's "transient caches/stores"
// These "transient" stores are used for non-serializable objects or objects whose
// storage doesn't make sense across a server restart.
if(this.storeJanitor!=null)
@@ -460,14 +460,14 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
Iterator i = this.storeJanitor.iterator();
while(i.hasNext())
{
//get the Cache Store
// get the Cache Store
Store store = (Store) i.next();
//Store name is just the className (remove the package info though, just to save space)
// Store name is just the className (remove the package info though, just to save space)
String storeName = store.getClass().getName();
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
//display its size information
// display its size information
cocoon.addLabel(T_COCOON_TRANS_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(store.hashCode())));
cocoon.addItem(String.valueOf(store.size()));
}
@@ -565,7 +565,7 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
countdown.addOption(30,T_alerts_countdown_30);
countdown.addOption(60,T_alerts_countdown_60);
// Is there a current count down active?
// Is there a current countdown active?
if (SystemwideAlerts.isAlertActive() && SystemwideAlerts.getCountDownToo() - System.currentTimeMillis() > 0)
{
countdown.addOption(true, -1, T_alerts_countdown_keep);
@@ -808,7 +808,7 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
/**
* Compare these two activity events based upon the given sort parameter. In the case of a tie,
* allways fallback to sorting based upon the timestamp.
* always fallback to sorting based upon the timestamp.
*/
@Override
public int compare(E a, E b)
@@ -863,7 +863,7 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
{
// Ensure that all sessions with an EPersonID associated are
// ordered to the top. Otherwise fall back to comparing session
// IDs. Unfortunitaly we can not compare eperson names because
// IDs. Unfortunately, we cannot compare eperson names because
// we do not have access to a context object.
if (a.getEPersonID() > 0 && b.getEPersonID() < 0)
{
@@ -883,7 +883,7 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
}
}
// All ways fall back to sorting by time, when events are equal.
// Always fall back to sorting by time, when events are equal.
if (a.getTimeStamp() > b.getTimeStamp())
{
return 1; // A > B

View File

@@ -49,7 +49,7 @@ import org.xml.sax.SAXException;
/**
* Utility methods to processes actions on Communities and Collections.
*
* @author scott phillips
* @author Scott Phillips
*/
public class FlowContainerUtils
{
@@ -628,7 +628,7 @@ public class FlowContainerUtils
if (roleID != 0)
{
throw new UIException("Unable to create a new default read group because either the group allready exists or multiple groups are assigned the default privleges.");
throw new UIException("Unable to create a new default read group because either the group already exists or multiple groups are assigned the default privileges.");
}
Collection collection = Collection.find(context,collectionID);
@@ -668,7 +668,7 @@ public class FlowContainerUtils
if (roleID < 1)
{
throw new UIException("Unable to delete the default read role because the role is either allready assigned to the anonymous group or multiple groups are assigned the default priveleges.");
throw new UIException("Unable to delete the default read role because the role is either already assigned to the anonymous group or multiple groups are assigned the default privileges.");
}
Collection collection = Collection.find(context,collectionID);
@@ -1255,8 +1255,8 @@ public class FlowContainerUtils
* then an error message will be returned that might (sometimes not) tell the user how
* to correct the problem.
*
* @param value The metadat's value
* @return An error string of the problem or null if there is no problem with the metadata's value.
* @param value The metadata value
* @return An error string of the problem or null if there is no problem with the metadata value.
*/
public static String checkXMLFragment(String value)
{

View File

@@ -31,7 +31,7 @@ import org.dspace.eperson.EPersonDeletionException;
* Utility methods to processes actions on EPeople. These methods are used
* exclusively from the administrative flow scripts.
*
* @author scott phillips
* @author Scott Phillips
*/
public class FlowEPersonUtils {
@@ -90,7 +90,7 @@ public class FlowEPersonUtils {
}
// Check if the email address is all ready being used.
// Check if the email address is already being used.
EPerson potentialDupicate = EPerson.findByEmail(context,email);
if (potentialDupicate != null)
{

View File

@@ -26,9 +26,9 @@ import org.dspace.eperson.Group;
/**
* Utility methods to processes actions on Groups. These methods are used
* exclusivly from the administrative flow scripts.
* exclusively from the administrative flow scripts.
*
* @author scott phillips
* @author Scott Phillips
*/
public class FlowGroupUtils {
@@ -138,7 +138,7 @@ public class FlowGroupUtils {
*/
public static String[] addMember(String[] list, String id)
{
// FIXME: this is terribly ineffecient.
// FIXME: this is terribly inefficient.
List<String> newList = new ArrayList<String>(Arrays.asList(list));
newList.add(id);
return newList.toArray(new String[newList.size()]);
@@ -153,7 +153,7 @@ public class FlowGroupUtils {
*/
public static String[] removeMember(String[] list, String id)
{
// FIXME: this is terribly ineffecient.
// FIXME: this is terribly inefficient.
List<String> newList = new ArrayList<String>(Arrays.asList(list));
newList.remove(id);
return newList.toArray(new String[newList.size()]);
@@ -176,7 +176,7 @@ public class FlowGroupUtils {
{
FlowResult result = new FlowResult();
// Decode the name incase it uses non-ascii characters.
// Decode the name in case it uses non-ascii characters.
try
{
newName = URLDecoder.decode(newName, Constants.DEFAULT_ENCODING);
@@ -189,7 +189,7 @@ public class FlowGroupUtils {
Group group = null;
if (groupID == -1)
{
// First check if the name is blank.
// First, check if the name is blank.
if (newName == null || newName.length() == 0)
{
// Group's can not have blank names.
@@ -201,7 +201,7 @@ public class FlowGroupUtils {
return result;
}
// Create a new group, check if the newName is allready in use.
// Create a new group, check if the newName is already in use.
Group potentialDuplicate = Group.findByName(context,newName);
if (potentialDuplicate == null)
@@ -212,12 +212,12 @@ public class FlowGroupUtils {
}
else
{
// The name is allready in use, return in error.
// The name is already in use, return an error.
result.setContinue(false);
result.addError("group_name");
result.addError("group_name_duplicate");
result.setOutcome(false);
result.setMessage(new Message("default","The group name is allready in use"));
result.setMessage(new Message("default","The group name is already in use"));
return result;
}
@@ -230,7 +230,7 @@ public class FlowGroupUtils {
// Only update the name if there has been a change.
if (newName != null && newName.length() > 0 && !name.equals(newName))
{
// The group name is to be updated, check if the newName is allready in use.
// The group name is to be updated, check if the newName is already in use.
Group potentialDuplicate = Group.findByName(context,newName);
if (potentialDuplicate == null)
@@ -240,19 +240,19 @@ public class FlowGroupUtils {
}
else
{
// The name is allready in use, return in error.
// The name is already in use, return an error.
result.setContinue(false);
result.addError("group_name");
result.addError("group_name_duplicate");
result.setOutcome(false);
result.setMessage(new Message("default","The group name is allready in use"));
result.setMessage(new Message("default","The group name is already in use"));
return result;
}
}
}
// Second, Prepare to check members by turning arrays into lists
// Second, prepare to check members by turning arrays into lists
List<Integer> newEPeopleIDs = new ArrayList<Integer>();
for (String epeopleID : newEPeopleIDsArray)
{
@@ -316,7 +316,7 @@ public class FlowGroupUtils {
group.update();
context.commit();
// Let's record our group id incase we created a new one.
// Let's record our group id in case we created a new one.
result.setParameter("groupID", group.getID());
result.setContinue(true);
result.setOutcome(true);
@@ -326,7 +326,7 @@ public class FlowGroupUtils {
}
/**
* Remove the specified groups. It is assumed that the user has allready confirm this selection.
* Remove the specified groups. It is assumed that the user has already confirmed this selection.
*
* @param context The current DSpace context
* @param groupIDs A list of groups to be removed.
@@ -400,7 +400,7 @@ public class FlowGroupUtils {
/**
* These are the possible collection suffixes, all groups which are
* specific to a collection will end with one of these. The collection
* id should be inbetween the prefix and the suffix.
* id should be in between the prefix and the suffix.
*
* Note: the order of these suffixes are important, see getCollectionRole()
*/
@@ -433,7 +433,7 @@ public class FlowGroupUtils {
}
catch (NumberFormatException nfe)
{
// Somethnig went wrong, just ignore the exception and
// Something went wrong, just ignore the exception and
// continue searching for a collection id
} // try & catch
} // if it ends with a proper suffix.

View File

@@ -38,7 +38,7 @@ import org.dspace.handle.HandleManager;
/**
* Utility methods to processes actions on Groups. These methods are used
* exclusivly from the administrative flow scripts.
* exclusively from the administrative flow scripts.
*
* @author Jay Paz
* @author Scott Phillips
@@ -51,8 +51,8 @@ public class FlowItemUtils
private static final Message T_metadata_added = new Message("default","New metadata was added.");
private static final Message T_item_withdrawn = new Message("default","The item has been withdrawn.");
private static final Message T_item_reinstated = new Message("default","The item has been reinstated.");
private static final Message T_item_moved = new Message("default","The item has been moved.");
private static final Message T_item_move_destination_not_found = new Message("default","The selected destination collection could not be found.");
private static final Message T_item_moved = new Message("default","The item has been moved.");
private static final Message T_item_move_destination_not_found = new Message("default","The selected destination collection could not be found.");
private static final Message T_bitstream_added = new Message("default","The new bitstream was successfully uploaded.");
private static final Message T_bitstream_failed = new Message("default","Error while uploading file.");
private static final Message T_bitstream_updated = new Message("default","The bitstream has been updated.");

View File

@@ -16,14 +16,14 @@ import org.dspace.app.xmlui.wing.Message;
/**
* This class represents the results that may be generated during a flow script
* in this administrative section. Typicaly, some method preforms an operation
* in this administrative section. Typically, some method performs an operation
* and returns an object of type FlowResult, then the flow script can inspect
* the results object to determine what the next course of action is.
*
* Basicaly, this results object stores all the errors and contiunation states
* Basically, this results object stores all the errors and continuation states
* that need to be represented. There are four types of information stored:
*
* 1) Continuation, this is a simple boolean variable that indicates wheather
* 1) Continuation, this is a simple boolean variable that indicates whether
* the required operation is complete and the user may continue on to the next step.
*
* 2) Notice information, this is a simple encoding of a notice message to be displayed
@@ -32,10 +32,10 @@ import org.dspace.app.xmlui.wing.Message;
* or characters are required.
*
* 3) Errors, this is a list of errors that were encountered during processing.
* Typical, it just consists of a list of errored fields. However occasionaly there
* Typically, it just consists of a list of errored fields. However occasionally there
* may be other specialized errors listed.
*
* 4) Parameters, this is a map of attached parameters that may be relevnt to the
* 4) Parameters, this is a map of attached parameters that may be relevant to the
* result. This should be used for things such as generated id's when objects are newly
* created.
*
@@ -44,7 +44,7 @@ import org.dspace.app.xmlui.wing.Message;
public class FlowResult {
/**
* Determine wheather the operation has been completed enough that the user
* Determine whether the operation has been completed enough that the user
* may successufully continue on to the next step.
*/
private boolean continuep;
@@ -52,18 +52,18 @@ public class FlowResult {
/**
* Notice parameters:
*
* Outcome: The outcome of the notice, may be either success, failure, or netural.
* Outcome: The outcome of the notice, may be either success, failure, or neutral.
*
* Header: The notice's label, an i18n dictionary key.
*
* message: The main body of the notice, an i18n dictionary key.
*
* characters: Supplementaiol information for the notice, plain text. This is
* typicaly used for exepctions.
* characters: Supplemental information for the notice, plain text. This is
* typically used for exceptions.
*
*/
private enum Outcome{ SUCCESS, FAILURE, NETURAL};
private Outcome outcome = Outcome.NETURAL;
private enum Outcome{ SUCCESS, FAILURE, NEUTRAL};
private Outcome outcome = Outcome.NEUTRAL;
private Message header;
private Message message;
private String characters;
@@ -103,8 +103,8 @@ public class FlowResult {
/**
* Set the notice outcome to either success or failure. Note,
* the default outcome is netural, once an outcome is set the
* netural outcome can never be atained again.
* the default outcome is neutral, once an outcome is set the
* neutral outcome can never be attained again.
*
* @param success True for success, false for failure.
*/
@@ -122,7 +122,7 @@ public class FlowResult {
/**
* Get the notice outcome in string form, either success
* or failure. If the outcome is netural then null is returned.
* or failure. If the outcome is neutral then null is returned.
*/
public String getOutcome()
{
@@ -231,7 +231,7 @@ public class FlowResult {
}
/**
* Return the list of errors in string form, i.e. a comma seperated list
* Return the list of errors in string form, i.e. a comma-separated list
* of errors. If there are no errors then null is returned.
*/
public String getErrorString()
@@ -258,7 +258,7 @@ public class FlowResult {
/**
* Attatch a new parameter to this result object with the specified
* Attach a new parameter to this result object with the specified
* name & value.
*
* @param name The parameter's name

View File

@@ -186,7 +186,7 @@ public class ItemExport extends AbstractDSpaceTransformer implements
// Special case, don't cache anything if the user is logging
// in. The problem occures because of timming, this cache key
// is generated before we know whether the operation has
// succeded or failed. So we don't know whether to cache this
// succeeded or failed. So we don't know whether to cache this
// under the user's specific cache or under the anonymous user.
if (request.getParameter("login_email") != null
|| request.getParameter("login_password") != null

View File

@@ -102,7 +102,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
// Special case, don't cache anything if the user is logging
// in. The problem occures because of timming, this cache key
// is generated before we know whether the operation has
// succeded or failed. So we don't know whether to cache this
// succeeded or failed. So we don't know whether to cache this
// under the user's specific cache or under the anonymous user.
if (request.getParameter("login_email") != null ||
request.getParameter("login_password") != null ||

View File

@@ -19,9 +19,9 @@ import org.dspace.app.xmlui.wing.element.Para;
/**
* Display a generic error message saying the user can
* not preform the requested action.
* not perform the requested action.
*
* @author Scott phillips
* @author Scott Phillips
*/
public class NotAuthorized extends AbstractDSpaceTransformer
{

View File

@@ -31,7 +31,7 @@ import org.dspace.authorize.AuthorizeException;
* can describe the new eperson before being created. If the user's
* input is incorrect in someway then they may be returning here with
* some fields in error. In particular there is a special case for the
* condition when the email-adress entered is allready in use by
* condition when the email-address entered is already in use by
* another user.
*
* @author Alexey Maslov

View File

@@ -26,7 +26,7 @@ import org.dspace.eperson.EPerson;
/**
* The manage epeople page is the starting point page for managing
* epeople. From here the user is able to browse or search for epeople,
* once identified the user can selected them for deletition by selecting
* once identified the user can selected them for deletion by selecting
* the checkboxes and clicking delete or click their name to edit the
* eperson.
*

View File

@@ -24,7 +24,7 @@ import org.dspace.eperson.Group;
/**
* Present the user with a list of soon-to-be-deleted Groups.
* If the user clicks confirm deletition then they will be
* If the user clicks confirm deletion then they will be
* deleted otherwise they will be spared the wrath of deletion.
* @author Scott Phillips
*/

View File

@@ -414,7 +414,7 @@ public class EditGroupForm extends AbstractDSpaceTransformer
personData.addCell().addXref(url, fullName);
personData.addCell().addXref(url, email);
// check if they are allready a member of the group
// check if they are already a member of the group
if (memberEPeopleIDs.contains(person.getID()))
{
// Check if they really members or just pending members
@@ -531,7 +531,7 @@ public class EditGroupForm extends AbstractDSpaceTransformer
}
// Check if the group is allready a member or would create a cycle.
// Check if the group is already a member or would create a cycle.
if (memberGroupIDs.contains(group.getID()))
{
// Check if they really members or just pending members
@@ -691,12 +691,12 @@ public class EditGroupForm extends AbstractDSpaceTransformer
/**
* Add a singe member row for groups.
* Add a single member row for groups.
*
* @param table The table to add the row too.
* @param group The group being displayed in this row.
* @param highlight Should the row be highlighted.
* @param pendingAddition Is this group pending additition
* @param pendingAddition Is this group pending addition
* @param pendingRemoval Is this group pending removal
*/
private void addMemberRow(Table table,Group group, boolean highlight, boolean pendingAddition, boolean pendingRemoval) throws WingException, SQLException

View File

@@ -31,7 +31,7 @@ import org.dspace.eperson.Group;
/**
* Manage groups page is the entry point for group management. From here the user
* may browse/search a the list of groups, they may also add new groups or select
* exiting groups to edit or delete.
* existing groups to edit or delete.
*
* @author Alexey Maslov
* @author Scott Phillips

View File

@@ -164,7 +164,7 @@ public class AddBitstreamForm extends AbstractDSpaceTransformer
}
} else
{
// At least one bundle exists, does the user have privleges to upload to it?
// At least one bundle exists, does the user have privileges to upload to it?
Bundle bundle = bundles[0];
if (!AuthorizeManager.authorizeActionBoolean(context, bundle, Constants.ADD))
{

View File

@@ -29,7 +29,7 @@ import org.dspace.content.Item;
/**
* This page is used as a general confirmation page for any
* actions on items. It will display the item and ask if the
* user is sure they want to preform the action.
* user is sure they want to perform the action.
*
* The "confirm" parameter determines what action is confirmed.
* There are three possible values, "delete", "withdraw", or
@@ -138,7 +138,7 @@ public class ConfirmItemForm extends AbstractDSpaceTransformer {
/**
* Compare two metadata element's name so that they may be sorted.
* Compare names of two metadata elements so that they may be sorted.
*/
static class DCValueComparator implements Comparator, Serializable {
public int compare(Object arg0, Object arg1) {

View File

@@ -37,7 +37,7 @@ import org.dspace.core.Constants;
* edit them, or upload new bitstreams.
*
* @author Jay Paz
* @author Scott phillips
* @author Scott Phillips
*/
public class EditItemBitstreamsForm extends AbstractDSpaceTransformer {

View File

@@ -27,7 +27,7 @@ import org.dspace.core.Constants;
/**
* Display basic meta-meta information about the item and allow the user to change
* it's state such as withdraw or reinstate, possibily even completely deleting the item!
* its state such as withdraw or reinstate, possibly even completely deleting the item!
*
* @author Jay Paz
* @author Scott Phillips
@@ -58,12 +58,12 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
private static final Message T_label_auth = message("xmlui.administrative.item.EditItemStatusForm.label_auth");
private static final Message T_label_withdraw = message("xmlui.administrative.item.EditItemStatusForm.label_withdraw");
private static final Message T_label_reinstate = message("xmlui.administrative.item.EditItemStatusForm.label_reinstate");
private static final Message T_label_move = message("xmlui.administrative.item.EditItemStatusForm.label_move");
private static final Message T_label_move = message("xmlui.administrative.item.EditItemStatusForm.label_move");
private static final Message T_label_delete = message("xmlui.administrative.item.EditItemStatusForm.label_delete");
private static final Message T_submit_authorizations = message("xmlui.administrative.item.EditItemStatusForm.submit_authorizations");
private static final Message T_submit_withdraw = message("xmlui.administrative.item.EditItemStatusForm.submit_withdraw");
private static final Message T_submit_reinstate = message("xmlui.administrative.item.EditItemStatusForm.submit_reinstate");
private static final Message T_submit_move = message("xmlui.administrative.item.EditItemStatusForm.submit_move");
private static final Message T_submit_move = message("xmlui.administrative.item.EditItemStatusForm.submit_move");
private static final Message T_submit_delete = message("xmlui.administrative.item.EditItemStatusForm.submit_delete");
private static final Message T_na = message("xmlui.administrative.item.EditItemStatusForm.na");
@@ -106,7 +106,7 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
// PARA: Helpfull instructions
// PARA: Helpful instructions
main.addPara(T_para1);
@@ -137,7 +137,8 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
if(item.getHandle()==null){
itemInfo.addItem(T_na);
}
else{
else
{
itemInfo.addItem().addXref(ConfigurationManager.getProperty("dspace.url") + "/handle/" + item.getHandle(),ConfigurationManager.getProperty("dspace.url") + "/handle/" + item.getHandle());
}
@@ -150,46 +151,46 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
catch (AuthorizeException authex)
{
addNotAllowedButton(itemInfo.addItem(), "submit_authorization", T_submit_authorizations);
}
}
if(!item.isWithdrawn())
{
itemInfo.addLabel(T_label_withdraw);
try
{
AuthorizeUtil.authorizeWithdrawItem(context, item);
itemInfo.addItem().addButton("submit_withdraw").setValue(T_submit_withdraw);
}
catch (AuthorizeException authex)
{
addNotAllowedButton(itemInfo.addItem(), "submit_withdraw", T_submit_withdraw);
}
{
AuthorizeUtil.authorizeWithdrawItem(context, item);
itemInfo.addItem().addButton("submit_withdraw").setValue(T_submit_withdraw);
}
catch (AuthorizeException authex)
{
addNotAllowedButton(itemInfo.addItem(), "submit_withdraw", T_submit_withdraw);
}
}
else
{
itemInfo.addLabel(T_label_reinstate);
try
{
AuthorizeUtil.authorizeReinstateItem(context, item);
itemInfo.addItem().addButton("submit_reinstate").setValue(T_submit_reinstate);
}
catch (AuthorizeException authex)
{
addNotAllowedButton(itemInfo.addItem(), "submit_reinstate", T_submit_reinstate);
}
{
AuthorizeUtil.authorizeReinstateItem(context, item);
itemInfo.addItem().addButton("submit_reinstate").setValue(T_submit_reinstate);
}
catch (AuthorizeException authex)
{
addNotAllowedButton(itemInfo.addItem(), "submit_reinstate", T_submit_reinstate);
}
}
itemInfo.addLabel(T_label_move);
addCollectionAdminOnlyButton(itemInfo.addItem(), item.getOwningCollection(), "submit_move", T_submit_move);
itemInfo.addLabel(T_label_move);
addCollectionAdminOnlyButton(itemInfo.addItem(), item.getOwningCollection(), "submit_move", T_submit_move);
itemInfo.addLabel(T_label_delete);
if (AuthorizeManager.authorizeActionBoolean(context, item, Constants.DELETE))
{
itemInfo.addItem().addButton("submit_delete").setValue(T_submit_delete);
itemInfo.addItem().addButton("submit_delete").setValue(T_submit_delete);
}
else
{
addNotAllowedButton(itemInfo.addItem(), "submit_delete", T_submit_delete);
addNotAllowedButton(itemInfo.addItem(), "submit_delete", T_submit_delete);
}
@@ -211,24 +212,24 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
*/
private void addNotAllowedButton(org.dspace.app.xmlui.wing.element.Item item, String buttonName, Message buttonLabel) throws WingException, SQLException
{
Button button = item.addButton(buttonName);
button.setValue(buttonLabel);
Button button = item.addButton(buttonName);
button.setValue(buttonLabel);
button.setDisabled();
item.addHighlight("fade").addContent(T_not_allowed);
}
private void addCollectionAdminOnlyButton(org.dspace.app.xmlui.wing.element.Item item, Collection collection, String buttonName, Message buttonLabel) throws WingException, SQLException
private void addCollectionAdminOnlyButton(org.dspace.app.xmlui.wing.element.Item item, Collection collection, String buttonName, Message buttonLabel) throws WingException, SQLException
{
Button button = item.addButton(buttonName);
button.setValue(buttonLabel);
if (!AuthorizeManager.isAdmin(context, collection))
{
// Only admins can create or delete
button.setDisabled();
item.addHighlight("fade").addContent(T_collectionadmins_only);
}
Button button = item.addButton(buttonName);
button.setValue(buttonLabel);
if (!AuthorizeManager.isAdmin(context, collection))
{
// Only admins can create or delete
button.setDisabled();
item.addHighlight("fade").addContent(T_collectionadmins_only);
}
}
}

View File

@@ -25,7 +25,7 @@ import org.dspace.content.Item;
/**
* Display basic meta-meta information about the item and allow the user to
* change it's state such as withdraw or reinstate, possibily even completely
* change its state such as withdraw or reinstate, possibly even completely
* deleting the item!
*
* @author Jay Paz
@@ -59,7 +59,7 @@ public class ViewItem extends AbstractDSpaceTransformer {
private static final Message T_show_simple =
message("xmlui.ArtifactBrowser.ItemViewer.show_simple");
private static final Message T_show_full =
private static final Message T_show_full =
message("xmlui.ArtifactBrowser.ItemViewer.show_full");
public void addPageMeta(PageMeta pageMeta) throws WingException {
pageMeta.addMetadata("title").addContent(T_title);
@@ -72,13 +72,13 @@ public class ViewItem extends AbstractDSpaceTransformer {
public void addBody(Body body) throws SQLException, WingException {
// Get our parameters and state
Request request = ObjectModelHelper.getRequest(objectModel);
String show = request.getParameter("show");
boolean showFullItem = false;
if (show != null && show.length() > 0)
{
showFullItem = true;
}
String show = request.getParameter("show");
boolean showFullItem = false;
if (show != null && show.length() > 0)
{
showFullItem = true;
}
int itemID = parameters.getParameterAsInteger("itemID", -1);
Item item = Item.find(context, itemID);
String baseURL = contextPath + "/admin/item?administrative-continue="
@@ -91,7 +91,7 @@ public class ViewItem extends AbstractDSpaceTransformer {
contextPath + "/admin/item", Division.METHOD_POST,
"primary administrative edit-item-status");
main.setHead(T_option_head);
// LIST: options
List options = main.addList("options", List.TYPE_SIMPLE, "horizontal");
options.addItem().addXref(
@@ -102,7 +102,7 @@ public class ViewItem extends AbstractDSpaceTransformer {
T_option_metadata);
options.addItem().addHighlight("bold").addXref(tabLink, T_option_view);
options.addItem().addXref(baseURL + "&submit_curate", T_option_curate);
// item
Para showfullPara = main.addPara(null, "item-view-toggle item-view-toggle-top");
@@ -121,7 +121,7 @@ public class ViewItem extends AbstractDSpaceTransformer {
ReferenceSet referenceSet;
referenceSet = main.addReferenceSet("collection-viewer",
showFullItem?ReferenceSet.TYPE_DETAIL_VIEW:ReferenceSet.TYPE_SUMMARY_VIEW);
// Refrence the actual Item
// Reference the actual Item
ReferenceSet appearsInclude = referenceSet.addReference(item)
.addReferenceSet(ReferenceSet.TYPE_DETAIL_LIST, null, "hierarchy");
appearsInclude.setHead(T_head_parent_collections);

View File

@@ -33,7 +33,7 @@ import org.xml.sax.SAXException;
/**
* List all items in this collection that are mapped from other collections.
*
* @author Scott phillips
* @author Scott Phillips
*/
public class BrowseItemForm extends AbstractDSpaceTransformer {

View File

@@ -31,7 +31,7 @@ import org.xml.sax.SAXException;
* search for new items to import or browse a list of currently mapped
* items.
*
* @author Scott phillips
* @author Scott Phillips
*/
public class MapperMain extends AbstractDSpaceTransformer {

View File

@@ -34,7 +34,7 @@ import org.xml.sax.SAXException;
/**
* Search for items from other collections to map into this collection.
*
* @author Scott phillips
* @author Scott Phillips
*/
public class SearchItemForm extends AbstractDSpaceTransformer {
@@ -71,7 +71,7 @@ public class SearchItemForm extends AbstractDSpaceTransformer {
Collection collection = Collection.find(context,collectionID);
String query = decodeFromURL(parameters.getParameter("query",null));
java.util.List<Item> items = preformSearch(collection,query);
java.util.List<Item> items = performSearch(collection,query);
@@ -104,7 +104,7 @@ public class SearchItemForm extends AbstractDSpaceTransformer {
{
author = dcCreators[0].value;
} else {
// Do a fall back look for contributors
// Do a fallback look for contributors
DCValue[] dcContributors = item.getDC("contributor",Item.ANY,Item.ANY);
if (dcContributors != null && dcContributors.length >= 1)
{
@@ -166,7 +166,7 @@ public class SearchItemForm extends AbstractDSpaceTransformer {
* @param collection The collection to mapp into
* @param query The search query.
*/
private java.util.List<Item> preformSearch(Collection collection, String query) throws SQLException, IOException
private java.util.List<Item> performSearch(Collection collection, String query) throws SQLException, IOException
{
// Search the repository
@@ -196,7 +196,7 @@ public class SearchItemForm extends AbstractDSpaceTransformer {
}
return items;
}
}

View File

@@ -23,10 +23,10 @@ import org.dspace.authorize.AuthorizeException;
import org.dspace.content.BitstreamFormat;
/**
* Confirm the deletition of bitstream formats by listing to-be-deleted
* Confirm the deletion of bitstream formats by listing to-be-deleted
* formats and asking the user for confirmation.
*
* @author Scott phillips
* @author Scott Phillips
*/
public class DeleteBitstreamFormatsConfirm extends AbstractDSpaceTransformer
{

View File

@@ -27,7 +27,7 @@ import org.dspace.content.MetadataSchema;
* Prompt the user with a list of to-be-deleted metadata fields and
* ask the user if they are sure they want them deleted.
*
* @author Scott phillips
* @author Scott Phillips
*/
public class DeleteMetadataFieldsConfirm extends AbstractDSpaceTransformer
{

View File

@@ -25,7 +25,7 @@ import org.dspace.content.MetadataSchema;
/**
* Prompt the user to determin if they really want to delete the displayed schemas.
*
* @author Scott phillips
* @author Scott Phillips
*/
public class DeleteMetadataSchemaConfirm extends AbstractDSpaceTransformer
{

View File

@@ -216,7 +216,7 @@ public class EditMetadataSchema extends AbstractDSpaceTransformer
}
else
{
// Only show the actions if there are fields available to preform them on.
// Only show the actions if there are fields available to perform them on.
Para actions = main.addPara();
actions.addButton("submit_delete").setValue(T_submit_delete);
if (MetadataSchema.findAll(context).length > 1)
@@ -347,7 +347,7 @@ public class EditMetadataSchema extends AbstractDSpaceTransformer
* Determine if there were any special errors and display approparte
* text. Because of the inline nature of the element and qualifier
* fields these errors can not be placed on the field. Instead they
* have to be added as seperate items above the field.
* have to be added as separate items above the field.
*
* @param form The form to add errors to.
* @param errors A list of errors.

View File

@@ -51,10 +51,10 @@ import org.xml.sax.SAXException;
/**
* This is an abstract search page. It is a collection of search methods that
* are common between different search implementation. An implementer must
* implement at least three methods: addBody(), getQuery(), and generateURL().
* are common between different search implementations. An implementation must
* provide at least three methods: addBody(), getQuery(), and generateURL().
*
* See the two implementors: SimpleSearch and AdvancedSearch.
* See the two implementations: SimpleSearch and AdvancedSearch.
*
* @author Scott Phillips
*/
@@ -538,8 +538,8 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer
* Determine if the scope of the search should fixed or is changeable by the
* user.
*
* The search scope when preformed by url, i.e. they are at the url handle/xxxx/xx/search
* then it is fixed. However at the global level the search is variable.
* The search scope when performed by url, i.e. they are at the url handle/xxxx/xx/search
* then it is fixed. However, at the global level the search is variable.
*
* @return true if the scope is variable, false otherwise.
*/

View File

@@ -39,16 +39,16 @@ import org.dspace.core.ConfigurationManager;
import org.xml.sax.SAXException;
/**
* Preform an advanced search of the repository. The user is presented with
* Perform an advanced search of the repository. The user is presented with
* three search parameters, that may be ORed, ANDed, NOTed together.
*
* At the present time only three fields are displayed however if the theme
* whishes to expand this they can by setting the num_search_fields to the
* desired number of search fields. Also the theme can change the number of
* whishes to expand this they can do so by setting the num_search_fields to the
* desired number of search fields. Also, the theme can change the number of
* results per the page by setting results_per_page
*
* FIXME: The list of what fields are search should come from a configurable
* place. Possibily the sitemap configuration.
* place. Possibly the sitemap configuration.
*
* @author Scott Phillips
*/
@@ -191,7 +191,7 @@ public class AdvancedSearch extends AbstractSearch implements CacheableProcessin
/**
* Build a conjunction field in the given for the given cell. A
* conjunction consists of logical the operators AND, OR, NOT.
* conjunction consists of logical operators AND, OR, NOT.
*
* @param row The current row
* @param cell The current cell
@@ -406,13 +406,13 @@ public class AdvancedSearch extends AbstractSearch implements CacheableProcessin
{
// Specific search field specified, add the field specific field.
// Replace singe quote's with double quotes (only if they match)
// Replace single quotes with double quotes (only if they match)
String subQuery = util.substitute("s/\'(.*)\'/\"$1\"/g", field.getQuery());
// If the field is not quoted ...
if (!util.match("/\".*\"/", subQuery))
{
// ... then seperate each word and re-specify the search field.
// ... then separate each word and re-specify the search field.
subQuery = util.substitute("s/[ ]+/ " + field.getField() + ":/g", subQuery);
}
@@ -521,7 +521,7 @@ public class AdvancedSearch extends AbstractSearch implements CacheableProcessin
*/
private static class SearchField {
/** What index the search field is, typicaly there are just three - but the theme may exand this number */
/** What index the search field is, typically there are just three - but the theme may expand this number */
private int index;
/** The field to search, ANY if none specified */

View File

@@ -115,8 +115,8 @@ public class CollectionRecentSubmissions extends AbstractDSpaceTransformer imple
// Add the actual collection;
validity.add(collection);
// add reciently submitted items
for(BrowseItem item : getRecientlySubmittedItems(collection))
// add recently submitted items
for(BrowseItem item : getRecentlySubmittedItems(collection))
{
validity.add(item);
}
@@ -143,7 +143,7 @@ public class CollectionRecentSubmissions extends AbstractDSpaceTransformer imple
Collection collection = (Collection) dso;
java.util.List<BrowseItem> items = getRecientlySubmittedItems(collection);
java.util.List<BrowseItem> items = getRecentlySubmittedItems(collection);
if(items.size() == 0)
{
return;
@@ -169,7 +169,7 @@ public class CollectionRecentSubmissions extends AbstractDSpaceTransformer imple
* @param collection The collection.
*/
@SuppressWarnings("unchecked") // The cast from getLastSubmitted is correct, it dose infact return a list of Items.
private java.util.List<BrowseItem> getRecientlySubmittedItems(Collection collection)
private java.util.List<BrowseItem> getRecentlySubmittedItems(Collection collection)
throws SQLException
{
if (recentSubmissionItems != null)

View File

@@ -43,7 +43,7 @@ public class CommunitySearch extends AbstractDSpaceTransformer {
/**
* Display a single community (and refrence any sub communites or
* Display a single community (and reference any subcommunites or
* collections)
*/
public void addBody(Body body) throws SAXException, WingException,

View File

@@ -231,7 +231,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
}
/**
* Display a single community (and refrence any sub communites or
* Display a single community (and reference any sub communites or
* collections)
*/
public void addBody(Body body) throws SAXException, WingException,
@@ -307,7 +307,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
ReferenceSet.TYPE_DETAIL_VIEW);
Reference communityInclude = referenceSet.addReference(community);
// If the community has any children communities also refrence them.
// If the community has any children communities also reference them.
if (subCommunities != null && subCommunities.length > 0)
{
ReferenceSet communityReferenceSet = communityInclude
@@ -315,7 +315,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
communityReferenceSet.setHead(T_head_sub_communities);
// Sub communities
// Subcommunities
for (Community subCommunity : subCommunities)
{
communityReferenceSet.addReference(subCommunity);
@@ -329,14 +329,14 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
communityReferenceSet.setHead(T_head_sub_collections);
// Sub collections
// Subcollections
for (Collection collection : collections)
{
communityReferenceSet.addReference(collection);
}
}
}// main refrence
} // main reference
}

View File

@@ -299,7 +299,7 @@ public class ItemViewer extends AbstractDSpaceTransformer implements CacheablePr
ReferenceSet.TYPE_SUMMARY_VIEW);
}
// Refrence the actual Item
// Reference the actual Item
ReferenceSet appearsInclude = referenceSet.addReference(item).addReferenceSet(ReferenceSet.TYPE_DETAIL_LIST,null,"hierarchy");
appearsInclude.setHead(T_head_parent_collections);

View File

@@ -39,7 +39,7 @@ import org.dspace.core.ConfigurationManager;
import org.xml.sax.SAXException;
/**
* This transform applys the basic navigational links that should be available
* This transform apples the basic navigational links that should be available
* on all pages generated by DSpace.
*
* @author Scott Phillips
@@ -158,7 +158,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
}
/**
* Insure that the context path is added to the page meta.
* Ensure that the context path is added to the page meta.
*/
public void addPageMeta(PageMeta pageMeta) throws SAXException,
WingException, UIException, SQLException, IOException,

View File

@@ -31,7 +31,7 @@ import org.dspace.content.DSpaceObject;
import org.xml.sax.SAXException;
/**
* Preform a simple search of the repository. The user provides a simple one
* Perform a simple search of the repository. The user provides a simple one
* field query (the url parameter is named query) and the results are processed.
*
* @author Scott Phillips

View File

@@ -31,7 +31,7 @@ import org.dspace.eperson.EPerson;
* This action uses the http parameters of login_email, login_password, and
* login_realm as credentials.
*
* If the authentication attempt is successfull then an HTTP redirect will be
* If the authentication attempt is successful then an HTTP redirect will be
* sent to the browser redirecting them to their original location in the
* system before authenticated or if none is supplied back to the DSpace
* homepage. The action will also return true, thus contents of the action will
@@ -58,7 +58,7 @@ public class AuthenticateAction extends AbstractAction
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel,
String source, Parameters parameters) throws Exception
{
// First check if we are preforming a new login
// First check if we are performing a new login
Request request = ObjectModelHelper.getRequest(objectModel);
String email = request.getParameter("login_email");
@@ -86,7 +86,7 @@ public class AuthenticateAction extends AbstractAction
if (AuthenticationUtil.isInterupptedRequest(objectModel))
{
// Resume the request and set the redirect target URL to
// that of the originaly interrupted request.
// that of the originally interrupted request.
redirectURL += AuthenticationUtil.resumeInterruptedRequest(objectModel);
}
else
@@ -96,14 +96,14 @@ public class AuthenticateAction extends AbstractAction
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
}
// Authentication successfull send a redirect.
// Authentication successful send a redirect.
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
httpResponse.sendRedirect(redirectURL);
// log the user out for the rest of this current request, however they will be reauthenticated
// fully when they come back from the redirect. This prevents caching problems where part of the
// request is preformed fore the user was authenticated and the other half after it succedded. This
// request is performed before the user was authenticated and the other half after it succeeded. This
// way the user is fully authenticated from the start of the request.
context.setCurrentUser(null);
@@ -112,7 +112,7 @@ public class AuthenticateAction extends AbstractAction
}
catch (SQLException sqle)
{
throw new PatternException("Unable to preform authentication",
throw new PatternException("Unable to perform authentication",
sqle);
}

View File

@@ -61,14 +61,14 @@ public class InvalidToken extends AbstractDSpaceTransformer
invalid.addPara(T_para1);
Para example1 = invalid.addPara("invalid-token-examlpe","code");
Para example1 = invalid.addPara("invalid-token-example","code");
example1.addContent(ConfigurationManager.getProperty("dspace.url") + "/register?token=ABCDEFGHIJK");
Para example2 = invalid.addPara("invalid-token-examlpe","code");
Para example2 = invalid.addPara("invalid-token-example","code");
example2.addContent("LMNOP");
invalid.addPara(T_para2);
Para example3 = invalid.addPara("valid-token-examlpe","code");
Para example3 = invalid.addPara("valid-token-example","code");
example3.addContent(ConfigurationManager.getProperty("dspace.url") + "/register?token=ABCDEFGHIJKLMNOP");
}

View File

@@ -31,7 +31,7 @@ import org.dspace.eperson.EPerson;
* action uses the http parameters of username, ldap_password, and login_realm
* as credentials.
*
* If the authentication attempt is successfull then an HTTP redirect will be
* If the authentication attempt is successful then an HTTP redirect will be
* sent to the browser redirecting them to their original location in the system
* before authenticated or if none is supplied back to the DSpace homepage. The
* action will also return true, thus contents of the action will be excuted.
@@ -54,7 +54,7 @@ public class LDAPAuthenticateAction extends AbstractAction {
public Map act(Redirector redirector, SourceResolver resolver,
Map objectModel, String source, Parameters parameters)
throws Exception {
// First check if we are preforming a new login
// First check if we are performing a new login
Request request = ObjectModelHelper.getRequest(objectModel);
String username = request.getParameter("username");
@@ -78,7 +78,7 @@ public class LDAPAuthenticateAction extends AbstractAction {
if (AuthenticationUtil.isInterupptedRequest(objectModel)) {
// Resume the request and set the redirect target URL to
// that of the originaly interrupted request.
// that of the originally interrupted request.
redirectURL += AuthenticationUtil
.resumeInterruptedRequest(objectModel);
}
@@ -89,7 +89,7 @@ public class LDAPAuthenticateAction extends AbstractAction {
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
}
// Authentication successfull send a redirect.
// Authentication successful send a redirect.
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel
.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
@@ -99,8 +99,8 @@ public class LDAPAuthenticateAction extends AbstractAction {
// however they will be reauthenticated
// fully when they come back from the redirect. This prevents
// caching problems where part of the
// request is preformed fore the user was authenticated and the
// other half after it succedded. This
// request is performed fore the user was authenticated and the
// other half after it succeeded. This
// way the user is fully authenticated from the start of the
// request.
context.setCurrentUser(null);
@@ -108,7 +108,7 @@ public class LDAPAuthenticateAction extends AbstractAction {
return new HashMap();
}
} catch (SQLException sqle) {
throw new PatternException("Unable to preform authentication", sqle);
throw new PatternException("Unable to perform authentication", sqle);
}
return null;

View File

@@ -152,24 +152,24 @@ public class LoginChooser extends AbstractDSpaceTransformer implements
Division reason = body.addDivision("login-reason");
if (header != null)
{
reason.setHead(message(header));
}
{
reason.setHead(message(header));
}
else
{
// Allways have a head.
reason.setHead("Authentication Required");
}
{
// Always have a head.
reason.setHead("Authentication Required");
}
if (message != null)
{
reason.addPara(message(message));
}
{
reason.addPara(message(message));
}
if (characters != null)
{
reason.addPara(characters);
}
{
reason.addPara(characters);
}
}
Division loginChooser = body.addDivision("login-chooser");

View File

@@ -39,11 +39,11 @@ import org.xml.sax.SAXException;
* 1) Login and Logout links
*
* 2) Navigational links to register or edit their profile based
* upon wheather the user is authenticatied or not.
* upon whether the user is authenticatied or not.
*
* 3) User metadata
*
* 4) The user's language prefrences (wheather someone is logged
* 4) The user's language preferences (whether someone is logged
* in or not)
*
* @author Scott Phillips
@@ -83,7 +83,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
// Special case, don't cache anything if the user is logging
// in. The problem occures because of timming, this cache key
// is generated before we know whether the operation has
// succeded or failed. So we don't know whether to cache this
// succeeded or failed. So we don't know whether to cache this
// under the user's specific cache or under the anonymous user.
if (request.getParameter("login_email") != null ||
request.getParameter("login_password") != null ||
@@ -95,7 +95,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
// FIXME:
// Do not cache the home page. There is a bug that is causing the
// homepage to be cached with user's data after a logout. This
// polutes the cache. As a work-around this problem we just won't
// pollutes the cache. As a work-around this problem we just won't
// cache this page.
if (request.getSitemapURI().length() == 0)
{
@@ -217,10 +217,10 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
userMeta.setAuthenticated(false);
}
// Allways have a login URL.
// Always have a login URL.
userMeta.addMetadata("identifier","loginURL").addContent(contextPath+"/login");
// Allways add language information
// Always add language information
Request request = ObjectModelHelper.getRequest(objectModel);
Enumeration locales = request.getLocales();
while (locales.hasMoreElements())

View File

@@ -31,7 +31,7 @@ import org.dspace.eperson.EPerson;
* This action uses the http parameters as supplied by Shibboleth SP.
* Read dspace.cfg for configuration detail.
*
* If the authentication attempt is successfull then an HTTP redirect will be
* If the authentication attempt is successful then an HTTP redirect will be
* sent to the browser redirecting them to their original location in the
* system before authenticated or if none is supplied back to the DSpace
* homepage. The action will also return true, thus contents of the action will
@@ -60,7 +60,7 @@ public class ShibbolethAction extends AbstractAction
{
try
{
//rely on implicit authN of Shib
// rely on implicit authN of Shib
Context context = AuthenticationUtil.authenticate(objectModel, null, null, null);
EPerson eperson = null;
@@ -78,7 +78,7 @@ public class ShibbolethAction extends AbstractAction
if (AuthenticationUtil.isInterupptedRequest(objectModel))
{
// Resume the request and set the redirect target URL to
// that of the originaly interrupted request.
// that of the originally interrupted request.
redirectURL += AuthenticationUtil.resumeInterruptedRequest(objectModel);
}
else
@@ -88,14 +88,14 @@ public class ShibbolethAction extends AbstractAction
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
}
// Authentication successfull send a redirect.
// Authentication successful - send a redirect.
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
httpResponse.sendRedirect(redirectURL);
// log the user out for the rest of this current request, however they will be reauthenticated
// fully when they come back from the redirect. This prevents caching problems where part of the
// request is preformed for the user was authenticated and the other half after it succedded. This
// request is performed for the user was authenticated and the other half after it succeeded. This
// way the user is fully authenticated from the start of the request.
//
// TODO: have no idea what this is, but leave it as it is, could be broken
@@ -106,7 +106,7 @@ public class ShibbolethAction extends AbstractAction
}
catch (SQLException sqle)
{
throw new PatternException("Unable to preform Shibboleth authentication",
throw new PatternException("Unable to perform Shibboleth authentication",
sqle);
}

View File

@@ -22,13 +22,13 @@ import org.dspace.app.xmlui.utils.AuthenticationUtil;
/**
*
* This action will start the nessary steps to authenticate a user. After the user
* successfully authenticates the user will resume this request with all parameters
* This action will start the necessary steps to authenticate a user. After the user
* successfuly authenticates, the user will resume this request with all parameters
* and attributes intact. An optional message can be added that will be displayed
* on the login form. This could be used to provide a reason why the user is being
* queried for a user name and password.
*
* Possible parameter are:
* Possible parameters are:
*
* header: An i18n message that will be used as the header for the message.
*
@@ -43,7 +43,7 @@ import org.dspace.app.xmlui.utils.AuthenticationUtil;
* <map:act type="StartAuthenticationAction"/>
*
*
* Typicaly this is used in conjunction with the AuthenticatedSelector as:
* Typically, this is used in conjunction with the AuthenticatedSelector as:
*
* <map:select type="AuthenticatedSelector">
* <map:when test="eperson">
@@ -73,7 +73,7 @@ public class StartAuthenticationAction extends AbstractAction
String message = parameters.getParameter("message",null);
String characters = parameters.getParameter("characters",null);
// Interupt this request
// Interrupt this request
AuthenticationUtil.interruptRequest(objectModel,header,message,characters);
final HttpServletRequest httpRequest = (HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);

View File

@@ -41,7 +41,7 @@ import org.xml.sax.SAXException;
*
* retry - A boolean value indicating that the previously entered email was invalid.
*
* accountExists - A boolean value indicating the email previously entered allready
* accountExists - A boolean value indicating the email previously entered already
* belongs to a user.
*
* @author Scott Phillips
@@ -97,7 +97,7 @@ public class StartRegistration extends AbstractDSpaceTransformer implements Cach
private java.util.List<String> errors;
/**
* Determine if the last failed attempt was because an account allready
* Determine if the last failed attempt was because an account already
* existed for the given email address
*/
private boolean accountExists;

View File

@@ -17,32 +17,32 @@ import org.dspace.app.xmlui.wing.element.Division;
import org.dspace.authorize.AuthorizeException;
/**
* This class will add a simple notification div the DRI document. Typicaly
* this transformer is used after an action has been preformed to let the
* user know if an operation succeded or failed.
* This class will add a simple notification div the DRI document. Typically
* this transformer is used after an action has been performed to let the
* user know if an operation succeeded or failed.
*
* The possible paramaters are:
*
* outcome: The outcome determines whether the notice is positive or negative.
* Possible values are: "success", "failure", or "netural". If no values are
* supplied then netural is assumed.
* Possible values are: "success", "failure", or "neutral". If no values are
* supplied then neutral is assumed.
*
* header: An i18n dictionary key referencing the text that should be used
* as a header for this notice.
*
* message: An i18n dictionary key refrencing the text that should be used as
* message: An i18n dictionary key referencing the text that should be used as
* the content for this notice.
*
* characters: Plain text string that should be used as the content for this
* notice. Normaly all messages should be i18n dictionary keys however this
* parameter is usefull for error messages that are not nessasarly translated.
* notice. Normally, all messages should be i18n dictionary keys, however this
* parameter is useful for error messages that are not necessarily translated.
*
* All parameters are optional but you must supply at least the message or the
* characters
*
*
*
* Examlpe:
* Example:
* <map:transformer type="notice">
* <map:parameter name="outcome" value="success"/>
* <map:parameter name="message" value="xmlui.<aspect>.<class>.<type>"/>
@@ -75,9 +75,9 @@ public class NoticeTransformer extends AbstractDSpaceTransformer
}
String rend = "notice";
if ("netural".equals(outcome))
if ("neutral".equals(outcome))
{
rend += " netural";
rend += " neutral";
}
else if ("success".equals(outcome))
{

View File

@@ -32,7 +32,7 @@ import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
/**
* This special comonent checks to see if the body element is empty (has no sub elements) and if
* This special component checks to see if the body element is empty (has no sub elements) and if
* it is then displays some page not found text.
*
* @author Scott Phillips
@@ -107,7 +107,7 @@ public class PageNotFoundTransformer extends AbstractDSpaceTransformer implement
if (this.bodyEvent != null)
{
// If we have recorded the startElement for body and we are
// recieving another start event, then there must be something
// receiving another start event, then there must be something
// inside the body element, so we send the held body and carry
// on as normal.
sendEvent(this.bodyEvent);
@@ -134,7 +134,7 @@ public class PageNotFoundTransformer extends AbstractDSpaceTransformer implement
{
if (this.bodyEvent != null && WingConstants.DRI.URI.equals(namespaceURI) && Body.E_BODY.equals(localName))
{
// If we are recieving an endElement event for body while we
// If we are receiving an endElement event for body while we
// still have a startElement body event recorded then
// the body element must have been empty. In this case, record
// that the body is empty, and send both the start and end body events.

View File

@@ -75,7 +75,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
}
/**
* Insure that the context path is added to the page meta.
* Ensure that the context path is added to the page meta.
*/
public void addPageMeta(PageMeta pageMeta) throws SAXException,
WingException, UIException, SQLException, IOException,

View File

@@ -153,7 +153,7 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
* Grab all the page's parameters from the sitemap. This includes
* workspaceID, step, and a list of errored fields.
*
* If the implementer set any required parameters then insure that
* If the implementer set any required parameters then ensure that
* they are all present.
*/
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
@@ -169,7 +169,7 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
this.errorFlag = Integer.valueOf(parameters.getParameter("error", String.valueOf(AbstractProcessingStep.STATUS_COMPLETE)));
this.errorFields = getErrorFields(parameters);
//load in-progress submission
// load in-progress submission
if (this.id != null)
{
try {
@@ -261,25 +261,25 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
*/
public void addSubmissionProgressList(Division div) throws WingException
{
//each entry in progress bar is placed under this "submit-progress" div
// each entry in progress bar is placed under this "submit-progress" div
List progress = div.addList("submit-progress",List.TYPE_PROGRESS);
//get Map of progress bar information
//key: entry # (i.e. step & page),
//value: entry name key (i.e. display name)
// get Map of progress bar information
// key: entry # (i.e. step & page),
// value: entry name key (i.e. display name)
Map<String, String> progBarInfo = this.submissionInfo.getProgressBarInfo();
//add each entry to progress bar
// add each entry to progress bar
for (Map.Entry<String, String> progBarEntry : progBarInfo.entrySet())
{
//Since we are using XML-UI, we need to prepend the heading key with "xmlui.Submission."
// Since we are using XML-UI, we need to prepend the heading key with "xmlui.Submission."
String entryNameKey = "xmlui.Submission." + progBarEntry.getValue();
//the value of entryNum is current step & page
//(e.g. 1.2 is page 2 of step 1)
// the value of entryNum is current step & page
// (e.g. 1.2 is page 2 of step 1)
StepAndPage currentStepAndPage = new StepAndPage(progBarEntry.getKey());
//add a button to progress bar for this step & page
// add a button to progress bar for this step & page
addJumpButton(progress, message(entryNameKey), currentStepAndPage);
}
@@ -307,10 +307,10 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
public void addJumpButton(List list, Message buttonText, StepAndPage stepAndPage)
throws WingException
{
//Only add the button if we have button text and a valid step & page!
// Only add the button if we have button text and a valid step & page!
if(buttonText!=null && stepAndPage.isSet())
{
//add a Jump To button for this section
// add a Jump To button for this section
Button jumpButton = list.addItem("step_" + stepAndPage, renderJumpButton(stepAndPage))
.addButton(AbstractProcessingStep.PROGRESS_BAR_PREFIX + stepAndPage);
jumpButton.setValue(buttonText);
@@ -334,21 +334,21 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
{
Item actions = controls.addItem();
//only have "<-Previous" button if not first step
// only have "<-Previous" button if not first step
if(!isFirstStep())
{
actions.addButton(AbstractProcessingStep.PREVIOUS_BUTTON).setValue(T_previous);
}
//always show "Save/Cancel"
// always show "Save/Cancel"
actions.addButton(AbstractProcessingStep.CANCEL_BUTTON).setValue(T_save);
//If last step, show "Complete Submission"
// If last step, show "Complete Submission"
if(isLastStep())
{
actions.addButton(AbstractProcessingStep.NEXT_BUTTON).setValue(T_complete);
}
else //otherwise, show "Next->"
else // otherwise, show "Next->"
{
actions.addButton(AbstractProcessingStep.NEXT_BUTTON).setValue(T_next);
}
@@ -492,12 +492,12 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
* <P>
* If the given step and page is greater than the max,
* render it with "disabled" style.
*
* @param givenStepAndPage
*
* @param givenStepAndPage
* This given step & page (e.g. (1,2))
* @return
* @return
* render style for this button
*/
*/
private String renderJumpButton(StepAndPage givenStepAndPage)
{
try

View File

@@ -64,7 +64,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
options.addList("context");
options.addList("administrative");
// This dosn't flow very well, lets remove it and see if anyone misses it.
// This doesn't flow very well, lets remove it and see if anyone misses it.
// DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
// if (dso != null && dso instanceof Collection)
// {

View File

@@ -78,7 +78,7 @@ public class StepTransformer extends AbstractDSpaceTransformer
* Grab all the step's parameters from the sitemap. This includes
* workspaceID, step, and a list of errored fields.
*
* If the implementer set any required parameters then insure that
* If the implementer set any required parameters then ensure that
* they are all present.
*/
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
@@ -86,23 +86,23 @@ public class StepTransformer extends AbstractDSpaceTransformer
{
super.setup(resolver,objectModel,src,parameters);
//retrieve id and transformer information
//(This ID should always exist by this point, since the
// retrieve id and transformer information
// (This ID should always exist by this point, since the
// selection of the collection should have already happened!)
this.id = parameters.getParameter("id",null);
this.transformerClassName = parameters.getParameter("transformer",null);
//even though its not used in this class, this "step" parameter
//is heavily used by the Transformers which extend the
//org.dspace.app.xmlui.submission.AbstractStep
// even though its not used in this class, this "step" parameter
// is heavily used by the Transformers which extend the
// org.dspace.app.xmlui.submission.AbstractStep
this.stepAndPage = Double.valueOf(parameters.getParameter("step","-1"));
//retrieve collection handle if it's there
// retrieve collection handle if it's there
this.collectionHandle = parameters.getParameter("handle",null);
try
{
//retrieve an instance of the transformer class
// retrieve an instance of the transformer class
ClassLoader loader = this.getClass().getClassLoader();
Class stepClass = loader
.loadClass(this.transformerClassName);
@@ -114,18 +114,18 @@ public class StepTransformer extends AbstractDSpaceTransformer
}
catch(ClassNotFoundException cnfe)
{
//means that we couldn't find a class by the given name
// means that we couldn't find a class by the given name
throw new ProcessingException("Class Not Found: " + this.transformerClassName, cnfe);
}
catch(Exception e)
{
//means we couldn't instantiate the class as an AbstractStep
// means we couldn't instantiate the class as an AbstractStep
throw new ProcessingException("Unable to instantiate class " + this.transformerClassName + ". " +
"Please make sure it extends org.dspace.app.xmlui.submission.AbstractSubmissionStep!", e);
}
//call the setup for this step
// call the setup for this step
if(step!=null)
{
step.setup(resolver, objectModel, src, parameters);

View File

@@ -400,7 +400,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/
@@ -517,7 +517,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/
@@ -627,7 +627,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/
@@ -710,7 +710,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/
@@ -791,7 +791,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/
@@ -892,7 +892,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/
@@ -968,7 +968,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/
@@ -1039,7 +1039,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/
@@ -1121,7 +1121,7 @@ public class DescribeStep extends AbstractSubmissionStep
* @param fieldName
* The field's name.
* @param dcInput
* The field's input deffinition
* The field's input definition
* @param dcValues
* The field's pre-existing values.
*/

View File

@@ -29,7 +29,7 @@ import org.xml.sax.SAXException;
* step will ask the user two questions which will direct whether future
* questions will be asked of the user. Since they user may move next or
* previous or even jump around between the stages some metadata values
* may all ready be filled for selected values. i.e. if the user selected
* may already be filled for selected values. i.e. if the user selected
* that there may be multiple titles and then later comes back and unchecks
* then multiple titles box. In this case these metadata entries are removed
* from the item, a note is displayed informing the user of this discrepency.

View File

@@ -34,7 +34,7 @@ import org.xml.sax.SAXException;
* This is the last step of the item submission processes. During this
* step the user must agree to the collection's standard distribution
* license. If the user can not agree to the license they they may either
* save the submission untill a later time or remove the submission completely.
* save the submission until a later time or remove the submission completely.
*
* This step will include the full license text inside the page using the
* HTML fragment method.
@@ -115,13 +115,13 @@ public class LicenseStep extends AbstractSubmissionStep
// If user did not check "I accept" checkbox
if(this.errorFlag==org.dspace.submit.step.LicenseStep.STATUS_LICENSE_REJECTED)
{
log.info(LogManager.getHeader(context, "reject_license", submissionInfo.getSubmissionLogInfo()));
log.info(LogManager.getHeader(context, "reject_license", submissionInfo.getSubmissionLogInfo()));
decision.addError(T_decision_error);
}
//add standard control/paging buttons
addControlButtons(controls);
// add standard control/paging buttons
addControlButtons(controls);
}
/**
@@ -147,7 +147,7 @@ public class LicenseStep extends AbstractSubmissionStep
WingException, UIException, SQLException, IOException,
AuthorizeException
{
//License step doesn't require reviewing
// License step doesn't require reviewing
return null;
}
}

View File

@@ -31,7 +31,7 @@ import org.xml.sax.SAXException;
/**
* Allow the user to select a collection they wish to submit an item to,
* this step is sort-of but not officialy part of the item submission
* processes. Normaly a user will have selected a collection to submit
* processes. Normally a user will have selected a collection to submit
* too by going to the collection's page, but if that was invalid or the
* user came directly from the mydspace page then this step is given.
*

View File

@@ -42,11 +42,11 @@ import org.xml.sax.SAXException;
/**
* This is a step of the item submission processes. The upload
* stages allows the user to upload files into the submission. The
* stages allow the user to upload files into the submission. The
* form is optimized for one file, but allows the user to upload
* more if needed.
* <P>
* The form is brokenup into three sections:
* The form is broken up into three sections:
* <P>
* Part A: Ask the user to upload a file
* Part B: List previously uploaded files
@@ -138,8 +138,8 @@ public class UploadStep extends AbstractSubmissionStep
{
super.setup(resolver,objectModel,src,parameters);
//If this page for editing an uploaded file's information
//was requested, then we need to load EditFileStep instead!
// If this page for editing an uploaded file's information
// was requested, then we need to load EditFileStep instead!
if(this.errorFlag==org.dspace.submit.step.UploadStep.STATUS_EDIT_BITSTREAM)
{
this.editFile = new EditFileStep();
@@ -154,8 +154,8 @@ public class UploadStep extends AbstractSubmissionStep
public void addBody(Body body) throws SAXException, WingException,
UIException, SQLException, IOException, AuthorizeException
{
//If we are actually editing an uploaded file's information,
//then display that body instead!
// If we are actually editing information of an uploaded file,
// then display that body instead!
if(this.editFile!=null)
{
editFile.addBody(body);
@@ -193,7 +193,7 @@ public class UploadStep extends AbstractSubmissionStep
file.setHelp(T_file_help);
file.setRequired();
//if no files found error was thrown by processing class, display it!
// if no files found error was thrown by processing class, display it!
if (this.errorFlag==org.dspace.submit.step.UploadStep.STATUS_NO_FILES_ERROR)
{
file.addError(T_file_error);
@@ -226,7 +226,7 @@ public class UploadStep extends AbstractSubmissionStep
}
// Part B:
// If the user has allready uploaded files provide a list for the user.
// If the user has already uploaded files provide a list for the user.
if (bitstreams.length > 0 || workflow)
{
Table summary = div.addTable("submit-upload-summary",(bitstreams.length * 2) + 2,7);
@@ -325,7 +325,7 @@ public class UploadStep extends AbstractSubmissionStep
if (!workflow)
{
// Workflow user's can not remove files.
// Workflow users can not remove files.
Row actionRow = summary.addRow();
actionRow.addCell();
Button removeSeleceted = actionRow.addCell(null, null, 0, 6, null).addButton("submit_remove_selected");
@@ -349,7 +349,7 @@ public class UploadStep extends AbstractSubmissionStep
* <P>
* NOTE: To remain consistent across all Steps, you should first
* add a sub-List object (with this step's name as the heading),
* by using a call to reviewList.addList(). This sublist is
* by using a call to reviewList.addList(). This sublist is
* the list you return from this method!
*
* @param reviewList
@@ -367,7 +367,7 @@ public class UploadStep extends AbstractSubmissionStep
List uploadSection = reviewList.addList("submit-review-" + this.stepAndPage, List.TYPE_FORM);
uploadSection.setHead(T_head);
//Review all uploaded files
// Review all uploaded files
Item item = submission.getItem();
Bundle[] bundles = item.getBundles("ORIGINAL");
Bitstream[] bitstreams = new Bitstream[0];
@@ -400,7 +400,7 @@ public class UploadStep extends AbstractSubmissionStep
}
//return this new "upload" section
// return this new "upload" section
return uploadSection;
}
@@ -409,7 +409,7 @@ public class UploadStep extends AbstractSubmissionStep
*
* @param item The DSpace Item that the bitstream is part of
* @param bitstream The bitstream to link to
* @returns a String link to the bistream
* @returns a String link to the bitstream
*/
private String makeBitstreamLink(Item item, Bitstream bitstream)
{

View File

@@ -33,7 +33,7 @@ import java.io.Serializable;
import java.sql.SQLException;
/**
* This transform applys the basic navigational links that should be available
* This transform applies the basic navigational links that should be available
* on all pages generated by DSpace.
*
* @author Scott Phillips
@@ -89,7 +89,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
}
/**
* Insure that the context path is added to the page meta.
* Ensure that the context path is added to the page meta.
*/
public void addPageMeta(PageMeta pageMeta) throws SAXException,
WingException, UIException, SQLException, IOException,

View File

@@ -83,7 +83,7 @@ public class FlowUtils {
/**
* Return the given task back to the pool of unclaimed tasks for another user
* to select and preform.
* to select and perform.
*
* @param context The current DSpace content
* @param id The unique ID of the current workflow
@@ -97,7 +97,7 @@ public class FlowUtils {
context.commit();
//Log this unclaim action
// Log this unclaim action
log.info(LogManager.getHeader(context, "unclaim_workflow",
"workflow_item_id=" + workflowItem.getID() + ",item_id="
+ workflowItem.getItem().getID() + ",collection_id="
@@ -107,7 +107,7 @@ public class FlowUtils {
/**
* Claim this task from the pool of unclaimed task so that this user may
* preform the task by either approving or rejecting it.
* perform the task by either approving or rejecting it.
*
* @param context The current DSpace content
* @param id The unique ID of the current workflow
@@ -118,7 +118,7 @@ public class FlowUtils {
if(workflowItem.getState() != WorkflowManager.WFSTATE_STEP1POOL &&
workflowItem.getState() != WorkflowManager.WFSTATE_STEP2POOL &&
workflowItem.getState() != WorkflowManager.WFSTATE_STEP3POOL){
//Only allow tasks in the pool to be claimed !
// Only allow tasks in the pool to be claimed !
throw new AuthorizeException("Error while claiming task: this task has already been claimed !");
}
@@ -127,7 +127,7 @@ public class FlowUtils {
context.commit();
//log this claim information
// log this claim information
log.info(LogManager.getHeader(context, "claim_task", "workflow_item_id="
+ workflowItem.getID() + "item_id=" + workflowItem.getItem().getID()
+ "collection_id=" + workflowItem.getCollection().getID()
@@ -152,7 +152,7 @@ public class FlowUtils {
if((workflowItem.getState() == WorkflowManager.WFSTATE_STEP1POOL ||
workflowItem.getState() == WorkflowManager.WFSTATE_STEP2POOL ||
workflowItem.getState() == WorkflowManager.WFSTATE_STEP3POOL)){
//Verify if the current user has the current workflowItem among his pooled tasks
// Verify if the current user has the current workflowItem among his pooled tasks
boolean hasPooledTask = false;
List<WorkflowItem> pooledTasks = WorkflowManager.getPooledTasks(context, context.getCurrentUser());
for (WorkflowItem pooledItem : pooledTasks) {
@@ -186,7 +186,7 @@ public class FlowUtils {
{
WorkspaceItem wsi = WorkflowManager.reject(context, workflowItem,context.getCurrentUser(), reason);
//Load the Submission Process for the collection this WSI is associated with
// Load the Submission Process for the collection this WSI is associated with
Collection c = wsi.getCollection();
SubmissionConfigReader subConfigReader = new SubmissionConfigReader();
SubmissionConfig subConfig = subConfigReader.getSubmissionConfig(c.getHandle(), false);
@@ -201,7 +201,7 @@ public class FlowUtils {
context.commit();
//Submission rejected. Log this information
// Submission rejected. Log this information
log.info(LogManager.getHeader(context, "reject_workflow", "workflow_item_id="
+ wsi.getID() + "item_id=" + wsi.getItem().getID()
+ "collection_id=" + wsi.getCollection().getID()

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