package com.lagunex.nlp;

/**
 * Class that represents an Entity result of IdolOnDemand's analyzesentiment API
 * 
 * https://www.idolondemand.com/developer/apis/analyzesentiment#response
 * 
 * @author Carlos A. Henríquez Q. <carlos.henriquez@lagunex.com>
 */
public class Sentiment {
    private static final char SEPARATOR = '|';
    private String sentiment;
    private String topic;
    private double score;
    private String original_text;
    private String normalized_text;
    private int original_length;
    private int normalized_length; 

    /**
     * 
     * @return "sentiment|topic|score"
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(sentiment).append(SEPARATOR)
          .append(topic).append(SEPARATOR)
          .append(score);
        return sb.toString();
    }
    
    public String getSentiment() {
        return sentiment;
    }

    public void setSentiment(String sentiment) {
        this.sentiment = sentiment;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getOriginal_text() {
        return original_text;
    }

    public void setOriginal_text(String original_text) {
        this.original_text = original_text;
    }

    public String getNormalized_text() {
        return normalized_text;
    }

    public void setNormalized_text(String normalized_text) {
        this.normalized_text = normalized_text;
    }

    public int getOriginal_length() {
        return original_length;
    }

    public void setOriginal_length(int original_length) {
        this.original_length = original_length;
    }

    public int getNormalized_length() {
        return normalized_length;
    }

    public void setNormalized_length(int normalized_length) {
        this.normalized_length = normalized_length;
    }
}

@@ -19,16 +19,79 @@
 x.nlp;%0A%0A
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;%0A%0A
 /**%0A * C
@@ -317,16 +317,60 @@
 om%3E%0A */%0A
+@JsonIgnoreProperties(ignoreUnknown = true)%0A
 public c
@@ -518,147 +518,8 @@
 ore;
-%0A    private String original_text;%0A    private String normalized_text;%0A    private int original_length;%0A    private int normalized_length; 
 %0A%0A  
@@ -1222,24 +1222,24 @@
 le score) %7B%0A
+
         this
@@ -1263,779 +1263,7 @@
    %7D
-%0A%0A    public String getOriginal_text() %7B%0A        return original_text;%0A    %7D%0A%0A    public void setOriginal_text(String original_text) %7B%0A        this.original_text = original_text;%0A    %7D%0A%0A    public String getNormalized_text() %7B%0A        return normalized_text;%0A    %7D%0A%0A    public void setNormalized_text(String normalized_text) %7B%0A        this.normalized_text = normalized_text;%0A    %7D%0A%0A    public int getOriginal_length() %7B%0A        return original_length;%0A    %7D%0A%0A    public void setOriginal_length(int original_length) %7B%0A        this.original_length = original_length;%0A    %7D%0A%0A    public int getNormalized_length() %7B%0A        return normalized_length;%0A    %7D%0A%0A    public void setNormalized_length(int normalized_length) %7B%0A        this.normalized_length = normalized_length;%0A    %7D
 %0A%7D%0A

remove unused parameters from class