public class CommandLineImporter extends Object
Modifier and Type | Field and Description |
---|---|
ImportConfig |
config
Configuration used by all components
|
static int |
DEFAULT_WAIT |
List<FileExclusion> |
exclusions
FileExclusion mechanisms for skipping candidates |
ErrorHandler |
handler
ErrorHandler which is also responsible for uploading files
|
ImportLibrary |
library
Base importer library, this is what we actually use to import.
|
FileTransfer |
transfer
FileTransfer mechanism to be used for uploading |
Constructor and Description |
---|
CommandLineImporter(ImportConfig config,
String[] paths,
boolean getUsedFiles)
Legacy constructor which uses a
UploadFileTransfer . |
CommandLineImporter(ImportConfig config,
String[] paths,
boolean getUsedFiles,
FileTransfer transfer,
int minutesToWait)
Legacy constructor without any file exclusions.
|
CommandLineImporter(ImportConfig config,
String[] paths,
boolean getUsedFiles,
FileTransfer transfer,
List<FileExclusion> exclusions,
int minutesToWait)
Main entry class for the application.
|
Modifier and Type | Method and Description |
---|---|
static void |
advUsage()
Prints advanced usage to STDERR and exits with return code 1.
|
void |
cleanup()
Cleans up after a successful or unsuccessful image import.
|
static int |
closeCompleted(ImportConfig config)
Look for all
ImportProcessPrx in the current session and close
them if they return a non-null Response (i.e. they are done). |
static void |
main(String[] args)
Command line application entry point which parses CLI arguments and
passes them into the importer.
|
static void |
setArgument(Map<String,Boolean> map,
String key)
Set a conflicting argument and return the usage if the key is already
set
|
ome.formats.importer.cli.ImportOutput |
setImportOutput(ome.formats.importer.cli.ImportOutput importOutput)
Set the current
ImportOutput (defaulting to null if
a null value is passed). |
int |
start() |
static void |
usage()
Prints usage to STDERR and exits with return code 1.
|
static int |
waitCompleted(ImportConfig config)
Look for all
ImportProcessPrx in the current session and close
them if they return a non-null Response (i.e. they are done). |
public static final int DEFAULT_WAIT
public final ImportConfig config
public final FileTransfer transfer
FileTransfer
mechanism to be used for uploadingpublic final List<FileExclusion> exclusions
FileExclusion
mechanisms for skipping candidatespublic final ImportLibrary library
public final ErrorHandler handler
public CommandLineImporter(ImportConfig config, String[] paths, boolean getUsedFiles) throws Exception
UploadFileTransfer
.config
- the import configurationpaths
- files or directories to searchgetUsedFiles
- if only getting a list of used filesException
- if the import could not be set uppublic CommandLineImporter(ImportConfig config, String[] paths, boolean getUsedFiles, FileTransfer transfer, int minutesToWait) throws Exception
config
- the import configurationpaths
- files or directories to searchgetUsedFiles
- if only getting a list of used filestransfer
- how files are to be transferred to the serverminutesToWait
- for how many minutes to wait for an import (negative for indefinitely)Exception
- if the import could not be set uppublic CommandLineImporter(ImportConfig config, String[] paths, boolean getUsedFiles, FileTransfer transfer, List<FileExclusion> exclusions, int minutesToWait) throws Exception
config
- the import configurationpaths
- files or directories to searchgetUsedFiles
- if only getting a list of used filestransfer
- how files are to be transferred to the serverexclusions
- mechanisms to be used for skipping candidatesminutesToWait
- for how many minutes to wait for an import (negative for indefinitely)Exception
- if the import could not be set uppublic static int closeCompleted(ImportConfig config) throws Exception
ImportProcessPrx
in the current session and close
them if they return a non-null Response
(i.e. they are done).config
- the import configurationException
- in the event of errorpublic static int waitCompleted(ImportConfig config) throws Exception
ImportProcessPrx
in the current session and close
them if they return a non-null Response
(i.e. they are done).config
- the import configuration0
for successException
- in the event of errorpublic ome.formats.importer.cli.ImportOutput setImportOutput(ome.formats.importer.cli.ImportOutput importOutput)
ImportOutput
(defaulting to null if
a null value is passed).importOutput
- possibly null enumeration value.public int start()
public void cleanup()
public static void usage()
public static void advUsage()
public static void main(String[] args) throws Exception
args
- Command line arguments.Exception
- in the event of error
Version: 5.3.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.