|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.experiment.CSVResultListener
public class CSVResultListener
Takes results from a result producer and assembles them into comma separated value form.
Valid options are:-O <file name> The filename where output will be stored. Use - for stdout. (default temp file)
Constructor Summary | |
---|---|
CSVResultListener()
Sets temporary file. |
Method Summary | |
---|---|
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 |
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 |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSVResultListener()
Method Detail |
---|
public java.lang.String globalInfo()
public java.util.Enumeration 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 strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String outputFileTipText()
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 results
java.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 results
java.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 apply
java.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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |