Commit 94504edd authored by Baptiste Toulemonde's avatar Baptiste Toulemonde
Browse files

fix problème import data and pua control metadata

parent 53c6f8a8
......@@ -120,19 +120,19 @@ public class BaliseXML {
if (null != node.getValue() && !node.getValue().equals(UNDEFINED)) {
valueRNG = new ValueXML();
valueRNG.setValue(node.getValue());
} else if (!node.getName().isEmpty() && node.getName() != null) {
} /*else if (!node.getName().isEmpty() && node.getName() != null) {
dataRNG = new DataXML();
if(RNGConstants.getTypesMap().get(node.getName()) != null) {
dataRNG.setDataType(RNGConstants.getTypesMap().get(node.getName()).getLabel());
}
} else if (node.getName().equals("Language")) {
}*/ else if (node.getName().equals("Language")) {
dataRNG = new DataXML();
}
// When a value is declared in a profile element, the <rng:data> tag must be suppressed
// to assure that the generated profile is successfully imported by VITAM
if (null != node.getValueOrData() && !node.getValueOrData().equals(UNDEFINED) &&
node.getValue() == null && node.getValueOrData().equals("data")) {
node.getValueOrData().equals("data")) {
dataRNG = new DataXML();
}
......@@ -146,7 +146,8 @@ public class BaliseXML {
if (null != node.getDataType() && !node.getDataType().equals(UNDEFINED)) {
if (null != valueRNG) {
valueRNG.setDataType(node.getDataType());
} else if (null != dataRNG) {
}
if (null != dataRNG) {
dataRNG.setDataType(node.getDataType());
}
}
......
......@@ -290,23 +290,8 @@
<div class="ml-5 row">
<div class="col-4">
<mat-form-field class="mr-3 vitamui-mat-select"
*ngIf="!isEmptyEnumeration(enumerationsSedaControl); else blockInput">
<mat-select multiple panelClass="vitamui-mat-select" name="enumsControlSeleted"
(selectionChange)="addEnumsControlList($event.value)" [(ngModel)]="editedEnumControl">
<mat-option *ngFor="let element of enumerationsSedaControl" [value]="element">
{{element}}
</mat-option>
</mat-select>
<div class="select-arrow">
<i class="material-icons">keyboard_arrow_up</i>
<i class="material-icons">keyboard_arrow_down</i>
</div>
</mat-form-field>
<ng-template #blockInput>
<vitamui-common-editable-input (ngModelChange)="addEnumsControl($event)" [ngModel]="editedEnumControl">
<vitamui-common-editable-input (ngModelChange)="addEnumsControl($event)" [ngModel]="editedEnumControl">
</vitamui-common-editable-input>
</ng-template>
</div>
<div class="col-8" *ngIf="isEmptyEnumeration(enumerationsSedaControl) && isDataType()"><p class="pastis-indication">{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.FORMAT_ENUMERATION_AUTORISES' |
translate}}: <span *ngFor="let regex of availableRegex">{{ regex.label }}, </span></p></div>
......
......@@ -863,7 +863,7 @@ export class FileTreeMetadataComponent {
private setOrigineNodeValue(metadata: any, newValue: any) {
console.log(metadata.cardinalite + 'new Value ' + newValue);
if (this.clickedNode.name === metadata.nomDuChamp) {
if (this.clickedNode.name === metadata.nomDuChamp) {
this.clickedNode.value = null;
} else if (this.clickedNode.children.length > 0) {
const childNode = this.fileService.getFileNodeById(this.clickedNode, metadata.id);
......@@ -931,6 +931,7 @@ export class FileTreeMetadataComponent {
enum: this.enumsControlSeleted
};
}
this.clickedNode.sedaData.Enumeration = [];
} else {
this.clickedNode.puaData.enum = null;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment