package eu.eudat.models.data.dataset;

import eu.eudat.data.entities.Dataset;
import eu.eudat.models.DataModel;
import eu.eudat.models.data.datasetprofile.DatasetProfileOverviewModel;

import java.util.UUID;

public class DatasetOverviewModel implements DataModel<Dataset, DatasetOverviewModel> {

    private UUID id;
    private String label;
    private short status;
    private DatasetProfileOverviewModel datasetTemplate;

    public UUID getId() {
        return id;
    }
    public void setId(UUID id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }
    public void setLabel(String label) {
        this.label = label;
    }

    public short getStatus() {
        return status;
    }
    public void setStatus(short status) {
        this.status = status;
    }

    public DatasetProfileOverviewModel getDatasetTemplate() {
        return datasetTemplate;
    }
    public void setDatasetTemplate(DatasetProfileOverviewModel datasetTemplate) {
        this.datasetTemplate = datasetTemplate;
    }

    @Override
    public DatasetOverviewModel fromDataModel(Dataset entity) {
        this.id = entity.getId();
        this.label = entity.getLabel();
        this.status = entity.getStatus();
        this.datasetTemplate = new DatasetProfileOverviewModel().fromDataModel(entity.getProfile());

        return this;
    }

    @Override
    public Dataset toDataModel() throws Exception {
        return null;
    }

    @Override
    public String getHint() {
        return null;
    }
}
