Package psidev.psi.mi.jami.json.nary
Class MIJsonEvidenceWriter
- java.lang.Object
-
- psidev.psi.mi.jami.json.nary.AbstractMIJsonWriter<InteractionEvidence>
-
- psidev.psi.mi.jami.json.nary.MIJsonEvidenceWriter
-
- All Implemented Interfaces:
InteractionWriter<InteractionEvidence>
public class MIJsonEvidenceWriter extends AbstractMIJsonWriter<InteractionEvidence>
Abstract JSON writer for interactions (n-ary json format)- Since:
03/07/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description MIJsonEvidenceWriter()
Constructor for MIJsonEvidenceWriter.MIJsonEvidenceWriter(File file, OntologyTermFetcher fetcher)
Constructor for MIJsonEvidenceWriter.MIJsonEvidenceWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for MIJsonEvidenceWriter.MIJsonEvidenceWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for MIJsonEvidenceWriter.MIJsonEvidenceWriter(Writer writer, OntologyTermFetcher fetcher, Map<String,String> processedInteractors, Map<Feature,Integer> processedFeatures, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for MIJsonEvidenceWriter.MIJsonEvidenceWriter(Map<String,String> processedInteractors, Map<Feature,Integer> processedFeatures, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for MIJsonEvidenceWriter.
-
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.void
reset()
reset.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, write, writeEnd, writeStart
-
-
-
-
Constructor Detail
-
MIJsonEvidenceWriter
public MIJsonEvidenceWriter()
Constructor for MIJsonEvidenceWriter.
-
MIJsonEvidenceWriter
public MIJsonEvidenceWriter(File file, OntologyTermFetcher fetcher) throws IOException
Constructor for MIJsonEvidenceWriter.
- Parameters:
file
- aFile
object.fetcher
- aOntologyTermFetcher
object.- Throws:
IOException
- if any.
-
MIJsonEvidenceWriter
public MIJsonEvidenceWriter(OutputStream output, OntologyTermFetcher fetcher)
Constructor for MIJsonEvidenceWriter.
- Parameters:
output
- aOutputStream
object.fetcher
- aOntologyTermFetcher
object.
-
MIJsonEvidenceWriter
public MIJsonEvidenceWriter(Writer writer, OntologyTermFetcher fetcher)
Constructor for MIJsonEvidenceWriter.
- Parameters:
writer
- aWriter
object.fetcher
- aOntologyTermFetcher
object.
-
MIJsonEvidenceWriter
public MIJsonEvidenceWriter(Writer writer, OntologyTermFetcher fetcher, Map<String,String> processedInteractors, Map<Feature,Integer> processedFeatures, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for MIJsonEvidenceWriter.
- Parameters:
writer
- aWriter
object.fetcher
- aOntologyTermFetcher
object.processedInteractors
- aMap
object.processedFeatures
- aMap
object.processedParticipants
- aMap
object.idGenerator
- aIncrementalIdGenerator
object.
-
MIJsonEvidenceWriter
public MIJsonEvidenceWriter(Map<String,String> processedInteractors, Map<Feature,Integer> processedFeatures, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for MIJsonEvidenceWriter.
- Parameters:
processedInteractors
- aMap
object.processedFeatures
- aMap
object.processedParticipants
- aMap
object.idGenerator
- aIncrementalIdGenerator
object.
-
-
Method Detail
-
flush
public void flush() throws MIIOException
flush.
- Specified by:
flush
in interfaceInteractionWriter<InteractionEvidence>
- Overrides:
flush
in classAbstractMIJsonWriter<InteractionEvidence>
- Throws:
MIIOException
- if any.
-
close
public void close() throws MIIOException
close.
- Specified by:
close
in interfaceInteractionWriter<InteractionEvidence>
- Overrides:
close
in classAbstractMIJsonWriter<InteractionEvidence>
- Throws:
MIIOException
- if any.
-
reset
public void reset() throws MIIOException
reset.
- Specified by:
reset
in interfaceInteractionWriter<InteractionEvidence>
- Overrides:
reset
in classAbstractMIJsonWriter<InteractionEvidence>
- 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<InteractionEvidence>
- Overrides:
initialiseContext
in classAbstractMIJsonWriter<InteractionEvidence>
- Parameters:
options
- : the options given by the user
-
writeComplex
protected void writeComplex(Complex complex)
writeComplex.
- Specified by:
writeComplex
in classAbstractMIJsonWriter<InteractionEvidence>
- Parameters:
complex
- aComplex
object.
-
initialiseInteractionWriter
protected void initialiseInteractionWriter()
initialiseInteractionWriter.
- Specified by:
initialiseInteractionWriter
in classAbstractMIJsonWriter<InteractionEvidence>
-
-