From c981cc28d9b482afc4ee8dd9fced989f9b71cdc4 Mon Sep 17 00:00:00 2001 From: annampak Date: Tue, 19 Dec 2017 18:50:00 +0200 Subject: [PATCH] dataset editor --- .../editor/dataset-editor.component.html | 10 +++++----- .../src/app/models/datasets/DatasetModel.ts | 4 ++-- .../src/app/models/registers/RegisterModel.ts | 12 ++++++++---- .../src/app/models/services/ServiceModel.ts | 14 +++++++++----- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/dmp-frontend/src/app/datasets_new/editor/dataset-editor.component.html b/dmp-frontend/src/app/datasets_new/editor/dataset-editor.component.html index 681d5ae3c..015a8a8da 100644 --- a/dmp-frontend/src/app/datasets_new/editor/dataset-editor.component.html +++ b/dmp-frontend/src/app/datasets_new/editor/dataset-editor.component.html @@ -73,7 +73,7 @@ -
{{chip.name.substring(0, 1).toUpperCase()}}
+
{{chip.label.substring(0, 1).toUpperCase()}}
{{chip.name}}
@@ -87,7 +87,7 @@ -
{{chip.name.substring(0, 1).toUpperCase()}}
+
{{chip.label.substring(0, 1).toUpperCase()}}
{{chip.name}}
@@ -99,9 +99,9 @@
- - - + + +
diff --git a/dmp-frontend/src/app/models/datasets/DatasetModel.ts b/dmp-frontend/src/app/models/datasets/DatasetModel.ts index ead91446e..37974a7f0 100644 --- a/dmp-frontend/src/app/models/datasets/DatasetModel.ts +++ b/dmp-frontend/src/app/models/datasets/DatasetModel.ts @@ -31,8 +31,8 @@ export class DatasetModel implements Serializable { this.status = item.status; this.description = item.description; this.services = new JsonSerializer().fromJSONArray(item.services, ServiceModel); - //this.registries = new JsonSerializer().fromJSONArray(item.registries, RegisterModel); - //this.dataRepositories = new JsonSerializer().fromJSONArray(item.dataRepositories, DataRepositoryModel); + this.registries = new JsonSerializer().fromJSONArray(item.registries, RegisterModel); + this.dataRepositories = new JsonSerializer().fromJSONArray(item.dataRepositories, DataRepositoryModel); return this; } diff --git a/dmp-frontend/src/app/models/registers/RegisterModel.ts b/dmp-frontend/src/app/models/registers/RegisterModel.ts index d96b53d6b..f52389330 100644 --- a/dmp-frontend/src/app/models/registers/RegisterModel.ts +++ b/dmp-frontend/src/app/models/registers/RegisterModel.ts @@ -1,15 +1,19 @@ import { Serializable } from "../Serializable"; export class RegisterModel implements Serializable { + public abbreviation: String; + public definition: String; public id: String; - public name: String; - public pid: String; + public label: String; + public reference: String; public uri: String; fromJSONObject(item: any): RegisterModel { + this.abbreviation = item.abbreviation; + this.definition = item.definition; this.id = item.id; - this.name = item.name; - this.pid = item.pid; + this.label = item.label; + this.reference = item.reference; this.uri = item.uri; return this; diff --git a/dmp-frontend/src/app/models/services/ServiceModel.ts b/dmp-frontend/src/app/models/services/ServiceModel.ts index c5ac08fd6..90f5a8194 100644 --- a/dmp-frontend/src/app/models/services/ServiceModel.ts +++ b/dmp-frontend/src/app/models/services/ServiceModel.ts @@ -2,16 +2,20 @@ import { Serializable } from "../Serializable"; export class ServiceModel implements Serializable { public id: String; - public name: String; - public pid: String; + public abbreviation: String; + public definition: String; public uri: String; + public label: String; + public reference: String; fromJSONObject(item: any): ServiceModel { this.id = item.id; - this.name = item.name; - this.pid = item.pid; + this.abbreviation = item.abbreviation; + this.definition = item.definition; this.uri = item.uri; + this.label = item.label; + this.reference = item.reference; return this; } -} \ No newline at end of file +}