|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsbc.orthoxml.io.OrthoXMLWriter
public class OrthoXMLWriter
Writer for OrthoXML(http://orthoXML.org). Supports OrthoXML versions 0.1 to
0.3. Global definitions are extracted for the groups and stored in memory as
they are feed into the writer. Groups are written in to a temporary file to
minimize memory consumption. The close() method must be called after all groups
have been written to create the OrthoXML file.
OrthoXMLWriter writer = new OrthoXMLWriter(new File("myFile.orthxml"),"myDatabase","myVersion");
for(Group group : myGroups)
writer.write(group);
writer.close();
| Constructor Summary | |
|---|---|
OrthoXMLWriter(java.io.File outputFile,
java.lang.String origin,
java.lang.String originVersion)
Creates a OrthoXMLWriter that writes to a file. |
|
OrthoXMLWriter(java.io.Writer outputWriter,
java.lang.String origin,
java.lang.String originVersion)
Creates a OrthoXMLWriter that writes to a stream. |
|
| Method Summary | |
|---|---|
void |
close()
Must be called after all groups have been written. |
void |
write(Group group)
Appends the group to the orthoXML output. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OrthoXMLWriter(java.io.Writer outputWriter,
java.lang.String origin,
java.lang.String originVersion)
throws javax.xml.stream.XMLStreamException,
java.io.IOException
outputWriter - the orthoXML stream to write toorigin - the origin of the orthology assignmentsoriginVersion - the version of the origin
javax.xml.stream.XMLStreamException
java.io.IOException
public OrthoXMLWriter(java.io.File outputFile,
java.lang.String origin,
java.lang.String originVersion)
throws javax.xml.stream.XMLStreamException,
java.io.IOException
outputFile - the orthoXML file that is created by the writerorigin - the origin of the orthology assignmentsoriginVersion - the version of the origin
javax.xml.stream.XMLStreamException
java.io.IOException| Method Detail |
|---|
public void write(Group group)
throws javax.xml.stream.XMLStreamException
close() must be called after the last group is written to ensure
that the output is generated.
group - the group to append to the OrthoXML file.
javax.xml.stream.XMLStreamException
public void close()
throws javax.xml.stream.XMLStreamException,
java.io.IOException
javax.xml.stream.XMLStreamException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||