Last update: 2011-06-23

org.proteios.io.mzdata
Class MzDataImpIonSelectionBlock

java.lang.Object
  extended by org.proteios.io.mzdata.MzDataImpCommon
      extended by org.proteios.io.mzdata.MzDataImpCommonDc
          extended by org.proteios.io.mzdata.MzDataImpCommonAnnotation
              extended by org.proteios.io.mzdata.MzDataImpCommonPeakList
                  extended by org.proteios.io.mzdata.MzDataImpIonSelectionBlock

public class MzDataImpIonSelectionBlock
extends MzDataImpCommonPeakList

This class processes an "ionSelection" XML block in an mzData file. It collects data from name-value pairs in cvParam tags and makes it available through accessor methods to its instance variables.

Version:
2.0
Author:
Olle
Last modified
$Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $

Field Summary
 
Fields inherited from class org.proteios.io.mzdata.MzDataImpCommonDc
anna, dc, factory
 
Fields inherited from class org.proteios.io.mzdata.MzDataImpCommon
log
 
Constructor Summary
MzDataImpIonSelectionBlock(SessionControl sc)
          Default constructor.
 
Method Summary
 void blockEnd(javax.xml.stream.XMLStreamReader parser)
          Processes end of XML block processed by this class.
 void cvParamElementStart(javax.xml.stream.XMLStreamReader parser)
          Processes start of cvParam XML element.
 int getChargeState()
          Get the chargeState.
 float getMassToChargeRatio()
          Get the massToChargeRatio.
 HardwareConfiguration ionSelectionItem(PeakList peakList)
          Creates an ionSelection item.
 HardwareConfiguration parseIonSelection(javax.xml.stream.XMLStreamReader parser, PeakList peakList)
          Parse the current XML block, and return the updated PeakList object after extending it with data from the current block.
 void processInternalStartElement(javax.xml.stream.XMLStreamReader parser)
          Processes an internal StartElement event.
 void setChargeState(int chargeState)
          Set the chargeState.
 void setMassToChargeRatio(float massToChargeRatio)
          Set the massToChargeRatio.
 void storeIonSelectionAnnotations(HardwareConfiguration ionSelection)
          Stores variable values as annotations for ionSelection.
 void userParamElementStart(javax.xml.stream.XMLStreamReader parser)
          Processes start of userParam XML element.
 
Methods inherited from class org.proteios.io.mzdata.MzDataImpCommonPeakList
getPeakList, parse, setPeakList
 
Methods inherited from class org.proteios.io.mzdata.MzDataImpCommonAnnotation
fetchCvLookupAnnotation, fetchCvLookupAnnotationList, fetchCvParamAnnotation, fetchCvParamAnnotationList, fetchUserParamAnnotation, fetchUserParamAnnotationList, storeAnnotation, storeCvLookupAnnotation, storeCvParamAnnotation, storeUserParamAnnotation
 
Methods inherited from class org.proteios.io.mzdata.MzDataImpCommonDc
enableDbControl, enableDbControl, getDbControl, getSessionControl, setDbControl
 
Methods inherited from class org.proteios.io.mzdata.MzDataImpCommon
blockStart, getBlockTagName, getTempStrBuf, parse, processCData, processCharacters, processInternalEndElement, setBlockTagName, setTempStrBuf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MzDataImpIonSelectionBlock

public MzDataImpIonSelectionBlock(SessionControl sc)
Default constructor.

Parameters:
sc -
Method Detail

getMassToChargeRatio

public float getMassToChargeRatio()
Get the massToChargeRatio.

Returns:
massToChargeRatio float the massToChargeRatio

setMassToChargeRatio

public void setMassToChargeRatio(float massToChargeRatio)
Set the massToChargeRatio.

Parameters:
massToChargeRatio - float the massToChargeRatio to set.

getChargeState

public int getChargeState()
Get the chargeState.

Returns:
chargeState int the chargeState

setChargeState

public void setChargeState(int chargeState)
Set the chargeState.

Parameters:
chargeState - int the chargeState to set.

blockEnd

public void blockEnd(javax.xml.stream.XMLStreamReader parser)
              throws javax.xml.stream.XMLStreamException
Processes end of XML block processed by this class. Extracts data in block.

Overrides:
blockEnd in class MzDataImpCommon
Parameters:
parser - XMLStreamReader instance.
Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error

processInternalStartElement

public void processInternalStartElement(javax.xml.stream.XMLStreamReader parser)
                                 throws javax.xml.stream.XMLStreamException
Processes an internal StartElement event.

Overrides:
processInternalStartElement in class MzDataImpCommon
Parameters:
parser - XMLStreamReader instance.
Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error

cvParamElementStart

public void cvParamElementStart(javax.xml.stream.XMLStreamReader parser)
                         throws javax.xml.stream.XMLStreamException
Processes start of cvParam XML element. Extracts data from attributes.

Parameters:
parser - XMLStreamReader instance.
Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error

userParamElementStart

public void userParamElementStart(javax.xml.stream.XMLStreamReader parser)
                           throws javax.xml.stream.XMLStreamException
Processes start of userParam XML element. Extracts data from attributes.

Parameters:
parser - XMLStreamReader instance.
Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error

ionSelectionItem

public HardwareConfiguration ionSelectionItem(PeakList peakList)
Creates an ionSelection item.

Parameters:
peakList - PeakList peakList
Returns:
ionSelection HardwareConfiguration ionSelection

storeIonSelectionAnnotations

public void storeIonSelectionAnnotations(HardwareConfiguration ionSelection)
Stores variable values as annotations for ionSelection.

Parameters:
ionSelection - HardwareConfiguration ionSelection

parseIonSelection

public HardwareConfiguration parseIonSelection(javax.xml.stream.XMLStreamReader parser,
                                               PeakList peakList)
                                        throws javax.xml.stream.XMLStreamException
Parse the current XML block, and return the updated PeakList object after extending it with data from the current block. The XMLStreamReader parser is updated to refer to the current position in the XML data.

Parameters:
parser - XMLStreamReader instance.
peakList - PeakList the input peakList.
Returns:
HardwareConfiguration ionSelection an ionSelection object with retrieved data.
Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error

Last update: 2011-06-23