Added mocks for all model types, added CollectionDataService

This commit is contained in:
Art Lowel
2017-02-14 14:40:57 +01:00
parent c3214595ef
commit c8fb98760d
30 changed files with 1129 additions and 162 deletions

View File

@@ -0,0 +1,69 @@
import { autoserialize, inheritSerialization } from "cerialize";
import { DSpaceObject } from "./dspace-object.model";
import { Bitstream } from "./bitstream.model";
@inheritSerialization(DSpaceObject)
export class Collection extends DSpaceObject {
/**
* A string representing the unique handle of this Collection
*/
@autoserialize
handle: string;
/**
* The introductory text of this Collection
* Corresponds to the metadata field dc.description
*/
get introductoryText(): string {
return this.findMetadata("dc.description");
}
/**
* The short description: HTML
* Corresponds to the metadata field dc.description.abstract
*/
get shortDescription(): string {
return this.findMetadata("dc.description.abstract");
}
/**
* The copyright text of this Collection
* Corresponds to the metadata field dc.rights
*/
get copyrightText(): string {
return this.findMetadata("dc.rights");
}
/**
* The license of this Collection
* Corresponds to the metadata field dc.rights.license
*/
get license(): string {
return this.findMetadata("dc.rights.license");
}
/**
* The sidebar text of this Collection
* Corresponds to the metadata field dc.description.tableofcontents
*/
get sidebarText(): string {
return this.findMetadata("dc.description.tableofcontents");
}
/**
* The Bitstream that represents the logo of this Collection
*/
logo: Bitstream;
/**
* An array of Collections that are direct parents of this Collection
*/
parents: Array<Collection>;
/**
* The Collection that owns this Collection
*/
owner: Collection;
}