updated with the latest changes

This commit is contained in:
Giuseppe Digilio
2018-06-11 11:13:05 +02:00
parent 10c739c903
commit 5ec01031d9
23 changed files with 375 additions and 242 deletions

View File

@@ -2,7 +2,7 @@ import { isNotEmpty } from '../../../empty.util';
export class FormFieldMetadataValueObject {
metadata?: string;
value: string;
value: any;
display: string;
language: any;
authority: string;
@@ -11,14 +11,14 @@ export class FormFieldMetadataValueObject {
closed: boolean;
label: string;
constructor(value: string,
constructor(value: any = null,
language: any = null,
authority: string = null,
display: string = null,
place: number = 0,
confidence: number = -1,
place: number = -1,
metadata: string = null) {
this.value = value;
this.value = isNotNull(value) ? ((typeof value === 'string') ? value.trim() : value) : null;
this.language = language;
this.authority = authority;
this.display = display || value;
@@ -39,4 +39,8 @@ export class FormFieldMetadataValueObject {
hasAuthority(): boolean {
return isNotEmpty(this.authority);
}
hasValue(): boolean {
return isNotEmpty(this.value);
}
}