All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.gui.streams.InstanceJoiner

java.lang.Object
    |
    +----weka.gui.streams.InstanceJoiner

public class InstanceJoiner
extends java.lang.Object
implements java.io.Serializable, InstanceProducer, SerialInstanceListener
A bean that joins two streams of instances into one.

Version:
$Revision: 1.3 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz)

Constructor Index

 o InstanceJoiner()
Setup the initial states of the member variables

Method Index

 o addInstanceListener(InstanceListener)
 
 o batchFinished()
Signify that this batch of input to the filter is finished.
 o getDebug()
 
 o input(Instance)
 
 o inputFormat(Instances)
Sets the format of the input instances.
 o instanceProduced(InstanceEvent)
 
 o outputFormat()
Gets the format of the output instances.
 o outputPeek()
Output an instance after filtering but do not remove from the output queue.
 o removeInstanceListener(InstanceListener)
 
 o secondInstanceProduced(InstanceEvent)
 
 o setDebug(boolean)
 

Constructor Detail

 o InstanceJoiner
public InstanceJoiner()
          Setup the initial states of the member variables

Method Detail

 o inputFormat
public boolean inputFormat(Instances instanceInfo)
          Sets the format of the input instances. If the filter is able to determine the output format before seeing any input instances, it does so here. This default implementation assumes the output format is determined when batchFinished() is called.
Parameters:
instanceInfo - an Instances object containing the input instance structure (any instances contained in the object are ignored - only the structure is required).
Returns:
true if the outputFormat may be collected immediately
 o outputFormat
public Instances outputFormat() throws java.lang.Exception
          Gets the format of the output instances. This should only be called after input() or batchFinished() has returned true.
Returns:
an Instances object containing the output instance structure only.
Throws:
java.lang.Exception - if no input structure has been defined (or the output format hasn't been determined yet)
 o input
public boolean input(Instance instance) throws java.lang.Exception
 o batchFinished
public void batchFinished() throws java.lang.Exception
          Signify that this batch of input to the filter is finished. If the filter requires all instances prior to filtering, output() may now be called to retrieve the filtered instances. Any subsequent instances filtered should be filtered based on setting obtained from the first batch (unless the inputFormat has been re-assigned or new options have been set). This default implementation assumes all instance processing occurs during inputFormat() and input().
Returns:
true if there are instances pending output
Throws:
java.lang.Exception - if no input structure has been defined
 o outputPeek
public Instance outputPeek() throws java.lang.Exception
          Output an instance after filtering but do not remove from the output queue.
Returns:
the instance that has most recently been filtered (or null if the queue is empty).
Throws:
java.lang.Exception - if no input structure has been defined
 o setDebug
public void setDebug(boolean debug)
 o getDebug
public boolean getDebug()
 o addInstanceListener
public void addInstanceListener(InstanceListener ipl)
 o removeInstanceListener
public void removeInstanceListener(InstanceListener ipl)
 o instanceProduced
public void instanceProduced(InstanceEvent e)
 o secondInstanceProduced
public void secondInstanceProduced(InstanceEvent e)

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home