package eu.eudat.models.data.quickwizard;


import eu.eudat.models.data.dmp.DataManagementPlan;
import eu.eudat.data.entities.Dataset;
import eu.eudat.models.data.datasetwizard.DatasetWizardModel;
import eu.eudat.models.data.user.composite.PagedDatasetProfile;

import java.util.Date;
import java.util.UUID;

public class DatasetDescriptionQuickWizardModel extends PagedDatasetProfile {

    private String datasetLabel;

    public String getDatasetLabel() {
        return datasetLabel;
    }

    public void setDatasetLabel(String datasetLabel) {
        this.datasetLabel = datasetLabel;
    }


    public  DatasetWizardModel  toDataModel(DataManagementPlan dmp,UUID profile){
        DatasetWizardModel newDataset = new  DatasetWizardModel();
        newDataset.setLabel(datasetLabel);
        newDataset.setCreated(new Date());
        newDataset.setProfile(profile);
        newDataset.setDmp(dmp);
        newDataset.setStatus((short) this.getStatus());
        //newDataset.setStatus(Dataset.Status.SAVED.getValue());


        newDataset.setDatasetProfileDefinition((PagedDatasetProfile) this);
        return newDataset;
    }


}
