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 voidclose()close.voidflush()flush.protected voidinitExpansionMethodInteractionWriter(Integer expansionId)initExpansionMethodInteractionWriter.voidinitialiseContext(Map<String,Object> options)Initialise the context of the InteractionWriter given a map of optionsprotected voidinitialiseInteractionWriter()initialiseInteractionWriter.protected voidinitialiseSubWritersWith(Writer writer)initialiseSubWritersWith.voidreset()reset.voidwrite(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- aFileobject.fetcher- aOntologyTermFetcherobject.- Throws:
IOException- if any.
-
MIJsonBinaryWriter
public MIJsonBinaryWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for MIJsonBinaryWriter.
- Parameters:
output- aOutputStreamobject.fetcher- aOntologyTermFetcherobject.
-
MIJsonBinaryWriter
public MIJsonBinaryWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for MIJsonBinaryWriter.
- Parameters:
writer- aWriterobject.fetcher- aOntologyTermFetcherobject.
-
-
Method Detail
-
write
public void write(BinaryInteraction interaction) throws MIIOException
write.
- Specified by:
writein interfaceInteractionWriter<BinaryInteraction>- Overrides:
writein classAbstractMIJsonWriter<BinaryInteraction>- Parameters:
interaction- a I object.- Throws:
MIIOException- if any.
-
initialiseSubWritersWith
protected void initialiseSubWritersWith(Writer writer)
initialiseSubWritersWith.
- Parameters:
writer- aWriterobject.
-
close
public void close() throws MIIOExceptionclose.
- Specified by:
closein interfaceInteractionWriter<BinaryInteraction>- Overrides:
closein classAbstractMIJsonBinaryWriter<BinaryInteraction>- Throws:
MIIOException- if any.
-
reset
public void reset() throws MIIOExceptionreset.
- Specified by:
resetin interfaceInteractionWriter<BinaryInteraction>- Overrides:
resetin classAbstractMIJsonBinaryWriter<BinaryInteraction>- Throws:
MIIOException- if any.
-
initialiseInteractionWriter
protected void initialiseInteractionWriter()
initialiseInteractionWriter.
- Specified by:
initialiseInteractionWriterin classAbstractMIJsonWriter<BinaryInteraction>
-
flush
public void flush() throws MIIOExceptionflush.
- Specified by:
flushin interfaceInteractionWriter<BinaryInteraction>- Overrides:
flushin classAbstractMIJsonBinaryWriter<BinaryInteraction>- Throws:
MIIOException- if any.
-
initExpansionMethodInteractionWriter
protected void initExpansionMethodInteractionWriter(Integer expansionId)
initExpansionMethodInteractionWriter.
- Specified by:
initExpansionMethodInteractionWriterin classAbstractMIJsonBinaryWriter<BinaryInteraction>- Parameters:
expansionId- aIntegerobject.
-
initialiseContext
public void initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of options- Specified by:
initialiseContextin interfaceInteractionWriter<BinaryInteraction>- Overrides:
initialiseContextin classAbstractMIJsonBinaryWriter<BinaryInteraction>- Parameters:
options- : the options given by the user
-
-