mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
DS-3154: Fix some of the Javadocs errors in dspace-api
This commit is contained in:
@@ -36,7 +36,7 @@ public interface ExtractingParams {
|
||||
|
||||
/**
|
||||
* The param prefix for mapping Tika metadata to Solr fields.
|
||||
* <p/>
|
||||
* <p>
|
||||
* To map a field, add a name like:
|
||||
* <pre>fmap.title=solr.title</pre>
|
||||
*
|
||||
@@ -48,7 +48,7 @@ public interface ExtractingParams {
|
||||
|
||||
/**
|
||||
* The boost value for the name of the field. The boost can be specified by a name mapping.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example
|
||||
* <pre>
|
||||
* map.title=solr.title
|
||||
@@ -73,9 +73,9 @@ public interface ExtractingParams {
|
||||
* Restrict the extracted parts of a document to be indexed
|
||||
* by passing in an XPath expression. All content that satisfies the XPath expr.
|
||||
* will be passed to the {@link SolrContentHandler}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See Tika's docs for what the extracted document looks like.
|
||||
* <p/>
|
||||
* <p>
|
||||
* @see #CAPTURE_ELEMENTS
|
||||
*/
|
||||
public static final String XPATH_EXPRESSION = "xpath";
|
||||
@@ -104,11 +104,11 @@ public interface ExtractingParams {
|
||||
/**
|
||||
* Capture the specified fields (and everything included below it that isn't capture by some other capture field) separately from the default. This is different
|
||||
* then the case of passing in an XPath expression.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The Capture field is based on the localName returned to the {@link SolrContentHandler}
|
||||
* by Tika, not to be confused by the mapped field. The field name can then
|
||||
* be mapped into the index schema.
|
||||
* <p/>
|
||||
* <p>
|
||||
* For instance, a Tika document may look like:
|
||||
* <pre>
|
||||
* <html>
|
||||
|
@@ -46,6 +46,11 @@ public class CommunityFiliator
|
||||
handleService = HandleServiceFactory.getInstance().getHandleService();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argv arguments
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public static void main(String[] argv) throws Exception
|
||||
{
|
||||
// create an options object and populate it
|
||||
@@ -174,6 +179,15 @@ public class CommunityFiliator
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param c context
|
||||
* @param parent parent Community
|
||||
* @param child child community
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorize error
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public void filiate(Context c, Community parent, Community child)
|
||||
throws SQLException, AuthorizeException, IOException
|
||||
{
|
||||
@@ -212,6 +226,15 @@ public class CommunityFiliator
|
||||
+ "' is parent of community: '" + child.getID() + "'");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param c context
|
||||
* @param parent parent Community
|
||||
* @param child child community
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorize error
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public void defiliate(Context c, Community parent, Community child)
|
||||
throws SQLException, AuthorizeException, IOException
|
||||
{
|
||||
@@ -250,6 +273,13 @@ public class CommunityFiliator
|
||||
+ "'");
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a community by ID
|
||||
* @param c context
|
||||
* @param communityID community ID
|
||||
* @return Community object
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
protected Community resolveCommunity(Context c, String communityID)
|
||||
throws SQLException
|
||||
{
|
||||
|
@@ -59,6 +59,7 @@ public final class CreateAdministrator
|
||||
*
|
||||
* @param argv
|
||||
* command-line arguments
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public static void main(String[] argv)
|
||||
throws Exception
|
||||
@@ -92,7 +93,7 @@ public final class CreateAdministrator
|
||||
/**
|
||||
* constructor, which just creates and object with a ready context
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected CreateAdministrator()
|
||||
throws Exception
|
||||
@@ -106,7 +107,7 @@ public final class CreateAdministrator
|
||||
* Method which will negotiate with the user via the command line to
|
||||
* obtain the administrator's details
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void negotiateAdministratorDetails()
|
||||
throws Exception
|
||||
@@ -228,7 +229,7 @@ public final class CreateAdministrator
|
||||
* @param language preferred language
|
||||
* @param pw desired password
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void createAdministrator(String email, String first, String last,
|
||||
String language, String pw)
|
||||
|
@@ -39,13 +39,14 @@ import org.xml.sax.SAXException;
|
||||
* from the metadata schemas for the repository.
|
||||
*
|
||||
* The form of the XML is as follows
|
||||
*
|
||||
* {@code
|
||||
* <metadata-schemas>
|
||||
* <schema>
|
||||
* <name>dc</name>
|
||||
* <namespace>http://dublincore.org/documents/dcmi-terms/</namespace>
|
||||
* </schema>
|
||||
* </metadata-schemas>
|
||||
* }
|
||||
*/
|
||||
public class MetadataExporter
|
||||
{
|
||||
@@ -54,12 +55,12 @@ public class MetadataExporter
|
||||
protected static MetadataFieldService metadataFieldService = ContentServiceFactory.getInstance().getMetadataFieldService();
|
||||
|
||||
/**
|
||||
* @param args
|
||||
* @throws ParseException
|
||||
* @throws SAXException
|
||||
* @throws IOException
|
||||
* @throws SQLException
|
||||
* @throws RegistryExportException
|
||||
* @param args commandline arguments
|
||||
* @throws ParseException if parser error
|
||||
* @throws SAXException if XML parse error
|
||||
* @throws IOException if IO error
|
||||
* @throws SQLException if database error
|
||||
* @throws RegistryExportException if export error
|
||||
*/
|
||||
public static void main(String[] args) throws ParseException, SQLException, IOException, SAXException, RegistryExportException
|
||||
{
|
||||
@@ -91,6 +92,15 @@ public class MetadataExporter
|
||||
saveRegistry(file, schema);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save a registry to a filepath
|
||||
* @param file filepath
|
||||
* @param schema schema definition to save
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws SAXException if XML error
|
||||
* @throws RegistryExportException if export error
|
||||
*/
|
||||
public static void saveRegistry(String file, String schema) throws SQLException, IOException, SAXException, RegistryExportException
|
||||
{
|
||||
// create a context
|
||||
@@ -145,12 +155,12 @@ public class MetadataExporter
|
||||
|
||||
/**
|
||||
* Serialize the schema registry. If the parameter 'schema' is null or empty, save all schemas
|
||||
* @param context
|
||||
* @param xmlSerializer
|
||||
* @param schema
|
||||
* @throws SQLException
|
||||
* @throws SAXException
|
||||
* @throws RegistryExportException
|
||||
* @param context DSpace Context
|
||||
* @param xmlSerializer XML serializer
|
||||
* @param schema schema (may be null to save all)
|
||||
* @throws SQLException if database error
|
||||
* @throws SAXException if XML error
|
||||
* @throws RegistryExportException if export error
|
||||
*/
|
||||
public static void saveSchema(Context context, XMLSerializer xmlSerializer, String schema) throws SQLException, SAXException, RegistryExportException
|
||||
{
|
||||
@@ -176,10 +186,10 @@ public class MetadataExporter
|
||||
/**
|
||||
* Serialize a single schema (namespace) registry entry
|
||||
*
|
||||
* @param xmlSerializer
|
||||
* @param mdSchema
|
||||
* @throws SAXException
|
||||
* @throws RegistryExportException
|
||||
* @param xmlSerializer XML serializer
|
||||
* @param mdSchema DSpace metadata schema
|
||||
* @throws SAXException if XML error
|
||||
* @throws RegistryExportException if export error
|
||||
*/
|
||||
private static void saveSchema(XMLSerializer xmlSerializer, MetadataSchema mdSchema) throws SAXException, RegistryExportException
|
||||
{
|
||||
@@ -223,13 +233,13 @@ public class MetadataExporter
|
||||
/**
|
||||
* Serialize a single metadata field registry entry to xml
|
||||
*
|
||||
* @param context
|
||||
* @param xmlSerializer
|
||||
* @param mdField
|
||||
* @throws SAXException
|
||||
* @throws RegistryExportException
|
||||
* @throws SQLException
|
||||
* @throws IOException
|
||||
* @param context DSpace context
|
||||
* @param xmlSerializer xml serializer
|
||||
* @param mdField DSpace metadata field
|
||||
* @throws SAXException if XML error
|
||||
* @throws RegistryExportException if export error
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
private static void saveType(Context context, XMLSerializer xmlSerializer, MetadataField mdField) throws SAXException, RegistryExportException, SQLException, IOException
|
||||
{
|
||||
@@ -291,11 +301,16 @@ public class MetadataExporter
|
||||
xmlSerializer.endElement("dc-type");
|
||||
}
|
||||
|
||||
static Map<Integer, String> schemaMap = new HashMap<Integer, String>();
|
||||
/**
|
||||
* Helper method to retrieve a schema name for the field.
|
||||
* Caches the name after looking up the id.
|
||||
* @param context DSpace Context
|
||||
* @param mdField DSpace metadata field
|
||||
* @return name of schema
|
||||
* @throws SQLException if database error
|
||||
* @throws RegistryExportException if export error
|
||||
*/
|
||||
static Map<Integer, String> schemaMap = new HashMap<Integer, String>();
|
||||
private static String getSchemaName(Context context, MetadataField mdField) throws SQLException, RegistryExportException
|
||||
{
|
||||
// Get name from cache
|
||||
|
@@ -47,6 +47,7 @@ import org.xml.sax.SAXException;
|
||||
*
|
||||
* The format of the XML file is as follows:
|
||||
*
|
||||
* {@code
|
||||
* <dspace-dc-types>
|
||||
* <dc-type>
|
||||
* <schema>icadmin</schema>
|
||||
@@ -58,6 +59,7 @@ import org.xml.sax.SAXException;
|
||||
* [....]
|
||||
*
|
||||
* </dspace-dc-types>
|
||||
* }
|
||||
*/
|
||||
public class MetadataImporter
|
||||
{
|
||||
@@ -69,7 +71,17 @@ public class MetadataImporter
|
||||
|
||||
/**
|
||||
* main method for reading user input from the command line
|
||||
*/
|
||||
* @param args arguments
|
||||
* @throws ParseException if parse error
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws TransformerException if transformer error
|
||||
* @throws ParserConfigurationException if config error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws SAXException if parser error
|
||||
* @throws NonUniqueMetadataException if duplicate metadata
|
||||
* @throws RegistryImportException if import fails
|
||||
**/
|
||||
public static void main(String[] args)
|
||||
throws ParseException, SQLException, IOException, TransformerException,
|
||||
ParserConfigurationException, AuthorizeException, SAXException,
|
||||
@@ -103,6 +115,15 @@ public class MetadataImporter
|
||||
* Load the data from the specified file path into the database
|
||||
*
|
||||
* @param file the file path containing the source data
|
||||
* @param forceUpdate whether to force update
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws TransformerException if transformer error
|
||||
* @throws ParserConfigurationException if config error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws SAXException if parser error
|
||||
* @throws NonUniqueMetadataException if duplicate metadata
|
||||
* @throws RegistryImportException if import fails
|
||||
*/
|
||||
public static void loadRegistry(String file, boolean forceUpdate)
|
||||
throws SQLException, IOException, TransformerException, ParserConfigurationException,
|
||||
@@ -158,7 +179,12 @@ public class MetadataImporter
|
||||
* DSpace context object
|
||||
* @param node
|
||||
* the node in the DOM tree
|
||||
* @throws NonUniqueMetadataException
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws TransformerException if transformer error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws NonUniqueMetadataException if duplicate metadata
|
||||
* @throws RegistryImportException if import fails
|
||||
*/
|
||||
private static void loadSchema(Context context, Node node, boolean updateExisting)
|
||||
throws SQLException, IOException, TransformerException,
|
||||
@@ -221,7 +247,12 @@ public class MetadataImporter
|
||||
* DSpace context object
|
||||
* @param node
|
||||
* the node in the DOM tree
|
||||
* @throws NonUniqueMetadataException
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws TransformerException if transformer error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws NonUniqueMetadataException if duplicate metadata
|
||||
* @throws RegistryImportException if import fails
|
||||
*/
|
||||
private static void loadType(Context context, Node node)
|
||||
throws SQLException, IOException, TransformerException,
|
||||
|
@@ -25,7 +25,7 @@ public class RegistryExportException extends Exception
|
||||
/**
|
||||
* create an exception with only a message
|
||||
*
|
||||
* @param message
|
||||
* @param message exception message
|
||||
*/
|
||||
public RegistryExportException(String message)
|
||||
{
|
||||
@@ -35,8 +35,8 @@ public class RegistryExportException extends Exception
|
||||
/**
|
||||
* create an exception with an inner exception and a message
|
||||
*
|
||||
* @param message
|
||||
* @param e
|
||||
* @param message exception message
|
||||
* @param e reference to Throwable
|
||||
*/
|
||||
public RegistryExportException(String message, Throwable e)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ public class RegistryExportException extends Exception
|
||||
/**
|
||||
* create an exception with an inner exception
|
||||
*
|
||||
* @param e
|
||||
* @param e reference to Throwable
|
||||
*/
|
||||
public RegistryExportException(Throwable e)
|
||||
{
|
||||
|
@@ -25,7 +25,7 @@ public class RegistryImportException extends Exception
|
||||
/**
|
||||
* create an exception with only a message
|
||||
*
|
||||
* @param message
|
||||
* @param message error message
|
||||
*/
|
||||
public RegistryImportException(String message)
|
||||
{
|
||||
@@ -35,8 +35,8 @@ public class RegistryImportException extends Exception
|
||||
/**
|
||||
* create an exception with an inner exception and a message
|
||||
*
|
||||
* @param message
|
||||
* @param e
|
||||
* @param message error message
|
||||
* @param e throwable
|
||||
*/
|
||||
public RegistryImportException(String message, Throwable e)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ public class RegistryImportException extends Exception
|
||||
/**
|
||||
* create an exception with an inner exception
|
||||
*
|
||||
* @param e
|
||||
* @param e throwable
|
||||
*/
|
||||
public RegistryImportException(Throwable e)
|
||||
{
|
||||
|
@@ -40,6 +40,9 @@ public class RegistryImporter
|
||||
* the filename to load from
|
||||
*
|
||||
* @return the DOM representation of the XML file
|
||||
* @throws IOException if IO error
|
||||
* @throws ParserConfigurationException if configuration parse error
|
||||
* @throws SAXException if XML parse error
|
||||
*/
|
||||
public static Document loadXML(String filename)
|
||||
throws IOException, ParserConfigurationException, SAXException
|
||||
@@ -68,7 +71,7 @@ public class RegistryImporter
|
||||
* the element, whose child element you want the CDATA from
|
||||
* @param childName
|
||||
* the name of the element you want the CDATA from
|
||||
*
|
||||
* @throws TransformerException if error
|
||||
* @return the CDATA as a <code>String</code>
|
||||
*/
|
||||
public static String getElementData(Node parentElement, String childName)
|
||||
@@ -116,7 +119,7 @@ public class RegistryImporter
|
||||
* the element, whose child element you want the CDATA from
|
||||
* @param childName
|
||||
* the name of the element you want the CDATA from
|
||||
*
|
||||
* @throws TransformerException if error
|
||||
* @return the CDATA as a <code>String</code>
|
||||
*/
|
||||
public static String[] getRepeatedElementData(Node parentElement,
|
||||
|
@@ -56,6 +56,7 @@ public class RegistryLoader
|
||||
*
|
||||
* @param argv
|
||||
* command-line arguments
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public static void main(String[] argv) throws Exception
|
||||
{
|
||||
@@ -121,6 +122,12 @@ public class RegistryLoader
|
||||
* DSpace context object
|
||||
* @param filename
|
||||
* the filename of the XML file to load
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws TransformerException if transformer error
|
||||
* @throws ParserConfigurationException if config error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws SAXException if parser error
|
||||
*/
|
||||
public static void loadBitstreamFormats(Context context, String filename)
|
||||
throws SQLException, IOException, ParserConfigurationException,
|
||||
@@ -151,6 +158,10 @@ public class RegistryLoader
|
||||
* DSpace context object
|
||||
* @param node
|
||||
* the node in the DOM tree
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws TransformerException if transformer error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
private static void loadFormat(Context context, Node node)
|
||||
throws SQLException, IOException, TransformerException,
|
||||
@@ -206,7 +217,9 @@ public class RegistryLoader
|
||||
*
|
||||
* @param filename
|
||||
* the filename to load from
|
||||
*
|
||||
* @throws IOException if IO error
|
||||
* @throws ParserConfigurationException if config error
|
||||
* @throws SAXException if parser error
|
||||
* @return the DOM representation of the XML file
|
||||
*/
|
||||
private static Document loadXML(String filename) throws IOException,
|
||||
@@ -234,7 +247,7 @@ public class RegistryLoader
|
||||
* the element, whose child element you want the CDATA from
|
||||
* @param childName
|
||||
* the name of the element you want the CDATA from
|
||||
*
|
||||
* @throws TransformerException if transformer error
|
||||
* @return the CDATA as a <code>String</code>
|
||||
*/
|
||||
private static String getElementData(Node parentElement, String childName)
|
||||
@@ -282,7 +295,7 @@ public class RegistryLoader
|
||||
* the element, whose child element you want the CDATA from
|
||||
* @param childName
|
||||
* the name of the element you want the CDATA from
|
||||
*
|
||||
* @throws TransformerException if transformer error
|
||||
* @return the CDATA as a <code>String</code>
|
||||
*/
|
||||
private static String[] getRepeatedElementData(Node parentElement,
|
||||
|
@@ -46,7 +46,7 @@ import org.xml.sax.SAXException;
|
||||
* an XML file.
|
||||
*
|
||||
* The XML file structure needs to be:
|
||||
*
|
||||
* {@code
|
||||
* <import_structure>
|
||||
* <community>
|
||||
* <name>....</name>
|
||||
@@ -56,7 +56,7 @@ import org.xml.sax.SAXException;
|
||||
* </collection>
|
||||
* </community>
|
||||
* </import_structure>
|
||||
*
|
||||
* }
|
||||
* it can be arbitrarily deep, and supports all the metadata elements
|
||||
* that make up the community and collection metadata. See the system
|
||||
* documentation for more details
|
||||
@@ -88,10 +88,12 @@ public class StructBuilder
|
||||
*
|
||||
* This is of the form:
|
||||
*
|
||||
* StructBuilder -f [xml source] -e [administrator email] -o [output file]
|
||||
* {@code StructBuilder -f [xml source] -e [administrator email] -o [output file]}
|
||||
*
|
||||
* The output file will contain exactly the same as the source xml document, but
|
||||
* with the handle for each imported item added as an attribute.
|
||||
* @param argv commandline arguments
|
||||
* @throws Exception if an error occurs
|
||||
*/
|
||||
public static void main(String[] argv)
|
||||
throws Exception
|
||||
@@ -203,7 +205,7 @@ public class StructBuilder
|
||||
* fails it generates an error and ceases execution
|
||||
*
|
||||
* @param document the XML document object
|
||||
* @throws TransformerException
|
||||
* @throws TransformerException if transformer error
|
||||
*
|
||||
*/
|
||||
private static void validate(org.w3c.dom.Document document)
|
||||
|
@@ -150,7 +150,7 @@ public class DSpaceCSVLine implements Serializable
|
||||
* Write this line out as a CSV formatted string, in the order given by the headings provided
|
||||
*
|
||||
* @param headings The headings which define the order the elements must be presented in
|
||||
* @param fieldSeparator
|
||||
* @param fieldSeparator field separator
|
||||
* @return The CSV formatted String
|
||||
*/
|
||||
protected String toCSV(List<String> headings, String fieldSeparator)
|
||||
@@ -179,7 +179,7 @@ public class DSpaceCSVLine implements Serializable
|
||||
* Internal method to create a CSV formatted String joining a given set of elements
|
||||
*
|
||||
* @param values The values to create the string from
|
||||
* @param valueSeparator
|
||||
* @param valueSeparator value separator
|
||||
* @return The line as a CSV formatted String
|
||||
*/
|
||||
protected String valueToCSV(List<String> values, String valueSeparator)
|
||||
|
@@ -86,11 +86,12 @@ public class MetadataExport
|
||||
/**
|
||||
* Build an array list of item ids that are in a community (include sub-communities and collections)
|
||||
*
|
||||
* @param context DSpace context
|
||||
* @param community The community to build from
|
||||
* @param itemIDs The itemID (used for recursion - use an empty ArrayList)
|
||||
* @param indent How many spaces to use when writing out the names of items added
|
||||
* @return The list of item ids
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
protected Iterator<Item> buildFromCommunity(Context context, Community community, List<Integer> itemIDs, int indent)
|
||||
throws SQLException
|
||||
@@ -176,6 +177,7 @@ public class MetadataExport
|
||||
* main method to run the metadata exporter
|
||||
*
|
||||
* @param argv the command line arguments given
|
||||
* @throws Exception if error occurs
|
||||
*/
|
||||
public static void main(String[] argv) throws Exception
|
||||
{
|
||||
|
@@ -420,8 +420,7 @@ public class MetadataImport
|
||||
* @param change Whether or not to make the update
|
||||
* @param md The element to compare
|
||||
* @param changes The changes object to populate
|
||||
*
|
||||
* @param line
|
||||
* @param line line in CSV file
|
||||
* @throws SQLException if there is a problem accessing a Collection from the database, from its handle
|
||||
* @throws AuthorizeException if there is an authorization problem with permissions
|
||||
*/
|
||||
|
@@ -41,6 +41,7 @@ public class MetadataImportInvalidHeadingException extends Exception
|
||||
*
|
||||
* @param message the error message
|
||||
* @param theType the type of the error
|
||||
* @param theColumn column number
|
||||
*/
|
||||
public MetadataImportInvalidHeadingException(String message, int theType, int theColumn)
|
||||
{
|
||||
|
@@ -9,7 +9,6 @@
|
||||
/**
|
||||
* <p>The DSpace Batch Metadata Editor, which uses a CSV file to export/import
|
||||
* item metadata.</p>
|
||||
* <p>
|
||||
* <ul>
|
||||
* <li>works on items, communities, collections or the whole site</li>
|
||||
* <li>can also create new items, delete items and withdraw/restore them</li>
|
||||
|
@@ -29,7 +29,7 @@ import org.dspace.core.Utils;
|
||||
|
||||
/**
|
||||
* Command line access to the checksum checker. Options are listed in the
|
||||
* documentation for the main method.</p>
|
||||
* documentation for the main method.
|
||||
*
|
||||
* @author Jim Downing
|
||||
* @author Grace Carpenter
|
||||
@@ -72,6 +72,7 @@ public final class ChecksumChecker
|
||||
* <dt>-p</dt>
|
||||
* <dd>Don't prune results before running checker</dd>
|
||||
* </dl>
|
||||
* @throws SQLException if error
|
||||
*/
|
||||
public static void main(String[] args) throws SQLException {
|
||||
// set up command line parser
|
||||
|
@@ -34,8 +34,8 @@ import java.util.*;
|
||||
* core in RDF schema / contents - text file, listing one file per line / file1
|
||||
* - files contained in the item / file2 / ...
|
||||
* <P>
|
||||
* issues -doesn't handle special characters in metadata (needs to turn &'s into
|
||||
* &, etc.)
|
||||
* issues -doesn't handle special characters in metadata (needs to turn {@code &'s} into
|
||||
* {@code &}, etc.)
|
||||
* <P>
|
||||
* Modified by David Little, UCSD Libraries 12/21/04 to allow the registration
|
||||
* of files (bitstreams) into DSpace.
|
||||
|
@@ -57,8 +57,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
* core in RDF schema / contents - text file, listing one file per line / file1
|
||||
* - files contained in the item / file2 / ...
|
||||
* <P>
|
||||
* issues -doesn't handle special characters in metadata (needs to turn &'s into
|
||||
* &, etc.)
|
||||
* issues -doesn't handle special characters in metadata (needs to turn {@code &'s} into
|
||||
* {@code &}, etc.)
|
||||
* <P>
|
||||
* Modified by David Little, UCSD Libraries 12/21/04 to allow the registration
|
||||
* of files (bitstreams) into DSpace.
|
||||
@@ -180,10 +180,11 @@ public class ItemExportServiceImpl implements ItemExportService
|
||||
* Discover the different schemas in use and output a separate metadata XML
|
||||
* file for each schema.
|
||||
*
|
||||
* @param c
|
||||
* @param i
|
||||
* @param destDir
|
||||
* @throws Exception
|
||||
* @param c DSpace context
|
||||
* @param i DSpace Item
|
||||
* @param destDir destination directory
|
||||
* @param migrate Whether to use the migrate option or not
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void writeMetadata(Context c, Item i, File destDir, boolean migrate)
|
||||
throws Exception
|
||||
@@ -202,7 +203,15 @@ public class ItemExportServiceImpl implements ItemExportService
|
||||
}
|
||||
}
|
||||
|
||||
// output the item's dublin core into the item directory
|
||||
/**
|
||||
* output the item's dublin core into the item directory
|
||||
* @param c DSpace context
|
||||
* @param schema schema
|
||||
* @param i DSpace Item
|
||||
* @param destDir destination directory
|
||||
* @param migrate Whether to use the migrate option or not
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void writeMetadata(Context c, String schema, Item i,
|
||||
File destDir, boolean migrate) throws Exception
|
||||
{
|
||||
@@ -318,7 +327,13 @@ public class ItemExportServiceImpl implements ItemExportService
|
||||
}
|
||||
}
|
||||
|
||||
// create the file 'handle' which contains the handle assigned to the item
|
||||
/**
|
||||
* create the file 'handle' which contains the handle assigned to the item
|
||||
* @param c DSpace Context
|
||||
* @param i DSpace Item
|
||||
* @param destDir destination directory
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void writeHandle(Context c, Item i, File destDir)
|
||||
throws Exception
|
||||
{
|
||||
@@ -358,7 +373,9 @@ public class ItemExportServiceImpl implements ItemExportService
|
||||
* the item being exported
|
||||
* @param destDir
|
||||
* the item's export directory
|
||||
* @throws Exception
|
||||
* @param excludeBitstreams
|
||||
* whether to exclude bitstreams
|
||||
* @throws Exception if error
|
||||
* if there is any problem writing to the export directory
|
||||
*/
|
||||
protected void writeBitstreams(Context c, Item i, File destDir,
|
||||
@@ -531,7 +548,8 @@ public class ItemExportServiceImpl implements ItemExportService
|
||||
* - the dspace context
|
||||
* @param additionalEmail
|
||||
* - email address to cc in addition the the current user email
|
||||
* @throws Exception
|
||||
* @param toMigrate Whether to use the migrate option or not
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void processDownloadableExport(List<DSpaceObject> dsObjects,
|
||||
Context context, final String additionalEmail, boolean toMigrate) throws Exception
|
||||
@@ -868,6 +886,13 @@ public class ItemExportServiceImpl implements ItemExportService
|
||||
return file.length();
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to find an EPerson based on string ID
|
||||
* @param context DSpace context
|
||||
* @param strID string identifier
|
||||
* @return EPerson object (if found)
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
protected EPerson getEPersonFromString(Context context, String strID) throws SQLException {
|
||||
EPerson eperson;
|
||||
try{
|
||||
@@ -1105,6 +1130,14 @@ public class ItemExportServiceImpl implements ItemExportService
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param cpFile file
|
||||
* @param strSource source location
|
||||
* @param strTarget target location
|
||||
* @param cpZipOutputStream current zip outputstream
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void zipFiles(File cpFile, String strSource,
|
||||
String strTarget, ZipOutputStream cpZipOutputStream)
|
||||
throws Exception
|
||||
@@ -1158,6 +1191,11 @@ public class ItemExportServiceImpl implements ItemExportService
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a directory
|
||||
* @param path directory path
|
||||
* @return true if successful, false otherwise
|
||||
*/
|
||||
protected boolean deleteDirectory(File path)
|
||||
{
|
||||
if (path.exists())
|
||||
|
@@ -30,8 +30,8 @@ import java.util.List;
|
||||
* core in RDF schema / contents - text file, listing one file per line / file1
|
||||
* - files contained in the item / file2 / ...
|
||||
* <P>
|
||||
* issues -doesn't handle special characters in metadata (needs to turn &'s into
|
||||
* &, etc.)
|
||||
* issues -doesn't handle special characters in metadata (needs to turn {@code &'s} into
|
||||
* {@code &}, etc.)
|
||||
* <P>
|
||||
* Modified by David Little, UCSD Libraries 12/21/04 to allow the registration
|
||||
* of files (bitstreams) into DSpace.
|
||||
@@ -59,7 +59,8 @@ public interface ItemExportService {
|
||||
* @param zipFileName The name to save the zip file as
|
||||
* @param seqStart The first number in the sequence
|
||||
* @param migrate Whether to use the migrate option or not
|
||||
* @throws Exception
|
||||
* @param excludeBitstreams Whether to exclude bitstreams or not
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void exportAsZip(Context context, Iterator<Item> items,
|
||||
String destDirName, String zipFileName,
|
||||
@@ -74,7 +75,8 @@ public interface ItemExportService {
|
||||
* - the dspace object to export
|
||||
* @param context
|
||||
* - the dspace context
|
||||
* @throws Exception
|
||||
* @param migrate Whether to use the migrate option or not
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void createDownloadableExport(DSpaceObject dso,
|
||||
Context context, boolean migrate) throws Exception;
|
||||
@@ -87,7 +89,8 @@ public interface ItemExportService {
|
||||
* - List containing dspace objects
|
||||
* @param context
|
||||
* - the dspace context
|
||||
* @throws Exception
|
||||
* @param migrate Whether to use the migrate option or not
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void createDownloadableExport(List<DSpaceObject> dsObjects,
|
||||
Context context, boolean migrate) throws Exception;
|
||||
@@ -102,7 +105,8 @@ public interface ItemExportService {
|
||||
* - the dspace context
|
||||
* @param additionalEmail
|
||||
* - cc email to use
|
||||
* @throws Exception
|
||||
* @param migrate Whether to use the migrate option or not
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void createDownloadableExport(DSpaceObject dso,
|
||||
Context context, String additionalEmail, boolean migrate) throws Exception;
|
||||
@@ -117,7 +121,8 @@ public interface ItemExportService {
|
||||
* - the dspace context
|
||||
* @param additionalEmail
|
||||
* - cc email to use
|
||||
* @throws Exception
|
||||
* @param migrate Whether to use the migrate option or not
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void createDownloadableExport(List<DSpaceObject> dsObjects,
|
||||
Context context, String additionalEmail, boolean migrate) throws Exception;
|
||||
@@ -126,13 +131,14 @@ public interface ItemExportService {
|
||||
/**
|
||||
* Create a file name based on the date and eperson
|
||||
*
|
||||
* @param type Type of object (as string)
|
||||
* @param eperson
|
||||
* - eperson who requested export and will be able to download it
|
||||
* @param date
|
||||
* - the date the export process was created
|
||||
* @return String representing the file name in the form of
|
||||
* 'export_yyy_MMM_dd_count_epersonID'
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public String assembleFileName(String type, EPerson eperson,
|
||||
Date date) throws Exception;
|
||||
@@ -146,7 +152,7 @@ public interface ItemExportService {
|
||||
* - the eperson who requested export archive
|
||||
* @return String representing a directory in the form of
|
||||
* org.dspace.app.itemexport.download.dir/epersonID
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public String getExportDownloadDirectory(EPerson ePerson)
|
||||
throws Exception;
|
||||
@@ -157,7 +163,7 @@ public interface ItemExportService {
|
||||
*
|
||||
* @return String representing config file entry for
|
||||
* org.dspace.app.itemexport.work.dir
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public String getExportWorkDirectory() throws Exception;
|
||||
|
||||
@@ -169,7 +175,7 @@ public interface ItemExportService {
|
||||
* @param eperson
|
||||
* the eperson requesting the download
|
||||
* @return an input stream of the file to be downloaded
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public InputStream getExportDownloadInputStream(String fileName,
|
||||
EPerson eperson) throws Exception;
|
||||
@@ -177,12 +183,24 @@ public interface ItemExportService {
|
||||
/**
|
||||
* Get the file size of the export archive represented by the file name.
|
||||
*
|
||||
* @param context DSpace context
|
||||
* @param fileName
|
||||
* name of the file to get the size.
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
* @return size as long
|
||||
*/
|
||||
public long getExportFileSize(Context context, String fileName) throws Exception;
|
||||
|
||||
/**
|
||||
* Get the last modified date of the export archive represented by the file name.
|
||||
*
|
||||
* @param context DSpace context
|
||||
* @param fileName
|
||||
* name of the file to get the size.
|
||||
* @return date as long
|
||||
* @see java.io.File#lastModified()
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public long getExportFileLastModified(Context context, String fileName)
|
||||
throws Exception;
|
||||
|
||||
@@ -203,10 +221,10 @@ public interface ItemExportService {
|
||||
* Reads the download directory for the eperson to see if any export
|
||||
* archives are available
|
||||
*
|
||||
* @param eperson
|
||||
* @param eperson EPerson object
|
||||
* @return a list of file names representing export archives that have been
|
||||
* processed
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public List<String> getExportsAvailable(EPerson eperson)
|
||||
throws Exception;
|
||||
@@ -218,7 +236,7 @@ public interface ItemExportService {
|
||||
*
|
||||
* @param eperson
|
||||
* - the eperson to clean up
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void deleteOldExportArchives(EPerson eperson) throws Exception;
|
||||
|
||||
@@ -228,7 +246,7 @@ public interface ItemExportService {
|
||||
* determine if the current exports are too old and need purgeing
|
||||
* Removes all old exports, not just those for the person doing the export.
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void deleteOldExportArchives() throws Exception;
|
||||
|
||||
@@ -245,7 +263,7 @@ public interface ItemExportService {
|
||||
* @param fileName
|
||||
* - the file name to be downloaded. It is added to the url in
|
||||
* the email
|
||||
* @throws MessagingException
|
||||
* @throws MessagingException if error
|
||||
*/
|
||||
public void emailSuccessMessage(Context context, EPerson eperson,
|
||||
String fileName) throws MessagingException;
|
||||
@@ -260,11 +278,17 @@ public interface ItemExportService {
|
||||
* - EPerson to send the error message to
|
||||
* @param error
|
||||
* - the error message
|
||||
* @throws MessagingException
|
||||
* @throws MessagingException if error
|
||||
*/
|
||||
public void emailErrorMessage(EPerson eperson, String error)
|
||||
throws MessagingException;
|
||||
|
||||
/**
|
||||
* Zip source to target
|
||||
* @param strSource source file
|
||||
* @param target target file
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void zip(String strSource, String target) throws Exception;
|
||||
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* This class acts as a Service in the procedure ot batch import using the Biblio-Transformation-Engine
|
||||
* This class acts as a Service in the procedure to batch import using the Biblio-Transformation-Engine
|
||||
*/
|
||||
public class BTEBatchImportService
|
||||
{
|
||||
@@ -39,7 +39,7 @@ public class BTEBatchImportService
|
||||
|
||||
/**
|
||||
* Setter method for dataLoaders parameter
|
||||
* @param dataLoaders
|
||||
* @param dataLoaders map of data loaders
|
||||
*/
|
||||
public void setDataLoaders(Map<String, DataLoader> dataLoaders)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ public class BTEBatchImportService
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get data loaders
|
||||
* @return the map of DataLoaders
|
||||
*/
|
||||
public Map<String, DataLoader> getDataLoaders()
|
||||
@@ -56,7 +56,7 @@ public class BTEBatchImportService
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get output map
|
||||
* @return the outputMapping
|
||||
*/
|
||||
public Map<String, String> getOutputMap() {
|
||||
@@ -65,20 +65,32 @@ public class BTEBatchImportService
|
||||
|
||||
/**
|
||||
* Setter method for the outputMapping
|
||||
* @param outputMapping
|
||||
* @param outputMap the output mapping
|
||||
*/
|
||||
public void setOutputMap(Map<String, String> outputMap) {
|
||||
this.outputMap = outputMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get transformation engine
|
||||
* @return transformation engine
|
||||
*/
|
||||
public TransformationEngine getTransformationEngine() {
|
||||
return transformationEngine;
|
||||
}
|
||||
|
||||
/**
|
||||
* set transformation engine
|
||||
* @param transformationEngine transformation engine
|
||||
*/
|
||||
public void setTransformationEngine(TransformationEngine transformationEngine) {
|
||||
this.transformationEngine = transformationEngine;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter of file data loaders
|
||||
* @return List of file data loaders
|
||||
*/
|
||||
public List<String> getFileDataLoaders(){
|
||||
List<String> result = new ArrayList<String>();
|
||||
|
||||
|
@@ -7,9 +7,7 @@
|
||||
*/
|
||||
package org.dspace.app.itemimport;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.LineNumberReader;
|
||||
@@ -19,7 +17,6 @@ import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* @author kstamatis
|
||||
@@ -37,7 +34,8 @@ public class BatchUpload {
|
||||
private String errorMsgHTML = "";
|
||||
|
||||
/**
|
||||
*
|
||||
* Initialize with directory
|
||||
* @param dirPath directory path
|
||||
*/
|
||||
public BatchUpload(String dirPath) {
|
||||
|
||||
@@ -45,13 +43,20 @@ public class BatchUpload {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize with directory
|
||||
* @param dir directory path
|
||||
*/
|
||||
public BatchUpload(File dir) {
|
||||
|
||||
this.initializeWithFile(dir);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize with directory
|
||||
* @param dir directory path
|
||||
*/
|
||||
private void initializeWithFile(File dir){
|
||||
|
||||
this.dir = dir;
|
||||
@@ -89,6 +94,12 @@ public class BatchUpload {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Count lines in file
|
||||
* @param filename file name
|
||||
* @return lines in file
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
private int countLines(String filename) throws IOException {
|
||||
LineNumberReader reader = new LineNumberReader(new FileReader(filename));
|
||||
int cnt = 0;
|
||||
@@ -106,6 +117,11 @@ public class BatchUpload {
|
||||
return cnt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a file
|
||||
* @param filename file name
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
private void readFile(String filename) throws IOException {
|
||||
LineNumberReader reader = new LineNumberReader(new FileReader(filename));
|
||||
String lineRead = "";
|
||||
@@ -125,40 +141,76 @@ public class BatchUpload {
|
||||
reader.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date
|
||||
* @return Date
|
||||
*/
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path to directory
|
||||
* @return directory
|
||||
*/
|
||||
public File getDir() {
|
||||
return dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether successulf
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isSuccessful() {
|
||||
return successful;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get items imported
|
||||
* @return number of items
|
||||
*/
|
||||
public int getItemsImported() {
|
||||
return itemsImported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get total items
|
||||
* @return total
|
||||
*/
|
||||
public int getTotalItems() {
|
||||
return totalItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get formatted date (DD/MM/YY)
|
||||
* @return date as string
|
||||
*/
|
||||
public String getDateFormatted(){
|
||||
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy - HH:mm");
|
||||
|
||||
return df.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get handles of imported files
|
||||
* @return list of handles
|
||||
*/
|
||||
public List<String> getHandlesImported() {
|
||||
return handlesImported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get error message
|
||||
* @return error message
|
||||
*/
|
||||
public String getErrorMsg() {
|
||||
return errorMsg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get error message as HTML
|
||||
* @return error message string as HTML
|
||||
*/
|
||||
public String getErrorMsgHTML() {
|
||||
return errorMsgHTML;
|
||||
}
|
||||
|
@@ -175,10 +175,10 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
* @param mycollections The collections the items are inserted to
|
||||
* @param sourceDir The filepath to the file to read data from
|
||||
* @param mapFile The filepath to mapfile to be generated
|
||||
* @param template
|
||||
* @param template whether to use collection template item as starting point
|
||||
* @param inputType The type of the input data (bibtex, csv, etc.)
|
||||
* @param workingDir The path to create temporary files (for command line or UI based)
|
||||
* @throws Exception
|
||||
* @throws Exception if error occurs
|
||||
*/
|
||||
@Override
|
||||
public void addBTEItems(Context c, List<Collection> mycollections,
|
||||
@@ -457,10 +457,14 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
|
||||
/**
|
||||
* item? try and add it to the archive.
|
||||
* @param c current Context
|
||||
* @param mycollections - add item to these Collections.
|
||||
* @param path - directory containing the item directories.
|
||||
* @param itemname handle - non-null means we have a pre-defined handle already
|
||||
* @param mapOut - mapfile we're writing
|
||||
* @param template whether to use collection template item as starting point
|
||||
* @return Item
|
||||
* @throws Exception if error occurs
|
||||
*/
|
||||
protected Item addItem(Context c, List<Collection> mycollections, String path,
|
||||
String itemname, PrintWriter mapOut, boolean template) throws Exception
|
||||
@@ -765,6 +769,8 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
* @param path The path to the data directory for this item
|
||||
* @param filename The collections file filename. Should be "collections"
|
||||
* @return A list of collections in which to insert the item or null
|
||||
* @throws IOException if IO error
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
|
||||
protected List<Collection> processCollectionFile(Context c, String path, String filename) throws IOException, SQLException
|
||||
@@ -827,7 +833,12 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
}
|
||||
|
||||
/**
|
||||
* Read in the handle file or return null if empty or doesn't exist
|
||||
* Read in the handle file contents or return null if empty or doesn't exist
|
||||
* @param c DSpace context
|
||||
* @param i DSpace item
|
||||
* @param path path to handle file
|
||||
* @param filename name of file
|
||||
* @return handle file contents or null if doesn't exist
|
||||
*/
|
||||
protected String processHandleFile(Context c, Item i, String path, String filename)
|
||||
{
|
||||
@@ -886,6 +897,14 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
* Given a contents file and an item, stuffing it with bitstreams from the
|
||||
* contents file Returns a List of Strings with lines from the contents
|
||||
* file that request non-default bitstream permission
|
||||
* @param c DSpace Context
|
||||
* @param i DSpace item
|
||||
* @param path path as string
|
||||
* @param filename file name
|
||||
* @return List of Strings
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
protected List<String> processContentsFile(Context c, Item i, String path,
|
||||
String filename) throws SQLException, IOException,
|
||||
@@ -1129,14 +1148,15 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
|
||||
/**
|
||||
* each entry represents a bitstream....
|
||||
* @param c
|
||||
* @param i
|
||||
* @param path
|
||||
* @param fileName
|
||||
* @param bundleName
|
||||
* @throws SQLException
|
||||
* @throws IOException
|
||||
* @throws AuthorizeException
|
||||
* @param c DSpace Context
|
||||
* @param i Dspace Item
|
||||
* @param path path to file
|
||||
* @param fileName file name
|
||||
* @param bundleName bundle name
|
||||
* @param primary if primary bitstream
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
protected void processContentFileEntry(Context c, Item i, String path,
|
||||
String fileName, String bundleName, boolean primary) throws SQLException,
|
||||
@@ -1209,14 +1229,15 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
/**
|
||||
* Register the bitstream file into DSpace
|
||||
*
|
||||
* @param c
|
||||
* @param i
|
||||
* @param assetstore
|
||||
* @param c DSpace Context
|
||||
* @param i DSpace Item
|
||||
* @param assetstore assetstore number
|
||||
* @param bitstreamPath the full filepath expressed in the contents file
|
||||
* @param bundleName
|
||||
* @throws SQLException
|
||||
* @throws IOException
|
||||
* @throws AuthorizeException
|
||||
* @param bundleName bundle name
|
||||
* @param description bitstream description
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
protected void registerBitstream(Context c, Item i, int assetstore,
|
||||
String bitstreamPath, String bundleName, String description )
|
||||
@@ -1281,19 +1302,21 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
* Process the Options to apply to the Item. The options are tab delimited
|
||||
*
|
||||
* Options:
|
||||
* {@code
|
||||
* 48217870-MIT.pdf permissions: -r 'MIT Users' description: Full printable version (MIT only)
|
||||
* permissions:[r|w]-['group name']
|
||||
* description: 'the description of the file'
|
||||
*
|
||||
* }
|
||||
* where:
|
||||
* {@code
|
||||
* [r|w] (meaning: read|write)
|
||||
* ['MIT Users'] (the group name)
|
||||
*
|
||||
* @param c
|
||||
* @param myItem
|
||||
* @param options
|
||||
* @throws SQLException
|
||||
* @throws AuthorizeException
|
||||
* }
|
||||
* @param c DSpace Context
|
||||
* @param myItem DSpace Item
|
||||
* @param options List of option strings
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
protected void processOptions(Context c, Item myItem, List<String> options)
|
||||
throws SQLException, AuthorizeException
|
||||
@@ -1447,12 +1470,13 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
/**
|
||||
* Set the Permission on a Bitstream.
|
||||
*
|
||||
* @param c
|
||||
* @param g
|
||||
* @param actionID
|
||||
* @param bs
|
||||
* @throws SQLException
|
||||
* @throws AuthorizeException
|
||||
* @param c DSpace Context
|
||||
* @param g Dspace Group
|
||||
* @param actionID action identifier
|
||||
* @param bs Bitstream
|
||||
* @see org.dspace.core.Constants
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
protected void setPermission(Context c, Group g, int actionID, Bitstream bs)
|
||||
throws SQLException, AuthorizeException
|
||||
@@ -1488,9 +1512,9 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
// XML utility methods
|
||||
/**
|
||||
* Lookup an attribute from a DOM node.
|
||||
* @param n
|
||||
* @param name
|
||||
* @return
|
||||
* @param n node
|
||||
* @param name attribute name
|
||||
* @return attribute value
|
||||
*/
|
||||
private String getAttributeValue(Node n, String name)
|
||||
{
|
||||
@@ -1512,8 +1536,8 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
|
||||
/**
|
||||
* Return the String value of a Node.
|
||||
* @param node
|
||||
* @return
|
||||
* @param node node
|
||||
* @return string value
|
||||
*/
|
||||
protected String getStringValue(Node node)
|
||||
{
|
||||
@@ -1539,6 +1563,9 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
* the filename to load from
|
||||
*
|
||||
* @return the DOM representation of the XML file
|
||||
* @throws IOException if IO error
|
||||
* @throws ParserConfigurationException if config error
|
||||
* @throws SAXException if XML error
|
||||
*/
|
||||
protected Document loadXML(String filename) throws IOException,
|
||||
ParserConfigurationException, SAXException
|
||||
@@ -1721,7 +1748,8 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
|
||||
* @param resumeDir In case of a resume request, the directory that containsthe old mapfile and data
|
||||
* @param inputType The input type of the data (bibtex, csv, etc.), in case of local file
|
||||
* @param context The context
|
||||
* @throws Exception
|
||||
* @param template whether to use template item
|
||||
* @throws Exception if error
|
||||
*/
|
||||
@Override
|
||||
public void processUIImport(String filepath, Collection owningCollection, String[] otherCollections, String resumeDir, String inputType, Context context, final boolean template) throws Exception
|
||||
|
@@ -36,15 +36,53 @@ import java.util.List;
|
||||
public interface ItemImportService {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param c DSpace Context
|
||||
* @param mycollections List of Collections
|
||||
* @param sourceDir source location
|
||||
* @param mapFile map file
|
||||
* @param template whether to use template item
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void addItemsAtomic(Context c, List<Collection> mycollections, String sourceDir, String mapFile, boolean template) throws Exception;
|
||||
|
||||
/**
|
||||
* Add items
|
||||
* @param c DSpace Context
|
||||
* @param mycollections List of Collections
|
||||
* @param sourceDir source location
|
||||
* @param mapFile map file
|
||||
* @param template whether to use template item
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void addItems(Context c, List<Collection> mycollections,
|
||||
String sourceDir, String mapFile, boolean template) throws Exception;
|
||||
|
||||
/**
|
||||
* Unzip a file
|
||||
* @param zipfile file
|
||||
* @return unzip location
|
||||
* @throws IOException if error
|
||||
*/
|
||||
public String unzip(File zipfile) throws IOException;
|
||||
|
||||
/**
|
||||
* Unzip a file to a destination
|
||||
* @param zipfile file
|
||||
* @param destDir destination directory
|
||||
* @return unzip location
|
||||
* @throws IOException if error
|
||||
*/
|
||||
public String unzip(File zipfile, String destDir) throws IOException;
|
||||
|
||||
/**
|
||||
* Unzip a file in a specific source directory
|
||||
* @param sourcedir source directory
|
||||
* @param zipfilename file name
|
||||
* @return unzip location
|
||||
* @throws IOException if error
|
||||
*/
|
||||
public String unzip(String sourcedir, String zipfilename) throws IOException;
|
||||
|
||||
/**
|
||||
@@ -54,8 +92,10 @@ public interface ItemImportService {
|
||||
* @param owningCollection The owning collection the items will belong to
|
||||
* @param collections The collections the created items will be inserted to, apart from the owning one
|
||||
* @param resumeDir In case of a resume request, the directory that containsthe old mapfile and data
|
||||
* @param inputType The input type of the data (bibtex, csv, etc.), in case of local file
|
||||
* @param context The context
|
||||
* @throws Exception
|
||||
* @param template whether to use template item
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void processUIImport(String url, Collection owningCollection, String[] collections, String resumeDir, String inputType, Context context, boolean template) throws Exception;
|
||||
|
||||
@@ -71,7 +111,7 @@ public interface ItemImportService {
|
||||
* - eperson to send the email to
|
||||
* @param fileName
|
||||
* - the filepath to the mapfile created by the batch import
|
||||
* @throws javax.mail.MessagingException
|
||||
* @throws MessagingException if error
|
||||
*/
|
||||
public void emailSuccessMessage(Context context, EPerson eperson,
|
||||
String fileName) throws MessagingException;
|
||||
@@ -86,39 +126,113 @@ public interface ItemImportService {
|
||||
* - EPerson to send the error message to
|
||||
* @param error
|
||||
* - the error message
|
||||
* @throws MessagingException
|
||||
* @throws MessagingException if error
|
||||
*/
|
||||
public void emailErrorMessage(EPerson eperson, String error)
|
||||
throws MessagingException;
|
||||
|
||||
|
||||
/**
|
||||
* Get imports available for a person
|
||||
* @param eperson EPerson object
|
||||
* @return List of batch uploads
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public List<BatchUpload> getImportsAvailable(EPerson eperson)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* Get import upload directory
|
||||
* @param ePerson EPerson object
|
||||
* @return directory
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public String getImportUploadableDirectory(EPerson ePerson)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* Delete a batch by ID
|
||||
* @param c DSpace Context
|
||||
* @param uploadId identifier
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void deleteBatchUpload(Context c, String uploadId) throws Exception;
|
||||
|
||||
/**
|
||||
* Replace items
|
||||
* @param c DSpace Context
|
||||
* @param mycollections List of Collections
|
||||
* @param sourcedir source directory
|
||||
* @param mapfile map file
|
||||
* @param template whether to use template item
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void replaceItems(Context c, List<Collection> mycollections, String sourcedir, String mapfile, boolean template) throws Exception;
|
||||
|
||||
/**
|
||||
* Delete items via mapfile
|
||||
* @param c DSpace Context
|
||||
* @param mapfile map file
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void deleteItems(Context c, String mapfile) throws Exception;
|
||||
|
||||
/**
|
||||
* Add items
|
||||
* @param c DSpace Context
|
||||
* @param mycollections List of Collections
|
||||
* @param sourcedir source directory
|
||||
* @param mapfile map file
|
||||
* @param template whether to use template item
|
||||
* @param bteInputType The input type of the data (bibtex, csv, etc.), in case of local file
|
||||
* @param workingDir working directory
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void addBTEItems(Context c, List<Collection> mycollections, String sourcedir, String mapfile, boolean template, String bteInputType, String workingDir) throws Exception;
|
||||
|
||||
/**
|
||||
* Get temporary work directory
|
||||
* @return directory as string
|
||||
*/
|
||||
public String getTempWorkDir();
|
||||
|
||||
/**
|
||||
* Get temporary work directory (as File)
|
||||
* @return directory as File
|
||||
*/
|
||||
public File getTempWorkDirFile();
|
||||
|
||||
/**
|
||||
* Cleanup
|
||||
*/
|
||||
public void cleanupZipTemp();
|
||||
|
||||
/**
|
||||
* Set test flag
|
||||
* @param isTest true or false
|
||||
*/
|
||||
public void setTest(boolean isTest);
|
||||
|
||||
/**
|
||||
* Set resume flag
|
||||
* @param isResume true or false
|
||||
*/
|
||||
public void setResume(boolean isResume);
|
||||
|
||||
/**
|
||||
* Set use workflow
|
||||
* @param useWorkflow whether to enable workflow
|
||||
*/
|
||||
public void setUseWorkflow(boolean useWorkflow);
|
||||
|
||||
public void setUseWorkflowSendEmail(boolean useWorkflow);
|
||||
/**
|
||||
* @param useWorkflowSendMail whether to send mail
|
||||
*/
|
||||
public void setUseWorkflowSendEmail(boolean useWorkflowSendMail);
|
||||
|
||||
/**
|
||||
* Set quiet flag
|
||||
* @param isQuiet true or false
|
||||
*/
|
||||
public void setQuiet(boolean isQuiet);
|
||||
}
|
||||
|
@@ -24,6 +24,13 @@ public class ActionManager implements Iterable<UpdateAction> {
|
||||
protected Map<Class<? extends UpdateAction>, UpdateAction> registry
|
||||
= new LinkedHashMap<Class<? extends UpdateAction>, UpdateAction>();
|
||||
|
||||
/**
|
||||
* Get update action
|
||||
* @param actionClass UpdateAction class
|
||||
* @return instantiation of UpdateAction class
|
||||
* @throws InstantiationException if instantiation error
|
||||
* @throws IllegalAccessException if illegal access error
|
||||
*/
|
||||
public UpdateAction getUpdateAction(Class<? extends UpdateAction> actionClass)
|
||||
throws InstantiationException, IllegalAccessException
|
||||
{
|
||||
|
@@ -48,15 +48,15 @@ public class AddBitstreamsAction extends UpdateBitstreamsAction {
|
||||
/**
|
||||
* Adds bitstreams from the archive as listed in the contents file.
|
||||
*
|
||||
* @param context
|
||||
* @param itarch
|
||||
* @param isTest
|
||||
* @param suppressUndo
|
||||
* @throws IllegalArgumentException
|
||||
* @throws ParseException
|
||||
* @throws IOException
|
||||
* @throws AuthorizeException
|
||||
* @throws SQLException
|
||||
* @param context DSpace Context
|
||||
* @param itarch Item Archive
|
||||
* @param isTest test flag
|
||||
* @param suppressUndo undo flag
|
||||
* @throws IOException if IO error
|
||||
* @throws IllegalArgumentException if arg exception
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws ParseException if parse error
|
||||
*/
|
||||
@Override
|
||||
public void execute(Context context, ItemArchive itarch, boolean isTest,
|
||||
@@ -117,6 +117,22 @@ public class AddBitstreamsAction extends UpdateBitstreamsAction {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add bitstream
|
||||
* @param context DSpace Context
|
||||
* @param itarch Item Archive
|
||||
* @param item DSpace Item
|
||||
* @param dir directory
|
||||
* @param ce contents entry for bitstream
|
||||
* @param suppressUndo undo flag
|
||||
* @param isTest test flag
|
||||
* @return bundle name
|
||||
* @throws IOException if IO error
|
||||
* @throws IllegalArgumentException if arg exception
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws ParseException if parse error
|
||||
*/
|
||||
protected String addBitstream(Context context, ItemArchive itarch, Item item, File dir,
|
||||
ContentsEntry ce, boolean suppressUndo, boolean isTest)
|
||||
throws IOException, IllegalArgumentException, SQLException, AuthorizeException, ParseException
|
||||
|
@@ -33,12 +33,12 @@ public class AddMetadataAction extends UpdateMetadataAction {
|
||||
/**
|
||||
* Adds metadata specified in the source archive
|
||||
*
|
||||
* @param context
|
||||
* @param itarch
|
||||
* @param isTest
|
||||
* @param suppressUndo
|
||||
* @throws AuthorizeException
|
||||
* @throws SQLException
|
||||
* @param context DSpace Context
|
||||
* @param itarch item archive
|
||||
* @param isTest test flag
|
||||
* @param suppressUndo undo flag
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
@Override
|
||||
public void execute(Context context, ItemArchive itarch, boolean isTest,
|
||||
|
@@ -26,16 +26,16 @@ public abstract class BitstreamFilter {
|
||||
/**
|
||||
* The filter method
|
||||
*
|
||||
* @param bitstream
|
||||
* @param bitstream Bitstream
|
||||
* @return whether the bitstream matches the criteria
|
||||
* @throws BitstreamFilterException
|
||||
* @throws BitstreamFilterException if filter error
|
||||
*/
|
||||
public abstract boolean accept(Bitstream bitstream) throws BitstreamFilterException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param filepath - The complete path for the properties file
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public void initProperties(String filepath)
|
||||
throws IOException
|
||||
|
@@ -29,8 +29,8 @@ public class BitstreamFilterByBundleName extends BitstreamFilter {
|
||||
/**
|
||||
* Filter bitstream based on bundle name found in properties file
|
||||
*
|
||||
* @param bitstream
|
||||
* @throws BitstreamFilterException
|
||||
* @param bitstream Bitstream
|
||||
* @throws BitstreamFilterException if filter error
|
||||
* @return whether bitstream is in bundle
|
||||
*
|
||||
*/
|
||||
|
@@ -29,7 +29,9 @@ public class BitstreamFilterByFilename extends BitstreamFilter {
|
||||
* Tests bitstream by matching the regular expression in the
|
||||
* properties against the bitstream name
|
||||
*
|
||||
* @param bitstream Bitstream
|
||||
* @return whether bitstream name matches the regular expression
|
||||
* @exception BitstreamFilterException if filter error
|
||||
*/
|
||||
@Override
|
||||
public boolean accept(Bitstream bitstream) throws BitstreamFilterException
|
||||
|
@@ -17,10 +17,18 @@ public class BitstreamFilterException extends Exception
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public BitstreamFilterException() {}
|
||||
/**
|
||||
*
|
||||
* @param msg exception message
|
||||
*/
|
||||
public BitstreamFilterException(String msg)
|
||||
{
|
||||
super(msg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param e exception
|
||||
*/
|
||||
public BitstreamFilterException(Exception e)
|
||||
{
|
||||
super(e);
|
||||
|
@@ -21,9 +21,11 @@ import org.dspace.core.Constants;
|
||||
* it looks from the source code that the ordering or elements is not fixed
|
||||
*
|
||||
* e.g.:
|
||||
* {@code
|
||||
* 48217870-MIT.pdf\tbundle: bundlename\tpermissions: -r 'MIT Users'\tdescription: Full printable version (MIT only)
|
||||
* permissions: -[r|w] ['group name']
|
||||
* description: <the description of the file>
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@@ -57,9 +59,9 @@ public class ContentsEntry
|
||||
/**
|
||||
* Factory method parses a line from the Contents Entry file
|
||||
*
|
||||
* @param line
|
||||
* @param line line as string
|
||||
* @return the parsed ContentsEntry object
|
||||
* @throws ParseException
|
||||
* @throws ParseException if parse error
|
||||
*/
|
||||
public static ContentsEntry parse(String line)
|
||||
throws ParseException
|
||||
|
@@ -30,15 +30,15 @@ public class DeleteBitstreamsAction extends UpdateBitstreamsAction
|
||||
/**
|
||||
* Delete bitstream from item
|
||||
*
|
||||
* @param context
|
||||
* @param itarch
|
||||
* @param isTest
|
||||
* @param suppressUndo
|
||||
* @throws IllegalArgumentException
|
||||
* @throws ParseException
|
||||
* @throws IOException
|
||||
* @throws AuthorizeException
|
||||
* @throws SQLException
|
||||
* @param context DSpace Context
|
||||
* @param itarch item archive
|
||||
* @param isTest test flag
|
||||
* @param suppressUndo undo flag
|
||||
* @throws IOException if IO error
|
||||
* @throws IllegalArgumentException if arg exception
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws ParseException if parse error
|
||||
*/
|
||||
@Override
|
||||
public void execute(Context context, ItemArchive itarch, boolean isTest,
|
||||
|
@@ -35,7 +35,7 @@ public class DeleteBitstreamsByFilterAction extends UpdateBitstreamsAction {
|
||||
/**
|
||||
* Set filter
|
||||
*
|
||||
* @param filter
|
||||
* @param filter BitstreamFilter
|
||||
*/
|
||||
public void setBitstreamFilter(BitstreamFilter filter)
|
||||
{
|
||||
@@ -54,15 +54,15 @@ public class DeleteBitstreamsByFilterAction extends UpdateBitstreamsAction {
|
||||
/**
|
||||
* Delete bitstream
|
||||
*
|
||||
* @param context
|
||||
* @param itarch
|
||||
* @param isTest
|
||||
* @param suppressUndo
|
||||
* @throws IllegalArgumentException
|
||||
* @throws ParseException
|
||||
* @throws IOException
|
||||
* @throws AuthorizeException
|
||||
* @throws SQLException
|
||||
* @param context DSpace Context
|
||||
* @param itarch item archive
|
||||
* @param isTest test flag
|
||||
* @param suppressUndo undo flag
|
||||
* @throws IOException if IO error
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws ParseException if parse error
|
||||
* @throws BitstreamFilterException if filter error
|
||||
*/
|
||||
@Override
|
||||
public void execute(Context context, ItemArchive itarch, boolean isTest,
|
||||
|
@@ -28,12 +28,13 @@ public class DeleteMetadataAction extends UpdateMetadataAction {
|
||||
/**
|
||||
* Delete metadata from item
|
||||
*
|
||||
* @param context
|
||||
* @param itarch
|
||||
* @param isTest
|
||||
* @param suppressUndo
|
||||
* @throws ParseException
|
||||
* @throws AuthorizeException
|
||||
* @param context DSpace Context
|
||||
* @param itarch Item Archive
|
||||
* @param isTest test flag
|
||||
* @param suppressUndo undo flag
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws ParseException if parse error
|
||||
*/
|
||||
@Override
|
||||
public void execute(Context context, ItemArchive itarch, boolean isTest,
|
||||
|
@@ -16,7 +16,7 @@ import org.dspace.content.Item;
|
||||
*
|
||||
* Adds some utility methods
|
||||
*
|
||||
* Really not at all general enough but supports Dublin Core and the compound form notation <schema>.<element>[.<qualifier>]
|
||||
* Really not at all general enough but supports Dublin Core and the compound form notation {@code <schema>.<element>[.<qualifier>]}
|
||||
*
|
||||
* Does not support wildcard for qualifier
|
||||
*
|
||||
@@ -47,8 +47,9 @@ class DtoMetadata
|
||||
* @param element not null, not empty
|
||||
* @param qualifier null; don't allow empty string or * indicating 'any'
|
||||
* @param language null or empty
|
||||
* @param value
|
||||
* @param value value
|
||||
* @return DtoMetadata object
|
||||
* @throws IllegalArgumentException if arg error
|
||||
*/
|
||||
public static DtoMetadata create(String schema,
|
||||
String element,
|
||||
@@ -70,7 +71,9 @@ class DtoMetadata
|
||||
*
|
||||
* @param compoundForm of the form <schema>.<element>[.<qualifier>]
|
||||
* @param language null or empty
|
||||
* @param value
|
||||
* @param value value
|
||||
* @throws ParseException if parse error
|
||||
* @throws IllegalArgumentException if arg error
|
||||
*/
|
||||
public static DtoMetadata create(String compoundForm, String language, String value)
|
||||
throws ParseException, IllegalArgumentException
|
||||
|
@@ -85,6 +85,8 @@ public class ItemArchive {
|
||||
* @param dir - The directory File in the source archive
|
||||
* @param itemField - The metadata field in which the Item identifier is located
|
||||
* if null, the default is the handle in the dc.identifier.uri field
|
||||
* @return ItemArchive object
|
||||
* @throws Exception if error
|
||||
*
|
||||
*/
|
||||
public static ItemArchive create(Context context, File dir, String itemField)
|
||||
@@ -137,6 +139,11 @@ public class ItemArchive {
|
||||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for Transformer
|
||||
* @return Transformer
|
||||
* @throws TransformerConfigurationException if config error
|
||||
*/
|
||||
protected Transformer getTransformer()
|
||||
throws TransformerConfigurationException
|
||||
{
|
||||
@@ -176,7 +183,7 @@ public class ItemArchive {
|
||||
|
||||
/**
|
||||
* Add metadata field to undo list
|
||||
* @param dtom
|
||||
* @param dtom DtoMetadata (represents metadata field)
|
||||
*/
|
||||
public void addUndoMetadataField(DtoMetadata dtom)
|
||||
{
|
||||
@@ -194,7 +201,7 @@ public class ItemArchive {
|
||||
|
||||
/**
|
||||
* Add bitstream id to delete contents file
|
||||
* @param bitstreamId
|
||||
* @param bitstreamId bitstream ID
|
||||
*/
|
||||
public void addUndoDeleteContents(UUID bitstreamId)
|
||||
{
|
||||
@@ -207,7 +214,9 @@ public class ItemArchive {
|
||||
* This is the default implementation
|
||||
* that uses the dc.identifier.uri metadatafield
|
||||
* that contains the item handle as its value
|
||||
*
|
||||
* @param context DSpace Context
|
||||
* @throws SQLException if database error
|
||||
* @throws Exception if error
|
||||
*/
|
||||
private Item itemFromHandleInput(Context context)
|
||||
throws SQLException, Exception
|
||||
@@ -250,8 +259,8 @@ public class ItemArchive {
|
||||
*
|
||||
* @param context - the DSpace context
|
||||
* @param itemField - the compound form of the metadata element <schema>.<element>.<qualifier>
|
||||
* @throws SQLException
|
||||
* @throws Exception
|
||||
* @throws SQLException if database error
|
||||
* @throws Exception if error
|
||||
*/
|
||||
private Item itemFromMetadataField(Context context, String itemField)
|
||||
throws SQLException, AuthorizeException, Exception
|
||||
@@ -285,7 +294,11 @@ public class ItemArchive {
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get DtoMetadata field
|
||||
* @param compoundForm compound form
|
||||
* @return DtoMetadata field
|
||||
*/
|
||||
private DtoMetadata getMetadataField(String compoundForm)
|
||||
{
|
||||
for (DtoMetadata dtom : dtomList)
|
||||
@@ -301,8 +314,12 @@ public class ItemArchive {
|
||||
/**
|
||||
* write undo directory and files to Disk in archive format
|
||||
*
|
||||
*
|
||||
* @param undoDir - the root directory of the undo archive
|
||||
* @throws IOException if IO error
|
||||
* @throws ParserConfigurationException if config error
|
||||
* @throws TransformerConfigurationException if transformer config error
|
||||
* @throws TransformerException if transformer error
|
||||
* @throws FileNotFoundException if file not found
|
||||
*/
|
||||
public void writeUndo(File undoDir)
|
||||
throws IOException, ParserConfigurationException, TransformerConfigurationException,
|
||||
|
@@ -113,7 +113,7 @@ public class ItemUpdate {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argv
|
||||
* @param argv commandline args
|
||||
*/
|
||||
public static void main(String[] argv)
|
||||
{
|
||||
@@ -392,6 +392,16 @@ public class ItemUpdate {
|
||||
System.exit(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* process an archive
|
||||
* @param context DSpace Context
|
||||
* @param sourceDirPath source path
|
||||
* @param itemField item field
|
||||
* @param metadataIndexName index name
|
||||
* @param alterProvenance whether to alter provenance
|
||||
* @param isTest test flag
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void processArchive(Context context, String sourceDirPath, String itemField,
|
||||
String metadataIndexName, boolean alterProvenance, boolean isTest)
|
||||
throws Exception
|
||||
@@ -511,8 +521,8 @@ public class ItemUpdate {
|
||||
*
|
||||
* @param sourceDir - the original source directory
|
||||
* @return the directory of the undo archive
|
||||
* @throws FileNotFoundException
|
||||
* @throws IOException
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
protected File initUndoArchive(File sourceDir)
|
||||
throws FileNotFoundException, IOException
|
||||
@@ -555,6 +565,12 @@ public class ItemUpdate {
|
||||
|
||||
//private void write
|
||||
|
||||
/**
|
||||
* Set EPerson doing import
|
||||
* @param context DSpace Context
|
||||
* @param eperson EPerson obj
|
||||
* @throws Exception if error
|
||||
*/
|
||||
protected void setEPerson(Context context, String eperson)
|
||||
throws Exception
|
||||
{
|
||||
@@ -589,7 +605,7 @@ public class ItemUpdate {
|
||||
* poor man's logging
|
||||
* As with ItemImport, API logging goes through log4j to the DSpace.log files
|
||||
* whereas the batch logging goes to the console to be captured there.
|
||||
* @param s
|
||||
* @param s String
|
||||
*/
|
||||
static void pr(String s)
|
||||
{
|
||||
@@ -598,7 +614,7 @@ public class ItemUpdate {
|
||||
|
||||
/**
|
||||
* print if verbose flag is set
|
||||
* @param s
|
||||
* @param s String
|
||||
*/
|
||||
static void prv(String s)
|
||||
{
|
||||
|
@@ -68,11 +68,11 @@ public class MetadataUtilities {
|
||||
clear (i.e. delete) all of these DCValues
|
||||
* add them back, minus the one to actually delete
|
||||
*
|
||||
*
|
||||
* @param item
|
||||
* @param dtom
|
||||
* @param isLanguageStrict -
|
||||
*
|
||||
* @param context DSpace Context
|
||||
* @param item Item Object
|
||||
* @param dtom metadata field
|
||||
* @param isLanguageStrict whether strict or not
|
||||
* @throws SQLException if database error
|
||||
* @return true if metadata field is found with matching value and was deleted
|
||||
*/
|
||||
public static boolean deleteMetadataByValue(Context context, Item item, DtoMetadata dtom, boolean isLanguageStrict) throws SQLException {
|
||||
@@ -122,11 +122,13 @@ public class MetadataUtilities {
|
||||
/**
|
||||
* Append text to value metadata field to item
|
||||
*
|
||||
* @param item
|
||||
* @param dtom
|
||||
* @param isLanguageStrict
|
||||
* @param textToAppend
|
||||
* @param context DSpace Context
|
||||
* @param item DSpace Item
|
||||
* @param dtom metadata field
|
||||
* @param isLanguageStrict if strict
|
||||
* @param textToAppend text to append
|
||||
* @throws IllegalArgumentException - When target metadata field is not found
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
public static void appendMetadata(Context context, Item item, DtoMetadata dtom, boolean isLanguageStrict,
|
||||
String textToAppend)
|
||||
@@ -184,15 +186,15 @@ public class MetadataUtilities {
|
||||
* Modification of method from ItemImporter.loadDublinCore
|
||||
* as a Factory method
|
||||
*
|
||||
* @param docBuilder -
|
||||
* @param docBuilder DocumentBuilder
|
||||
* @param is - InputStream of dublin_core.xml
|
||||
* @return list of DtoMetadata representing the metadata fields relating to an Item
|
||||
* @throws SQLException
|
||||
* @throws IOException
|
||||
* @throws ParserConfigurationException
|
||||
* @throws SAXException
|
||||
* @throws TransformerException
|
||||
* @throws AuthorizeException
|
||||
* @throws SQLException if database error
|
||||
* @throws IOException if IO error
|
||||
* @throws ParserConfigurationException if parser config error
|
||||
* @throws SAXException if XML error
|
||||
* @throws TransformerException if transformer error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
public static List<DtoMetadata> loadDublinCore(DocumentBuilder docBuilder, InputStream is)
|
||||
throws SQLException, IOException, ParserConfigurationException,
|
||||
@@ -269,12 +271,12 @@ public class MetadataUtilities {
|
||||
/**
|
||||
* Write dublin_core.xml
|
||||
*
|
||||
* @param docBuilder
|
||||
* @param dtomList
|
||||
* @param docBuilder DocumentBuilder
|
||||
* @param dtomList List of metadata fields
|
||||
* @return xml document
|
||||
* @throws ParserConfigurationException
|
||||
* @throws TransformerConfigurationException
|
||||
* @throws TransformerException
|
||||
* @throws ParserConfigurationException if parser config error
|
||||
* @throws TransformerConfigurationException if transformer config error
|
||||
* @throws TransformerException if transformer error
|
||||
*/
|
||||
public static Document writeDublinCore(DocumentBuilder docBuilder, List<DtoMetadata> dtomList)
|
||||
throws ParserConfigurationException, TransformerConfigurationException, TransformerException
|
||||
@@ -313,11 +315,11 @@ public class MetadataUtilities {
|
||||
|
||||
/**
|
||||
* write xml document to output stream
|
||||
* @param doc
|
||||
* @param transformer
|
||||
* @param out
|
||||
* @throws IOException
|
||||
* @throws TransformerException
|
||||
* @param doc XML Document
|
||||
* @param transformer XML Transformer
|
||||
* @param out OutputStream
|
||||
* @throws IOException if IO Error
|
||||
* @throws TransformerException if Transformer error
|
||||
*/
|
||||
public static void writeDocument(Document doc, Transformer transformer, OutputStream out)
|
||||
throws IOException, TransformerException
|
||||
@@ -332,9 +334,9 @@ public class MetadataUtilities {
|
||||
// XML utility methods
|
||||
/**
|
||||
* Lookup an attribute from a DOM node.
|
||||
* @param n
|
||||
* @param name
|
||||
* @return
|
||||
* @param n Node
|
||||
* @param name name
|
||||
* @return attribute value
|
||||
*/
|
||||
private static String getAttributeValue(Node n, String name)
|
||||
{
|
||||
@@ -355,8 +357,8 @@ public class MetadataUtilities {
|
||||
|
||||
/**
|
||||
* Return the String value of a Node.
|
||||
* @param node
|
||||
* @return
|
||||
* @param node node
|
||||
* @return string value
|
||||
*/
|
||||
private static String getStringValue(Node node)
|
||||
{
|
||||
@@ -379,7 +381,11 @@ public class MetadataUtilities {
|
||||
* Rewrite of ItemImport's functionality
|
||||
* but just the parsing of the file, not the processing of its elements.
|
||||
*
|
||||
* @validate flag to verify matching files in tree
|
||||
* @param f file
|
||||
* @return list of ContentsEntry
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
* @throws IOException if IO error
|
||||
* @throws ParseException if parse error
|
||||
*/
|
||||
public static List<ContentsEntry> readContentsFile(File f)
|
||||
throws FileNotFoundException, IOException, ParseException
|
||||
@@ -421,9 +427,10 @@ public class MetadataUtilities {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param f
|
||||
* @throws FileNotFoundException
|
||||
* @throws IOException
|
||||
* @param f file
|
||||
* @return list of lines as strings
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
* @throws IOException if IO Error
|
||||
*/
|
||||
public static List<String> readDeleteContentsFile(File f)
|
||||
throws FileNotFoundException, IOException
|
||||
@@ -466,7 +473,7 @@ public class MetadataUtilities {
|
||||
/**
|
||||
* Get display of Metadatum
|
||||
*
|
||||
* @param dcv
|
||||
* @param dcv MetadataValue
|
||||
* @return string displaying elements of the Metadatum
|
||||
*/
|
||||
public static String getDCValueString(MetadataValue dcv)
|
||||
@@ -478,7 +485,10 @@ public class MetadataUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Return compound form of a metadata field (i.e. schema.element.qualifier)
|
||||
* @param schema schema
|
||||
* @param element element
|
||||
* @param qualifier qualifier
|
||||
* @return a String representation of the two- or three-part form of a metadata element
|
||||
* e.g. dc.identifier.uri
|
||||
*/
|
||||
@@ -495,9 +505,10 @@ public class MetadataUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses metadata field given in the form <schema>.<element>[.<qualifier>|.*]
|
||||
* Parses metadata field given in the form {@code <schema>.<element>[.<qualifier>|.*]}
|
||||
* checks for correct number of elements (2 or 3) and for empty strings
|
||||
*
|
||||
* @param compoundForm compound form of metadata field
|
||||
* @return String Array
|
||||
* @throws ParseException if validity checks fail
|
||||
*
|
||||
|
@@ -27,10 +27,10 @@ public class OriginalBitstreamFilter extends BitstreamFilterByBundleName
|
||||
|
||||
/**
|
||||
* Tests bitstreams for containment in an ORIGINAL bundle
|
||||
*
|
||||
* @param bitstream Bitstream
|
||||
* @return true if the bitstream is in the ORIGINAL bundle
|
||||
*
|
||||
* @throws BitstreamFilterException
|
||||
* @throws BitstreamFilterException if filter error
|
||||
*/
|
||||
@Override
|
||||
public boolean accept(Bitstream bitstream)
|
||||
|
@@ -30,8 +30,8 @@ public class OriginalWithDerivativesBitstreamFilter extends BitstreamFilter
|
||||
/**
|
||||
* Tests bitstream for membership in specified bundles (ORIGINAL, TEXT, THUMBNAIL)
|
||||
*
|
||||
* @param bitstream
|
||||
* @throws BitstreamFilterException
|
||||
* @param bitstream Bitstream
|
||||
* @throws BitstreamFilterException if error
|
||||
* @return true if bitstream is in specified bundles
|
||||
*/
|
||||
@Override
|
||||
|
@@ -23,11 +23,11 @@ public interface UpdateAction
|
||||
/**
|
||||
* Action to update item
|
||||
*
|
||||
* @param context
|
||||
* @param itarch
|
||||
* @param isTest
|
||||
* @param suppressUndo
|
||||
* @throws Exception
|
||||
* @param context DSpace context
|
||||
* @param itarch item archive
|
||||
* @param isTest test flag
|
||||
* @param suppressUndo undo flag
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void execute(Context context, ItemArchive itarch, boolean isTest, boolean suppressUndo)
|
||||
throws Exception;
|
||||
|
@@ -27,7 +27,7 @@ public abstract class UpdateBitstreamsAction implements UpdateAction {
|
||||
/**
|
||||
* Set variable to indicate that the dc.description.provenance field may
|
||||
* be changed as a result of Bitstream changes by ItemUpdate
|
||||
* @param alterProvenance
|
||||
* @param alterProvenance whether to alter provenance
|
||||
*/
|
||||
public void setAlterProvenance(boolean alterProvenance)
|
||||
{
|
||||
|
@@ -13,7 +13,7 @@ import java.util.Set;
|
||||
/**
|
||||
* This abstract subclass for metadata actions
|
||||
* maintains a collection for the target metadata fields
|
||||
* expressed as a string in the compound notation ( <schema>.<element>.<qualifier> )
|
||||
* expressed as a string in the compound notation ( {@code <schema>.<element>.<qualifier>} )
|
||||
* on which to apply the action when the method execute is called.
|
||||
*
|
||||
* Implemented as a Set to avoid problems with duplicates
|
||||
@@ -36,7 +36,7 @@ public abstract class UpdateMetadataAction implements UpdateAction {
|
||||
/**
|
||||
* Set target fields
|
||||
*
|
||||
* @param targetFields
|
||||
* @param targetFields Set of target fields to update
|
||||
*/
|
||||
public void addTargetFields(Set<String> targetFields) {
|
||||
for (String tf : targetFields)
|
||||
@@ -48,7 +48,7 @@ public abstract class UpdateMetadataAction implements UpdateAction {
|
||||
|
||||
/**
|
||||
* Add array of target fields to update
|
||||
* @param targetFields
|
||||
* @param targetFields array of target fields to update
|
||||
*/
|
||||
public void addTargetFields(String[] targetFields) {
|
||||
for (String tf : targetFields)
|
||||
@@ -61,7 +61,7 @@ public abstract class UpdateMetadataAction implements UpdateAction {
|
||||
/**
|
||||
* Add single field to update
|
||||
*
|
||||
* @param targetField
|
||||
* @param targetField target field to update
|
||||
*/
|
||||
public void addTargetField(String targetField) {
|
||||
this.targetFields.add(targetField);
|
||||
|
@@ -23,6 +23,12 @@ import org.jdom.Document;
|
||||
*/
|
||||
public class CommandRunner
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param args commandline args
|
||||
* @throws IOException if IO error
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
throws FileNotFoundException, IOException
|
||||
{
|
||||
@@ -46,11 +52,10 @@ public class CommandRunner
|
||||
/**
|
||||
* Read a file of command lines and execute each in turn.
|
||||
*
|
||||
* @param doc details of recognized commands.
|
||||
* @param script the file of command lines to be executed.
|
||||
* @return
|
||||
* @throws FileNotFoundException
|
||||
* @throws IOException
|
||||
* @return status code
|
||||
* @throws IOException if IO error
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
*/
|
||||
static int runManyCommands(String script)
|
||||
throws FileNotFoundException, IOException
|
||||
|
@@ -34,6 +34,8 @@ public class ScriptLauncher
|
||||
* Execute the DSpace script launcher
|
||||
*
|
||||
* @param args Any parameters required to be passed to the scripts it executes
|
||||
* @throws IOException if IO error
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
throws FileNotFoundException, IOException
|
||||
@@ -90,8 +92,8 @@ public class ScriptLauncher
|
||||
|
||||
/**
|
||||
* Recognize and execute a single command.
|
||||
* @param doc
|
||||
* @param args
|
||||
* @param doc Document
|
||||
* @param args arguments
|
||||
*/
|
||||
static int runOneCommand(Document commandConfigs, String[] args)
|
||||
{
|
||||
@@ -275,6 +277,7 @@ public class ScriptLauncher
|
||||
|
||||
/**
|
||||
* Display the commands that the current launcher config file knows about
|
||||
* @param commandConfigs configs as Document
|
||||
*/
|
||||
private static void display(Document commandConfigs)
|
||||
{
|
||||
|
@@ -7,14 +7,7 @@
|
||||
*/
|
||||
package org.dspace.app.mediafilter;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Color;
|
||||
import java.awt.image.*;
|
||||
import java.awt.RenderingHints;
|
||||
import java.awt.Transparency;
|
||||
import java.awt.Font;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
@@ -29,7 +22,7 @@ import org.dspace.app.mediafilter.JPEGFilter;
|
||||
* thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be
|
||||
* no bigger than. Creates only JPEGs.
|
||||
*
|
||||
* @author Jason Sherman <jsherman@usao.edu>
|
||||
* @author Jason Sherman jsherman@usao.edu
|
||||
*/
|
||||
public class BrandedPreviewJPEGFilter extends MediaFilter
|
||||
{
|
||||
|
@@ -50,10 +50,13 @@ public interface FormatFilter
|
||||
public String getDescription();
|
||||
|
||||
/**
|
||||
* @param item Item
|
||||
* @param source
|
||||
* input stream
|
||||
* @param verbose verbosity flag
|
||||
*
|
||||
* @return result of filter's transformation, written out to a bitstream
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public InputStream getDestinationStream(Item item, InputStream source, boolean verbose)
|
||||
throws Exception;
|
||||
@@ -76,6 +79,7 @@ public interface FormatFilter
|
||||
*
|
||||
* @return true if bitstream processing should continue,
|
||||
* false if this bitstream should be skipped
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public boolean preProcessBitstream(Context c, Item item, Bitstream source, boolean verbose)
|
||||
throws Exception;
|
||||
@@ -96,6 +100,7 @@ public interface FormatFilter
|
||||
* @param generatedBitstream
|
||||
* the bitstream which was generated by
|
||||
* this filter.
|
||||
* @throws Exception if error
|
||||
*/
|
||||
public void postProcessBitstream(Context c, Item item, Bitstream generatedBitstream)
|
||||
throws Exception;
|
||||
|
@@ -27,7 +27,7 @@ import org.dspace.core.ConfigurationManager;
|
||||
* thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be
|
||||
* no bigger than. Creates only JPEGs.
|
||||
*
|
||||
* @author Jason Sherman <jsherman@usao.edu>
|
||||
* @author Jason Sherman jsherman@usao.edu
|
||||
*/
|
||||
public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats
|
||||
{
|
||||
|
@@ -7,13 +7,7 @@
|
||||
*/
|
||||
package org.dspace.app.mediafilter;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Color;
|
||||
import java.awt.image.*;
|
||||
import java.awt.RenderingHints;
|
||||
import java.awt.Transparency;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
@@ -22,7 +16,6 @@ import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.rendering.PDFRenderer;
|
||||
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
|
||||
import org.dspace.app.mediafilter.JPEGFilter;
|
||||
|
||||
@@ -33,8 +26,8 @@ import org.dspace.app.mediafilter.JPEGFilter;
|
||||
* thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be
|
||||
* no bigger than. Creates only JPEGs.
|
||||
*
|
||||
* @author Ivan Masár <helix84@centrum.sk>
|
||||
* @author Jason Sherman <jsherman@usao.edu>
|
||||
* @author Ivan Masár helix84@centrum.sk
|
||||
* @author Jason Sherman jsherman@usao.edu
|
||||
*/
|
||||
public class PDFBoxThumbnail extends MediaFilter implements SelfRegisterInputFormats
|
||||
{
|
||||
|
@@ -72,7 +72,7 @@ public interface MediaFilterService {
|
||||
* already been filtered, and if not or if overWrite is set, invokes the
|
||||
* filter.
|
||||
*
|
||||
* @param c
|
||||
* @param context
|
||||
* context
|
||||
* @param item
|
||||
* item containing bitstream to process
|
||||
@@ -80,7 +80,7 @@ public interface MediaFilterService {
|
||||
* source bitstream to process
|
||||
* @param formatFilter
|
||||
* FormatFilter to perform filtering
|
||||
*
|
||||
* @throws Exception if error occurs
|
||||
* @return true if new rendition is created, false if rendition already
|
||||
* exists and overWrite is not set
|
||||
*/
|
||||
|
@@ -478,12 +478,12 @@ public class Packager
|
||||
* @param pkgParams Parameters to pass to individual packager instances
|
||||
* @param sourceFile location of the source package to ingest
|
||||
* @param parentObjs Parent DSpace object(s) to attach new object to
|
||||
* @throws IOException
|
||||
* @throws SQLException
|
||||
* @throws FileNotFoundException
|
||||
* @throws AuthorizeException
|
||||
* @throws CrosswalkException
|
||||
* @throws PackageException
|
||||
* @throws IOException if IO error
|
||||
* @throws SQLException if database error
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws CrosswalkException if crosswalk error
|
||||
* @throws PackageException if packaging error
|
||||
*/
|
||||
protected void ingest(Context context, PackageIngester sip, PackageParameters pkgParams, String sourceFile, DSpaceObject parentObjs[])
|
||||
throws IOException, SQLException, FileNotFoundException, AuthorizeException, CrosswalkException, PackageException
|
||||
@@ -617,12 +617,12 @@ public class Packager
|
||||
* @param dso DSpace Object to disseminate as a package
|
||||
* @param pkgParams Parameters to pass to individual packager instances
|
||||
* @param outputFile File where final package should be saved
|
||||
* @throws IOException
|
||||
* @throws SQLException
|
||||
* @throws FileNotFoundException
|
||||
* @throws AuthorizeException
|
||||
* @throws CrosswalkException
|
||||
* @throws PackageException
|
||||
* @throws IOException if IO error
|
||||
* @throws SQLException if database error
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws CrosswalkException if crosswalk error
|
||||
* @throws PackageException if packaging error
|
||||
*/
|
||||
protected void disseminate(Context context, PackageDisseminator dip,
|
||||
DSpaceObject dso, PackageParameters pkgParams,
|
||||
@@ -699,12 +699,12 @@ public class Packager
|
||||
* @param pkgParams Parameters to pass to individual packager instances
|
||||
* @param sourceFile location of the source package to ingest as the replacement
|
||||
* @param objToReplace DSpace object to replace (may be null if it will be specified in the package itself)
|
||||
* @throws IOException
|
||||
* @throws SQLException
|
||||
* @throws FileNotFoundException
|
||||
* @throws AuthorizeException
|
||||
* @throws CrosswalkException
|
||||
* @throws PackageException
|
||||
* @throws IOException if IO error
|
||||
* @throws SQLException if database error
|
||||
* @throws FileNotFoundException if file doesn't exist
|
||||
* @throws AuthorizeException if authorization error
|
||||
* @throws CrosswalkException if crosswalk error
|
||||
* @throws PackageException if packaging error
|
||||
*/
|
||||
protected void replace(Context context, PackageIngester sip, PackageParameters pkgParams, String sourceFile, DSpaceObject objToReplace)
|
||||
throws IOException, SQLException, FileNotFoundException, AuthorizeException, CrosswalkException, PackageException
|
||||
|
@@ -16,7 +16,7 @@ import java.sql.SQLException;
|
||||
/**
|
||||
* Database Access Object interface class for the RequestItem object.
|
||||
* The implementation of this class is responsible for all database calls for the RequestItem object and is autowired by spring
|
||||
* This class should only be accessed from a single service & should never be exposed outside of the API
|
||||
* This class should only be accessed from a single service and should never be exposed outside of the API
|
||||
*
|
||||
* @author kevinvandevelde at atmire.com
|
||||
*/
|
||||
|
@@ -26,7 +26,7 @@ public interface RequestItemService {
|
||||
* Generate a request item representing the request and put it into the DB
|
||||
* @param context
|
||||
* @return the token of the request item
|
||||
* @throws java.sql.SQLException
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
public String createRequest(Context context, Bitstream bitstream, Item item, boolean allFiles, String reqEmail, String reqName, String reqMessage)
|
||||
throws SQLException;
|
||||
|
@@ -140,7 +140,7 @@ public class SFXFileReaderServiceImpl implements SFXFileReaderService {
|
||||
* @param e DOM node of the mapping pair in the XML file (field element)
|
||||
* @param item The item to process, from which metadata values will be taken
|
||||
* @return assembled OpenURL query.
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
protected String processFields(Node e, Item item) throws IOException {
|
||||
NodeList cl = e.getChildNodes();
|
||||
|
@@ -36,7 +36,7 @@ public interface SFXFileReaderService {
|
||||
* @param item The item to process, from which metadata values will be taken
|
||||
*
|
||||
* @return the SFX string
|
||||
* @throws java.io.IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public String loadSFXFile(String fileName, Item item) throws IOException;
|
||||
|
||||
@@ -53,7 +53,7 @@ public interface SFXFileReaderService {
|
||||
* @param node DOM node of the mapping pair in the XML file (field element)
|
||||
* @param item The item to process, from which metadata values will be taken
|
||||
* @return processed fields.
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public String doNodes(Node node, Item item) throws IOException;
|
||||
|
||||
@@ -71,7 +71,7 @@ public interface SFXFileReaderService {
|
||||
public boolean isEmptyTextNode(Node nd);
|
||||
|
||||
/**
|
||||
* Returns the value of the node's attribute named <name>
|
||||
* Returns the value of the node's attribute named {@code <name>}
|
||||
*/
|
||||
public String getAttribute(Node e, String name);
|
||||
|
||||
|
@@ -74,7 +74,7 @@ public abstract class AbstractGenerator
|
||||
/**
|
||||
* Start writing a new sitemap file.
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
* if an error occurs creating the file
|
||||
*/
|
||||
protected void startNewFile() throws IOException
|
||||
@@ -102,7 +102,7 @@ public abstract class AbstractGenerator
|
||||
* Full URL to add
|
||||
* @param lastMod
|
||||
* Date URL was last modified, or {@code null}
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
* if an error occurs writing
|
||||
*/
|
||||
public void addURL(String url, Date lastMod) throws IOException
|
||||
@@ -130,7 +130,7 @@ public abstract class AbstractGenerator
|
||||
/**
|
||||
* Finish with the current sitemap file.
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
* if an error occurs writing
|
||||
*/
|
||||
protected void closeCurrentFile() throws IOException
|
||||
@@ -147,7 +147,7 @@ public abstract class AbstractGenerator
|
||||
*
|
||||
* @return number of sitemap files written.
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
* if an error occurs writing
|
||||
*/
|
||||
public int finish() throws IOException
|
||||
@@ -246,7 +246,7 @@ public abstract class AbstractGenerator
|
||||
* stream to write the index to
|
||||
* @param sitemapCount
|
||||
* number of sitemaps that were generated
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
* if an IO error occurs
|
||||
*/
|
||||
public abstract void writeIndex(PrintStream output, int sitemapCount)
|
||||
|
@@ -152,9 +152,9 @@ public class GenerateSitemaps
|
||||
* if {@code true}, generate an HTML sitemap.
|
||||
* @param makeSitemapOrg
|
||||
* if {@code true}, generate an sitemap.org sitemap.
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a database error occurs.
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
* if IO error occurs.
|
||||
*/
|
||||
public static void generateSitemaps(boolean makeHTMLMap,
|
||||
|
@@ -25,9 +25,9 @@ import org.dspace.core.ConfigurationManager;
|
||||
/**
|
||||
* This class allows the running of the DSpace statistic tools
|
||||
*
|
||||
* Usage: java CreateStatReport -r <statistic to run>
|
||||
* Available: <stat-initial> <stat-general> <stat-monthly> <stat-report-initial>
|
||||
* <stat-report-general> <stat-report-monthly>
|
||||
* Usage: {@code java CreateStatReport -r <statistic to run>}
|
||||
* Available: {@code <stat-initial> <stat-general> <stat-monthly> <stat-report-initial>
|
||||
* <stat-report-general> <stat-report-monthly>}
|
||||
*
|
||||
* @author Chris Yates
|
||||
*
|
||||
@@ -145,7 +145,7 @@ public class CreateStatReport {
|
||||
/**
|
||||
* This method generates a report from the first of the current month to the end of the current month.
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
private static void statMonthly() throws Exception {
|
||||
|
||||
@@ -184,7 +184,7 @@ public class CreateStatReport {
|
||||
/**
|
||||
* This method generates a full report based on the full log period
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
private static void statGeneral() throws Exception {
|
||||
|
||||
@@ -216,7 +216,7 @@ public class CreateStatReport {
|
||||
* This script starts from the year and month specified below and loops each month until the current month
|
||||
* generating a monthly aggregation files for the DStat system.
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
private static void statInitial() throws Exception {
|
||||
|
||||
@@ -265,7 +265,7 @@ public class CreateStatReport {
|
||||
/**
|
||||
* This method generates a full report based on the full log period
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
private static void statReportGeneral() throws Exception {
|
||||
|
||||
@@ -304,7 +304,7 @@ public class CreateStatReport {
|
||||
* This script starts from the year and month specified below and loops each month until the current month
|
||||
* generating monthly reports from the DStat aggregation files
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
private static void statReportInitial() throws Exception {
|
||||
|
||||
@@ -349,7 +349,7 @@ public class CreateStatReport {
|
||||
/**
|
||||
* This method generates a report from the aggregation files which have been run for the most recent month
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if error
|
||||
*/
|
||||
private static void statReportMonthly() throws Exception
|
||||
{
|
||||
|
@@ -334,7 +334,7 @@ public class HTMLReport implements Report
|
||||
|
||||
/**
|
||||
* output the report block based on the passed mapping, where the mapping
|
||||
* sould be "name of report element" => "value", where both sides of the
|
||||
* should be "name of report element" to "value", where both sides of the
|
||||
* mapping should be Strings. This class also assumes that the reference
|
||||
* is a linkable URL to the resource
|
||||
*
|
||||
|
@@ -43,10 +43,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param bitstream
|
||||
* the bitstream that the policy refer to
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current context (current user) is not allowed to
|
||||
* manage the bitstream's policies
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageBitstreamPolicy(Context context,
|
||||
@@ -64,10 +64,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param bundle
|
||||
* the bundle that the policy refer to
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current context (current user) is not allowed to
|
||||
* manage the bundle's policies
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageBundlePolicy(Context context,
|
||||
@@ -85,10 +85,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param item
|
||||
* the item that the policy refer to
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current context (current user) is not allowed to
|
||||
* manage the item's policies
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageItemPolicy(Context context, Item item)
|
||||
@@ -124,10 +124,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param collection
|
||||
* the collection that the policy refer to
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current context (current user) is not allowed to
|
||||
* manage the collection's policies
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageCollectionPolicy(Context context,
|
||||
@@ -159,10 +159,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param community
|
||||
* the community that the policy refer to
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current context (current user) is not allowed to
|
||||
* manage the community's policies
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageCommunityPolicy(Context context,
|
||||
@@ -185,9 +185,9 @@ public class AuthorizeUtil
|
||||
*
|
||||
* @param context
|
||||
* the DSpace Context Object
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not a System Admin
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void requireAdminRole(Context context)
|
||||
@@ -208,10 +208,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param item
|
||||
* the item that the CC License refer to
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to
|
||||
* manage the item's CC License
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageCCLicense(Context context, Item item)
|
||||
@@ -254,10 +254,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param collection
|
||||
* the collection
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to manage the collection's
|
||||
* template item
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageTemplateItem(Context context,
|
||||
@@ -296,10 +296,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param collection
|
||||
* the collection
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to manage the collection's
|
||||
* submitters group
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageSubmittersGroup(Context context,
|
||||
@@ -331,10 +331,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param collection
|
||||
* the collection
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to manage the collection's
|
||||
* workflow groups
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageWorkflowsGroup(Context context,
|
||||
@@ -368,10 +368,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param collection
|
||||
* the collection
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to create/edit the
|
||||
* collection's admins group
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageAdminGroup(Context context,
|
||||
@@ -405,10 +405,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param collection
|
||||
* the collection
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to remove the
|
||||
* collection's admins group
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeRemoveAdminGroup(Context context,
|
||||
@@ -439,10 +439,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param community
|
||||
* the community
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to create/edit the
|
||||
* community's admins group
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManageAdminGroup(Context context,
|
||||
@@ -470,10 +470,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param community
|
||||
* the community
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to remove the
|
||||
* collection's admins group
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeRemoveAdminGroup(Context context,
|
||||
@@ -505,10 +505,10 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param rp
|
||||
* a resource policy
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current context (current user) is not allowed to
|
||||
* remove/edit the policy
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
*/
|
||||
public static void authorizeManagePolicy(Context c, ResourcePolicy rp)
|
||||
@@ -546,9 +546,9 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param item
|
||||
* the item
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to perform the item
|
||||
* withdraw
|
||||
*/
|
||||
@@ -589,9 +589,9 @@ public class AuthorizeUtil
|
||||
* the DSpace Context Object
|
||||
* @param item
|
||||
* the item
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if a db error occur
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not allowed to perform the item
|
||||
* reinstatement
|
||||
*/
|
||||
|
@@ -415,12 +415,12 @@ public class DCInput
|
||||
* The closed attribute of the vocabulary tag for this field as set in
|
||||
* input-forms.xml
|
||||
*
|
||||
* <code>
|
||||
* {@code
|
||||
* <field>
|
||||
* .....
|
||||
* <vocabulary closed="true">nsrc</vocabulary>
|
||||
* </field>
|
||||
* </code>
|
||||
* }
|
||||
* @return the closedVocabulary flags: true if the entry should be restricted
|
||||
* only to vocabulary terms, false otherwise
|
||||
*/
|
||||
|
@@ -235,7 +235,7 @@ public class DailyFileAppender extends FileAppender
|
||||
/**
|
||||
* This function is responsible for performing the actual file rollover.
|
||||
* @param pstrName The name of the new folder based on current system date.
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
private static boolean deletingFiles = false;
|
||||
private void cleanupOldFiles()
|
||||
|
@@ -31,10 +31,8 @@ import java.io.File;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import org.dspace.core.Constants;
|
||||
import org.dspace.core.Context;
|
||||
|
||||
@@ -330,7 +328,7 @@ public class GoogleMetadata
|
||||
*
|
||||
* @param configFilter
|
||||
* @param returnType
|
||||
* @return Array of configuration -> item-field matches
|
||||
* @return Array of configuration to item-field matches
|
||||
*/
|
||||
protected ArrayList<MetadataValue> resolveMetadata(String configFilter,
|
||||
int returnType)
|
||||
@@ -658,7 +656,7 @@ public class GoogleMetadata
|
||||
/**
|
||||
* Using metadata field mappings contained in the loaded configuration,
|
||||
* parse through configured metadata fields, building valid Google metadata
|
||||
* value strings. Field names & values contained in metadataMappings.
|
||||
* value strings. Field names and values contained in metadataMappings.
|
||||
*
|
||||
*/
|
||||
protected void parseItem()
|
||||
@@ -769,8 +767,8 @@ public class GoogleMetadata
|
||||
* Fetch retaining the order of the values for any given key in which they
|
||||
* where added (like authors).
|
||||
*
|
||||
* Usage: GoogleMetadata gmd = new GoogleMetadata(item); for(Entry<String,
|
||||
* String> mapping : googlemd.getMappings()) { ... }
|
||||
* Usage: {@code GoogleMetadata gmd = new GoogleMetadata(item); for(Entry<String,
|
||||
* String> mapping : googlemd.getMappings()) ...}
|
||||
*
|
||||
* @return Iterable of metadata fields mapped to Google-formatted values
|
||||
*/
|
||||
@@ -1047,7 +1045,7 @@ public class GoogleMetadata
|
||||
* Additionally, this bitstream must be publicly viewable.
|
||||
* @param item
|
||||
* @return
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
protected Bitstream findLinkableFulltext(Item item) throws SQLException {
|
||||
Bitstream bestSoFar = null;
|
||||
@@ -1089,9 +1087,9 @@ public class GoogleMetadata
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param FIELD
|
||||
* @param field
|
||||
* to aggregate all values of in a matching option
|
||||
* @param delim
|
||||
* @param delimiter
|
||||
* to delimit field values with
|
||||
*/
|
||||
protected void addAggregateValues(String field, String delimiter)
|
||||
|
@@ -21,10 +21,10 @@ import org.apache.lucene.util.Version;
|
||||
* so that they can be upgraded to the latest version.
|
||||
* <p>
|
||||
* You must pass it the full path of the index directory, e.g.
|
||||
* [dspace]/solr/statistics/data/index/
|
||||
* {@code [dspace]/solr/statistics/data/index/}
|
||||
* <p>
|
||||
* The response is simply a version number (e.g. 4.4), as this is utilized by
|
||||
* the "ant update_solr_indexes" target in [src]/dspace/src/main/config/build.xml
|
||||
* the {@code ant update_solr_indexes} target in {@code [src]/dspace/src/main/config/build.xml}
|
||||
*
|
||||
* @author tdonohue
|
||||
*/
|
||||
@@ -106,7 +106,7 @@ public class IndexVersion
|
||||
* Full path of the Solr/Lucene index directory
|
||||
* @return version as a string (e.g. "4.4"), empty string ("") if index directory is empty,
|
||||
* or null if directory doesn't exist.
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public static String getIndexVersion(String indexDirPath)
|
||||
throws IOException
|
||||
@@ -218,14 +218,14 @@ public class IndexVersion
|
||||
* <P>
|
||||
* NOTE: In case it is not obvious, software version numbering does NOT
|
||||
* behave like normal decimal numbers. For example, in software versions
|
||||
* the following statement is TRUE: 4.1 < 4.4 < 4.5 < 4.10 < 4.21 < 4.51
|
||||
* the following statement is TRUE: {@code 4.1 < 4.4 < 4.5 < 4.10 < 4.21 < 4.51}
|
||||
*
|
||||
* @param firstVersion
|
||||
* First version to compare, as a String
|
||||
* @param secondVersion
|
||||
* Second version to compare as a String
|
||||
* @return -1 if first < second, 1 if first > second, 0 if equal
|
||||
* @throws IOException
|
||||
* @return -1 if first less than second, 1 if first greater than second, 0 if equal
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public static int compareSoftwareVersions(String firstVersion, String secondVersion)
|
||||
throws IOException
|
||||
|
@@ -283,7 +283,7 @@ public class OpenSearchServiceImpl implements OpenSearchService, InitializingBea
|
||||
* Converts a JDOM document to a W3C one
|
||||
* @param jdomDoc
|
||||
* @return W3C Document object
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
protected Document jDomToW3(org.jdom.Document jdomDoc) throws IOException
|
||||
{
|
||||
|
@@ -206,7 +206,7 @@ public class SubmissionConfigReader
|
||||
/**
|
||||
* Returns a particular global step definition based on its ID.
|
||||
* <P>
|
||||
* Global step definitions are those defined in the <step-definitions>
|
||||
* Global step definitions are those defined in the {@code <step-definitions>}
|
||||
* section of the configuration file.
|
||||
*
|
||||
* @param stepID
|
||||
|
@@ -213,7 +213,7 @@ public class SubmissionInfo extends HashMap
|
||||
/**
|
||||
* Returns a particular global step definition based on its ID.
|
||||
* <P>
|
||||
* Global step definitions are those defined in the <step-definitions>
|
||||
* Global step definitions are those defined in the {@code <step-definitions>}
|
||||
* section of the configuration file.
|
||||
*
|
||||
* @param stepID
|
||||
|
@@ -100,8 +100,8 @@ public class SubmissionStepConfig implements Serializable
|
||||
|
||||
/**
|
||||
* Get the ID for this step. An ID is only defined if the step exists in the
|
||||
* <step-definitions> section. This ID field is used to reference special
|
||||
* steps (like the required step with id="collection")
|
||||
* {@code <step-definitions>} section. This ID field is used to reference special
|
||||
* steps (like the required step with {@code id="collection"})
|
||||
*
|
||||
* @return the step ID
|
||||
*/
|
||||
|
@@ -523,17 +523,17 @@ public class SyndicationFeed
|
||||
logo.getID()+"/"+(name == null?"":name);
|
||||
}
|
||||
|
||||
protected String baseURL = null; // cache the result for null
|
||||
/**
|
||||
* Return a url to the DSpace object, either use the official
|
||||
* handle for the item or build a url based upon the current server.
|
||||
*
|
||||
* If the dspaceobject is null then a local url to the repository is generated.
|
||||
*
|
||||
* @param request current servlet request
|
||||
* @param dso The object to reference, null if to the repository.
|
||||
* @return
|
||||
*/
|
||||
protected String baseURL = null; // cache the result for null
|
||||
|
||||
protected String resolveURL(HttpServletRequest request, DSpaceObject dso)
|
||||
{
|
||||
// If no object given then just link to the whole repository,
|
||||
|
@@ -25,9 +25,9 @@ public class XMLUtils
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param rootElement
|
||||
* @param dataRoot
|
||||
* the starting node
|
||||
* @param subElementName
|
||||
* @param name
|
||||
* the name of the subelement to find
|
||||
* @return the list of all DOM Element with the provided name direct child
|
||||
* of the starting node
|
||||
|
@@ -13,7 +13,7 @@ import org.dspace.core.GenericDAO;
|
||||
/**
|
||||
* Database Access Object interface class for the WebApp object.
|
||||
* The implementation of this class is responsible for all database calls for the WebApp object and is autowired by spring
|
||||
* This class should only be accessed from a single service & should never be exposed outside of the API
|
||||
* This class should only be accessed from a single service and should never be exposed outside of the API
|
||||
*
|
||||
* @author kevinvandevelde at atmire.com
|
||||
*/
|
||||
|
@@ -58,7 +58,7 @@ public interface MetadataExposureService {
|
||||
* @param qualifier metadata field qualifier
|
||||
*
|
||||
* @return true (hidden) or false (exposed)
|
||||
* @throws java.sql.SQLException
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
public boolean isHidden(Context context, String schema, String element, String qualifier)
|
||||
throws SQLException;
|
||||
|
@@ -55,7 +55,7 @@ public interface OpenSearchService {
|
||||
*
|
||||
* @param scope - null for entire repository, or handle or community or collection
|
||||
* @return document the service document
|
||||
* @throws java.io.IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public Document getDescriptionDoc(String scope) throws IOException;
|
||||
|
||||
@@ -71,6 +71,7 @@ public interface OpenSearchService {
|
||||
/**
|
||||
* Returns a formatted set of search results as a string
|
||||
*
|
||||
* @param context DSpace Context
|
||||
* @param format results format - html, rss or atom
|
||||
* @param query - the search query
|
||||
* @param totalResults - the hit count
|
||||
@@ -80,7 +81,7 @@ public interface OpenSearchService {
|
||||
* @param results the retreived DSpace objects satisfying search
|
||||
* @param labels labels to apply - format specific
|
||||
* @return formatted search results
|
||||
* @throws java.io.IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public String getResultsString(Context context, String format, String query, int totalResults, int start, int pageSize,
|
||||
DSpaceObject scope, DSpaceObject[] results,
|
||||
@@ -88,6 +89,7 @@ public interface OpenSearchService {
|
||||
/**
|
||||
* Returns a formatted set of search results as a document
|
||||
*
|
||||
* @param context DSpace Context
|
||||
* @param format results format - html, rss or atom
|
||||
* @param query - the search query
|
||||
* @param totalResults - the hit count
|
||||
@@ -97,7 +99,7 @@ public interface OpenSearchService {
|
||||
* @param results the retreived DSpace objects satisfying search
|
||||
* @param labels labels to apply - format specific
|
||||
* @return formatted search results
|
||||
* @throws IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public Document getResultsDoc(Context context, String format, String query, int totalResults, int start, int pageSize,
|
||||
DSpaceObject scope, DSpaceObject[] results, Map<String, String> labels)
|
||||
|
@@ -266,7 +266,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
||||
*
|
||||
* The values extracted (a user may have multiple roles) will be used to look
|
||||
* up which groups to place the user into. The groups are defined as
|
||||
* "authentication.shib.role.<role-name>" which is a comma separated list of
|
||||
* {@code authentication.shib.role.<role-name>} which is a comma separated list of
|
||||
* DSpace groups.
|
||||
*
|
||||
* @param context
|
||||
|
@@ -107,7 +107,7 @@ public class AuthoritySolrServiceImpl implements AuthorityIndexingService, Autho
|
||||
/**
|
||||
* Write the document to the solr index
|
||||
* @param doc the solr document
|
||||
* @throws java.io.IOException
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
protected void writeDocument(SolrInputDocument doc) throws IOException {
|
||||
|
||||
|
@@ -26,15 +26,14 @@ import java.util.*;
|
||||
|
||||
/**
|
||||
* DSpaceAuthorityIndexer is used in IndexClient, which is called by the AuthorityConsumer and the indexing-script.
|
||||
* <p/>
|
||||
* <p>
|
||||
* An instance of DSpaceAuthorityIndexer is bound to a list of items.
|
||||
* This can be one item or all items too depending on the init() method.
|
||||
* <p/>
|
||||
* <p>
|
||||
* DSpaceAuthorityIndexer lets you iterate over each metadata value
|
||||
* for each metadata field defined in dspace.cfg with 'authority.author.indexer.field'
|
||||
* for each item in the list.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>
|
||||
*
|
||||
* @author Antoine Snyers (antoine at atmire.com)
|
||||
* @author Kevin Van de Velde (kevin at atmire dot com)
|
||||
|
@@ -26,12 +26,6 @@ public abstract class RestSource {
|
||||
this.restConnector = new RESTConnector(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* com.atmire.org.dspace.authority.rest.RestSource#queryAuthorities -> add field, so the source can decide whether to query /users or something else.
|
||||
* -> implement subclasses
|
||||
* -> implement usages
|
||||
*/
|
||||
public abstract List<AuthorityValue> queryAuthorities(String text, int max);
|
||||
|
||||
public abstract AuthorityValue queryAuthorityID(String id);
|
||||
|
@@ -228,7 +228,7 @@ public class AuthorizeServiceImpl implements AuthorizeService
|
||||
* object can be used
|
||||
* @return <code>true</code> if user is authorized to perform the given
|
||||
* action, <code>false</code> otherwise
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
protected boolean authorize(Context c, DSpaceObject o, int action, EPerson e, boolean useInheritance) throws SQLException
|
||||
{
|
||||
@@ -623,8 +623,8 @@ public class AuthorizeServiceImpl implements AuthorizeService
|
||||
* @param reason
|
||||
* @param dso
|
||||
* @param owningCollection
|
||||
* @throws SQLException
|
||||
* @throws AuthorizeException
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
@Override
|
||||
public void generateAutomaticPolicies(Context context, Date embargoDate,
|
||||
|
@@ -111,9 +111,9 @@ public class PolicySet
|
||||
* @param clearOnly
|
||||
* if <code>true</code>, just delete policies for matching
|
||||
* objects
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if database problem
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if current user is not authorized to change these policies
|
||||
*/
|
||||
public static void setPolicies(Context c, int containerType,
|
||||
@@ -139,8 +139,8 @@ public class PolicySet
|
||||
* @param description
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @throws SQLException
|
||||
* @throws AuthorizeException
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
public static void setPolicies(Context c, int containerType,
|
||||
UUID containerID, int contentType, int actionID, UUID groupID,
|
||||
@@ -175,9 +175,9 @@ public class PolicySet
|
||||
* objects
|
||||
* @param filter
|
||||
* if non-null, only process bitstreams whose names contain filter
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if database problem
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if current user is not authorized to change these policies
|
||||
*/
|
||||
public static void setPoliciesFilter(Context c, int containerType,
|
||||
@@ -215,9 +215,9 @@ public class PolicySet
|
||||
* @param description
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if database problem
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if current user is not authorized to change these policies
|
||||
*/
|
||||
public static void setPoliciesFilter(Context c, int containerType,
|
||||
|
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
/**
|
||||
* Database Access Object interface class for the ResourcePolicy object.
|
||||
* The implementation of this class is responsible for all database calls for the ResourcePolicy object and is autowired by spring
|
||||
* This class should only be accessed from a single service & should never be exposed outside of the API
|
||||
* This class should only be accessed from a single service and should never be exposed outside of the API
|
||||
*
|
||||
* @author kevinvandevelde at atmire.com
|
||||
*/
|
||||
|
@@ -48,7 +48,7 @@ public interface AuthorizeService {
|
||||
* @param actions
|
||||
* array of action IDs from
|
||||
* <code>org.dspace.core.Constants</code>
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if any one of the specified actions cannot be performed by
|
||||
* the current user on the given object.
|
||||
*/
|
||||
@@ -65,7 +65,7 @@ public interface AuthorizeService {
|
||||
* a DSpaceObject
|
||||
* @param action
|
||||
* action to perform from <code>org.dspace.core.Constants</code>
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the user is denied
|
||||
*/
|
||||
public void authorizeAction(Context c, DSpaceObject o, int action) throws AuthorizeException, SQLException;
|
||||
@@ -84,7 +84,7 @@ public interface AuthorizeService {
|
||||
* object can be used
|
||||
* @param action
|
||||
* action to perform from <code>org.dspace.core.Constants</code>
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the user is denied
|
||||
*/
|
||||
public void authorizeAction(Context c, DSpaceObject o, int action, boolean useInheritance)
|
||||
@@ -106,7 +106,7 @@ public interface AuthorizeService {
|
||||
* object can be used
|
||||
* @param action
|
||||
* action to perform from <code>org.dspace.core.Constants</code>
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the user is denied
|
||||
*/
|
||||
public void authorizeAction(Context c, EPerson e, DSpaceObject o, int action, boolean useInheritance)
|
||||
@@ -216,7 +216,7 @@ public interface AuthorizeService {
|
||||
* ID of action from <code>org.dspace.core.Constants</code>
|
||||
* @param e
|
||||
* eperson who can perform the action
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if current user in context is not authorized to add policies
|
||||
*/
|
||||
public void addPolicy(Context c, DSpaceObject o, int actionID, EPerson e) throws SQLException, AuthorizeException;
|
||||
@@ -235,7 +235,7 @@ public interface AuthorizeService {
|
||||
* eperson who can perform the action
|
||||
* @param type
|
||||
* policy type, deafult types are declared in the ResourcePolicy class
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if current user in context is not authorized to add policies
|
||||
*/
|
||||
public void addPolicy(Context c, DSpaceObject o, int actionID, EPerson e, String type) throws SQLException, AuthorizeException;
|
||||
@@ -251,9 +251,9 @@ public interface AuthorizeService {
|
||||
* ID of action from <code>org.dspace.core.Constants</code>
|
||||
* @param g
|
||||
* group to add policy for
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not authorized to add this policy
|
||||
*/
|
||||
public void addPolicy(Context c, DSpaceObject o, int actionID, Group g) throws SQLException, AuthorizeException;
|
||||
@@ -271,9 +271,9 @@ public interface AuthorizeService {
|
||||
* group to add policy for
|
||||
* @param type
|
||||
* policy type, deafult types are declared in the ResourcePolicy class
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not authorized to add this policy
|
||||
*/
|
||||
public void addPolicy(Context c, DSpaceObject o, int actionID, Group g, String type) throws SQLException, AuthorizeException;
|
||||
@@ -320,7 +320,7 @@ public interface AuthorizeService {
|
||||
* DSpaceObject policies relate to
|
||||
* @param actionID
|
||||
* action (defined in class Constants)
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public List<ResourcePolicy> getPoliciesActionFilter(Context c, DSpaceObject o, int actionID) throws SQLException;
|
||||
@@ -334,9 +334,9 @@ public interface AuthorizeService {
|
||||
* source of policies
|
||||
* @param dest
|
||||
* destination of inherited policies
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not authorized to add these policies
|
||||
*/
|
||||
public void inheritPolicies(Context c, DSpaceObject src, DSpaceObject dest) throws SQLException, AuthorizeException;
|
||||
@@ -350,9 +350,9 @@ public interface AuthorizeService {
|
||||
* List of ResourcePolicy objects
|
||||
* @param dest
|
||||
* object to have policies added
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
* @throws AuthorizeException
|
||||
* @throws AuthorizeException if authorization error
|
||||
* if the current user is not authorized to add these policies
|
||||
*/
|
||||
public void addPolicies(Context c, List<ResourcePolicy> policies, DSpaceObject dest) throws SQLException, AuthorizeException;
|
||||
@@ -364,7 +364,7 @@ public interface AuthorizeService {
|
||||
* DSpace context
|
||||
* @param o
|
||||
* object to remove policies for
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public void removeAllPolicies(Context c, DSpaceObject o) throws SQLException, AuthorizeException;
|
||||
@@ -378,7 +378,7 @@ public interface AuthorizeService {
|
||||
* DSpace context
|
||||
* @param o
|
||||
* object to remove policies for
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public void removeAllPoliciesByDSOAndTypeNotEqualsTo(Context c, DSpaceObject o, String type) throws SQLException, AuthorizeException;
|
||||
@@ -392,7 +392,7 @@ public interface AuthorizeService {
|
||||
* object to remove policies for
|
||||
* @param type
|
||||
* policy type
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public void removeAllPoliciesByDSOAndType(Context c, DSpaceObject o, String type) throws SQLException, AuthorizeException;
|
||||
@@ -408,7 +408,7 @@ public interface AuthorizeService {
|
||||
* @param actionID
|
||||
* ID of action to match from
|
||||
* <code>org.dspace.core.Constants</code>, or -1=all
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public void removePoliciesActionFilter(Context context, DSpaceObject dso, int actionID) throws SQLException, AuthorizeException;
|
||||
@@ -421,7 +421,7 @@ public interface AuthorizeService {
|
||||
* current context
|
||||
* @param group
|
||||
* the group
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public void removeGroupPolicies(Context c, Group group) throws SQLException;
|
||||
@@ -436,7 +436,7 @@ public interface AuthorizeService {
|
||||
* the object
|
||||
* @param g
|
||||
* the group
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public void removeGroupPolicies(Context c, DSpaceObject o, Group g) throws SQLException, AuthorizeException;
|
||||
@@ -451,7 +451,7 @@ public interface AuthorizeService {
|
||||
* the object
|
||||
* @param e
|
||||
* the eperson
|
||||
* @throws java.sql.SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public void removeEPersonPolicies(Context c, DSpaceObject o, EPerson e) throws SQLException, AuthorizeException;
|
||||
@@ -468,7 +468,7 @@ public interface AuthorizeService {
|
||||
* ID of action from <code>org.dspace.core.Constants</code>
|
||||
* @return array of <code>Group</code>s that can perform the specified
|
||||
* action on the specified object
|
||||
* @throws java.sql.SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public List<Group> getAuthorizedGroups(Context c, DSpaceObject o, int actionID) throws java.sql.SQLException;
|
||||
@@ -488,7 +488,7 @@ public interface AuthorizeService {
|
||||
* @param policyID
|
||||
* ID of an existing policy. If -1 is specified, this parameter will be ignored
|
||||
* @return true if such a policy exists, false otherwise
|
||||
* @throws java.sql.SQLException
|
||||
* @throws SQLException if database error
|
||||
* if there's a database problem
|
||||
*/
|
||||
public boolean isAnIdenticalPolicyAlreadyInPlace(Context c, DSpaceObject o, Group group, int actionID, int policyID) throws SQLException;
|
||||
@@ -505,8 +505,8 @@ public interface AuthorizeService {
|
||||
* @param reason
|
||||
* @param dso
|
||||
* @param owningCollection
|
||||
* @throws SQLException
|
||||
* @throws AuthorizeException
|
||||
* @throws SQLException if database error
|
||||
* @throws AuthorizeException if authorization error
|
||||
*/
|
||||
public void generateAutomaticPolicies(Context context, Date embargoDate, String reason, DSpaceObject dso, Collection owningCollection) throws SQLException, AuthorizeException;
|
||||
|
||||
|
@@ -44,7 +44,7 @@ public interface BrowseDAO
|
||||
* parameters you set.
|
||||
*
|
||||
* @return the integer value of the number of results found
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public int doCountQuery() throws BrowseException;
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface BrowseDAO
|
||||
* commonly used with a Distinct browse type.
|
||||
*
|
||||
* @return List of Strings representing the single value query results
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public List<String[]> doValueQuery() throws BrowseException;
|
||||
|
||||
@@ -64,7 +64,7 @@ public interface BrowseDAO
|
||||
* representing the results of a full item browse.
|
||||
*
|
||||
* @return List of BrowseItem objects
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public List<Item> doQuery() throws BrowseException;
|
||||
|
||||
@@ -76,7 +76,7 @@ public interface BrowseDAO
|
||||
* @param table the table to query
|
||||
* @param itemID the item id
|
||||
* @return String representing the max value in the given column
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public String doMaxQuery(String column, String table, int itemID) throws BrowseException;
|
||||
|
||||
@@ -88,7 +88,7 @@ public interface BrowseDAO
|
||||
* @param value the item id
|
||||
* @param isAscending browsing in ascending or descending order
|
||||
* @return the offset into the table
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public int doOffsetQuery(String column, String value, boolean isAscending) throws BrowseException;
|
||||
|
||||
@@ -100,7 +100,7 @@ public interface BrowseDAO
|
||||
* @param value the item id
|
||||
* @param isAscending browsing in ascending or descending order
|
||||
* @return the offset into the table
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public int doDistinctOffsetQuery(String column, String value, boolean isAscending) throws BrowseException;
|
||||
|
||||
@@ -117,8 +117,8 @@ public interface BrowseDAO
|
||||
/**
|
||||
* Set whether the query should use an equals comparator when doing less than or
|
||||
* greater than comparisons. That is, if true then comparisons will be made
|
||||
* using the equivalent of "<=" and ">=", while if false it will use the
|
||||
* equivalent of "<" and ">"
|
||||
* using the equivalent of {@code <=} and {@code >=}, while if false it will use the
|
||||
* equivalent of {@code <} and {@code >}
|
||||
*
|
||||
* @param equalsComparator true to use, false to not.
|
||||
*/
|
||||
@@ -189,7 +189,7 @@ public interface BrowseDAO
|
||||
* the browse. This will either be the "sort_value" field or one of the
|
||||
* additional sort fields defined by configuration
|
||||
*
|
||||
* param focusField the name of the focus field
|
||||
* @param focusField the name of the focus field
|
||||
*/
|
||||
public void setJumpToField(String focusField);
|
||||
|
||||
|
@@ -24,7 +24,7 @@ public class BrowseDAOFactory
|
||||
*
|
||||
* @param context the DSpace context
|
||||
* @return the relevant DAO
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public static BrowseDAO getInstance(Context context)
|
||||
throws BrowseException
|
||||
|
@@ -53,7 +53,7 @@ public class BrowseEngine
|
||||
* for the Browse Engine, based on the brand of the provided DBMS.
|
||||
*
|
||||
* @param context the DSpace context
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public BrowseEngine(Context context)
|
||||
throws BrowseException
|
||||
@@ -73,7 +73,7 @@ public class BrowseEngine
|
||||
*
|
||||
* @param bs the scope of the browse
|
||||
* @return the results of the browse
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public BrowseInfo browse(BrowserScope bs)
|
||||
throws BrowseException
|
||||
@@ -111,6 +111,7 @@ public class BrowseEngine
|
||||
*
|
||||
* @param bs the scope of the browse
|
||||
* @return the results of the browse
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public BrowseInfo browseMini(BrowserScope bs)
|
||||
throws BrowseException
|
||||
@@ -196,7 +197,7 @@ public class BrowseEngine
|
||||
*
|
||||
* @param bs the scope of the browse
|
||||
* @return the results of the browse
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private BrowseInfo browseByItem(BrowserScope bs)
|
||||
throws BrowseException
|
||||
@@ -395,7 +396,7 @@ public class BrowseEngine
|
||||
*
|
||||
* @param bs the scope of the browse
|
||||
* @return the results of the browse
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private BrowseInfo browseByValue(BrowserScope bs)
|
||||
throws BrowseException
|
||||
@@ -562,7 +563,7 @@ public class BrowseEngine
|
||||
* Return the focus value.
|
||||
*
|
||||
* @return the focus value to use
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private String getJumpToValue()
|
||||
throws BrowseException
|
||||
@@ -627,8 +628,9 @@ public class BrowseEngine
|
||||
/**
|
||||
* Convert the value into an offset into the table for this browse
|
||||
*
|
||||
* @param value value
|
||||
* @return the focus value to use
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private int getOffsetForValue(String value)
|
||||
throws BrowseException
|
||||
@@ -662,8 +664,9 @@ public class BrowseEngine
|
||||
/**
|
||||
* Convert the value into an offset into the table for this browse
|
||||
*
|
||||
* @param value value
|
||||
* @return the focus value to use
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private int getOffsetForDistinctValue(String value)
|
||||
throws BrowseException
|
||||
@@ -685,7 +688,7 @@ public class BrowseEngine
|
||||
*
|
||||
* @param value a focus value to normalize
|
||||
* @return the normalized focus value
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private String normalizeJumpToValue(String value)
|
||||
throws BrowseException
|
||||
@@ -712,9 +715,9 @@ public class BrowseEngine
|
||||
* Get the total number of results for the browse. This is the same as
|
||||
* calling getTotalResults(false)
|
||||
*
|
||||
* @return
|
||||
* @throws SQLException
|
||||
* @throws BrowseException
|
||||
* @return total
|
||||
* @throws SQLException if database error
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private int getTotalResults()
|
||||
throws SQLException, BrowseException
|
||||
@@ -728,8 +731,8 @@ public class BrowseEngine
|
||||
*
|
||||
* @param distinct is this a distinct browse or not
|
||||
* @return the total number of results available in this type of browse
|
||||
* @throws SQLException
|
||||
* @throws BrowseException
|
||||
* @throws SQLException if database error
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private int getTotalResults(boolean distinct)
|
||||
throws SQLException, BrowseException
|
||||
|
@@ -12,7 +12,6 @@ import java.util.ArrayList;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.sort.SortOption;
|
||||
@@ -123,7 +122,7 @@ public final class BrowseIndex
|
||||
*
|
||||
* @param definition the configuration definition of this index
|
||||
* @param number the configuration number of this index
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
private BrowseIndex(String definition, int number)
|
||||
throws BrowseException
|
||||
@@ -295,6 +294,7 @@ public final class BrowseIndex
|
||||
}
|
||||
|
||||
/**
|
||||
* @param idx index
|
||||
* @return Returns the mdBits.
|
||||
*/
|
||||
public String[] getMdBits(int idx)
|
||||
@@ -315,6 +315,11 @@ public final class BrowseIndex
|
||||
return metadataAll;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param idx index
|
||||
* @return metadata
|
||||
*/
|
||||
public String getMetadata(int idx)
|
||||
{
|
||||
return metadata[idx];
|
||||
@@ -338,12 +343,17 @@ public final class BrowseIndex
|
||||
|
||||
/**
|
||||
* Get the SortOption associated with this index.
|
||||
* @return SortOption
|
||||
*/
|
||||
public SortOption getSortOption()
|
||||
{
|
||||
return sortOption;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isDisplayFrequencies() {
|
||||
return displayFrequencies;
|
||||
}
|
||||
@@ -445,12 +455,12 @@ public final class BrowseIndex
|
||||
|
||||
/**
|
||||
* Generate a table name from the given base
|
||||
* @param baseName
|
||||
* @param isCommunity
|
||||
* @param isCollection
|
||||
* @param isDistinct
|
||||
* @param isMap
|
||||
* @return
|
||||
* @param baseName base name
|
||||
* @param isCommunity whether this is a community constrained index (view)
|
||||
* @param isCollection whether this is a collection constrained index (view)
|
||||
* @param isDistinct whether this is a distinct table
|
||||
* @param isMap whether this is a distinct map table
|
||||
* @return table name
|
||||
*/
|
||||
private static String getTableName(String baseName, boolean isCommunity, boolean isCollection, boolean isDistinct, boolean isMap)
|
||||
{
|
||||
@@ -523,6 +533,8 @@ public final class BrowseIndex
|
||||
* <code>
|
||||
* getTableName(false, false, false, false);
|
||||
* </code>
|
||||
*
|
||||
* @return table name
|
||||
*/
|
||||
public String getTableName()
|
||||
{
|
||||
@@ -538,10 +550,11 @@ public final class BrowseIndex
|
||||
* getTableName(isCommunity, isCollection, isDistinct, false);
|
||||
* </code>
|
||||
*
|
||||
* @param isDistinct is this a distinct table
|
||||
* @param isCommunity
|
||||
* @param isCollection
|
||||
* @param isCommunity whether this is a community constrained index (view)
|
||||
* @param isCollection whether this is a collection constrained index (view)
|
||||
* @param isDistinct whether this is a distinct table
|
||||
* @deprecated 1.5
|
||||
* @return table name
|
||||
*/
|
||||
public String getTableName(boolean isDistinct, boolean isCommunity, boolean isCollection)
|
||||
{
|
||||
@@ -554,6 +567,7 @@ public final class BrowseIndex
|
||||
* <code>
|
||||
* getTableName(false, false, false, true);
|
||||
* </code>
|
||||
* @return table name
|
||||
*/
|
||||
public String getMapTableName()
|
||||
{
|
||||
@@ -566,6 +580,7 @@ public final class BrowseIndex
|
||||
* <code>
|
||||
* getTableName(false, false, true, false);
|
||||
* </code>
|
||||
* @return table name
|
||||
*/
|
||||
public String getDistinctTableName()
|
||||
{
|
||||
@@ -661,7 +676,9 @@ public final class BrowseIndex
|
||||
|
||||
/**
|
||||
* Get the field for sorting associated with this index.
|
||||
* @throws BrowseException
|
||||
* @param isSecondLevel whether second level browse
|
||||
* @return sort field
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public String getSortField(boolean isSecondLevel) throws BrowseException
|
||||
{
|
||||
@@ -686,8 +703,9 @@ public final class BrowseIndex
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array of tables
|
||||
* @deprecated
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public static String[] tables()
|
||||
throws BrowseException
|
||||
@@ -706,7 +724,7 @@ public final class BrowseIndex
|
||||
* Get an array of all the browse indices for the current configuration
|
||||
*
|
||||
* @return an array of all the current browse indices
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public static BrowseIndex[] getBrowseIndices()
|
||||
throws BrowseException
|
||||
@@ -738,7 +756,7 @@ public final class BrowseIndex
|
||||
*
|
||||
* @param name the name to retrieve
|
||||
* @return the specified browse index
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public static BrowseIndex getBrowseIndex(String name)
|
||||
throws BrowseException
|
||||
@@ -757,8 +775,9 @@ public final class BrowseIndex
|
||||
/**
|
||||
* Get the configured browse index that is defined to use this sort option.
|
||||
*
|
||||
* @param so
|
||||
* @throws BrowseException
|
||||
* @param so sort option
|
||||
* @return browse index
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public static BrowseIndex getBrowseIndex(SortOption so) throws BrowseException
|
||||
{
|
||||
@@ -775,6 +794,7 @@ public final class BrowseIndex
|
||||
|
||||
/**
|
||||
* Get the internally defined browse index for archived items.
|
||||
* @return browse index
|
||||
*/
|
||||
public static BrowseIndex getItemBrowseIndex()
|
||||
{
|
||||
@@ -783,13 +803,16 @@ public final class BrowseIndex
|
||||
|
||||
/**
|
||||
* Get the internally defined browse index for withdrawn items.
|
||||
* @return browse index
|
||||
*/
|
||||
public static BrowseIndex getWithdrawnBrowseIndex()
|
||||
{
|
||||
return BrowseIndex.withdrawnIndex;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return browse index
|
||||
*/
|
||||
public static BrowseIndex getPrivateBrowseIndex()
|
||||
{
|
||||
return BrowseIndex.privateIndex;
|
||||
@@ -804,6 +827,7 @@ public final class BrowseIndex
|
||||
* @param mfield the string representation of the metadata
|
||||
* @param init the default value of the array elements
|
||||
* @return a three element array with schema, element and qualifier respectively
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public String[] interpretField(String mfield, String init)
|
||||
throws IOException
|
||||
@@ -829,6 +853,7 @@ public final class BrowseIndex
|
||||
|
||||
/**
|
||||
* Does this browse index represent one of the internal item indexes?
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isInternalIndex()
|
||||
{
|
||||
@@ -837,13 +862,18 @@ public final class BrowseIndex
|
||||
|
||||
/**
|
||||
* Generate a base table name.
|
||||
* @param number
|
||||
* @param number index number
|
||||
* @return table name
|
||||
*/
|
||||
private static String makeTableBaseName(int number)
|
||||
{
|
||||
return "bi_" + Integer.toString(number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is tag cloud enabled
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isTagCloudEnabled() {
|
||||
|
||||
return ConfigurationManager.getBooleanProperty("webui.browse.index.tagcloud." + number);
|
||||
|
@@ -256,7 +256,7 @@ public class BrowseInfo
|
||||
* exception
|
||||
*
|
||||
* @param dso the container object; a Community or Collection
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public void setBrowseContainer(DSpaceObject dso)
|
||||
throws BrowseException
|
||||
@@ -836,7 +836,7 @@ public class BrowseInfo
|
||||
*
|
||||
* @param config
|
||||
* @return
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
*/
|
||||
private String fullListingString(ItemListConfig config)
|
||||
throws SQLException
|
||||
|
@@ -160,8 +160,8 @@ public class BrowseOutput
|
||||
* Pass in some SQL. If print is set to true this will output to the
|
||||
* screen. If file is set to true, this will write to the file specified.
|
||||
*
|
||||
* @param sql
|
||||
* @throws BrowseException
|
||||
* @param sql SQL string
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public void sql(String sql) throws BrowseException
|
||||
{
|
||||
|
@@ -96,7 +96,7 @@ public class BrowserScope
|
||||
* exception
|
||||
*
|
||||
* @param dso the container object; a Community or Collection
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public void setBrowseContainer(DSpaceObject dso)
|
||||
throws BrowseException
|
||||
@@ -397,7 +397,7 @@ public class BrowserScope
|
||||
* Obtain the sort option
|
||||
*
|
||||
* @return the sort option
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public SortOption getSortOption()
|
||||
throws BrowseException
|
||||
|
@@ -28,7 +28,7 @@ public class CrossLinks
|
||||
/**
|
||||
* Construct a new object which will obtain the configuration for itself.
|
||||
*
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if browse error
|
||||
*/
|
||||
public CrossLinks()
|
||||
throws BrowseException
|
||||
|
@@ -22,8 +22,8 @@ public interface ItemCountDAO
|
||||
/**
|
||||
* Set the DSpace Context to use during data access
|
||||
*
|
||||
* @param context
|
||||
* @throws ItemCountException
|
||||
* @param context DSpace Context
|
||||
* @throws ItemCountException if count error
|
||||
*/
|
||||
public void setContext(Context context) throws ItemCountException;
|
||||
|
||||
@@ -32,8 +32,8 @@ public interface ItemCountDAO
|
||||
* only succeed if the DSpaceObject is an instance of either a Community or a
|
||||
* Collection. Otherwise it will throw an exception.
|
||||
*
|
||||
* @param dso
|
||||
* @throws ItemCountException
|
||||
* @param dso Dspace Object
|
||||
* @throws ItemCountException if count error
|
||||
*/
|
||||
public int getCount(DSpaceObject dso) throws ItemCountException;
|
||||
}
|
||||
|
@@ -24,8 +24,8 @@ public class ItemCountDAOFactory
|
||||
* Get an instance of ItemCountDAO which supports the correct storage backend
|
||||
* for the specific DSpace instance.
|
||||
*
|
||||
* @param context
|
||||
* @throws ItemCountException
|
||||
* @param context DSpace Context
|
||||
* @throws ItemCountException if count error
|
||||
*/
|
||||
public static ItemCountDAO getInstance(Context context)
|
||||
throws ItemCountException
|
||||
|
@@ -59,8 +59,8 @@ public class ItemCountDAOSolr implements ItemCountDAO
|
||||
/**
|
||||
* Set the dspace context to use
|
||||
*
|
||||
* @param context
|
||||
* @throws ItemCountException
|
||||
* @param context DSpace Context
|
||||
* @throws ItemCountException if count error
|
||||
*/
|
||||
@Override
|
||||
public void setContext(Context context) throws ItemCountException
|
||||
@@ -71,8 +71,8 @@ public class ItemCountDAOSolr implements ItemCountDAO
|
||||
/**
|
||||
* Get the count of the items in the given container.
|
||||
*
|
||||
* @param dso
|
||||
* @throws ItemCountException
|
||||
* @param dso Dspace Context
|
||||
* @throws ItemCountException if count error
|
||||
*/
|
||||
@Override
|
||||
public int getCount(DSpaceObject dso) throws ItemCountException
|
||||
@@ -106,7 +106,7 @@ public class ItemCountDAOSolr implements ItemCountDAO
|
||||
* make sure that the counts are actually fetched from Solr (if haven't been
|
||||
* cached in a Map yet)
|
||||
*
|
||||
* @throws ItemCountException
|
||||
* @throws ItemCountException if count error
|
||||
*/
|
||||
private void loadCount() throws ItemCountException
|
||||
{
|
||||
|
@@ -51,8 +51,8 @@ public class ItemCounter
|
||||
/**
|
||||
* Construct a new item counter which will use the give DSpace Context
|
||||
*
|
||||
* @param context
|
||||
* @throws ItemCountException
|
||||
* @param context current context
|
||||
* @throws ItemCountException if count error
|
||||
*/
|
||||
public ItemCounter(Context context)
|
||||
throws ItemCountException
|
||||
@@ -70,9 +70,8 @@ public class ItemCounter
|
||||
* cached value if it exists. If it is equal to 'false' it will count
|
||||
* the number of items in the container in real time.
|
||||
*
|
||||
* @param dso
|
||||
* @throws ItemCountException
|
||||
* @throws SQLException
|
||||
* @param dso DSpaceObject
|
||||
* @throws ItemCountException when error occurs
|
||||
*/
|
||||
public int getCount(DSpaceObject dso)
|
||||
throws ItemCountException
|
||||
|
@@ -38,7 +38,7 @@ public class ItemListConfig
|
||||
* Create a new instance of the Item list configuration. This loads
|
||||
* all the required information from configuration
|
||||
*
|
||||
* @throws BrowseException
|
||||
* @throws BrowseException if count error
|
||||
*/
|
||||
public ItemListConfig()
|
||||
throws BrowseException
|
||||
@@ -97,7 +97,7 @@ public class ItemListConfig
|
||||
/**
|
||||
* What metadata is to go in the given column number?
|
||||
*
|
||||
* @param col
|
||||
* @param col column
|
||||
*/
|
||||
public String[] getMetadata(int col)
|
||||
{
|
||||
@@ -113,6 +113,7 @@ public class ItemListConfig
|
||||
* @param mfield the string representation of the metadata
|
||||
* @param init the default value of the array elements
|
||||
* @return a three element array with schema, element and qualifier respectively
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
public final String[] interpretField(String mfield, String init)
|
||||
throws IOException
|
||||
|
@@ -35,8 +35,8 @@ import org.dspace.storage.bitstore.service.BitstreamStorageService;
|
||||
* @author Nathan Sarr
|
||||
*
|
||||
*
|
||||
* @todo the accessor methods are currently unused - are they useful?
|
||||
* @todo check for any existing resource problems
|
||||
* TODO the accessor methods are currently unused - are they useful?
|
||||
* TODO check for any existing resource problems
|
||||
*/
|
||||
public final class CheckerCommand
|
||||
{
|
||||
@@ -222,7 +222,7 @@ public final class CheckerCommand
|
||||
*
|
||||
* @param info
|
||||
* A not found BitStreamInfo
|
||||
* @todo is this method required?
|
||||
* TODO is this method required?
|
||||
*/
|
||||
protected void processNullInfoBitstream(MostRecentChecksum info) throws SQLException {
|
||||
info.setInfoFound(false);
|
||||
@@ -241,7 +241,7 @@ public final class CheckerCommand
|
||||
* actual checksumming never took place.
|
||||
* </p>
|
||||
*
|
||||
* @todo Why does bitstream have a timestamp indicating it's checked if
|
||||
* TODO Why does bitstream have a timestamp indicating it's checked if
|
||||
* checksumming doesn't occur?
|
||||
*
|
||||
* @param info
|
||||
|
@@ -93,8 +93,7 @@ public class ChecksumHistoryServiceImpl implements ChecksumHistoryService {
|
||||
* @param checksumResultCode
|
||||
* result code records must have for them to be deleted.
|
||||
* @return number of records deleted.
|
||||
* @throws java.sql.SQLException
|
||||
* if database error occurs.
|
||||
* @throws SQLException if database error occurs.
|
||||
*/
|
||||
@Override
|
||||
public int deleteByDateAndCode(Context context, Date retentionDate, ChecksumResultCode checksumResultCode) throws SQLException
|
||||
|
@@ -61,10 +61,8 @@ public class DailyReportEmailer
|
||||
* @param numberOfBitstreams
|
||||
* the number of bitstreams reported
|
||||
*
|
||||
* @throws IOException
|
||||
* if IO exception occurs
|
||||
* @throws javax.mail.MessagingException
|
||||
* if message cannot be sent.
|
||||
* @throws IOException if IO exception occurs
|
||||
* @throws MessagingException if message cannot be sent.
|
||||
*/
|
||||
public void sendReport(File attachment, int numberOfBitstreams)
|
||||
throws IOException, javax.mail.MessagingException
|
||||
|
@@ -73,7 +73,7 @@ public class HandleDispatcher implements BitstreamDispatcher
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*
|
||||
* @throws SQLException
|
||||
* @throws SQLException if database error
|
||||
* if database access fails.
|
||||
*/
|
||||
protected synchronized void init() throws SQLException {
|
||||
|
@@ -36,7 +36,7 @@ public class IteratorDispatcher implements BitstreamDispatcher
|
||||
/**
|
||||
* Main constructor.
|
||||
*
|
||||
* @param bitstreamIds
|
||||
* @param bitstreams bitstream iterator
|
||||
*/
|
||||
public IteratorDispatcher(Iterator<Bitstream> bitstreams)
|
||||
{
|
||||
|
@@ -85,7 +85,7 @@ public class ResultsLogger implements ChecksumResultsCollector
|
||||
*
|
||||
* @param info
|
||||
* the BitstreamInfo representing the result.
|
||||
* @see org.dspace.checker.ChecksumResultsCollector#collect(org.dspace.checker.MostRecentChecksum)
|
||||
* @see org.dspace.checker.ChecksumResultsCollector#collect(org.dspace.core.Context, org.dspace.checker.MostRecentChecksum)
|
||||
*/
|
||||
@Override
|
||||
public void collect(Context context, MostRecentChecksum info) throws SQLException {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user