remove rda property from models
This commit is contained in:
parent
e2505039df
commit
c35bc2efed
|
@ -190,10 +190,6 @@ public class Admin extends BaseController {
|
|||
.status(ApiMessageCode.SUCCESS_MESSAGE).message(""));
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/getRDACommonStandards"}, produces = "application/json")
|
||||
public ResponseEntity getRDACommonStandards(@ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) {
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<String>>().status(ApiMessageCode.SUCCESS_MESSAGE).payload(configLoader.getRdaProperties()));
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = {"/getSchematics"}, produces = "application/json")
|
||||
public ResponseEntity<ResponseItem<List<String>>> getSchematics(@RequestParam(value = "query", required = false) String query, @ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) {
|
||||
|
|
|
@ -10,7 +10,6 @@ import java.util.Map;
|
|||
|
||||
public interface ConfigLoader {
|
||||
ExternalUrls getExternalUrls();
|
||||
List<String> getRdaProperties();
|
||||
List<Schematic> getSchematics();
|
||||
XWPFDocument getDocument();
|
||||
XWPFDocument getDatasetDocument();
|
||||
|
|
|
@ -164,11 +164,6 @@ public class ExportXmlBuilderDatasetProfile {
|
|||
numbering.setTextContent(field.getNumbering());
|
||||
elementField.appendChild(numbering);
|
||||
}
|
||||
if (field.getRdaProperty() != null) {
|
||||
Element rdaProperty = element.createElement("rdaProperty");
|
||||
rdaProperty.setTextContent(field.getRdaProperty());
|
||||
elementField.appendChild(rdaProperty);
|
||||
}
|
||||
if (field.getSchematics() != null) {
|
||||
Element schematics = element.createElement("schematics");
|
||||
field.getSchematics().forEach(schematic -> {
|
||||
|
|
|
@ -29,8 +29,6 @@ public class Field {
|
|||
|
||||
private Object data;
|
||||
|
||||
private String rdaProperty;
|
||||
|
||||
private Schematics schematics;
|
||||
|
||||
@XmlAttribute(name = "id")
|
||||
|
@ -105,15 +103,6 @@ public class Field {
|
|||
this.data = data;
|
||||
}
|
||||
|
||||
@XmlElement(name = "rdaProperty")
|
||||
public String getRdaProperty() {
|
||||
return rdaProperty;
|
||||
}
|
||||
|
||||
public void setRdaProperty(String rdaProperty) {
|
||||
this.rdaProperty = rdaProperty;
|
||||
}
|
||||
|
||||
@XmlElement(name = "schematics")
|
||||
public Schematics getSchematics() {
|
||||
return schematics;
|
||||
|
@ -141,7 +130,6 @@ public class Field {
|
|||
if (data != null) {
|
||||
fieldEntity.setData(data.toMap((Element) this.data));
|
||||
}
|
||||
fieldEntity.setRdaCommonStandard(this.rdaProperty);
|
||||
List<String> schematicsList = new LinkedList<>();
|
||||
if (this.schematics != null && this.schematics.getSchematics() != null) {
|
||||
for (Schematic schematic : this.schematics.getSchematics()) {
|
||||
|
|
|
@ -45,7 +45,6 @@ public class Field implements ViewStyleDefinition<eu.eudat.models.data.entities.
|
|||
|
||||
private String id;
|
||||
private Integer ordinal;
|
||||
private String rdaCommonStandard;
|
||||
private List<String> schematics;
|
||||
private String value;
|
||||
private ViewStyle viewStyle;
|
||||
|
@ -71,12 +70,6 @@ public class Field implements ViewStyleDefinition<eu.eudat.models.data.entities.
|
|||
this.ordinal = ordinal;
|
||||
}
|
||||
|
||||
public String getRdaCommonStandard() {
|
||||
return rdaCommonStandard;
|
||||
}
|
||||
public void setRdaCommonStandard(String rdaCommonStandard) {
|
||||
this.rdaCommonStandard = rdaCommonStandard;
|
||||
}
|
||||
|
||||
public List<String> getSchematics() {
|
||||
return schematics;
|
||||
|
@ -160,7 +153,6 @@ public class Field implements ViewStyleDefinition<eu.eudat.models.data.entities.
|
|||
field.setVisible(this.visible);
|
||||
field.setDefaultValue(this.defaultValue);
|
||||
field.setValidations(this.validations);
|
||||
field.setRdaCommonStandard(this.rdaCommonStandard);
|
||||
field.setSchematics(this.schematics);
|
||||
field.setExport(this.export);
|
||||
return field;
|
||||
|
@ -175,7 +167,6 @@ public class Field implements ViewStyleDefinition<eu.eudat.models.data.entities.
|
|||
this.visible = item.getVisible();
|
||||
this.defaultValue = item.getDefaultValue();
|
||||
this.validations = item.getValidations();
|
||||
this.rdaCommonStandard = item.getRdaCommonStandard();
|
||||
this.schematics = item.getSchematics();
|
||||
this.export = item.getExport();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ import java.util.List;
|
|||
public class Field implements DatabaseViewStyleDefinition, XmlSerializable<Field> {
|
||||
private String id;
|
||||
private int ordinal;
|
||||
private String rdaCommonStandard;
|
||||
private List<String> schematics;
|
||||
private String numbering;
|
||||
private ViewStyle viewStyle;
|
||||
|
@ -43,13 +42,6 @@ public class Field implements DatabaseViewStyleDefinition, XmlSerializable<Field
|
|||
this.ordinal = ordinal;
|
||||
}
|
||||
|
||||
public String getRdaCommonStandard() {
|
||||
return rdaCommonStandard;
|
||||
}
|
||||
public void setRdaCommonStandard(String rdaCommonStandard) {
|
||||
this.rdaCommonStandard = rdaCommonStandard;
|
||||
}
|
||||
|
||||
public List<String> getSchematics() {
|
||||
return schematics;
|
||||
}
|
||||
|
@ -113,15 +105,14 @@ public class Field implements DatabaseViewStyleDefinition, XmlSerializable<Field
|
|||
rootElement.setAttribute("id", this.id);
|
||||
rootElement.setAttribute("ordinal", "" + this.ordinal);
|
||||
|
||||
Element rdaCommonStandard = doc.createElement("rdaCommonStandard");
|
||||
rdaCommonStandard.setTextContent(this.rdaCommonStandard);
|
||||
|
||||
Element schematics = doc.createElement("schematics");
|
||||
if (this.schematics != null) {
|
||||
for (String s : this.schematics) {
|
||||
Element schematic = doc.createElement("schematic");
|
||||
schematic.setTextContent(s);
|
||||
schematics.appendChild(schematic);
|
||||
}
|
||||
}
|
||||
|
||||
Element viewStyle = doc.createElement("viewStyle");
|
||||
viewStyle.setAttribute("renderstyle", this.viewStyle.getRenderStyle());
|
||||
|
@ -143,7 +134,6 @@ public class Field implements DatabaseViewStyleDefinition, XmlSerializable<Field
|
|||
Element numbering = doc.createElement("numbering");
|
||||
numbering.setTextContent(this.numbering);
|
||||
|
||||
rootElement.appendChild(rdaCommonStandard);
|
||||
rootElement.appendChild(schematics);
|
||||
rootElement.appendChild(numbering);
|
||||
rootElement.appendChild(validations);
|
||||
|
@ -174,9 +164,6 @@ public class Field implements DatabaseViewStyleDefinition, XmlSerializable<Field
|
|||
Element numbering = XmlBuilder.getNodeFromListByTagName(element.getChildNodes(), "numbering");
|
||||
if (numbering != null) this.numbering = numbering.getTextContent();
|
||||
|
||||
Element rdaCommonStandard = XmlBuilder.getNodeFromListByTagName(element.getChildNodes(), "rdaCommonStandard");
|
||||
if (rdaCommonStandard != null) this.rdaCommonStandard = rdaCommonStandard.getTextContent();
|
||||
|
||||
this.schematics = new LinkedList<>();
|
||||
Element schematics = (Element) XmlBuilder.getNodeFromListByTagName(element.getChildNodes(), "schematics");
|
||||
if(schematics != null){
|
||||
|
|
|
@ -39,7 +39,6 @@ public class Field implements Comparable, PropertiesModelBuilder, ViewStyleDefin
|
|||
private List<Field> multiplicityItems;
|
||||
private List<eu.eudat.models.data.admin.components.datasetprofile.Field.ValidationType> validations;
|
||||
private Visibility visible;
|
||||
private String rdaProperty;
|
||||
private List<String> schematics;
|
||||
|
||||
private Boolean export;
|
||||
|
@ -155,14 +154,6 @@ public class Field implements Comparable, PropertiesModelBuilder, ViewStyleDefin
|
|||
this.numbering = numbering;
|
||||
}
|
||||
|
||||
public String getRdaProperty() {
|
||||
return rdaProperty;
|
||||
}
|
||||
|
||||
public void setRdaProperty(String rdaProperty) {
|
||||
this.rdaProperty = rdaProperty;
|
||||
}
|
||||
|
||||
public List<String> getSchematics() {
|
||||
return schematics;
|
||||
}
|
||||
|
@ -190,7 +181,6 @@ public class Field implements Comparable, PropertiesModelBuilder, ViewStyleDefin
|
|||
newField.defaultValue = this.defaultValue;
|
||||
newField.data = this.data;
|
||||
newField.validations = this.validations;
|
||||
newField.rdaProperty = this.rdaProperty;
|
||||
newField.schematics = this.schematics;
|
||||
newField.numbering = "mult" + index + "_" + this.numbering;
|
||||
newField.export = this.export;
|
||||
|
@ -206,7 +196,6 @@ public class Field implements Comparable, PropertiesModelBuilder, ViewStyleDefin
|
|||
field.setDefaultValue(this.defaultValue);
|
||||
field.setVisible(this.visible);
|
||||
field.setValidations(this.validations);
|
||||
field.setRdaCommonStandard(this.rdaProperty);
|
||||
field.setSchematics(this.schematics);
|
||||
field.setExport(this.export);
|
||||
return field;
|
||||
|
@ -222,7 +211,6 @@ public class Field implements Comparable, PropertiesModelBuilder, ViewStyleDefin
|
|||
this.defaultValue = item.getDefaultValue();
|
||||
this.visible = item.getVisible();
|
||||
this.validations = item.getValidations();
|
||||
this.rdaProperty = item.getRdaCommonStandard();
|
||||
this.schematics = item.getSchematics();
|
||||
this.export = item.getExport();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ pdf.converter.url=http://localhost:3000/
|
|||
|
||||
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
|
||||
configuration.externalUrls=externalUrls/ExternalUrls.xml
|
||||
configuration.rda=RDACommonStandards.txt
|
||||
configuration.schematics=Schematics.json
|
||||
configuration.h2020template=documents/h2020.docx
|
||||
configuration.h2020datasettemplate=documents/h2020_dataset.docx
|
||||
|
|
|
@ -23,7 +23,6 @@ pdf.converter.url=http://opendmp-pdf:3000/
|
|||
|
||||
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
|
||||
configuration.externalUrls=externalUrls/ExternalUrls.xml
|
||||
configuration.rda=RDACommonStandards.txt
|
||||
configuration.h2020template=documents/h2020.docx
|
||||
configuration.h2020datasettemplate=documents/h2020_dataset.docx
|
||||
configuration.configurable_login_providers=configurableLoginProviders.json
|
||||
|
|
|
@ -17,7 +17,6 @@ pdf.converter.url=http://docsbox-web/
|
|||
|
||||
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
|
||||
configuration.externalUrls=externalUrls/ExternalUrls.xml
|
||||
configuration.rda=RDACommonStandards.txt
|
||||
configuration.h2020template=documents/h2020.docx
|
||||
configuration.h2020datasettemplate=documents/h2020_dataset.docx
|
||||
configuration.configurable_login_providers=ConfigurableLoginProviders.json
|
||||
|
|
|
@ -49,7 +49,6 @@ elasticsearch.certKey=
|
|||
|
||||
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
|
||||
configuration.externalUrls=externalUrls/ExternalUrls.xml
|
||||
configuration.rda=RDACommonStandards.txt
|
||||
configuration.schematics=Schematics.json
|
||||
configuration.h2020template=documents/h2020.docx
|
||||
configuration.h2020datasettemplate=documents/h2020_dataset.docx
|
||||
|
|
|
@ -59,7 +59,6 @@ export interface Field {
|
|||
data: any;
|
||||
visible: Visibility;
|
||||
validations: ValidationType[];
|
||||
rdaCommonStandard: string;
|
||||
schematics: string[];
|
||||
export: boolean;
|
||||
}
|
||||
|
|
|
@ -19,9 +19,6 @@ import { ConfigurationService } from '../configuration/configuration.service';
|
|||
@Injectable()
|
||||
export class DatasetProfileService extends BaseService {
|
||||
|
||||
private rdaCommonStandards: String[];
|
||||
private rdaCommonStandardsLoading: boolean;
|
||||
|
||||
private actionUrl: string;
|
||||
private headers = new HttpHeaders();
|
||||
|
||||
|
@ -78,19 +75,6 @@ export class DatasetProfileService extends BaseService {
|
|||
return this.http.post(this.actionUrl + "upload", formData, { params: params });
|
||||
}
|
||||
|
||||
getRDACommonStandards(): String[] {
|
||||
if (!this.rdaCommonStandards && !this.rdaCommonStandardsLoading) { this.getRDACommonStandardsInternal(); }
|
||||
return this.rdaCommonStandards;
|
||||
}
|
||||
|
||||
private getRDACommonStandardsInternal() {
|
||||
this.rdaCommonStandardsLoading = true;
|
||||
return this.http.get<String[]>(this.actionUrl + "getRDACommonStandards").pipe(takeUntil(this._destroyed)).subscribe(x => {
|
||||
this.rdaCommonStandards = x;
|
||||
this.rdaCommonStandardsLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
searchSchematics(like: string): Observable<String[]> {
|
||||
return this.http.get<String[]>(this.actionUrl + "getSchematics?query=" + like);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ export class FieldEditorModel extends BaseFormModel {
|
|||
public visible: VisibilityEditorModel = new VisibilityEditorModel();
|
||||
public data: FieldDataEditorModel<any>;
|
||||
public validations: ValidationType[] = [];
|
||||
public rdaCommonStandard: string;
|
||||
public schematics: string[];
|
||||
public export: boolean = true;
|
||||
|
||||
|
@ -59,7 +58,6 @@ export class FieldEditorModel extends BaseFormModel {
|
|||
this.validations = item.validations;
|
||||
this.viewStyle = new ViewStyleEditorModel().fromModel(item.viewStyle);
|
||||
this.visible = new VisibilityEditorModel().fromModel(item.visible);
|
||||
this.rdaCommonStandard = item.rdaCommonStandard;
|
||||
this.schematics = item.schematics;
|
||||
this.export = item.export;
|
||||
|
||||
|
@ -107,7 +105,6 @@ export class FieldEditorModel extends BaseFormModel {
|
|||
page: [{ value: this.page, disabled: (disabled && !skipDisable.includes('FieldEditorModel.page')) }],
|
||||
ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('FieldEditorModel.ordinal')) }],
|
||||
validations: [{ value: this.validations, disabled: (disabled && !skipDisable.includes('FieldEditorModel.validations')) }],
|
||||
rdaCommonStandard: [{value: this.rdaCommonStandard, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.rdaCommonStandard')) }],
|
||||
schematics: [{ value: this.schematics, disabled: (disabled && !skipDisable.includes('FieldEditorModel.schematics')) }],
|
||||
export: [{value: this.export, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.export'))}]
|
||||
});
|
||||
|
|
|
@ -72,9 +72,6 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
|
|||
|
||||
@Output() delete = new EventEmitter<void>();
|
||||
|
||||
|
||||
//rdaCommonStandards = this.datasetProfileService.getRDACommonStandards(); //GK: Don't do that again. The service has a weird async behaviour.
|
||||
|
||||
schematicsAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = {
|
||||
filterFn: this.filterSchematics.bind(this),
|
||||
initialItems: (excludedItems: any[]) => this.filterSchematics('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x !== resultItem)))),
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
"FreeTextFieldDataEditorModel.label",
|
||||
"WordListFieldDataEditorModel.label",
|
||||
"FieldDataOptionEditorModel.label",
|
||||
"FieldSetEditorModel.rdaCommonStandard",
|
||||
"FieldSetEditorModel.schematics",
|
||||
"FieldSetEditorModel.export"
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue