org.systemsbiology.jrap
Class MSXMLParser

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

public final class MSXMLParser
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 java.lang.String CONT_AFTER_FATAL_ERROR_ID
          Continue after fatal error id.
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_NAMESPACE_PREFIXES
          Default namespace prefixes (false).
protected static boolean DEFAULT_NAMESPACES
          Default namespaces support (false).
protected static java.lang.String DEFAULT_PARSER_NAME
          Default parser name.
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 static java.lang.String DYNAMIC_VALIDATION_FEATURE_ID
          Dynamic validation feature id (http://apache.org/xml/features/validation/dynamic).
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 SCHEMA_FULL_CHECKING_FEATURE_ID
          Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking).
protected static java.lang.String SCHEMA_VALIDATION_FEATURE_ID
          Schema validation feature id (http://apache.org/xml/features/validation/schema).
protected static java.lang.String VALIDATION_FEATURE_ID
          Validation feature id (http://xml.org/sax/features/validation).
 
Constructor Summary
MSXMLParser(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

SCHEMA_VALIDATION_FEATURE_ID

protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id (http://apache.org/xml/features/validation/schema).

See Also:
Constant Field Values

SCHEMA_FULL_CHECKING_FEATURE_ID

protected static final java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID
Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking).

See Also:
Constant Field Values

DYNAMIC_VALIDATION_FEATURE_ID

protected static final java.lang.String DYNAMIC_VALIDATION_FEATURE_ID
Dynamic validation feature id (http://apache.org/xml/features/validation/dynamic).

See Also:
Constant Field Values

CONT_AFTER_FATAL_ERROR_ID

protected static final java.lang.String CONT_AFTER_FATAL_ERROR_ID
Continue after fatal error id.

See Also:
Constant Field Values

DEFAULT_PARSER_NAME

protected static final java.lang.String DEFAULT_PARSER_NAME
Default parser name.

See Also:
Constant Field Values

DEFAULT_NAMESPACES

protected static final boolean DEFAULT_NAMESPACES
Default namespaces support (false).

See Also:
Constant Field Values

DEFAULT_NAMESPACE_PREFIXES

protected static final boolean DEFAULT_NAMESPACE_PREFIXES
Default namespace prefixes (false).

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

MSXMLParser

public MSXMLParser(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