();
- /** constant for a DATE column */
- private static final int DATE = 1;
+ /** constant for a DATE column */
+ private static final int DATE = 1;
- /** constant for a TEXT column */
- private static final int TEXT = 2;
+ /** constant for a TEXT column */
+ private static final int TEXT = 2;
- /**
- * Create a new instance of the Item list configuration. This loads
- * all the required information from configuration
- *
- * @throws BrowseException
- */
- public ItemListConfig()
- throws BrowseException
- {
- try
- {
- String configLine = ConfigurationManager.getProperty("webui.itemlist.columns");
-
- if (configLine == null || "".equals(configLine))
- {
- throw new BrowseException("There is no configuration for webui.itemlist.columns");
- }
-
- // parse the config
- StringTokenizer st = new StringTokenizer(configLine, ",");
- int i = 1;
- while (st.hasMoreTokens())
- {
- Integer key = Integer.valueOf(i);
- String token = st.nextToken();
-
- // find out if the field is a date
- if (token.indexOf("(date)") > 0)
- {
- token = token.replaceAll("\\(date\\)", "");
- types.put(key, Integer.valueOf(ItemListConfig.DATE));
- }
- else
- {
- types.put(key, Integer.valueOf(ItemListConfig.TEXT));
- }
-
- String[] mdBits = interpretField(token.trim(), null);
- metadata.put(key, mdBits);
-
- // don't forget to increment the key counter
- i++;
- }
- }
- catch (IOException e)
- {
- throw new BrowseException(e);
- }
- }
+ /**
+ * Create a new instance of the Item list configuration. This loads
+ * all the required information from configuration
+ *
+ * @throws BrowseException
+ */
+ public ItemListConfig()
+ throws BrowseException
+ {
+ try
+ {
+ String configLine = ConfigurationManager.getProperty("webui.itemlist.columns");
- /**
- * how many columns are there?
- *
- * @return the number of columns
- */
- public int numCols()
- {
- return metadata.size();
- }
+ if (configLine == null || "".equals(configLine))
+ {
+ throw new BrowseException("There is no configuration for webui.itemlist.columns");
+ }
+
+ // parse the config
+ StringTokenizer st = new StringTokenizer(configLine, ",");
+ int i = 1;
+ while (st.hasMoreTokens())
+ {
+ Integer key = Integer.valueOf(i);
+ String token = st.nextToken();
+
+ // find out if the field is a date
+ if (token.indexOf("(date)") > 0)
+ {
+ token = token.replaceAll("\\(date\\)", "");
+ types.put(key, Integer.valueOf(ItemListConfig.DATE));
+ }
+ else
+ {
+ types.put(key, Integer.valueOf(ItemListConfig.TEXT));
+ }
+
+ String[] mdBits = interpretField(token.trim(), null);
+ metadata.put(key, mdBits);
+
+ // don't forget to increment the key counter
+ i++;
+ }
+ }
+ catch (IOException e)
+ {
+ throw new BrowseException(e);
+ }
+ }
+
+ /**
+ * how many columns are there?
+ *
+ * @return the number of columns
+ */
+ public int numCols()
+ {
+ return metadata.size();
+ }
- /**
- * what metadata is to go in the given column number
- *
- * @param col
- * @return
- */
- public String[] getMetadata(int col)
- {
- return metadata.get(Integer.valueOf(col));
- }
-
- /**
+ /**
+ * what metadata is to go in the given column number
+ *
+ * @param col
+ */
+ public String[] getMetadata(int col)
+ {
+ return metadata.get(Integer.valueOf(col));
+ }
+
+ /**
* Take a string representation of a metadata field, and return it as an array.
* This is just a convenient utility method to basically break the metadata
* representation up by its delimiter (.), and stick it in an array, inserting
diff --git a/dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java b/dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java
index 825d99eb89..66f026f431 100644
--- a/dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java
+++ b/dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java
@@ -176,8 +176,6 @@ public class ChecksumHistory
/**
* Return the processing result.
- *
- * @return
*/
public String getResult()
{
diff --git a/dspace-api/src/main/java/org/dspace/checker/ResultsPruner.java b/dspace-api/src/main/java/org/dspace/checker/ResultsPruner.java
index 4c4e1d8d9f..af7f0df73a 100644
--- a/dspace-api/src/main/java/org/dspace/checker/ResultsPruner.java
+++ b/dspace-api/src/main/java/org/dspace/checker/ResultsPruner.java
@@ -110,7 +110,6 @@ public final class ResultsPruner
* properties.
*
* @param props
- * @return
* @throws FileNotFoundException
*/
public static ResultsPruner getPruner(Properties props)
diff --git a/dspace-api/src/main/java/org/dspace/content/Bitstream.java b/dspace-api/src/main/java/org/dspace/content/Bitstream.java
index 46741c6903..d7465facf7 100644
--- a/dspace-api/src/main/java/org/dspace/content/Bitstream.java
+++ b/dspace-api/src/main/java/org/dspace/content/Bitstream.java
@@ -686,9 +686,11 @@ public class Bitstream extends DSpaceObject
}
/**
- * Get the parent object of a bitstream. It can either be an item if this is a normal
- * bitstream, otherwise it could be a collection or a community if it is a logo.
- * @return
+ * Get the parent object of a bitstream. The parent can be an item if this
+ * is a normal bitstream, or it could be a collection or a community if the
+ * bitstream is a logo.
+ *
+ * @return this bitstream's parent.
* @throws SQLException
*/
public DSpaceObject getParentObject() throws SQLException
diff --git a/dspace-api/src/main/java/org/dspace/content/LicenseUtils.java b/dspace-api/src/main/java/org/dspace/content/LicenseUtils.java
index 8a6c419e26..56c40822c4 100644
--- a/dspace-api/src/main/java/org/dspace/content/LicenseUtils.java
+++ b/dspace-api/src/main/java/org/dspace/content/LicenseUtils.java
@@ -32,8 +32,8 @@ public class LicenseUtils
* Return the text of the license that the user has granted/must grant
* before for submit the item. The license text is build using the template
* defined for the collection if any or the wide site configuration. In the
- * license text the following substitution can be used. {0} the eperson
- * firstname
+ * license text the following substitutions can be used.
+ * {0} the eperson firstname
* {1} the eperson lastname
* {2} the eperson email
* {3} the current date
@@ -46,7 +46,7 @@ public class LicenseUtils
* {x} any addition argument supplied wrapped in the
* LicenseArgumentFormatter based on his type (map key)
*
- * @see LicenseArgumentFormatter
+ * @see license.LicenseArgumentFormatter
* @param locale
* @param collection
* @param item
@@ -90,15 +90,15 @@ public class LicenseUtils
}
/**
- * Utility method if no additional arguments has need to be supplied to the
- * license template. (i.e. call the full getLicenseText supplying
- * null
for the additionalInfo argument)
- *
+ * Utility method if no additional arguments are to be supplied to the
+ * license template. (equivalent to calling the full getLicenseText
+ * supplying {@code null} for the additionalInfo argument)
+ *
* @param locale
* @param collection
* @param item
* @param eperson
- * @return
+ * @return the license text, with no custom substitutions.
*/
public static String getLicenseText(Locale locale, Collection collection,
Item item, EPerson eperson)
diff --git a/dspace-api/src/main/java/org/dspace/content/MetadataField.java b/dspace-api/src/main/java/org/dspace/content/MetadataField.java
index bada1ee5e3..d904f70e61 100644
--- a/dspace-api/src/main/java/org/dspace/content/MetadataField.java
+++ b/dspace-api/src/main/java/org/dspace/content/MetadataField.java
@@ -661,7 +661,7 @@ public class MetadataField
* Return true
if other
is the same MetadataField
* as this object, false
otherwise
*
- * @param other
+ * @param obj
* object to compare to
*
* @return true
if object passed in represents the same
diff --git a/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java b/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java
index 15f5a16f24..c5ff7a1adc 100644
--- a/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java
+++ b/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java
@@ -213,11 +213,11 @@ public abstract class AbstractMETSDisseminator
* a failure creating the package.
*
* @param context DSpace context.
- * @param object DSpace object (item, collection, etc)
+ * @param dso DSpace object (item, collection, etc)
* @param params Properties-style list of options specific to this packager
* @param pkgFile File where export package should be written
- * @throws PackageValidationException if package cannot be created or there is
- * a fatal error in creating it.
+ * @throws PackageValidationException if package cannot be created or there
+ * is a fatal error in creating it.
*/
@Override
public void disseminate(Context context, DSpaceObject dso,
@@ -1219,7 +1219,7 @@ public abstract class AbstractMETSDisseminator
* @param type - type attr value for the
* @param dso - object for which to create the div
* @param params
- * @return
+ * @return a new {@code Div} with {@code dso} as child.
*/
protected Div makeChildDiv(String type, DSpaceObject dso, PackageParameters params)
{
@@ -1394,7 +1394,7 @@ public abstract class AbstractMETSDisseminator
* @param context current DSpace Context
* @param params current Packager Parameters
* @param dso current DSpace Object
- * @param ref the rightsMD element
+ * @param mdRef the rightsMD element
* @throws SQLException
* @throws IOException
* @throws AuthorizeException
diff --git a/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSIngester.java b/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSIngester.java
index 1ce1f63d41..1f6b637ea9 100644
--- a/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSIngester.java
+++ b/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSIngester.java
@@ -1326,7 +1326,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester
* DSpace Context
* @param manifest
* METS manifest
- * @returns a DSpace Object which is the parent (or null, if not found)
+ * @return a DSpace Object which is the parent (or null, if not found)
* @throws PackageValidationException
* if parent reference cannot be found in manifest
* @throws MetadataValidationException
@@ -1377,7 +1377,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester
*
* @param manifest
* METS manifest
- * @returns handle as a string (or null, if not found)
+ * @return handle as a string (or null, if not found)
* @throws PackageValidationException
* if handle cannot be found in manifest
*/
@@ -1574,7 +1574,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester
/**
* Determines what type of DSpace object is represented in this METS doc.
*
- * @returns one of the object types in Constants.
+ * @return one of the object types in Constants.
*/
public abstract int getObjectType(METSManifest manifest)
throws PackageValidationException;
diff --git a/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageDisseminator.java b/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageDisseminator.java
index 06997acdeb..e9689cce0b 100644
--- a/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageDisseminator.java
+++ b/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageDisseminator.java
@@ -163,7 +163,7 @@ public abstract class AbstractPackageDisseminator
/**
* Add File to list of successfully disseminated package files
- * @param file File
+ * @param f added File.
*/
protected void addToPackageList(File f)
{
diff --git a/dspace-api/src/main/java/org/dspace/content/packager/PackageParameters.java b/dspace-api/src/main/java/org/dspace/content/packager/PackageParameters.java
index 269df9a926..b062fefe64 100644
--- a/dspace-api/src/main/java/org/dspace/content/packager/PackageParameters.java
+++ b/dspace-api/src/main/java/org/dspace/content/packager/PackageParameters.java
@@ -168,7 +168,6 @@ public class PackageParameters extends Properties
* Utility method to enable/disable workflow for Item ingestion.
*
* @param value boolean value (true = workflow enabled, false = workflow disabled)
- * @return boolean result
*/
public void setWorkflowEnabled(boolean value)
{
@@ -212,7 +211,6 @@ public class PackageParameters extends Properties
* either skip-over (keep) or replace existing objects.
*
* @param value boolean value (true = restore enabled, false = restore disabled)
- * @return boolean result
*/
public void setRestoreModeEnabled(boolean value)
{
@@ -244,7 +242,6 @@ public class PackageParameters extends Properties
* of "restore", where the current object is being restored to a previous state.
*
* @param value boolean value (true = replace enabled, false = replace disabled)
- * @return boolean result
*/
public void setReplaceModeEnabled(boolean value)
{
@@ -276,7 +273,6 @@ public class PackageParameters extends Properties
* essentially restores all missing objects, but keeps existing ones intact.
*
* @param value boolean value (true = replace enabled, false = replace disabled)
- * @return boolean result
*/
public void setKeepExistingModeEnabled(boolean value)
{
@@ -303,7 +299,6 @@ public class PackageParameters extends Properties
* Item Template
*
* @param value boolean value (true = template enabled, false = template disabled)
- * @return boolean result
*/
public void setUseCollectionTemplate(boolean value)
{
@@ -336,7 +331,6 @@ public class PackageParameters extends Properties
* recursively performs the same action on all related objects.
*
* @param value boolean value (true = recursion enabled, false = recursion disabled)
- * @return boolean result
*/
public void setRecursiveModeEnabled(boolean value)
{
diff --git a/dspace-api/src/main/java/org/dspace/core/Context.java b/dspace-api/src/main/java/org/dspace/core/Context.java
index 15023c3351..e0e530430f 100644
--- a/dspace-api/src/main/java/org/dspace/core/Context.java
+++ b/dspace-api/src/main/java/org/dspace/core/Context.java
@@ -561,10 +561,8 @@ public class Context
}
/**
- * gets an array of all of the special groups that current user is a member
- * of
- *
- * @return
+ * Get an array of all of the special groups that current user is a member
+ * of.
* @throws SQLException
*/
public Group[] getSpecialGroups() throws SQLException
diff --git a/dspace-api/src/main/java/org/dspace/core/I18nUtil.java b/dspace-api/src/main/java/org/dspace/core/I18nUtil.java
index 73b38c9d84..931e900af4 100644
--- a/dspace-api/src/main/java/org/dspace/core/I18nUtil.java
+++ b/dspace-api/src/main/java/org/dspace/core/I18nUtil.java
@@ -95,7 +95,6 @@ public class I18nUtil
* return the default Locale for the repository.
*
* @param ep
- * @return
*/
public static Locale getEPersonLocale(EPerson ep)
{
diff --git a/dspace-api/src/main/java/org/dspace/core/PluginInstantiationException.java b/dspace-api/src/main/java/org/dspace/core/PluginInstantiationException.java
index d34bdbf23c..42a301b170 100644
--- a/dspace-api/src/main/java/org/dspace/core/PluginInstantiationException.java
+++ b/dspace-api/src/main/java/org/dspace/core/PluginInstantiationException.java
@@ -34,7 +34,7 @@ public class PluginInstantiationException extends RuntimeException
/**
* @param msg Error message text.
- * @cause cause other exception that this one is wrapping.
+ * @param cause other exception that this one is wrapping.
*/
public PluginInstantiationException(String msg, Throwable cause)
{
@@ -42,7 +42,7 @@ public class PluginInstantiationException extends RuntimeException
}
/**
- * @cause cause other exception that this one is wrapping.
+ * @param cause other exception that this one is wrapping.
*/
public PluginInstantiationException(Throwable cause)
{
diff --git a/dspace-api/src/main/java/org/dspace/curate/Curator.java b/dspace-api/src/main/java/org/dspace/curate/Curator.java
index ff1b11bad8..ab263ec984 100644
--- a/dspace-api/src/main/java/org/dspace/curate/Curator.java
+++ b/dspace-api/src/main/java/org/dspace/curate/Curator.java
@@ -133,7 +133,7 @@ public class Curator
* Assigns invocation mode.
*
* @param mode one of INTERACTIVE, BATCH, ANY
- * @return
+ * @return the Curator instance.
*/
public Curator setInvoked(Invoked mode)
{
diff --git a/dspace-api/src/main/java/org/dspace/discovery/SearchService.java b/dspace-api/src/main/java/org/dspace/discovery/SearchService.java
index 67b70accfd..0b830f3d36 100644
--- a/dspace-api/src/main/java/org/dspace/discovery/SearchService.java
+++ b/dspace-api/src/main/java/org/dspace/discovery/SearchService.java
@@ -31,13 +31,9 @@ public interface SearchService {
* repository)
*
* @param context
- * DSpace Context object
- * @param dso
- * a DSpace Object to use as scope of the search (only results
- * within this object)
+ * DSpace Context object.
* @param query
- * the discovery query object
- * @return
+ * the discovery query object.
* @throws SearchServiceException
*/
DiscoverResult search(Context context, DiscoverQuery query)
@@ -54,7 +50,6 @@ public interface SearchService {
* within this object)
* @param query
* the discovery query object
- * @return
* @throws SearchServiceException
*/
DiscoverResult search(Context context, DSpaceObject dso, DiscoverQuery query)
@@ -63,14 +58,12 @@ public interface SearchService {
/**
*
* @param context
- * DSpace Context object
- * @param dso
- * a DSpace Object to use as scope of the search (only results
- * within this object)
+ * DSpace Context object.
+ * @param query
+ * the discovery query object.
* @param includeWithdrawn
* use true
to include in the results also withdrawn
- * items that match the query
- * @return
+ * items that match the query.
* @throws SearchServiceException
*/
DiscoverResult search(Context context, DiscoverQuery query,
@@ -89,7 +82,6 @@ public interface SearchService {
* use true
to include in the results also withdrawn
* items that match the query
*
- * @return
* @throws SearchServiceException
*/
DiscoverResult search(Context context, DSpaceObject dso, DiscoverQuery query, boolean includeWithdrawn) throws SearchServiceException;
diff --git a/dspace-api/src/main/java/org/dspace/eperson/Group.java b/dspace-api/src/main/java/org/dspace/eperson/Group.java
index 9fab791d81..d510878c54 100644
--- a/dspace-api/src/main/java/org/dspace/eperson/Group.java
+++ b/dspace-api/src/main/java/org/dspace/eperson/Group.java
@@ -343,12 +343,11 @@ public class Group extends DSpaceObject
}
/**
- * check to see if g is a direct group member.
+ * Check to see if g is a direct group member.
* If g is a subgroup via another group will be returned false
*
* @param g
* group to check
- * @return
*/
public boolean isMember(Group g)
{
@@ -381,11 +380,10 @@ public class Group extends DSpaceObject
}
/**
- * Get all of the groups that an eperson is a member of
+ * Get all of the groups that an eperson is a member of.
*
* @param c
* @param e
- * @return
* @throws SQLException
*/
public static Group[] allMemberGroups(Context c, EPerson e)
@@ -1052,9 +1050,7 @@ public class Group extends DSpaceObject
}
/**
- * Return Group members of a Group
- *
- * @return
+ * Return Group members of a Group.
*/
public Group[] getMemberGroups()
{
diff --git a/dspace-api/src/main/java/org/dspace/eperson/PasswordHash.java b/dspace-api/src/main/java/org/dspace/eperson/PasswordHash.java
index dc9255b817..329597fa4c 100644
--- a/dspace-api/src/main/java/org/dspace/eperson/PasswordHash.java
+++ b/dspace-api/src/main/java/org/dspace/eperson/PasswordHash.java
@@ -22,10 +22,10 @@ import org.slf4j.LoggerFactory;
/**
* For handling digested secrets (such as passwords).
- * Use {@link PasswordHash(String, byte[], byte[])} to package and manipulate
- * secrets that have already been hashed, and {@link PasswordHash(String)} for
+ * Use {@link #PasswordHash(String, byte[], byte[])} to package and manipulate
+ * secrets that have already been hashed, and {@link #PasswordHash(String)} for
* plaintext secrets. Compare a plaintext candidate to a hashed secret with
- * {@link matches(String)}.
+ * {@link #matches(String)}.
*
* @author mwood
*/
@@ -78,7 +78,7 @@ public class PasswordHash
}
/**
- * Convenience: like {@link PasswordHash(String, byte[], byte[])} but with
+ * Convenience: like {@link #PasswordHash(String, byte[], byte[])} but with
* hexadecimal-encoded {@code String}s.
* @param algorithm the digest algorithm used in producing {@code hash}.
* If empty, set to null. Other methods will treat this as unsalted MD5.
diff --git a/dspace-api/src/main/java/org/dspace/harvest/HarvestedCollection.java b/dspace-api/src/main/java/org/dspace/harvest/HarvestedCollection.java
index 02165f92ae..ae5aa1c7ed 100644
--- a/dspace-api/src/main/java/org/dspace/harvest/HarvestedCollection.java
+++ b/dspace-api/src/main/java/org/dspace/harvest/HarvestedCollection.java
@@ -27,48 +27,48 @@ import java.util.List;
public class HarvestedCollection
{
- private Context context;
- private TableRow harvestRow;
+ private Context context;
+ private TableRow harvestRow;
- public static final int TYPE_NONE = 0;
- public static final int TYPE_DMD = 1;
- public static final int TYPE_DMDREF = 2;
- public static final int TYPE_FULL = 3;
+ public static final int TYPE_NONE = 0;
+ public static final int TYPE_DMD = 1;
+ public static final int TYPE_DMDREF = 2;
+ public static final int TYPE_FULL = 3;
- public static final int STATUS_READY = 0;
- public static final int STATUS_BUSY = 1;
- public static final int STATUS_QUEUED = 2;
- public static final int STATUS_OAI_ERROR = 3;
- public static final int STATUS_UNKNOWN_ERROR = -1;
+ public static final int STATUS_READY = 0;
+ public static final int STATUS_BUSY = 1;
+ public static final int STATUS_QUEUED = 2;
+ public static final int STATUS_OAI_ERROR = 3;
+ public static final int STATUS_UNKNOWN_ERROR = -1;
- /*
- * collection_id | integer | not null
- harvest_type | integer |
- oai_source | text |
- oai_set_id | text |
- harvest_message | text |
- metadata_config_id | text |
- harvest_status | integer |
- harvest_start_time | timestamp with time zone |
- */
+ /*
+ * collection_id | integer | not null
+ * harvest_type | integer |
+ * oai_source | text |
+ * oai_set_id | text |
+ * harvest_message | text |
+ * metadata_config_id | text |
+ * harvest_status | integer |
+ * harvest_start_time | timestamp with time zone |
+ */
- // TODO: make sure this guy knows to lock people out if the status is not zero.
- // i.e. someone editing a collection's setting from the admin menu should have
- // to stop an ongoing harvest before they can edit the settings.
-
-
- HarvestedCollection(Context c, TableRow row)
+ // TODO: make sure this guy knows to lock people out if the status is not zero.
+ // i.e. someone editing a collection's setting from the admin menu should have
+ // to stop an ongoing harvest before they can edit the settings.
+
+
+ HarvestedCollection(Context c, TableRow row)
{
context = c;
harvestRow = row;
}
-
-
+
+
public static void exists(Context c) throws SQLException {
DatabaseManager.queryTable(c, "harvested_collection", "SELECT COUNT(*) FROM harvested_collection");
}
-
-
+
+
/**
* Find the harvest settings corresponding to this collection
* @return a HarvestInstance object corresponding to this collection's settings, null if not found.
@@ -76,14 +76,14 @@ public class HarvestedCollection
public static HarvestedCollection find(Context c, int collectionId) throws SQLException
{
TableRow row = DatabaseManager.findByUnique(c, "harvested_collection", "collection_id", collectionId);
-
+
if (row == null) {
- return null;
+ return null;
}
-
+
return new HarvestedCollection(c, row);
}
-
+
/**
* Create a new harvest instance row for a specified collection.
* @return a new HarvestInstance object
@@ -93,10 +93,10 @@ public class HarvestedCollection
row.setColumn("collection_id", collectionId);
row.setColumn("harvest_type", 0);
DatabaseManager.insert(c, row);
-
+
return new HarvestedCollection(c, row);
}
-
+
/** Returns whether the specified collection is harvestable, i.e. whether its harvesting
* options are set up correctly. This is distinct from "ready", since this collection may
* be in process of being harvested.
@@ -105,12 +105,12 @@ public class HarvestedCollection
{
HarvestedCollection hc = HarvestedCollection.find(c, collectionId);
if (hc != null && hc.getHarvestType() > 0 && hc.getOaiSource() != null && hc.getOaiSetId() != null &&
- hc.getHarvestStatus() != HarvestedCollection.STATUS_UNKNOWN_ERROR) {
- return true;
+ hc.getHarvestStatus() != HarvestedCollection.STATUS_UNKNOWN_ERROR) {
+ return true;
}
return false;
}
-
+
/** Returns whether this harvest instance is actually harvestable, i.e. whether its settings
* options are set up correctly. This is distinct from "ready", since this collection may
* be in process of being harvested.
@@ -118,13 +118,13 @@ public class HarvestedCollection
public boolean isHarvestable() throws SQLException
{
if (this.getHarvestType() > 0 && this.getOaiSource() != null && this.getOaiSetId() != null &&
- this.getHarvestStatus() != HarvestedCollection.STATUS_UNKNOWN_ERROR) {
- return true;
+ this.getHarvestStatus() != HarvestedCollection.STATUS_UNKNOWN_ERROR) {
+ return true;
}
return false;
}
-
+
/** Returns whether the specified collection is ready for immediate harvest.
*/
public static boolean isReady(Context c, int collectionId) throws SQLException
@@ -132,18 +132,18 @@ public class HarvestedCollection
HarvestedCollection hc = HarvestedCollection.find(c, collectionId);
return hc.isReady();
}
-
+
public boolean isReady() throws SQLException
{
if (this.isHarvestable() && (this.getHarvestStatus() == HarvestedCollection.STATUS_READY || this.getHarvestStatus() == HarvestedCollection.STATUS_OAI_ERROR))
- {
- return true;
- }
+ {
+ return true;
+ }
return false;
}
-
-
+
+
/** Find all collections that are set up for harvesting
*
* return: list of collection id's
@@ -152,18 +152,18 @@ public class HarvestedCollection
public static List findAll(Context c) throws SQLException
{
TableRowIterator tri = DatabaseManager.queryTable(c, "harvested_collection",
- "SELECT * FROM harvested_collection");
-
+ "SELECT * FROM harvested_collection");
+
List collectionIds = new ArrayList();
while (tri.hasNext())
- {
+ {
TableRow row = tri.next();
collectionIds.add(row.getIntColumn("collection_id"));
- }
-
+ }
+
return collectionIds;
}
-
+
/** Find all collections that are ready for harvesting
*
* return: list of collection id's
@@ -173,10 +173,10 @@ public class HarvestedCollection
{
int harvestInterval = ConfigurationManager.getIntProperty("oai", "harvester.harvestFrequency");
if (harvestInterval == 0)
- {
- harvestInterval = 720;
- }
-
+ {
+ harvestInterval = 720;
+ }
+
int expirationInterval = ConfigurationManager.getIntProperty("oai", "harvester.threadTimeout");
if (expirationInterval == 0)
{
@@ -185,69 +185,69 @@ public class HarvestedCollection
Date startTime;
Date expirationTime;
-
+
Calendar calendar = Calendar.getInstance();
- calendar.setTime(new Date());
- calendar.add(Calendar.MINUTE, -1 * harvestInterval);
- startTime = calendar.getTime();
-
- calendar.setTime(startTime);
- calendar.add(Calendar.HOUR, -2 * expirationInterval);
- expirationTime = calendar.getTime();
-
+ calendar.setTime(new Date());
+ calendar.add(Calendar.MINUTE, -1 * harvestInterval);
+ startTime = calendar.getTime();
+
+ calendar.setTime(startTime);
+ calendar.add(Calendar.HOUR, -2 * expirationInterval);
+ expirationTime = calendar.getTime();
+
/* Select all collections whose last_harvest is before our start time, whose harvest_type *is not* 0 and whose status *is* 0 (available) or 3 (OAI Error). */
TableRowIterator tri = DatabaseManager.queryTable(c, "harvested_collection",
"SELECT * FROM harvested_collection WHERE (last_harvested < ? or last_harvested is null) and harvest_type > ? and (harvest_status = ? or harvest_status = ? or (harvest_status=? and harvest_start_time < ?)) ORDER BY last_harvested",
new java.sql.Timestamp(startTime.getTime()), 0, HarvestedCollection.STATUS_READY, HarvestedCollection.STATUS_OAI_ERROR, HarvestedCollection.STATUS_BUSY, new java.sql.Timestamp(expirationTime.getTime()));
-
+
List collectionIds = new ArrayList();
while (tri.hasNext())
{
- TableRow row = tri.next();
- collectionIds.add(row.getIntColumn("collection_id"));
+ TableRow row = tri.next();
+ collectionIds.add(row.getIntColumn("collection_id"));
}
-
+
return collectionIds;
}
-
+
/**
* Find all collections with the specified status flag
* @param c
* @param status see HarvestInstance.STATUS_...
- * @return
+ * @return matching Collection IDs.
* @throws SQLException
*/
public static List findByStatus(Context c, int status) throws SQLException {
TableRowIterator tri = DatabaseManager.queryTable(c, "harvested_collection",
"SELECT * FROM harvested_collection WHERE harvest_status = ?", status);
-
- List collectionIds = new ArrayList();
- while (tri.hasNext())
- {
- TableRow row = tri.next();
- collectionIds.add(row.getIntColumn("collection_id"));
- }
-
- return collectionIds;
+
+ List collectionIds = new ArrayList();
+ while (tri.hasNext())
+ {
+ TableRow row = tri.next();
+ collectionIds.add(row.getIntColumn("collection_id"));
+ }
+
+ return collectionIds;
}
-
-
+
+
/** Find the collection that was harvested the longest time ago.
* @throws SQLException
*/
public static Integer findOldestHarvest (Context c) throws SQLException {
String query = "select collection_id from harvested_collection where harvest_type > ? and harvest_status = ? order by last_harvested asc limit 1";
-
+
if ("oracle".equals(ConfigurationManager.getProperty("db.name")))
- {
+ {
query = "select collection_id from harvested_collection where harvest_type > ? and harvest_status = ? and rownum <= 1 order by last_harvested asc";
}
-
+
TableRowIterator tri = DatabaseManager.queryTable(c, "harvested_collection",
- query, 0, 0);
+ query, 0, 0);
TableRow row = tri.next();
-
+
if (row != null)
{
return row.getIntColumn("collection_id");
@@ -257,7 +257,7 @@ public class HarvestedCollection
return -1;
}
}
-
+
/** Find the collection that was harvested most recently.
* @throws SQLException
*/
diff --git a/dspace-api/src/main/java/org/dspace/identifier/IdentifierService.java b/dspace-api/src/main/java/org/dspace/identifier/IdentifierService.java
index e9af1449f3..6b75e7ed8c 100644
--- a/dspace-api/src/main/java/org/dspace/identifier/IdentifierService.java
+++ b/dspace-api/src/main/java/org/dspace/identifier/IdentifierService.java
@@ -23,25 +23,28 @@ import java.sql.SQLException;
public interface IdentifierService {
/**
+ * Get an identifier for a given object which is assignment-compatible
+ * with a given Identifier type.
*
* @param context
- * @param dso
- * @param identifier
- * @return
+ * @param dso the object to be identified.
+ * @param identifier instance of an Identifier of the required type.
+ * @return the matching identifier, or the site identifier if the object
+ * is a Site, or null if no matching identifier is found.
*/
String lookup(Context context, DSpaceObject dso, Class extends Identifier> identifier);
/**
*
- * This will resolve a DSpaceObject based on a provided Identifier. The Service will interrogate the providers in
- * no particular order and return the first successful result discovered. If no resolution is successful,
- * the method will return null if no object is found.
+ * This will resolve a DSpaceObject based on a provided Identifier.
+ * The Service will interrogate the providers in no particular order
+ * and return the first successful result discovered. If no resolution
+ * is successful, the method will return null if no object is found.
*
* TODO: Verify null is returned.
*
* @param context
* @param identifier
- * @return
* @throws IdentifierNotFoundException
* @throws IdentifierNotResolvableException
*/
@@ -78,7 +81,6 @@ public interface IdentifierService {
*
* @param context
* @param dso
- * @return
* @throws org.dspace.authorize.AuthorizeException
* @throws java.sql.SQLException
* @throws IdentifierException
@@ -87,14 +89,14 @@ public interface IdentifierService {
/**
*
- * Used to Register a Specific Identifier (for example a Handle, hdl:1234.5/6) The provider is responsible for
- * Detecting and Processing the appropriate identifier, all Providers are interrogated, multiple providers
+ * Used to Register a specific Identifier (for example a Handle, hdl:1234.5/6)
+ * The provider is responsible for detecting and processing the appropriate
+ * identifier. All Providers are interrogated. Multiple providers
* can process the same identifier.
*
* @param context
* @param dso
* @param identifier
- * @return
* @throws org.dspace.authorize.AuthorizeException
* @throws java.sql.SQLException
* @throws IdentifierException
diff --git a/dspace-api/src/main/java/org/dspace/license/CCLookup.java b/dspace-api/src/main/java/org/dspace/license/CCLookup.java
index 07b670fb2e..d0fe7f1453 100644
--- a/dspace-api/src/main/java/org/dspace/license/CCLookup.java
+++ b/dspace-api/src/main/java/org/dspace/license/CCLookup.java
@@ -153,7 +153,6 @@ public class CCLookup {
* @return A Collection of LicenseField objects.
*
* @see CCLicense
- * @see LicenseField
*
*/
public Collection getLicenseFields(String license) {
diff --git a/dspace-api/src/main/java/org/dspace/license/LicenseCleanup.java b/dspace-api/src/main/java/org/dspace/license/LicenseCleanup.java
index ea7e999f37..dd22011172 100644
--- a/dspace-api/src/main/java/org/dspace/license/LicenseCleanup.java
+++ b/dspace-api/src/main/java/org/dspace/license/LicenseCleanup.java
@@ -188,8 +188,8 @@ public class LicenseCleanup
/**
* Fast stream copy routine
*
- * @param b
- * @return
+ * @param b the Bitstream to be copied.
+ * @return copy of the content of {@code b}.
* @throws IOException
* @throws SQLException
* @throws AuthorizeException
diff --git a/dspace-api/src/main/java/org/dspace/sort/SortOption.java b/dspace-api/src/main/java/org/dspace/sort/SortOption.java
index ed1e82be1b..8a895ee09f 100644
--- a/dspace-api/src/main/java/org/dspace/sort/SortOption.java
+++ b/dspace-api/src/main/java/org/dspace/sort/SortOption.java
@@ -264,9 +264,7 @@ public class SortOption
}
/**
- * Is this a date field
- *
- * @return
+ * Is this a date field?
*/
public boolean isDate()
{
@@ -279,9 +277,7 @@ public class SortOption
}
/**
- * Is the default sort option
- *
- * @return
+ * Is the default sort option?
*/
public boolean isDefault()
{
@@ -293,8 +289,7 @@ public class SortOption
}
/**
- * Return all the configured sort options
- * @return
+ * Return all the configured sort options.
* @throws SortException
*/
public static Set getSortOptions() throws SortException
@@ -308,9 +303,8 @@ public class SortOption
}
/**
- * Get the defined sort option by number (.1, .2, etc)
+ * Get the defined sort option by number (.1, .2, etc).
* @param number
- * @return
* @throws SortException
*/
public static SortOption getSortOption(int number) throws SortException
@@ -327,8 +321,7 @@ public class SortOption
}
/**
- * Get the default sort option - initially, just the first one defined
- * @return
+ * Get the default sort option - initially, just the first one defined.
* @throws SortException
*/
public static SortOption getDefaultSortOption() throws SortException
diff --git a/dspace-api/src/main/java/org/dspace/statistics/DataTermsFacet.java b/dspace-api/src/main/java/org/dspace/statistics/DataTermsFacet.java
index 270062d2fb..fb43b5fd7b 100644
--- a/dspace-api/src/main/java/org/dspace/statistics/DataTermsFacet.java
+++ b/dspace-api/src/main/java/org/dspace/statistics/DataTermsFacet.java
@@ -31,7 +31,7 @@ public class DataTermsFacet {
*
* An example of the output could be of the format:
* [{"term":"247166","count":10},{"term":"247168","count":6}]
- * @return
+ * @return JSON-formatted data.
*/
public String toJson() {
Gson gson = new Gson();
diff --git a/dspace-api/src/main/java/org/dspace/statistics/util/SpiderDetector.java b/dspace-api/src/main/java/org/dspace/statistics/util/SpiderDetector.java
index 7ad23e7471..c6c921f7fa 100644
--- a/dspace-api/src/main/java/org/dspace/statistics/util/SpiderDetector.java
+++ b/dspace-api/src/main/java/org/dspace/statistics/util/SpiderDetector.java
@@ -77,9 +77,7 @@ public class SpiderDetector {
}
/**
- * Get an immutable Set representing all the Spider Addresses here
- *
- * @return
+ * Get an immutable Set representing all the Spider Addresses here.
*/
public static Set getSpiderIpAddresses() {
diff --git a/dspace-api/src/main/java/org/dspace/storage/bitstore/BitstreamStorageManager.java b/dspace-api/src/main/java/org/dspace/storage/bitstore/BitstreamStorageManager.java
index 53fe086b17..4ac344dfd1 100644
--- a/dspace-api/src/main/java/org/dspace/storage/bitstore/BitstreamStorageManager.java
+++ b/dspace-api/src/main/java/org/dspace/storage/bitstore/BitstreamStorageManager.java
@@ -710,8 +710,8 @@ public class BitstreamStorageManager
/**
*
* @param context
- * @param id of the bitstream to clone
- * @return
+ * @param id of the bitstream to clone.
+ * @return id of the clone bitstream.
* @throws SQLException
*/
public static int clone(Context context, int id) throws SQLException
diff --git a/dspace-api/src/main/java/org/dspace/submit/step/DescribeStep.java b/dspace-api/src/main/java/org/dspace/submit/step/DescribeStep.java
index 7525d9fdfc..e0f84bac84 100644
--- a/dspace-api/src/main/java/org/dspace/submit/step/DescribeStep.java
+++ b/dspace-api/src/main/java/org/dspace/submit/step/DescribeStep.java
@@ -995,7 +995,6 @@ public class DescribeStep extends AbstractProcessingStep
* Return the HTML / DRI field name for the given input.
*
* @param input
- * @return
*/
public static String getFieldName(DCInput input)
{
diff --git a/dspace-api/src/main/java/org/dspace/submit/step/SkipInitialQuestionsStep.java b/dspace-api/src/main/java/org/dspace/submit/step/SkipInitialQuestionsStep.java
index e094ad5515..d0c3fc5eaf 100644
--- a/dspace-api/src/main/java/org/dspace/submit/step/SkipInitialQuestionsStep.java
+++ b/dspace-api/src/main/java/org/dspace/submit/step/SkipInitialQuestionsStep.java
@@ -30,7 +30,7 @@ import org.dspace.submit.AbstractProcessingStep;
*
*
* @see org.dspace.submit.AbstractProcessingStep
- * @see org.dspace.submit.step.InitialQuestionStep
+ * @see org.dspace.submit.step.InitialQuestionsStep
* @see org.dspace.submit.step.DescribeStep
*
* @author Andrea Bollini