com.partnersoft.data
Class DataRecordSource

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

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

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()
           
DataRecordSource(Cog newState)
           
 
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.List getAfterActions()
           
 java.util.List getBeforeActions()
           
 boolean getShowProgress()
           
 java.util.List getTransforms()
           
 boolean isVerbose()
           
 java.util.Iterator<Naming<java.lang.Object>> iterator()
           
 void setAfterActions(java.util.List newAfterActions)
           
 void setBeforeActions(java.util.List newBeforeActions)
           
 void setShowProgress(boolean tizit)
           
 void setTransforms(java.util.List newTransforms)
           
 void setVerbose(boolean tizit)
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 
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()

DataRecordSource

public DataRecordSource(Cog newState)
Method Detail

iterator

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

createFetcher

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


getTransforms

public java.util.List getTransforms()

setTransforms

public void setTransforms(java.util.List newTransforms)

getBeforeActions

public java.util.List getBeforeActions()

setBeforeActions

public void setBeforeActions(java.util.List newBeforeActions)

getAfterActions

public java.util.List getAfterActions()

setAfterActions

public void setAfterActions(java.util.List 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()

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Returns:
Cog representing the internal state of this object