Merged dynamic form module

This commit is contained in:
Giuseppe Digilio
2018-05-09 12:14:18 +02:00
parent 99f8d4f24d
commit 7a32d18b1b
111 changed files with 6778 additions and 45 deletions

View File

@@ -0,0 +1,42 @@
import { isNotEmpty } from '../../../empty.util';
export class FormFieldMetadataValueObject {
metadata?: string;
value: string;
display: string;
language: any;
authority: string;
confidence: number;
place: number;
closed: boolean;
label: string;
constructor(value: string,
language: any = null,
authority: string = null,
display: string = null,
confidence: number = -1,
place: number = -1,
metadata: string = null) {
this.value = value;
this.language = language;
this.authority = authority;
this.display = display || value;
this.confidence = confidence;
if (authority != null) {
this.confidence = 600;
} else if (isNotEmpty(confidence)) {
this.confidence = confidence;
}
this.place = place;
if (isNotEmpty(metadata)) {
this.metadata = metadata;
}
}
hasAuthority(): boolean {
return isNotEmpty(this.authority);
}
}