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 voidclose()close.MitabVersiongetVersion()getVersion.protected WritergetWriter()Getter for the fieldwriter.protected voidinitialiseExpansionMethod(ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod)initialiseExpansionMethod.protected voidinitialiseFile(File file)initialiseFile.protected voidinitialiseOutputStream(OutputStream output)initialiseOutputStream.protected voidinitialiseSubWriters()initialiseSubWriters.protected voidinitialiseWriter(Writer writer)initialiseWriter.voidreset()reset.protected voidsetInteractionEvidenceWriter(Mitab25EvidenceWriter interactionEvidenceWriter)Setter for the fieldinteractionEvidenceWriter.protected voidsetModelledInteractionWriter(Mitab25ModelledWriter modelledInteractionWriter)Setter for the fieldmodelledInteractionWriter.voidstart()start.voidwrite(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- aFileobject.- Throws:
IOException- if any.
-
Mitab25Writer
public Mitab25Writer(OutputStream output)
Constructor for Mitab25Writer.
- Parameters:
output- aOutputStreamobject.
-
Mitab25Writer
public Mitab25Writer(Writer writer)
Constructor for Mitab25Writer.
- Parameters:
writer- aWriterobject.
-
Mitab25Writer
public Mitab25Writer(File file, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod) throws IOException
Constructor for Mitab25Writer.
- Parameters:
file- aFileobject.expansionMethod- aComplexExpansionMethodobject.- Throws:
IOException- if any.
-
Mitab25Writer
public Mitab25Writer(OutputStream output, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod) throws IOException
Constructor for Mitab25Writer.
- Parameters:
output- aOutputStreamobject.expansionMethod- aComplexExpansionMethodobject.- Throws:
IOException- if any.
-
Mitab25Writer
public Mitab25Writer(Writer writer, ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod) throws IOException
Constructor for Mitab25Writer.
- Parameters:
writer- aWriterobject.expansionMethod- aComplexExpansionMethodobject.- Throws:
IOException- if any.
-
-
Method Detail
-
start
public void start() throws MIIOExceptionstart.
- Specified by:
startin interfaceInteractionWriter<Interaction>- Overrides:
startin classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Throws:
MIIOException- if any.
-
write
public void write(Interaction interaction) throws MIIOException
write.
- Specified by:
writein interfaceInteractionWriter<Interaction>- Overrides:
writein classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Parameters:
interaction- a T object.- Throws:
MIIOException- if any.
-
close
public void close() throws MIIOExceptionclose.
- Specified by:
closein interfaceInteractionWriter<Interaction>- Overrides:
closein classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Throws:
MIIOException- if any.
-
reset
public void reset() throws MIIOExceptionreset.
- Specified by:
resetin interfaceInteractionWriter<Interaction>- Overrides:
resetin classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Throws:
MIIOException- if any.
-
getVersion
public MitabVersion getVersion()
getVersion.
- Specified by:
getVersionin classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Returns:
- a
MitabVersionobject.
-
initialiseExpansionMethod
protected void initialiseExpansionMethod(ComplexExpansionMethod<Interaction,BinaryInteraction> expansionMethod)
initialiseExpansionMethod.
- Specified by:
initialiseExpansionMethodin classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Parameters:
expansionMethod- aComplexExpansionMethodobject.
-
initialiseWriter
protected void initialiseWriter(Writer writer)
initialiseWriter.
- Specified by:
initialiseWriterin classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Parameters:
writer- aWriterobject.
-
initialiseOutputStream
protected void initialiseOutputStream(OutputStream output)
initialiseOutputStream.
- Specified by:
initialiseOutputStreamin classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Parameters:
output- aOutputStreamobject.
-
initialiseFile
protected void initialiseFile(File file) throws IOException
initialiseFile.
- Specified by:
initialiseFilein classAbstractMitabWriter<Interaction,BinaryInteraction,Participant>- Parameters:
file- aFileobject.- Throws:
IOException- if any.
-
initialiseSubWriters
protected void initialiseSubWriters()
initialiseSubWriters.
-
setModelledInteractionWriter
protected void setModelledInteractionWriter(Mitab25ModelledWriter modelledInteractionWriter)
Setter for the field
modelledInteractionWriter.- Parameters:
modelledInteractionWriter- aMitab25ModelledWriterobject.
-
setInteractionEvidenceWriter
protected void setInteractionEvidenceWriter(Mitab25EvidenceWriter interactionEvidenceWriter)
Setter for the field
interactionEvidenceWriter.- Parameters:
interactionEvidenceWriter- aMitab25EvidenceWriterobject.
-
-