Package ai.rev.sentimentanalysis.models
Class SentimentMessage
- java.lang.Object
-
- ai.rev.sentimentanalysis.models.SentimentMessage
-
public class SentimentMessage extends Object
Represents a piece of the input which sentiment has been detected for.
-
-
Constructor Summary
Constructors Constructor Description SentimentMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContent()Returns the content of the informant.DoublegetEndTimestamp()Returns the end timestamp of the content in the input.IntegergetLength()Returns the character length of the contentIntegergetOffset()Returns the character index at which the content started in the input.DoublegetScore()Returns the score of the content.SentimentgetSentiment()Returns the Sentiment of the informant.DoublegetStartTimestamp()Returns the start timestamp of the content in the input.voidsetContent(String content)Sets the content of the informant.voidsetEndTimestamp(Double endTimestamp)Sets the end timestamp of the content in the input.voidsetLength(Integer length)Sets the character length of the contentvoidsetOffset(Integer offset)Sets the character index at which the content started in the inputvoidsetScore(Double score)Sets the score of the content.voidsetSentiment(Sentiment sentiment)Sets the Sentiment of the informant.voidsetStartTimestamp(Double startTimestamp)Sets the start timestamp of the content in the input.
-
-
-
Method Detail
-
getContent
public String getContent()
Returns the content of the informant.- Returns:
- the content of the informant.
-
setContent
public void setContent(String content)
Sets the content of the informant.- Parameters:
content- content to be set.
-
getSentiment
public Sentiment getSentiment()
Returns the Sentiment of the informant.- Returns:
- the Sentiment of the informant.
-
setSentiment
public void setSentiment(Sentiment sentiment)
Sets the Sentiment of the informant.- Parameters:
sentiment- sentiment to be set.
-
getScore
public Double getScore()
Returns the score of the content.- Returns:
- the score of the content.
-
setScore
public void setScore(Double score)
Sets the score of the content.- Parameters:
score- the score of the content.
-
getStartTimestamp
public Double getStartTimestamp()
Returns the start timestamp of the content in the input.- Returns:
- the start timestamp of the content in the input.
-
setStartTimestamp
public void setStartTimestamp(Double startTimestamp)
Sets the start timestamp of the content in the input.- Parameters:
startTimestamp- the start timestamp to be set.
-
getEndTimestamp
public Double getEndTimestamp()
Returns the end timestamp of the content in the input.- Returns:
- the end timestamp of the content in the input.
-
setEndTimestamp
public void setEndTimestamp(Double endTimestamp)
Sets the end timestamp of the content in the input.- Parameters:
endTimestamp- the end timestamp to be set.
-
getOffset
public Integer getOffset()
Returns the character index at which the content started in the input.- Returns:
- the character index at which the content started in the input.
-
setOffset
public void setOffset(Integer offset)
Sets the character index at which the content started in the input- Parameters:
offset- the character index to be set
-
getLength
public Integer getLength()
Returns the character length of the content- Returns:
- the character length of the content
-
setLength
public void setLength(Integer length)
Sets the character length of the content- Parameters:
length- the character length to be set
-
-