package eu.eudat.models.dmp; import eu.eudat.utilities.XmlSerializable; import org.w3c.dom.Document; import org.w3c.dom.Element; import java.util.UUID; /** * Created by ikalyvas on 12/20/2017. */ public class AssociatedProfile implements XmlSerializable{ private UUID profileId; private String label; public UUID getProfileId() { return profileId; } public void setProfileId(UUID profileId) { this.profileId = profileId; } 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.profileId.toString()); profile.setAttribute("label",this.label); return profile; } @Override public AssociatedProfile fromXml(Element item) { this.profileId = UUID.fromString(item.getAttribute("profileId")); this.label = item.getAttribute("label"); return this; } }