peakml.io
Class ParseResult

java.lang.Object
  extended by peakml.io.ParseResult

public class ParseResult
extends java.lang.Object

Central class for collecting the data and meta-data of a file containing mass spectrometry data. This is used as a return type for the parse functions.


Field Summary
 Header header
          The header information from the file.
 Measurement measurement
          The data associated to the measurement.
 
Constructor Summary
ParseResult()
          Standard constructor, which initializes the members to null.
ParseResult(Header header, Measurement measurement)
          Constructs a new ParseResult with the given header and measurement.
 
Method Summary
 Header getHeader()
          Returns the header instance.
 Measurement getMeasurement()
          Returns the measurement instance.
static ParseResult parse(java.lang.String filename)
          Calls the correct parse function based on the filename extension.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

header

public Header header
The header information from the file.


measurement

public Measurement measurement
The data associated to the measurement.

Constructor Detail

ParseResult

public ParseResult()
Standard constructor, which initializes the members to null.


ParseResult

public ParseResult(Header header,
                   Measurement measurement)
Constructs a new ParseResult with the given header and measurement.

Parameters:
header - The header information from the file.
measurement - The data associated to the measurement.
Method Detail

getHeader

public Header getHeader()
Returns the header instance.

Returns:
The header.

getMeasurement

public Measurement getMeasurement()
Returns the measurement instance.

Returns:
The measurement.

parse

public static ParseResult parse(java.lang.String filename)
                         throws java.io.IOException,
                                domsax.XmlParserException,
                                IXRawfileException
Calls the correct parse function based on the filename extension. Each of these functions returns an instance of ParseResult, which needs to be examined further to determine its contents.

Parameters:
filename - The name of the file to parse.
Returns:
The contents of the file.
Throws:
java.io.IOException - Thrown on an I/O error.
domsax.XmlParserException - Thrown on a XML parse exception.
IXRawfileException - Thrown on an exception generated by the IXRawfile implementation.