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 FastVector |
m_Instances
Stores the instances created so far, before assigning to a header
|
protected Hashtable[] |
m_NominalIndexes
For lookup of indices given a string value for each nominal attribute
|
protected FastVector[] |
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,
Object[] key,
Object[] result)
Collects each instance and adjusts the header information.
|
String |
getRevision()
Returns the revision string.
|
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, setOutputFileName
protected transient FastVector m_Instances
protected transient int[] m_AttributeTypes
protected transient Hashtable[] m_NominalIndexes
protected transient FastVector[] m_NominalStrings
public String globalInfo()
globalInfo
in class CSVResultListener
public void preProcess(ResultProducer rp) throws Exception
preProcess
in interface ResultListener
preProcess
in class CSVResultListener
rp
- the ResultProducer that will generate the resultsException
- if an error occurs during preprocessing.public void postProcess(ResultProducer rp) throws Exception
postProcess
in interface ResultListener
postProcess
in class CSVResultListener
rp
- the ResultProducer that generated the resultsException
- if an error occurspublic void acceptResult(ResultProducer rp, Object[] key, Object[] result) throws Exception
acceptResult
in interface ResultListener
acceptResult
in class CSVResultListener
rp
- the ResultProducer that generated the resultkey
- The key for the results.result
- The actual results.Exception
- if the result could not be accepted.public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class CSVResultListener
Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.