61949: replacing object factories with decorator

This commit is contained in:
lotte
2019-04-24 16:51:46 +02:00
parent 6203fb443b
commit a5086b8d11
31 changed files with 118 additions and 49 deletions

View File

@@ -0,0 +1,25 @@
import { ListableObject } from '../../shared/object-collection/shared/listable-object.model';
import { isNotEmpty } from '../../shared/empty.util';
import { MetadataSchema } from './metadata-schema.model';
export class MetadataField implements ListableObject {
id: number;
self: string;
element: string;
qualifier: string;
scopeNote: string;
schema: MetadataSchema;
toString(separator: string = '.'): string {
let key = this.schema.prefix + separator + this.element;
if (isNotEmpty(this.qualifier)) {
key += separator + this.qualifier;
}
return key;
}
}