Package psidev.psi.mi.jami.json.nary
Class MIJsonWriter
- java.lang.Object
-
- psidev.psi.mi.jami.json.nary.AbstractMIJsonWriter<Interaction>
-
- psidev.psi.mi.jami.json.nary.MIJsonWriter
-
- All Implemented Interfaces:
InteractionWriter<Interaction>
public class MIJsonWriter extends AbstractMIJsonWriter<Interaction>
The jsonWriter which writes the all interactions- Since:
05/07/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description MIJsonWriter()
Constructor for MIJsonWriter.MIJsonWriter(File file, OntologyTermFetcher fetcher)
Constructor for MIJsonWriter.MIJsonWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for MIJsonWriter.MIJsonWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for MIJsonWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
close.void
flush()
flush.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(Interaction interaction)
write.protected void
writeComplex(Complex complex)
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
-
MIJsonWriter
public MIJsonWriter()
Constructor for MIJsonWriter.
-
MIJsonWriter
public MIJsonWriter(File file, OntologyTermFetcher fetcher) throws IOException
Constructor for MIJsonWriter.
- Parameters:
file
- aFile
object.fetcher
- aOntologyTermFetcher
object.- Throws:
IOException
- if any.
-
MIJsonWriter
public MIJsonWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for MIJsonWriter.
- Parameters:
output
- aOutputStream
object.fetcher
- aOntologyTermFetcher
object.
-
MIJsonWriter
public MIJsonWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for MIJsonWriter.
- Parameters:
writer
- aWriter
object.fetcher
- aOntologyTermFetcher
object.
-
-
Method Detail
-
initialiseSubWritersWith
protected void initialiseSubWritersWith(Writer writer)
initialiseSubWritersWith.
- Parameters:
writer
- aWriter
object.
-
close
public void close() throws MIIOException
close.
- Specified by:
close
in interfaceInteractionWriter<Interaction>
- Overrides:
close
in classAbstractMIJsonWriter<Interaction>
- Throws:
MIIOException
- if any.
-
reset
public void reset() throws MIIOException
reset.
- Specified by:
reset
in interfaceInteractionWriter<Interaction>
- Overrides:
reset
in classAbstractMIJsonWriter<Interaction>
- Throws:
MIIOException
- if any.
-
flush
public void flush() throws MIIOException
flush.
- Specified by:
flush
in interfaceInteractionWriter<Interaction>
- Overrides:
flush
in classAbstractMIJsonWriter<Interaction>
- Throws:
MIIOException
- if any.
-
writeComplex
protected void writeComplex(Complex complex)
writeComplex.
- Specified by:
writeComplex
in classAbstractMIJsonWriter<Interaction>
- Parameters:
complex
- aComplex
object.
-
initialiseInteractionWriter
protected void initialiseInteractionWriter()
initialiseInteractionWriter.
- Specified by:
initialiseInteractionWriter
in classAbstractMIJsonWriter<Interaction>
-
write
public void write(Interaction interaction) throws MIIOException
write.
- Specified by:
write
in interfaceInteractionWriter<Interaction>
- Overrides:
write
in classAbstractMIJsonWriter<Interaction>
- Parameters:
interaction
- a I object.- Throws:
MIIOException
- if any.
-
initialiseContext
public void initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of options- Specified by:
initialiseContext
in interfaceInteractionWriter<Interaction>
- Overrides:
initialiseContext
in classAbstractMIJsonWriter<Interaction>
- Parameters:
options
- : the options given by the user
-
-