uk.ac.ebi.intenz.tools.export
Class XmlExporter
java.lang.Object
uk.ac.ebi.intenz.tools.export.XmlExporter
public class XmlExporter
- extends Object
Exporter of IntEnz data in XML format.
Currently, the following flavours of XML are available:
- ASCII: the IntEnz fields with XML markup are translated
into ASCII.
- XCHARS: those fields are left as are, but within
CDATA
sections.
The flavour can be changed using the
setFlavour
method.
Note that the export
methods are synchronized in order to avoid changing
the flavour in the middle of a dump.
- Author:
- rafalcan
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlExporter
public XmlExporter()
throws javax.xml.bind.JAXBException,
SAXException
- Throws:
javax.xml.bind.JAXBException
SAXException
setDescriptions
public void setDescriptions(Map<String,Object> descriptions)
setFlavour
public void setFlavour(XmlExporter.Flavour flavour)
export
public void export(EnzymeEntry entry,
String release,
String relDate,
OutputStream os)
throws Exception
- Exports one enzyme entry as IntEnzXML.
- Parameters:
entry
- the enzyme entry to export.release
- the IntEnz release number to mention in the exported XML.relDate
- the IntEnz release date to mention in the exported XML.os
- the OutputStream to write the XML to.
- Throws:
Exception
export
public void export(List<EnzymeEntry> entries,
String release,
String relDate,
OutputStream os)
throws Exception
- Exports a list of enzymes as IntEnzXML.
- Parameters:
entries
- the entries to export.release
- the IntEnz release number to mention in the exported XML.relDate
- the IntEnz release date to mention in the exported XML.os
- the OutputStream to write the XML to.
- Throws:
Exception
Copyright © 2013 EMBL-EBI. All Rights Reserved.