[DS-707] Remove unused imports / fields / private methods

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5618 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2010-10-24 21:22:32 +00:00
parent 279b551426
commit 16e0851ef8
100 changed files with 2 additions and 676 deletions

View File

@@ -65,9 +65,6 @@ import org.dspace.core.Context;
*/
public class DCType
{
/** log4j logger */
private static Logger log = Logger.getLogger(DCType.class);
/** Our context */
private Context ourContext;

View File

@@ -40,8 +40,6 @@ package org.dspace.administer;
*/
public class RegistryExportException extends Exception
{
private Exception e;
/**
* Create an empty authorize exception
*/

View File

@@ -40,8 +40,6 @@ package org.dspace.administer;
*/
public class RegistryImportException extends Exception
{
private Exception e;
/**
* Create an empty authorize exception
*/

View File

@@ -39,7 +39,6 @@ import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

View File

@@ -56,18 +56,12 @@ import java.util.List;
*/
public class MetadataExport
{
/** The Context */
private Context c;
/** The items to export */
private ItemIterator toExport;
/** Whether to export all metadata, or just normally edited metadata */
private boolean exportAll;
/** log4j logger */
private static Logger log = Logger.getLogger(MetadataExport.class);
/**
* Set up a new metadata export
*
@@ -78,7 +72,6 @@ public class MetadataExport
public MetadataExport(Context c, ItemIterator toExport, boolean exportAll)
{
// Store the export settings
this.c = c;
this.toExport = toExport;
this.exportAll = exportAll;
}
@@ -95,7 +88,6 @@ public class MetadataExport
try
{
// Try to export the community
this.c = c;
this.toExport = new ItemIterator(c, buildFromCommunity(toExport, new ArrayList<Integer>(), 0));
this.exportAll = exportAll;
}

View File

@@ -70,9 +70,6 @@ public class MetadataImport
/** The lines to import */
List<DSpaceCSVLine> toImport;
/** log4j logger */
private static Logger log = Logger.getLogger(MetadataImport.class);
/**
* Create an instance of the metadata importer. Requires a context and an array of CSV lines
* to examine.

View File

@@ -284,27 +284,6 @@ public class Harvest
}
}
/**
* check
* @param collectionID
* @return
*/
private Collection checkCollection(String collectionID)
{
Collection collection = resolveCollection(collectionID);
try {
HarvestedCollection hc = HarvestedCollection.find(context, collection.getID());
if (!hc.isHarvestable()) {
System.out.println("Collection '"+ collection.getName() +"' is not set up for harvesting");
System.exit(1);
}
} catch (SQLException se) {
se.printStackTrace();
}
return collection;
}
/*
* Resolve the ID into a collection and check to see if its harvesting options are set. If so, return
* the collection, if not, bail out.

View File

@@ -240,10 +240,6 @@ public class LogAnalyser
/** the end date of the report as obtained from the log files */
private static Date logEndDate = null;
/** are we looking stuff up in the database */
private static boolean lookUp = false;
/**
* main method to be run from command line. See usage information for
* details as to how to use the command line flags (-help)
@@ -604,11 +600,6 @@ public class LogAnalyser
endDate = myEndDate;
}
if (myLogDir != null)
{
lookUp = myLookUp;
}
if (myOutFile != null)
{
outFile = myOutFile;

View File

@@ -88,9 +88,6 @@ public class DCInputsReader
/** Keyname for storing dropdown value-pair set name */
static final String PAIR_TYPE_NAME = "value-pairs-name";
/** log4j logger */
private static Logger log = Logger.getLogger(DCInputsReader.class);
/** The fully qualified pathname of the form definition XML file */
private String defsFile = ConfigurationManager.getProperty("dspace.dir")
+ File.separator + "config" + File.separator + FORM_DEF_FILE;

View File

@@ -43,7 +43,6 @@ import java.util.Date;
import org.apache.commons.lang.time.DateUtils;
import org.apache.log4j.FileAppender;
import org.apache.log4j.Logger;
import org.apache.log4j.helpers.LogLog;
import org.apache.log4j.spi.LoggingEvent;

View File

@@ -101,9 +101,6 @@ public class SubmissionStepConfig implements Serializable
/** The number of this step in the current SubmissionConfig */
private int number = -1;
/** log4j logger */
private static Logger log = Logger.getLogger(SubmissionStepConfig.class);
/**
* Class constructor for creating an empty SubmissionStepConfig object
*/

View File

@@ -78,9 +78,6 @@ import org.dspace.eperson.EPerson;
*/
public class AuthenticationManager
{
/** log4j category */
private static Logger log = Logger.getLogger(AuthenticationManager.class);
/** List of authentication methods, highest precedence first. */
private static AuthenticationMethod methodStack[] =
(AuthenticationMethod[])PluginManager.getPluginSequence(AuthenticationMethod.class);

View File

@@ -39,7 +39,6 @@ package org.dspace.authorize;
//import org.dspace.browse.Browse;
import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import org.dspace.content.Collection;

View File

@@ -795,249 +795,4 @@ public class BrowseEngine
return count;
}
/**
* Get the position of the current start point of the browse in the field of total
* objects relevant to this browse. This is integrally related to how results are
* presented in pages to the User Interface. The argument tells us whether this
* is a distinct browse or not, as this has an impact on how results are calculated
*
* @param distinct is this a distinct browse
* @return the offset of the first result from the start of the set
* @throws SQLException
* @throws BrowseException
*/
private int getPosition(boolean distinct)
throws SQLException, BrowseException
{
log.debug(LogManager.getHeader(context, "get_position", "distinct=" + distinct));
// if there isn't a focus then we are at the start
if (dao.getJumpToValue() == null)
{
log.debug(LogManager.getHeader(context, "get_position_return", "return=0"));
return 0;
}
// ensure that the select is set to "*"
String[] select = { "*" };
dao.setCountValues(select);
// FIXME: it would be nice to have a good way of doing this in the DAO
// now reset all of the fields that we don't want to have constraining
// our count, storing them locally to reinstate later
boolean isAscending = dao.isAscending();
boolean useEquals = dao.useEqualsComparator();
String orderField = dao.getOrderField();
int limit = dao.getLimit();
int offset = dao.getOffset();
// reverse the direction of the query, and remove the equal comparator
// (if it exists), as well as nullifying a few other unnecessary parameters
dao.setAscending(!isAscending);
dao.setEqualsComparator(false);
dao.setOrderField(null);
dao.setLimit(-1);
dao.setOffset(-1);
// perform the query and get the result
int count = dao.doCountQuery();
// now put back the values we removed for this method
dao.setAscending(isAscending);
dao.setEqualsComparator(useEquals);
dao.setOrderField(orderField);
dao.setLimit(limit);
dao.setOffset(offset);
log.debug(LogManager.getHeader(context, "get_position_return", "return=" + count));
return count;
}
/**
* Get the database id of the item at the top of what will be the previous page
* of results. This is so that a "back" button can be generated by the User
* Interface when paging through results. The callback argument is there so that
* if the caller wishes the actual results from the previous page can also be returned
* (this is useful, for example, if you are on the very last page of results, and need
* some previous results to pad out the full number of results per page). If the
* callback is null, then no results are kept
*
* @param callback A List object for holding BrowseItem objects indexed numerically in the correct order
* @return the database id of the top of the previous page
* @throws SQLException
* @throws BrowseException
*/
private int getPreviousPageID(List<BrowseItem> callback)
throws SQLException, BrowseException
{
log.debug(LogManager.getHeader(context, "get_previous_page_id", ""));
// do we want to capture the results?
boolean capture = false;
if (callback != null)
{
capture = true;
}
// the only thing we need to do is reverse the direction
// of the query, and set it to not use the "=" part of the
// comparator (i.e. < and > not <= and >=).
boolean isAscending = dao.isAscending();
dao.setAscending(!isAscending);
boolean useEquals = dao.useEqualsComparator();
dao.setEqualsComparator(false);
// store in local scope the things that we are going to change
// during this method
int resultLimit = dao.getLimit();
// if the database supports it (postgres does), we use limit
// and offset to minimise the work it has to do.
// the limit will be the size of a page, or double the size of the
// page if we are capturing the result set (because the first page's worth
// will be the results, so the previous link will need to come from the
// page *before* that)
int limit = scope.getResultsPerPage();
if (capture)
{
limit *= 2;
}
dao.setLimit(limit);
// now we have a query which is exactly the opposite of the
// original query. So lets execute it:
List<BrowseItem> results = dao.doQuery();
// before we continue, put back the variables we messed with
dao.setAscending(isAscending);
dao.setEqualsComparator(useEquals);
dao.setLimit(resultLimit);
Iterator<BrowseItem> itr = results.iterator();
// work our way through the list, capturing if necessary, and finally
// having the last result, which will be the top of the previous page
int i = 0;
BrowseItem prev = null;
while (itr.hasNext())
{
BrowseItem browseItem = itr.next();
// we need to copy this, because of the scoping vs by-reference issue
prev = browseItem;
// if we need to capture the results in the call back, do it here.
// Note that since the results will come in backwards, we place
// each one at the start of the array so that it displaces the others
// in the right direction. By the end, they should be sorted correctly
// we use the index i to be sure that we only grab one page's worth
// of results (see note above about limit)
if (capture && i < scope.getResultsPerPage())
{
callback.add(0, browseItem);
i++;
}
}
if (prev != null)
{
return prev.getID();
}
else
{
return -1;
}
}
/**
* Get the value (for single value browses) for the result that appears at the top
* of the previous page, for when the User Interface is performing result set paging.
* The callback argument allows for this method to populate the List with the results
* obtained from the query, which can be useful when, for example, reaching the final
* browse page and needing additional results to pad up to the number of results per
* page
*
* @param callback A List object for holding String objects indexed numerically in the correct order
* @return the value of the top of the previous page
* @throws SQLException
* @throws BrowseException
*/
private String getPreviousPageValue(List<String> callback)
throws SQLException, BrowseException
{
// do we want to capture the results?
boolean capture = false;
if (callback != null)
{
capture = true;
}
log.debug(LogManager.getHeader(context, "get_previous_page_value", "capture_results=" + capture));
// the only thing we need to do is reverse the direction
// of the query, and set it to not use the "=" part of the
// comparator (i.e. < and > not <= and >=).
boolean isAscending = dao.isAscending();
dao.setAscending(!isAscending);
boolean useEquals = dao.useEqualsComparator();
dao.setEqualsComparator(false);
// store in local scope the things that we are going to change
// during this method
int resultLimit = dao.getLimit();
// if the database supports it (postgres does), we use limit
// and offset to minimise the work it has to do.
// the limit will be the size of a page, or double the size of the
// page if we are capturing the result set (because the first page's worth
// will be the results, so the previous link will need to come from the
// page *before* that)
int limit = scope.getResultsPerPage();
if (capture)
{
limit *= 2;
}
dao.setLimit(limit);
// now we have a query which is exactly the opposite of the
// original query. So lets execute it:
List<String[]> results = dao.doValueQuery();
// before we continue, put back the variables we messed with
dao.setAscending(isAscending);
dao.setEqualsComparator(useEquals);
dao.setLimit(resultLimit);
// work our way through the list, capturing if necessary, and finally
// having the last result, which will be the top of the previous page
int i = 0;
String prev = null;
for (String[] value : results)
{
// we need to copy this, because of the scoping vs by-reference issue
prev = value[0];
// if we need to capture the results in the call back, do it here.
// Note that since the results will come in backwards, we place
// each one at the start of the array so that it displaces the others
// in the right direction. By the end, they should be sorted correctly
// we use the index i to be sure that we only grab one page's worth
// of results (see note above about limit)
if (capture && i < scope.getResultsPerPage())
{
callback.add(0, value[0]);
i++;
}
}
log.debug(LogManager.getHeader(context, "get_previous_page_value_return", "return=" + prev));
return prev;
}
}

View File

@@ -51,9 +51,6 @@ import org.apache.log4j.Logger;
*/
public class BrowserScope
{
/** the logger for this class */
private static Logger log = Logger.getLogger(BrowserScope.class);
/** the DSpace context */
private Context context;

View File

@@ -38,7 +38,6 @@ import java.io.IOException;
import java.text.ParseException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;

View File

@@ -53,9 +53,6 @@ import org.dspace.core.I18nUtil;
*/
public class SimpleReporterImpl implements SimpleReporter
{
/** log4j logger. */
private static Logger LOG = Logger.getLogger(SimpleReporterImpl.class);
/** Utility date format which includes hours minutes and seconds. */
private static final DateFormat DATE_FORMAT_MAX = DateFormat
.getDateInstance(DateFormat.MEDIUM);

View File

@@ -44,7 +44,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

View File

@@ -40,7 +40,6 @@ package org.dspace.content;
import java.io.IOException;
import java.sql.SQLException;
import java.util.*;
import java.util.Collection;
import org.apache.log4j.Logger;
import org.dspace.authorize.AuthorizeException;

View File

@@ -60,22 +60,6 @@ import org.dspace.storage.rdbms.TableRow;
*/
public class SupervisedItem extends WorkspaceItem
{
/** log4j logger */
private static Logger log = Logger.getLogger(SupervisedItem.class);
/** The item this workspace object pertains to */
private Item item;
/** Our context */
private Context ourContext;
/** The table row corresponding to this workspace item */
private TableRow siRow;
/** The collection the item is being submitted to */
private Collection collection;
/**
* Construct a supervised item out of the given row
*

View File

@@ -43,7 +43,6 @@ package org.dspace.content.crosswalk;
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.sql.SQLException;

View File

@@ -68,9 +68,6 @@ import org.jdom.output.XMLOutputter;
public class DIMDisseminationCrosswalk
implements DisseminationCrosswalk
{
/** log4j category */
private static Logger log = Logger.getLogger(OREDisseminationCrosswalk.class);
// Non-existant XSD schema
public static final String DIM_XSD = "null";
@@ -80,10 +77,6 @@ public class DIMDisseminationCrosswalk
private static final Namespace namespaces[] = { DIM_NS };
private static XMLOutputter outputUgly = new XMLOutputter();
private static XMLOutputter outputPretty = new XMLOutputter(Format.getPrettyFormat());
private static SAXBuilder builder = new SAXBuilder();
public Namespace[] getNamespaces()
{
return namespaces;

View File

@@ -64,8 +64,6 @@ import org.jdom.Namespace;
public class DIMIngestionCrosswalk
implements IngestionCrosswalk
{
/** log4j category */
private static Logger log = Logger.getLogger(DIMIngestionCrosswalk.class);
private static Namespace DIM_NS = Namespace.getNamespace("http://www.dspace.org/xmlns/dspace/dim");
public void ingest(Context context, DSpaceObject dso, List<Element> metadata) throws CrosswalkException, IOException, SQLException, AuthorizeException {

View File

@@ -74,9 +74,6 @@ import org.jdom.input.SAXBuilder;
public class METSDisseminationCrosswalk
implements DisseminationCrosswalk
{
/** log4j category */
private static Logger log = Logger.getLogger(METSDisseminationCrosswalk.class);
// Plugin Name of METS packager to use for manifest;
// maybe make this configurable.
private static final String METS_PACKAGER_PLUGIN = "METS";

View File

@@ -42,7 +42,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

View File

@@ -65,9 +65,6 @@ import org.dspace.core.Context;
public class NullStreamIngestionCrosswalk
implements StreamIngestionCrosswalk
{
/** log4j logger */
private static Logger log = Logger.getLogger(NullStreamIngestionCrosswalk.class);
public void ingest(Context context, DSpaceObject dso, InputStream in, String MIMEType)
throws CrosswalkException, IOException, SQLException, AuthorizeException
{

View File

@@ -64,8 +64,6 @@ import org.jdom.Namespace;
public class OAIDCIngestionCrosswalk
implements IngestionCrosswalk
{
/** log4j category */
private static Logger log = Logger.getLogger(OAIDCIngestionCrosswalk.class);
private static Namespace DC_NS = Namespace.getNamespace("http://www.dspace.org/xmlns/dspace/dim");
private static Namespace OAI_DC_NS = Namespace.getNamespace("http://www.openarchives.org/OAI/2.0/oai_dc/");

View File

@@ -74,9 +74,6 @@ import org.jdom.Namespace;
public class OREDisseminationCrosswalk
implements DisseminationCrosswalk
{
/** log4j category */
private static Logger log = Logger.getLogger(OREDisseminationCrosswalk.class);
/* Schema for Atom only available in Relax NG format */
public static final String ATOM_RNG = "http://tweety.lanl.gov/public/schemas/2008-06/atom-tron.sch";

View File

@@ -42,7 +42,6 @@ import java.io.IOException;
import java.net.URLEncoder;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang.StringUtils;
@@ -85,9 +84,6 @@ public class PREMISCrosswalk
private String schemaLocation =
PREMIS_NS.getURI()+" http://www.loc.gov/standards/premis/PREMIS-v1-0.xsd";
private static final Namespace XLINK_NS =
Namespace.getNamespace("xlink", "http://www.w3.org/TR/xlink");
private static final Namespace namespaces[] = { PREMIS_NS };
/*----------- Submission functions -------------------*/

View File

@@ -46,7 +46,6 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
@@ -152,11 +151,6 @@ public class QDCCrosswalk extends SelfNamedPlugin
// XML schemaLocation fragment for this crosswalk, from config.
private String schemaLocation = null;
private static final Namespace XLINK_NS =
Namespace.getNamespace("xlink", "http://www.w3.org/TR/xlink");
private static XMLOutputter outputUgly = new XMLOutputter();
private static XMLOutputter outputPretty = new XMLOutputter(Format.getPrettyFormat());
private static SAXBuilder builder = new SAXBuilder();
/**

View File

@@ -89,10 +89,6 @@ public class RoleCrosswalk
extends AbstractPackagerWrappingCrosswalk
implements IngestionCrosswalk, DisseminationCrosswalk
{
/** log4j category */
private static Logger log = Logger.getLogger(RoleCrosswalk.class);
// Plugin Name of DSPACE-ROLES packager to use for ingest/dissemination
// (Whatever plugin is defined with this name in 'dspace.cfg' will be used by this Crosswalk)
private static final String ROLE_PACKAGER_PLUGIN = "DSPACE-ROLES";

View File

@@ -72,9 +72,6 @@ import org.dspace.core.Context;
public abstract class AbstractPackageDisseminator
implements PackageDisseminator
{
/** log4j category */
private static Logger log = Logger.getLogger(AbstractPackageDisseminator.class);
/** List of all successfully disseminated package files */
private List<File> packageFileList = new ArrayList<File>();

View File

@@ -114,9 +114,6 @@ import java.net.URLEncoder;
public class DSpaceAIPDisseminator
extends AbstractMETSDisseminator
{
/** log4j category */
private static Logger log = Logger.getLogger(DSpaceAIPDisseminator.class);
/**
* Unique identifier for the profile of the METS document.
* To ensure uniqueness, it is the URL that the XML schema document would

View File

@@ -85,9 +85,6 @@ import edu.harvard.hul.ois.mets.helper.PCData;
public class DSpaceMETSDisseminator
extends AbstractMETSDisseminator
{
/** log4j category */
private static Logger log = Logger.getLogger(DSpaceMETSDisseminator.class);
/**
* Identifier for the package we produce, i.e. DSpace METS SIP
* Profile. Though not strictly true, there is no DIP standard yet

View File

@@ -79,9 +79,6 @@ import org.jdom.Element;
public class DSpaceMETSIngester
extends AbstractMETSIngester
{
/** log4j category */
private static Logger log = Logger.getLogger(DSpaceMETSIngester.class);
// first part of required mets@PROFILE value
private final static String PROFILE_START = "DSpace METS SIP Profile";

View File

@@ -300,21 +300,4 @@ public class AccountManager
+ " information to " + email);
}
}
/**
* Return the date on which registrations expire.
*
* @return - The date on which registrations expire
*/
private static Timestamp getDefaultExpirationDate()
{
Calendar calendar = Calendar.getInstance();
calendar.setTime(new java.util.Date());
// Add 1 year from today
calendar.add(Calendar.WEEK_OF_YEAR, 52);
return new java.sql.Timestamp(calendar.getTime().getTime());
}
}

View File

@@ -43,7 +43,6 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;

View File

@@ -61,10 +61,6 @@ import org.dspace.storage.rdbms.DatabaseManager;
* @version $Revision$
*/
public class Supervisor {
/** log4j category */
private static Logger log = Logger.getLogger(Supervisor.class);
/** value to use for no policy set */
public static final int POLICY_NONE = 0;

View File

@@ -42,7 +42,6 @@ import java.io.Serializable;
import java.sql.SQLException;
import java.util.BitSet;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

View File

@@ -75,8 +75,6 @@ import org.dspace.sort.OrderFormatText;
*/
public class OrderFormat
{
private final static Logger log = LogManager.getLogger(OrderFormat.class);
public final static String AUTHOR = "author";
public final static String TITLE = "title";
public final static String TEXT = "text";

View File

@@ -102,9 +102,6 @@ public class InitialQuestionsStep extends AbstractProcessingStep
protected boolean willRemoveFiles = false;
/** log4j logger */
private static Logger log = Logger.getLogger(InitialQuestionsStep.class);
/**
* Do any processing of the information input by the user, and/or perform
* step processing (if no user interaction required)

View File

@@ -89,10 +89,6 @@ public class SampleStep extends AbstractProcessingStep
**************************************************************************/
public static final int STATUS_USER_INPUT_ERROR = 1;
/** log4j logger */
private static Logger log = Logger.getLogger(SampleStep.class);
/**
* Do any processing of the information input by the user, and/or perform
* step processing (if no user interaction required)

View File

@@ -84,9 +84,6 @@ public class SelectCollectionStep extends AbstractProcessingStep
// invalid collection or error finding collection
public static final int STATUS_INVALID_COLLECTION = 2;
/** log4j logger */
private static Logger log = Logger.getLogger(SelectCollectionStep.class);
/**
* Do any processing of the information input by the user, and/or perform
* step processing (if no user interaction required)

View File

@@ -69,9 +69,6 @@ import org.dspace.submit.AbstractProcessingStep;
*/
public class VerifyStep extends AbstractProcessingStep
{
/** log4j logger */
private static Logger log = Logger.getLogger(VerifyStep.class);
/**
* Do any processing of the information input by the user, and/or perform
* step processing (if no user interaction required)

View File

@@ -899,28 +899,6 @@ public class WorkflowManager
}
}
/**
* Add all the specified people to the list of email recipients,
* and send it
*
* @param c
* Context
* @param epa
* Eperson[] of recipients
* @param email
* Email object containing the message
*/
private static void emailRecipients(Context c, EPerson[] epa, Email email)
throws SQLException, MessagingException
{
for (int i = 0; i < epa.length; i++)
{
email.addRecipient(epa[i].getEmail());
}
email.send();
}
private static String getMyDSpaceLink()
{
return ConfigurationManager.getProperty("dspace.url") + "/mydspace";

View File

@@ -69,8 +69,6 @@ import org.xml.sax.SAXException;
*/
public class CollectionSearch extends AbstractDSpaceTransformer implements CacheableProcessingComponent
{
private static final Logger log = Logger.getLogger(CollectionSearch.class);
/** Language Strings */
private static final Message T_dspace_home =
message("xmlui.general.dspace_home");

View File

@@ -76,9 +76,6 @@ public class CommunitySearch extends AbstractDSpaceTransformer implements Cachea
private static final Logger log = Logger.getLogger(CommunitySearch.class);
/** Language Strings */
private static final Message T_dspace_home =
message("xmlui.general.dspace_home");
private static final Message T_full_text_search =
message("xmlui.ArtifactBrowser.CommunityViewer.full_text_search");
@@ -88,24 +85,6 @@ public class CommunitySearch extends AbstractDSpaceTransformer implements Cachea
public static final Message T_untitled =
message("xmlui.general.untitled");
private static final Message T_head_browse =
message("xmlui.ArtifactBrowser.CommunityViewer.head_browse");
private static final Message T_browse_titles =
message("xmlui.ArtifactBrowser.CommunityViewer.browse_titles");
private static final Message T_browse_authors =
message("xmlui.ArtifactBrowser.CommunityViewer.browse_authors");
private static final Message T_browse_dates =
message("xmlui.ArtifactBrowser.CommunityViewer.browse_dates");
private static final Message T_advanced_search_link=
message("xmlui.ArtifactBrowser.CommunityViewer.advanced_search_link");
private static final Message T_head_sub_communities =
message("xmlui.ArtifactBrowser.CommunityViewer.head_sub_communities");
private static final Message T_head_sub_collections =
message("xmlui.ArtifactBrowser.CommunityViewer.head_sub_collections");

View File

@@ -60,9 +60,6 @@ import org.dspace.core.Context;
*/
public class AdvancedSearchServlet extends DSpaceServlet
{
/** Logger */
private static Logger log = Logger.getLogger(SubscribeServlet.class);
protected void doDSGet(Context context, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException,
SQLException, AuthorizeException

View File

@@ -119,10 +119,6 @@ public class FeedServlet extends DSpaceServlet
// Whether to include private items or not
private static boolean includeAll = true;
//default fields to display in item description
private static String defaultDescriptionFields = "dc.title, dc.contributor.author, dc.contributor.editor, dc.description.abstract, dc.description";
static
{
enabled = ConfigurationManager.getBooleanProperty("webui.feed.enable");

View File

@@ -707,62 +707,6 @@ public class HandleServlet extends DSpaceServlet
return false;
}
/**
* Utility method to obtain the titles for the Items in the given list.
*
* @param items List of Items
* @return array of corresponding titles
*/
private String[] getItemTitles(List<Item> items)
{
String[] titles = new String[items.size()];
for (int i = 0; i < items.size(); i++)
{
Item item = items.get(i);
// FIXME: Should probably check for preferred language?
DCValue[] titlesForThis = item.getDC("title", null, Item.ANY);
// Just use the first title, if any
if (titlesForThis.length == 0)
{
// No title at all!
titles[i] = null;
}
else
{
// Use first title
titles[i] = titlesForThis[0].value;
}
}
return titles;
}
/**
* Utility method obtain URLs for the most recent items
*
* @param context
* DSpace context
* @param items
* the items to get URLs for
* @return an array of URLs (in Strings) corresponding to those items
*/
private String[] getItemURLs(Context context, List<Item> items)
throws SQLException
{
String[] urls = new String[items.size()];
for (int i = 0; i < items.size(); i++)
{
Item item = items.get(i);
urls[i] = "/handle/" + item.getHandle();
}
return urls;
}
/**
* Utility method to produce a list of parent communities for a given
* community, ending with the passed community, if include is true. If

View File

@@ -73,17 +73,10 @@ public class ItemExportArchiveServlet extends DSpaceServlet {
private static Logger log = Logger
.getLogger(ItemExportArchiveServlet.class);
/**
* Threshold on export size size before content-disposition will be set.
*/
private int threshold;
@Override
public void init(ServletConfig arg0) throws ServletException {
super.init(arg0);
threshold = ConfigurationManager
.getIntProperty("webui.content_disposition_threshold");
}
@Override

View File

@@ -75,10 +75,6 @@ import org.dspace.eperson.Group;
*/
public class StatisticsServlet extends org.dspace.app.webui.servlet.DSpaceServlet
{
/** log4j category */
private static Logger log = Logger.getLogger(StatisticsServlet.class);
protected void doDSGet(Context c,
HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, SQLException, AuthorizeException

View File

@@ -63,9 +63,6 @@ import org.dspace.eperson.Subscribe;
*/
public class SubscribeServlet extends DSpaceServlet
{
/** Logger */
private static Logger log = Logger.getLogger(SubscribeServlet.class);
protected void doDSGet(Context context, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException,
SQLException, AuthorizeException

View File

@@ -79,9 +79,6 @@ public class BitstreamFormatRegistry extends DSpaceServlet
/** User wants to create a new format */
public static final int CREATE = 4;
/** Logger */
private static Logger log = Logger.getLogger(BitstreamFormatRegistry.class);
protected void doDSGet(Context context, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException,
SQLException, AuthorizeException

View File

@@ -64,9 +64,6 @@ import org.dspace.eperson.EPersonDeletionException;
*/
public class EPersonAdminServlet extends DSpaceServlet
{
/** Logger */
private static Logger log = Logger.getLogger(EPersonAdminServlet.class);
protected void doDSGet(Context context, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException,
SQLException, AuthorizeException

View File

@@ -49,7 +49,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

View File

@@ -62,9 +62,6 @@ import org.dspace.core.I18nUtil;
*/
public class LicenseEditServlet extends DSpaceServlet
{
/** The logger */
private static Logger log = Logger.getLogger(LicenseEditServlet.class);
/**
* Handle GET requests. This does nothing but forwards
* the request on to the POST handler.

View File

@@ -61,8 +61,6 @@ import org.dspace.core.Context;
*/
public class NewsEditServlet extends DSpaceServlet
{
private static Logger log = Logger.getLogger(NewsEditServlet.class);
protected void doDSGet(Context c, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException,
SQLException, AuthorizeException

View File

@@ -73,10 +73,6 @@ import org.dspace.core.Context;
*/
public class JSPCompleteStep extends JSPStep
{
/** log4j logger */
private static Logger log = Logger.getLogger(JSPCompleteStep.class);
/**
* Do any pre-processing to determine which JSP (if any) is used to generate
* the UI for this step. This method should include the gathering and

View File

@@ -105,9 +105,6 @@ public class JSPInitialQuestionsStep extends JSPStep
/** JSP which displays information to be reviewed during 'verify step' * */
private static final String REVIEW_JSP = "/submit/review-init.jsp";
/** log4j logger */
private static Logger log = Logger.getLogger(JSPInitialQuestionsStep.class);
/**
* Do any pre-processing to determine which JSP (if any) is used to generate
* the UI for this step. This method should include the gathering and

View File

@@ -104,9 +104,6 @@ import org.dspace.submit.step.SampleStep;
*/
public class JSPSampleStep extends JSPStep
{
/** log4j logger */
private static Logger log = Logger.getLogger(JSPSampleStep.class);
/** JSP which displays the step to the user * */
private static final String DISPLAY_JSP = "/submit/sample-step.jsp";

View File

@@ -99,9 +99,6 @@ public class LNISmokeTest
* The Constant NS_DSPACE.
* DSpace's XML namespace
*/
private static final Namespace NS_DSPACE = Namespace.getNamespace("dspace",
"http://www.dspace.org/xmlns/dspace");
/** The output pretty. */
private static XMLOutputter outputPretty = new XMLOutputter(Format
.getPrettyFormat());

View File

@@ -65,10 +65,6 @@ import org.jdom.Element;
*/
class DAVCommunity extends DAVDSpaceObject
{
/** log4j category. */
private static Logger log = Logger.getLogger(DAVCommunity.class);
/** The community. */
private Community community = null;

View File

@@ -43,7 +43,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@@ -43,7 +43,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -67,10 +66,6 @@ import org.jdom.Element;
*/
class DAVEPersonEPerson extends DAVResource
{
/** log4j category. */
private static Logger log = Logger.getLogger(DAVEPersonEPerson.class);
/** The eperson. */
private EPerson eperson = null;

View File

@@ -43,7 +43,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@@ -43,7 +43,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@@ -49,7 +49,6 @@ import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

View File

@@ -94,12 +94,6 @@ public class DAVServlet extends HttpServlet
/** The Constant METHOD_MOVE. */
private static final String METHOD_MOVE = "MOVE";
/** The Constant METHOD_LOCK. */
private static final String METHOD_LOCK = "LOCK";
/** The Constant METHOD_UNLOCK. */
private static final String METHOD_UNLOCK = "UNLOCK";
/** The Constant METHOD_DELETE. */
private static final String METHOD_DELETE = "DELETE";

View File

@@ -43,7 +43,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -63,10 +62,6 @@ import org.jdom.Element;
*/
class DAVSite extends DAVResource
{
/** log4j category. */
private static Logger log = Logger.getLogger(DAVSite.class);
/** The Constant news_topProperty. */
private static final Element news_topProperty = new Element("news_top",
DAV.NS_DSPACE);

View File

@@ -44,7 +44,6 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@@ -43,7 +43,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@@ -43,7 +43,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@@ -43,7 +43,6 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@@ -60,9 +60,6 @@ import ORG.oclc.oai.server.verb.CannotDisseminateFormatException;
*/
public class DSpaceRecordFactory extends RecordFactory
{
/** log4j category */
private static Logger log = Logger.getLogger(DSpaceRecordFactory.class);
public DSpaceRecordFactory(Properties properties)
{
// We don't use the OAICat properties; pass on up

View File

@@ -62,8 +62,6 @@ import org.apache.log4j.Logger;
*/
public abstract class DSpaceATOMEntry
{
private static Logger log = Logger.getLogger(DSpaceATOMEntry.class);
/** the SWORD ATOM entry which this class effectively decorates */
protected SWORDEntry entry;

View File

@@ -51,9 +51,6 @@ import java.util.List;
*/
public class ItemCollectionGenerator extends ATOMCollectionGenerator
{
/** logger */
private static Logger log = Logger.getLogger(ItemCollectionGenerator.class);
public ItemCollectionGenerator(SWORDService service)
{
super(service);

View File

@@ -51,8 +51,6 @@ import java.sql.SQLException;
public class ItemDepositor extends Depositor
{
private static Logger log = Logger.getLogger(ItemDepositor.class);
private Item item;
public ItemDepositor(SWORDService swordService, DSpaceObject dso)

View File

@@ -52,9 +52,6 @@ import org.dspace.content.Bitstream;
*/
public class MediaEntryManager
{
/** logger */
private static Logger log = Logger.getLogger(MediaEntryManager.class);
/** sword service implementation */
private SWORDService swordService;

View File

@@ -71,9 +71,6 @@ import java.sql.SQLException;
*/
public class SWORDConfiguration
{
/** logger */
private static Logger log = Logger.getLogger(SWORDConfiguration.class);
/** whether we can support noOp */
private boolean noOp = true;

View File

@@ -69,9 +69,6 @@ import org.apache.log4j.Logger;
*/
public class SWORDContext
{
/** logger */
private static Logger log = Logger.getLogger(SWORDContext.class);
/** The primary authenticated user for the request */
private EPerson authenticated = null;

View File

@@ -58,8 +58,6 @@ import org.apache.log4j.Logger;
*/
public class SWORDIngesterFactory
{
private static Logger log = Logger.getLogger(SWORDIngesterFactory.class);
/**
* Generate an object which conforms to the SWORDIngester interface.
* This Factory method may use the given DSpace context and the given

View File

@@ -61,9 +61,6 @@ import java.net.MalformedURLException;
*/
public class SWORDUrlManager
{
/** logger */
private static Logger log = Logger.getLogger(SWORDUrlManager.class);
/** the sword configuration */
private SWORDConfiguration config;

View File

@@ -54,8 +54,6 @@ import java.util.List;
public class ServiceDocumentManager
{
private static Logger log = Logger.getLogger(ServiceDocumentManager.class);
private SWORDService swordService;
private SWORDAuthenticator swordAuth;

View File

@@ -62,9 +62,6 @@ import java.io.IOException;
*/
public class SimpleFileIngester implements SWORDIngester
{
/** logger */
private static Logger log = Logger.getLogger(SimpleFileIngester.class);
/** sword service implementation */
private SWORDService swordService;

View File

@@ -100,11 +100,6 @@ public class Author extends XmlElement implements SwordElementInterface
*/
private Email email;
/**
* The logger.
*/
private static Logger log = Logger.getLogger(Author.class);
/**
*
*/

View File

@@ -83,12 +83,6 @@ public class SWORDEntry extends Entry
*/
private SwordPackaging swordPackaging;
/**
* The logger.
*/
private static Logger log = Logger.getLogger(SWORDEntry.class);
/**
* Create a new SWORDEntry with the given namespace and element. This method is
* not normally used, instead the default constructor should be used as this will

View File

@@ -56,11 +56,6 @@ public class SWORDErrorDocument extends SWORDEntry
@Deprecated
public static final String ELEMENT_NAME = "error";
/**
* The logger.
*/
private static Logger log = Logger.getLogger(SWORDErrorDocument.class);
private static final XmlName XML_NAME =
new XmlName(Namespaces.PREFIX_SWORD, "error", Namespaces.NS_SWORD);

View File

@@ -59,9 +59,6 @@ import org.purl.sword.base.SWORDException;
*/
public class AtomDocumentServlet extends DepositServlet {
/** Logger */
private static Logger log = Logger.getLogger(AtomDocumentServlet.class);
/**
* Initialise the servlet.
*

View File

@@ -127,10 +127,6 @@ public class WithdrawnItems extends AbstractDSpaceTransformer implements
private final static Message T_rpp = message("xmlui.ArtifactBrowser.ConfigurableBrowse.general.rpp");
private final static Message T_etal = message("xmlui.ArtifactBrowser.ConfigurableBrowse.general.etal");
private final static Message T_etal_all = message("xmlui.ArtifactBrowser.ConfigurableBrowse.etal.all");
private final static Message T_order_asc = message("xmlui.ArtifactBrowser.ConfigurableBrowse.order.asc");
private final static Message T_order_desc = message("xmlui.ArtifactBrowser.ConfigurableBrowse.order.desc");

View File

@@ -102,8 +102,6 @@ public class EditCollectionMetadataForm extends AbstractDSpaceTransformer
private static final Message T_submit_delete = message("xmlui.administrative.collection.EditCollectionMetadataForm.submit_delete");
private static final Message T_submit_save = message("xmlui.administrative.collection.EditCollectionMetadataForm.submit_save");
private static final Message T_sysadmins_only = message("xmlui.administrative.collection.EditCollectionMetadataForm.sysadmins_only");
public void addPageMeta(PageMeta pageMeta) throws WingException
{
pageMeta.addMetadata("title").addContent(T_title);

View File

@@ -132,10 +132,6 @@ public class ConfigurableBrowse extends AbstractDSpaceTransformer implements
private final static Message T_rpp = message("xmlui.ArtifactBrowser.ConfigurableBrowse.general.rpp");
private final static Message T_etal = message("xmlui.ArtifactBrowser.ConfigurableBrowse.general.etal");
private final static Message T_etal_all = message("xmlui.ArtifactBrowser.ConfigurableBrowse.etal.all");
private final static Message T_order_asc = message("xmlui.ArtifactBrowser.ConfigurableBrowse.order.asc");
private final static Message T_order_desc = message("xmlui.ArtifactBrowser.ConfigurableBrowse.order.desc");

View File

@@ -86,8 +86,6 @@ import org.dspace.app.sfx.SFXFileReader;
*/
public class ItemViewer extends AbstractDSpaceTransformer implements CacheableProcessingComponent
{
private static final Logger log = Logger.getLogger(ItemViewer.class);
/** Language strings */
private static final Message T_dspace_home =
message("xmlui.general.dspace_home");

View File

@@ -97,9 +97,6 @@ import org.apache.log4j.Logger;
*/
public class ChoiceLookupTransformer extends AbstractDSpaceTransformer
{
/** log4j logger */
private static Logger log = Logger.getLogger(ChoiceLookupTransformer.class);
private static final String CONFIG_PREFIX = "xmlui.lookup.field.";
/** Language Strings */

View File

@@ -73,9 +73,6 @@ import org.xml.sax.SAXException;
*/
public class StepTransformer extends AbstractDSpaceTransformer
{
private static Logger log = Logger.getLogger(StepTransformer.class);
/**
* The id of the currently active workspace or workflow, this contains
* the incomplete DSpace item

View File

@@ -98,9 +98,6 @@ import org.xml.sax.SAXException;
*/
public class DescribeStep extends AbstractSubmissionStep
{
private static Logger log = Logger.getLogger(DescribeStep.class);
/** Language Strings **/
protected static final Message T_head =
message("xmlui.Submission.submit.DescribeStep.head");

View File

@@ -90,8 +90,6 @@ import org.xml.sax.SAXException;
*/
public class UploadStep extends AbstractSubmissionStep
{
private static Logger log = Logger.getLogger(UploadStep.class);
/** Language Strings for Uploading **/
protected static final Message T_head =
message("xmlui.Submission.submit.UploadStep.head");

View File

@@ -144,9 +144,6 @@ public class DSpaceFeedGenerator extends AbstractGenerator
CACHE_AGE = 1000 * 60 * 60 * ageCfg;
}
/** default fields to display in item description */
private static String defaultDescriptionFields = "dc.description.abstract, dc.description, dc.title.alternative, dc.title";
/** configuration option to include Item which does not have READ by Anonymous enabled **/
private static boolean includeRestrictedItems = ConfigurationManager.getBooleanProperty("harvest.includerestricted.rss", true);

View File

@@ -108,8 +108,6 @@ import org.xml.sax.SAXException;
public class OpenSearchGenerator extends AbstractGenerator
implements CacheableProcessingComponent, Recyclable
{
private static final Logger log = Logger.getLogger(OpenSearchGenerator.class);
/** Cache of this object's validity */
private ExpiresValidity validity = null;

View File

@@ -225,8 +225,6 @@ public class Data extends AbstractWingElement
AttributeMap attributes = new AttributeMap();
attributes.setNamespace(WingConstants.I18N);
boolean unknownType = false;
if (dictionaryParameter instanceof Date)
{
Date date = (Date) dictionaryParameter;
@@ -267,11 +265,6 @@ public class Data extends AbstractWingElement
attributes.put(A_TYPE, TYPE_NUMBER);
attributes.put(A_VALUE, String.valueOf(value));
}
else
{
// Unknown types or String
unknownType = true;
}
startElement(contentHandler, namespaces, WingConstants.I18N, E_PARAM, attributes);