package eu.eudat.models.dmp; import eu.eudat.utilities.XmlSerializable; import org.w3c.dom.Document; import org.w3c.dom.Element; import java.util.UUID; public class AssociatedProfile implements XmlSerializable{ private UUID id; private String label; 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; } @Override public Element toXml(Document doc) { Element profile = doc.createElement("profile"); profile.setAttribute("profileId",this.id.toString()); profile.setAttribute("label",this.label); return profile; } @Override public AssociatedProfile fromXml(Element item) { this.id = UUID.fromString(item.getAttribute("profileId")); this.label = item.getAttribute("label"); return this; } }