Merge pull request #97 from artlowel/add-type-to-mock-data

Add type to mock data
This commit is contained in:
Art Lowel
2017-06-01 18:05:17 +02:00
committed by GitHub
9 changed files with 42 additions and 23 deletions

View File

@@ -25,6 +25,7 @@ export abstract class NormalizedDSpaceObject implements CacheableObject {
/** /**
* A string representing the kind of DSpaceObject, e.g. community, item, … * A string representing the kind of DSpaceObject, e.g. community, item, …
*/ */
@autoserialize
type: string; type: string;
/** /**

View File

@@ -1,4 +1,3 @@
import { autoserialize, autoserializeAs } from "cerialize";
import { Metadatum } from "./metadatum.model" import { Metadatum } from "./metadatum.model"
import { isEmpty, isNotEmpty } from "../../shared/empty.util"; import { isEmpty, isNotEmpty } from "../../shared/empty.util";
import { CacheableObject } from "../cache/object-cache.reducer"; import { CacheableObject } from "../cache/object-cache.reducer";
@@ -9,19 +8,16 @@ import { RemoteData } from "../data/remote-data";
*/ */
export abstract class DSpaceObject implements CacheableObject { export abstract class DSpaceObject implements CacheableObject {
@autoserialize
self: string; self: string;
/** /**
* The human-readable identifier of this DSpaceObject * The human-readable identifier of this DSpaceObject
*/ */
@autoserialize
id: string; id: string;
/** /**
* The universally unique identifier of this DSpaceObject * The universally unique identifier of this DSpaceObject
*/ */
@autoserialize
uuid: string; uuid: string;
/** /**
@@ -32,13 +28,11 @@ export abstract class DSpaceObject implements CacheableObject {
/** /**
* The name for this DSpaceObject * The name for this DSpaceObject
*/ */
@autoserialize
name: string; name: string;
/** /**
* An array containing all metadata of this DSpaceObject * An array containing all metadata of this DSpaceObject
*/ */
@autoserializeAs(Metadatum)
metadata: Array<Metadatum>; metadata: Array<Metadatum>;
/** /**

View File

@@ -1,19 +1,16 @@
<!--.row to offset the app component's .container-fluid padding--> <div class="jumbotron jumbotron-fluid">
<div class="row"> <div class="container-fluid">
<div class="jumbotron jumbotron-fluid"> <h1 class="display-3">Welcome to DSpace</h1>
<div class="container-fluid"> <p class="lead">DSpace is an open source software platform that enables organisations to:</p>
<h1 class="display-3">Welcome to DSpace</h1> <ul>
<p class="lead">DSpace is an open source software platform that enables organisations to:</p> <li>capture and describe digital material using a submission workflow module, or a variety
<ul> of
<li>capture and describe digital material using a submission workflow module, or a variety programmatic ingest options
of </li>
programmatic ingest options <li>distribute an organisation's digital assets over the web through a search and retrieval
</li> system
<li>distribute an organisation's digital assets over the web through a search and retrieval </li>
system <li>preserve digital assets over the long term</li>
</li> </ul>
<li>preserve digital assets over the long term</li>
</ul>
</div>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,6 @@
@import '../../../styles/mixins.scss';
:host {
display: block;
@include negate-gutters();
}

View File

@@ -7,6 +7,7 @@ export const BITSTREAMS = [
}, },
"id": "3678", "id": "3678",
"uuid": "43c57c2b-206f-4645-8c8f-5f10c84b09fa", "uuid": "43c57c2b-206f-4645-8c8f-5f10c84b09fa",
"type": "bitstream",
"name": "do_open_access_CRL.pdf", "name": "do_open_access_CRL.pdf",
"size": 636626, "size": 636626,
"checksum": { "checksum": {
@@ -28,6 +29,7 @@ export const BITSTREAMS = [
}, },
"id": "8842", "id": "8842",
"uuid": "1a013ecc-fb25-4689-a44f-f1383ad26632", "uuid": "1a013ecc-fb25-4689-a44f-f1383ad26632",
"type": "bitstream",
"name": "do_open_access_CRL.pdf.jpg", "name": "do_open_access_CRL.pdf.jpg",
"size": 41183, "size": 41183,
"checksum": { "checksum": {

View File

@@ -12,6 +12,7 @@ export const BUNDLES = [
}, },
"id": "2355", "id": "2355",
"uuid": "35e0606d-5e18-4f9c-aa61-74fc751cc3f9", "uuid": "35e0606d-5e18-4f9c-aa61-74fc751cc3f9",
"type": "bundle",
"name": "ORIGINAL", "name": "ORIGINAL",
"metadata": [ "metadata": [
{ "key": "dc.title", "value": "ORIGINAL", "language": "en" } { "key": "dc.title", "value": "ORIGINAL", "language": "en" }
@@ -30,6 +31,7 @@ export const BUNDLES = [
}, },
"id": "5687", "id": "5687",
"uuid": "a469c57a-abcf-45c3-83e4-b187ebd708fd", "uuid": "a469c57a-abcf-45c3-83e4-b187ebd708fd",
"type": "bundle",
"name": "THUMBNAIL", "name": "THUMBNAIL",
"metadata": [ "metadata": [
{ "key": "dc.title", "value": "THUMBNAIL", "language": "en" } { "key": "dc.title", "value": "THUMBNAIL", "language": "en" }

View File

@@ -9,6 +9,7 @@ export const COLLECTIONS = [
}, },
"id": "5179", "id": "5179",
"uuid": "9e32a2e2-6b91-4236-a361-995ccdc14c60", "uuid": "9e32a2e2-6b91-4236-a361-995ccdc14c60",
"type": "collection",
"name": "A Test Collection", "name": "A Test Collection",
"handle": "123456789/5179", "handle": "123456789/5179",
"metadata": [ "metadata": [
@@ -44,6 +45,7 @@ export const COLLECTIONS = [
}, },
"id": "6547", "id": "6547",
"uuid": "598ce822-c357-46f3-ab70-63724d02d6ad", "uuid": "598ce822-c357-46f3-ab70-63724d02d6ad",
"type": "collection",
"name": "Another Test Collection", "name": "Another Test Collection",
"handle": "123456789/6547", "handle": "123456789/6547",
"metadata": [ "metadata": [

View File

@@ -23,6 +23,7 @@ export const ITEMS = [
}, },
"id": "8871", "id": "8871",
"uuid": "21539b1d-9ef1-4eda-9c77-49565b5bfb78", "uuid": "21539b1d-9ef1-4eda-9c77-49565b5bfb78",
"type": "item",
"name": "Do Open-Access Articles Have a Greater Research Impact?", "name": "Do Open-Access Articles Have a Greater Research Impact?",
"handle": "123456789/8871", "handle": "123456789/8871",
"lastModified": "2016-10-14 10:41:12.886", "lastModified": "2016-10-14 10:41:12.886",
@@ -115,6 +116,7 @@ export const ITEMS = [
}, },
"id": "9978", "id": "9978",
"uuid": "be8325f7-243b-49f4-8a4b-df2b793ff3b5", "uuid": "be8325f7-243b-49f4-8a4b-df2b793ff3b5",
"type": "item",
"name": "Another Test Item", "name": "Another Test Item",
"handle": "123456789/9978", "handle": "123456789/9978",
"lastModified": "2016-05-27 03:00:20.063", "lastModified": "2016-05-27 03:00:20.063",

13
src/styles/_mixins.scss Normal file
View File

@@ -0,0 +1,13 @@
@import './variables.scss';
@import '../../node_modules/bootstrap/scss/variables';
@import '../../node_modules/bootstrap/scss/mixins';
@mixin negate-gutters($gutters: $grid-gutter-widths) {
@each $breakpoint in map-keys($gutters) {
@include media-breakpoint-up($breakpoint) {
$gutter: map-get($gutters, $breakpoint);
margin-right: ($gutter / -2);
margin-left: ($gutter / -2);
}
}
}