mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
61949: finished refactoring, adding type doc
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user