Package psidev.psi.mi.jami.datasource
Interface InteractionWriter<T extends Interaction>
-
- All Known Implementing Classes:
AbstractCompactXmlMixWriter
,AbstractCompactXmlWriter
,AbstractExpandedXmlMixWriter
,AbstractExpandedXmlWriter
,AbstractMIHtmlWriter
,AbstractMIJsonBinaryWriter
,AbstractMIJsonWriter
,AbstractMIJsonWriter
,AbstractMitab25BinaryWriter
,AbstractMitab26BinaryWriter
,AbstractMitab27BinaryWriter
,AbstractMitab28BinaryWriter
,AbstractMitabWriter
,AbstractXmlWriter
,CompactXmlBinaryEvidenceWriter
,CompactXmlBinaryEvidenceWriter
,CompactXmlBinaryWriter
,CompactXmlBinaryWriter
,CompactXmlComplexWriter
,CompactXmlComplexWriter
,CompactXmlEvidenceWriter
,CompactXmlEvidenceWriter
,CompactXmlModelledBinaryWriter
,CompactXmlModelledBinaryWriter
,CompactXmlModelledWriter
,CompactXmlModelledWriter
,CompactXmlNamedBinaryEvidenceWriter
,CompactXmlNamedBinaryWriter
,CompactXmlNamedEvidenceWriter
,CompactXmlNamedModelledBinaryWriter
,CompactXmlNamedModelledWriter
,CompactXmlNamedWriter
,CompactXmlWriter
,CompactXmlWriter
,DefaultMitabWriter
,DefaultXmlWriter
,ExpandedXmlBinaryEvidenceWriter
,ExpandedXmlBinaryEvidenceWriter
,ExpandedXmlBinaryWriter
,ExpandedXmlBinaryWriter
,ExpandedXmlComplexWriter
,ExpandedXmlComplexWriter
,ExpandedXmlEvidenceWriter
,ExpandedXmlEvidenceWriter
,ExpandedXmlModelledBinaryWriter
,ExpandedXmlModelledBinaryWriter
,ExpandedXmlModelledWriter
,ExpandedXmlModelledWriter
,ExpandedXmlNamedBinaryEvidenceWriter
,ExpandedXmlNamedBinaryWriter
,ExpandedXmlNamedEvidenceWriter
,ExpandedXmlNamedModelledBinaryWriter
,ExpandedXmlNamedModelledWriter
,ExpandedXmlNamedWriter
,ExpandedXmlWriter
,ExpandedXmlWriter
,LightCompactXmlBinaryWriter
,LightCompactXmlBinaryWriter
,LightCompactXmlNamedBinaryWriter
,LightCompactXmlNamedWriter
,LightCompactXmlWriter
,LightCompactXmlWriter
,LightExpandedXmlBinaryWriter
,LightExpandedXmlBinaryWriter
,LightExpandedXmlNamedBinaryWriter
,LightExpandedXmlNamedWriter
,LightExpandedXmlWriter
,LightExpandedXmlWriter
,LightMIHtmlWriter
,LightMIJsonBinaryWriter
,LightMIJsonWriter
,LightMIJsonWriter
,LightMitab25BinaryWriter
,LightMitab25Writer
,LightMitab26BinaryWriter
,LightMitab26Writer
,LightMitab27BinaryWriter
,LightMitab27Writer
,LightMitab28BinaryWriter
,LightMitab28Writer
,MIEvidenceHtmlWriter
,MIHtmlWriter
,MIJsonBinaryEvidenceWriter
,MIJsonBinaryWriter
,MIJsonEvidenceWriter
,MIJsonEvidenceWriter
,MIJsonModelledBinaryWriter
,MIJsonModelledWriter
,MIJsonModelledWriter
,MIJsonWriter
,MIJsonWriter
,MIModelledHtmlWriter
,Mitab25BinaryEvidenceWriter
,Mitab25BinaryEvidenceWriter
,Mitab25BinaryWriter
,Mitab25BinaryWriter
,Mitab25EvidenceWriter
,Mitab25EvidenceWriter
,Mitab25ModelledBinaryWriter
,Mitab25ModelledBinaryWriter
,Mitab25ModelledWriter
,Mitab25ModelledWriter
,Mitab25Writer
,Mitab25Writer
,Mitab26BinaryEvidenceWriter
,Mitab26BinaryEvidenceWriter
,Mitab26BinaryWriter
,Mitab26BinaryWriter
,Mitab26EvidenceWriter
,Mitab26EvidenceWriter
,Mitab26ModelledBinaryWriter
,Mitab26ModelledBinaryWriter
,Mitab26ModelledWriter
,Mitab26ModelledWriter
,Mitab26Writer
,Mitab26Writer
,Mitab27BinaryEvidenceWriter
,Mitab27BinaryEvidenceWriter
,Mitab27BinaryWriter
,Mitab27BinaryWriter
,Mitab27EvidenceWriter
,Mitab27EvidenceWriter
,Mitab27ModelledBinaryWriter
,Mitab27ModelledBinaryWriter
,Mitab27ModelledWriter
,Mitab27ModelledWriter
,Mitab27Writer
,Mitab27Writer
,Mitab28BinaryEvidenceWriter
,Mitab28BinaryEvidenceWriter
,Mitab28BinaryWriter
,Mitab28BinaryWriter
,Mitab28EvidenceWriter
,Mitab28EvidenceWriter
,Mitab28ModelledBinaryWriter
,Mitab28ModelledBinaryWriter
,Mitab28ModelledWriter
,Mitab28ModelledWriter
,Mitab28Writer
,Mitab28Writer
public interface InteractionWriter<T extends Interaction>
The InteractionWriter can write interactions in a datasource (files, database)- Since:
07/06/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the InteractionWriter.void
end()
Method to call when we reach the endvoid
flush()
Flushes the writer (commit or write on disk)void
initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of optionsvoid
reset()
This method will reset the writer from all loaded options.void
start()
Method to call before starting to write but after initialising the contextvoid
write(Collection<? extends T> interactions)
Writes a collection of Interaction objectsvoid
write(Iterator<? extends T> interactions)
Writes Interaction objects using iteratorvoid
write(T interaction)
Writes an interaction
-
-
-
Method Detail
-
initialiseContext
void initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of options- Parameters:
options
- : the options given by the user
-
start
void start() throws MIIOException
Method to call before starting to write but after initialising the context- Throws:
MIIOException
- if cannot start writing
-
end
void end() throws MIIOException
Method to call when we reach the end- Throws:
MIIOException
- : if cannot end
-
write
void write(T interaction) throws MIIOException
Writes an interaction- Parameters:
interaction
- : the interaction to write- Throws:
MIIOException
- : if cannot write
-
write
void write(Collection<? extends T> interactions) throws MIIOException
Writes a collection of Interaction objects- Parameters:
interactions
- : the interactions to write- Throws:
MIIOException
- : if cannot write
-
write
void write(Iterator<? extends T> interactions) throws MIIOException
Writes Interaction objects using iterator- Parameters:
interactions
- : the iterator of interactions to write- Throws:
MIIOException
- : if cannot write
-
flush
void flush() throws MIIOException
Flushes the writer (commit or write on disk)- Throws:
MIIOException
- : if cannot flush
-
close
void close() throws MIIOException
Closes the InteractionWriter. It will flushes before closing. It will close any provided outputStream and writer.- Throws:
MIIOException
- : if cannot close
-
reset
void reset() throws MIIOException
This method will reset the writer from all loaded options. The interaction writer will be back to what is was before the initialiseContext was called. To re-use the interaction writer after calling the reset() method, the data source needs to be re-initialised with initialiseContext. Any provided ouputStream or writer will not be closed and will have to be closed separately.- Throws:
MIIOException
- : if cannot reset
-
-