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
.IncrementalIdGenerator
getIdGenerator()
Getter for the fieldidGenerator
.JsonRangeWriter
getRangeWriter()
Getter for the fieldrangeWriter
.protected Writer
getWriter()
Getter for the fieldwriter
.protected String
recognizeFeatureCategory(F feature)
recognizeFeatureCategory.void
setCvWriter(JsonElementWriter<CvTerm> cvWriter)
Setter for the fieldcvWriter
.void
setIdentifierWriter(JsonElementWriter<Xref> identifierWriter)
Setter for the fieldidentifierWriter
.void
setIdGenerator(IncrementalIdGenerator idGenerator)
Setter for the fieldidGenerator
.void
setRangeWriter(JsonRangeWriter rangeWriter)
Setter for the fieldrangeWriter
.void
write(F object)
write.protected void
writeOtherProperties(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
- aWriter
object.processedFeatures
- aMap
object.processedInteractors
- aMap
object.processedParticipants
- aMap
object.idGenerator
- aIncrementalIdGenerator
object.fetcher
- aOntologyTermFetcher
object.
-
-
Method Detail
-
write
public void write(F object) throws IOException
write.
- Specified by:
write
in 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
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.
-
getRangeWriter
public JsonRangeWriter getRangeWriter()
Getter for the field
rangeWriter
.- Returns:
- a
JsonRangeWriter
object.
-
setRangeWriter
public void setRangeWriter(JsonRangeWriter rangeWriter)
Setter for the field
rangeWriter
.- Parameters:
rangeWriter
- aJsonRangeWriter
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.
-
-