public abstract class AbstractLoader extends Object implements Loader
Loader.StructureNotReadyExceptionBATCH, INCREMENTAL, NONE| Constructor and Description |
|---|
AbstractLoader() |
| Modifier and Type | Method and Description |
|---|---|
abstract Instances |
getDataSet()
Return the full data set.
|
abstract Instance |
getNextInstance(Instances structure)
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.
|
void |
reset()
Default implementation sets retrieval mode to NONE
|
void |
setRetrieval(int mode)
Sets the retrieval mode.
|
void |
setSource(File file)
Default implementation throws an IOException.
|
void |
setSource(InputStream input)
Default implementation throws an IOException.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRevisionpublic void setRetrieval(int mode)
setRetrieval in interface Loadermode - the retrieval modepublic void setSource(File file) throws IOException
setSource in interface Loaderfile - the FileIOException - alwayspublic void reset()
throws Exception
public void setSource(InputStream input) throws IOException
setSource in interface Loaderinput - the input streamIOException - alwayspublic abstract Instances getStructure() throws IOException
LoadergetStructure in interface LoaderIOException - if there is no source or parsing fails
public_normal_behavior requires: model_sourceSupplied == true && model_structureDetermined == false && (* successful parse *); modifiable: model_structureDetermined; ensures: \result != null && \result.numInstances() == 0 && model_structureDetermined == true; also public_exceptional_behavior requires: model_sourceSupplied == false || (* unsuccessful parse *); signals: (IOException);
public abstract Instances getDataSet() throws IOException
LoadergetDataSet in interface LoaderIOException - if there is an error during parsing or if
getNextInstance has been called on this source (either
incremental or batch loading can be used, not both).
public_normal_behavior requires: model_sourceSupplied == true && (* successful parse *); modifiable: model_structureDetermined; ensures: \result != null && \result.numInstances() >= 0 && model_structureDetermined == true; also public_exceptional_behavior requires: model_sourceSupplied == false || (* unsuccessful parse *); signals: (IOException);
public abstract Instance getNextInstance(Instances structure) throws IOException
LoadergetNextInstance in interface Loaderstructure - the dataset header information, will get updated in case
of string or relational attributesIOException - if there is an error during parsing or if getDataSet
has been called on this source (either incremental or batch
loading can be used, not both).Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.