/*
 * <!--
 *   ~ Copyright 2015-2017 OpenCB
 *   ~
 *   ~ Licensed under the Apache License, Version 2.0 (the "License");
 *   ~ you may not use this file except in compliance with the License.
 *   ~ You may obtain a copy of the License at
 *   ~
 *   ~     http://www.apache.org/licenses/LICENSE-2.0
 *   ~
 *   ~ Unless required by applicable law or agreed to in writing, software
 *   ~ distributed under the License is distributed on an "AS IS" BASIS,
 *   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   ~ See the License for the specific language governing permissions and
 *   ~ limitations under the License.
 *   -->
 *
 */

package org.opencb.biodata.models.clinical.interpretation;

import org.opencb.biodata.models.variant.Variant;
import org.opencb.biodata.models.variant.avro.VariantAvro;

import java.util.List;
import java.util.Map;

public class ReportedVariant extends Variant {

    private double deNovoQualityScore;
    private List<ReportedEvent> reportedEvents;
    private List<Comment> comments;

    private Status status;

    // TODO maybe this parameter should be in Variant
    private Map<String, Object> attributes;

    public enum Status {
        NOT_REVIEWED,
        UNDER_REVIEWED,
        REVIEWED,
        REJECTED,
        TO_BE_REPORTED
    }

    public ReportedVariant() {
    }

    public ReportedVariant(VariantAvro avro) {
        super(avro);
    }

    public ReportedVariant(VariantAvro avro, double deNovoQualityScore, List<ReportedEvent> reportedEvents, List<Comment> comments,
                           Status status, Map<String, Object> attributes) {
        super(avro);

        this.deNovoQualityScore = deNovoQualityScore;
        this.reportedEvents = reportedEvents;
        this.comments = comments;
        this.status = status;
        this.attributes = attributes;
    }

    public double getDeNovoQualityScore() {
        return deNovoQualityScore;
    }

    public ReportedVariant setDeNovoQualityScore(double deNovoQualityScore) {
        this.deNovoQualityScore = deNovoQualityScore;
        return this;
    }

    public List<ReportedEvent> getReportedEvents() {
        return reportedEvents;
    }

    public ReportedVariant setReportedEvents(List<ReportedEvent> reportedEvents) {
        this.reportedEvents = reportedEvents;
        return this;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public ReportedVariant setComments(List<Comment> comments) {
        this.comments = comments;
        return this;
    }

    public Status getStatus() {
        return status;
    }

    public ReportedVariant setStatus(Status status) {
        this.status = status;
        return this;
    }

    public Map<String, Object> getAttributes() {
        return attributes;
    }

    public ReportedVariant setAttributes(Map<String, Object> attributes) {
        this.attributes = attributes;
        return this;
    }
}

@@ -1239,26 +1239,24 @@
 UNDER_REVIEW
-ED
 ,%0A        RE
@@ -1855,32 +1855,553 @@
 ributes;%0A    %7D%0A%0A
+    @Override%0A    public String toString() %7B%0A        final StringBuilder sb = new StringBuilder(%22ReportedVariant%7B%22);%0A        sb.append(%22variant=%22).append(super.toString());%0A        sb.append(%22, deNovoQualityScore=%22).append(deNovoQualityScore);%0A        sb.append(%22, reportedEvents=%22).append(reportedEvents);%0A        sb.append(%22, comments=%22).append(comments);%0A        sb.append(%22, status=%22).append(status);%0A        sb.append(%22, attributes=%22).append(attributes);%0A        sb.append('%7D');%0A        return sb.toString();%0A    %7D%0A%0A
     public doubl

rename ReportedVariant status field