Last update: 2011-06-23

org.proteios.io.mzdata
Class MzDataImpCommonPeakListSet

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.MzDataImpCommonPeakListSet
Direct Known Subclasses:
MzDataImpAdminBlock, MzDataImpAnalyzerBlock, MzDataImpAnalyzerListBlock, MzDataImpContactBlock, MzDataImpDataProcessingBlock, MzDataImpDescriptionBlock, MzDataImpDetectorBlock, MzDataImpInstrumentBlock, MzDataImpInstrumentNameBlock, MzDataImpInstrumentSourceBlock, MzDataImpMzDataBlock, MzDataImpProcessingMethodBlock, MzDataImpSampleNameBlock, MzDataImpSoftwareBlock, MzDataImpSourceFileBlock

public class MzDataImpCommonPeakListSet
extends MzDataImpCommonAnnotation

This class supports import of mzData files into Proteios. It contains common attributes and methods, and is intended to be the parent class for other classes that process an 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) $

Field Summary
protected  PeakListSet aPeakListSet
           
 
Fields inherited from class org.proteios.io.mzdata.MzDataImpCommonDc
anna, dc, factory
 
Fields inherited from class org.proteios.io.mzdata.MzDataImpCommon
log
 
Constructor Summary
MzDataImpCommonPeakListSet(SessionControl sc)
          Default constructor.
 
Method Summary
 PeakListSet getPeakListSet()
          Get the PeakListSet.
 String getXMLFilePath()
          Get mzData XML file path.
 PeakListSet parse(javax.xml.stream.XMLStreamReader parser, PeakListSet peakListSet)
          Parse the current XML block, and return the updated PeakListSet object after extending it with data from the current block.
 void setPeakListSet(PeakListSet peakListSet)
          Set the PeakListSet.
 void setXMLFilePath(String xmlFilePath)
          Set mzData XML file path.
 
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
blockEnd, blockStart, getBlockTagName, getTempStrBuf, parse, processCData, processCharacters, processInternalEndElement, processInternalStartElement, setBlockTagName, setTempStrBuf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aPeakListSet

protected PeakListSet aPeakListSet
Constructor Detail

MzDataImpCommonPeakListSet

public MzDataImpCommonPeakListSet(SessionControl sc)
Default constructor.

Method Detail

getPeakListSet

public PeakListSet getPeakListSet()
Get the PeakListSet.

Returns:
peakListSet PeakListSet the current peakListSet

setPeakListSet

public void setPeakListSet(PeakListSet peakListSet)
Set the PeakListSet.

Parameters:
peakListSet - PeakListSet the peakListSet to set.

getXMLFilePath

public String getXMLFilePath()
Get mzData XML file path.

Returns:
xmlFilePath String with path for mzData XML file.

setXMLFilePath

public void setXMLFilePath(String xmlFilePath)
Set mzData XML file path.

Parameters:
xmlFilePath - String with path for mzData XML file.

parse

public PeakListSet parse(javax.xml.stream.XMLStreamReader parser,
                         PeakListSet peakListSet)
                  throws javax.xml.stream.XMLStreamException
Parse the current XML block, and return the updated PeakListSet 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.
peakListSet - PeakListSet the input peakListSet.
Returns:
peakListSet PeakListSet the updated output peakListSet.
Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error

Last update: 2011-06-23