Update Description Template Field Data Classes
This commit is contained in:
parent
67d69e029e
commit
a717330b6b
|
@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||
import java.util.Map;
|
||||
|
||||
public enum FieldType implements DatabaseEnum<String> {
|
||||
AUTO_COMPLETE(Names.Autocomplete),
|
||||
WORD_LIST(Names.Wordlist),
|
||||
EXTERNAL_SELECT(Names.ExternalSelect),
|
||||
SELECT(Names.Select),
|
||||
BOOLEAN_DECISION(Names.BooleanDecision),
|
||||
RADIO_BOX(Names.RadioBox),
|
||||
INTERNAL_DMP_ENTRIES_RESEARCHERS(Names.InternalDmpResearchers),
|
||||
|
@ -36,8 +36,8 @@ public enum FieldType implements DatabaseEnum<String> {
|
|||
private final String value;
|
||||
|
||||
public static class Names {
|
||||
public static final String Autocomplete = "autocomplete";
|
||||
public static final String Wordlist = "wordlist";
|
||||
public static final String ExternalSelect = "externalSelect";
|
||||
public static final String Select = "select";
|
||||
public static final String BooleanDecision = "booleanDecision";
|
||||
public static final String RadioBox = "radiobox";
|
||||
public static final String InternalDmpResearchers = "internalDmpResearchers";
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AutoCompleteDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
private Boolean multiAutoComplete;
|
||||
private List<AutoCompleteSingleDataFileTransformerModel> autoCompleteSingleDataFileTransformerModelList;
|
||||
|
||||
public Boolean getMultiAutoComplete() { return multiAutoComplete; }
|
||||
public void setMultiAutoComplete(Boolean multiAutoComplete) { this.multiAutoComplete = multiAutoComplete; }
|
||||
|
||||
public List<AutoCompleteSingleDataFileTransformerModel> getAutoCompleteSingleDataList() {
|
||||
return autoCompleteSingleDataFileTransformerModelList;
|
||||
}
|
||||
|
||||
public void setAutoCompleteSingleDataList(List<AutoCompleteSingleDataFileTransformerModel> autoCompleteSingleDataFileTransformerModelList) {
|
||||
this.autoCompleteSingleDataFileTransformerModelList = autoCompleteSingleDataFileTransformerModelList;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
public class AutoCompleteSingleDataFileTransformerModel {
|
||||
|
||||
private String url;
|
||||
private ComboBoxOptionFileTransformerModel autoCompleteOptions;
|
||||
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public ComboBoxOptionFileTransformerModel getAutoCompleteOptions() {
|
||||
return autoCompleteOptions;
|
||||
}
|
||||
|
||||
public void setAutoCompleteOptions(ComboBoxOptionFileTransformerModel autoCompleteOptions) {
|
||||
this.autoCompleteOptions = autoCompleteOptions;
|
||||
}
|
||||
}
|
|
@ -1,61 +1,25 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import eu.eudat.file.transformer.enums.FieldType;
|
||||
|
||||
@JsonTypeInfo(
|
||||
use = JsonTypeInfo.Id.NAME,
|
||||
include = JsonTypeInfo.As.PROPERTY,
|
||||
property = "fieldType",
|
||||
visible = true)
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = AutoCompleteDataFileTransformerModel.class, name = FieldType.Names.Autocomplete),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.BooleanDecision),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.InternalDmpDatasets),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.InternalDmpDmps),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.CheckBox),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.DatePicker),
|
||||
@JsonSubTypes.Type(value = ExternalDatasetDataFileTransformerModel.class, name = FieldType.Names.ExternalDatasets),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.FreeText),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.Licenses),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.Organizations),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.Publications),
|
||||
@JsonSubTypes.Type(value = RadioBoxDataFileTransformerModel.class, name = FieldType.Names.RadioBox),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.Registries),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.InternalDmpResearchers),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.Researchers),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.RichTextarea),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.Services),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.Tags),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.Taxonomies),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.TextArea),
|
||||
@JsonSubTypes.Type(value = UploadDataFileTransformerModel.class, name = FieldType.Names.Upload),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.Validation),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.DatasetIdentifier),
|
||||
@JsonSubTypes.Type(value = LabelFieldDataFileTransformerModel.class, name = FieldType.Names.Currency),
|
||||
@JsonSubTypes.Type(value = WordListDataFileTransformerModel.class, name = FieldType.Names.Wordlist),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.DataRepositories),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.JournalRepositories),
|
||||
@JsonSubTypes.Type(value = LabelAndMultiplicityFieldDataFileTransformerModel.class, name = FieldType.Names.Publications),
|
||||
})
|
||||
|
||||
public abstract class BaseFieldDataFileTransformerModel {
|
||||
|
||||
private String label;
|
||||
private FieldType fieldType;
|
||||
private String value;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public FieldType getFieldType() {
|
||||
return fieldType;
|
||||
}
|
||||
public FieldType getFieldType() {
|
||||
return fieldType;
|
||||
}
|
||||
|
||||
public void setFieldType(FieldType fieldType) {
|
||||
this.fieldType = fieldType;
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
public class ComboBoxOptionFileTransformerModel {
|
||||
private String label;
|
||||
private String value;
|
||||
private String source;
|
||||
private String uri;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getUri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
public void setUri(String uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -3,7 +3,7 @@ package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddat
|
|||
|
||||
import eu.eudat.file.transformer.enums.FieldDataExternalDatasetType;
|
||||
|
||||
public class ExternalDatasetDataFileTransformerModel extends LabelAndMultiplicityFieldDataFileTransformerModel {
|
||||
public class ExternalDatasetDataFileTransformerModel extends LabelAndMultiplicityDataFileTransformerModel {
|
||||
private FieldDataExternalDatasetType type;
|
||||
|
||||
public FieldDataExternalDatasetType getType() {
|
||||
|
|
|
@ -0,0 +1,150 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
import jakarta.xml.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
public class ExternalSelectDataFileTransformerModel extends LabelAndMultiplicityDataFileTransformerModel {
|
||||
public static class ExternalSelectAuthDataFileTransformerModel {
|
||||
private String url;
|
||||
private String method;
|
||||
private String body;
|
||||
private String path;
|
||||
private String type;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public void setBody(String body) {
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ExternalSelectSourceBindingFileTransformerModel {
|
||||
private String label;
|
||||
private String value;
|
||||
private String source;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ExternalSelectSourceFileTransformerModel {
|
||||
private String url;
|
||||
private String method;
|
||||
private String optionsRoot;
|
||||
private ExternalSelectSourceBindingFileTransformerModel sourceBinding;
|
||||
private Boolean hasAuth;
|
||||
private ExternalSelectAuthDataFileTransformerModel auth;
|
||||
|
||||
public String getOptionsRoot() {
|
||||
return optionsRoot;
|
||||
}
|
||||
public void setOptionsRoot(String optionsRoot) {
|
||||
this.optionsRoot = optionsRoot;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public Boolean getHasAuth() {
|
||||
return hasAuth;
|
||||
}
|
||||
|
||||
public void setHasAuth(Boolean hasAuth) {
|
||||
this.hasAuth = hasAuth;
|
||||
}
|
||||
|
||||
public ExternalSelectAuthDataFileTransformerModel getAuth() {
|
||||
return auth;
|
||||
}
|
||||
|
||||
public void setAuth(ExternalSelectAuthDataFileTransformerModel auth) {
|
||||
this.auth = auth;
|
||||
}
|
||||
|
||||
public ExternalSelectSourceBindingFileTransformerModel getSourceBinding() {
|
||||
return sourceBinding;
|
||||
}
|
||||
public void setSourceBinding(ExternalSelectSourceBindingFileTransformerModel sourceBinding) {
|
||||
this.sourceBinding = sourceBinding;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
}
|
||||
|
||||
private List<ExternalSelectSourceFileTransformerModel> sources;
|
||||
|
||||
public List<ExternalSelectSourceFileTransformerModel> getSources() {
|
||||
return sources;
|
||||
}
|
||||
|
||||
public void setSources(List<ExternalSelectSourceFileTransformerModel> externalSelectSourceFileTransformerModelList) {
|
||||
this.sources = externalSelectSourceFileTransformerModelList;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
public class LabelAndMultiplicityDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
private Boolean multipleSelect;
|
||||
|
||||
public Boolean getMultipleSelect() {
|
||||
return multipleSelect;
|
||||
}
|
||||
|
||||
public void setMultipleSelect(Boolean multipleSelect) {
|
||||
this.multipleSelect = multipleSelect;
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
public class LabelAndMultiplicityFieldDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
private Boolean multiAutoComplete;
|
||||
|
||||
public Boolean getMultiAutoComplete() {
|
||||
return multiAutoComplete;
|
||||
}
|
||||
|
||||
public void setMultiAutoComplete(Boolean multiAutoComplete) {
|
||||
this.multiAutoComplete = multiAutoComplete;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
public class LabelDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
public class LabelFieldDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
|
||||
}
|
|
@ -1,17 +1,36 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RadioBoxDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
public static class RadioBoxDataOptionFileTransformerModel {
|
||||
private String label;
|
||||
private String value;
|
||||
|
||||
private List<RadioBoxOptionFileTransformerModel> options;
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public List<RadioBoxOptionFileTransformerModel> getOptions() {
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<RadioBoxDataOptionFileTransformerModel> options;
|
||||
|
||||
public List<RadioBoxDataOptionFileTransformerModel> getOptions() {
|
||||
return options;
|
||||
}
|
||||
|
||||
public void setOptions(List<RadioBoxOptionFileTransformerModel> options) {
|
||||
public void setOptions(List<RadioBoxDataOptionFileTransformerModel> options) {
|
||||
this.options = options;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
public class RadioBoxOptionFileTransformerModel {
|
||||
private String label;
|
||||
private String value;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SelectDataFileTransformerModel extends LabelAndMultiplicityDataFileTransformerModel {
|
||||
private List<OptionFileTransformerModel> options;
|
||||
|
||||
public List<OptionFileTransformerModel> getOptions() {
|
||||
return options;
|
||||
}
|
||||
|
||||
public void setOptions(List<OptionFileTransformerModel> optionEntities) {
|
||||
this.options = optionEntities;
|
||||
}
|
||||
|
||||
public static class OptionFileTransformerModel {
|
||||
private String label;
|
||||
private String value;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +1,43 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UploadDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
private List<UploadOptionFileTransformerModel> types;
|
||||
|
||||
public List<UploadOptionFileTransformerModel> getTypes() {
|
||||
public class UploadDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
public static class UploadDataOptionFileTransformerModel {
|
||||
private String label;
|
||||
private String value;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<UploadDataOptionFileTransformerModel> types;
|
||||
|
||||
private Integer maxFileSizeInMB;
|
||||
|
||||
|
||||
public List<UploadDataOptionFileTransformerModel> getTypes() {
|
||||
return types;
|
||||
}
|
||||
|
||||
public void setTypes(List<UploadOptionFileTransformerModel> types) {
|
||||
public void setTypes(List<UploadDataOptionFileTransformerModel> types) {
|
||||
this.types = types;
|
||||
}
|
||||
|
||||
private Integer maxFileSizeInMB;
|
||||
|
||||
public Integer getMaxFileSizeInMB() {
|
||||
return maxFileSizeInMB;
|
||||
}
|
||||
|
@ -23,7 +45,4 @@ public class UploadDataFileTransformerModel extends BaseFieldDataFileTransformer
|
|||
public void setMaxFileSizeInMB(Integer maxFileSizeInMB) {
|
||||
this.maxFileSizeInMB = maxFileSizeInMB;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
public class UploadOptionFileTransformerModel {
|
||||
private String label;
|
||||
private String value;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package eu.eudat.file.transformer.models.descriptiontemplate.definition.fielddata;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class WordListDataFileTransformerModel extends BaseFieldDataFileTransformerModel {
|
||||
private List<ComboBoxOptionFileTransformerModel> options;
|
||||
private Boolean multiList;
|
||||
|
||||
public List<ComboBoxOptionFileTransformerModel> getOptions() {
|
||||
return options;
|
||||
}
|
||||
|
||||
public void setOptions(List<ComboBoxOptionFileTransformerModel> options) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public Boolean getMultiList() {
|
||||
return multiList;
|
||||
}
|
||||
|
||||
public void setMultiList(Boolean multiList) {
|
||||
this.multiList = multiList;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue