package org.texttechnologylab.project.gruppe_05_1.domain.nlp;

import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.StringJoiner;

public class NlpInfo {
    List<Token>         tokens;
    List<Sentence>      sentences;
    List<Dependency>    dependencies;
    List<NamedEntity>   namedEntities;
    Sentiment           overallSentiment;       // Sentiment for the whole text ; kann null sein!
    List<Sentiment>     sentiments;             // sentiments for the respective sentences (eine Liste von 0..n Elementen)
    List<Topic>         topics;
    List<Pos>           posList;

    VideoInformation    videoInformation;

    public List<Token> getTokens() {
        return tokens;
    }

    public void setTokens(List<Token> tokens) {
        this.tokens = tokens;
    }

    public List<Sentence> getSentences() {
        return sentences;
    }

    public void setSentences(List<Sentence> sentences) {
        this.sentences = sentences;
    }

    public List<Dependency> getDependencies() {
        return dependencies;
    }

    public void setDependencies(List<Dependency> dependencies) {
        this.dependencies = dependencies;
    }

    public List<NamedEntity> getNamedEntities() {
        return namedEntities;
    }

    public void setNamedEntities(List<NamedEntity> namedEntities) {
        this.namedEntities = namedEntities;
    }

    public Sentiment getOverallSentiment() {
        return overallSentiment;
    }

    public void setOverallSentiment(Sentiment overallSentiment) {
        this.overallSentiment = overallSentiment;
    }

    public List<Sentiment> getSentiments() {
        return sentiments;
    }

    public void setSentiments(List<Sentiment> sentiments) {
        this.sentiments = sentiments;
    }

    public List<Topic> getTopics() {
        return topics;
    }

    public void setTopics(List<Topic> topics) {
        this.topics = topics;
    }

    public List<Pos> getPosList() {
        return posList;
    }

    public void setPosList(List<Pos> posList) {
        this.posList = posList;
    }

    public VideoInformation getVideoInformation() {
        return videoInformation;
    }

    public void setVideoInformation(VideoInformation videoInformation) {
        this.videoInformation = videoInformation;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof NlpInfo nlpInfo)) return false;
        return Objects.equals(tokens, nlpInfo.tokens) && Objects.equals(sentences, nlpInfo.sentences)
                && Objects.equals(dependencies, nlpInfo.dependencies) && Objects.equals(namedEntities, nlpInfo.namedEntities)
                && Objects.equals(overallSentiment, nlpInfo.overallSentiment) && Objects.equals(sentiments, nlpInfo.sentiments)
                && Objects.equals(topics, nlpInfo.topics) && Objects.equals(posList, nlpInfo.posList)
                && Objects.equals(videoInformation, nlpInfo.videoInformation);
    }

    @Override
    public int hashCode() {
        return Objects.hash(tokens, sentences, dependencies, namedEntities, overallSentiment, sentiments, topics, posList, videoInformation);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", NlpInfo.class.getSimpleName() + "[", "]")
                .add("tokens=" + tokens)
                .add("sentences=" + sentences)
                .add("dependencies=" + dependencies)
                .add("namedEntities=" + namedEntities)
                .add("overallSentiment=" + overallSentiment)
                .add("sentiments=" + sentiments)
                .add("topics=" + topics)
                .add("posList=" + posList)
                .add("videoInformation=" + videoInformation)
                .toString();
    }

}
