Package psidev.psi.mi.jami.tab.io.writer
Class DefaultMitabWriter
- java.lang.Object
-
- psidev.psi.mi.jami.tab.io.writer.DefaultMitabWriter
-
- All Implemented Interfaces:
InteractionWriter
public class DefaultMitabWriter extends Object implements InteractionWriter
Generic writer for MITAB- Since:
02/05/14
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description DefaultMitabWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()close.voidend()end.voidflush()flush.protected InteractionWritergetDelegate()Getter for the fielddelegate.voidinitialiseContext(Map options)Initialise the context of the InteractionWriter given a map of optionsvoidreset()reset.protected voidsetDelegate(InteractionWriter delegate)Setter for the fielddelegate.voidstart()start.voidwrite(Collection interactions)write.voidwrite(Iterator interactions)Writes Interaction objects using iteratorvoidwrite(Interaction interaction)write.
-
-
-
Method Detail
-
initialiseContext
public void initialiseContext(Map options)
Initialise the context of the InteractionWriter given a map of options- Specified by:
initialiseContextin interfaceInteractionWriter- Parameters:
options- : the options given by the user
-
start
public void start() throws MIIOExceptionstart.
- Specified by:
startin interfaceInteractionWriter- Throws:
MIIOException- if any.
-
end
public void end() throws MIIOExceptionend.
- Specified by:
endin interfaceInteractionWriter- Throws:
MIIOException- if any.
-
write
public void write(Interaction interaction) throws MIIOException
write.
- Specified by:
writein interfaceInteractionWriter- Parameters:
interaction- aInteractionobject.- Throws:
MIIOException- if any.
-
write
public void write(Collection interactions) throws MIIOException
write.
- Specified by:
writein interfaceInteractionWriter- Parameters:
interactions- aCollectionobject.- Throws:
MIIOException- if any.
-
write
public void write(Iterator interactions) throws MIIOException
Writes Interaction objects using iterator- Specified by:
writein interfaceInteractionWriter- Parameters:
interactions- : the iterator of interactions to write- Throws:
MIIOException- : if cannot write
-
flush
public void flush() throws MIIOExceptionflush.
- Specified by:
flushin interfaceInteractionWriter- Throws:
MIIOException- if any.
-
close
public void close() throws MIIOExceptionclose.
- Specified by:
closein interfaceInteractionWriter- Throws:
MIIOException- if any.
-
reset
public void reset() throws MIIOExceptionreset.
- Specified by:
resetin interfaceInteractionWriter- Throws:
MIIOException- if any.
-
getDelegate
protected InteractionWriter getDelegate()
Getter for the field
delegate.- Returns:
- a
InteractionWriterobject.
-
setDelegate
protected void setDelegate(InteractionWriter delegate)
Setter for the field
delegate.- Parameters:
delegate- aInteractionWriterobject.
-
-