com.partnersoft.data
Class DataRecordSource

java.lang.Object
  extended by com.partnersoft.data.DataRecordSource
All Implemented Interfaces:
Coggable, java.lang.Iterable<Naming>
Direct Known Subclasses:
StreamingDataRecordSource, TurtleOutageSource

public abstract class DataRecordSource
extends java.lang.Object
implements Coggable, java.lang.Iterable<Naming>

A source for data records, represented as an iteration of Namings. Usually the data is tabular; each record has the same keys. However, the addition of optional transforms can muddy this a bit. Here is an example of use:

 DataSourceMap source = new DataSourceMapSubclass();
 Iterator it = source.iterator();
 while (it.hasNext()) {
    Naming current = (Naming)it.next();
    Log.info("field value = " + current.getValue("field"));
    }
 

Author:
Paul Reavis Copyright 2003 Partner Software, Inc.

Field Summary
protected  boolean showProgress
           
protected  boolean verbose
           
 
Constructor Summary
DataRecordSource()
           
 
Method Summary
 java.lang.Object clone()
           
 void close()
           
protected  void copyStateFrom(java.lang.Object nother)
           
protected abstract  DataRecordFetcher createFetcher()
          Creates a new fetcher to gather data for a new iteration.
 java.util.ArrayList getAfterActions()
           
 java.util.ArrayList getBeforeActions()
           
 boolean getShowProgress()
           
 Cog getState()
           
 java.util.ArrayList getTransforms()
           
 boolean isVerbose()
           
 java.util.Iterator<Naming> iterator()
           
 void setAfterActions(java.util.ArrayList newAfterActions)
           
 void setBeforeActions(java.util.ArrayList newBeforeActions)
           
 void setShowProgress(boolean tizit)
           
 void setState(Cog newState)
           
 void setTransforms(java.util.ArrayList newTransforms)
           
 void setVerbose(boolean tizit)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

verbose

protected boolean verbose

showProgress

protected boolean showProgress
Constructor Detail

DataRecordSource

public DataRecordSource()
Method Detail

iterator

public java.util.Iterator<Naming> iterator()
Specified by:
iterator in interface java.lang.Iterable<Naming>

createFetcher

protected abstract DataRecordFetcher createFetcher()
Creates a new fetcher to gather data for a new iteration.


getTransforms

public java.util.ArrayList getTransforms()

setTransforms

public void setTransforms(java.util.ArrayList newTransforms)

getBeforeActions

public java.util.ArrayList getBeforeActions()

setBeforeActions

public void setBeforeActions(java.util.ArrayList newBeforeActions)

getAfterActions

public java.util.ArrayList getAfterActions()

setAfterActions

public void setAfterActions(java.util.ArrayList newAfterActions)

copyStateFrom

protected void copyStateFrom(java.lang.Object nother)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

isVerbose

public boolean isVerbose()

setVerbose

public void setVerbose(boolean tizit)

getShowProgress

public boolean getShowProgress()

setShowProgress

public void setShowProgress(boolean tizit)

close

public void close()

getState

public Cog getState()
Specified by:
getState in interface Coggable

setState

public void setState(Cog newState)
Specified by:
setState in interface Coggable