public class SCClient extends Executable
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
mInputFiles
The input files.
|
private java.lang.String |
mInputFormat
The input format for the site catalog.
|
private int |
mLoggingLevel
Denotes the logging level that is to be used for logging the messages.
|
private java.lang.String |
mOutputFile
The output file that is written out.
|
private java.lang.String |
mOutputFormat
The output format for the site catalog.
|
private static java.lang.String |
XML_NAMESPACE |
private static java.lang.String |
XML_VERSION |
mLogger, mLogMsg, mProps, mVersion
Constructor and Description |
---|
SCClient()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
decrementLogging()
Decrements the logging level by 1.
|
void |
executeCommand()
Call the correct commands depending on options.
|
gnu.getopt.LongOpt[] |
generateValidOptions()
Generates an array of valid
LongOpt objects which contain
all the valid options to the Executable. |
int |
getLoggingLevel()
Returns the logging level.
|
PoolConfig |
getTextToPoolConfig(java.lang.String file)
Generates the old site catalog object reading in from text file.
|
void |
incrementLogging()
Increments the logging level by 1.
|
void |
initialize(java.lang.String[] opts)
Initialize the executable object
|
void |
loadProperties()
Loads all the properties
that would be needed
by the Toolkit classes
|
static void |
main(java.lang.String[] args) |
java.lang.String |
parseInputFiles(java.util.List<java.lang.String> inputFiles,
java.lang.String inputFormat,
java.lang.String outputFormat)
Parses the input files in the input format and returns a String in the
output format.
|
void |
printLongVersion()
This method is used to print the long version of the command.
|
void |
printShortVersion()
Returns the short help.
|
protected void |
setupLogging()
Sets up the logging options for this class.
|
void |
toFile(java.lang.String filename,
java.lang.String output)
Writes out to a file, a string.
|
java.lang.String |
toMultiLine(PoolConfig cfg)
Returns the String description of the contents of
PoolConfig
object passed. |
java.lang.String |
toXML(PoolConfig cfg)
Returns the XML description of the contents of
PoolConfig
object passed, conforming to pool config schema found at
http://pegasus.isi.edu/schema/sc-2.0.xsd. |
convertException, convertException, getCommandLineOptions, getEnvValue, getGVDSVersion, initialize, log, lookupConfProperty, sanityCheckOnProperties, setupLogging
private static final java.lang.String XML_NAMESPACE
private static final java.lang.String XML_VERSION
private java.util.List<java.lang.String> mInputFiles
private java.lang.String mOutputFile
private java.lang.String mOutputFormat
private java.lang.String mInputFormat
private int mLoggingLevel
public void initialize(java.lang.String[] opts)
Executable
initialize
in class Executable
opts
- the command line argument passed to the executableprotected void setupLogging()
public void loadProperties()
loadProperties
in class Executable
public gnu.getopt.LongOpt[] generateValidOptions()
Executable
LongOpt
objects which contain
all the valid options to the Executable.generateValidOptions
in class Executable
public void executeCommand() throws java.io.IOException
opts
- Command optionsjava.io.IOException
public void incrementLogging()
public void decrementLogging()
public int getLoggingLevel()
public java.lang.String parseInputFiles(java.util.List<java.lang.String> inputFiles, java.lang.String inputFormat, java.lang.String outputFormat) throws java.io.IOException
inputFiles
- list of input files that need to be convertedinputFormat
- input format of the input filesoutputFormat
- output format of the output filejava.io.IOException
public void printShortVersion()
printShortVersion
in class Executable
public void printLongVersion()
Executable
printLongVersion
in class Executable
public PoolConfig getTextToPoolConfig(java.lang.String file)
file
- text file to parse.public java.lang.String toXML(PoolConfig cfg)
PoolConfig
object passed, conforming to pool config schema found at
http://pegasus.isi.edu/schema/sc-2.0.xsd.cfg
- the PoolConfig
object whose xml description is
desired.public java.lang.String toMultiLine(PoolConfig cfg)
PoolConfig
object passed.cfg
- the PoolConfig
object whose description is
desired.public void toFile(java.lang.String filename, java.lang.String output) throws java.io.IOException
filename
- the fully qualified path name to the file.output
- the text that needs to be written to the file.java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception