Package org.molgenis.vibe.core.formats
Class GeneDiseaseCollectionSerializer
- java.lang.Object
-
- org.molgenis.vibe.core.formats.GeneDiseaseCollectionJsonSerialization
-
- org.molgenis.vibe.core.formats.GeneDiseaseCollectionSerializer
-
- All Implemented Interfaces:
com.google.gson.JsonSerializer<GeneDiseaseCollection>
public class GeneDiseaseCollectionSerializer extends GeneDiseaseCollectionJsonSerialization implements com.google.gson.JsonSerializer<GeneDiseaseCollection>
Serializers aGeneDiseaseCollectiontojson.
IMPORTANT: Currently theSource.getUri()is not used as key. This increases the readability of the json file and reduces file size. In practice this should not cause any issues within a singleGeneDiseaseCollection. However, if multipleSourceshave the sameSource.getName(), this would lead to a corruptjsonoutput. This could for example be caused when a singleGeneDiseaseCollectioncontains data from multipleSourceobjects that indicate different versions of the sameSource.getFullName()(which under normal circumstances should not happen).
-
-
Field Summary
-
Fields inherited from class org.molgenis.vibe.core.formats.GeneDiseaseCollectionJsonSerialization
COMBINATION_DISEASE_KEY, COMBINATION_DISGENET_SCORE_KEY, COMBINATION_GENE_KEY, COMBINATION_SOURCE_COUNT_KEY, COMBINATION_SOURCE_NAME_KEY, COMBINATION_SOURCE_PUBMED_URI_KEY, COMBINATION_SOURCE_PUBMED_YEAR_KEY, COMBINATION_SOURCE_PUBMEDS_KEY, COMBINATION_SOURCES_KEY, COMBINATIONS_KEY, DISEASE_NAME_KEY, DISEASES_KEY, GENE_SYMBOL_KEY, GENES_KEY, SOURCE_FULL_NAME_KEY, SOURCE_LEVEL_KEY, SOURCE_URI_KEY, SOURCES_KEY
-
-
Constructor Summary
Constructors Constructor Description GeneDiseaseCollectionSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gson.JsonElementserialize(GeneDiseaseCollection src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
-
-
Method Detail
-
serialize
public com.google.gson.JsonElement serialize(GeneDiseaseCollection src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
- Specified by:
serializein interfacecom.google.gson.JsonSerializer<GeneDiseaseCollection>
-
-