61949: finished refactoring, adding type doc

This commit is contained in:
lotte
2019-04-29 16:21:36 +02:00
parent af291845ec
commit b2ceb8e9d6
39 changed files with 397 additions and 108 deletions

View File

@@ -1,20 +1,52 @@
import { ListableObject } from '../../shared/object-collection/shared/listable-object.model';
import { isNotEmpty } from '../../shared/empty.util';
import { MetadataSchema } from './metadata-schema.model';
import { ResourceType } from '../shared/resource-type';
/**
* Class the represents a metadata field
*/
export class MetadataField implements ListableObject {
/**
* The identifier of this metadata field
*/
id: number;
/**
* The self link of this metadata field
*/
self: string;
/**
* The element of this metadata field
*/
element: string;
/**
* The qualifier of this metadata field
*/
qualifier: string;
/**
* The scope note of this metadata field
*/
scopeNote: string;
/**
* The metadata schema object of this metadata field
*/
schema: MetadataSchema;
/**
* The resource type of this metadata field
*/
type: ResourceType;
/**
* Method to print this metadata field as a string
* @param separator The separator between the schema, element and qualifier in the string
*/
toString(separator: string = '.'): string {
let key = this.schema.prefix + separator + this.element;
if (isNotEmpty(this.qualifier)) {