org.systemsbiology.jrap
Class MSXMLParserGeneric

java.lang.Object
  extended by org.systemsbiology.jrap.MSXMLParserGeneric

public final class MSXMLParserGeneric
extends java.lang.Object

A generic utility class for reading an MSXML file in a random access fashion and utilizing a stored scan index for fast reads.


Field Summary
protected static boolean DEFAULT_CONT_AFTER_FATAL_ERROR
          Default dynamic validation support (false).
protected static boolean DEFAULT_DYNAMIC_VALIDATION
          Default dynamic validation support (false).
protected static boolean DEFAULT_SCHEMA_FULL_CHECKING
          Default Schema full checking support (false).
protected static boolean DEFAULT_SCHEMA_VALIDATION
          Default Schema validation support (false).
protected static boolean DEFAULT_VALIDATION
          Default validation support (false).
protected  java.lang.String fileMD5
          The MD5 signature found the last time we read the index
protected  java.lang.String fileName
          The file we are in charge of reading
protected  java.util.ArrayList indexes
          The indexes
protected  MZXMLFileInfo info
          The information contained in the header of the mzXML file.
protected static java.lang.String NAMESPACE_PREFIXES_FEATURE_ID
          Namespace prefixes feature id (http://xml.org/sax/features/namespace-prefixes).
protected static java.lang.String NAMESPACES_FEATURE_ID
          Namespaces feature id (http://xml.org/sax/features/namespaces).
protected  org.xml.sax.XMLReader parser
          A handle to the XML parser
protected static java.lang.String VALIDATION_FEATURE_ID
          Validation feature id (http://xml.org/sax/features/validation).
 
Constructor Summary
MSXMLParserGeneric(java.lang.String fileName)
           
 
Method Summary
 MZXMLFileInfo getHeaderInfo()
          Get the header information contained in the mzXML file, which is constant for every scan.
 int getScanCount()
          Get the total number of scans in the mzXMLfile handled by this parser.
 long getScanOffset(int scanNumber)
          get scan offset, scan number is 1 based.
 Scan rap(int scanNumber)
          Read a particular scan from a MSXML file and return a generic Scan object with it's data.
 ScanHeader rapHeader(int scanNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACES_FEATURE_ID

protected static final java.lang.String NAMESPACES_FEATURE_ID
Namespaces feature id (http://xml.org/sax/features/namespaces).

See Also:
Constant Field Values

NAMESPACE_PREFIXES_FEATURE_ID

protected static final java.lang.String NAMESPACE_PREFIXES_FEATURE_ID
Namespace prefixes feature id (http://xml.org/sax/features/namespace-prefixes).

See Also:
Constant Field Values

VALIDATION_FEATURE_ID

protected static final java.lang.String VALIDATION_FEATURE_ID
Validation feature id (http://xml.org/sax/features/validation).

See Also:
Constant Field Values

DEFAULT_VALIDATION

protected static final boolean DEFAULT_VALIDATION
Default validation support (false).

See Also:
Constant Field Values

DEFAULT_SCHEMA_VALIDATION

protected static final boolean DEFAULT_SCHEMA_VALIDATION
Default Schema validation support (false).

See Also:
Constant Field Values

DEFAULT_SCHEMA_FULL_CHECKING

protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING
Default Schema full checking support (false).

See Also:
Constant Field Values

DEFAULT_DYNAMIC_VALIDATION

protected static final boolean DEFAULT_DYNAMIC_VALIDATION
Default dynamic validation support (false).

See Also:
Constant Field Values

DEFAULT_CONT_AFTER_FATAL_ERROR

protected static final boolean DEFAULT_CONT_AFTER_FATAL_ERROR
Default dynamic validation support (false).

See Also:
Constant Field Values

parser

protected org.xml.sax.XMLReader parser
A handle to the XML parser


fileName

protected java.lang.String fileName
The file we are in charge of reading


fileMD5

protected java.lang.String fileMD5
The MD5 signature found the last time we read the index


indexes

protected java.util.ArrayList indexes
The indexes


info

protected MZXMLFileInfo info
The information contained in the header of the mzXML file.

Constructor Detail

MSXMLParserGeneric

public MSXMLParserGeneric(java.lang.String fileName)
Method Detail

rapHeader

public ScanHeader rapHeader(int scanNumber)

rap

public Scan rap(int scanNumber)
Read a particular scan from a MSXML file and return a generic Scan object with it's data. Note: scanNumbers are 1-based, so scanNumber must be at least 1 and be not greater than getScanCount() + 1


getScanCount

public int getScanCount()
Get the total number of scans in the mzXMLfile handled by this parser.

Returns:
The number of scans.

getHeaderInfo

public MZXMLFileInfo getHeaderInfo()
Get the header information contained in the mzXML file, which is constant for every scan.

Returns:
An instance of MZXMLFileInfo

getScanOffset

public long getScanOffset(int scanNumber)
get scan offset, scan number is 1 based.



SASHIMI Project