|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.io.mzdata.MzDataImporter
public class MzDataImporter
This class supports import of mzData files into Proteios. 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
| Constructor Summary | |
|---|---|
MzDataImporter(SessionControl sc)
Default constructor. |
|
MzDataImporter(String xsdFilePath,
SessionControl sc)
Constructor that takes an xml schema definition as parameter. |
|
| Method Summary | |
|---|---|
void |
enableDbControl()
Make sure that DbControl is running. |
void |
enableDbControl(BasicItem item)
Make sure that DbControl is running, and that the item is attached to it. |
PeakList |
getPeakList()
Get the current PeakList for the mzData file. |
PeakListSet |
getPeakListSet()
Get the PeakListSet created from the imported mzData file. |
ProgressReporter |
getProgressReporter()
Get the ProgressReporter. |
File |
getSourceFile()
Get source core file with mzData. |
String |
getXMLFilePath()
Get mzData XML file path. |
String |
getXsdFilePath()
Get XSD schema file to validate against. |
void |
importFile(File file)
|
void |
importFile(InputStream iStream)
|
void |
importFile(String xmlFilePath)
Imports mzData file. |
void |
processCData(javax.xml.stream.XMLStreamReader parser)
Processes a CData event. |
void |
processCharacters(javax.xml.stream.XMLStreamReader parser)
Processes a Characters event. |
void |
processEndElement(javax.xml.stream.XMLStreamReader parser)
Processes an EndElement event. |
void |
processEvent(int event,
javax.xml.stream.XMLStreamReader parser)
Processes an event. |
void |
processStartElement(javax.xml.stream.XMLStreamReader parser)
Processes a StartElement event. |
void |
setPeakList(PeakList peakList)
Set the current PeakList for the mzData file. |
void |
setPeakListSet(PeakListSet peakListSet)
Set the PeakListSet for the mzData file. |
void |
setProgressReporter(ProgressReporter progress)
Set the ProgressReporter. |
void |
setSourceFile(File sourceFile)
Set source core file with mzData. |
void |
setXMLFilePath(String xmlFilePath)
Set mzData XML file path. |
void |
setXsdFilePath(String xsdFilePath)
Set XSD schema file to validate against. |
boolean |
valid(InputStream xmlInputStream)
Validates mzData input stream against current mzData XSD file. |
boolean |
valid(String xmlFilePath)
Validates mzData file against current mzData XSD file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MzDataImporter(SessionControl sc)
public MzDataImporter(String xsdFilePath,
SessionControl sc)
xsdFilePath - The XML Schema Definition to use.| Method Detail |
|---|
public String getXsdFilePath()
public void setXsdFilePath(String xsdFilePath)
xsdFilePath - String with path for XSD schema file.public String getXMLFilePath()
public void setXMLFilePath(String xmlFilePath)
xmlFilePath - String with path for mzData XML file.public File getSourceFile()
public void setSourceFile(File sourceFile)
sourceFile - File source core file with mzData.public PeakListSet getPeakListSet()
public void setPeakListSet(PeakListSet peakListSet)
peakListSet - PeakListSet the peakListSet to set.public PeakList getPeakList()
public void setPeakList(PeakList peakList)
peakList - PeakList the peakList to set.public ProgressReporter getProgressReporter()
public void setProgressReporter(ProgressReporter progress)
progress - The ProgressReporter object to set.
public boolean valid(String xmlFilePath)
throws javax.xml.stream.XMLStreamException,
SAXException
xmlFilePath - String with path of XML file to validate.
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
SAXException
public boolean valid(InputStream xmlInputStream)
throws javax.xml.stream.XMLStreamException,
SAXException
xmlInputStream - XML input stream to validate.
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
SAXException
public void importFile(File file)
throws javax.xml.stream.XMLStreamException,
SAXException
javax.xml.stream.XMLStreamException
SAXException
public void importFile(String xmlFilePath)
throws javax.xml.stream.XMLStreamException,
SAXException
xmlFilePath - String with path of mzData XML file to import.
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
SAXException
public void importFile(InputStream iStream)
throws javax.xml.stream.XMLStreamException,
SAXException
javax.xml.stream.XMLStreamException
SAXException
public void processEvent(int event,
javax.xml.stream.XMLStreamReader parser)
throws javax.xml.stream.XMLStreamException
event - int current event.parser - XMLStreamReader instance.
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
public void processStartElement(javax.xml.stream.XMLStreamReader parser)
throws javax.xml.stream.XMLStreamException
parser - XMLStreamReader instance.
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
public void processEndElement(javax.xml.stream.XMLStreamReader parser)
throws javax.xml.stream.XMLStreamException
parser - XMLStreamReader instance.
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
public void processCharacters(javax.xml.stream.XMLStreamReader parser)
throws javax.xml.stream.XMLStreamException
parser - XMLStreamReader instance.
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
public void processCData(javax.xml.stream.XMLStreamReader parser)
throws javax.xml.stream.XMLStreamException
parser - XMLStreamReader instance.
javax.xml.stream.XMLStreamException - If there is an XML Stream related errorpublic void enableDbControl()
public void enableDbControl(BasicItem item)
item - BasicItem item to reattach to DbController
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||