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.JsonElementWritergetFeatureWriter()Getter for the fieldfeatureWriter.protected OntologyTermFetchergetFetcher()Getter for the fieldfetcher.IncrementalIdGeneratorgetIdGenerator()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 WritergetWriter()Getter for the fieldwriter.protected voidinitialiseDefaultFeatureWriter()initialiseDefaultFeatureWriter.voidsetCvWriter(JsonElementWriter<CvTerm> cvWriter)Setter for the fieldcvWriter.voidsetFeatureWriter(JsonElementWriter featureWriter)Setter for the fieldfeatureWriter.voidsetIdGenerator(IncrementalIdGenerator idGenerator)Setter for the fieldidGenerator.voidsetStoichiometryWriter(JsonElementWriter<Stoichiometry> stoichiometryWriter)Setter for the fieldstoichiometryWriter.voidwrite(P object)write.protected <F extends Feature>
voidwriteAllFeatures(Collection<F> features)writeAllFeatures.protected <F extends Feature>
voidwriteFeatures(String name, Collection<F> features)writeFeatures.protected voidwriteOtherProperties(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- aWriterobject.processedFeatures- aMapobject.processedInteractors- aMapobject.processedParticipants- aMapobject.idGenerator- aIncrementalIdGeneratorobject.fetcher- aOntologyTermFetcherobject.
-
-
Method Detail
-
write
public void write(P object) throws IOException
write.
- Specified by:
writein 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- aCollectionobject.- 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- aStringobject.features- aCollectionobject.- 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
JsonElementWriterobject.
-
setCvWriter
public void setCvWriter(JsonElementWriter<CvTerm> cvWriter)
Setter for the field
cvWriter.- Parameters:
cvWriter- aJsonElementWriterobject.
-
getFeatureWriter
public JsonElementWriter getFeatureWriter()
Getter for the field
featureWriter.- Returns:
- a
JsonElementWriterobject.
-
initialiseDefaultFeatureWriter
protected void initialiseDefaultFeatureWriter()
initialiseDefaultFeatureWriter.
-
setFeatureWriter
public void setFeatureWriter(JsonElementWriter featureWriter)
Setter for the field
featureWriter.- Parameters:
featureWriter- aJsonElementWriterobject.
-
getIdGenerator
public IncrementalIdGenerator getIdGenerator()
Getter for the field
idGenerator.- Returns:
- a
IncrementalIdGeneratorobject.
-
setIdGenerator
public void setIdGenerator(IncrementalIdGenerator idGenerator)
Setter for the field
idGenerator.- Parameters:
idGenerator- aIncrementalIdGeneratorobject.
-
getStoichiometryWriter
public JsonElementWriter<Stoichiometry> getStoichiometryWriter()
Getter for the field
stoichiometryWriter.- Returns:
- a
JsonElementWriterobject.
-
setStoichiometryWriter
public void setStoichiometryWriter(JsonElementWriter<Stoichiometry> stoichiometryWriter)
Setter for the field
stoichiometryWriter.- Parameters:
stoichiometryWriter- aJsonElementWriterobject.
-
getProcessedFeatures
protected Map<Feature,Integer> getProcessedFeatures()
Getter for the field
processedFeatures.- Returns:
- a
Mapobject.
-
getProcessedInteractors
protected Map<String,String> getProcessedInteractors()
Getter for the field
processedInteractors.- Returns:
- a
Mapobject.
-
getProcessedParticipants
protected Map<Entity,Integer> getProcessedParticipants()
Getter for the field
processedParticipants.- Returns:
- a
Mapobject.
-
getFetcher
protected OntologyTermFetcher getFetcher()
Getter for the field
fetcher.- Returns:
- a
OntologyTermFetcherobject.
-
-