apollo.dataadapter
Class TransactionOutputAdapter

java.lang.Object
  extended by apollo.dataadapter.TransactionOutputAdapter
Direct Known Subclasses:
ChadoTransactionXMLWriter, JDBCTransactionWriter

public abstract class TransactionOutputAdapter
extends java.lang.Object

A class used to handle Transaction objects output.

Author:
wgm

Field Summary
protected  java.lang.String mapID
           
protected  java.lang.String mapType
           
protected  java.lang.Object target
           
protected  TransactionTransformer transformer
           
 
Constructor Summary
TransactionOutputAdapter()
           
 
Method Summary
 void commitTransactions(TransactionManager transManager)
          The client to this class should call this method to commit (save or write changes to the database) transactions.
protected abstract  void commitTransformedTransactions(java.util.List transformedTn)
          A subclass to this class should implement this method to provide its own behaviors.
 java.lang.String getMapID()
           
 java.lang.String getMapType()
           
 java.lang.Object getTarget()
           
 TransactionTransformer getTransformer()
           
 void setMapID(java.lang.String mapID)
          Set the id for map_position.
 void setMapType(java.lang.String type)
          Set the type used for map_position.
 void setTarget(java.lang.Object target)
          Set the output target for Transaction objects.
 void setTransformer(TransactionTransformer transformer)
          Set the TransactionTransformer to be used to transform Apollo Transaction objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transformer

protected TransactionTransformer transformer

target

protected java.lang.Object target

mapID

protected java.lang.String mapID

mapType

protected java.lang.String mapType
Constructor Detail

TransactionOutputAdapter

public TransactionOutputAdapter()
Method Detail

getMapID

public java.lang.String getMapID()
Returns:
Returns the mapID.

setMapID

public void setMapID(java.lang.String mapID)
Set the id for map_position. Usually it should be a name of a chromosome or chromosome_arm

Parameters:
mapID - The mapID to set.

getMapType

public java.lang.String getMapType()

setMapType

public void setMapType(java.lang.String type)
Set the type used for map_position.

Parameters:
type - The type to set.

setTransformer

public void setTransformer(TransactionTransformer transformer)
Set the TransactionTransformer to be used to transform Apollo Transaction objects.

Parameters:
transformer -

getTransformer

public TransactionTransformer getTransformer()

setTarget

public void setTarget(java.lang.Object target)
Set the output target for Transaction objects. A target can be a database connection, a file name, or a URL.

Parameters:
target -

getTarget

public java.lang.Object getTarget()

commitTransactions

public void commitTransactions(TransactionManager transManager)
                        throws java.lang.Exception
The client to this class should call this method to commit (save or write changes to the database) transactions.

Parameters:
transctions -
Throws:
java.lang.Exception

commitTransformedTransactions

protected abstract void commitTransformedTransactions(java.util.List transformedTn)
                                               throws java.lang.Exception
A subclass to this class should implement this method to provide its own behaviors.

Parameters:
transformedTn - a list of Transaction objects transformed by transactions. These are no longer apollo.editor.Transactions, but transactions that are specific to the data adapter (eg ChadoTransactions) I would argue this should be a HASA just like the transaction transformer. so the transaction output adapter is just a generic object that gets a transformer & a writer and just calls both - its the old HASA vs ISA i guess.
Throws:
java.lang.Exception