Package psidev.psi.mi.jami.json.elements
Class SimpleJsonParticipantWriter<P extends Participant>
- java.lang.Object
-
- psidev.psi.mi.jami.json.elements.SimpleJsonParticipantWriter<P>
-
- All Implemented Interfaces:
JsonElementWriter<P>
- Direct Known Subclasses:
SimpleJsonModelledParticipantWriter
,SimpleJsonParticipantEvidenceWriter
public class SimpleJsonParticipantWriter<P extends Participant> extends Object implements JsonElementWriter<P>
Json writer for participants- Since:
18/07/14
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description SimpleJsonParticipantWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants)
Constructor for SimpleJsonParticipantWriter.SimpleJsonParticipantWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator, OntologyTermFetcher fetcher)
Constructor for SimpleJsonParticipantWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonElementWriter<CvTerm>
getCvWriter()
Getter for the fieldcvWriter
.JsonElementWriter
getFeatureWriter()
Getter for the fieldfeatureWriter
.protected OntologyTermFetcher
getFetcher()
Getter for the fieldfetcher
.IncrementalIdGenerator
getIdGenerator()
Getter for the fieldidGenerator
.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
.JsonElementWriter<Stoichiometry>
getStoichiometryWriter()
Getter for the fieldstoichiometryWriter
.protected Writer
getWriter()
Getter for the fieldwriter
.protected void
initialiseDefaultFeatureWriter()
initialiseDefaultFeatureWriter.void
setCvWriter(JsonElementWriter<CvTerm> cvWriter)
Setter for the fieldcvWriter
.void
setFeatureWriter(JsonElementWriter featureWriter)
Setter for the fieldfeatureWriter
.void
setIdGenerator(IncrementalIdGenerator idGenerator)
Setter for the fieldidGenerator
.void
setStoichiometryWriter(JsonElementWriter<Stoichiometry> stoichiometryWriter)
Setter for the fieldstoichiometryWriter
.void
write(P object)
write.protected <F extends Feature>
voidwriteAllFeatures(Collection<F> features)
writeAllFeatures.protected <F extends Feature>
voidwriteFeatures(String name, Collection<F> features)
writeFeatures.protected void
writeOtherProperties(P object)
writeOtherProperties.
-
-
-
Constructor Detail
-
SimpleJsonParticipantWriter
public SimpleJsonParticipantWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants)
Constructor for SimpleJsonParticipantWriter.
-
SimpleJsonParticipantWriter
public SimpleJsonParticipantWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator, OntologyTermFetcher fetcher)
Constructor for SimpleJsonParticipantWriter.
- Parameters:
writer
- aWriter
object.processedFeatures
- aMap
object.processedInteractors
- aMap
object.processedParticipants
- aMap
object.idGenerator
- aIncrementalIdGenerator
object.fetcher
- aOntologyTermFetcher
object.
-
-
Method Detail
-
write
public void write(P object) throws IOException
write.
- Specified by:
write
in interfaceJsonElementWriter<P extends Participant>
- Parameters:
object
- a P object.- Throws:
IOException
- if any.
-
writeAllFeatures
protected <F extends Feature> void writeAllFeatures(Collection<F> features) throws IOException
writeAllFeatures.
- Type Parameters:
F
- a F object.- Parameters:
features
- aCollection
object.- Throws:
IOException
- if any.
-
writeFeatures
protected <F extends Feature> void writeFeatures(String name, Collection<F> features) throws IOException
writeFeatures.
- Type Parameters:
F
- a F object.- Parameters:
name
- aString
object.features
- aCollection
object.- Throws:
IOException
- if any.
-
writeOtherProperties
protected void writeOtherProperties(P object) throws IOException
writeOtherProperties.
- Parameters:
object
- a P 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.
-
getFeatureWriter
public JsonElementWriter getFeatureWriter()
Getter for the field
featureWriter
.- Returns:
- a
JsonElementWriter
object.
-
initialiseDefaultFeatureWriter
protected void initialiseDefaultFeatureWriter()
initialiseDefaultFeatureWriter.
-
setFeatureWriter
public void setFeatureWriter(JsonElementWriter featureWriter)
Setter for the field
featureWriter
.- Parameters:
featureWriter
- 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.
-
getStoichiometryWriter
public JsonElementWriter<Stoichiometry> getStoichiometryWriter()
Getter for the field
stoichiometryWriter
.- Returns:
- a
JsonElementWriter
object.
-
setStoichiometryWriter
public void setStoichiometryWriter(JsonElementWriter<Stoichiometry> stoichiometryWriter)
Setter for the field
stoichiometryWriter
.- Parameters:
stoichiometryWriter
- aJsonElementWriter
object.
-
getProcessedFeatures
protected Map<Feature,Integer> getProcessedFeatures()
Getter for the field
processedFeatures
.- Returns:
- a
Map
object.
-
getProcessedInteractors
protected Map<String,String> getProcessedInteractors()
Getter for the field
processedInteractors
.- Returns:
- a
Map
object.
-
getProcessedParticipants
protected Map<Entity,Integer> getProcessedParticipants()
Getter for the field
processedParticipants
.- Returns:
- a
Map
object.
-
getFetcher
protected OntologyTermFetcher getFetcher()
Getter for the field
fetcher
.- Returns:
- a
OntologyTermFetcher
object.
-
-