Package psidev.psi.mi.jami.tab.io.writer
Class Mitab25BinaryWriter
- java.lang.Object
-
- psidev.psi.mi.jami.tab.io.writer.AbstractMitab25BinaryWriter<BinaryInteraction,Participant>
-
- psidev.psi.mi.jami.tab.io.writer.Mitab25BinaryWriter
-
- All Implemented Interfaces:
InteractionWriter<BinaryInteraction>
- Direct Known Subclasses:
Mitab25BinaryWriter
public class Mitab25BinaryWriter extends AbstractMitab25BinaryWriter<BinaryInteraction,Participant>
The basic Mitab 2.5 writer for BinaryInteraction- Since:
19/06/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description Mitab25BinaryWriter()
Constructor for Mitab25BinaryWriter.Mitab25BinaryWriter(File file)
Constructor for Mitab25BinaryWriter.Mitab25BinaryWriter(OutputStream output)
Constructor for Mitab25BinaryWriter.Mitab25BinaryWriter(Writer writer)
Constructor for Mitab25BinaryWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
close.protected void
initialiseColumnFeeder()
initialiseColumnFeeder.void
initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of optionsprotected void
initialiseSubWritersWith(Writer writer)
initialiseSubWritersWith.void
reset()
reset.protected void
setBinaryEvidenceWriter(AbstractMitab25BinaryWriter<BinaryInteractionEvidence,ParticipantEvidence> binaryEvidenceWriter)
Setter for the fieldbinaryEvidenceWriter
.protected void
setModelledBinaryWriter(AbstractMitab25BinaryWriter<ModelledBinaryInteraction,ModelledParticipant> modelledBinaryWriter)
Setter for the fieldmodelledBinaryWriter
.void
setWriteHeader(boolean writeHeader)
Setter for the fieldwriteHeader
.void
start()
start.void
write(BinaryInteraction interaction)
Writes a binary interaction.-
Methods inherited from class psidev.psi.mi.jami.tab.io.writer.AbstractMitab25BinaryWriter
end, flush, getColumnFeeder, getVersion, getWriter, hasStarted, isWriteHeader, setColumnFeeder, setStarted, setVersion, write, write, writeBinary, writeHeader
-
-
-
-
Constructor Detail
-
Mitab25BinaryWriter
public Mitab25BinaryWriter()
Constructor for Mitab25BinaryWriter.
-
Mitab25BinaryWriter
public Mitab25BinaryWriter(File file) throws IOException
Constructor for Mitab25BinaryWriter.
- Parameters:
file
- aFile
object.- Throws:
IOException
- if any.
-
Mitab25BinaryWriter
public Mitab25BinaryWriter(OutputStream output)
Constructor for Mitab25BinaryWriter.
- Parameters:
output
- aOutputStream
object.
-
-
Method Detail
-
initialiseContext
public void initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of options- Specified by:
initialiseContext
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
initialiseContext
in classAbstractMitab25BinaryWriter<BinaryInteraction,Participant>
- Parameters:
options
- : the options given by the user
-
start
public void start() throws MIIOException
start.
- Specified by:
start
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
start
in classAbstractMitab25BinaryWriter<BinaryInteraction,Participant>
- Throws:
MIIOException
- if any.
-
write
public void write(BinaryInteraction interaction) throws MIIOException
Writes a binary interaction. Does not write any extended properties from participants, interaction and features This method will write empty columns for interaction detection method, publication author and identifier, source and confidences. It will also ignore experimental roles, host organism, interaction parameters and participant identification methods- Specified by:
write
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
write
in classAbstractMitab25BinaryWriter<BinaryInteraction,Participant>
- Parameters:
interaction
- a T object.- Throws:
MIIOException
- if any.
-
close
public void close() throws MIIOException
close.
- Specified by:
close
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
close
in classAbstractMitab25BinaryWriter<BinaryInteraction,Participant>
- Throws:
MIIOException
- if any.
-
reset
public void reset() throws MIIOException
reset.
- Specified by:
reset
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
reset
in classAbstractMitab25BinaryWriter<BinaryInteraction,Participant>
- Throws:
MIIOException
- if any.
-
initialiseSubWritersWith
protected void initialiseSubWritersWith(Writer writer)
initialiseSubWritersWith.
- Parameters:
writer
- aWriter
object.
-
initialiseColumnFeeder
protected void initialiseColumnFeeder()
initialiseColumnFeeder.
- Specified by:
initialiseColumnFeeder
in classAbstractMitab25BinaryWriter<BinaryInteraction,Participant>
-
setWriteHeader
public void setWriteHeader(boolean writeHeader)
Setter for the field
writeHeader
.- Overrides:
setWriteHeader
in classAbstractMitab25BinaryWriter<BinaryInteraction,Participant>
- Parameters:
writeHeader
- a boolean.
-
setModelledBinaryWriter
protected void setModelledBinaryWriter(AbstractMitab25BinaryWriter<ModelledBinaryInteraction,ModelledParticipant> modelledBinaryWriter)
Setter for the field
modelledBinaryWriter
.- Parameters:
modelledBinaryWriter
- aAbstractMitab25BinaryWriter
object.
-
setBinaryEvidenceWriter
protected void setBinaryEvidenceWriter(AbstractMitab25BinaryWriter<BinaryInteractionEvidence,ParticipantEvidence> binaryEvidenceWriter)
Setter for the field
binaryEvidenceWriter
.- Parameters:
binaryEvidenceWriter
- aAbstractMitab25BinaryWriter
object.
-
-