gov.nih.nci.caarray.services.fileparse2.parsers
Class BaseMicroarrayFileHeaderParser

java.lang.Object
  extended by gov.nih.nci.caarray.services.fileparse2.parsers.BaseMicroarrayFileHeaderParser
Direct Known Subclasses:
ArrayDesignFileHeaderParser, MicroarrayTextFileHeaderParser

public abstract class BaseMicroarrayFileHeaderParser
extends java.lang.Object

Author:
tranp

Field Summary
protected  DataSetMapper dataSetMapper_
           
protected  org.apache.commons.beanutils.BasicDynaBean header_
           
protected  org.apache.log4j.Logger logger_
          Logger used by this class.
 
Constructor Summary
BaseMicroarrayFileHeaderParser(DataSetMapper dataHeaderMap)
           
 
Method Summary
protected  DataSetMapper getDataSetMapper()
           
 org.apache.commons.beanutils.BasicDynaBean getHeader()
           
abstract  void parse(SequenceInputFile inputFile)
           
abstract  boolean validate(SequenceInputFile inputFile, boolean resetPointerAfterDone)
          Validates the file if it's the right one before proceeding further.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger_

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


header_

protected org.apache.commons.beanutils.BasicDynaBean header_

dataSetMapper_

protected DataSetMapper dataSetMapper_
Constructor Detail

BaseMicroarrayFileHeaderParser

public BaseMicroarrayFileHeaderParser(DataSetMapper dataHeaderMap)
Method Detail

parse

public abstract void parse(SequenceInputFile inputFile)
                    throws java.io.IOException
Throws:
java.io.IOException

validate

public abstract boolean validate(SequenceInputFile inputFile,
                                 boolean resetPointerAfterDone)
                          throws java.io.IOException
Validates the file if it's the right one before proceeding further. The typical implementation for this is to look at some parameters in the file's header and match certain string. However, anything could be performed to prevent the file from further processing. When this method returns, the file pointer could be repositioned to where it was before the method is invoked so the data can be re-read by passing true for the argument resetPointerAfterDone.

Parameters:
inputFile -
Returns:
Throws:
java.io.IOException

getHeader

public org.apache.commons.beanutils.BasicDynaBean getHeader()

getDataSetMapper

protected DataSetMapper getDataSetMapper()