Package psidev.psi.mi.jami.tab.io.writer
Class Mitab25Writer
- java.lang.Object
-
- psidev.psi.mi.jami.tab.io.writer.AbstractMitabWriter<Interaction,BinaryInteraction,Participant>
-
- psidev.psi.mi.jami.tab.io.writer.Mitab25Writer
-
- All Implemented Interfaces:
InteractionWriter<Interaction>
- Direct Known Subclasses:
Mitab26Writer
public class Mitab25Writer extends AbstractMitabWriter<Interaction,BinaryInteraction,Participant>
The simple MITAB 2.5 writer will write interactions using the JAMI interfaces. It will not check for MITAB extended objects (such as MitabAlias and DefaultMitabFeature). The default Complex expansion method is spoke expansion.- Since:
10/06/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description Mitab25Writer()
Constructor for Mitab25Writer.Mitab25Writer(File file)
Constructor for Mitab25Writer.Mitab25Writer(File file, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod)
Constructor for Mitab25Writer.Mitab25Writer(OutputStream output)
Constructor for Mitab25Writer.Mitab25Writer(OutputStream output, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod)
Constructor for Mitab25Writer.Mitab25Writer(Writer writer)
Constructor for Mitab25Writer.Mitab25Writer(Writer writer, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod)
Constructor for Mitab25Writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
close.MitabVersion
getVersion()
getVersion.protected Writer
getWriter()
Getter for the fieldwriter
.protected void
initialiseExpansionMethod(ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod)
initialiseExpansionMethod.protected void
initialiseFile(File file)
initialiseFile.protected void
initialiseOutputStream(OutputStream output)
initialiseOutputStream.protected void
initialiseSubWriters()
initialiseSubWriters.protected void
initialiseWriter(Writer writer)
initialiseWriter.void
reset()
reset.protected void
setInteractionEvidenceWriter(Mitab25EvidenceWriter interactionEvidenceWriter)
Setter for the fieldinteractionEvidenceWriter
.protected void
setModelledInteractionWriter(Mitab25ModelledWriter modelledInteractionWriter)
Setter for the fieldmodelledInteractionWriter
.void
start()
start.void
write(Interaction interaction)
write.-
Methods inherited from class psidev.psi.mi.jami.tab.io.writer.AbstractMitabWriter
end, flush, getBinaryWriter, getExpansionMethod, hasStarted, initialiseContext, isWriteHeader, setBinaryWriter, setExpansionMethod, setStarted, setWriteHeader, write, write
-
-
-
-
Constructor Detail
-
Mitab25Writer
public Mitab25Writer()
Constructor for Mitab25Writer.
-
Mitab25Writer
public Mitab25Writer(File file) throws IOException
Constructor for Mitab25Writer.
- Parameters:
file
- aFile
object.- Throws:
IOException
- if any.
-
Mitab25Writer
public Mitab25Writer(OutputStream output)
Constructor for Mitab25Writer.
- Parameters:
output
- aOutputStream
object.
-
Mitab25Writer
public Mitab25Writer(Writer writer)
Constructor for Mitab25Writer.
- Parameters:
writer
- aWriter
object.
-
Mitab25Writer
public Mitab25Writer(File file, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod) throws IOException
Constructor for Mitab25Writer.
- Parameters:
file
- aFile
object.expansionMethod
- aComplexExpansionMethod
object.- Throws:
IOException
- if any.
-
Mitab25Writer
public Mitab25Writer(OutputStream output, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod) throws IOException
Constructor for Mitab25Writer.
- Parameters:
output
- aOutputStream
object.expansionMethod
- aComplexExpansionMethod
object.- Throws:
IOException
- if any.
-
Mitab25Writer
public Mitab25Writer(Writer writer, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod) throws IOException
Constructor for Mitab25Writer.
- Parameters:
writer
- aWriter
object.expansionMethod
- aComplexExpansionMethod
object.- Throws:
IOException
- if any.
-
-
Method Detail
-
start
public void start() throws MIIOException
start.
- Specified by:
start
in interfaceInteractionWriter<Interaction>
- Overrides:
start
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Throws:
MIIOException
- if any.
-
write
public void write(Interaction interaction) throws MIIOException
write.
- Specified by:
write
in interfaceInteractionWriter<Interaction>
- Overrides:
write
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Parameters:
interaction
- a T object.- Throws:
MIIOException
- if any.
-
close
public void close() throws MIIOException
close.
- Specified by:
close
in interfaceInteractionWriter<Interaction>
- Overrides:
close
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Throws:
MIIOException
- if any.
-
reset
public void reset() throws MIIOException
reset.
- Specified by:
reset
in interfaceInteractionWriter<Interaction>
- Overrides:
reset
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Throws:
MIIOException
- if any.
-
getVersion
public MitabVersion getVersion()
getVersion.
- Specified by:
getVersion
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Returns:
- a
MitabVersion
object.
-
initialiseExpansionMethod
protected void initialiseExpansionMethod(ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod)
initialiseExpansionMethod.
- Specified by:
initialiseExpansionMethod
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Parameters:
expansionMethod
- aComplexExpansionMethod
object.
-
initialiseWriter
protected void initialiseWriter(Writer writer)
initialiseWriter.
- Specified by:
initialiseWriter
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Parameters:
writer
- aWriter
object.
-
initialiseOutputStream
protected void initialiseOutputStream(OutputStream output)
initialiseOutputStream.
- Specified by:
initialiseOutputStream
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Parameters:
output
- aOutputStream
object.
-
initialiseFile
protected void initialiseFile(File file) throws IOException
initialiseFile.
- Specified by:
initialiseFile
in classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>
- Parameters:
file
- aFile
object.- Throws:
IOException
- if any.
-
initialiseSubWriters
protected void initialiseSubWriters()
initialiseSubWriters.
-
setModelledInteractionWriter
protected void setModelledInteractionWriter(Mitab25ModelledWriter modelledInteractionWriter)
Setter for the field
modelledInteractionWriter
.- Parameters:
modelledInteractionWriter
- aMitab25ModelledWriter
object.
-
setInteractionEvidenceWriter
protected void setInteractionEvidenceWriter(Mitab25EvidenceWriter interactionEvidenceWriter)
Setter for the field
interactionEvidenceWriter
.- Parameters:
interactionEvidenceWriter
- aMitab25EvidenceWriter
object.
-
-