package de.fh_bielefeld.newsboard.model;

import java.util.OptionalDouble;
import java.util.OptionalInt;

/**
 * Domain class representing a classification of a document or sentence.
 *
 * @author Felix Meyer, Lukas Taake
 */
public class Classification {
    private OptionalInt sentenceId = OptionalInt.empty();
    private OptionalInt documentId = OptionalInt.empty();
    private ExternModule externModule;
    private double value;
    private OptionalDouble confidence = OptionalDouble.empty();

    public OptionalInt getSentenceId() {
        return sentenceId;
    }

    public void setSentenceId(int sentenceId) {
        this.sentenceId = OptionalInt.of(sentenceId);
    }

    public OptionalInt getDocumentId() {
        return documentId;
    }

    public void setDocumentId(int documentId) {
        this.documentId = OptionalInt.of(documentId);
    }

    public ExternModule getExternModule() {
        return externModule;
    }

    public void setExternModule(ExternModule externModule) {
        this.externModule = externModule;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public OptionalDouble getConfidence() {
        return confidence;
    }

    public void setConfidence(double confidence) {
        this.confidence = OptionalDouble.of(confidence);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof Classification)) {
            return false;
        }
        Classification that = (Classification) obj;
        return this.documentId.equals(that.documentId)
                && this.sentenceId.equals(that.sentenceId)
                && this.externModule.equals(that.externModule);
    }
}

@@ -311,66 +311,8 @@
 ();%0A
-    private OptionalInt documentId = OptionalInt.empty();%0A
     
@@ -625,192 +625,8 @@
  %7D%0A%0A
-    public OptionalInt getDocumentId() %7B%0A        return documentId;%0A    %7D%0A%0A    public void setDocumentId(int documentId) %7B%0A        this.documentId = OptionalInt.of(documentId);%0A    %7D%0A%0A
     
@@ -1363,67 +1363,8 @@
 turn
- this.documentId.equals(that.documentId)%0A                &&
  thi

Document class changed for recent model changes.