diff --git a/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/AutoCompleteDataEntity.java b/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/AutoCompleteDataEntity.java index 971e8ae31..d3d0a05fb 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/AutoCompleteDataEntity.java +++ b/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/AutoCompleteDataEntity.java @@ -15,6 +15,9 @@ import java.util.List; import java.util.Map; public class AutoCompleteDataEntity extends ComboBoxDataEntity { + public AutoCompleteDataEntity() { + super(FieldType.AUTO_COMPLETE); + } public static class AuthAutoCompleteData { private String url; @@ -145,11 +148,6 @@ public class AutoCompleteDataEntity extends ComboBoxDataEntity implements XmlSerializable { + + private final FieldType fieldType; + + public BaseFieldDataEntity(FieldType fieldType) { + this.fieldType = fieldType; + } + private String label; - public abstract FieldType getFieldType(); + + public FieldType getFieldType() { + return fieldType; + } public String getLabel() { return label; diff --git a/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/BooleanDecisionDataEntity.java b/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/BooleanDecisionDataEntity.java deleted file mode 100644 index b92b2c7d1..000000000 --- a/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/BooleanDecisionDataEntity.java +++ /dev/null @@ -1,16 +0,0 @@ -package eu.eudat.commons.types.descriptiontemplate.fielddata; - -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 BooleanDecisionDataEntity extends BaseFieldDataEntity { - - @Override - public FieldType getFieldType() { - return FieldType.BOOLEAN_DECISION; - } -} diff --git a/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/CheckBoxDataEntity.java b/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/CheckBoxDataEntity.java deleted file mode 100644 index b45af367e..000000000 --- a/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/CheckBoxDataEntity.java +++ /dev/null @@ -1,16 +0,0 @@ -package eu.eudat.commons.types.descriptiontemplate.fielddata; - -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 CheckBoxDataEntity extends BaseFieldDataEntity { - - @Override - public FieldType getFieldType() { - return FieldType.CHECK_BOX; - } -} diff --git a/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/ComboBoxDataEntity.java b/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/ComboBoxDataEntity.java index 2551604ce..a84abc5ba 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/ComboBoxDataEntity.java +++ b/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/fielddata/ComboBoxDataEntity.java @@ -1,6 +1,7 @@ package eu.eudat.commons.types.descriptiontemplate.fielddata; import eu.eudat.commons.enums.FieldDataComboBoxType; +import eu.eudat.commons.enums.FieldType; import eu.eudat.commons.types.xml.XmlSerializable; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -10,6 +11,10 @@ import java.util.Map; public abstract class ComboBoxDataEntity extends BaseFieldDataEntity { + public ComboBoxDataEntity(FieldType fieldType) { + super(fieldType); + } + public abstract FieldDataComboBoxType getFieldSubType(); public static class Option implements XmlSerializable