Package psidev.psi.mi.jami.json.binary
Class MIJsonBinaryWriter
- java.lang.Object
-
- psidev.psi.mi.jami.json.nary.AbstractMIJsonWriter<I>
-
- psidev.psi.mi.jami.json.binary.AbstractMIJsonBinaryWriter<BinaryInteraction>
-
- psidev.psi.mi.jami.json.binary.MIJsonBinaryWriter
-
- All Implemented Interfaces:
InteractionWriter<BinaryInteraction>
public class MIJsonBinaryWriter extends AbstractMIJsonBinaryWriter<BinaryInteraction>
JSON writer for mix of modelled and experimental interactions and- Since:
03/07/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description MIJsonBinaryWriter()
Constructor for MIJsonBinaryWriter.MIJsonBinaryWriter(File file, OntologyTermFetcher fetcher)
Constructor for MIJsonBinaryWriter.MIJsonBinaryWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for MIJsonBinaryWriter.MIJsonBinaryWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for MIJsonBinaryWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
close.void
flush()
flush.protected void
initExpansionMethodInteractionWriter(Integer expansionId)
initExpansionMethodInteractionWriter.void
initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of optionsprotected void
initialiseInteractionWriter()
initialiseInteractionWriter.protected void
initialiseSubWritersWith(Writer writer)
initialiseSubWritersWith.void
reset()
reset.void
write(BinaryInteraction interaction)
write.-
Methods inherited from class psidev.psi.mi.jami.json.binary.AbstractMIJsonBinaryWriter
getExpansionId, setExpansionId, writeComplex
-
Methods inherited from class psidev.psi.mi.jami.json.nary.AbstractMIJsonWriter
clear, end, getFetcher, getIdGenerator, getInteractionWriter, getInteractorWriter, getProcessedFeatures, getProcessedInteractors, getProcessedParticipants, getWriter, registerAndWriteInteractor, setFetcher, setInteractionWriter, start, write, write, writeEnd, writeStart
-
-
-
-
Constructor Detail
-
MIJsonBinaryWriter
public MIJsonBinaryWriter()
Constructor for MIJsonBinaryWriter.
-
MIJsonBinaryWriter
public MIJsonBinaryWriter(File file, OntologyTermFetcher fetcher) throws IOException
Constructor for MIJsonBinaryWriter.
- Parameters:
file
- aFile
object.fetcher
- aOntologyTermFetcher
object.- Throws:
IOException
- if any.
-
MIJsonBinaryWriter
public MIJsonBinaryWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for MIJsonBinaryWriter.
- Parameters:
output
- aOutputStream
object.fetcher
- aOntologyTermFetcher
object.
-
MIJsonBinaryWriter
public MIJsonBinaryWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for MIJsonBinaryWriter.
- Parameters:
writer
- aWriter
object.fetcher
- aOntologyTermFetcher
object.
-
-
Method Detail
-
write
public void write(BinaryInteraction interaction) throws MIIOException
write.
- Specified by:
write
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
write
in classAbstractMIJsonWriter<BinaryInteraction>
- Parameters:
interaction
- a I object.- Throws:
MIIOException
- if any.
-
initialiseSubWritersWith
protected void initialiseSubWritersWith(Writer writer)
initialiseSubWritersWith.
- Parameters:
writer
- aWriter
object.
-
close
public void close() throws MIIOException
close.
- Specified by:
close
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
close
in classAbstractMIJsonBinaryWriter<BinaryInteraction>
- Throws:
MIIOException
- if any.
-
reset
public void reset() throws MIIOException
reset.
- Specified by:
reset
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
reset
in classAbstractMIJsonBinaryWriter<BinaryInteraction>
- Throws:
MIIOException
- if any.
-
initialiseInteractionWriter
protected void initialiseInteractionWriter()
initialiseInteractionWriter.
- Specified by:
initialiseInteractionWriter
in classAbstractMIJsonWriter<BinaryInteraction>
-
flush
public void flush() throws MIIOException
flush.
- Specified by:
flush
in interfaceInteractionWriter<BinaryInteraction>
- Overrides:
flush
in classAbstractMIJsonBinaryWriter<BinaryInteraction>
- Throws:
MIIOException
- if any.
-
initExpansionMethodInteractionWriter
protected void initExpansionMethodInteractionWriter(Integer expansionId)
initExpansionMethodInteractionWriter.
- Specified by:
initExpansionMethodInteractionWriter
in classAbstractMIJsonBinaryWriter<BinaryInteraction>
- Parameters:
expansionId
- aInteger
object.
-
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 classAbstractMIJsonBinaryWriter<BinaryInteraction>
- Parameters:
options
- : the options given by the user
-
-