weka.core.converters
Class TreeLoader

java.lang.Object
  extended byweka.core.converters.AbstractLoader
      extended byweka.core.converters.TreeLoader
All Implemented Interfaces:
Loader, java.io.Serializable

public abstract class TreeLoader
extends AbstractLoader

Abstract TreeLoader should be extended by Loaders for tree-formatted data.

Version:
Author:
Arthur Zimek
See Also:
Serialized Form

Field Summary
 
Fields inherited from class weka.core.converters.AbstractLoader
BATCH, INCREMENTAL, m_retrieval, NONE
 
Constructor Summary
TreeLoader()
           
 
Method Summary
abstract  Instances getDataSet()
          Return the full data set.
abstract  Instance getNextInstance()
          Read the data set incrementally---get the next instance in the data set or returns null if there are no more instances to get.
abstract  Instances getStructure()
          Determines and returns (if possible) the structure (internally the header) of the data set as an empty set of instances.
 
Methods inherited from class weka.core.converters.AbstractLoader
getRetrieval, setRetrieval, setSource, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeLoader

public TreeLoader()
Method Detail

getStructure

public abstract Instances getStructure()
                                throws java.io.IOException
Description copied from interface: Loader
Determines and returns (if possible) the structure (internally the header) of the data set as an empty set of instances.

Specified by:
getStructure in interface Loader
Specified by:
getStructure in class AbstractLoader
Throws:
java.io.IOException
See Also:
Loader.getStructure()

getDataSet

public abstract Instances getDataSet()
                              throws java.io.IOException
Description copied from interface: Loader
Return the full data set. If the structure hasn't yet been determined by a call to getStructure then the method should do so before processing the rest of the data set.

Specified by:
getDataSet in interface Loader
Specified by:
getDataSet in class AbstractLoader
Throws:
java.io.IOException
See Also:
Loader.getDataSet()

getNextInstance

public abstract Instance getNextInstance()
                                  throws java.io.IOException
Description copied from interface: Loader
Read the data set incrementally---get the next instance in the data set or returns null if there are no more instances to get. If the structure hasn't yet been determined by a call to getStructure then method should do so before returning the next instance in the data set. If it is not possible to read the data set incrementally (ie. in cases where the data set structure cannot be fully established before all instances have been seen) then an exception should be thrown.

Specified by:
getNextInstance in interface Loader
Specified by:
getNextInstance in class AbstractLoader
Throws:
java.io.IOException
See Also:
Loader.getNextInstance()