mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 03:23:07 +00:00
Merged dynamic form module
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user