public class InstancesResultListener extends CSVResultListener
-O <file name> The filename where output will be stored. Use - for stdout. (default temp file)
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
m_AttributeTypes
Stores the attribute types for each column
|
protected java.util.ArrayList<Instance> |
m_Instances
Stores the instances created so far, before assigning to a header
|
protected java.util.Hashtable<java.lang.String,java.lang.Double>[] |
m_NominalIndexes
For lookup of indices given a string value for each nominal attribute
|
protected java.util.ArrayList<java.lang.String>[] |
m_NominalStrings
Contains strings seen so far for each nominal attribute
|
m_Out, m_OutputFile, m_OutputFileName, m_RP| Constructor and Description |
|---|
InstancesResultListener()
Sets temporary file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptResult(ResultProducer rp,
java.lang.Object[] key,
java.lang.Object[] result)
Collects each instance and adjusts the header information.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
Returns a string describing this result listener
|
void |
postProcess(ResultProducer rp)
Perform any postprocessing.
|
void |
preProcess(ResultProducer rp)
Prepare for the results to be received.
|
determineColumnConstraints, getOptions, getOutputFile, isResultRequired, listOptions, outputFileName, outputFileTipText, setOptions, setOutputFile, setOutputFileNameprotected transient java.util.ArrayList<Instance> m_Instances
protected transient int[] m_AttributeTypes
protected transient java.util.Hashtable<java.lang.String,java.lang.Double>[] m_NominalIndexes
protected transient java.util.ArrayList<java.lang.String>[] m_NominalStrings
public java.lang.String globalInfo()
globalInfo in class CSVResultListenerpublic void preProcess(ResultProducer rp) throws java.lang.Exception
preProcess in interface ResultListenerpreProcess in class CSVResultListenerrp - 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 ResultListenerpostProcess in class CSVResultListenerrp - the ResultProducer that generated the resultsjava.lang.Exception - if an error occurspublic void acceptResult(ResultProducer rp, java.lang.Object[] key, java.lang.Object[] result) throws java.lang.Exception
acceptResult in interface ResultListeneracceptResult in class CSVResultListenerrp - 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 java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class CSVResultListener