com.hp.autonomy.hod.client.api.analysis.sentiment.SentimentAnalysisAggregate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-hod-client Show documentation
Show all versions of java-hod-client Show documentation
Java Client for communicating with HP Haven OnDemand
/*
* Copyright 2015-2016 Hewlett-Packard Development Company, L.P.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
*/
package com.hp.autonomy.hod.client.api.analysis.sentiment;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* Holds the aggregate sentiment
*/
@Data
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@JsonDeserialize(builder = SentimentAnalysisAggregate.Builder.class)
public class SentimentAnalysisAggregate {
/**
* @return The aggregate sentiment of the text
*/
private final Sentiment sentiment;
/**
* @return The aggregate sentiment score of the text
*/
private final double score;
@JsonPOJOBuilder(withPrefix = "set")
@Setter
@Accessors(chain = true)
public static class Builder {
private Sentiment sentiment;
private double score;
public SentimentAnalysisAggregate build() {
return new SentimentAnalysisAggregate(sentiment, score);
}
}
}