org.fhcrc.cpl.viewer.amt
Class AmtXmlReader

java.lang.Object
  extended by org.fhcrc.cpl.viewer.amt.AmtXmlReader

public class AmtXmlReader
extends java.lang.Object

A restrictive wrapper for reading AmtXml files. The method is a compromise between the elegance of DOM/XmlBeans and the efficiency of stax. We use Stax2DomBuilder to pull DOM subtrees out of the pepxml file for bits that we care about, namely modifications and features


Field Summary
protected  AmtDatabase mAmtDatabase
           
 
Constructor Summary
AmtXmlReader(java.io.File file)
          Read in a amtxml file
 
Method Summary
protected  void extractEntries(java.io.File inputFile)
           
protected  void extractMetadataAndModifications(java.io.File inputFile)
          TODO: get hydrophobicity calculator and version
protected  void extractRuns(java.io.File inputFile)
          extracts interesting stuff at the amt_database level, and all runs
 AmtDatabase getDatabase()
          Accessor for loaded database
 void read(java.io.File file)
          Read in a file, extract modifications and features
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mAmtDatabase

protected AmtDatabase mAmtDatabase
Constructor Detail

AmtXmlReader

public AmtXmlReader(java.io.File file)
             throws java.io.FileNotFoundException,
                    javax.xml.stream.XMLStreamException
Read in a amtxml file

Parameters:
file -
Throws:
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException
Method Detail

read

public void read(java.io.File file)
          throws java.io.FileNotFoundException,
                 javax.xml.stream.XMLStreamException
Read in a file, extract modifications and features

Parameters:
file -
Throws:
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException

extractMetadataAndModifications

protected void extractMetadataAndModifications(java.io.File inputFile)
                                        throws java.io.FileNotFoundException,
                                               javax.xml.stream.XMLStreamException
TODO: get hydrophobicity calculator and version

Parameters:
inputFile -
Throws:
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException

extractRuns

protected void extractRuns(java.io.File inputFile)
                    throws java.io.FileNotFoundException,
                           javax.xml.stream.XMLStreamException
extracts interesting stuff at the amt_database level, and all runs

Parameters:
inputFile -
Throws:
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException

extractEntries

protected void extractEntries(java.io.File inputFile)
                       throws java.io.FileNotFoundException,
                              javax.xml.stream.XMLStreamException
Parameters:
inputFile -
Throws:
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException

getDatabase

public AmtDatabase getDatabase()
Accessor for loaded database

Returns:


Fred Hutchinson Cancer Research Center