29 lines
803 B
Java
29 lines
803 B
Java
package eu.eudat.commons.types.dmpblueprint;
|
|
|
|
import eu.eudat.commons.enums.DmpBlueprintExtraFieldDataType;
|
|
import org.w3c.dom.Element;
|
|
|
|
public class ExtraFieldEntity extends FieldEntity {
|
|
|
|
private DmpBlueprintExtraFieldDataType type;
|
|
|
|
public DmpBlueprintExtraFieldDataType getType() {
|
|
return type;
|
|
}
|
|
public void setType(DmpBlueprintExtraFieldDataType type) {
|
|
this.type = type;
|
|
}
|
|
|
|
@Override
|
|
public Element appendXmlChild(Element rootElement) {
|
|
rootElement.setAttribute("type", String.valueOf(this.type.getValue()));
|
|
return rootElement;
|
|
}
|
|
|
|
@Override
|
|
public ExtraFieldEntity fromXmlChild(Element item) {
|
|
this.type = DmpBlueprintExtraFieldDataType.of(Short.parseShort(item.getAttribute("type")));
|
|
return this;
|
|
}
|
|
}
|