|
||||||||||
| 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,
Object[] key,
Object[] result)
Just prints out each result as it is received. |
String[] |
determineColumnConstraints(ResultProducer rp)
Determines if there are any constraints (imposed by the destination) on the result columns to be produced by resultProducers. |
String[] |
getOptions()
Gets the current settings of the Classifier. |
File |
getOutputFile()
Get the value of OutputFile. |
String |
getRevision()
Returns the revision string. |
String |
globalInfo()
Returns a string describing this result listener |
boolean |
isResultRequired(ResultProducer rp,
Object[] key)
Always says a result is required. |
Enumeration |
listOptions()
Returns an enumeration describing the available options.. |
String |
outputFileName()
Get the value of OutputFileName. |
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(String[] options)
Parses a given list of options. |
void |
setOutputFile(File newOutputFile)
Set the value of OutputFile. |
void |
setOutputFileName(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 String globalInfo()
public Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(String[] options)
throws Exception
-O <file name> The filename where output will be stored. Use - for stdout. (default temp file)
setOptions in interface OptionHandleroptions - the list of options as an array of strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlerpublic String outputFileTipText()
public File getOutputFile()
public void setOutputFile(File newOutputFile)
newOutputFile - Value to assign to OutputFile.public String outputFileName()
public void setOutputFileName(String name)
name - the name of OutputFile.
public void preProcess(ResultProducer rp)
throws Exception
preProcess in interface ResultListenerrp - the ResultProducer that will generate the results
Exception - if an error occurs during preprocessing.
public void postProcess(ResultProducer rp)
throws Exception
postProcess in interface ResultListenerrp - the ResultProducer that generated the results
Exception - if an error occurs
public String[] determineColumnConstraints(ResultProducer rp)
throws Exception
determineColumnConstraints in interface ResultListenerrp - the ResultProducer to which the constraints will apply
Exception - if an error occurs.
public void acceptResult(ResultProducer rp,
Object[] key,
Object[] result)
throws Exception
acceptResult in interface ResultListenerrp - the ResultProducer that generated the resultkey - The key for the results.result - The actual results.
Exception - if the result could not be accepted.
public boolean isResultRequired(ResultProducer rp,
Object[] key)
throws Exception
isResultRequired in interface ResultListenerrp - the ResultProducer wanting to generate the resultkey - The key for which a result may be needed.
Exception - if it could not be determined if the result
is needed.public String getRevision()
getRevision in interface RevisionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||