mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
[DS-347] Add --quiet option to filter-media (MediaFilterManager) to disable progress messages
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4503 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -97,6 +97,8 @@ public class MediaFilterManager
|
|||||||
|
|
||||||
public static boolean isVerbose = false; // default to not verbose
|
public static boolean isVerbose = false; // default to not verbose
|
||||||
|
|
||||||
|
public static boolean isQuiet = false; // default is noisy
|
||||||
|
|
||||||
public static boolean isForce = false; // default to not forced
|
public static boolean isForce = false; // default to not forced
|
||||||
|
|
||||||
public static String identifier = null; // object scope limiter
|
public static String identifier = null; // object scope limiter
|
||||||
@@ -131,6 +133,8 @@ public class MediaFilterManager
|
|||||||
|
|
||||||
options.addOption("v", "verbose", false,
|
options.addOption("v", "verbose", false,
|
||||||
"print all extracted text and other details to STDOUT");
|
"print all extracted text and other details to STDOUT");
|
||||||
|
options.addOption("q", "quiet", false,
|
||||||
|
"do not print anything except in the event of errors.");
|
||||||
options.addOption("f", "force", false,
|
options.addOption("f", "force", false,
|
||||||
"force all bitstreams to be processed");
|
"force all bitstreams to be processed");
|
||||||
options.addOption("n", "noindex", false,
|
options.addOption("n", "noindex", false,
|
||||||
@@ -190,6 +194,8 @@ public class MediaFilterManager
|
|||||||
isVerbose = true;
|
isVerbose = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isQuiet = line.hasOption('q');
|
||||||
|
|
||||||
if (line.hasOption('n'))
|
if (line.hasOption('n'))
|
||||||
{
|
{
|
||||||
updateIndex = false;
|
updateIndex = false;
|
||||||
@@ -382,6 +388,7 @@ public class MediaFilterManager
|
|||||||
// update search index?
|
// update search index?
|
||||||
if (updateIndex)
|
if (updateIndex)
|
||||||
{
|
{
|
||||||
|
if (!isQuiet)
|
||||||
System.out.println("Updating search index:");
|
System.out.println("Updating search index:");
|
||||||
DSIndexer.updateIndex(c);
|
DSIndexer.updateIndex(c);
|
||||||
}
|
}
|
||||||
@@ -657,6 +664,7 @@ public class MediaFilterManager
|
|||||||
// if exists and overwrite = false, exit
|
// if exists and overwrite = false, exit
|
||||||
if (!overWrite && (existingBitstream != null))
|
if (!overWrite && (existingBitstream != null))
|
||||||
{
|
{
|
||||||
|
if (!isQuiet)
|
||||||
System.out.println("SKIPPED: bitstream " + source.getID()
|
System.out.println("SKIPPED: bitstream " + source.getID()
|
||||||
+ " (item: " + item.getHandle() + ") because '" + newName + "' already exists");
|
+ " (item: " + item.getHandle() + ") because '" + newName + "' already exists");
|
||||||
|
|
||||||
@@ -666,6 +674,7 @@ public class MediaFilterManager
|
|||||||
InputStream destStream = formatFilter.getDestinationStream(source.retrieve());
|
InputStream destStream = formatFilter.getDestinationStream(source.retrieve());
|
||||||
if (destStream == null)
|
if (destStream == null)
|
||||||
{
|
{
|
||||||
|
if (!isQuiet)
|
||||||
System.out.println("SKIPPED: bitstream " + source.getID()
|
System.out.println("SKIPPED: bitstream " + source.getID()
|
||||||
+ " (item: " + item.getHandle() + ") because filtering was unsuccessful");
|
+ " (item: " + item.getHandle() + ") because filtering was unsuccessful");
|
||||||
|
|
||||||
@@ -709,6 +718,7 @@ public class MediaFilterManager
|
|||||||
targetBundle.removeBitstream(existingBitstream);
|
targetBundle.removeBitstream(existingBitstream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isQuiet)
|
||||||
System.out.println("FILTERED: bitstream " + source.getID()
|
System.out.println("FILTERED: bitstream " + source.getID()
|
||||||
+ " (item: " + item.getHandle() + ") and created '" + newName + "'");
|
+ " (item: " + item.getHandle() + ") and created '" + newName + "'");
|
||||||
|
|
||||||
@@ -746,6 +756,7 @@ public class MediaFilterManager
|
|||||||
{
|
{
|
||||||
if(skipList!=null && skipList.contains(identifier))
|
if(skipList!=null && skipList.contains(identifier))
|
||||||
{
|
{
|
||||||
|
if (!isQuiet)
|
||||||
System.out.println("SKIP-LIST: skipped bitstreams within identifier " + identifier);
|
System.out.println("SKIP-LIST: skipped bitstreams within identifier " + identifier);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
- [DS-333] Adjust SWORD ingest crosswalk to store bibliographic citation
|
- [DS-333] Adjust SWORD ingest crosswalk to store bibliographic citation
|
||||||
|
|
||||||
(Larry Stone)
|
(Larry Stone)
|
||||||
|
- [DS-347] Add --quiet option to filter-media (MediaFilterManager) to disable progress messages
|
||||||
- [DS-297] Move PostgreSQL-specific SQL into etc/postgres for greater clarity
|
- [DS-297] Move PostgreSQL-specific SQL into etc/postgres for greater clarity
|
||||||
- [DS-338] Disable cache advice (Expires header) on Bitstream download that requires authorization (XMLUI)
|
- [DS-338] Disable cache advice (Expires header) on Bitstream download that requires authorization (XMLUI)
|
||||||
- [DS-285] Respond to If-Modified-Since request header in XMLUI, also provide Last-Modified response header for Bitstreams
|
- [DS-285] Respond to If-Modified-Since request header in XMLUI, also provide Last-Modified response header for Bitstreams
|
||||||
@@ -98,7 +99,7 @@
|
|||||||
- [DS-271] Make the OAI DC crosswalk configurable
|
- [DS-271] Make the OAI DC crosswalk configurable
|
||||||
- [DS-260] Template item some times has owningCollection filled and some times not
|
- [DS-260] Template item some times has owningCollection filled and some times not
|
||||||
- [DS-309] Shiboleth default roles are applied also to anonymous user and user logged-in with other methods
|
- [DS-309] Shiboleth default roles are applied also to anonymous user and user logged-in with other methods
|
||||||
- [DS-270] Make delegate admin permissions configurable
|
- [DS-270] Make delegate admin permissions configurable
|
||||||
|
|
||||||
(Tim Donohue)
|
(Tim Donohue)
|
||||||
- [DS-218] Cannot add/remove email subscriptions from Profile page in XMLUI
|
- [DS-218] Cannot add/remove email subscriptions from Profile page in XMLUI
|
||||||
|
Reference in New Issue
Block a user