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

import java.util.Objects;
import java.util.StringJoiner;

public abstract class TextContent {
    String  id;
    String  speakerId;
    String  text;
    String  type;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSpeakerId() {
        return speakerId;
    }

    public void setSpeakerId(String speakerId) {
        this.speakerId = speakerId;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TextContent that)) return false;
        return Objects.equals(id, that.id) && Objects.equals(speakerId, that.speakerId) && Objects.equals(text, that.text) && Objects.equals(type, that.type);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, speakerId, text, type);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", TextContent.class.getSimpleName() + "[", "]")
                .add("id='" + id + "'")
                .add("speakerId='" + speakerId + "'")
                .add("text='" + text + "'")
                .add("type='" + type + "'")
                .toString();
    }
}
