mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge branch 'master' into w2p-62849_relationships-in-submission
This commit is contained in:
@@ -11,7 +11,7 @@ language: node_js
|
||||
|
||||
node_js:
|
||||
- "8"
|
||||
- "9"
|
||||
- "10"
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
|
@@ -14,7 +14,7 @@ If you're looking for the 2016 Angular 2 DSpace UI prototype, you can find it [h
|
||||
Quick start
|
||||
-----------
|
||||
|
||||
**Ensure you're running [Node](https://nodejs.org) >= `v8.0.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) >= `v1.x`**
|
||||
**Ensure you're running [Node](https://nodejs.org) `v8.0.x` or `v10.0.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) >= `v1.x`**
|
||||
|
||||
```bash
|
||||
# clone the repo
|
||||
@@ -65,7 +65,7 @@ Requirements
|
||||
------------
|
||||
|
||||
- [Node.js](https://nodejs.org), [npm](https://www.npmjs.com/), and [yarn](https://yarnpkg.com)
|
||||
- Ensure you're running node >= `v8.x`, npm >= `v5.x` and yarn >= `v1.x`
|
||||
- Ensure you're running node `v8.x` or `v10.x`, npm >= `v5.x` and yarn >= `v1.x`
|
||||
|
||||
If you have [`nvm`](https://github.com/creationix/nvm#install-script) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) installed, which is highly recommended, you can run `nvm install --lts && nvm use` to install and start using the latest Node LTS.
|
||||
|
||||
|
20
package.json
20
package.json
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
"node": "8.* || >= 10.*"
|
||||
},
|
||||
"scripts": {
|
||||
"global": "npm install -g @angular/cli marked node-gyp nodemon node-nightly npm-check-updates npm-run-all rimraf typescript ts-node typedoc webpack webpack-bundle-analyzer pm2 rollup",
|
||||
@@ -51,7 +51,7 @@
|
||||
"debug:server": "node-nightly --inspect --debug-brk dist/server.js",
|
||||
"debug:build": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --mode development",
|
||||
"debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --env.aot --env.client --env.server --mode production",
|
||||
"ci": "yarn run lint && yarn run build:aot && yarn run test:headless && npm-run-all -p -r server e2e",
|
||||
"ci": "yarn run lint && yarn run build:aot && yarn run test:headless",
|
||||
"protractor": "node node_modules/protractor/bin/protractor",
|
||||
"pree2e": "yarn run webdriver:update",
|
||||
"e2e": "yarn run protractor",
|
||||
@@ -62,7 +62,9 @@
|
||||
"webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone --gecko false",
|
||||
"lint": "tslint \"src/**/*.ts\" && tslint \"e2e/**/*.ts\"",
|
||||
"docs": "typedoc --options typedoc.json ./src/",
|
||||
"coverage": "http-server -c-1 -o -p 9875 ./coverage"
|
||||
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
|
||||
"postinstall": "yarn run patch-protractor",
|
||||
"patch-protractor": "ncp node_modules/webdriver-manager node_modules/protractor/node_modules/webdriver-manager"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^6.1.4",
|
||||
@@ -120,7 +122,7 @@
|
||||
"ngx-moment": "^3.1.0",
|
||||
"ngx-pagination": "3.0.3",
|
||||
"nouislider": "^11.0.0",
|
||||
"pem": "1.12.3",
|
||||
"pem": "1.13.2",
|
||||
"reflect-metadata": "0.1.12",
|
||||
"rxjs": "6.2.2",
|
||||
"rxjs-spy": "^7.5.1",
|
||||
@@ -168,7 +170,7 @@
|
||||
"codelyzer": "^4.4.4",
|
||||
"compression-webpack-plugin": "^1.1.6",
|
||||
"copy-webpack-plugin": "^4.4.1",
|
||||
"copyfiles": "^2.1.0",
|
||||
"copyfiles": "^2.1.1",
|
||||
"coveralls": "3.0.0",
|
||||
"css-loader": "1.0.0",
|
||||
"cssnano": "^4.1.10",
|
||||
@@ -191,8 +193,9 @@
|
||||
"karma-remap-coverage": "^0.1.5",
|
||||
"karma-remap-istanbul": "0.6.0",
|
||||
"karma-sourcemap-loader": "0.3.7",
|
||||
"karma-webdriver-launcher": "1.0.5",
|
||||
"karma-webdriver-launcher": "^1.0.7",
|
||||
"karma-webpack": "3.0.0",
|
||||
"ncp": "^2.0.0",
|
||||
"ngrx-store-freeze": "^0.2.4",
|
||||
"node-sass": "^4.11.0",
|
||||
"nodemon": "^1.15.0",
|
||||
@@ -205,7 +208,7 @@
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-responsive-type": "1.0.0",
|
||||
"postcss-smart-import": "0.7.6",
|
||||
"protractor": "^5.3.0",
|
||||
"protractor": "^5.4.2",
|
||||
"protractor-istanbul-plugin": "2.0.0",
|
||||
"raw-loader": "0.5.1",
|
||||
"resolve-url-loader": "^2.3.0",
|
||||
@@ -226,10 +229,11 @@
|
||||
"tslint": "5.11.0",
|
||||
"typedoc": "^0.9.0",
|
||||
"typescript": "^2.9.1",
|
||||
"webdriver-manager": "^12.1.6",
|
||||
"webpack": "^4.17.1",
|
||||
"webpack-bundle-analyzer": "^3.3.2",
|
||||
"webpack-dev-middleware": "3.2.0",
|
||||
"webpack-dev-server": "^3.1.5",
|
||||
"webpack-dev-server": "^3.1.11",
|
||||
"webpack-import-glob-loader": "^1.6.3",
|
||||
"webpack-merge": "4.1.4",
|
||||
"webpack-node-externals": "1.7.2"
|
||||
|
@@ -1,277 +1,149 @@
|
||||
{
|
||||
"footer": {
|
||||
"copyright": "copyright © 2002-{{ year }}",
|
||||
"link.dspace": "software DSpace",
|
||||
"link.duraspace": "DuraSpace"
|
||||
},
|
||||
"collection": {
|
||||
"page": {
|
||||
"news": "Novinky",
|
||||
"license": "Licence",
|
||||
"browse": {
|
||||
"recent": {
|
||||
"head": "Poslední příspěvky"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"community": {
|
||||
"page": {
|
||||
"news": "Novinky",
|
||||
"license": "Licence"
|
||||
},
|
||||
"sub-collection-list": {
|
||||
"head": "Kolekce v této komunitě"
|
||||
}
|
||||
},
|
||||
"item": {
|
||||
"page": {
|
||||
"author": "Autor",
|
||||
"abstract": "Abstract",
|
||||
"date": "Datum",
|
||||
"uri": "URI",
|
||||
"files": "Soubory",
|
||||
"collections": "Kolekce",
|
||||
"filesection": {
|
||||
"download": "Stáhnout",
|
||||
"name": "Název:",
|
||||
"format": "Formát:",
|
||||
"size": "Velikost:",
|
||||
"description": "Popis:"
|
||||
},
|
||||
"link": {
|
||||
"simple": "Minimální záznam",
|
||||
"full": "Úplný záznam"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nav": {
|
||||
"home": "Domů",
|
||||
"login": "Přihlásit se",
|
||||
"logout": "Odhlásit se"
|
||||
},
|
||||
"pagination": {
|
||||
"results-per-page": "Výsledků na stránku",
|
||||
"sort-direction": "Seřazení",
|
||||
"showing": {
|
||||
"label": "Zobrazují se záznamy ",
|
||||
"detail": "{{ range }} z {{ total }}"
|
||||
}
|
||||
},
|
||||
"sorting": {
|
||||
"score": {
|
||||
"DESC": "Relevance"
|
||||
},
|
||||
"dc.title": {
|
||||
"ASC": "Název vzestupně",
|
||||
"DESC": "Název sestupně"
|
||||
}
|
||||
},
|
||||
"title": "DSpace",
|
||||
"404": {
|
||||
"help": "Nepodařilo se najít stránku, kterou hledáte. Je možné, že stránka byla přesunuta nebo smazána. Pomocí tlačítka níže můžete přejít na domovskou stránku. ",
|
||||
"page-not-found": "stránka nenalezena",
|
||||
"link": {
|
||||
"home-page": "Přejít na domovskou stránku"
|
||||
}
|
||||
},
|
||||
"home": {
|
||||
"title": "DSpace Angular :: Domů",
|
||||
"description": "",
|
||||
"top-level-communities": {
|
||||
"head": "Komunity v DSpace",
|
||||
"help": "Vybráním komunity můžete prohlížet její kolekce."
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"title": "DSpace Angular :: Hledat",
|
||||
"description": "",
|
||||
"form": {
|
||||
"search": "Hledat",
|
||||
"search_dspace": "Hledat v DSpace"
|
||||
},
|
||||
"results": {
|
||||
"head": "Výsledky hledání",
|
||||
"no-results": "Nebyli nalezeny žádné výsledky"
|
||||
},
|
||||
"sidebar": {
|
||||
"close": "Zpět na výsledky",
|
||||
"open": "Vyhledávací nástroje",
|
||||
"results": "výsledky",
|
||||
"filters": {
|
||||
"title": "Filtry"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Nastavení",
|
||||
"sort-by": "Řadit dle",
|
||||
"rpp": "Výsledků na stránku"
|
||||
}
|
||||
},
|
||||
"view-switch": {
|
||||
"show-list": "Zobrazit seznam",
|
||||
"show-grid": "Zobrazit mřížku"
|
||||
},
|
||||
"filters": {
|
||||
"head": "Filtry",
|
||||
"reset": "Obnovit filtry",
|
||||
"applied": {
|
||||
"f.author": "Autor",
|
||||
"f.dateIssued.min": "Od data",
|
||||
"f.dateIssued.max": "Do data",
|
||||
"f.subject": "Předmět",
|
||||
"f.has_content_in_original_bundle": "Má soubory"
|
||||
},
|
||||
"filter": {
|
||||
"show-more": "Zobrazit více",
|
||||
"show-less": "Sbalit",
|
||||
"author": {
|
||||
"placeholder": "Jméno autora",
|
||||
"head": "Autor"
|
||||
},
|
||||
"scope": {
|
||||
"placeholder": "Filtr rozsahu",
|
||||
"head": "Rozsah"
|
||||
},
|
||||
"subject": {
|
||||
"placeholder": "Předmět",
|
||||
"head": "Předmět"
|
||||
},
|
||||
"dateIssued": {
|
||||
"max": {
|
||||
"placeholder": "Datum od"
|
||||
},
|
||||
"min": {
|
||||
"placeholder": "Datum do"
|
||||
},
|
||||
"head": "Datum"
|
||||
},
|
||||
"has_content_in_original_bundle": {
|
||||
"head": "Má soubory"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"browse": {
|
||||
"title": "Prohlížíte {{ collection }} dle {{ field }} {{ value }}"
|
||||
},
|
||||
"admin": {
|
||||
"registries": {
|
||||
"metadata": {
|
||||
"title": "DSpace Angular :: Registr metadat",
|
||||
"head": "Registr metadat",
|
||||
"description": "Registr metadat je seznam všech metadatových polí dostupných v repozitáři. Tyto pole mohou být rozdělena do více schémat. DSpace však vyžaduje použití schématu kvalifikový Dublin Core.",
|
||||
"schemas": {
|
||||
"table": {
|
||||
"id": "ID",
|
||||
"namespace": "Jmenný prostor",
|
||||
"name": "Název"
|
||||
},
|
||||
"no-items": "Žádná schémata metadat."
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"title": "DSpace Angular :: Registr schémat metadat",
|
||||
"head": "Metadata Schema",
|
||||
"description": "Toto je schéma metadat pro „{{namespace}}“.",
|
||||
"fields": {
|
||||
"head": "Pole schématu metadat",
|
||||
"table": {
|
||||
"field": "Pole",
|
||||
"scopenote": "Poznámka o rozsahu"
|
||||
},
|
||||
"no-items": "Žádná metadatová pole."
|
||||
}
|
||||
},
|
||||
"bitstream-formats": {
|
||||
"title": "DSpace Angular :: Registr formátů souborů",
|
||||
"head": "Registr formátů souborů",
|
||||
"description": "Tento seznam formátů souborů poskytuje informace o známých formátech a o úrovni jejich podpory.",
|
||||
"formats": {
|
||||
"table": {
|
||||
"name": "Název",
|
||||
"mimetype": "Typ MIME",
|
||||
"supportLevel": {
|
||||
"head": "Úroveň podpory",
|
||||
"0": "Neznámá",
|
||||
"1": "Známá",
|
||||
"2": "Podpora"
|
||||
},
|
||||
"internal": "interní"
|
||||
},
|
||||
"no-items": "Žádné formáty souborů."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"loading": {
|
||||
"default": "Načítá se...",
|
||||
"top-level-communities": "Načítají se komunity nejvyšší úrovně...",
|
||||
"community": "Načítá se komunita...",
|
||||
"collection": "Načítá se kolekce...",
|
||||
"sub-collections": "Načítají se subkolekce...",
|
||||
"recent-submissions": "Načítají se poslední příspěvky...",
|
||||
"item": "Načítá se záznam...",
|
||||
"objects": "Načítá se...",
|
||||
"search-results": "Načítají se výsledky hledání...",
|
||||
"browse-by": "Načítají se záznamy..."
|
||||
},
|
||||
"error": {
|
||||
"default": "Chyba",
|
||||
"top-level-communities": "Chyba během stahování komunit nejvyšší úrovně",
|
||||
"community": "Chyba během stahování komunity",
|
||||
"collection": "Chyba během stahování kolekce",
|
||||
"sub-collections": "Chyba během stahování subkolekcí",
|
||||
"recent-submissions": "Chyba během stahování posledních příspěvků",
|
||||
"item": "Chyba během stahování záznamu",
|
||||
"objects": "Chyba během stahování objektů",
|
||||
"search-results": "Chyba během stahování výsledků hledání",
|
||||
"browse-by": "Chyba během stahování záznamů",
|
||||
"validation": {
|
||||
"pattern": "Tento vstup je omezen dle vzoru: {{ pattern }}.",
|
||||
"license": {
|
||||
"notgranted": "Pro dokončení zaslání Musíte udělit licenci. Pokud v tuto chvíli tuto licenci nemůžete udělit, můžete svou práci uložit a později se k svému příspěveku vrátit nebo jej smazat."
|
||||
}
|
||||
}
|
||||
},
|
||||
"form": {
|
||||
"submit": "Odeslat",
|
||||
"cancel": "Zrušit",
|
||||
"search": "Hledat",
|
||||
"remove": "Smazat",
|
||||
"first-name": "Křestní jméno",
|
||||
"last-name": "Příjmení",
|
||||
"loading": "Načítá se...",
|
||||
"no-results": "Nebyli nalezeny žádné výsledky",
|
||||
"no-value": "Nebyla zadána hodnota",
|
||||
"group-collapse": "Sbalit",
|
||||
"group-expand": "Rozbalit",
|
||||
"group-collapse-help": "Kliknutím sem sbalíte",
|
||||
"group-expand-help": "Kliknutím sem rozbalíte a přidáte další prvky"
|
||||
},
|
||||
"login": {
|
||||
"title": "Přihlásit se",
|
||||
"form": {
|
||||
"header": "Prosím, přihlaste se do DSpace",
|
||||
"email": "E-mailová adresa",
|
||||
"forgot-password": "Zapomněli jste své heslo?",
|
||||
"new-user": "Nový uživatel? Zaregistrujte se kliknutím sem.",
|
||||
"password": "Heslo",
|
||||
"submit": "Přihlásit se"
|
||||
}
|
||||
},
|
||||
"logout": {
|
||||
"title": "Odhlásit se",
|
||||
"form": {
|
||||
"header": "Odhlásit se z DSpace",
|
||||
"submit": "Odhlásit se"
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"messages": {
|
||||
"expired": "Vaše relace vypršela. Prosím, znova se přihlaste."
|
||||
},
|
||||
"errors": {
|
||||
"invalid-user": "Neplatná e-mailová adresa nebo heslo."
|
||||
}
|
||||
}
|
||||
"404.help": "Nepodařilo se najít stránku, kterou hledáte. Je možné, že stránka byla přesunuta nebo smazána. Pomocí tlačítka níže můžete přejít na domovskou stránku. ",
|
||||
"404.link.home-page": "Přejít na domovskou stránku",
|
||||
"404.page-not-found": "stránka nenalezena",
|
||||
"admin.registries.bitstream-formats.description": "Tento seznam formátů souborů poskytuje informace o známých formátech a o úrovni jejich podpory.",
|
||||
"admin.registries.bitstream-formats.formats.no-items": "Žádné formáty souborů.",
|
||||
"admin.registries.bitstream-formats.formats.table.internal": "interní",
|
||||
"admin.registries.bitstream-formats.formats.table.mimetype": "Typ MIME",
|
||||
"admin.registries.bitstream-formats.formats.table.name": "Název",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.0": "Neznámá",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.1": "Známá",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.2": "Podpora",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Úroveň podpory",
|
||||
"admin.registries.bitstream-formats.head": "Registr formátů souborů",
|
||||
"admin.registries.bitstream-formats.title": "DSpace Angular :: Registr formátů souborů",
|
||||
"admin.registries.metadata.description": "Registr metadat je seznam všech metadatových polí dostupných v repozitáři. Tyto pole mohou být rozdělena do více schémat. DSpace však vyžaduje použití schématu kvalifikový Dublin Core.",
|
||||
"admin.registries.metadata.head": "Registr metadat",
|
||||
"admin.registries.metadata.schemas.no-items": "Žádná schémata metadat.",
|
||||
"admin.registries.metadata.schemas.table.id": "ID",
|
||||
"admin.registries.metadata.schemas.table.name": "Název",
|
||||
"admin.registries.metadata.schemas.table.namespace": "Jmenný prostor",
|
||||
"admin.registries.metadata.title": "DSpace Angular :: Registr metadat",
|
||||
"admin.registries.schema.description": "Toto je schéma metadat pro „{{namespace}}“.",
|
||||
"admin.registries.schema.fields.head": "Pole schématu metadat",
|
||||
"admin.registries.schema.fields.no-items": "Žádná metadatová pole.",
|
||||
"admin.registries.schema.fields.table.field": "Pole",
|
||||
"admin.registries.schema.fields.table.scopenote": "Poznámka o rozsahu",
|
||||
"admin.registries.schema.head": "Metadata Schema",
|
||||
"admin.registries.schema.title": "DSpace Angular :: Registr schémat metadat",
|
||||
"auth.errors.invalid-user": "Neplatná e-mailová adresa nebo heslo.",
|
||||
"auth.messages.expired": "Vaše relace vypršela. Prosím, znova se přihlaste.",
|
||||
"browse.title": "Prohlížíte {{ collection }} dle {{ field }} {{ value }}",
|
||||
"collection.page.browse.recent.head": "Poslední příspěvky",
|
||||
"collection.page.license": "Licence",
|
||||
"collection.page.news": "Novinky",
|
||||
"community.page.license": "Licence",
|
||||
"community.page.news": "Novinky",
|
||||
"community.sub-collection-list.head": "Kolekce v této komunitě",
|
||||
"error.browse-by": "Chyba během stahování záznamů",
|
||||
"error.collection": "Chyba během stahování kolekce",
|
||||
"error.community": "Chyba během stahování komunity",
|
||||
"error.default": "Chyba",
|
||||
"error.item": "Chyba během stahování záznamu",
|
||||
"error.objects": "Chyba během stahování objektů",
|
||||
"error.recent-submissions": "Chyba během stahování posledních příspěvků",
|
||||
"error.search-results": "Chyba během stahování výsledků hledání",
|
||||
"error.sub-collections": "Chyba během stahování subkolekcí",
|
||||
"error.top-level-communities": "Chyba během stahování komunit nejvyšší úrovně",
|
||||
"error.validation.license.notgranted": "Pro dokončení zaslání Musíte udělit licenci. Pokud v tuto chvíli tuto licenci nemůžete udělit, můžete svou práci uložit a později se k svému příspěveku vrátit nebo jej smazat.",
|
||||
"error.validation.pattern": "Tento vstup je omezen dle vzoru: {{ pattern }}.",
|
||||
"footer.copyright": "copyright © 2002-{{ year }}",
|
||||
"footer.link.dspace": "software DSpace",
|
||||
"footer.link.duraspace": "DuraSpace",
|
||||
"form.cancel": "Zrušit",
|
||||
"form.first-name": "Křestní jméno",
|
||||
"form.group-collapse": "Sbalit",
|
||||
"form.group-collapse-help": "Kliknutím sem sbalíte",
|
||||
"form.group-expand": "Rozbalit",
|
||||
"form.group-expand-help": "Kliknutím sem rozbalíte a přidáte další prvky",
|
||||
"form.last-name": "Příjmení",
|
||||
"form.loading": "Načítá se...",
|
||||
"form.no-results": "Nebyli nalezeny žádné výsledky",
|
||||
"form.no-value": "Nebyla zadána hodnota",
|
||||
"form.remove": "Smazat",
|
||||
"form.search": "Hledat",
|
||||
"form.submit": "Odeslat",
|
||||
"home.description": "",
|
||||
"home.title": "DSpace Angular :: Domů",
|
||||
"home.top-level-communities.head": "Komunity v DSpace",
|
||||
"home.top-level-communities.help": "Vybráním komunity můžete prohlížet její kolekce.",
|
||||
"item.page.abstract": "Abstract",
|
||||
"item.page.author": "Autor",
|
||||
"item.page.collections": "Kolekce",
|
||||
"item.page.date": "Datum",
|
||||
"item.page.files": "Soubory",
|
||||
"item.page.filesection.description": "Popis:",
|
||||
"item.page.filesection.download": "Stáhnout",
|
||||
"item.page.filesection.format": "Formát:",
|
||||
"item.page.filesection.name": "Název:",
|
||||
"item.page.filesection.size": "Velikost:",
|
||||
"item.page.link.full": "Úplný záznam",
|
||||
"item.page.link.simple": "Minimální záznam",
|
||||
"item.page.uri": "URI",
|
||||
"loading.browse-by": "Načítají se záznamy...",
|
||||
"loading.collection": "Načítá se kolekce...",
|
||||
"loading.community": "Načítá se komunita...",
|
||||
"loading.default": "Načítá se...",
|
||||
"loading.item": "Načítá se záznam...",
|
||||
"loading.objects": "Načítá se...",
|
||||
"loading.recent-submissions": "Načítají se poslední příspěvky...",
|
||||
"loading.search-results": "Načítají se výsledky hledání...",
|
||||
"loading.sub-collections": "Načítají se subkolekce...",
|
||||
"loading.top-level-communities": "Načítají se komunity nejvyšší úrovně...",
|
||||
"login.form.email": "E-mailová adresa",
|
||||
"login.form.forgot-password": "Zapomněli jste své heslo?",
|
||||
"login.form.header": "Prosím, přihlaste se do DSpace",
|
||||
"login.form.new-user": "Nový uživatel? Zaregistrujte se kliknutím sem.",
|
||||
"login.form.password": "Heslo",
|
||||
"login.form.submit": "Přihlásit se",
|
||||
"login.title": "Přihlásit se",
|
||||
"logout.form.header": "Odhlásit se z DSpace",
|
||||
"logout.form.submit": "Odhlásit se",
|
||||
"logout.title": "Odhlásit se",
|
||||
"nav.home": "Domů",
|
||||
"nav.login": "Přihlásit se",
|
||||
"nav.logout": "Odhlásit se",
|
||||
"pagination.results-per-page": "Výsledků na stránku",
|
||||
"pagination.showing.detail": "{{ range }} z {{ total }}",
|
||||
"pagination.showing.label": "Zobrazují se záznamy ",
|
||||
"pagination.sort-direction": "Seřazení",
|
||||
"search.description": "",
|
||||
"search.filters.applied.f.author": "Autor",
|
||||
"search.filters.applied.f.dateIssued.max": "Do data",
|
||||
"search.filters.applied.f.dateIssued.min": "Od data",
|
||||
"search.filters.applied.f.has_content_in_original_bundle": "Má soubory",
|
||||
"search.filters.applied.f.subject": "Předmět",
|
||||
"search.filters.filter.author.head": "Autor",
|
||||
"search.filters.filter.author.placeholder": "Jméno autora",
|
||||
"search.filters.filter.dateIssued.head": "Datum",
|
||||
"search.filters.filter.dateIssued.max.placeholder": "Datum od",
|
||||
"search.filters.filter.dateIssued.min.placeholder": "Datum do",
|
||||
"search.filters.filter.has_content_in_original_bundle.head": "Má soubory",
|
||||
"search.filters.filter.scope.head": "Rozsah",
|
||||
"search.filters.filter.scope.placeholder": "Filtr rozsahu",
|
||||
"search.filters.filter.show-less": "Sbalit",
|
||||
"search.filters.filter.show-more": "Zobrazit více",
|
||||
"search.filters.filter.subject.head": "Předmět",
|
||||
"search.filters.filter.subject.placeholder": "Předmět",
|
||||
"search.filters.head": "Filtry",
|
||||
"search.filters.reset": "Obnovit filtry",
|
||||
"search.form.search": "Hledat",
|
||||
"search.form.search_dspace": "Hledat v DSpace",
|
||||
"search.results.head": "Výsledky hledání",
|
||||
"search.results.no-results": "Nebyli nalezeny žádné výsledky",
|
||||
"search.sidebar.close": "Zpět na výsledky",
|
||||
"search.sidebar.filters.title": "Filtry",
|
||||
"search.sidebar.open": "Vyhledávací nástroje",
|
||||
"search.sidebar.results": "výsledky",
|
||||
"search.sidebar.settings.rpp": "Výsledků na stránku",
|
||||
"search.sidebar.settings.sort-by": "Řadit dle",
|
||||
"search.sidebar.settings.title": "Nastavení",
|
||||
"search.title": "DSpace Angular :: Hledat",
|
||||
"search.view-switch.show-grid": "Zobrazit mřížku",
|
||||
"search.view-switch.show-list": "Zobrazit seznam",
|
||||
"sorting.dc.title.ASC": "Název vzestupně",
|
||||
"sorting.dc.title.DESC": "Název sestupně",
|
||||
"sorting.score.DESC": "Relevance",
|
||||
"title": "DSpace"
|
||||
}
|
||||
|
@@ -1,277 +1,149 @@
|
||||
{
|
||||
"footer": {
|
||||
"copyright": "Copyright © 2002-{{ year }}",
|
||||
"link.dspace": "DSpace Software",
|
||||
"link.duraspace": "DuraSpace"
|
||||
},
|
||||
"collection": {
|
||||
"page": {
|
||||
"news": "Neuigkeiten",
|
||||
"license": "Lizenz",
|
||||
"browse": {
|
||||
"recent": {
|
||||
"head": "Aktuellste Veröffentlichungen"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"community": {
|
||||
"page": {
|
||||
"news": "Neuigkeiten",
|
||||
"license": "Lizenz"
|
||||
},
|
||||
"sub-collection-list": {
|
||||
"head": "Sammlungen in diesem Bereich"
|
||||
}
|
||||
},
|
||||
"item": {
|
||||
"page": {
|
||||
"author": "Autor",
|
||||
"abstract": "Kurzfassung",
|
||||
"date": "Datum",
|
||||
"uri": "URI",
|
||||
"files": "Dateien",
|
||||
"collections": "Sammlungen",
|
||||
"filesection": {
|
||||
"download": "Herunterladen",
|
||||
"name": "Name:",
|
||||
"format": "Format:",
|
||||
"size": "Größe:",
|
||||
"description": "Beschreibung:"
|
||||
},
|
||||
"link": {
|
||||
"simple": "Kurzanzeige",
|
||||
"full": "Vollanzeige"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nav": {
|
||||
"home": "Zur Startseite",
|
||||
"login": "Anmelden",
|
||||
"logout": "Abmelden"
|
||||
},
|
||||
"pagination": {
|
||||
"results-per-page": "Ergebnisse pro Seite",
|
||||
"sort-direction": "Sortiermöglichkeiten",
|
||||
"showing": {
|
||||
"label": "Anzeige der Treffer ",
|
||||
"detail": "{{ range }} bis {{ total }}"
|
||||
}
|
||||
},
|
||||
"sorting": {
|
||||
"score": {
|
||||
"DESC": "Relevanz"
|
||||
},
|
||||
"dc.title": {
|
||||
"ASC": "Titel aufsteigend",
|
||||
"DESC": "Titel absteigend"
|
||||
}
|
||||
},
|
||||
"title": "DSpace",
|
||||
"404": {
|
||||
"help": "Die Seite, die Sie aufrufen wollten, konnte nicht gefunden werden. Sie könnte verschoben oder gelöscht worden sein. Mit dem Link unten kommen Sie zurück zur Startseite. ",
|
||||
"page-not-found": "Seite nicht gefunden",
|
||||
"link": {
|
||||
"home-page": "Zurück zur Startseite"
|
||||
}
|
||||
},
|
||||
"home": {
|
||||
"title": "DSpace Angular :: Startseite",
|
||||
"description": "",
|
||||
"top-level-communities": {
|
||||
"head": "Bereiche in DSpace",
|
||||
"help": "Wählen Sie einen Bereich, um seine Sammlungen einzusehen."
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"title": "DSpace Angular :: Suche",
|
||||
"description": "",
|
||||
"form": {
|
||||
"search": "Suche",
|
||||
"search_dspace": "DSpace durchsuchen"
|
||||
},
|
||||
"results": {
|
||||
"head": "Suchergebnisse",
|
||||
"no-results": "Zu dieser Suche gibt es keine Treffer."
|
||||
},
|
||||
"sidebar": {
|
||||
"close": "Zurück zu den Ergebnissen",
|
||||
"open": "Suchwerkzeuge",
|
||||
"results": "Ergebnisse",
|
||||
"filters": {
|
||||
"title": "Filter"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Einstellungen",
|
||||
"sort-by": "Sortiere nach",
|
||||
"rpp": "Treffer pro Seite"
|
||||
}
|
||||
},
|
||||
"view-switch": {
|
||||
"show-list": "Zeige als Liste",
|
||||
"show-grid": "Zeige als Raster"
|
||||
},
|
||||
"filters": {
|
||||
"head": "Filter",
|
||||
"reset": "Filter zurücksetzen",
|
||||
"applied": {
|
||||
"f.author": "Autor",
|
||||
"f.dateIssued.min": "Anfangsdatum",
|
||||
"f.dateIssued.max": "Enddatum",
|
||||
"f.subject": "Thema",
|
||||
"f.has_content_in_original_bundle": "Besitzt Dateien"
|
||||
},
|
||||
"filter": {
|
||||
"show-more": "Zeige mehr",
|
||||
"show-less": "Zeige weniger",
|
||||
"author": {
|
||||
"placeholder": "Autor",
|
||||
"head": "Autor"
|
||||
},
|
||||
"scope": {
|
||||
"placeholder": "Bereichsfilter",
|
||||
"head": "Bereich"
|
||||
},
|
||||
"subject": {
|
||||
"placeholder": "Schlagwort",
|
||||
"head": "Schlagwort"
|
||||
},
|
||||
"dateIssued": {
|
||||
"max": {
|
||||
"placeholder": "Frühestes Datum"
|
||||
},
|
||||
"min": {
|
||||
"placeholder": "Ältestes Datum"
|
||||
},
|
||||
"head": "Datum"
|
||||
},
|
||||
"has_content_in_original_bundle": {
|
||||
"head": "Besitzt Dateien"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"browse": {
|
||||
"title": "Anzeige {{ collection }} nach {{ field }} {{ value }}"
|
||||
},
|
||||
"admin": {
|
||||
"registries": {
|
||||
"metadata": {
|
||||
"title": "DSpace Angular :: Metadatenreferenzliste",
|
||||
"head": "Metadatenreferenzliste",
|
||||
"description": "Die Metadatenreferenzliste beinhaltet alle Metadatenfelder, die zur Verfügung stehen. Die Felder können in unterschiedlichen Schemata enthalten sein. Nichtsdestotrotz benötigt DSpace mindestens qualifiziertes Dublin Core.",
|
||||
"schemas": {
|
||||
"table": {
|
||||
"id": "ID",
|
||||
"namespace": "Namensraum",
|
||||
"name": "Name"
|
||||
},
|
||||
"no-items": "Es gbit keine Metadatenschemata."
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"title": "DSpace Angular :: Referenzliste der Metadatenschemata",
|
||||
"head": "Metadatenschemata",
|
||||
"description": "Dies ist das Metadatenschema für \"{{namespace}}\".",
|
||||
"fields": {
|
||||
"head": "Felder in diesem Schema",
|
||||
"table": {
|
||||
"field": "Feld",
|
||||
"scopenote": "Gültigkeitsbereich"
|
||||
},
|
||||
"no-items": "Es gibt keine Felder in diesem Schema."
|
||||
}
|
||||
},
|
||||
"bitstream-formats": {
|
||||
"title": "DSpace Angular :: Referenzliste der Dateiformate",
|
||||
"head": "Referenzliste der Dateiformate",
|
||||
"description": "Diese Liste enhtält die in diesem Repositorium zulässigen Dateiformate und den jeweiligen Unterstützungsgrad.",
|
||||
"formats": {
|
||||
"table": {
|
||||
"name": "Name",
|
||||
"mimetype": "MIME Type",
|
||||
"supportLevel": {
|
||||
"head": "Unterstützungsgrad",
|
||||
"0": "Unbekannt",
|
||||
"1": "Bekannt",
|
||||
"2": "Unterstützt"
|
||||
},
|
||||
"internal": "intern"
|
||||
},
|
||||
"no-items": "Es gibt keine Formate in dieser Referenzliste."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"loading": {
|
||||
"default": "Am Laden ...",
|
||||
"top-level-communities": "Die Hauptbereiche werden geladen ...",
|
||||
"community": "Der Bereich wird geladen ...",
|
||||
"collection": "Die Sammlung wird geladen ...",
|
||||
"sub-collections": "Die untergeordneten Sammlungen werden geladen ...",
|
||||
"recent-submissions": "Die aktuellsten Veröffentlichungen werden geladen ...",
|
||||
"item": "Die Ressource wird geladen ...",
|
||||
"objects": "Am Laden ...",
|
||||
"search-results": "Die Suchergebnisse werden geladen ...",
|
||||
"browse-by": "Die Ressourcen werden geladen ..."
|
||||
},
|
||||
"error": {
|
||||
"default": "Fehler",
|
||||
"top-level-communities": "Fehler beim Laden der Hauptbereiche.",
|
||||
"community": "Fehler beim Laden des Bereiches.",
|
||||
"collection": "Fehler beim Laden der Sammlung.",
|
||||
"sub-collections": "Fehler beim Laden der untergeordneten Sammlungen.",
|
||||
"recent-submissions": "Fehler beim Laden der aktuellsten Veröffentlichungen.",
|
||||
"item": "Fehler beim Laden der Ressource.",
|
||||
"objects": "Fehler beim Laden der Objekte.",
|
||||
"search-results": "Fehler beim Laden der Suchergebnisse.",
|
||||
"browse-by": "Fehler beim Laden der Ressourcen",
|
||||
"validation": {
|
||||
"pattern": "Die Eingabe kann nur folgendes Muster haben: {{ pattern }}.",
|
||||
"license": {
|
||||
"notgranted": "Sie müssen der Lizenz zustimmen, um die Ressource einzureichen. Wenn dies zur Zeit nicht geht, können Sie die Einreichung speichern und später wiederaufnehmen oder löschen."
|
||||
}
|
||||
}
|
||||
},
|
||||
"form": {
|
||||
"submit": "Los",
|
||||
"cancel": "Abbrechen",
|
||||
"search": "Suchen",
|
||||
"remove": "Löschen",
|
||||
"first-name": "Vorname",
|
||||
"last-name": "Nachname",
|
||||
"loading": "Am Laden ...",
|
||||
"no-results": "Keine Ergebnisse gefunden",
|
||||
"no-value": "Kein Wert eingegeben",
|
||||
"group-collapse": "Weniger",
|
||||
"group-expand": "Mehr",
|
||||
"group-collapse-help": "Hier klicken, um die Anzeige zu reduzieren",
|
||||
"group-expand-help": "Hier klicken, um mehr Elemente anzuzeigen"
|
||||
},
|
||||
"login": {
|
||||
"title": "Einloggen",
|
||||
"form": {
|
||||
"header": "Bitte Loggen Sie sich ein.",
|
||||
"email": "E-Mail-Adresse",
|
||||
"forgot-password": "Haben Sie Ihr Passwort vergessen?",
|
||||
"new-user": "Sind Sie neu hier? Klicken Sie hier, um sich zu registrieren.",
|
||||
"password": "Passwort",
|
||||
"submit": "Einloggen"
|
||||
}
|
||||
},
|
||||
"logout": {
|
||||
"title": "Ausloggen",
|
||||
"form": {
|
||||
"header": "Ausloggen aus DSpace",
|
||||
"submit": "Ausloggen"
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"messages": {
|
||||
"expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an."
|
||||
},
|
||||
"errors": {
|
||||
"invalid-user": "Ungültige E-Mail-Adresse oder Passwort."
|
||||
}
|
||||
}
|
||||
"404.help": "Die Seite, die Sie aufrufen wollten, konnte nicht gefunden werden. Sie könnte verschoben oder gelöscht worden sein. Mit dem Link unten kommen Sie zurück zur Startseite. ",
|
||||
"404.link.home-page": "Zurück zur Startseite",
|
||||
"404.page-not-found": "Seite nicht gefunden",
|
||||
"admin.registries.bitstream-formats.description": "Diese Liste enhtält die in diesem Repositorium zulässigen Dateiformate und den jeweiligen Unterstützungsgrad.",
|
||||
"admin.registries.bitstream-formats.formats.no-items": "Es gibt keine Formate in dieser Referenzliste.",
|
||||
"admin.registries.bitstream-formats.formats.table.internal": "intern",
|
||||
"admin.registries.bitstream-formats.formats.table.mimetype": "MIME Type",
|
||||
"admin.registries.bitstream-formats.formats.table.name": "Name",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.0": "Unbekannt",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.1": "Bekannt",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.2": "Unterstützt",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Unterstützungsgrad",
|
||||
"admin.registries.bitstream-formats.head": "Referenzliste der Dateiformate",
|
||||
"admin.registries.bitstream-formats.title": "DSpace Angular :: Referenzliste der Dateiformate",
|
||||
"admin.registries.metadata.description": "Die Metadatenreferenzliste beinhaltet alle Metadatenfelder, die zur Verfügung stehen. Die Felder können in unterschiedlichen Schemata enthalten sein. Nichtsdestotrotz benötigt DSpace mindestens qualifiziertes Dublin Core.",
|
||||
"admin.registries.metadata.head": "Metadatenreferenzliste",
|
||||
"admin.registries.metadata.schemas.no-items": "Es gbit keine Metadatenschemata.",
|
||||
"admin.registries.metadata.schemas.table.id": "ID",
|
||||
"admin.registries.metadata.schemas.table.name": "Name",
|
||||
"admin.registries.metadata.schemas.table.namespace": "Namensraum",
|
||||
"admin.registries.metadata.title": "DSpace Angular :: Metadatenreferenzliste",
|
||||
"admin.registries.schema.description": "Dies ist das Metadatenschema für \"{{namespace}}\".",
|
||||
"admin.registries.schema.fields.head": "Felder in diesem Schema",
|
||||
"admin.registries.schema.fields.no-items": "Es gibt keine Felder in diesem Schema.",
|
||||
"admin.registries.schema.fields.table.field": "Feld",
|
||||
"admin.registries.schema.fields.table.scopenote": "Gültigkeitsbereich",
|
||||
"admin.registries.schema.head": "Metadatenschemata",
|
||||
"admin.registries.schema.title": "DSpace Angular :: Referenzliste der Metadatenschemata",
|
||||
"auth.errors.invalid-user": "Ungültige E-Mail-Adresse oder Passwort.",
|
||||
"auth.messages.expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.",
|
||||
"browse.title": "Anzeige {{ collection }} nach {{ field }} {{ value }}",
|
||||
"collection.page.browse.recent.head": "Aktuellste Veröffentlichungen",
|
||||
"collection.page.license": "Lizenz",
|
||||
"collection.page.news": "Neuigkeiten",
|
||||
"community.page.license": "Lizenz",
|
||||
"community.page.news": "Neuigkeiten",
|
||||
"community.sub-collection-list.head": "Sammlungen in diesem Bereich",
|
||||
"error.browse-by": "Fehler beim Laden der Ressourcen",
|
||||
"error.collection": "Fehler beim Laden der Sammlung.",
|
||||
"error.community": "Fehler beim Laden des Bereiches.",
|
||||
"error.default": "Fehler",
|
||||
"error.item": "Fehler beim Laden der Ressource.",
|
||||
"error.objects": "Fehler beim Laden der Objekte.",
|
||||
"error.recent-submissions": "Fehler beim Laden der aktuellsten Veröffentlichungen.",
|
||||
"error.search-results": "Fehler beim Laden der Suchergebnisse.",
|
||||
"error.sub-collections": "Fehler beim Laden der untergeordneten Sammlungen.",
|
||||
"error.top-level-communities": "Fehler beim Laden der Hauptbereiche.",
|
||||
"error.validation.license.notgranted": "Sie müssen der Lizenz zustimmen, um die Ressource einzureichen. Wenn dies zur Zeit nicht geht, können Sie die Einreichung speichern und später wiederaufnehmen oder löschen.",
|
||||
"error.validation.pattern": "Die Eingabe kann nur folgendes Muster haben: {{ pattern }}.",
|
||||
"footer.copyright": "Copyright © 2002-{{ year }}",
|
||||
"footer.link.dspace": "DSpace Software",
|
||||
"footer.link.duraspace": "DuraSpace",
|
||||
"form.cancel": "Abbrechen",
|
||||
"form.first-name": "Vorname",
|
||||
"form.group-collapse": "Weniger",
|
||||
"form.group-collapse-help": "Hier klicken, um die Anzeige zu reduzieren",
|
||||
"form.group-expand": "Mehr",
|
||||
"form.group-expand-help": "Hier klicken, um mehr Elemente anzuzeigen",
|
||||
"form.last-name": "Nachname",
|
||||
"form.loading": "Am Laden ...",
|
||||
"form.no-results": "Keine Ergebnisse gefunden",
|
||||
"form.no-value": "Kein Wert eingegeben",
|
||||
"form.remove": "Löschen",
|
||||
"form.search": "Suchen",
|
||||
"form.submit": "Los",
|
||||
"home.description": "",
|
||||
"home.title": "DSpace Angular :: Startseite",
|
||||
"home.top-level-communities.head": "Bereiche in DSpace",
|
||||
"home.top-level-communities.help": "Wählen Sie einen Bereich, um seine Sammlungen einzusehen.",
|
||||
"item.page.abstract": "Kurzfassung",
|
||||
"item.page.author": "Autor",
|
||||
"item.page.collections": "Sammlungen",
|
||||
"item.page.date": "Datum",
|
||||
"item.page.files": "Dateien",
|
||||
"item.page.filesection.description": "Beschreibung:",
|
||||
"item.page.filesection.download": "Herunterladen",
|
||||
"item.page.filesection.format": "Format:",
|
||||
"item.page.filesection.name": "Name:",
|
||||
"item.page.filesection.size": "Größe:",
|
||||
"item.page.link.full": "Vollanzeige",
|
||||
"item.page.link.simple": "Kurzanzeige",
|
||||
"item.page.uri": "URI",
|
||||
"loading.browse-by": "Die Ressourcen werden geladen ...",
|
||||
"loading.collection": "Die Sammlung wird geladen ...",
|
||||
"loading.community": "Der Bereich wird geladen ...",
|
||||
"loading.default": "Am Laden ...",
|
||||
"loading.item": "Die Ressource wird geladen ...",
|
||||
"loading.objects": "Am Laden ...",
|
||||
"loading.recent-submissions": "Die aktuellsten Veröffentlichungen werden geladen ...",
|
||||
"loading.search-results": "Die Suchergebnisse werden geladen ...",
|
||||
"loading.sub-collections": "Die untergeordneten Sammlungen werden geladen ...",
|
||||
"loading.top-level-communities": "Die Hauptbereiche werden geladen ...",
|
||||
"login.form.email": "E-Mail-Adresse",
|
||||
"login.form.forgot-password": "Haben Sie Ihr Passwort vergessen?",
|
||||
"login.form.header": "Bitte Loggen Sie sich ein.",
|
||||
"login.form.new-user": "Sind Sie neu hier? Klicken Sie hier, um sich zu registrieren.",
|
||||
"login.form.password": "Passwort",
|
||||
"login.form.submit": "Einloggen",
|
||||
"login.title": "Einloggen",
|
||||
"logout.form.header": "Ausloggen aus DSpace",
|
||||
"logout.form.submit": "Ausloggen",
|
||||
"logout.title": "Ausloggen",
|
||||
"nav.home": "Zur Startseite",
|
||||
"nav.login": "Anmelden",
|
||||
"nav.logout": "Abmelden",
|
||||
"pagination.results-per-page": "Ergebnisse pro Seite",
|
||||
"pagination.showing.detail": "{{ range }} bis {{ total }}",
|
||||
"pagination.showing.label": "Anzeige der Treffer ",
|
||||
"pagination.sort-direction": "Sortiermöglichkeiten",
|
||||
"search.description": "",
|
||||
"search.filters.applied.f.author": "Autor",
|
||||
"search.filters.applied.f.dateIssued.max": "Enddatum",
|
||||
"search.filters.applied.f.dateIssued.min": "Anfangsdatum",
|
||||
"search.filters.applied.f.has_content_in_original_bundle": "Besitzt Dateien",
|
||||
"search.filters.applied.f.subject": "Thema",
|
||||
"search.filters.filter.author.head": "Autor",
|
||||
"search.filters.filter.author.placeholder": "Autor",
|
||||
"search.filters.filter.dateIssued.head": "Datum",
|
||||
"search.filters.filter.dateIssued.max.placeholder": "Frühestes Datum",
|
||||
"search.filters.filter.dateIssued.min.placeholder": "Ältestes Datum",
|
||||
"search.filters.filter.has_content_in_original_bundle.head": "Besitzt Dateien",
|
||||
"search.filters.filter.scope.head": "Bereich",
|
||||
"search.filters.filter.scope.placeholder": "Bereichsfilter",
|
||||
"search.filters.filter.show-less": "Zeige weniger",
|
||||
"search.filters.filter.show-more": "Zeige mehr",
|
||||
"search.filters.filter.subject.head": "Schlagwort",
|
||||
"search.filters.filter.subject.placeholder": "Schlagwort",
|
||||
"search.filters.head": "Filter",
|
||||
"search.filters.reset": "Filter zurücksetzen",
|
||||
"search.form.search": "Suche",
|
||||
"search.form.search_dspace": "DSpace durchsuchen",
|
||||
"search.results.head": "Suchergebnisse",
|
||||
"search.results.no-results": "Zu dieser Suche gibt es keine Treffer.",
|
||||
"search.sidebar.close": "Zurück zu den Ergebnissen",
|
||||
"search.sidebar.filters.title": "Filter",
|
||||
"search.sidebar.open": "Suchwerkzeuge",
|
||||
"search.sidebar.results": "Ergebnisse",
|
||||
"search.sidebar.settings.rpp": "Treffer pro Seite",
|
||||
"search.sidebar.settings.sort-by": "Sortiere nach",
|
||||
"search.sidebar.settings.title": "Einstellungen",
|
||||
"search.title": "DSpace Angular :: Suche",
|
||||
"search.view-switch.show-grid": "Zeige als Raster",
|
||||
"search.view-switch.show-list": "Zeige als Liste",
|
||||
"sorting.dc.title.ASC": "Titel aufsteigend",
|
||||
"sorting.dc.title.DESC": "Titel absteigend",
|
||||
"sorting.score.DESC": "Relevanz",
|
||||
"title": "DSpace"
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,277 +1,149 @@
|
||||
{
|
||||
"footer": {
|
||||
"copyright": "copyright © 2002-{{ year }}",
|
||||
"link.dspace": "DSpace software",
|
||||
"link.duraspace": "DuraSpace"
|
||||
},
|
||||
"collection": {
|
||||
"page": {
|
||||
"news": "Nieuws",
|
||||
"license": "Licentie",
|
||||
"browse": {
|
||||
"recent": {
|
||||
"head": "Recent toegevoegd"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"community": {
|
||||
"page": {
|
||||
"news": "Nieuws",
|
||||
"license": "Licentie"
|
||||
},
|
||||
"sub-collection-list": {
|
||||
"head": "Collecties in deze Community"
|
||||
}
|
||||
},
|
||||
"item": {
|
||||
"page": {
|
||||
"author": "Auteur",
|
||||
"abstract": "Abstract",
|
||||
"date": "Datum",
|
||||
"uri": "URI",
|
||||
"files": "Bestanden",
|
||||
"collections": "Collecties",
|
||||
"filesection": {
|
||||
"download": "Download",
|
||||
"name": "Naam:",
|
||||
"format": "Formaat:",
|
||||
"size": "Grootte:",
|
||||
"description": "Beschrijving:"
|
||||
},
|
||||
"link": {
|
||||
"simple": "Eenvoudige itemweergave",
|
||||
"full": "Volledige itemweergave"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nav": {
|
||||
"home": "Home",
|
||||
"login": "Log In",
|
||||
"logout": "Log Uit"
|
||||
},
|
||||
"pagination": {
|
||||
"results-per-page": "Resultaten per pagina",
|
||||
"sort-direction": "Sorteermogelijkheden",
|
||||
"showing": {
|
||||
"label": "Resultaten ",
|
||||
"detail": "{{ range }} van {{ total }}"
|
||||
}
|
||||
},
|
||||
"sorting": {
|
||||
"score": {
|
||||
"DESC": "Relevantie"
|
||||
},
|
||||
"dc.title": {
|
||||
"ASC": "Oplopend op titel",
|
||||
"DESC": "Aflopend op titel"
|
||||
}
|
||||
},
|
||||
"title": "DSpace",
|
||||
"404": {
|
||||
"help": "De pagina die u zoekt kan niet gevonden worden. De pagina werd mogelijk verplaatst of verwijderd. U kan onderstaande knop gebruiken om terug naar de homepagina te gaan. ",
|
||||
"page-not-found": "Pagina niet gevonden",
|
||||
"link": {
|
||||
"home-page": "Terug naar de homepagina"
|
||||
}
|
||||
},
|
||||
"home": {
|
||||
"title": "DSpace Angular :: Home",
|
||||
"description": "",
|
||||
"top-level-communities": {
|
||||
"head": "Communities in DSpace",
|
||||
"help": "Selecteer een community om diens collecties te verkennen."
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"title": "DSpace Angular :: Zoek",
|
||||
"description": "",
|
||||
"form": {
|
||||
"search": "Zoek",
|
||||
"search_dspace": "Zoek in DSpace"
|
||||
},
|
||||
"results": {
|
||||
"head": "Zoekresultaten",
|
||||
"no-results": "Er waren geen resultaten voor deze zoekopdracht"
|
||||
},
|
||||
"sidebar": {
|
||||
"close": "Terug naar de resultaten",
|
||||
"open": "Zoek Tools",
|
||||
"results": "resultaten",
|
||||
"filters": {
|
||||
"title": "Filters"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Instellingen",
|
||||
"sort-by": "Sorteer volgens",
|
||||
"rpp": "Resultaten per pagina"
|
||||
}
|
||||
},
|
||||
"view-switch": {
|
||||
"show-list": "Toon als lijst",
|
||||
"show-grid": "Toon in raster"
|
||||
},
|
||||
"filters": {
|
||||
"head": "Filters",
|
||||
"reset": "Filters verwijderen",
|
||||
"applied": {
|
||||
"f.author": "Auteur",
|
||||
"f.dateIssued.min": "Startdatum",
|
||||
"f.dateIssued.max": "Einddatum",
|
||||
"f.subject": "Sleutelwoord",
|
||||
"f.has_content_in_original_bundle": "Heeft bestanden"
|
||||
},
|
||||
"filter": {
|
||||
"show-more": "Toon meer",
|
||||
"show-less": "Inklappen",
|
||||
"author": {
|
||||
"placeholder": "Auteursnaam",
|
||||
"head": "Auteur"
|
||||
},
|
||||
"scope": {
|
||||
"placeholder": "Bereikfilter",
|
||||
"head": "Bereik"
|
||||
},
|
||||
"subject": {
|
||||
"placeholder": "Onderwerp",
|
||||
"head": "Onderwerp"
|
||||
},
|
||||
"dateIssued": {
|
||||
"max": {
|
||||
"placeholder": "Vroegste Datum"
|
||||
},
|
||||
"min": {
|
||||
"placeholder": "Laatste Datum"
|
||||
},
|
||||
"head": "Datum"
|
||||
},
|
||||
"has_content_in_original_bundle": {
|
||||
"head": "Heeft bestanden"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"browse": {
|
||||
"title": "Verken {{ collection }} volgens {{ field }} {{ value }}"
|
||||
},
|
||||
"admin": {
|
||||
"registries": {
|
||||
"metadata": {
|
||||
"title": "DSpace Angular :: Metadata Register",
|
||||
"head": "Metadata Register",
|
||||
"description": "Het metadataregister omvat de lijst van alle metadatavelden die beschikbaar zijn in het systeem. Deze velden kunnen verspreid zijn over verschillende metadataschema's. Het qualified Dublin Core schema (dc) is een verplicht schema en kan niet worden verwijderd.",
|
||||
"schemas": {
|
||||
"table": {
|
||||
"id": "ID",
|
||||
"namespace": "Naamruimte",
|
||||
"name": "Naam"
|
||||
},
|
||||
"no-items": "Er kunnen geen metadataschema's getoond worden."
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"title": "DSpace Angular :: Metadata Schema Register",
|
||||
"head": "Metadata Schema",
|
||||
"description": "Dit is het metadataschema voor \"{{namespace}}\".",
|
||||
"fields": {
|
||||
"head": "Schema metadatavelden",
|
||||
"table": {
|
||||
"field": "Veld",
|
||||
"scopenote": "Opmerking over bereik"
|
||||
},
|
||||
"no-items": "Er kunnen geen metadatavelden getoond worden."
|
||||
}
|
||||
},
|
||||
"bitstream-formats": {
|
||||
"title": "DSpace Angular :: Bitstream Formaat Register",
|
||||
"head": "Bitstream Formaat Register",
|
||||
"description": "Deze lijst van Bitstream formaten biedt informatie over de formaten die in deze repository zijn toegelaten en op welke manier ze ondersteund worden. De term Bitstream wordt in DSpace gebruikt om een bestand aan te duiden dat samen met metadata onderdeel uitmaakt van een item. De naam bitstream duidt op het feit dat het bestand achterliggend wordt opgeslaan zonder bestandsextensie.",
|
||||
"formats": {
|
||||
"table": {
|
||||
"name": "Naam",
|
||||
"mimetype": "MIME Type",
|
||||
"supportLevel": {
|
||||
"head": "Ondersteuning",
|
||||
"0": "Onbekend",
|
||||
"1": "Gekend",
|
||||
"2": "Ondersteund"
|
||||
},
|
||||
"internal": "intern"
|
||||
},
|
||||
"no-items": "Er kunnen geen bitstreamformaten getoond worden."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"loading": {
|
||||
"default": "Laden...",
|
||||
"top-level-communities": "Inladen van de Communities op het hoogste niveau...",
|
||||
"community": "Community wordt ingeladen...",
|
||||
"collection": "Collectie wordt ingeladen...",
|
||||
"sub-collections": "De sub-collecties worden ingeladen...",
|
||||
"recent-submissions": "Recent toegevoegde items worden ingeladen...",
|
||||
"item": "Item wordt ingeladen...",
|
||||
"objects": "Laden...",
|
||||
"search-results": "Zoekresultaten worden ingeladen...",
|
||||
"browse-by": "Items worden ingeladen..."
|
||||
},
|
||||
"error": {
|
||||
"default": "Fout",
|
||||
"top-level-communities": "Fout bij het inladen van communities op het hoogste niveau",
|
||||
"community": "Fout bij het ophalen van een community",
|
||||
"collection": "Fout bij het ophalen van een collectie",
|
||||
"sub-collections": "Fout bij het ophalen van sub-collecties",
|
||||
"recent-submissions": "Fout bij het ophalen van recent toegevoegde items",
|
||||
"item": "Fout bij het ophalen van items",
|
||||
"objects": "Fout bij het ophalen van objecten",
|
||||
"search-results": "Fout bij het ophalen van zoekresultaten",
|
||||
"browse-by": "Fout bij het ophalen van items",
|
||||
"validation": {
|
||||
"pattern": "Deze invoer is niet toegelaten volgens dit patroon: {{ pattern }}.",
|
||||
"license": {
|
||||
"notgranted": "U moet de invoerlicentie goedkeuren om de invoer af te werken. Indien u deze licentie momenteel niet kan of mag goedkeuren, kan u uw werk opslaan en de invoer later afwerken. U kunt dit nieuwe item ook verwijderen indien u niet voldoet aan de vereisten van de invoerlicentie."
|
||||
}
|
||||
}
|
||||
},
|
||||
"form": {
|
||||
"submit": "Verstuur",
|
||||
"cancel": "Annuleer",
|
||||
"search": "Zoek",
|
||||
"remove": "Verwijder",
|
||||
"first-name": "Voornaam",
|
||||
"last-name": "Achternaam",
|
||||
"loading": "Inladen...",
|
||||
"no-results": "Geen resultaten gevonden",
|
||||
"no-value": "Geen waarde ingevoerd",
|
||||
"group-collapse": "Inklappen",
|
||||
"group-expand": "Uitklappen",
|
||||
"group-collapse-help": "Klik hier op in te klappen",
|
||||
"group-expand-help": "Klik hier om uit te klappen en om meer onderdelen toe te voegen"
|
||||
},
|
||||
"login": {
|
||||
"title": "Aanmelden",
|
||||
"form": {
|
||||
"header": "Gelieve in te loggen in DSpace",
|
||||
"email": "Email adres",
|
||||
"forgot-password": "Bent u uw wachtwoord vergeten?",
|
||||
"new-user": "Nieuwe gebruiker? Gelieve u hier te registreren",
|
||||
"password": "Wachtwoord",
|
||||
"submit": "Aanmelden"
|
||||
}
|
||||
},
|
||||
"logout": {
|
||||
"title": "Afmelden",
|
||||
"form": {
|
||||
"header": "Afmelden in DSpace",
|
||||
"submit": "Afmelden"
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"messages": {
|
||||
"expired": "Uw sessie is vervallen. Gelieve opnieuw aan te melden."
|
||||
},
|
||||
"errors": {
|
||||
"invalid-user": "Ongeldig e-mailadres of wachtwoord."
|
||||
}
|
||||
}
|
||||
"404.help": "De pagina die u zoekt kan niet gevonden worden. De pagina werd mogelijk verplaatst of verwijderd. U kan onderstaande knop gebruiken om terug naar de homepagina te gaan. ",
|
||||
"404.link.home-page": "Terug naar de homepagina",
|
||||
"404.page-not-found": "Pagina niet gevonden",
|
||||
"admin.registries.bitstream-formats.description": "Deze lijst van Bitstream formaten biedt informatie over de formaten die in deze repository zijn toegelaten en op welke manier ze ondersteund worden. De term Bitstream wordt in DSpace gebruikt om een bestand aan te duiden dat samen met metadata onderdeel uitmaakt van een item. De naam bitstream duidt op het feit dat het bestand achterliggend wordt opgeslaan zonder bestandsextensie.",
|
||||
"admin.registries.bitstream-formats.formats.no-items": "Er kunnen geen bitstreamformaten getoond worden.",
|
||||
"admin.registries.bitstream-formats.formats.table.internal": "intern",
|
||||
"admin.registries.bitstream-formats.formats.table.mimetype": "MIME Type",
|
||||
"admin.registries.bitstream-formats.formats.table.name": "Naam",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.0": "Onbekend",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.1": "Gekend",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.2": "Ondersteund",
|
||||
"admin.registries.bitstream-formats.formats.table.supportLevel.head": "Ondersteuning",
|
||||
"admin.registries.bitstream-formats.head": "Bitstream Formaat Register",
|
||||
"admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Formaat Register",
|
||||
"admin.registries.metadata.description": "Het metadataregister omvat de lijst van alle metadatavelden die beschikbaar zijn in het systeem. Deze velden kunnen verspreid zijn over verschillende metadataschema's. Het qualified Dublin Core schema (dc) is een verplicht schema en kan niet worden verwijderd.",
|
||||
"admin.registries.metadata.head": "Metadata Register",
|
||||
"admin.registries.metadata.schemas.no-items": "Er kunnen geen metadataschema's getoond worden.",
|
||||
"admin.registries.metadata.schemas.table.id": "ID",
|
||||
"admin.registries.metadata.schemas.table.name": "Naam",
|
||||
"admin.registries.metadata.schemas.table.namespace": "Naamruimte",
|
||||
"admin.registries.metadata.title": "DSpace Angular :: Metadata Register",
|
||||
"admin.registries.schema.description": "Dit is het metadataschema voor \"{{namespace}}\".",
|
||||
"admin.registries.schema.fields.head": "Schema metadatavelden",
|
||||
"admin.registries.schema.fields.no-items": "Er kunnen geen metadatavelden getoond worden.",
|
||||
"admin.registries.schema.fields.table.field": "Veld",
|
||||
"admin.registries.schema.fields.table.scopenote": "Opmerking over bereik",
|
||||
"admin.registries.schema.head": "Metadata Schema",
|
||||
"admin.registries.schema.title": "DSpace Angular :: Metadata Schema Register",
|
||||
"auth.errors.invalid-user": "Ongeldig e-mailadres of wachtwoord.",
|
||||
"auth.messages.expired": "Uw sessie is vervallen. Gelieve opnieuw aan te melden.",
|
||||
"browse.title": "Verken {{ collection }} volgens {{ field }} {{ value }}",
|
||||
"collection.page.browse.recent.head": "Recent toegevoegd",
|
||||
"collection.page.license": "Licentie",
|
||||
"collection.page.news": "Nieuws",
|
||||
"community.page.license": "Licentie",
|
||||
"community.page.news": "Nieuws",
|
||||
"community.sub-collection-list.head": "Collecties in deze Community",
|
||||
"error.browse-by": "Fout bij het ophalen van items",
|
||||
"error.collection": "Fout bij het ophalen van een collectie",
|
||||
"error.community": "Fout bij het ophalen van een community",
|
||||
"error.default": "Fout",
|
||||
"error.item": "Fout bij het ophalen van items",
|
||||
"error.objects": "Fout bij het ophalen van objecten",
|
||||
"error.recent-submissions": "Fout bij het ophalen van recent toegevoegde items",
|
||||
"error.search-results": "Fout bij het ophalen van zoekresultaten",
|
||||
"error.sub-collections": "Fout bij het ophalen van sub-collecties",
|
||||
"error.top-level-communities": "Fout bij het inladen van communities op het hoogste niveau",
|
||||
"error.validation.license.notgranted": "U moet de invoerlicentie goedkeuren om de invoer af te werken. Indien u deze licentie momenteel niet kan of mag goedkeuren, kan u uw werk opslaan en de invoer later afwerken. U kunt dit nieuwe item ook verwijderen indien u niet voldoet aan de vereisten van de invoerlicentie.",
|
||||
"error.validation.pattern": "Deze invoer is niet toegelaten volgens dit patroon: {{ pattern }}.",
|
||||
"footer.copyright": "copyright © 2002-{{ year }}",
|
||||
"footer.link.dspace": "DSpace software",
|
||||
"footer.link.duraspace": "DuraSpace",
|
||||
"form.cancel": "Annuleer",
|
||||
"form.first-name": "Voornaam",
|
||||
"form.group-collapse": "Inklappen",
|
||||
"form.group-collapse-help": "Klik hier op in te klappen",
|
||||
"form.group-expand": "Uitklappen",
|
||||
"form.group-expand-help": "Klik hier om uit te klappen en om meer onderdelen toe te voegen",
|
||||
"form.last-name": "Achternaam",
|
||||
"form.loading": "Inladen...",
|
||||
"form.no-results": "Geen resultaten gevonden",
|
||||
"form.no-value": "Geen waarde ingevoerd",
|
||||
"form.remove": "Verwijder",
|
||||
"form.search": "Zoek",
|
||||
"form.submit": "Verstuur",
|
||||
"home.description": "",
|
||||
"home.title": "DSpace Angular :: Home",
|
||||
"home.top-level-communities.head": "Communities in DSpace",
|
||||
"home.top-level-communities.help": "Selecteer een community om diens collecties te verkennen.",
|
||||
"item.page.abstract": "Abstract",
|
||||
"item.page.author": "Auteur",
|
||||
"item.page.collections": "Collecties",
|
||||
"item.page.date": "Datum",
|
||||
"item.page.files": "Bestanden",
|
||||
"item.page.filesection.description": "Beschrijving:",
|
||||
"item.page.filesection.download": "Download",
|
||||
"item.page.filesection.format": "Formaat:",
|
||||
"item.page.filesection.name": "Naam:",
|
||||
"item.page.filesection.size": "Grootte:",
|
||||
"item.page.link.full": "Volledige itemweergave",
|
||||
"item.page.link.simple": "Eenvoudige itemweergave",
|
||||
"item.page.uri": "URI",
|
||||
"loading.browse-by": "Items worden ingeladen...",
|
||||
"loading.collection": "Collectie wordt ingeladen...",
|
||||
"loading.community": "Community wordt ingeladen...",
|
||||
"loading.default": "Laden...",
|
||||
"loading.item": "Item wordt ingeladen...",
|
||||
"loading.objects": "Laden...",
|
||||
"loading.recent-submissions": "Recent toegevoegde items worden ingeladen...",
|
||||
"loading.search-results": "Zoekresultaten worden ingeladen...",
|
||||
"loading.sub-collections": "De sub-collecties worden ingeladen...",
|
||||
"loading.top-level-communities": "Inladen van de Communities op het hoogste niveau...",
|
||||
"login.form.email": "Email adres",
|
||||
"login.form.forgot-password": "Bent u uw wachtwoord vergeten?",
|
||||
"login.form.header": "Gelieve in te loggen in DSpace",
|
||||
"login.form.new-user": "Nieuwe gebruiker? Gelieve u hier te registreren",
|
||||
"login.form.password": "Wachtwoord",
|
||||
"login.form.submit": "Aanmelden",
|
||||
"login.title": "Aanmelden",
|
||||
"logout.form.header": "Afmelden in DSpace",
|
||||
"logout.form.submit": "Afmelden",
|
||||
"logout.title": "Afmelden",
|
||||
"nav.home": "Home",
|
||||
"nav.login": "Log In",
|
||||
"nav.logout": "Log Uit",
|
||||
"pagination.results-per-page": "Resultaten per pagina",
|
||||
"pagination.showing.detail": "{{ range }} van {{ total }}",
|
||||
"pagination.showing.label": "Resultaten ",
|
||||
"pagination.sort-direction": "Sorteermogelijkheden",
|
||||
"search.description": "",
|
||||
"search.filters.applied.f.author": "Auteur",
|
||||
"search.filters.applied.f.dateIssued.max": "Einddatum",
|
||||
"search.filters.applied.f.dateIssued.min": "Startdatum",
|
||||
"search.filters.applied.f.has_content_in_original_bundle": "Heeft bestanden",
|
||||
"search.filters.applied.f.subject": "Sleutelwoord",
|
||||
"search.filters.filter.author.head": "Auteur",
|
||||
"search.filters.filter.author.placeholder": "Auteursnaam",
|
||||
"search.filters.filter.dateIssued.head": "Datum",
|
||||
"search.filters.filter.dateIssued.max.placeholder": "Vroegste Datum",
|
||||
"search.filters.filter.dateIssued.min.placeholder": "Laatste Datum",
|
||||
"search.filters.filter.has_content_in_original_bundle.head": "Heeft bestanden",
|
||||
"search.filters.filter.scope.head": "Bereik",
|
||||
"search.filters.filter.scope.placeholder": "Bereikfilter",
|
||||
"search.filters.filter.show-less": "Inklappen",
|
||||
"search.filters.filter.show-more": "Toon meer",
|
||||
"search.filters.filter.subject.head": "Onderwerp",
|
||||
"search.filters.filter.subject.placeholder": "Onderwerp",
|
||||
"search.filters.head": "Filters",
|
||||
"search.filters.reset": "Filters verwijderen",
|
||||
"search.form.search": "Zoek",
|
||||
"search.form.search_dspace": "Zoek in DSpace",
|
||||
"search.results.head": "Zoekresultaten",
|
||||
"search.results.no-results": "Er waren geen resultaten voor deze zoekopdracht",
|
||||
"search.sidebar.close": "Terug naar de resultaten",
|
||||
"search.sidebar.filters.title": "Filters",
|
||||
"search.sidebar.open": "Zoek Tools",
|
||||
"search.sidebar.results": "resultaten",
|
||||
"search.sidebar.settings.rpp": "Resultaten per pagina",
|
||||
"search.sidebar.settings.sort-by": "Sorteer volgens",
|
||||
"search.sidebar.settings.title": "Instellingen",
|
||||
"search.title": "DSpace Angular :: Zoek",
|
||||
"search.view-switch.show-grid": "Toon in raster",
|
||||
"search.view-switch.show-list": "Toon als lijst",
|
||||
"sorting.dc.title.ASC": "Oplopend op titel",
|
||||
"sorting.dc.title.DESC": "Aflopend op titel",
|
||||
"sorting.score.DESC": "Relevantie",
|
||||
"title": "DSpace"
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { EnumKeysPipe } from '../../../shared/utils/enum-keys-pipe';
|
||||
import { HostWindowService } from '../../../shared/host-window.service';
|
||||
import { HostWindowServiceStub } from '../../../shared/testing/host-window-service-stub';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
|
||||
|
||||
describe('BitstreamFormatsComponent', () => {
|
||||
let comp: BitstreamFormatsComponent;
|
||||
@@ -52,7 +53,7 @@ describe('BitstreamFormatsComponent', () => {
|
||||
extensions: null
|
||||
}
|
||||
];
|
||||
const mockFormats = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockFormatsList)));
|
||||
const mockFormats = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockFormatsList));
|
||||
const registryServiceStub = {
|
||||
getBitstreamFormats: () => mockFormats
|
||||
};
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Action } from '@ngrx/store';
|
||||
import { type } from '../../../shared/ngrx/type';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
|
||||
import { MetadataField } from '../../../core/metadata/metadatafield.model';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
import { MetadataField } from '../../../core/metadata/metadata-field.model';
|
||||
|
||||
/**
|
||||
* For each action type in an action group, make a simple
|
||||
|
@@ -17,6 +17,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
|
||||
|
||||
describe('MetadataRegistryComponent', () => {
|
||||
let comp: MetadataRegistryComponent;
|
||||
@@ -36,7 +37,7 @@ describe('MetadataRegistryComponent', () => {
|
||||
namespace: 'http://dspace.org/mockschema'
|
||||
}
|
||||
];
|
||||
const mockSchemas = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockSchemasList)));
|
||||
const mockSchemas = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockSchemasList));
|
||||
/* tslint:disable:no-empty */
|
||||
const registryServiceStub = {
|
||||
getMetadataSchemas: () => mockSchemas,
|
||||
|
@@ -3,7 +3,6 @@ import { RegistryService } from '../../../core/registry/registry.service';
|
||||
import { Observable, combineLatest as observableCombineLatest } from 'rxjs';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
|
||||
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
||||
import { map, take } from 'rxjs/operators';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
@@ -12,6 +11,7 @@ import { zip } from 'rxjs/internal/observable/zip';
|
||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||
import { Route, Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-registry',
|
||||
|
@@ -7,8 +7,8 @@ import {
|
||||
MetadataRegistrySelectSchemaAction
|
||||
} from './metadata-registry.actions';
|
||||
import { metadataRegistryReducer, MetadataRegistryState } from './metadata-registry.reducers';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
|
||||
import { MetadataField } from '../../../core/metadata/metadatafield.model';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
import { MetadataField } from '../../../core/metadata/metadata-field.model';
|
||||
|
||||
class NullAction extends MetadataRegistryEditSchemaAction {
|
||||
type = null;
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
|
||||
import {
|
||||
MetadataRegistryAction,
|
||||
MetadataRegistryActionTypes,
|
||||
@@ -9,7 +8,8 @@ import {
|
||||
MetadataRegistrySelectFieldAction,
|
||||
MetadataRegistrySelectSchemaAction
|
||||
} from './metadata-registry.actions';
|
||||
import { MetadataField } from '../../../core/metadata/metadatafield.model';
|
||||
import { MetadataField } from '../../../core/metadata/metadata-field.model';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
|
||||
/**
|
||||
* The metadata registry state.
|
||||
|
@@ -10,7 +10,7 @@ import { EnumKeysPipe } from '../../../../shared/utils/enum-keys-pipe';
|
||||
import { RegistryService } from '../../../../core/registry/registry.service';
|
||||
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||
import { of as observableOf } from 'rxjs/internal/observable/of';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
|
||||
describe('MetadataSchemaFormComponent', () => {
|
||||
let component: MetadataSchemaFormComponent;
|
||||
|
@@ -9,9 +9,9 @@ import { FormGroup } from '@angular/forms';
|
||||
import { RegistryService } from '../../../../core/registry/registry.service';
|
||||
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||
import { take } from 'rxjs/operators';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { combineLatest } from 'rxjs/internal/observable/combineLatest';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-schema-form',
|
||||
|
@@ -3,7 +3,6 @@ import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing'
|
||||
import { MetadataFieldFormComponent } from './metadata-field-form.component';
|
||||
import { RegistryService } from '../../../../core/registry/registry.service';
|
||||
import { of as observableOf } from 'rxjs/internal/observable/of';
|
||||
import { MetadataField } from '../../../../core/metadata/metadatafield.model';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -11,7 +10,8 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { EnumKeysPipe } from '../../../../shared/utils/enum-keys-pipe';
|
||||
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
|
||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
|
||||
describe('MetadataFieldFormComponent', () => {
|
||||
let component: MetadataFieldFormComponent;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
|
||||
import {
|
||||
DynamicFormControlModel,
|
||||
DynamicFormLayout,
|
||||
@@ -8,10 +7,11 @@ import {
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { RegistryService } from '../../../../core/registry/registry.service';
|
||||
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||
import { MetadataField } from '../../../../core/metadata/metadatafield.model';
|
||||
import { take } from 'rxjs/operators';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { combineLatest } from 'rxjs/internal/observable/combineLatest';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-field-form',
|
||||
|
@@ -3,7 +3,6 @@ import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing'
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@@ -21,6 +20,8 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
|
||||
|
||||
describe('MetadataSchemaComponent', () => {
|
||||
let comp: MetadataSchemaComponent;
|
||||
@@ -74,12 +75,12 @@ describe('MetadataSchemaComponent', () => {
|
||||
schema: mockSchemasList[1]
|
||||
}
|
||||
];
|
||||
const mockSchemas = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockSchemasList)));
|
||||
const mockSchemas = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockSchemasList));
|
||||
/* tslint:disable:no-empty */
|
||||
const registryServiceStub = {
|
||||
getMetadataSchemas: () => mockSchemas,
|
||||
getMetadataFieldsBySchema: (schema: MetadataSchema) => observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockFieldsList.filter((value) => value.schema === schema)))),
|
||||
getMetadataSchemaByName: (schemaName: string) => observableOf(new RemoteData(false, false, true, undefined, mockSchemasList.filter((value) => value.prefix === schemaName)[0])),
|
||||
getMetadataFieldsBySchema: (schema: MetadataSchema) => createSuccessfulRemoteDataObject$(new PaginatedList(null, mockFieldsList.filter((value) => value.schema === schema))),
|
||||
getMetadataSchemaByName: (schemaName: string) => createSuccessfulRemoteDataObject$(mockSchemasList.filter((value) => value.prefix === schemaName)[0]),
|
||||
getActiveMetadataField: () => observableOf(undefined),
|
||||
getSelectedMetadataFields: () => observableOf([]),
|
||||
editMetadataField: (schema) => {},
|
||||
|
@@ -4,8 +4,6 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Observable, combineLatest as observableCombineLatest } from 'rxjs';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
import { MetadataField } from '../../../core/metadata/metadatafield.model';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
|
||||
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
||||
import { map, take } from 'rxjs/operators';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
@@ -13,6 +11,8 @@ import { RestResponse } from '../../../core/cache/response.models';
|
||||
import { zip } from 'rxjs/internal/observable/zip';
|
||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { MetadataField } from '../../../core/metadata/metadata-field.model';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-schema',
|
||||
|
@@ -18,6 +18,7 @@ import { Item } from '../../core/shared/item.model';
|
||||
import { ENV_CONFIG, GLOBAL_CONFIG } from '../../../config';
|
||||
import { BrowseEntrySearchOptions } from '../../core/browse/browse-entry-search-options.model';
|
||||
import { toRemoteData } from '../+browse-by-metadata-page/browse-by-metadata-page.component.spec';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
|
||||
|
||||
describe('BrowseByDatePageComponent', () => {
|
||||
let comp: BrowseByDatePageComponent;
|
||||
@@ -48,11 +49,11 @@ describe('BrowseByDatePageComponent', () => {
|
||||
const mockBrowseService = {
|
||||
getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData([]),
|
||||
getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData([firstItem]),
|
||||
getFirstItemFor: () => observableOf(new RemoteData(false, false, true, undefined, firstItem))
|
||||
getFirstItemFor: () => createSuccessfulRemoteDataObject$(firstItem)
|
||||
};
|
||||
|
||||
const mockDsoService = {
|
||||
findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity))
|
||||
findById: () => createSuccessfulRemoteDataObject$(mockCommunity)
|
||||
};
|
||||
|
||||
const activatedRouteStub = Object.assign(new ActivatedRouteStub(), {
|
||||
|
@@ -20,6 +20,9 @@ import { Item } from '../../core/shared/item.model';
|
||||
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
|
||||
import { Community } from '../../core/shared/community.model';
|
||||
import { MockRouter } from '../../shared/mocks/mock-router';
|
||||
import { ResourceType } from '../../core/shared/resource-type';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
|
||||
import { BrowseEntry } from '../../core/shared/browse-entry.model';
|
||||
|
||||
describe('BrowseByMetadataPageComponent', () => {
|
||||
let comp: BrowseByMetadataPageComponent;
|
||||
@@ -39,21 +42,21 @@ describe('BrowseByMetadataPageComponent', () => {
|
||||
|
||||
const mockEntries = [
|
||||
{
|
||||
type: 'author',
|
||||
type: BrowseEntry.type,
|
||||
authority: null,
|
||||
value: 'John Doe',
|
||||
language: 'en',
|
||||
count: 1
|
||||
},
|
||||
{
|
||||
type: 'author',
|
||||
type: BrowseEntry.type,
|
||||
authority: null,
|
||||
value: 'James Doe',
|
||||
language: 'en',
|
||||
count: 3
|
||||
},
|
||||
{
|
||||
type: 'subject',
|
||||
type: BrowseEntry.type,
|
||||
authority: null,
|
||||
value: 'Fake subject',
|
||||
language: 'en',
|
||||
@@ -68,12 +71,12 @@ describe('BrowseByMetadataPageComponent', () => {
|
||||
];
|
||||
|
||||
const mockBrowseService = {
|
||||
getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData(mockEntries.filter((entry) => entry.type === options.metadataDefinition)),
|
||||
getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData(mockEntries),
|
||||
getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData(mockItems)
|
||||
};
|
||||
|
||||
const mockDsoService = {
|
||||
findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity))
|
||||
findById: () => createSuccessfulRemoteDataObject$(mockCommunity)
|
||||
};
|
||||
|
||||
const activatedRouteStub = Object.assign(new ActivatedRouteStub(), {
|
||||
@@ -105,12 +108,6 @@ describe('BrowseByMetadataPageComponent', () => {
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should fetch the correct entries depending on the metadata definition', () => {
|
||||
comp.browseEntries$.subscribe((result) => {
|
||||
expect(result.payload.page).toEqual(mockEntries.filter((entry) => entry.type === 'author'));
|
||||
});
|
||||
});
|
||||
|
||||
it('should not fetch any items when no value is provided', () => {
|
||||
expect(comp.items$).toBeUndefined();
|
||||
});
|
||||
@@ -160,5 +157,5 @@ describe('BrowseByMetadataPageComponent', () => {
|
||||
});
|
||||
|
||||
export function toRemoteData(objects: any[]): Observable<RemoteData<PaginatedList<any>>> {
|
||||
return observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), objects)));
|
||||
return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), objects));
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@ import { RemoteData } from '../../core/data/remote-data';
|
||||
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
|
||||
import { BrowseService } from '../../core/browse/browse.service';
|
||||
import { MockRouter } from '../../shared/mocks/mock-router';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
|
||||
|
||||
describe('BrowseByTitlePageComponent', () => {
|
||||
let comp: BrowseByTitlePageComponent;
|
||||
@@ -52,7 +53,7 @@ describe('BrowseByTitlePageComponent', () => {
|
||||
};
|
||||
|
||||
const mockDsoService = {
|
||||
findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity))
|
||||
findById: () => createSuccessfulRemoteDataObject$(mockCommunity)
|
||||
};
|
||||
|
||||
const activatedRouteStub = Object.assign(new ActivatedRouteStub(), {
|
||||
|
@@ -1,12 +1,9 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import {
|
||||
DynamicInputModel,
|
||||
DynamicTextAreaModel
|
||||
} from '@ng-dynamic-forms/core';
|
||||
import { DynamicInputModel, DynamicTextAreaModel } from '@ng-dynamic-forms/core';
|
||||
import { DynamicFormControlModel } from '@ng-dynamic-forms/core/src/model/dynamic-form-control.model';
|
||||
import { ResourceType } from '../../core/shared/resource-type';
|
||||
import { Collection } from '../../core/shared/collection.model';
|
||||
import { ComColFormComponent } from '../../shared/comcol-forms/comcol-form/comcol-form.component';
|
||||
import { NormalizedCollection } from '../../core/cache/models/normalized-collection.model';
|
||||
|
||||
/**
|
||||
* Form used for creating and editing collections
|
||||
@@ -23,9 +20,9 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> {
|
||||
@Input() dso: Collection = new Collection();
|
||||
|
||||
/**
|
||||
* @type {ResourceType.Collection} This is a collection-type form
|
||||
* @type {Collection.type} This is a collection-type form
|
||||
*/
|
||||
protected type = ResourceType.Collection;
|
||||
protected type = Collection.type;
|
||||
|
||||
/**
|
||||
* The dynamic form fields used for creating/editing a collection
|
||||
|
@@ -1,9 +1,11 @@
|
||||
import { CreateCollectionPageGuard } from './create-collection-page.guard';
|
||||
import { MockRouter } from '../../shared/mocks/mock-router';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { Community } from '../../core/shared/community.model';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { first } from 'rxjs/operators';
|
||||
import {
|
||||
createFailedRemoteDataObject$,
|
||||
createSuccessfulRemoteDataObject$
|
||||
} from '../../shared/testing/utils';
|
||||
|
||||
describe('CreateCollectionPageGuard', () => {
|
||||
describe('canActivate', () => {
|
||||
@@ -15,11 +17,11 @@ describe('CreateCollectionPageGuard', () => {
|
||||
communityDataServiceStub = {
|
||||
findById: (id: string) => {
|
||||
if (id === 'valid-id') {
|
||||
return observableOf(new RemoteData(false, false, true, null, new Community()));
|
||||
return createSuccessfulRemoteDataObject$(new Community());
|
||||
} else if (id === 'invalid-id') {
|
||||
return observableOf(new RemoteData(false, false, true, null, undefined));
|
||||
return createSuccessfulRemoteDataObject$(undefined);
|
||||
} else if (id === 'error-id') {
|
||||
return observableOf(new RemoteData(false, false, false, null, new Community()));
|
||||
return createFailedRemoteDataObject$(new Community());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -20,9 +20,9 @@ export class CommunityFormComponent extends ComColFormComponent<Community> {
|
||||
@Input() dso: Community = new Community();
|
||||
|
||||
/**
|
||||
* @type {ResourceType.Community} This is a community-type form
|
||||
* @type {Community.type} This is a community-type form
|
||||
*/
|
||||
protected type = ResourceType.Community;
|
||||
protected type = Community.type;
|
||||
|
||||
/**
|
||||
* The dynamic form fields used for creating/editing a community
|
||||
|
@@ -1,9 +1,11 @@
|
||||
import { CreateCommunityPageGuard } from './create-community-page.guard';
|
||||
import { MockRouter } from '../../shared/mocks/mock-router';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { Community } from '../../core/shared/community.model';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { first } from 'rxjs/operators';
|
||||
import {
|
||||
createFailedRemoteDataObject$,
|
||||
createSuccessfulRemoteDataObject$
|
||||
} from '../../shared/testing/utils';
|
||||
|
||||
describe('CreateCommunityPageGuard', () => {
|
||||
describe('canActivate', () => {
|
||||
@@ -15,11 +17,11 @@ describe('CreateCommunityPageGuard', () => {
|
||||
communityDataServiceStub = {
|
||||
findById: (id: string) => {
|
||||
if (id === 'valid-id') {
|
||||
return observableOf(new RemoteData(false, false, true, null, new Community()));
|
||||
return createSuccessfulRemoteDataObject$(new Community());
|
||||
} else if (id === 'invalid-id') {
|
||||
return observableOf(new RemoteData(false, false, true, null, undefined));
|
||||
return createSuccessfulRemoteDataObject$(undefined);
|
||||
} else if (id === 'error-id') {
|
||||
return observableOf(new RemoteData(false, false, false, null, new Community()));
|
||||
return createFailedRemoteDataObject$(new Community());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -11,6 +11,7 @@ import {RouterTestingModule} from '@angular/router/testing';
|
||||
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
|
||||
import {By} from '@angular/platform-browser';
|
||||
import {of as observableOf, Observable } from 'rxjs';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils';
|
||||
|
||||
describe('SubCommunityList Component', () => {
|
||||
let comp: CommunityPageSubCommunityListComponent;
|
||||
@@ -40,8 +41,7 @@ describe('SubCommunityList Component', () => {
|
||||
{ language: 'en_US', value: 'Test title' }
|
||||
]
|
||||
},
|
||||
subcommunities: observableOf(new RemoteData(true, true, true,
|
||||
undefined, new PaginatedList(new PageInfo(), [])))
|
||||
subcommunities: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), []))
|
||||
});
|
||||
|
||||
const mockCommunity = Object.assign(new Community(), {
|
||||
@@ -50,8 +50,7 @@ describe('SubCommunityList Component', () => {
|
||||
{ language: 'en_US', value: 'Test title' }
|
||||
]
|
||||
},
|
||||
subcommunities: observableOf(new RemoteData(true, true, true,
|
||||
undefined, new PaginatedList(new PageInfo(), subcommunities)))
|
||||
subcommunities: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), subcommunities))
|
||||
})
|
||||
;
|
||||
|
||||
|
@@ -2,6 +2,10 @@ import {RemoteData} from '../../core/data/remote-data';
|
||||
import {hot} from 'jasmine-marbles';
|
||||
import {Item} from '../../core/shared/item.model';
|
||||
import {findSuccessfulAccordingTo} from './edit-item-operators';
|
||||
import {
|
||||
createFailedRemoteDataObject,
|
||||
createSuccessfulRemoteDataObject
|
||||
} from '../../shared/testing/utils';
|
||||
|
||||
describe('findSuccessfulAccordingTo', () => {
|
||||
let mockItem1;
|
||||
@@ -19,11 +23,11 @@ describe('findSuccessfulAccordingTo', () => {
|
||||
});
|
||||
it('should return first successful RemoteData Observable that complies to predicate', () => {
|
||||
const testRD = {
|
||||
a: new RemoteData(false, false, true, null, undefined),
|
||||
b: new RemoteData(false, false, false, null, mockItem1),
|
||||
c: new RemoteData(false, false, true, null, mockItem2),
|
||||
d: new RemoteData(false, false, true, null, mockItem1),
|
||||
e: new RemoteData(false, false, true, null, mockItem2),
|
||||
a: createSuccessfulRemoteDataObject(undefined),
|
||||
b: createFailedRemoteDataObject(mockItem1),
|
||||
c: createSuccessfulRemoteDataObject(mockItem2),
|
||||
d: createSuccessfulRemoteDataObject(mockItem1),
|
||||
e: createSuccessfulRemoteDataObject(mockItem2),
|
||||
};
|
||||
|
||||
const source = hot('abcde', testRD);
|
||||
|
@@ -17,6 +17,7 @@ import { By } from '@angular/platform-browser';
|
||||
import { ItemDeleteComponent } from './item-delete.component';
|
||||
import { getItemEditPath } from '../../item-page-routing.module';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils';
|
||||
|
||||
let comp: ItemDeleteComponent;
|
||||
let fixture: ComponentFixture<ItemDeleteComponent>;
|
||||
@@ -49,7 +50,7 @@ describe('ItemDeleteComponent', () => {
|
||||
|
||||
routeStub = {
|
||||
data: observableOf({
|
||||
item: new RemoteData(false, false, true, null, mockItem)
|
||||
item: createSuccessfulRemoteDataObject(mockItem)
|
||||
})
|
||||
};
|
||||
|
||||
|
@@ -6,17 +6,18 @@ import { ObjectUpdatesService } from '../../../../core/data/object-updates/objec
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { RemoteData } from '../../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../../core/data/paginated-list';
|
||||
import { MetadataField } from '../../../../core/metadata/metadatafield.model';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { SharedModule } from '../../../../shared/shared.module';
|
||||
import { getTestScheduler } from 'jasmine-marbles';
|
||||
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
|
||||
import { TestScheduler } from 'rxjs/testing';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadataschema.model';
|
||||
import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MetadatumViewModel } from '../../../../core/shared/metadata.models';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
|
||||
|
||||
let comp: EditInPlaceFieldComponent;
|
||||
let fixture: ComponentFixture<EditInPlaceFieldComponent>;
|
||||
@@ -59,7 +60,7 @@ describe('EditInPlaceFieldComponent', () => {
|
||||
paginatedMetadataFields = new PaginatedList(undefined, [mdField1, mdField2, mdField3]);
|
||||
|
||||
metadataFieldService = jasmine.createSpyObj({
|
||||
queryMetadataFields: observableOf(new RemoteData(false, false, true, undefined, paginatedMetadataFields)),
|
||||
queryMetadataFields: createSuccessfulRemoteDataObject$(paginatedMetadataFields),
|
||||
});
|
||||
objectUpdatesService = jasmine.createSpyObj('objectUpdatesService',
|
||||
{
|
||||
|
@@ -4,13 +4,13 @@ import { RegistryService } from '../../../../core/registry/registry.service';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
|
||||
import { map, take } from 'rxjs/operators';
|
||||
import { MetadataField } from '../../../../core/metadata/metadatafield.model';
|
||||
import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model';
|
||||
import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions';
|
||||
import { FieldUpdate } from '../../../../core/data/object-updates/object-updates.reducer';
|
||||
import { ObjectUpdatesService } from '../../../../core/data/object-updates/object-updates.service';
|
||||
import { NgModel } from '@angular/forms';
|
||||
import { MetadatumViewModel } from '../../../../core/shared/metadata.models';
|
||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||
|
||||
@Component({
|
||||
// tslint:disable-next-line:component-selector
|
||||
|
@@ -20,13 +20,16 @@ import { RouterStub } from '../../../shared/testing/router-stub';
|
||||
import { GLOBAL_CONFIG } from '../../../../config';
|
||||
import { Item } from '../../../core/shared/item.model';
|
||||
import { FieldChangeType } from '../../../core/data/object-updates/object-updates.actions';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { MetadatumViewModel } from '../../../core/shared/metadata.models';
|
||||
import { RegistryService } from '../../../core/registry/registry.service';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadataschema.model';
|
||||
import { MetadataField } from '../../../core/metadata/metadatafield.model';
|
||||
import { Metadata } from '../../../core/shared/metadata.utils';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
import { MetadataField } from '../../../core/metadata/metadata-field.model';
|
||||
import {
|
||||
createSuccessfulRemoteDataObject,
|
||||
createSuccessfulRemoteDataObject$
|
||||
} from '../../../shared/testing/utils';
|
||||
|
||||
let comp: any;
|
||||
let fixture: ComponentFixture<ItemMetadataComponent>;
|
||||
@@ -116,18 +119,18 @@ describe('ItemMetadataComponent', () => {
|
||||
)
|
||||
;
|
||||
itemService = jasmine.createSpyObj('itemService', {
|
||||
update: observableOf(new RemoteData(false, false, true, undefined, item)),
|
||||
update: createSuccessfulRemoteDataObject$(item),
|
||||
commitUpdates: {}
|
||||
});
|
||||
routeStub = {
|
||||
parent: {
|
||||
data: observableOf({ item: new RemoteData(false, false, true, null, item) })
|
||||
data: observableOf({ item: createSuccessfulRemoteDataObject(item) })
|
||||
}
|
||||
};
|
||||
paginatedMetadataFields = new PaginatedList(undefined, [mdField1, mdField2, mdField3]);
|
||||
|
||||
metadataFieldService = jasmine.createSpyObj({
|
||||
getAllMetadataFields: observableOf(new RemoteData(false, false, true, undefined, paginatedMetadataFields))
|
||||
getAllMetadataFields:createSuccessfulRemoteDataObject$(paginatedMetadataFields)
|
||||
});
|
||||
scheduler = getTestScheduler();
|
||||
objectUpdatesService = jasmine.createSpyObj('objectUpdatesService',
|
||||
|
@@ -15,9 +15,9 @@ import { NotificationsService } from '../../../shared/notifications/notification
|
||||
import { GLOBAL_CONFIG, GlobalConfig } from '../../../../config';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { RegistryService } from '../../../core/registry/registry.service';
|
||||
import { MetadataField } from '../../../core/metadata/metadatafield.model';
|
||||
import { MetadatumViewModel } from '../../../core/shared/metadata.models';
|
||||
import { Metadata } from '../../../core/shared/metadata.utils';
|
||||
import { MetadataField } from '../../../core/metadata/metadata-field.model';
|
||||
import { AbstractItemUpdateComponent } from '../abstract-item-update/abstract-item-update.component';
|
||||
|
||||
@Component({
|
||||
|
@@ -16,6 +16,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ItemPrivateComponent } from './item-private.component';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils';
|
||||
|
||||
let comp: ItemPrivateComponent;
|
||||
let fixture: ComponentFixture<ItemPrivateComponent>;
|
||||
@@ -50,7 +51,7 @@ describe('ItemPrivateComponent', () => {
|
||||
|
||||
routeStub = {
|
||||
data: observableOf({
|
||||
item: new RemoteData(false, false, true, null, {
|
||||
item: createSuccessfulRemoteDataObject({
|
||||
id: 'fake-id'
|
||||
})
|
||||
})
|
||||
|
@@ -16,6 +16,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ItemPublicComponent } from './item-public.component';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils';
|
||||
|
||||
let comp: ItemPublicComponent;
|
||||
let fixture: ComponentFixture<ItemPublicComponent>;
|
||||
@@ -50,7 +51,7 @@ describe('ItemPublicComponent', () => {
|
||||
|
||||
routeStub = {
|
||||
data: observableOf({
|
||||
item: new RemoteData(false, false, true, null, {
|
||||
item: createSuccessfulRemoteDataObject({
|
||||
id: 'fake-id'
|
||||
})
|
||||
})
|
||||
|
@@ -16,6 +16,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ItemReinstateComponent } from './item-reinstate.component';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils';
|
||||
|
||||
let comp: ItemReinstateComponent;
|
||||
let fixture: ComponentFixture<ItemReinstateComponent>;
|
||||
@@ -50,7 +51,7 @@ describe('ItemReinstateComponent', () => {
|
||||
|
||||
routeStub = {
|
||||
data: observableOf({
|
||||
item: new RemoteData(false, false, true, null, {
|
||||
item: createSuccessfulRemoteDataObject({
|
||||
id: 'fake-id'
|
||||
})
|
||||
})
|
||||
|
@@ -12,7 +12,7 @@
|
||||
{{'item.edit.tabs.status.labels.itemPage' | translate}}:
|
||||
</div>
|
||||
<div class="col-9 float-left status-data" id="status-itemPage">
|
||||
<a href="{{getItemPage((itemRD$ | async)?.payload)}}">{{getItemPage((itemRD$ | async)?.payload)}}</a>
|
||||
<a [routerLink]="getItemPage((itemRD$ | async)?.payload)">{{getItemPage((itemRD$ | async)?.payload)}}</a>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let operation of operations" class="w-100 pt-3">
|
||||
|
@@ -11,7 +11,7 @@ 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', () => {
|
||||
let comp: ItemStatusComponent;
|
||||
@@ -27,7 +27,7 @@ describe('ItemStatusComponent', () => {
|
||||
|
||||
const routeStub = {
|
||||
parent: {
|
||||
data: observableOf({ item: new RemoteData(false, false, true, null, mockItem) })
|
||||
data: observableOf({ item: createSuccessfulRemoteDataObject(mockItem) })
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -16,6 +16,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ItemWithdrawComponent } from './item-withdraw.component';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils';
|
||||
|
||||
let comp: ItemWithdrawComponent;
|
||||
let fixture: ComponentFixture<ItemWithdrawComponent>;
|
||||
@@ -50,7 +51,7 @@ describe('ItemWithdrawComponent', () => {
|
||||
|
||||
routeStub = {
|
||||
data: observableOf({
|
||||
item: new RemoteData(false, false, true, null, {
|
||||
item: createSuccessfulRemoteDataObject({
|
||||
id: 'fake-id'
|
||||
})
|
||||
})
|
||||
|
@@ -17,6 +17,10 @@ import { By } from '@angular/platform-browser';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { getItemEditPath } from '../../item-page-routing.module';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
import {
|
||||
createSuccessfulRemoteDataObject,
|
||||
createSuccessfulRemoteDataObject$
|
||||
} from '../../../shared/testing/utils';
|
||||
|
||||
/**
|
||||
* Test component that implements the AbstractSimpleItemActionComponent used to test the
|
||||
@@ -65,12 +69,12 @@ describe('AbstractSimpleItemActionComponent', () => {
|
||||
});
|
||||
|
||||
mockItemDataService = jasmine.createSpyObj({
|
||||
findById: observableOf(new RemoteData(false, false, true, undefined, mockItem))
|
||||
findById: createSuccessfulRemoteDataObject$(mockItem)
|
||||
});
|
||||
|
||||
routeStub = {
|
||||
data: observableOf({
|
||||
item: new RemoteData(false, false, true, null, {
|
||||
item: createSuccessfulRemoteDataObject({
|
||||
id: 'fake-id'
|
||||
})
|
||||
})
|
||||
|
@@ -9,6 +9,10 @@ import { Item } from '../../../core/shared/item.model';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import {
|
||||
createFailedRemoteDataObject$,
|
||||
createSuccessfulRemoteDataObject$
|
||||
} from '../../../shared/testing/utils';
|
||||
|
||||
let collectionsComponent: CollectionsComponent;
|
||||
let fixture: ComponentFixture<CollectionsComponent>;
|
||||
@@ -24,8 +28,8 @@ const mockCollection1: Collection = Object.assign(new Collection(), {
|
||||
}
|
||||
});
|
||||
|
||||
const succeededMockItem: Item = Object.assign(new Item(), {owningCollection: observableOf(new RemoteData(false, false, true, null, mockCollection1))});
|
||||
const failedMockItem: Item = Object.assign(new Item(), {owningCollection: observableOf(new RemoteData(false, false, false, null, mockCollection1))});
|
||||
const succeededMockItem: Item = Object.assign(new Item(), {owningCollection: createSuccessfulRemoteDataObject$(mockCollection1)});
|
||||
const failedMockItem: Item = Object.assign(new Item(), {owningCollection: createFailedRemoteDataObject$(mockCollection1)});
|
||||
|
||||
describe('CollectionsComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
|
@@ -17,9 +17,13 @@ import { RemoteData } from '../../core/data/remote-data';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import {
|
||||
createSuccessfulRemoteDataObject,
|
||||
createSuccessfulRemoteDataObject$
|
||||
} from '../../shared/testing/utils';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
||||
bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])),
|
||||
metadata: {
|
||||
'dc.title': [
|
||||
{
|
||||
@@ -30,7 +34,7 @@ const mockItem: Item = Object.assign(new Item(), {
|
||||
}
|
||||
});
|
||||
const routeStub = Object.assign(new ActivatedRouteStub(), {
|
||||
data: observableOf({ item: new RemoteData(false, false, true, null, mockItem) })
|
||||
data: observableOf({ item: createSuccessfulRemoteDataObject(mockItem) })
|
||||
});
|
||||
const metadataServiceStub = {
|
||||
/* tslint:disable:no-empty */
|
||||
|
@@ -11,6 +11,7 @@ import { ItemPageFieldComponent } from './item-page-field.component';
|
||||
import { MetadataValuesComponent } from '../../../field-components/metadata-values/metadata-values.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { MetadataMap, MetadataValue } from '../../../../core/shared/metadata.models';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
|
||||
|
||||
let comp: ItemPageFieldComponent;
|
||||
let fixture: ComponentFixture<ItemPageFieldComponent>;
|
||||
@@ -52,7 +53,7 @@ describe('ItemPageFieldComponent', () => {
|
||||
|
||||
export function mockItemWithMetadataFieldAndValue(field: string, value: string): Item {
|
||||
const item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
||||
bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])),
|
||||
metadata: new MetadataMap()
|
||||
});
|
||||
item.metadata[field] = [{
|
||||
|
@@ -16,9 +16,13 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { createRelationshipsObservable } from './item-types/shared/item.component.spec';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import {
|
||||
createFailedRemoteDataObject$, createPendingRemoteDataObject$, createSuccessfulRemoteDataObject,
|
||||
createSuccessfulRemoteDataObject$
|
||||
} from '../../shared/testing/utils';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
||||
bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])),
|
||||
metadata: [],
|
||||
relationships: createRelationshipsObservable()
|
||||
});
|
||||
@@ -33,7 +37,7 @@ describe('ItemPageComponent', () => {
|
||||
/* tslint:enable:no-empty */
|
||||
};
|
||||
const mockRoute = Object.assign(new ActivatedRouteStub(), {
|
||||
data: observableOf({ item: new RemoteData(false, false, true, null, mockItem) })
|
||||
data: observableOf({ item: createSuccessfulRemoteDataObject(mockItem) })
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -66,7 +70,8 @@ describe('ItemPageComponent', () => {
|
||||
|
||||
describe('when the item is loading', () => {
|
||||
beforeEach(() => {
|
||||
comp.itemRD$ = observableOf(new RemoteData(true, true, true, null, undefined));
|
||||
comp.itemRD$ = createPendingRemoteDataObject$(undefined);
|
||||
// comp.itemRD$ = observableOf(new RemoteData(true, true, true, null, undefined));
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
@@ -78,7 +83,7 @@ describe('ItemPageComponent', () => {
|
||||
|
||||
describe('when the item failed loading', () => {
|
||||
beforeEach(() => {
|
||||
comp.itemRD$ = observableOf(new RemoteData(false, false, false, null, undefined));
|
||||
comp.itemRD$ = createFailedRemoteDataObject$(undefined);
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,10 @@ import { createRelationshipsObservable } from '../shared/item.component.spec';
|
||||
import { PublicationComponent } from './publication.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { MetadataMap } from '../../../../core/shared/metadata.models';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
||||
bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])),
|
||||
metadata: new MetadataMap(),
|
||||
relationships: createRelationshipsObservable()
|
||||
});
|
||||
|
@@ -25,6 +25,7 @@ import { MetadatumRepresentation } from '../../../../core/shared/metadata-repres
|
||||
import { ItemMetadataRepresentation } from '../../../../core/shared/metadata-representation/item/item-metadata-representation.model';
|
||||
import { MetadataMap, MetadataValue } from '../../../../core/shared/metadata.models';
|
||||
import { compareArraysUsing, compareArraysUsingIds } from './item-relationships-utils';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
|
||||
|
||||
/**
|
||||
* Create a generic test for an item-page-fields component using a mockItem and the type of component
|
||||
@@ -94,13 +95,13 @@ export function containsFieldInput(fields: DebugElement[], metadataKey: string):
|
||||
}
|
||||
|
||||
export function createRelationshipsObservable() {
|
||||
return observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), [
|
||||
return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [
|
||||
Object.assign(new Relationship(), {
|
||||
relationshipType: observableOf(new RemoteData(false, false, true, null, new RelationshipType())),
|
||||
leftItem: observableOf(new RemoteData(false, false, true, null, new Item())),
|
||||
rightItem: observableOf(new RemoteData(false, false, true, null, new Item()))
|
||||
relationshipType: createSuccessfulRemoteDataObject$(new RelationshipType()),
|
||||
leftItem: createSuccessfulRemoteDataObject$(new Item()),
|
||||
rightItem: createSuccessfulRemoteDataObject$(new Item())
|
||||
})
|
||||
])));
|
||||
]));
|
||||
}
|
||||
describe('ItemComponent', () => {
|
||||
const arr1 = [
|
||||
@@ -329,15 +330,15 @@ describe('ItemComponent', () => {
|
||||
uuid: '1',
|
||||
metadata: new MetadataMap()
|
||||
});
|
||||
mockItem.relationships = observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), [
|
||||
mockItem.relationships = createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [
|
||||
Object.assign(new Relationship(), {
|
||||
uuid: '123',
|
||||
id: '123',
|
||||
leftItem: observableOf(new RemoteData(false, false, true, null, mockItem)),
|
||||
rightItem: observableOf(new RemoteData(false, false, true, null, relatedItem)),
|
||||
relationshipType: observableOf(new RemoteData(false, false, true, null, new RelationshipType()))
|
||||
leftItem: createSuccessfulRemoteDataObject$(mockItem),
|
||||
rightItem: createSuccessfulRemoteDataObject$(relatedItem),
|
||||
relationshipType: createSuccessfulRemoteDataObject$(new RelationshipType())
|
||||
})
|
||||
])));
|
||||
]));
|
||||
mockItem.metadata[metadataField] = [
|
||||
{
|
||||
value: 'Second value',
|
||||
@@ -358,6 +359,13 @@ describe('ItemComponent', () => {
|
||||
authority: '123'
|
||||
}
|
||||
] as MetadataValue[];
|
||||
const mockItemDataService = Object.assign({
|
||||
findById: (id) => {
|
||||
if (id === relatedItem.id) {
|
||||
return createSuccessfulRemoteDataObject$(relatedItem)
|
||||
}
|
||||
}
|
||||
}) as ItemDataService;
|
||||
|
||||
let representations: Observable<MetadataRepresentation[]>;
|
||||
|
||||
|
@@ -8,14 +8,15 @@ import { PageInfo } from '../../../core/shared/page-info.model';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { createRelationshipsObservable } from '../item-types/shared/item.component.spec';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
|
||||
|
||||
const mockItem1: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
||||
bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])),
|
||||
metadata: [],
|
||||
relationships: createRelationshipsObservable()
|
||||
});
|
||||
const mockItem2: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
||||
bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])),
|
||||
metadata: [],
|
||||
relationships: createRelationshipsObservable()
|
||||
});
|
||||
|
@@ -28,6 +28,7 @@ import { SearchFilterService } from '../core/shared/search/search-filter.service
|
||||
import { RoleDirective } from '../shared/roles/role.directive';
|
||||
import { RoleService } from '../core/roles/role.service';
|
||||
import { MockRoleService } from '../shared/mocks/mock-role-service';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../shared/testing/utils';
|
||||
|
||||
describe('MyDSpacePageComponent', () => {
|
||||
let comp: MyDSpacePageComponent;
|
||||
@@ -45,7 +46,7 @@ describe('MyDSpacePageComponent', () => {
|
||||
pagination.currentPage = 1;
|
||||
pagination.pageSize = 10;
|
||||
const sort: SortOptions = new SortOptions('score', SortDirection.DESC);
|
||||
const mockResults = observableOf(new RemoteData(false, false, true, null, ['test', 'data']));
|
||||
const mockResults = createSuccessfulRemoteDataObject$(['test', 'data']);
|
||||
const searchServiceStub = jasmine.createSpyObj('SearchService', {
|
||||
search: mockResults,
|
||||
getSearchLink: '/mydspace',
|
||||
|
@@ -19,10 +19,10 @@ import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { SearchSidebarService } from '../core/shared/search/search-sidebar.service';
|
||||
import { SearchFilterService } from '../core/shared/search/search-filter.service';
|
||||
import { SearchConfigurationService } from '../core/shared/search/search-configuration.service';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component';
|
||||
import { RouteService } from '../shared/services/route.service';
|
||||
import { SearchConfigurationServiceStub } from '../shared/testing/search-configuration-service-stub';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../shared/testing/utils';
|
||||
import { PaginatedSearchOptions } from '../shared/search/paginated-search-options.model';
|
||||
|
||||
let comp: SearchPageComponent;
|
||||
@@ -40,7 +40,7 @@ pagination.id = 'search-results-pagination';
|
||||
pagination.currentPage = 1;
|
||||
pagination.pageSize = 10;
|
||||
const sort: SortOptions = new SortOptions('score', SortDirection.DESC);
|
||||
const mockResults = observableOf(new RemoteData(false, false, true, null, ['test', 'data']));
|
||||
const mockResults = createSuccessfulRemoteDataObject$(['test', 'data']);
|
||||
const searchServiceStub = jasmine.createSpyObj('SearchService', {
|
||||
search: mockResults,
|
||||
getSearchLink: '/search',
|
||||
|
@@ -20,4 +20,4 @@ import { SubmissionEditComponent } from '../submission/edit/submission-edit.comp
|
||||
/**
|
||||
* This module defines the default component to load when navigating to the workflowitems edit page path.
|
||||
*/
|
||||
export class WorkflowitemsEditPageRoutingModule { }
|
||||
export class WorkflowItemsEditPageRoutingModule { }
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
import { WorkflowitemsEditPageRoutingModule } from './workflowitems-edit-page-routing.module';
|
||||
import { WorkflowItemsEditPageRoutingModule } from './workflowitems-edit-page-routing.module';
|
||||
import { SubmissionModule } from '../submission/submission.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
WorkflowitemsEditPageRoutingModule,
|
||||
WorkflowItemsEditPageRoutingModule,
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
SubmissionModule,
|
||||
@@ -16,6 +16,6 @@ import { SubmissionModule } from '../submission/submission.module';
|
||||
/**
|
||||
* This module handles all modules that need to access the workflowitems edit page.
|
||||
*/
|
||||
export class WorkflowitemsEditPageModule {
|
||||
export class WorkflowItemsEditPageModule {
|
||||
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ export function getCommunityModulePath() {
|
||||
{ path: 'logout', loadChildren: './+logout-page/logout-page.module#LogoutPageModule' },
|
||||
{ path: 'submit', loadChildren: './+submit-page/submit-page.module#SubmitPageModule' },
|
||||
{ path: 'workspaceitems', loadChildren: './+workspaceitems-edit-page/workspaceitems-edit-page.module#WorkspaceitemsEditPageModule' },
|
||||
{ path: 'workflowitems', loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowitemsEditPageModule' },
|
||||
{ path: 'workflowitems', loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowItemsEditPageModule' },
|
||||
{ path: '**', pathMatch: 'full', component: PageNotFoundComponent },
|
||||
])
|
||||
],
|
||||
|
@@ -1,29 +0,0 @@
|
||||
import { AuthType } from './auth-type';
|
||||
import { GenericConstructor } from '../shared/generic-constructor';
|
||||
import { NormalizedAuthStatus } from './models/normalized-auth-status.model';
|
||||
import { NormalizedEPerson } from '../eperson/models/normalized-eperson.model';
|
||||
import { NormalizedObject } from '../cache/models/normalized-object.model';
|
||||
import { CacheableObject } from '../cache/object-cache.reducer';
|
||||
import { NormalizedGroup } from '../eperson/models/normalized-group.model';
|
||||
|
||||
export class AuthObjectFactory {
|
||||
public static getConstructor(type): GenericConstructor<NormalizedObject<CacheableObject>> {
|
||||
switch (type) {
|
||||
case AuthType.EPerson: {
|
||||
return NormalizedEPerson
|
||||
}
|
||||
|
||||
case AuthType.Group: {
|
||||
return NormalizedGroup
|
||||
}
|
||||
|
||||
case AuthType.Status: {
|
||||
return NormalizedAuthStatus
|
||||
}
|
||||
|
||||
default: {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -35,95 +35,103 @@ describe('AuthResponseParsingService', () => {
|
||||
});
|
||||
|
||||
describe('parse', () => {
|
||||
const validRequest = new AuthPostRequest(
|
||||
'69f375b5-19f4-4453-8c7a-7dc5c55aafbb',
|
||||
'https://rest.api/dspace-spring-rest/api/authn/login',
|
||||
'password=test&user=myself@testshib.org');
|
||||
let validRequest;
|
||||
let validRequest2;
|
||||
let validResponse;
|
||||
let validResponse1;
|
||||
let validResponse2;
|
||||
beforeEach(() => {
|
||||
|
||||
const validRequest2 = new AuthGetRequest(
|
||||
'69f375b5-19f4-4453-8c7a-7dc5c55aafbb',
|
||||
'https://rest.api/dspace-spring-rest/api/authn/status');
|
||||
validRequest = new AuthPostRequest(
|
||||
'69f375b5-19f4-4453-8c7a-7dc5c55aafbb',
|
||||
'https://rest.api/dspace-spring-rest/api/authn/login',
|
||||
'password=test&user=myself@testshib.org');
|
||||
|
||||
const validResponse = {
|
||||
payload: {
|
||||
authenticated: true,
|
||||
id: null,
|
||||
okay: true,
|
||||
token: {
|
||||
accessToken: 'eyJhbGciOiJIUzI1NiJ9.eyJlaWQiOiI0ZGM3MGFiNS1jZDczLTQ5MmYtYjAwNy0zMTc5ZDJkOTI5NmIiLCJzZyI6W10sImV4cCI6MTUyNjMxODMyMn0.ASmvcbJFBfzhN7D5ncloWnaVZr5dLtgTuOgHaCKiimc',
|
||||
expires: 1526318322000
|
||||
},
|
||||
} as AuthStatus,
|
||||
statusCode: 200,
|
||||
statusText: '200'
|
||||
};
|
||||
validRequest2 = new AuthGetRequest(
|
||||
'69f375b5-19f4-4453-8c7a-7dc5c55aafbb',
|
||||
'https://rest.api/dspace-spring-rest/api/authn/status');
|
||||
|
||||
const validResponse1 = {
|
||||
payload: {},
|
||||
statusCode: 404,
|
||||
statusText: '404'
|
||||
};
|
||||
validResponse = {
|
||||
payload: {
|
||||
authenticated: true,
|
||||
id: null,
|
||||
okay: true,
|
||||
token: {
|
||||
accessToken: 'eyJhbGciOiJIUzI1NiJ9.eyJlaWQiOiI0ZGM3MGFiNS1jZDczLTQ5MmYtYjAwNy0zMTc5ZDJkOTI5NmIiLCJzZyI6W10sImV4cCI6MTUyNjMxODMyMn0.ASmvcbJFBfzhN7D5ncloWnaVZr5dLtgTuOgHaCKiimc',
|
||||
expires: 1526318322000
|
||||
},
|
||||
} as AuthStatus,
|
||||
statusCode: 200,
|
||||
statusText: '200'
|
||||
};
|
||||
|
||||
const validResponse2 = {
|
||||
payload: {
|
||||
authenticated: true,
|
||||
id: null,
|
||||
okay: true,
|
||||
type: 'status',
|
||||
_embedded: {
|
||||
eperson: {
|
||||
canLogIn: true,
|
||||
email: 'myself@testshib.org',
|
||||
groups: [],
|
||||
handle: null,
|
||||
id: '4dc70ab5-cd73-492f-b007-3179d2d9296b',
|
||||
lastActive: '2018-05-14T17:03:31.277+0000',
|
||||
metadata: {
|
||||
'eperson.firstname': [
|
||||
{
|
||||
language: null,
|
||||
value: 'User'
|
||||
validResponse1 = {
|
||||
payload: {},
|
||||
statusCode: 404,
|
||||
statusText: '404'
|
||||
};
|
||||
|
||||
validResponse2 = {
|
||||
payload: {
|
||||
authenticated: true,
|
||||
id: null,
|
||||
okay: true,
|
||||
type: 'status',
|
||||
_embedded: {
|
||||
eperson: {
|
||||
canLogIn: true,
|
||||
email: 'myself@testshib.org',
|
||||
groups: [],
|
||||
handle: null,
|
||||
id: '4dc70ab5-cd73-492f-b007-3179d2d9296b',
|
||||
lastActive: '2018-05-14T17:03:31.277+0000',
|
||||
metadata: {
|
||||
'eperson.firstname': [
|
||||
{
|
||||
language: null,
|
||||
value: 'User'
|
||||
}
|
||||
],
|
||||
'eperson.lastname': [
|
||||
{
|
||||
language: null,
|
||||
value: 'Test'
|
||||
}
|
||||
],
|
||||
'eperson.language': [
|
||||
{
|
||||
language: null,
|
||||
value: 'en'
|
||||
}
|
||||
]
|
||||
},
|
||||
name: 'User Test',
|
||||
netid: 'myself@testshib.org',
|
||||
requireCertificate: false,
|
||||
selfRegistered: false,
|
||||
type: 'eperson',
|
||||
uuid: '4dc70ab5-cd73-492f-b007-3179d2d9296b',
|
||||
_links: {
|
||||
self: {
|
||||
href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/eperson/epersons/4dc70ab5-cd73-492f-b007-3179d2d9296b'
|
||||
}
|
||||
],
|
||||
'eperson.lastname': [
|
||||
{
|
||||
language: null,
|
||||
value: 'Test'
|
||||
}
|
||||
],
|
||||
'eperson.language': [
|
||||
{
|
||||
language: null,
|
||||
value: 'en'
|
||||
}
|
||||
]
|
||||
},
|
||||
name: 'User Test',
|
||||
netid: 'myself@testshib.org',
|
||||
requireCertificate: false,
|
||||
selfRegistered: false,
|
||||
type: 'eperson',
|
||||
uuid: '4dc70ab5-cd73-492f-b007-3179d2d9296b',
|
||||
_links: {
|
||||
self: {
|
||||
href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/eperson/epersons/4dc70ab5-cd73-492f-b007-3179d2d9296b'
|
||||
}
|
||||
}
|
||||
},
|
||||
_links: {
|
||||
eperson: {
|
||||
href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/eperson/epersons/4dc70ab5-cd73-492f-b007-3179d2d9296b'
|
||||
},
|
||||
self: {
|
||||
href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/authn/status'
|
||||
}
|
||||
}
|
||||
},
|
||||
_links: {
|
||||
eperson: {
|
||||
href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/eperson/epersons/4dc70ab5-cd73-492f-b007-3179d2d9296b'
|
||||
},
|
||||
self: {
|
||||
href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/authn/status'
|
||||
}
|
||||
}
|
||||
},
|
||||
statusCode: 200,
|
||||
statusText: '200'
|
||||
statusCode: 200,
|
||||
statusText: '200'
|
||||
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
it('should return a AuthStatusResponse if data contains a valid AuthStatus object as payload', () => {
|
||||
const response = service.parse(validRequest, validResponse);
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { Inject, Injectable } from '@angular/core';
|
||||
|
||||
import { AuthObjectFactory } from './auth-object-factory';
|
||||
import { BaseResponseParsingService } from '../data/base-response-parsing.service';
|
||||
import { AuthStatusResponse, RestResponse } from '../cache/response.models';
|
||||
import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model';
|
||||
@@ -10,7 +9,6 @@ import { isNotEmpty } from '../../shared/empty.util';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { ResponseParsingService } from '../data/parsing.service';
|
||||
import { RestRequest } from '../data/request.models';
|
||||
import { AuthType } from './auth-type';
|
||||
import { AuthStatus } from './models/auth-status.model';
|
||||
import { NormalizedAuthStatus } from './models/normalized-auth-status.model';
|
||||
import { NormalizedObject } from '../cache/models/normalized-object.model';
|
||||
@@ -18,7 +16,6 @@ import { NormalizedObject } from '../cache/models/normalized-object.model';
|
||||
@Injectable()
|
||||
export class AuthResponseParsingService extends BaseResponseParsingService implements ResponseParsingService {
|
||||
|
||||
protected objectFactory = AuthObjectFactory;
|
||||
protected toCache = true;
|
||||
|
||||
constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig,
|
||||
@@ -28,7 +25,7 @@ export class AuthResponseParsingService extends BaseResponseParsingService imple
|
||||
|
||||
parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse {
|
||||
if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links) && (data.statusCode === 200)) {
|
||||
const response = this.process<NormalizedObject<AuthStatus>, AuthType>(data.payload, request.uuid);
|
||||
const response = this.process<NormalizedObject<AuthStatus>>(data.payload, request.uuid);
|
||||
return new AuthStatusResponse(response, data.statusCode, data.statusText);
|
||||
} else {
|
||||
return new AuthStatusResponse(data.payload as NormalizedAuthStatus, data.statusCode, data.statusText);
|
||||
|
@@ -1,5 +0,0 @@
|
||||
export enum AuthType {
|
||||
EPerson = 'eperson',
|
||||
Status = 'status',
|
||||
Group = 'group'
|
||||
}
|
@@ -4,20 +4,51 @@ import { EPerson } from '../../eperson/models/eperson.model';
|
||||
import { RemoteData } from '../../data/remote-data';
|
||||
import { Observable } from 'rxjs';
|
||||
import { CacheableObject } from '../../cache/object-cache.reducer';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
/**
|
||||
* Object that represents the authenticated status of a user
|
||||
*/
|
||||
export class AuthStatus implements CacheableObject {
|
||||
static type = new ResourceType('status');
|
||||
|
||||
/**
|
||||
* The unique identifier of this auth status
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The unique uuid of this auth status
|
||||
*/
|
||||
uuid: string;
|
||||
|
||||
/**
|
||||
* True if REST API is up and running, should never return false
|
||||
*/
|
||||
okay: boolean;
|
||||
|
||||
/**
|
||||
* If the auth status represents an authenticated state
|
||||
*/
|
||||
authenticated: boolean;
|
||||
|
||||
/**
|
||||
* Authentication error if there was one for this status
|
||||
*/
|
||||
error?: AuthError;
|
||||
|
||||
/**
|
||||
* The eperson of this auth status
|
||||
*/
|
||||
eperson: Observable<RemoteData<EPerson>>;
|
||||
|
||||
/**
|
||||
* True if the token is valid, false if there was no token or the token wasn't valid
|
||||
*/
|
||||
token?: AuthTokenInfo;
|
||||
|
||||
/**
|
||||
* The self link of this auth status' REST object
|
||||
*/
|
||||
self: string;
|
||||
}
|
||||
|
@@ -1,16 +1,22 @@
|
||||
import { AuthStatus } from './auth-status.model';
|
||||
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
|
||||
import { mapsTo, relationship } from '../../cache/builders/build-decorators';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { NormalizedObject } from '../../cache/models/normalized-object.model';
|
||||
import { IDToUUIDSerializer } from '../../cache/id-to-uuid-serializer';
|
||||
import { EPerson } from '../../eperson/models/eperson.model';
|
||||
|
||||
@mapsTo(AuthStatus)
|
||||
@inheritSerialization(NormalizedObject)
|
||||
export class NormalizedAuthStatus extends NormalizedObject<AuthStatus> {
|
||||
/**
|
||||
* The unique identifier of this auth status
|
||||
*/
|
||||
@autoserialize
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The unique generated uuid of this auth status
|
||||
*/
|
||||
@autoserializeAs(new IDToUUIDSerializer('auth-status'), 'id')
|
||||
uuid: string;
|
||||
|
||||
@@ -26,7 +32,10 @@ export class NormalizedAuthStatus extends NormalizedObject<AuthStatus> {
|
||||
@autoserialize
|
||||
authenticated: boolean;
|
||||
|
||||
@relationship(ResourceType.EPerson, false)
|
||||
/**
|
||||
* The self link to the eperson of this auth status
|
||||
*/
|
||||
@relationship(EPerson, false)
|
||||
@autoserialize
|
||||
eperson: string;
|
||||
}
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { distinctUntilChanged, map, startWith, take } from 'rxjs/operators';
|
||||
import { distinctUntilChanged, map, startWith } from 'rxjs/operators';
|
||||
import {
|
||||
ensureArrayHasValue, hasValue,
|
||||
ensureArrayHasValue,
|
||||
hasValue,
|
||||
hasValueOperator,
|
||||
isEmpty,
|
||||
isNotEmpty,
|
||||
@@ -23,7 +24,9 @@ import { BrowseEntry } from '../shared/browse-entry.model';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import {
|
||||
configureRequest,
|
||||
filterSuccessfulResponses, getBrowseDefinitionLinks, getFirstOccurrence,
|
||||
filterSuccessfulResponses,
|
||||
getBrowseDefinitionLinks,
|
||||
getFirstOccurrence,
|
||||
getRemoteDataPayload,
|
||||
getRequestFromRequestHref
|
||||
} from '../shared/operators';
|
||||
@@ -32,7 +35,6 @@ import { Item } from '../shared/item.model';
|
||||
import { DSpaceObject } from '../shared/dspace-object.model';
|
||||
import { BrowseEntrySearchOptions } from './browse-entry-search-options.model';
|
||||
import { GenericSuccessResponse } from '../cache/response.models';
|
||||
import { RequestEntry } from '../data/request.reducer';
|
||||
|
||||
/**
|
||||
* The service handling all browse requests
|
||||
|
50
src/app/core/cache/builders/build-decorators.ts
vendored
50
src/app/core/cache/builders/build-decorators.ts
vendored
@@ -1,23 +1,59 @@
|
||||
import 'reflect-metadata';
|
||||
|
||||
import { GenericConstructor } from '../../shared/generic-constructor';
|
||||
import { CacheableObject } from '../object-cache.reducer';
|
||||
import { CacheableObject, TypedObject } from '../object-cache.reducer';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
const mapsToMetadataKey = Symbol('mapsTo');
|
||||
const relationshipKey = Symbol('relationship');
|
||||
|
||||
const relationshipMap = new Map();
|
||||
const typeMap = new Map();
|
||||
|
||||
export function mapsTo(value: GenericConstructor<CacheableObject>) {
|
||||
return Reflect.metadata(mapsToMetadataKey, value);
|
||||
/**
|
||||
* Decorator function to map a normalized class to it's not-normalized counter part class
|
||||
* It will also maps a type to the matching class
|
||||
* @param value The not-normalized class to map to
|
||||
*/
|
||||
export function mapsTo(value: GenericConstructor<TypedObject>) {
|
||||
return function decorator(objectConstructor: GenericConstructor<TypedObject>) {
|
||||
Reflect.defineMetadata(mapsToMetadataKey, value, objectConstructor);
|
||||
mapsToType((value as any).type, objectConstructor);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a type to the matching class
|
||||
* @param value The resourse type
|
||||
* @param objectConstructor The class to map to
|
||||
*/
|
||||
function mapsToType(value: ResourceType, objectConstructor: GenericConstructor<TypedObject>) {
|
||||
if (!objectConstructor || !value) {
|
||||
return;
|
||||
}
|
||||
typeMap.set(value.value, objectConstructor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the mapped class for the given normalized class
|
||||
* @param target The normalized class
|
||||
*/
|
||||
export function getMapsTo(target: any) {
|
||||
return Reflect.getOwnMetadata(mapsToMetadataKey, target);
|
||||
}
|
||||
|
||||
export function relationship(value: ResourceType, isList: boolean = false): any {
|
||||
/**
|
||||
* Returns the mapped class for the given type
|
||||
* @param type The resource type
|
||||
*/
|
||||
export function getMapsToType(type: string | ResourceType) {
|
||||
if (typeof(type) === 'object') {
|
||||
type = (type as ResourceType).value;
|
||||
}
|
||||
return typeMap.get(type);
|
||||
}
|
||||
|
||||
export function relationship<T extends CacheableObject>(value: GenericConstructor<T>, isList: boolean = false): any {
|
||||
return function r(target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
if (!target || !propertyKey) {
|
||||
return;
|
||||
@@ -28,8 +64,10 @@ export function relationship(value: ResourceType, isList: boolean = false): any
|
||||
metaDataList.push(propertyKey);
|
||||
}
|
||||
relationshipMap.set(target.constructor, metaDataList);
|
||||
|
||||
return Reflect.metadata(relationshipKey, { resourceType: value, isList }).apply(this, arguments);
|
||||
return Reflect.metadata(relationshipKey, {
|
||||
resourceType: (value as any).type.value,
|
||||
isList
|
||||
}).apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NormalizedObject } from '../models/normalized-object.model';
|
||||
import { CacheableObject } from '../object-cache.reducer';
|
||||
import { getRelationships } from './build-decorators';
|
||||
import { NormalizedObjectFactory } from '../models/normalized-object-factory';
|
||||
import { getMapsToType, getRelationships } from './build-decorators';
|
||||
import { hasValue, isNotEmpty } from '../../../shared/empty.util';
|
||||
import { TypedObject } from '../object-cache.reducer';
|
||||
|
||||
/**
|
||||
* Return true if halObj has a value for `_links.self`
|
||||
@@ -35,8 +34,8 @@ export class NormalizedObjectBuildService {
|
||||
*
|
||||
* @param {TDomain} domainModel a domain model
|
||||
*/
|
||||
normalize<T extends CacheableObject>(domainModel: T): NormalizedObject<T> {
|
||||
const normalizedConstructor = NormalizedObjectFactory.getConstructor(domainModel.type);
|
||||
normalize<T extends TypedObject>(domainModel: T): NormalizedObject<T> {
|
||||
const normalizedConstructor = getMapsToType((domainModel as any).type);
|
||||
const relationships = getRelationships(normalizedConstructor) || [];
|
||||
|
||||
const normalizedModel = Object.assign({}, domainModel) as any;
|
||||
|
@@ -4,6 +4,7 @@ import { PaginatedList } from '../../data/paginated-list';
|
||||
import { PageInfo } from '../../shared/page-info.model';
|
||||
import { RemoteData } from '../../data/remote-data';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils';
|
||||
|
||||
const pageInfo = new PageInfo();
|
||||
const array = [
|
||||
@@ -29,8 +30,8 @@ const array = [
|
||||
})
|
||||
];
|
||||
const paginatedList = new PaginatedList(pageInfo, array);
|
||||
const arrayRD = new RemoteData(false, false, true, undefined, array);
|
||||
const paginatedListRD = new RemoteData(false, false, true, undefined, paginatedList);
|
||||
const arrayRD = createSuccessfulRemoteDataObject(array);
|
||||
const paginatedListRD = createSuccessfulRemoteDataObject(paginatedList);
|
||||
|
||||
describe('RemoteDataBuildService', () => {
|
||||
let service: RemoteDataBuildService;
|
||||
|
@@ -21,7 +21,8 @@ import {
|
||||
getRequestFromRequestUUID,
|
||||
getResourceLinksFromResponse
|
||||
} from '../../shared/operators';
|
||||
import { CacheableObject } from '../object-cache.reducer';
|
||||
import { CacheableObject, TypedObject } from '../object-cache.reducer';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
|
||||
|
||||
@Injectable()
|
||||
export class RemoteDataBuildService {
|
||||
@@ -200,7 +201,7 @@ export class RemoteDataBuildService {
|
||||
aggregate<T>(input: Array<Observable<RemoteData<T>>>): Observable<RemoteData<T[]>> {
|
||||
|
||||
if (isEmpty(input)) {
|
||||
return observableOf(new RemoteData(false, false, true, null, []));
|
||||
return createSuccessfulRemoteDataObject$([]);
|
||||
}
|
||||
|
||||
return observableCombineLatest(...input).pipe(
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
|
||||
import { ItemType } from '../../../shared/item-relationships/item-type.model';
|
||||
import { ResourceType } from '../../../shared/resource-type';
|
||||
import { mapsTo } from '../../builders/build-decorators';
|
||||
import { NormalizedObject } from '../normalized-object.model';
|
||||
import { IDToUUIDSerializer } from '../../id-to-uuid-serializer';
|
||||
@@ -11,7 +10,6 @@ import { IDToUUIDSerializer } from '../../id-to-uuid-serializer';
|
||||
@mapsTo(ItemType)
|
||||
@inheritSerialization(NormalizedObject)
|
||||
export class NormalizedItemType extends NormalizedObject<ItemType> {
|
||||
|
||||
/**
|
||||
* The label that describes the ResourceType of the Item
|
||||
*/
|
||||
@@ -27,6 +25,6 @@ export class NormalizedItemType extends NormalizedObject<ItemType> {
|
||||
/**
|
||||
* The universally unique identifier of this ItemType
|
||||
*/
|
||||
@autoserializeAs(new IDToUUIDSerializer(ResourceType.ItemType), 'id')
|
||||
@autoserializeAs(new IDToUUIDSerializer(ItemType.type.value), 'id')
|
||||
uuid: string;
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@ import { mapsTo, relationship } from '../../builders/build-decorators';
|
||||
import { NormalizedDSpaceObject } from '../normalized-dspace-object.model';
|
||||
import { NormalizedObject } from '../normalized-object.model';
|
||||
import { IDToUUIDSerializer } from '../../id-to-uuid-serializer';
|
||||
import { ItemType } from '../../../shared/item-relationships/item-type.model';
|
||||
|
||||
/**
|
||||
* Normalized model class for a DSpace RelationshipType
|
||||
@@ -12,7 +13,6 @@ import { IDToUUIDSerializer } from '../../id-to-uuid-serializer';
|
||||
@mapsTo(RelationshipType)
|
||||
@inheritSerialization(NormalizedDSpaceObject)
|
||||
export class NormalizedRelationshipType extends NormalizedObject<RelationshipType> {
|
||||
|
||||
/**
|
||||
* The identifier of this RelationshipType
|
||||
*/
|
||||
@@ -59,19 +59,19 @@ export class NormalizedRelationshipType extends NormalizedObject<RelationshipTyp
|
||||
* The type of Item found to the left of this RelationshipType
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.ItemType, false)
|
||||
@relationship(ItemType, false)
|
||||
leftType: string;
|
||||
|
||||
/**
|
||||
* The type of Item found to the right of this RelationshipType
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.ItemType, false)
|
||||
@relationship(ItemType, false)
|
||||
rightType: string;
|
||||
|
||||
/**
|
||||
* The universally unique identifier of this RelationshipType
|
||||
*/
|
||||
@autoserializeAs(new IDToUUIDSerializer(ResourceType.RelationshipType), 'id')
|
||||
@autoserializeAs(new IDToUUIDSerializer(RelationshipType.type.value), 'id')
|
||||
uuid: string;
|
||||
}
|
||||
|
@@ -1,9 +1,10 @@
|
||||
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
|
||||
import { Relationship } from '../../../shared/item-relationships/relationship.model';
|
||||
import { ResourceType } from '../../../shared/resource-type';
|
||||
import { mapsTo, relationship } from '../../builders/build-decorators';
|
||||
import { NormalizedObject } from '../normalized-object.model';
|
||||
import { IDToUUIDSerializer } from '../../id-to-uuid-serializer';
|
||||
import { RelationshipType } from '../../../shared/item-relationships/relationship-type.model';
|
||||
import { Item } from '../../../shared/item.model';
|
||||
|
||||
/**
|
||||
* Normalized model class for a DSpace Relationship
|
||||
@@ -22,14 +23,14 @@ export class NormalizedRelationship extends NormalizedObject<Relationship> {
|
||||
* The item to the left of this relationship
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.Item, false)
|
||||
@relationship(Item, false)
|
||||
leftItem: string;
|
||||
|
||||
/**
|
||||
* The item to the right of this relationship
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.Item, false)
|
||||
@relationship(Item, false)
|
||||
rightItem: string;
|
||||
|
||||
/**
|
||||
@@ -48,12 +49,12 @@ export class NormalizedRelationship extends NormalizedObject<Relationship> {
|
||||
* The type of Relationship
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.RelationshipType, false)
|
||||
@relationship(RelationshipType, false)
|
||||
relationshipType: string;
|
||||
|
||||
/**
|
||||
* The universally unique identifier of this Relationship
|
||||
*/
|
||||
@autoserializeAs(new IDToUUIDSerializer(ResourceType.Relationship), 'id')
|
||||
@autoserializeAs(new IDToUUIDSerializer(Relationship.type.value), 'id')
|
||||
uuid: string;
|
||||
}
|
||||
|
@@ -12,7 +12,6 @@ import { SupportLevel } from './support-level.model';
|
||||
@mapsTo(BitstreamFormat)
|
||||
@inheritSerialization(NormalizedObject)
|
||||
export class NormalizedBitstreamFormat extends NormalizedObject<BitstreamFormat> {
|
||||
|
||||
/**
|
||||
* Short description of this Bitstream Format
|
||||
*/
|
||||
|
@@ -1,9 +1,10 @@
|
||||
import { inheritSerialization, autoserialize } from 'cerialize';
|
||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
|
||||
import { NormalizedDSpaceObject } from './normalized-dspace-object.model';
|
||||
import { Bitstream } from '../../shared/bitstream.model';
|
||||
import { mapsTo, relationship } from '../builders/build-decorators';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { Item } from '../../shared/item.model';
|
||||
import { BitstreamFormat } from '../../shared/bitstream-format.model';
|
||||
|
||||
/**
|
||||
* Normalized model class for a DSpace Bitstream
|
||||
@@ -11,7 +12,6 @@ import { ResourceType } from '../../shared/resource-type';
|
||||
@mapsTo(Bitstream)
|
||||
@inheritSerialization(NormalizedDSpaceObject)
|
||||
export class NormalizedBitstream extends NormalizedDSpaceObject<Bitstream> {
|
||||
|
||||
/**
|
||||
* The size of this bitstream in bytes
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ export class NormalizedBitstream extends NormalizedDSpaceObject<Bitstream> {
|
||||
* The format of this Bitstream
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.BitstreamFormat, false)
|
||||
@relationship(BitstreamFormat, false)
|
||||
format: string;
|
||||
|
||||
/**
|
||||
@@ -41,14 +41,14 @@ export class NormalizedBitstream extends NormalizedDSpaceObject<Bitstream> {
|
||||
* An array of Bundles that are direct parents of this Bitstream
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.Item, true)
|
||||
@relationship(Item, true)
|
||||
parents: string[];
|
||||
|
||||
/**
|
||||
* The Bundle that owns this Bitstream
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.Item, false)
|
||||
@relationship(Item, false)
|
||||
owner: string;
|
||||
|
||||
/**
|
||||
|
@@ -3,7 +3,7 @@ import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { NormalizedDSpaceObject } from './normalized-dspace-object.model';
|
||||
import { Bundle } from '../../shared/bundle.model';
|
||||
import { mapsTo, relationship } from '../builders/build-decorators';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { Bitstream } from '../../shared/bitstream.model';
|
||||
|
||||
/**
|
||||
* Normalized model class for a DSpace Bundle
|
||||
@@ -15,7 +15,7 @@ export class NormalizedBundle extends NormalizedDSpaceObject<Bundle> {
|
||||
* The primary bitstream of this Bundle
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.Bitstream, false)
|
||||
@relationship(Bitstream, false)
|
||||
primaryBitstream: string;
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ export class NormalizedBundle extends NormalizedDSpaceObject<Bundle> {
|
||||
* List of Bitstreams that are part of this Bundle
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.Bitstream, true)
|
||||
@relationship(Bitstream, true)
|
||||
bitstreams: string[];
|
||||
|
||||
}
|
||||
|
@@ -3,7 +3,15 @@ import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
|
||||
import { NormalizedDSpaceObject } from './normalized-dspace-object.model';
|
||||
import { Collection } from '../../shared/collection.model';
|
||||
import { mapsTo, relationship } from '../builders/build-decorators';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { NormalizedResourcePolicy } from './normalized-resource-policy.model';
|
||||
import { NormalizedBitstream } from './normalized-bitstream.model';
|
||||
import { NormalizedCommunity } from './normalized-community.model';
|
||||
import { NormalizedItem } from './normalized-item.model';
|
||||
import { License } from '../../shared/license.model';
|
||||
import { ResourcePolicy } from '../../shared/resource-policy.model';
|
||||
import { Bitstream } from '../../shared/bitstream.model';
|
||||
import { Community } from '../../shared/community.model';
|
||||
import { Item } from '../../shared/item.model';
|
||||
|
||||
/**
|
||||
* Normalized model class for a DSpace Collection
|
||||
@@ -22,42 +30,42 @@ export class NormalizedCollection extends NormalizedDSpaceObject<Collection> {
|
||||
* The Bitstream that represents the license of this Collection
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.License, false)
|
||||
@relationship(License, false)
|
||||
license: string;
|
||||
|
||||
/**
|
||||
* The Bitstream that represents the default Access Conditions of this Collection
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(ResourceType.ResourcePolicy, false)
|
||||
@relationship(ResourcePolicy, false)
|
||||
defaultAccessConditions: string;
|
||||
|
||||
/**
|
||||
* The Bitstream that represents the logo of this Collection
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Bitstream, false)
|
||||
@relationship(Bitstream, false)
|
||||
logo: string;
|
||||
|
||||
/**
|
||||
* An array of Communities that are direct parents of this Collection
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Community, true)
|
||||
@relationship(Community, true)
|
||||
parents: string[];
|
||||
|
||||
/**
|
||||
* The Community that owns this Collection
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Community, false)
|
||||
@relationship(Community, false)
|
||||
owner: string;
|
||||
|
||||
/**
|
||||
* List of Items that are part of (not necessarily owned by) this Collection
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Item, true)
|
||||
@relationship(Item, true)
|
||||
items: string[];
|
||||
|
||||
}
|
||||
|
@@ -1,9 +1,13 @@
|
||||
import { autoserialize, deserialize, inheritSerialization, serialize } from 'cerialize';
|
||||
import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
|
||||
|
||||
import { NormalizedDSpaceObject } from './normalized-dspace-object.model';
|
||||
import { Community } from '../../shared/community.model';
|
||||
import { mapsTo, relationship } from '../builders/build-decorators';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { NormalizedBitstream } from './normalized-bitstream.model';
|
||||
import { NormalizedCollection } from './normalized-collection.model';
|
||||
import { Bitstream } from '../../shared/bitstream.model';
|
||||
import { Collection } from '../../shared/collection.model';
|
||||
|
||||
/**
|
||||
* Normalized model class for a DSpace Community
|
||||
@@ -11,7 +15,6 @@ import { ResourceType } from '../../shared/resource-type';
|
||||
@mapsTo(Community)
|
||||
@inheritSerialization(NormalizedDSpaceObject)
|
||||
export class NormalizedCommunity extends NormalizedDSpaceObject<Community> {
|
||||
|
||||
/**
|
||||
* A string representing the unique handle of this Community
|
||||
*/
|
||||
@@ -22,32 +25,32 @@ export class NormalizedCommunity extends NormalizedDSpaceObject<Community> {
|
||||
* The Bitstream that represents the logo of this Community
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Bitstream, false)
|
||||
@relationship(Bitstream, false)
|
||||
logo: string;
|
||||
|
||||
/**
|
||||
* An array of Communities that are direct parents of this Community
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Community, true)
|
||||
@relationship(Community, true)
|
||||
parents: string[];
|
||||
|
||||
/**
|
||||
* The Community that owns this Community
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Community, false)
|
||||
@relationship(Community, false)
|
||||
owner: string;
|
||||
|
||||
/**
|
||||
* List of Collections that are owned by this Community
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Collection, true)
|
||||
@relationship(Collection, true)
|
||||
collections: string[];
|
||||
|
||||
@deserialize
|
||||
@relationship(ResourceType.Community, true)
|
||||
@relationship(Community, true)
|
||||
subcommunities: string[];
|
||||
|
||||
}
|
||||
|
@@ -1,15 +1,15 @@
|
||||
import { autoserializeAs, deserializeAs } from 'cerialize';
|
||||
import { autoserializeAs, deserializeAs, autoserialize } from 'cerialize';
|
||||
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||
import { MetadataMap, MetadataMapSerializer } from '../../shared/metadata.models';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { mapsTo } from '../builders/build-decorators';
|
||||
import { NormalizedObject } from './normalized-object.model';
|
||||
import { TypedObject } from '../object-cache.reducer';
|
||||
|
||||
/**
|
||||
* An model class for a DSpaceObject.
|
||||
*/
|
||||
@mapsTo(DSpaceObject)
|
||||
export class NormalizedDSpaceObject<T extends DSpaceObject> extends NormalizedObject<T> {
|
||||
export class NormalizedDSpaceObject<T extends DSpaceObject> extends NormalizedObject<T> implements TypedObject {
|
||||
|
||||
/**
|
||||
* The link to the rest endpoint where this object can be found
|
||||
@@ -38,8 +38,8 @@ export class NormalizedDSpaceObject<T extends DSpaceObject> extends NormalizedOb
|
||||
/**
|
||||
* A string representing the kind of DSpaceObject, e.g. community, item, …
|
||||
*/
|
||||
@autoserializeAs(String)
|
||||
type: ResourceType;
|
||||
@autoserialize
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* All metadata of this DSpaceObject
|
||||
|
@@ -4,6 +4,12 @@ import { NormalizedDSpaceObject } from './normalized-dspace-object.model';
|
||||
import { Item } from '../../shared/item.model';
|
||||
import { mapsTo, relationship } from '../builders/build-decorators';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { NormalizedCollection } from './normalized-collection.model';
|
||||
import { NormalizedBitstream } from './normalized-bitstream.model';
|
||||
import { NormalizedRelationship } from './items/normalized-relationship.model';
|
||||
import { Collection } from '../../shared/collection.model';
|
||||
import { Bitstream } from '../../shared/bitstream.model';
|
||||
import { Relationship } from '../../shared/item-relationships/relationship.model';
|
||||
|
||||
/**
|
||||
* Normalized model class for a DSpace Item
|
||||
@@ -46,25 +52,25 @@ export class NormalizedItem extends NormalizedDSpaceObject<Item> {
|
||||
* An array of Collections that are direct parents of this Item
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Collection, true)
|
||||
@relationship(Collection, true)
|
||||
parents: string[];
|
||||
|
||||
/**
|
||||
* The Collection that owns this Item
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Collection, false)
|
||||
@relationship(Collection, false)
|
||||
owningCollection: string;
|
||||
|
||||
/**
|
||||
* List of Bitstreams that are owned by this Item
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Bitstream, true)
|
||||
@relationship(Bitstream, true)
|
||||
bitstreams: string[];
|
||||
|
||||
@autoserialize
|
||||
@relationship(ResourceType.Relationship, true)
|
||||
@relationship(Relationship, true)
|
||||
relationships: string[];
|
||||
|
||||
}
|
||||
|
@@ -1,104 +0,0 @@
|
||||
import { NormalizedItemType } from './items/normalized-item-type.model';
|
||||
import { NormalizedRelationshipType } from './items/normalized-relationship-type.model';
|
||||
import { NormalizedRelationship } from './items/normalized-relationship.model';
|
||||
import { NormalizedBitstream } from './normalized-bitstream.model';
|
||||
import { NormalizedBundle } from './normalized-bundle.model';
|
||||
import { NormalizedItem } from './normalized-item.model';
|
||||
import { NormalizedCollection } from './normalized-collection.model';
|
||||
import { GenericConstructor } from '../../shared/generic-constructor';
|
||||
import { NormalizedCommunity } from './normalized-community.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { NormalizedObject } from './normalized-object.model';
|
||||
import { NormalizedLicense } from './normalized-license.model';
|
||||
import { NormalizedResourcePolicy } from './normalized-resource-policy.model';
|
||||
import { NormalizedWorkspaceItem } from '../../submission/models/normalized-workspaceitem.model';
|
||||
import { NormalizedEPerson } from '../../eperson/models/normalized-eperson.model';
|
||||
import { NormalizedGroup } from '../../eperson/models/normalized-group.model';
|
||||
import { NormalizedWorkflowItem } from '../../submission/models/normalized-workflowitem.model';
|
||||
import { NormalizedClaimedTask } from '../../tasks/models/normalized-claimed-task-object.model';
|
||||
import { NormalizedPoolTask } from '../../tasks/models/normalized-pool-task-object.model';
|
||||
import { NormalizedBitstreamFormat } from './normalized-bitstream-format.model';
|
||||
import { NormalizedMetadataSchema } from '../../metadata/normalized-metadata-schema.model';
|
||||
import { CacheableObject } from '../object-cache.reducer';
|
||||
import { NormalizedSubmissionDefinitionsModel } from '../../config/models/normalized-config-submission-definitions.model';
|
||||
import { NormalizedSubmissionFormsModel } from '../../config/models/normalized-config-submission-forms.model';
|
||||
import { NormalizedSubmissionSectionModel } from '../../config/models/normalized-config-submission-section.model';
|
||||
|
||||
export class NormalizedObjectFactory {
|
||||
public static getConstructor(type: ResourceType): GenericConstructor<NormalizedObject<CacheableObject>> {
|
||||
switch (type) {
|
||||
case ResourceType.Bitstream: {
|
||||
return NormalizedBitstream
|
||||
}
|
||||
case ResourceType.Bundle: {
|
||||
return NormalizedBundle
|
||||
}
|
||||
case ResourceType.Item: {
|
||||
return NormalizedItem
|
||||
}
|
||||
case ResourceType.Collection: {
|
||||
return NormalizedCollection
|
||||
}
|
||||
case ResourceType.Community: {
|
||||
return NormalizedCommunity
|
||||
}
|
||||
case ResourceType.BitstreamFormat: {
|
||||
return NormalizedBitstreamFormat
|
||||
}
|
||||
case ResourceType.License: {
|
||||
return NormalizedLicense
|
||||
}
|
||||
case ResourceType.ResourcePolicy: {
|
||||
return NormalizedResourcePolicy
|
||||
}
|
||||
case ResourceType.Relationship: {
|
||||
return NormalizedRelationship
|
||||
}
|
||||
case ResourceType.RelationshipType: {
|
||||
return NormalizedRelationshipType
|
||||
}
|
||||
case ResourceType.ItemType: {
|
||||
return NormalizedItemType
|
||||
}
|
||||
case ResourceType.EPerson: {
|
||||
return NormalizedEPerson
|
||||
}
|
||||
case ResourceType.Group: {
|
||||
return NormalizedGroup
|
||||
}
|
||||
case ResourceType.MetadataSchema: {
|
||||
return NormalizedMetadataSchema
|
||||
}
|
||||
case ResourceType.MetadataField: {
|
||||
return NormalizedGroup
|
||||
}
|
||||
case ResourceType.Workspaceitem: {
|
||||
return NormalizedWorkspaceItem
|
||||
}
|
||||
case ResourceType.Workflowitem: {
|
||||
return NormalizedWorkflowItem
|
||||
}
|
||||
case ResourceType.ClaimedTask: {
|
||||
return NormalizedClaimedTask
|
||||
}
|
||||
case ResourceType.PoolTask: {
|
||||
return NormalizedPoolTask
|
||||
}
|
||||
case ResourceType.SubmissionDefinition:
|
||||
case ResourceType.SubmissionDefinitions: {
|
||||
return NormalizedSubmissionDefinitionsModel
|
||||
}
|
||||
case ResourceType.SubmissionForm:
|
||||
case ResourceType.SubmissionForms: {
|
||||
return NormalizedSubmissionFormsModel
|
||||
}
|
||||
case ResourceType.SubmissionSection:
|
||||
case ResourceType.SubmissionSections: {
|
||||
return NormalizedSubmissionSectionModel
|
||||
}
|
||||
default: {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,25 +1,24 @@
|
||||
import { CacheableObject } from '../object-cache.reducer';
|
||||
import { CacheableObject, TypedObject } from '../object-cache.reducer';
|
||||
import { autoserialize } from 'cerialize';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
/**
|
||||
* An abstract model class for a NormalizedObject.
|
||||
*/
|
||||
export abstract class NormalizedObject<T extends CacheableObject> implements CacheableObject {
|
||||
|
||||
export abstract class NormalizedObject<T extends TypedObject> implements CacheableObject {
|
||||
/**
|
||||
* The link to the rest endpoint where this object can be found
|
||||
*/
|
||||
@autoserialize
|
||||
self: string;
|
||||
|
||||
/**
|
||||
* A string representing the kind of DSpaceObject, e.g. community, item, …
|
||||
*/
|
||||
@autoserialize
|
||||
type: ResourceType;
|
||||
|
||||
@autoserialize
|
||||
_links: {
|
||||
[name: string]: string
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* A string representing the kind of object
|
||||
*/
|
||||
@autoserialize
|
||||
type: string;
|
||||
}
|
||||
|
@@ -12,7 +12,6 @@ import { ActionType } from './action-type.model';
|
||||
@mapsTo(ResourcePolicy)
|
||||
@inheritSerialization(NormalizedObject)
|
||||
export class NormalizedResourcePolicy extends NormalizedObject<ResourcePolicy> {
|
||||
|
||||
/**
|
||||
* The action that is allowed by this Resource Policy
|
||||
*/
|
||||
|
@@ -8,7 +8,7 @@ export enum SupportLevel {
|
||||
Unknown = 0,
|
||||
|
||||
/**
|
||||
* Unknown for Bitstream Formats that are known to the system, but not fully supported
|
||||
* Known for Bitstream Formats that are known to the system, but not fully supported
|
||||
*/
|
||||
Known = 1,
|
||||
|
||||
|
14
src/app/core/cache/object-cache.reducer.spec.ts
vendored
14
src/app/core/cache/object-cache.reducer.spec.ts
vendored
@@ -9,6 +9,7 @@ import {
|
||||
ResetObjectCacheTimestampsAction
|
||||
} from './object-cache.actions';
|
||||
import { Operation } from 'fast-json-patch';
|
||||
import { Item } from '../shared/item.model';
|
||||
|
||||
class NullAction extends RemoveFromObjectCacheAction {
|
||||
type = null;
|
||||
@@ -28,6 +29,7 @@ describe('objectCacheReducer', () => {
|
||||
const testState = {
|
||||
[selfLink1]: {
|
||||
data: {
|
||||
type: Item.type,
|
||||
self: selfLink1,
|
||||
foo: 'bar'
|
||||
},
|
||||
@@ -39,6 +41,7 @@ describe('objectCacheReducer', () => {
|
||||
},
|
||||
[selfLink2]: {
|
||||
data: {
|
||||
type: Item.type,
|
||||
self: requestUUID2,
|
||||
foo: 'baz'
|
||||
},
|
||||
@@ -67,7 +70,7 @@ describe('objectCacheReducer', () => {
|
||||
|
||||
it('should add the payload to the cache in response to an ADD action', () => {
|
||||
const state = Object.create(null);
|
||||
const objectToCache = { self: selfLink1 };
|
||||
const objectToCache = { self: selfLink1, type: Item.type };
|
||||
const timeAdded = new Date().getTime();
|
||||
const msToLive = 900000;
|
||||
const requestUUID = requestUUID1;
|
||||
@@ -80,7 +83,12 @@ describe('objectCacheReducer', () => {
|
||||
});
|
||||
|
||||
it('should overwrite an object in the cache in response to an ADD action if it already exists', () => {
|
||||
const objectToCache = { self: selfLink1, foo: 'baz', somethingElse: true };
|
||||
const objectToCache = {
|
||||
self: selfLink1,
|
||||
foo: 'baz',
|
||||
somethingElse: true,
|
||||
type: Item.type
|
||||
};
|
||||
const timeAdded = new Date().getTime();
|
||||
const msToLive = 900000;
|
||||
const requestUUID = requestUUID1;
|
||||
@@ -95,7 +103,7 @@ describe('objectCacheReducer', () => {
|
||||
|
||||
it('should perform the ADD action without affecting the previous state', () => {
|
||||
const state = Object.create(null);
|
||||
const objectToCache = { self: selfLink1 };
|
||||
const objectToCache = { self: selfLink1, type: Item.type };
|
||||
const timeAdded = new Date().getTime();
|
||||
const msToLive = 900000;
|
||||
const requestUUID = requestUUID1;
|
||||
|
9
src/app/core/cache/object-cache.reducer.ts
vendored
9
src/app/core/cache/object-cache.reducer.ts
vendored
@@ -32,15 +32,19 @@ export interface Patch {
|
||||
operations: Operation[];
|
||||
}
|
||||
|
||||
export abstract class TypedObject {
|
||||
static type: ResourceType;
|
||||
}
|
||||
|
||||
/* tslint:disable:max-classes-per-file */
|
||||
/**
|
||||
* An interface to represent objects that can be cached
|
||||
*
|
||||
* A cacheable object should have a self link
|
||||
*/
|
||||
export interface CacheableObject {
|
||||
export class CacheableObject extends TypedObject {
|
||||
uuid?: string;
|
||||
self: string;
|
||||
type?: ResourceType;
|
||||
// isNew: boolean;
|
||||
// dirtyType: DirtyType;
|
||||
// hasDirtyAttributes: boolean;
|
||||
@@ -59,6 +63,7 @@ export class ObjectCacheEntry implements CacheEntry {
|
||||
patches: Patch[] = [];
|
||||
isDirty: boolean;
|
||||
}
|
||||
/* tslint:enable:max-classes-per-file */
|
||||
|
||||
/**
|
||||
* The ObjectCache State
|
||||
|
@@ -10,13 +10,13 @@ import {
|
||||
RemoveFromObjectCacheAction
|
||||
} from './object-cache.actions';
|
||||
import { CoreState } from '../core.reducers';
|
||||
import { ResourceType } from '../shared/resource-type';
|
||||
import { NormalizedItem } from './models/normalized-item.model';
|
||||
import { first } from 'rxjs/operators';
|
||||
import { Operation } from 'fast-json-patch';
|
||||
import { RestRequestMethod } from '../data/rest-request-method';
|
||||
import { AddToSSBAction } from './server-sync-buffer.actions';
|
||||
import { Patch } from './object-cache.reducer';
|
||||
import { Item } from '../shared/item.model';
|
||||
|
||||
describe('ObjectCacheService', () => {
|
||||
let service: ObjectCacheService;
|
||||
@@ -28,7 +28,7 @@ describe('ObjectCacheService', () => {
|
||||
const msToLive = 900000;
|
||||
let objectToCache = {
|
||||
self: selfLink,
|
||||
type: ResourceType.Item
|
||||
type: Item.type
|
||||
};
|
||||
let cacheEntry;
|
||||
let invalidCacheEntry;
|
||||
@@ -37,7 +37,7 @@ describe('ObjectCacheService', () => {
|
||||
function init() {
|
||||
objectToCache = {
|
||||
self: selfLink,
|
||||
type: ResourceType.Item
|
||||
type: Item.type
|
||||
};
|
||||
cacheEntry = {
|
||||
data: objectToCache,
|
||||
|
4
src/app/core/cache/object-cache.service.ts
vendored
4
src/app/core/cache/object-cache.service.ts
vendored
@@ -10,7 +10,6 @@ import { coreSelector } from '../core.selectors';
|
||||
import { RestRequestMethod } from '../data/rest-request-method';
|
||||
import { selfLinkFromUuidSelector } from '../index/index.selectors';
|
||||
import { GenericConstructor } from '../shared/generic-constructor';
|
||||
import { NormalizedObjectFactory } from './models/normalized-object-factory';
|
||||
import { NormalizedObject } from './models/normalized-object.model';
|
||||
import {
|
||||
AddPatchObjectCacheAction,
|
||||
@@ -21,6 +20,7 @@ import {
|
||||
|
||||
import { CacheableObject, ObjectCacheEntry, ObjectCacheState } from './object-cache.reducer';
|
||||
import { AddToSSBAction } from './server-sync-buffer.actions';
|
||||
import { getMapsToType } from './builders/build-decorators';
|
||||
|
||||
/**
|
||||
* The base selector function to select the object cache in the store
|
||||
@@ -109,7 +109,7 @@ export class ObjectCacheService {
|
||||
}
|
||||
),
|
||||
map((entry: ObjectCacheEntry) => {
|
||||
const type: GenericConstructor<NormalizedObject<T>> = NormalizedObjectFactory.getConstructor(entry.data.type);
|
||||
const type: GenericConstructor<NormalizedObject<T>> = getMapsToType((entry.data as any).type);
|
||||
return Object.assign(new type(), entry.data) as NormalizedObject<T>
|
||||
})
|
||||
);
|
||||
|
4
src/app/core/cache/response.models.ts
vendored
4
src/app/core/cache/response.models.ts
vendored
@@ -8,12 +8,12 @@ import { IntegrationModel } from '../integration/models/integration.model';
|
||||
import { RegistryMetadataschemasResponse } from '../registry/registry-metadataschemas-response.model';
|
||||
import { RegistryMetadatafieldsResponse } from '../registry/registry-metadatafields-response.model';
|
||||
import { RegistryBitstreamformatsResponse } from '../registry/registry-bitstreamformats-response.model';
|
||||
import { MetadataSchema } from '../metadata/metadataschema.model';
|
||||
import { MetadataField } from '../metadata/metadatafield.model';
|
||||
import { PaginatedList } from '../data/paginated-list';
|
||||
import { SubmissionObject } from '../submission/models/submission-object.model';
|
||||
import { DSpaceObject } from '../shared/dspace-object.model';
|
||||
import { NormalizedAuthStatus } from '../auth/models/normalized-auth-status.model';
|
||||
import { MetadataSchema } from '../metadata/metadata-schema.model';
|
||||
import { MetadataField } from '../metadata/metadata-field.model';
|
||||
|
||||
/* tslint:disable:max-classes-per-file */
|
||||
export class RestResponse {
|
||||
|
@@ -8,8 +8,8 @@ import { Store } from '@ngrx/store';
|
||||
import { CoreState } from '../core.reducers';
|
||||
import { PaginatedList } from '../data/paginated-list';
|
||||
import { PageInfo } from '../shared/page-info.model';
|
||||
import { NormalizedSubmissionDefinitionsModel } from './models/normalized-config-submission-definitions.model';
|
||||
import { NormalizedSubmissionSectionModel } from './models/normalized-config-submission-section.model';
|
||||
import { NormalizedSubmissionDefinitionModel } from './models/normalized-config-submission-definition.model';
|
||||
|
||||
describe('ConfigResponseParsingService', () => {
|
||||
let service: ConfigResponseParsingService;
|
||||
@@ -173,7 +173,7 @@ describe('ConfigResponseParsingService', () => {
|
||||
self: 'https://rest.api/config/submissiondefinitions/traditional/sections'
|
||||
});
|
||||
const definitions =
|
||||
Object.assign(new NormalizedSubmissionDefinitionsModel(), {
|
||||
Object.assign(new NormalizedSubmissionDefinitionModel(), {
|
||||
isDefault: true,
|
||||
name: 'traditional',
|
||||
type: 'submissiondefinition',
|
||||
|
@@ -5,10 +5,8 @@ import { RestRequest } from '../data/request.models';
|
||||
import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model';
|
||||
import { ConfigSuccessResponse, ErrorResponse, RestResponse } from '../cache/response.models';
|
||||
import { isNotEmpty } from '../../shared/empty.util';
|
||||
import { ConfigObjectFactory } from './models/config-object-factory';
|
||||
|
||||
import { ConfigObject } from './models/config.model';
|
||||
import { ConfigType } from './models/config-type';
|
||||
import { BaseResponseParsingService } from '../data/base-response-parsing.service';
|
||||
import { GLOBAL_CONFIG } from '../../../config';
|
||||
import { GlobalConfig } from '../../../config/global-config.interface';
|
||||
@@ -16,8 +14,6 @@ import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
|
||||
@Injectable()
|
||||
export class ConfigResponseParsingService extends BaseResponseParsingService implements ResponseParsingService {
|
||||
|
||||
protected objectFactory = ConfigObjectFactory;
|
||||
protected toCache = false;
|
||||
|
||||
constructor(
|
||||
@@ -28,7 +24,7 @@ export class ConfigResponseParsingService extends BaseResponseParsingService imp
|
||||
|
||||
parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse {
|
||||
if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links) && (data.statusCode === 201 || data.statusCode === 200)) {
|
||||
const configDefinition = this.process<ConfigObject,ConfigType>(data.payload, request.uuid);
|
||||
const configDefinition = this.process<ConfigObject>(data.payload, request.uuid);
|
||||
return new ConfigSuccessResponse(configDefinition, data.statusCode, data.statusText, this.processPageInfo(data.payload));
|
||||
} else {
|
||||
return new ErrorResponse(
|
||||
|
@@ -1,36 +0,0 @@
|
||||
import { GenericConstructor } from '../../shared/generic-constructor';
|
||||
import { ConfigType } from './config-type';
|
||||
import { ConfigObject } from './config.model';
|
||||
import { NormalizedSubmissionDefinitionsModel } from './normalized-config-submission-definitions.model';
|
||||
import { NormalizedSubmissionFormsModel } from './normalized-config-submission-forms.model';
|
||||
import { NormalizedSubmissionSectionModel } from './normalized-config-submission-section.model';
|
||||
import { NormalizedSubmissionUploadsModel } from './normalized-config-submission-uploads.model';
|
||||
|
||||
/**
|
||||
* Class to return normalized models for config objects
|
||||
*/
|
||||
export class ConfigObjectFactory {
|
||||
public static getConstructor(type): GenericConstructor<ConfigObject> {
|
||||
switch (type) {
|
||||
case ConfigType.SubmissionDefinition:
|
||||
case ConfigType.SubmissionDefinitions: {
|
||||
return NormalizedSubmissionDefinitionsModel
|
||||
}
|
||||
case ConfigType.SubmissionForm:
|
||||
case ConfigType.SubmissionForms: {
|
||||
return NormalizedSubmissionFormsModel
|
||||
}
|
||||
case ConfigType.SubmissionSection:
|
||||
case ConfigType.SubmissionSections: {
|
||||
return NormalizedSubmissionSectionModel
|
||||
}
|
||||
case ConfigType.SubmissionUpload:
|
||||
case ConfigType.SubmissionUploads: {
|
||||
return NormalizedSubmissionUploadsModel
|
||||
}
|
||||
default: {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
import { ConfigObject } from './config.model';
|
||||
import { SubmissionSectionModel } from './config-submission-section.model';
|
||||
import { PaginatedList } from '../../data/paginated-list';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
/**
|
||||
* Class for the configuration describing the submission
|
||||
*/
|
||||
export class SubmissionDefinitionModel extends ConfigObject {
|
||||
static type = new ResourceType('submissiondefinition');
|
||||
|
||||
/**
|
||||
* A boolean representing if this submission definition is the default or not
|
||||
*/
|
||||
isDefault: boolean;
|
||||
|
||||
/**
|
||||
* A list of SubmissionSectionModel that are present in this submission definition
|
||||
*/
|
||||
sections: PaginatedList<SubmissionSectionModel>;
|
||||
|
||||
}
|
@@ -1,17 +1,7 @@
|
||||
import { ConfigObject } from './config.model';
|
||||
import { SubmissionSectionModel } from './config-submission-section.model';
|
||||
import { PaginatedList } from '../../data/paginated-list';
|
||||
import { SubmissionDefinitionModel } from './config-submission-definition.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
export class SubmissionDefinitionsModel extends ConfigObject {
|
||||
|
||||
/**
|
||||
* A boolean representing if this submission definition is the default or not
|
||||
*/
|
||||
isDefault: boolean;
|
||||
|
||||
/**
|
||||
* A list of SubmissionSectionModel that are present in this submission definition
|
||||
*/
|
||||
sections: PaginatedList<SubmissionSectionModel>;
|
||||
export class SubmissionDefinitionsModel extends SubmissionDefinitionModel {
|
||||
static type = new ResourceType('submissiondefinitions');
|
||||
|
||||
}
|
||||
|
22
src/app/core/config/models/config-submission-form.model.ts
Normal file
22
src/app/core/config/models/config-submission-form.model.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ConfigObject } from './config.model';
|
||||
import { FormFieldModel } from '../../../shared/form/builder/models/form-field.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
/**
|
||||
* An interface that define a form row and its properties.
|
||||
*/
|
||||
export interface FormRowModel {
|
||||
fields: FormFieldModel[];
|
||||
}
|
||||
|
||||
/**
|
||||
* A model class for a NormalizedObject.
|
||||
*/
|
||||
export class SubmissionFormModel extends ConfigObject {
|
||||
static type = new ResourceType('submissionform');
|
||||
|
||||
/**
|
||||
* An array of [FormRowModel] that are present in this form
|
||||
*/
|
||||
rows: FormRowModel[];
|
||||
}
|
@@ -1,20 +1,9 @@
|
||||
import { ConfigObject } from './config.model';
|
||||
import { FormFieldModel } from '../../../shared/form/builder/models/form-field.model';
|
||||
|
||||
/**
|
||||
* An interface that define a form row and its properties.
|
||||
*/
|
||||
export interface FormRowModel {
|
||||
fields: FormFieldModel[];
|
||||
}
|
||||
import { SubmissionFormModel } from './config-submission-form.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
/**
|
||||
* A model class for a NormalizedObject.
|
||||
*/
|
||||
export class SubmissionFormsModel extends ConfigObject {
|
||||
|
||||
/**
|
||||
* An array of [FormRowModel] that are present in this form
|
||||
*/
|
||||
rows: FormRowModel[];
|
||||
export class SubmissionFormsModel extends SubmissionFormModel {
|
||||
static type = new ResourceType('submissionforms');
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import { ConfigObject } from './config.model';
|
||||
import { SectionsType } from '../../../submission/sections/sections-type';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
/**
|
||||
* An interface that define section visibility and its properties.
|
||||
@@ -10,6 +11,7 @@ export interface SubmissionSectionVisibility {
|
||||
}
|
||||
|
||||
export class SubmissionSectionModel extends ConfigObject {
|
||||
static type = new ResourceType('submissionsection');
|
||||
|
||||
/**
|
||||
* The header for this section
|
||||
|
@@ -0,0 +1,6 @@
|
||||
import { SubmissionSectionModel } from './config-submission-section.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
export class SubmissionSectionsModel extends SubmissionSectionModel {
|
||||
static type = new ResourceType('submissionsections');
|
||||
}
|
@@ -1,9 +1,10 @@
|
||||
import { ConfigObject } from './config.model';
|
||||
import { AccessConditionOption } from './config-access-condition-option.model';
|
||||
import { SubmissionFormsModel } from './config-submission-forms.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
export class SubmissionUploadsModel extends ConfigObject {
|
||||
|
||||
static type = new ResourceType('submissionupload');
|
||||
/**
|
||||
* A list of available bitstream access conditions
|
||||
*/
|
||||
|
@@ -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.
|
||||
*/
|
||||
|
@@ -0,0 +1,28 @@
|
||||
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
|
||||
import { SubmissionSectionModel } from './config-submission-section.model';
|
||||
import { PaginatedList } from '../../data/paginated-list';
|
||||
import { NormalizedConfigObject } from './normalized-config.model';
|
||||
import { SubmissionDefinitionsModel } from './config-submission-definitions.model';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
import { SubmissionDefinitionModel } from './config-submission-definition.model';
|
||||
|
||||
/**
|
||||
* Normalized class for the configuration describing the submission
|
||||
*/
|
||||
@mapsTo(SubmissionDefinitionModel)
|
||||
@inheritSerialization(NormalizedConfigObject)
|
||||
export class NormalizedSubmissionDefinitionModel extends NormalizedConfigObject<SubmissionDefinitionModel> {
|
||||
|
||||
/**
|
||||
* A boolean representing if this submission definition is the default or not
|
||||
*/
|
||||
@autoserialize
|
||||
isDefault: boolean;
|
||||
|
||||
/**
|
||||
* A list of SubmissionSectionModel that are present in this submission definition
|
||||
*/
|
||||
@autoserializeAs(SubmissionSectionModel)
|
||||
sections: PaginatedList<SubmissionSectionModel>;
|
||||
|
||||
}
|
@@ -1,25 +1,13 @@
|
||||
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
|
||||
import { SubmissionSectionModel } from './config-submission-section.model';
|
||||
import { PaginatedList } from '../../data/paginated-list';
|
||||
import { inheritSerialization } from 'cerialize';
|
||||
import { NormalizedConfigObject } from './normalized-config.model';
|
||||
import { SubmissionDefinitionsModel } from './config-submission-definitions.model';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
import { NormalizedSubmissionDefinitionModel } from './normalized-config-submission-definition.model';
|
||||
|
||||
/**
|
||||
* Normalized class for the configuration describing the submission
|
||||
*/
|
||||
@mapsTo(SubmissionDefinitionsModel)
|
||||
@inheritSerialization(NormalizedConfigObject)
|
||||
export class NormalizedSubmissionDefinitionsModel extends NormalizedConfigObject<SubmissionDefinitionsModel> {
|
||||
|
||||
/**
|
||||
* A boolean representing if this submission definition is the default or not
|
||||
*/
|
||||
@autoserialize
|
||||
isDefault: boolean;
|
||||
|
||||
/**
|
||||
* A list of SubmissionSectionModel that are present in this submission definition
|
||||
*/
|
||||
@autoserializeAs(SubmissionSectionModel)
|
||||
sections: PaginatedList<SubmissionSectionModel>;
|
||||
|
||||
export class NormalizedSubmissionDefinitionsModel extends NormalizedSubmissionDefinitionModel {
|
||||
}
|
||||
|
@@ -0,0 +1,18 @@
|
||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { NormalizedConfigObject } from './normalized-config.model';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
import { FormRowModel, SubmissionFormModel } from './config-submission-form.model';
|
||||
|
||||
/**
|
||||
* Normalized class for the configuration describing the submission form
|
||||
*/
|
||||
@mapsTo(SubmissionFormModel)
|
||||
@inheritSerialization(NormalizedConfigObject)
|
||||
export class NormalizedSubmissionFormModel extends NormalizedConfigObject<SubmissionFormModel> {
|
||||
|
||||
/**
|
||||
* An array of [FormRowModel] that are present in this form
|
||||
*/
|
||||
@autoserialize
|
||||
rows: FormRowModel[];
|
||||
}
|
@@ -1,16 +1,12 @@
|
||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { NormalizedConfigObject } from './normalized-config.model';
|
||||
import { FormRowModel, SubmissionFormsModel } from './config-submission-forms.model';
|
||||
import { inheritSerialization } from 'cerialize';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
import { SubmissionFormsModel } from './config-submission-forms.model';
|
||||
import { NormalizedSubmissionFormModel } from './normalized-config-submission-form.model';
|
||||
|
||||
/**
|
||||
* Normalized class for the configuration describing the submission form
|
||||
*/
|
||||
@inheritSerialization(NormalizedConfigObject)
|
||||
export class NormalizedSubmissionFormsModel extends NormalizedConfigObject<SubmissionFormsModel> {
|
||||
|
||||
/**
|
||||
* An array of [FormRowModel] that are present in this form
|
||||
*/
|
||||
@autoserialize
|
||||
rows: FormRowModel[];
|
||||
@mapsTo(SubmissionFormsModel)
|
||||
@inheritSerialization(NormalizedSubmissionFormModel)
|
||||
export class NormalizedSubmissionFormsModel extends NormalizedSubmissionFormModel {
|
||||
}
|
||||
|
@@ -1,14 +1,18 @@
|
||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { SectionsType } from '../../../submission/sections/sections-type';
|
||||
import { NormalizedConfigObject } from './normalized-config.model';
|
||||
import { SubmissionFormsModel } from './config-submission-forms.model';
|
||||
import { SubmissionSectionVisibility } from './config-submission-section.model';
|
||||
import {
|
||||
SubmissionSectionModel,
|
||||
SubmissionSectionVisibility
|
||||
} from './config-submission-section.model';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
|
||||
/**
|
||||
* Normalized class for the configuration describing the submission section
|
||||
*/
|
||||
@mapsTo(SubmissionSectionModel)
|
||||
@inheritSerialization(NormalizedConfigObject)
|
||||
export class NormalizedSubmissionSectionModel extends NormalizedConfigObject<SubmissionFormsModel> {
|
||||
export class NormalizedSubmissionSectionModel extends NormalizedConfigObject<SubmissionSectionModel> {
|
||||
|
||||
/**
|
||||
* The header for this section
|
||||
|
@@ -0,0 +1,18 @@
|
||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { SectionsType } from '../../../submission/sections/sections-type';
|
||||
import { NormalizedConfigObject } from './normalized-config.model';
|
||||
import {
|
||||
SubmissionSectionModel,
|
||||
SubmissionSectionVisibility
|
||||
} from './config-submission-section.model';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
import { SubmissionSectionsModel } from './config-submission-sections.model';
|
||||
import { NormalizedSubmissionSectionModel } from './normalized-config-submission-section.model';
|
||||
|
||||
/**
|
||||
* Normalized class for the configuration describing the submission section
|
||||
*/
|
||||
@mapsTo(SubmissionSectionsModel)
|
||||
@inheritSerialization(NormalizedSubmissionSectionModel)
|
||||
export class NormalizedSubmissionSectionsModel extends NormalizedSubmissionSectionModel {
|
||||
}
|
@@ -3,10 +3,12 @@ import { AccessConditionOption } from './config-access-condition-option.model';
|
||||
import { SubmissionFormsModel } from './config-submission-forms.model';
|
||||
import { NormalizedConfigObject } from './normalized-config.model';
|
||||
import { SubmissionUploadsModel } from './config-submission-uploads.model';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
|
||||
/**
|
||||
* Normalized class for the configuration describing the submission upload section
|
||||
*/
|
||||
@mapsTo(SubmissionUploadsModel)
|
||||
@inheritSerialization(NormalizedConfigObject)
|
||||
export class NormalizedSubmissionUploadsModel extends NormalizedConfigObject<SubmissionUploadsModel> {
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user