diff --git a/portal-2/src/app/deposit/depositDatasets.component.ts b/portal-2/src/app/deposit/depositDatasets.component.ts new file mode 100644 index 00000000..f26e3a7e --- /dev/null +++ b/portal-2/src/app/deposit/depositDatasets.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'deposit-datasets', + template: ` + + ` +}) + +export class DepositDatasetsComponent { + +} diff --git a/portal-2/src/app/deposit/depositDatasetsResult.component.ts b/portal-2/src/app/deposit/depositDatasetsResult.component.ts new file mode 100644 index 00000000..4de7ffce --- /dev/null +++ b/portal-2/src/app/deposit/depositDatasetsResult.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'deposit-datasets-result', + template: ` + + ` +}) + +export class DepositDatasetsResultComponent { + +} diff --git a/portal-2/src/app/deposit/depositPublications.component.ts b/portal-2/src/app/deposit/depositPublications.component.ts new file mode 100644 index 00000000..6612e6ee --- /dev/null +++ b/portal-2/src/app/deposit/depositPublications.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'deposit-publications', + template: ` + + ` +}) + +export class DepositPublicationsComponent { + +} diff --git a/portal-2/src/app/deposit/depositPublicationsResult.component.ts b/portal-2/src/app/deposit/depositPublicationsResult.component.ts new file mode 100644 index 00000000..2fc51f23 --- /dev/null +++ b/portal-2/src/app/deposit/depositPublicationsResult.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'deposit-publications-result', + template: ` + + ` +}) + +export class DepositPublicationsResultComponent { + +} diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.html b/portal-2/src/app/landingPages/dataset/dataset.component.html index af501b8c..6a309b04 100644 --- a/portal-2/src/app/landingPages/dataset/dataset.component.html +++ b/portal-2/src/app/landingPages/dataset/dataset.component.html @@ -24,7 +24,10 @@
{{datasetInfo.embargoEndDate}}
- + +
diff --git a/portal-2/src/app/services/dataset.service.ts b/portal-2/src/app/services/dataset.service.ts index ba9ed851..8d7937ed 100644 --- a/portal-2/src/app/services/dataset.service.ts +++ b/portal-2/src/app/services/dataset.service.ts @@ -349,26 +349,40 @@ export class DatasetService { } if(data[5] != null) { - this.datasetInfo.classifiedSubjects = new Map(); - this.datasetInfo.subjects = new Array(); - let mydata; - let length = data[5].length!=undefined ? data[5].length : 1; + let length = data[7].length!=undefined ? data[5].length : 1; for(let i=0; i 1 ? data[5][i] : data[5]; if(mydata.classid != "") { if(mydata.inferred == true) { - if(!this.datasetInfo.classifiedSubjects.has(mydata.classid)) { - this.datasetInfo.classifiedSubjects.set(mydata.classid, new Array()); + if(this.datasetInfo.classifiedSubjects == undefined) { + this.datasetInfo.classifiedSubjects = new Map(); } - let counter = this.datasetInfo.classifiedSubjects.get(mydata.classid).length; - this.datasetInfo.classifiedSubjects.get(mydata.classid)[counter] = mydata.content; + if(!this.datasetInfo.classifiedSubjects.has(mydata.classname)) { + this.datasetInfo.classifiedSubjects.set(mydata.classname, new Array()); + } + + this.datasetInfo.classifiedSubjects.get(mydata.classname).push(mydata.content); } else { - let counter = this.datasetInfo.subjects.length; - this.datasetInfo.subjects[counter] = mydata.content; + if(mydata.classid == "keyword") { + if(this.datasetInfo.subjects == undefined) { + this.datasetInfo.subjects = new Array(); + } + + this.datasetInfo.subjects.push(mydata.content); + } else { + if(this.datasetInfo.otherSubjects == undefined) { + this.datasetInfo.otherSubjects = new Map(); + } + + if(!this.datasetInfo.otherSubjects.has(mydata.classname)) { + this.datasetInfo.otherSubjects.set(mydata.classname, new Array()); + } + this.datasetInfo.otherSubjects.get(mydata.classname).push(mydata.content); + } } } } diff --git a/portal-2/src/app/services/publication.service.ts b/portal-2/src/app/services/publication.service.ts index 5359de32..a54ff99f 100644 --- a/portal-2/src/app/services/publication.service.ts +++ b/portal-2/src/app/services/publication.service.ts @@ -424,8 +424,7 @@ export class PublicationService { this.publicationInfo.subjects = new Array(); } - let counter = this.publicationInfo.subjects.length; - this.publicationInfo.subjects[counter] = mydata.content; + this.publicationInfo.subjects.push(mydata.content); } else { if(this.publicationInfo.otherSubjects == undefined) { this.publicationInfo.otherSubjects = new Map(); diff --git a/portal-2/src/app/utils/entities/datasetInfo.ts b/portal-2/src/app/utils/entities/datasetInfo.ts index 588db258..a731177a 100644 --- a/portal-2/src/app/utils/entities/datasetInfo.ts +++ b/portal-2/src/app/utils/entities/datasetInfo.ts @@ -9,6 +9,7 @@ export class DatasetInfo { identifiers: Map; publisher: string; subjects: string[]; + otherSubjects: Map; classifiedSubjects: Map; description: string; bestlicense: string; @@ -16,10 +17,6 @@ export class DatasetInfo { fundedByProjects: { "url": string, "acronym": string, "title": string, "funderShortname": string, "funderName": string, "funding": string, "inline": boolean}[]; - //relatedPublications: { "name": string, "url": string, "date": string, "trust": string}[]; - //relatedResearchData: { "name": string, "url": string, "date": string, "trust": string}[]; - //similarPublications: { "name": string, "url": string, "date": string, "trust": string}[]; - //similarDatasets: { "name": string, "url": string, "date": string, "trust": string}[]; relatedResearchResults: { "name": string, "url": string, "date": string, "trust": string, "class": string}[]; similarResearchResults: {"name": string, "url": string, "date": string, "trust": string, "class": string}[]; contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];