gov.nih.nci.caarray.services.util.mage
Class MAGEWriter

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.mage.MAGEWriter

public final class MAGEWriter
extends java.lang.Object

Author:
TranP

Field Summary
protected  boolean doneFormatting_
           
protected static org.apache.log4j.Logger logger_
          Logger used by this class.
 
Constructor Summary
MAGEWriter(Identifiable topMostObjectForGeneration)
           
 
Method Summary
 java.lang.String[] getDataExternalFiles()
          Gets the DataExternal files created for the dependent BioAssay's if the generated object is an Experiment.
static void invokeWriteMAGEMLOnMAGEIdentifiables(java.util.List identifiables, java.io.Writer writer, int batchSize)
          Invokes method writeMAGEML on the specified list of identifiables AND surround the writing of each of the batchSize of Identifiables with a transaction.
 void writeMAGEML(java.io.File outputFile, java.lang.String magemlIdentifier, boolean includeArrayDesignAndDesignElementPackage, boolean prettyFormat)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger_

protected static org.apache.log4j.Logger logger_
Logger used by this class.


doneFormatting_

protected boolean doneFormatting_
Constructor Detail

MAGEWriter

public MAGEWriter(Identifiable topMostObjectForGeneration)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getDataExternalFiles

public java.lang.String[] getDataExternalFiles()
Gets the DataExternal files created for the dependent BioAssay's if the generated object is an Experiment.

Returns:

writeMAGEML

public void writeMAGEML(java.io.File outputFile,
                        java.lang.String magemlIdentifier,
                        boolean includeArrayDesignAndDesignElementPackage,
                        boolean prettyFormat)
                 throws java.io.IOException
Parameters:
outputFile -
magemlIdentifier -
includeArrayDesignAndDesignElementPackage -
prettyFormat - - True to pretty format with proper carriage return and indentation
Throws:
java.io.IOException

invokeWriteMAGEMLOnMAGEIdentifiables

public static final void invokeWriteMAGEMLOnMAGEIdentifiables(java.util.List identifiables,
                                                              java.io.Writer writer,
                                                              int batchSize)
Invokes method writeMAGEML on the specified list of identifiables AND surround the writing of each of the batchSize of Identifiables with a transaction. This effectively breaks the writing of a long list of Identifiable objects into multiple transactions for scalability.

Parameters:
identifiables - - A list of MAGE Identifiable objects.
writer - - The writer to write to.
batchSize - - The number of Identifiable objects for which a transaction is to be applied for.