public class CSVResultListener extends java.lang.Object implements ResultListener, OptionHandler, RevisionHandler
-O <file name> The filename where output will be stored. Use - for stdout. (default temp file)
Constructor and Description |
---|
CSVResultListener()
Sets temporary file.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptResult(ResultProducer rp,
java.lang.Object[] key,
java.lang.Object[] result)
Just prints out each result as it is received.
|
java.lang.String[] |
determineColumnConstraints(ResultProducer rp)
Determines if there are any constraints (imposed by the destination) on the
result columns to be produced by resultProducers.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
java.io.File |
getOutputFile()
Get the value of OutputFile.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
Returns a string describing this result listener
|
boolean |
isResultRequired(ResultProducer rp,
java.lang.Object[] key)
Always says a result is required.
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options..
|
java.lang.String |
outputFileName()
Get the value of OutputFileName.
|
java.lang.String |
outputFileTipText()
Returns the tip text for this property
|
void |
postProcess(ResultProducer rp)
Perform any postprocessing.
|
void |
preProcess(ResultProducer rp)
Prepare for the results to be received.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setOutputFile(java.io.File newOutputFile)
Set the value of OutputFile.
|
void |
setOutputFileName(java.lang.String name)
Set the value of OutputFileName.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
makeCopy
public java.lang.String globalInfo()
public java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-O <file name> The filename where output will be stored. Use - for stdout. (default temp file)
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String outputFileTipText()
@FilePropertyMetadata(fileChooserDialogType=1, directoriesOnly=false) public java.io.File getOutputFile()
public void setOutputFile(java.io.File newOutputFile)
newOutputFile
- Value to assign to OutputFile.public java.lang.String outputFileName()
public void setOutputFileName(java.lang.String name)
name
- the name of OutputFile.public void preProcess(ResultProducer rp) throws java.lang.Exception
preProcess
in interface ResultListener
rp
- the ResultProducer that will generate the resultsjava.lang.Exception
- if an error occurs during preprocessing.public void postProcess(ResultProducer rp) throws java.lang.Exception
postProcess
in interface ResultListener
rp
- the ResultProducer that generated the resultsjava.lang.Exception
- if an error occurspublic java.lang.String[] determineColumnConstraints(ResultProducer rp) throws java.lang.Exception
determineColumnConstraints
in interface ResultListener
rp
- the ResultProducer to which the constraints will applyjava.lang.Exception
- if an error occurs.public void acceptResult(ResultProducer rp, java.lang.Object[] key, java.lang.Object[] result) throws java.lang.Exception
acceptResult
in interface ResultListener
rp
- the ResultProducer that generated the resultkey
- The key for the results.result
- The actual results.java.lang.Exception
- if the result could not be accepted.public boolean isResultRequired(ResultProducer rp, java.lang.Object[] key) throws java.lang.Exception
isResultRequired
in interface ResultListener
rp
- the ResultProducer wanting to generate the resultkey
- The key for which a result may be needed.java.lang.Exception
- if it could not be determined if the result is needed.public java.lang.String getRevision()
getRevision
in interface RevisionHandler