36 lines
937 B
Java
36 lines
937 B
Java
package eu.eudat.commons.types.descriptiontemplate.fielddata;
|
|
|
|
import eu.eudat.commons.enums.FieldDataInternalDmpEntryType;
|
|
import eu.eudat.commons.enums.FieldType;
|
|
import org.w3c.dom.Document;
|
|
import org.w3c.dom.Element;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
public class InternalDmpBaseDataEntity extends LabelAndMultiplicityDataEntity {
|
|
|
|
private final FieldDataInternalDmpEntryType fieldSubType;
|
|
public InternalDmpBaseDataEntity(FieldType fieldType, FieldDataInternalDmpEntryType fieldSubType) {
|
|
super(fieldType);
|
|
this.fieldSubType = fieldSubType;
|
|
}
|
|
|
|
public FieldDataInternalDmpEntryType getFieldSubType() {
|
|
return fieldSubType;
|
|
}
|
|
|
|
@Override
|
|
public Element toXml(Document doc) {
|
|
Element root = super.toXml(doc);
|
|
root.setAttribute("type", this.getFieldSubType().toString());
|
|
return root;
|
|
}
|
|
|
|
@Override
|
|
public InternalDmpBaseDataEntity fromXml(Element item) {
|
|
super.fromXml(item);
|
|
return this;
|
|
}
|
|
}
|