Package psidev.psi.mi.jami.json.elements
Class SimpleJsonInteractionWriter<I extends Interaction>
- java.lang.Object
-
- psidev.psi.mi.jami.json.elements.SimpleJsonInteractionWriter<I>
-
- All Implemented Interfaces:
JsonElementWriter<I>
- Direct Known Subclasses:
SimpleJsonBinaryInteractionWriter
,SimpleJsonInteractionEvidenceWriter
,SimpleJsonModelledInteractionWriter
public class SimpleJsonInteractionWriter<I extends Interaction> extends Object implements JsonElementWriter<I>
Json writer for interactions- Since:
18/07/14
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description SimpleJsonInteractionWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants)
Constructor for SimpleJsonInteractionWriter.SimpleJsonInteractionWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for SimpleJsonInteractionWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String[]
generateInteractionIdentifier(I object, Xref preferredIdentifier)
generateInteractionIdentifier.JsonElementWriter<CvTerm>
getCvWriter()
Getter for the fieldcvWriter
.OntologyTermFetcher
getFetcher()
Getter for the fieldfetcher
.JsonElementWriter<Xref>
getIdentifierWriter()
Getter for the fieldidentifierWriter
.IncrementalIdGenerator
getIdGenerator()
Getter for the fieldidGenerator
.JsonElementWriter
getParticipantWriter()
Getter for the fieldparticipantWriter
.protected Map<Feature,Integer>
getProcessedFeatures()
Getter for the fieldprocessedFeatures
.protected Map<String,String>
getProcessedInteractors()
Getter for the fieldprocessedInteractors
.protected Map<Entity,Integer>
getProcessedParticipants()
Getter for the fieldprocessedParticipants
.protected Writer
getWriter()
Getter for the fieldwriter
.protected boolean
hasIdentifiers(I object)
hasIdentifiers.protected void
initialiseDefaultParticipantWriter()
initialiseDefaultParticipantWriter.void
setCvWriter(JsonElementWriter<CvTerm> cvWriter)
Setter for the fieldcvWriter
.void
setFetcher(OntologyTermFetcher fetcher)
Setter for the fieldfetcher
.void
setIdentifierWriter(JsonElementWriter<Xref> identifierWriter)
Setter for the fieldidentifierWriter
.void
setIdGenerator(IncrementalIdGenerator idGenerator)
Setter for the fieldidGenerator
.void
setParticipantWriter(JsonElementWriter participantWriter)
Setter for the fieldparticipantWriter
.void
write(I object)
write.protected void
writeAllIdentifiers(I object)
writeAllIdentifiers.protected void
writeExpansionMethod(CvTerm expansion)
writeExpansionMethod.protected void
writeOtherExpansionMethodProperties()
writeOtherExpansionMethodProperties.protected void
writeOtherIdentifiers(I object)
writeOtherIdentifiers.protected void
writeOtherProperties(I object)
writeOtherProperties.
-
-
-
Constructor Detail
-
SimpleJsonInteractionWriter
public SimpleJsonInteractionWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants)
Constructor for SimpleJsonInteractionWriter.
-
SimpleJsonInteractionWriter
public SimpleJsonInteractionWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator)
Constructor for SimpleJsonInteractionWriter.
- Parameters:
writer
- aWriter
object.processedFeatures
- aMap
object.processedInteractors
- aMap
object.processedParticipants
- aMap
object.idGenerator
- aIncrementalIdGenerator
object.
-
-
Method Detail
-
write
public void write(I object) throws IOException
write.
- Specified by:
write
in interfaceJsonElementWriter<I extends Interaction>
- Parameters:
object
- a I object.- Throws:
IOException
- if any.
-
generateInteractionIdentifier
protected String[] generateInteractionIdentifier(I object, Xref preferredIdentifier)
generateInteractionIdentifier.
-
writeExpansionMethod
protected void writeExpansionMethod(CvTerm expansion) throws IOException
writeExpansionMethod.
- Parameters:
expansion
- aCvTerm
object.- Throws:
IOException
- if any.
-
writeOtherExpansionMethodProperties
protected void writeOtherExpansionMethodProperties() throws IOException
writeOtherExpansionMethodProperties.
- Throws:
IOException
- if any.
-
writeAllIdentifiers
protected void writeAllIdentifiers(I object) throws IOException
writeAllIdentifiers.
- Parameters:
object
- a I object.- Throws:
IOException
- if any.
-
writeOtherIdentifiers
protected void writeOtherIdentifiers(I object) throws IOException
writeOtherIdentifiers.
- Parameters:
object
- a I object.- Throws:
IOException
- if any.
-
hasIdentifiers
protected boolean hasIdentifiers(I object)
hasIdentifiers.
- Parameters:
object
- a I object.- Returns:
- a boolean.
-
writeOtherProperties
protected void writeOtherProperties(I object) throws IOException
writeOtherProperties.
- Parameters:
object
- a I object.- Throws:
IOException
- if any.
-
getCvWriter
public JsonElementWriter<CvTerm> getCvWriter()
Getter for the field
cvWriter
.- Returns:
- a
JsonElementWriter
object.
-
setCvWriter
public void setCvWriter(JsonElementWriter<CvTerm> cvWriter)
Setter for the field
cvWriter
.- Parameters:
cvWriter
- aJsonElementWriter
object.
-
getIdentifierWriter
public JsonElementWriter<Xref> getIdentifierWriter()
Getter for the field
identifierWriter
.- Returns:
- a
JsonElementWriter
object.
-
setIdentifierWriter
public void setIdentifierWriter(JsonElementWriter<Xref> identifierWriter)
Setter for the field
identifierWriter
.- Parameters:
identifierWriter
- aJsonElementWriter
object.
-
getIdGenerator
public IncrementalIdGenerator getIdGenerator()
Getter for the field
idGenerator
.- Returns:
- a
IncrementalIdGenerator
object.
-
setIdGenerator
public void setIdGenerator(IncrementalIdGenerator idGenerator)
Setter for the field
idGenerator
.- Parameters:
idGenerator
- aIncrementalIdGenerator
object.
-
getParticipantWriter
public JsonElementWriter getParticipantWriter()
Getter for the field
participantWriter
.- Returns:
- a
JsonElementWriter
object.
-
initialiseDefaultParticipantWriter
protected void initialiseDefaultParticipantWriter()
initialiseDefaultParticipantWriter.
-
setParticipantWriter
public void setParticipantWriter(JsonElementWriter participantWriter)
Setter for the field
participantWriter
.- Parameters:
participantWriter
- aJsonElementWriter
object.
-
getFetcher
public OntologyTermFetcher getFetcher()
Getter for the field
fetcher
.- Returns:
- a
OntologyTermFetcher
object.
-
setFetcher
public void setFetcher(OntologyTermFetcher fetcher)
Setter for the field
fetcher
.- Parameters:
fetcher
- aOntologyTermFetcher
object.
-
getProcessedInteractors
protected Map<String,String> getProcessedInteractors()
Getter for the field
processedInteractors
.- Returns:
- a
Map
object.
-
getProcessedFeatures
protected Map<Feature,Integer> getProcessedFeatures()
Getter for the field
processedFeatures
.- Returns:
- a
Map
object.
-
-