Package psidev.psi.mi.jami.json.binary
Class AbstractMIJsonBinaryWriter<I extends BinaryInteraction>
- java.lang.Object
-
- psidev.psi.mi.jami.json.nary.AbstractMIJsonWriter<I>
-
- psidev.psi.mi.jami.json.binary.AbstractMIJsonBinaryWriter<I>
-
- All Implemented Interfaces:
InteractionWriter<I>
- Direct Known Subclasses:
LightMIJsonBinaryWriter
,MIJsonBinaryEvidenceWriter
,MIJsonBinaryWriter
,MIJsonModelledBinaryWriter
public abstract class AbstractMIJsonBinaryWriter<I extends BinaryInteraction> extends AbstractMIJsonWriter<I>
Abstract JSON writer for binary interactions (binary json format)- Since:
03/07/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractMIJsonBinaryWriter()
Constructor for AbstractMIJsonBinaryWriter.AbstractMIJsonBinaryWriter(File file, OntologyTermFetcher fetcher)
Constructor for AbstractMIJsonBinaryWriter.AbstractMIJsonBinaryWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for AbstractMIJsonBinaryWriter.AbstractMIJsonBinaryWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for AbstractMIJsonBinaryWriter.protected
AbstractMIJsonBinaryWriter(Writer writer, OntologyTermFetcher fetcher, Map<String,String> processedInteractors, Map<Feature,Integer> processedFeatures, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for AbstractMIJsonBinaryWriter.protected
AbstractMIJsonBinaryWriter(Map<String,String> processedInteractors, Map<Feature,Integer> processedFeatures, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for AbstractMIJsonBinaryWriter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
close.void
flush()
flush.protected Integer
getExpansionId()
Getter for the fieldexpansionId
.protected abstract void
initExpansionMethodInteractionWriter(Integer expansionId)
initExpansionMethodInteractionWriter.void
initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of optionsvoid
reset()
reset.void
setExpansionId(Integer expansionId)
Setter for the fieldexpansionId
.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, initialiseInteractionWriter, registerAndWriteInteractor, setFetcher, setInteractionWriter, start, write, write, write, writeEnd, writeStart
-
-
-
-
Constructor Detail
-
AbstractMIJsonBinaryWriter
public AbstractMIJsonBinaryWriter()
Constructor for AbstractMIJsonBinaryWriter.
-
AbstractMIJsonBinaryWriter
public AbstractMIJsonBinaryWriter(File file, OntologyTermFetcher fetcher) throws IOException
Constructor for AbstractMIJsonBinaryWriter.
- Parameters:
file
- aFile
object.fetcher
- aOntologyTermFetcher
object.- Throws:
IOException
- if any.
-
AbstractMIJsonBinaryWriter
public AbstractMIJsonBinaryWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for AbstractMIJsonBinaryWriter.
- Parameters:
output
- aOutputStream
object.fetcher
- aOntologyTermFetcher
object.
-
AbstractMIJsonBinaryWriter
public AbstractMIJsonBinaryWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for AbstractMIJsonBinaryWriter.
- Parameters:
writer
- aWriter
object.fetcher
- aOntologyTermFetcher
object.
-
AbstractMIJsonBinaryWriter
protected AbstractMIJsonBinaryWriter(Writer writer, OntologyTermFetcher fetcher, Map<String,String> processedInteractors, Map<Feature,Integer> processedFeatures, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for AbstractMIJsonBinaryWriter.
- Parameters:
writer
- aWriter
object.fetcher
- aOntologyTermFetcher
object.processedInteractors
- aMap
object.processedFeatures
- aMap
object.processedParticipants
- aMap
object.idGenerator
- aIncrementalIdGenerator
object.
-
AbstractMIJsonBinaryWriter
protected AbstractMIJsonBinaryWriter(Map<String,String> processedInteractors, Map<Feature,Integer> processedFeatures, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for AbstractMIJsonBinaryWriter.
- Parameters:
processedInteractors
- aMap
object.processedFeatures
- aMap
object.processedParticipants
- aMap
object.idGenerator
- aIncrementalIdGenerator
object.
-
-
Method Detail
-
close
public void close() throws MIIOException
close.
- Specified by:
close
in interfaceInteractionWriter<I extends BinaryInteraction>
- Overrides:
close
in classAbstractMIJsonWriter<I extends BinaryInteraction>
- Throws:
MIIOException
- if any.
-
reset
public void reset() throws MIIOException
reset.
- Specified by:
reset
in interfaceInteractionWriter<I extends BinaryInteraction>
- Overrides:
reset
in classAbstractMIJsonWriter<I extends BinaryInteraction>
- 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<I extends BinaryInteraction>
- Overrides:
initialiseContext
in classAbstractMIJsonWriter<I extends BinaryInteraction>
- Parameters:
options
- : the options given by the user
-
flush
public void flush() throws MIIOException
flush.
- Specified by:
flush
in interfaceInteractionWriter<I extends BinaryInteraction>
- Overrides:
flush
in classAbstractMIJsonWriter<I extends BinaryInteraction>
- Throws:
MIIOException
- if any.
-
setExpansionId
public void setExpansionId(Integer expansionId)
Setter for the field
expansionId
.- Parameters:
expansionId
- aInteger
object.
-
initExpansionMethodInteractionWriter
protected abstract void initExpansionMethodInteractionWriter(Integer expansionId)
initExpansionMethodInteractionWriter.
- Parameters:
expansionId
- aInteger
object.
-
getExpansionId
protected Integer getExpansionId()
Getter for the field
expansionId
.- Returns:
- a
Integer
object.
-
writeComplex
protected void writeComplex(Complex complex)
writeComplex.
- Specified by:
writeComplex
in classAbstractMIJsonWriter<I extends BinaryInteraction>
- Parameters:
complex
- aComplex
object.
-
-