Last update: 2011-06-23

org.proteios.io.mzdata
Class MzDataImpSourceFileBlock

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
                  extended by org.proteios.io.mzdata.MzDataImpSourceFileBlock

public class MzDataImpSourceFileBlock
extends MzDataImpCommonPeakListSet

This class processes a "sourceFile" 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
 
Fields inherited from class org.proteios.io.mzdata.MzDataImpCommonPeakListSet
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
MzDataImpSourceFileBlock(SessionControl sc)
          Default constructor.
 
Method Summary
 String getAccessionNumber()
          Get the source file accessionNumber.
 String getFileType()
          Get the source file fileType.
 String getNameOfFile()
          Get the source file nameOfFile.
 String getPathToFile()
          Get the source file pathToFile.
 void processInternalEndElement(javax.xml.stream.XMLStreamReader parser)
          Processes an internal EndElement event.
 void setAccessionNumber(String accessionNumber)
          Set the source file accessionNumber.
 void setFileType(String fileType)
          Set the source file fileType.
 void setNameOfFile(String nameOfFile)
          Set the source file nameOfFile.
 void setPathToFile(String pathToFile)
          Set the source file pathToFile.
 
Methods inherited from class org.proteios.io.mzdata.MzDataImpCommonPeakListSet
getPeakListSet, getXMLFilePath, parse, setPeakListSet, setXMLFilePath
 
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, processInternalStartElement, setBlockTagName, setTempStrBuf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MzDataImpSourceFileBlock

public MzDataImpSourceFileBlock(SessionControl sc)
Default constructor.

Parameters:
sc -
Method Detail

getAccessionNumber

public String getAccessionNumber()
Get the source file accessionNumber.

Returns:
accessionNumber String the accessionNumber

setAccessionNumber

public void setAccessionNumber(String accessionNumber)
Set the source file accessionNumber.

Parameters:
accessionNumber - String the accessionNumber to set.

getNameOfFile

public String getNameOfFile()
Get the source file nameOfFile.

Returns:
nameOfFile String the nameOfFile

setNameOfFile

public void setNameOfFile(String nameOfFile)
Set the source file nameOfFile.

Parameters:
nameOfFile - String the nameOfFile to set.

getPathToFile

public String getPathToFile()
Get the source file pathToFile.

Returns:
pathToFile String the pathToFile

setPathToFile

public void setPathToFile(String pathToFile)
Set the source file pathToFile.

Parameters:
pathToFile - String the pathToFile to set.

getFileType

public String getFileType()
Get the source file fileType.

Returns:
fileType String the fileType

setFileType

public void setFileType(String fileType)
Set the source file fileType.

Parameters:
fileType - String the fileType to set.

processInternalEndElement

public void processInternalEndElement(javax.xml.stream.XMLStreamReader parser)
                               throws javax.xml.stream.XMLStreamException
Processes an internal EndElement 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:
processInternalEndElement in class MzDataImpCommon
Parameters:
parser - XMLStreamReader instance.
Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error

Last update: 2011-06-23