org.vivoweb.harvester.util.repo
Class Record

java.lang.Object
  extended by org.vivoweb.harvester.util.repo.Record

public class Record
extends java.lang.Object

Individual record

Author:
Christopher Haines (hainesc@ctrip.ufl.edu)

Constructor Summary
protected Record(java.lang.String recID, java.lang.String recData, RecordHandler recordhandler)
          Constructor
 
Method Summary
 java.lang.String getData()
          Getter for Data
 java.lang.String getID()
          Getter for ID
 boolean needsProcessed(java.lang.Class<?> operator)
          Has this record been written since last processed by operator?
 void setData(java.lang.String newData, java.lang.Class<?> operator)
          Setter for Data
 void setProcessed(java.lang.Class<?> operator)
          Set this record as processed by the given operator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Record

protected Record(java.lang.String recID,
                 java.lang.String recData,
                 RecordHandler recordhandler)
Constructor

Parameters:
recID - records id
recData - records data
recordhandler - the recordhandler this record came from
Method Detail

getID

public java.lang.String getID()
Getter for ID

Returns:
the records id

setData

public void setData(java.lang.String newData,
                    java.lang.Class<?> operator)
             throws java.io.IOException
Setter for Data

Parameters:
newData - data to be used
operator - the class setting the data
Throws:
java.io.IOException - error writing data to recordhandler

getData

public java.lang.String getData()
Getter for Data

Returns:
the records data

setProcessed

public void setProcessed(java.lang.Class<?> operator)
                  throws java.io.IOException
Set this record as processed by the given operator

Parameters:
operator - the operator that processed this record
Throws:
java.io.IOException - error setting processed

needsProcessed

public boolean needsProcessed(java.lang.Class<?> operator)
Has this record been written since last processed by operator?

Parameters:
operator - the class to check for
Returns:
true if written since last processed by operator or if never been processed by operator