diff --git a/dmp-backend/web/src/main/java/eu/eudat/models/data/dmp/DataManagementPlan.java b/dmp-backend/web/src/main/java/eu/eudat/models/data/dmp/DataManagementPlan.java index 2762ae0e1..699ad88af 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/models/data/dmp/DataManagementPlan.java +++ b/dmp-backend/web/src/main/java/eu/eudat/models/data/dmp/DataManagementPlan.java @@ -220,21 +220,8 @@ public class DataManagementPlan implements DataModel { AssociatedProfile associatedProfile = new AssociatedProfile().fromData(datasetProfile); this.profiles.add(associatedProfile); } - - /*Document viewStyleDoc = XmlBuilder.fromXml(entity.getAssociatedDmps()); - Element item = (Element) viewStyleDoc.getElementsByTagName("profiles").item(0); - this.profiles = new LinkedList<>(); - if (item != null) { - NodeList associatedProfilesElement = item.getChildNodes(); - for (int temp = 0; temp < associatedProfilesElement.getLength(); temp++) { - Node associatedProfileElement = associatedProfilesElement.item(temp); - if (associatedProfileElement.getNodeType() == Node.ELEMENT_NODE) { - this.profiles.add(new AssociatedProfile().fromXml((Element) associatedProfileElement)); - } - } - }*/ } - this.datasets = entity.getDataset().stream().map(item -> new DatasetListingModel().fromDataModel(item)).collect(Collectors.toList()); + this.datasets = entity.getDataset().stream().filter(dataset -> !dataset.getStatus().equals(Dataset.Status.DELETED.getValue())).map(x-> new DatasetListingModel().fromDataModel(x)).collect(Collectors.toList()); this.modified = entity.getModified(); this.created = entity.getCreated(); this.description = entity.getDescription();