package eu.socialsensor.framework.common.domain;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;

public class Concept implements JSONable {

	@Expose
    @SerializedName(value = "concept")
	ConceptType type;
	@Expose
    @SerializedName(value = "score")
	Double score;

	public enum ConceptType {
		Selfie, 
		Porn, 
		Messages, 
		Memes,
		Keepcalm, 
		Graphics, 
		Crowd, 
		Logos, 
		Nature
	}
	
	public Concept(String type, Double score) {
		this.type = ConceptType.valueOf(type);
		this.score = score;
	}
	
	public Concept(ConceptType type, Double score) {
		this.type = type;
		this.score = score;
	}
	
	public String getConcept() {
		return type.toString();
	}
	
	@Override
	public String toJSONString() {
		Gson gson = new GsonBuilder()
        	.excludeFieldsWithoutExposeAnnotation()
        	.create();
		return gson.toJson(this);
	}
	
}

@@ -205,50 +205,8 @@
 ame;
-%0Aimport com.google.gson.stream.JsonReader;
 %0A%0Apu
@@ -247,16 +247,87 @@
 able %7B%0A%0A
+%09private static final long serialVersionUID = -7389160446822526436L;%0A%09%0A
 %09@Expose
@@ -480,37 +480,29 @@
 %7B%0A%09%09
-Selfie, %0A%09%09Porn, %0A%09%09M
+graphics,%0A%09%09m
 essages,
  %0A%09%09
@@ -501,30 +501,20 @@
 ges,
- 
 %0A%09%09
-Memes,%0A%09%09K
+k
 eepcalm,
  %0A%09%09
@@ -513,51 +513,61 @@
 alm,
- 
 %0A%09%09
-Graphic
+meme
 s,
- 
 %0A%09%09
-Crowd, %0A%09%09Logo
+porn,%0A%09%09disturbing,%0A%09%09image
 s,
- 
 %0A%09%09
-Nature
+heavytext
 %0A%09%7D%0A

Change concept types