org.proteios.io.mzdata
Class MzDataImpDataProcessingBlock
java.lang.Object
org.proteios.io.mzdata.MzDataImpCommon
org.proteios.io.mzdata.MzDataImpCommonDc
org.proteios.io.mzdata.MzDataImpCommonAnnotation
org.proteios.io.mzdata.MzDataImpCommonPeakListSet
org.proteios.io.mzdata.MzDataImpDataProcessingBlock
public class MzDataImpDataProcessingBlock
- extends MzDataImpCommonPeakListSet
This class processes a "dataProcessing" XML block in an mzData file. An
mzData file contains information on a mass spectrometry experiment. The
mzData file is first vaildated against the XML Schema Definition file
mzdata.xsd. If the file is valid, its content is parsed and selected
information stored in Proteios. The mzData file is parsed using cursor-based
XML stream parsing. The StAX (Stream API for XML) parser finds start and stop
(end) tags, which are then processed. Element attributes are located in the
start tag, and elements of simple types are stored directly after the start
tag is read. For more complex elements, values of attributes and sub-elements
are collected in temporary variables, until the end tag is reached, and the
colelcted contents are stored. Example: XML tag tagData At start tag: Method thisTagElementStart() stores
attribute values. Between tags: tagData is stored in temporary StringBuffer.
At end tag: Method thisTagItem() processes collected data. Tag data may be
exchanged for a start/end tag pair, etc.
- Version:
- 2.0
- Author:
- Olle
- Last modified
- $Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MzDataImpDataProcessingBlock
public MzDataImpDataProcessingBlock(SessionControl sc)
- Default constructor.
processInternalStartElement
public void processInternalStartElement(javax.xml.stream.XMLStreamReader parser)
throws javax.xml.stream.XMLStreamException
- Processes an internal StartElement event. The blocks in the if-else
section are placed in the order of appearance of the start elements in
the mzData XML file. This not essential for the functionality, but makes
it easier to see if a specific element is handled or not. Elements that
may be daughter elements to different types of parent elements, e.g.
and , are placed at a suitable location.
- Overrides:
processInternalStartElement in class MzDataImpCommon
- Parameters:
parser - XMLStreamReader instance.
- Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
blockEnd
public void blockEnd(javax.xml.stream.XMLStreamReader parser)
throws javax.xml.stream.XMLStreamException
- Processes end of XML block processed by this class.
- Overrides:
blockEnd in class MzDataImpCommon
- Parameters:
parser - XMLStreamReader instance.
- Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
dataProcessingItem
public DataProcessingStep dataProcessingItem(PeakListSet peakListSet)
- Creates a dataProcessing item.
- Parameters:
peakListSet - PeakListSet peakListSet
- Returns:
- dataProcessingStep DataProcessingStep dataProcessingStep
storeDataProcessingStepAnnotations
public void storeDataProcessingStepAnnotations(DataProcessingStep dataProcessingStep)
- Stores variable values as annotations for dataProcessingStep.
- Parameters:
dataProcessingStep - DataProcessingStep
softwareItem
public Software softwareItem(DataProcessingStep dataProcessingStep)
- Creates a software item.
- Parameters:
dataProcessingStep - DataProcessingStep dataProcessingStep
- Returns:
- dataProcessingStepSoftware Software dataProcessingStepSoftware