Package psidev.psi.mi.jami.json.elements
Class SimpleJsonFeatureWriter<F extends Feature>
- java.lang.Object
-
- psidev.psi.mi.jami.json.elements.SimpleJsonFeatureWriter<F>
-
- All Implemented Interfaces:
JsonElementWriter<F>
- Direct Known Subclasses:
SimpleJsonFeatureEvidenceWriter,SimpleJsonModelledFeatureWriter
public class SimpleJsonFeatureWriter<F extends Feature> extends Object implements JsonElementWriter<F>
Json writer for features- Since:
18/07/14
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description SimpleJsonFeatureWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants)Constructor for SimpleJsonFeatureWriter.SimpleJsonFeatureWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator, OntologyTermFetcher fetcher)Constructor for SimpleJsonFeatureWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonElementWriter<CvTerm>getCvWriter()Getter for the fieldcvWriter.JsonElementWriter<Xref>getIdentifierWriter()Getter for the fieldidentifierWriter.IncrementalIdGeneratorgetIdGenerator()Getter for the fieldidGenerator.JsonRangeWritergetRangeWriter()Getter for the fieldrangeWriter.protected WritergetWriter()Getter for the fieldwriter.protected StringrecognizeFeatureCategory(F feature)recognizeFeatureCategory.voidsetCvWriter(JsonElementWriter<CvTerm> cvWriter)Setter for the fieldcvWriter.voidsetIdentifierWriter(JsonElementWriter<Xref> identifierWriter)Setter for the fieldidentifierWriter.voidsetIdGenerator(IncrementalIdGenerator idGenerator)Setter for the fieldidGenerator.voidsetRangeWriter(JsonRangeWriter rangeWriter)Setter for the fieldrangeWriter.voidwrite(F object)write.protected voidwriteOtherProperties(F object)writeOtherProperties.
-
-
-
Constructor Detail
-
SimpleJsonFeatureWriter
public SimpleJsonFeatureWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants)
Constructor for SimpleJsonFeatureWriter.
-
SimpleJsonFeatureWriter
public SimpleJsonFeatureWriter(Writer writer, Map<Feature,Integer> processedFeatures, Map<String,String> processedInteractors, Map<Entity,Integer> processedParticipants, IncrementalIdGenerator idGenerator, OntologyTermFetcher fetcher)
Constructor for SimpleJsonFeatureWriter.
- Parameters:
writer- aWriterobject.processedFeatures- aMapobject.processedInteractors- aMapobject.processedParticipants- aMapobject.idGenerator- aIncrementalIdGeneratorobject.fetcher- aOntologyTermFetcherobject.
-
-
Method Detail
-
write
public void write(F object) throws IOException
write.
- Specified by:
writein interfaceJsonElementWriter<F extends Feature>- Parameters:
object- a F object.- Throws:
IOException- if any.
-
writeOtherProperties
protected void writeOtherProperties(F object) throws IOException
writeOtherProperties.
- Parameters:
object- a F 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.
-
getIdentifierWriter
public JsonElementWriter<Xref> getIdentifierWriter()
Getter for the field
identifierWriter.- Returns:
- a
JsonElementWriterobject.
-
setIdentifierWriter
public void setIdentifierWriter(JsonElementWriter<Xref> identifierWriter)
Setter for the field
identifierWriter.- Parameters:
identifierWriter- aJsonElementWriterobject.
-
getRangeWriter
public JsonRangeWriter getRangeWriter()
Getter for the field
rangeWriter.- Returns:
- a
JsonRangeWriterobject.
-
setRangeWriter
public void setRangeWriter(JsonRangeWriter rangeWriter)
Setter for the field
rangeWriter.- Parameters:
rangeWriter- aJsonRangeWriterobject.
-
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.
-
-