diff --git a/src/app/+item-page/edit-item-page/item-status/item-status.component.spec.ts b/src/app/+item-page/edit-item-page/item-status/item-status.component.spec.ts index fac7dc86f6..30f326bec4 100644 --- a/src/app/+item-page/edit-item-page/item-status/item-status.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-status/item-status.component.spec.ts @@ -11,7 +11,6 @@ import { Item } from '../../../core/shared/item.model'; import { By } from '@angular/platform-browser'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { of as observableOf } from 'rxjs'; -import { RemoteData } from '../../../core/data/remote-data'; import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils'; describe('ItemStatusComponent', () => { diff --git a/src/app/core/auth/models/normalized-auth-status.model.ts b/src/app/core/auth/models/normalized-auth-status.model.ts index 3dc723f97b..da0b32fcfb 100644 --- a/src/app/core/auth/models/normalized-auth-status.model.ts +++ b/src/app/core/auth/models/normalized-auth-status.model.ts @@ -39,10 +39,4 @@ export class NormalizedAuthStatus extends NormalizedObject { @relationship(EPerson, false) @autoserialize eperson: string; - - /** - * The resource object of this auth status - */ - @autoserialize - type: ResourceType; } diff --git a/src/app/core/config/models/config.model.ts b/src/app/core/config/models/config.model.ts index 81f20a0b3c..20d67ec69d 100644 --- a/src/app/core/config/models/config.model.ts +++ b/src/app/core/config/models/config.model.ts @@ -8,11 +8,6 @@ export abstract class ConfigObject implements CacheableObject { */ public name: string; - /** - * A string representing the kind of config object - */ - public type: ResourceType; - /** * The links to all related resources returned by the rest api. */ diff --git a/src/app/core/config/models/normalized-config.model.ts b/src/app/core/config/models/normalized-config.model.ts index d10be2d1c3..1bf4ffb826 100644 --- a/src/app/core/config/models/normalized-config.model.ts +++ b/src/app/core/config/models/normalized-config.model.ts @@ -15,12 +15,6 @@ export abstract class NormalizedConfigObject implemen @autoserialize public name: string; - /** - * A string representing the kind of config object - */ - @autoserialize - public type: ResourceType; - /** * The links to all related resources returned by the rest api. */ diff --git a/src/app/core/metadata/metadata-field.model.ts b/src/app/core/metadata/metadata-field.model.ts index 5e20d3f40e..288934e52d 100644 --- a/src/app/core/metadata/metadata-field.model.ts +++ b/src/app/core/metadata/metadata-field.model.ts @@ -39,11 +39,6 @@ export class MetadataField implements ListableObject { */ 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 diff --git a/src/app/core/metadata/metadata-schema.model.ts b/src/app/core/metadata/metadata-schema.model.ts index 206cf081ba..bc05e475cc 100644 --- a/src/app/core/metadata/metadata-schema.model.ts +++ b/src/app/core/metadata/metadata-schema.model.ts @@ -26,9 +26,4 @@ export class MetadataSchema implements ListableObject { * The namespace of this metadata schema */ namespace: string; - - /** - * The resource type of this metadata schema - */ - type: ResourceType; } diff --git a/src/app/core/metadata/normalized-metadata-field.model.ts b/src/app/core/metadata/normalized-metadata-field.model.ts index 484cbe5066..a844f7a394 100644 --- a/src/app/core/metadata/normalized-metadata-field.model.ts +++ b/src/app/core/metadata/normalized-metadata-field.model.ts @@ -1,6 +1,5 @@ import { autoserialize, deserialize } from 'cerialize'; import { mapsTo, relationship } from '../cache/builders/build-decorators'; -import { ResourceType } from '../shared/resource-type'; import { MetadataField } from './metadata-field.model'; import { NormalizedObject } from '../cache/models/normalized-object.model'; import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; @@ -48,10 +47,4 @@ export class NormalizedMetadataField extends NormalizedObject imp @deserialize @relationship(MetadataSchema) schema: string; - - /** - * The resource type of this normalized metadata field - */ - @autoserialize - type: ResourceType; } diff --git a/src/app/core/metadata/normalized-metadata-schema.model.ts b/src/app/core/metadata/normalized-metadata-schema.model.ts index d846b828b9..8d15ef2431 100644 --- a/src/app/core/metadata/normalized-metadata-schema.model.ts +++ b/src/app/core/metadata/normalized-metadata-schema.model.ts @@ -33,10 +33,4 @@ export class NormalizedMetadataSchema extends NormalizedObject i */ @autoserialize namespace: string; - - /** - * The resource type of this metadata schema - */ - @autoserialize - type: ResourceType; } diff --git a/src/app/core/registry/registry-bitstreamformats-response.model.ts b/src/app/core/registry/registry-bitstreamformats-response.model.ts index 81de379e9e..ddf926f3be 100644 --- a/src/app/core/registry/registry-bitstreamformats-response.model.ts +++ b/src/app/core/registry/registry-bitstreamformats-response.model.ts @@ -1,9 +1,11 @@ -import { autoserialize, autoserializeAs } from 'cerialize'; +import { autoserialize, deserialize } from 'cerialize'; import { PageInfo } from '../shared/page-info.model'; import { BitstreamFormat } from '../shared/bitstream-format.model'; +import { relationship } from '../cache/builders/build-decorators'; export class RegistryBitstreamformatsResponse { - @autoserializeAs(BitstreamFormat) + @deserialize + @relationship(BitstreamFormat, true) bitstreamformats: BitstreamFormat[]; @autoserialize diff --git a/src/app/core/registry/registry-metadataschemas-response.model.ts b/src/app/core/registry/registry-metadataschemas-response.model.ts index f27550bbe0..fc53b354a5 100644 --- a/src/app/core/registry/registry-metadataschemas-response.model.ts +++ b/src/app/core/registry/registry-metadataschemas-response.model.ts @@ -1,9 +1,11 @@ import { PageInfo } from '../shared/page-info.model'; -import { autoserialize, autoserializeAs } from 'cerialize'; +import { autoserialize, deserialize } from 'cerialize'; import { MetadataSchema } from '../metadata/metadata-schema.model'; +import { relationship } from '../cache/builders/build-decorators'; export class RegistryMetadataschemasResponse { - @autoserializeAs(MetadataSchema) + @deserialize + @relationship(MetadataSchema, true) metadataschemas: MetadataSchema[]; @autoserialize diff --git a/src/app/core/shared/bitstream-format.model.ts b/src/app/core/shared/bitstream-format.model.ts index 5509b37041..bf50cd832f 100644 --- a/src/app/core/shared/bitstream-format.model.ts +++ b/src/app/core/shared/bitstream-format.model.ts @@ -44,11 +44,6 @@ export class BitstreamFormat implements CacheableObject { */ self: string; - /** - * A ResourceType representing the kind of Object of this BitstreamFormat - */ - type: ResourceType; - /** * Universally unique identifier for this Bitstream Format */ diff --git a/src/app/core/shared/browse-definition.model.ts b/src/app/core/shared/browse-definition.model.ts index fe5fdd439b..fda6ebd3c1 100644 --- a/src/app/core/shared/browse-definition.model.ts +++ b/src/app/core/shared/browse-definition.model.ts @@ -16,9 +16,6 @@ export class BrowseDefinition implements TypedObject { @autoserializeAs('order') defaultSortOrder: string; - @autoserialize - type: ResourceType; - @autoserializeAs('metadata') metadataKeys: string[]; diff --git a/src/app/core/shared/item-relationships/item-type.model.ts b/src/app/core/shared/item-relationships/item-type.model.ts index a0e5adda91..2635f154a8 100644 --- a/src/app/core/shared/item-relationships/item-type.model.ts +++ b/src/app/core/shared/item-relationships/item-type.model.ts @@ -17,11 +17,6 @@ export class ItemType implements CacheableObject { */ self: string; - /** - * The type of Resource this is - */ - type: ResourceType; - /** * The universally unique identifier of this ItemType */ diff --git a/src/app/core/shared/item-relationships/relationship-type.model.ts b/src/app/core/shared/item-relationships/relationship-type.model.ts index a8e24cc012..98454bc000 100644 --- a/src/app/core/shared/item-relationships/relationship-type.model.ts +++ b/src/app/core/shared/item-relationships/relationship-type.model.ts @@ -15,11 +15,6 @@ export class RelationshipType implements CacheableObject { */ self: string; - /** - * The type of Resource this is - */ - type: ResourceType; - /** * The label that describes this RelationshipType */ diff --git a/src/app/core/shared/item-relationships/relationship.model.ts b/src/app/core/shared/item-relationships/relationship.model.ts index bd83c43029..8eb2fd27af 100644 --- a/src/app/core/shared/item-relationships/relationship.model.ts +++ b/src/app/core/shared/item-relationships/relationship.model.ts @@ -15,11 +15,6 @@ export class Relationship implements CacheableObject { */ self: string; - /** - * The type of Resource this is - */ - type: ResourceType; - /** * The universally unique identifier of this Relationship */ diff --git a/src/app/core/shared/normalized-browse-entry.model.ts b/src/app/core/shared/normalized-browse-entry.model.ts index 42a8fc2178..88e3842ce9 100644 --- a/src/app/core/shared/normalized-browse-entry.model.ts +++ b/src/app/core/shared/normalized-browse-entry.model.ts @@ -10,12 +10,6 @@ import { mapsTo } from '../cache/builders/build-decorators'; */ @mapsTo(BrowseEntry) export class NormalizedBrowseEntry extends NormalizedObject { - /** - * The resource type of this browse entry - */ - @autoserialize - type: ResourceType; - /** * The authority string of this browse entry */ diff --git a/src/app/core/shared/resource-policy.model.ts b/src/app/core/shared/resource-policy.model.ts index 7397076416..a80446a369 100644 --- a/src/app/core/shared/resource-policy.model.ts +++ b/src/app/core/shared/resource-policy.model.ts @@ -28,11 +28,6 @@ export class ResourcePolicy implements CacheableObject { */ self: string; - /** - * A ResourceType representing the kind of Object of this ResourcePolicy - */ - type: ResourceType; - /** * The universally unique identifier for this Resource Policy */ diff --git a/src/app/core/shared/resource-type.ts b/src/app/core/shared/resource-type.ts index 5cdc6e57df..61542a4b26 100644 --- a/src/app/core/shared/resource-type.ts +++ b/src/app/core/shared/resource-type.ts @@ -1,10 +1,4 @@ export class ResourceType { constructor(public value: string) { } - // SubmissionDefinitions = 'submissiondefinitions', - // SubmissionDefinition = 'submissiondefinition', - // SubmissionForm = 'submissionform', - // SubmissionForms = 'submissionforms', - // SubmissionSections = 'submissionsections', - // SubmissionSection = 'submissionsection', }