diff --git a/portal-4cli/src/app/landingPages/dataset/dataset.component.html b/portal-4cli/src/app/landingPages/dataset/dataset.component.html index f57fd87a..777ae464 100644 --- a/portal-4cli/src/app/landingPages/dataset/dataset.component.html +++ b/portal-4cli/src/app/landingPages/dataset/dataset.component.html @@ -194,54 +194,8 @@ {{key}} @@ -490,9 +488,13 @@ - -
  • +
  • --> + + +
  • +
  • @@ -573,30 +575,6 @@
  • -
  • -
    -
    Collected from
    -
    - - - {{item['name']}} - -
    -
    - - View less - -
    -
    ...
    -
    - - View more - -
    -
    -
  • - diff --git a/portal-4cli/src/app/landingPages/publication/publication.service.ts b/portal-4cli/src/app/landingPages/publication/publication.service.ts index bf270bc6..8ed46050 100644 --- a/portal-4cli/src/app/landingPages/publication/publication.service.ts +++ b/portal-4cli/src/app/landingPages/publication/publication.service.ts @@ -90,14 +90,7 @@ export class PublicationService { for(let i=0; i(); - // } - // - // this.publicationInfo.authors[relation.ranking-1] = {"name": "", "id": ""}; - // this.publicationInfo.authors[relation.ranking-1]['name'] = relation.fullname; - /*} else*/ if(relation['to'].class == "isProducedBy") { + if(relation['to'].class == "isProducedBy") { this.publicationInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.publicationInfo.fundedByProjects, relation, this.publicationInfo.projectsProvenanceVocabulary); } else if(relation['to'].class == "isRelatedTo") { let provenanceAction: string; @@ -119,8 +112,13 @@ export class PublicationService { if(data[3] != null) { if(data[3].hasOwnProperty("instance")) { - this.publicationInfo.downloadFrom = new Map(); - this.publicationInfo.publishedIn = new Map(); + //this.publicationInfo.collectedFrom = new Array<{"name": string, "id": string}>(); + //this.publicationInfo.downloadFrom = new Map(); + //this.publicationInfo.publishedIn = new Map(); + + + this.publicationInfo.hostedBy_collectedFrom = new Array<{"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string}>(); + this.publicationInfo.types = new Array(); let types = new Set(); @@ -143,28 +141,11 @@ export class PublicationService { url = instance['webresource'][0].url; } - if(instance.hasOwnProperty("collectedfrom")) { - this.publicationInfo.collectedFrom = this.parsingFunctions.parseCollectedFrom(instance['collectedfrom']); - } - + /**********************************************************/ if(instance.hasOwnProperty("hostedby")) { - if(instance['hostedby'].name != "other resources" && instance['hostedby'].name != "Unknown Repository") { - this.parsingFunctions.parseDownloadFrom(this.publicationInfo.downloadFrom, instance, url); - } else { - counter = this.parsingFunctions.parsePublishedIn(this.publicationInfo.publishedIn, instance, data[0], url, counter); - } - - if(this.publicationInfo.title != undefined) { - if(!this.publicationInfo.title['url']) { - this.publicationInfo.title['url'] = url; - } - - if(this.parsingFunctions.changeBestAccessMode(this.publicationInfo.title['accessMode'], instance['licence'])) { - this.publicationInfo.title['accessMode'] = instance['licence'].classid; - this.publicationInfo.title['url'] = url; - } - } + counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.publicationInfo.hostedBy_collectedFrom, instance, data[0], url, counter, this.publicationInfo.title); } + /**********************************************************/ } } } @@ -219,8 +200,8 @@ export class PublicationService { // this.publicationInfo.collectedFrom = this.parsingFunctions.parseCollectedFrom(data[9]); // } - this.publicationInfo.downloadFrom = this.parsingFunctions.addPublisherToDownloadFrom( - this.publicationInfo.downloadFrom, this.publicationInfo.publisher, + this.publicationInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom( + this.publicationInfo.hostedBy_collectedFrom, this.publicationInfo.publisher, this.publicationInfo.journal, this.publicationInfo.identifiers, this.publicationInfo.title); diff --git a/portal-4cli/src/app/landingPages/software/software.component.html b/portal-4cli/src/app/landingPages/software/software.component.html index 183f5673..a5371832 100644 --- a/portal-4cli/src/app/landingPages/software/software.component.html +++ b/portal-4cli/src/app/landingPages/software/software.component.html @@ -196,54 +196,8 @@ -
  • -
    -
    Collected from
    -
    - - - {{item['name']}} - -
    -
    - - View less - -
    -
    ...
    -
    - - View more - -
    -
    -
  • - - diff --git a/portal-4cli/src/app/landingPages/software/software.service.ts b/portal-4cli/src/app/landingPages/software/software.service.ts index 4941d4a2..c0fc5806 100644 --- a/portal-4cli/src/app/landingPages/software/software.service.ts +++ b/portal-4cli/src/app/landingPages/software/software.service.ts @@ -107,8 +107,10 @@ export class SoftwareService { if(data[3] != null) { if(data[3].hasOwnProperty("instance")) { - this.softwareInfo.downloadFrom = new Map(); - this.softwareInfo.publishedIn = new Map() + this.softwareInfo.hostedBy_collectedFrom = new Array<{ "downloadName": string, "downloadUrl": string[], + "collectedName": string, "collectedId": string, + "accessMode": string[], "bestAccessMode": string, + "type": string, "year":string}>(); this.softwareInfo.types = new Array(); let types = new Set(); @@ -131,26 +133,8 @@ export class SoftwareService { url = instance['webresource'][0].url; } - if(instance.hasOwnProperty("collectedfrom")) { - this.softwareInfo.collectedFrom = this.parsingFunctions.parseCollectedFrom(instance['collectedfrom']); - } - if(instance.hasOwnProperty("hostedby")) { - if(instance['hostedby'].name != "other resources" && instance['hostedby'].name != "Unknown Repository") { - this.parsingFunctions.parseDownloadFrom(this.softwareInfo.downloadFrom, instance, url); - } else { - counter = this.parsingFunctions.parsePublishedIn(this.softwareInfo.publishedIn, instance, data[0], url, counter); - } - if(this.softwareInfo.title != undefined) { - if(!this.softwareInfo.title['url']) { - this.softwareInfo.title['url'] = url; - } - - if(this.parsingFunctions.changeBestAccessMode(this.softwareInfo.title['accessMode'], instance['licence'])) { - this.softwareInfo.title['accessMode'] = instance['licence'].classid; - this.softwareInfo.title['url'] = url; - } - } + counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.softwareInfo.hostedBy_collectedFrom, instance, data[0], url, counter, this.softwareInfo.title); } } } @@ -168,17 +152,9 @@ export class SoftwareService { this.softwareInfo.classifiedSubjects = subjectResults[2]; } - // if(data[6] != null) { - // this.softwareInfo.bestaccessright = data[6].classid; - // } - - // if(data[7] != null) { - // this.softwareInfo.collectedFrom = this.parsingFunctions.parseCollectedFrom(data[7]); - // } - // null argument is for journal - this.softwareInfo.downloadFrom = this.parsingFunctions.addPublisherToDownloadFrom( - this.softwareInfo.downloadFrom, this.softwareInfo.publisher, + this.softwareInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom( + this.softwareInfo.hostedBy_collectedFrom, this.softwareInfo.publisher, null, this.softwareInfo.identifiers, this.softwareInfo.title); if(data[8] != null) { diff --git a/portal-4cli/src/app/utils/entities/datasetInfo.ts b/portal-4cli/src/app/utils/entities/datasetInfo.ts index df760975..1f32fa75 100644 --- a/portal-4cli/src/app/utils/entities/datasetInfo.ts +++ b/portal-4cli/src/app/utils/entities/datasetInfo.ts @@ -6,16 +6,16 @@ export class DatasetInfo { dateofacceptance: string; embargoEndDate: string; types: string[]; - downloadFrom: Map; //key is name - publishedIn: Map; //key is name + hostedBy_collectedFrom: { "downloadName": string, "downloadUrl": string[], + "collectedName": string, "collectedId": string, + "accessMode": string[], "bestAccessMode": string, + "type": string, "year":string}[]; identifiers: Map; publisher: string; subjects: string[]; otherSubjects: Map; classifiedSubjects: Map; description: string; - //bestaccessright: string; - collectedFrom: { "name": string, "id": string}[]; projectsProvenanceVocabulary: { "sysimport:crosswalk:repository": string, "sysimport:crosswalk:entityregistry": string, "sysimport:crosswalk:datasetarchive": string, diff --git a/portal-4cli/src/app/utils/entities/publicationInfo.ts b/portal-4cli/src/app/utils/entities/publicationInfo.ts index a5278415..81aef56e 100644 --- a/portal-4cli/src/app/utils/entities/publicationInfo.ts +++ b/portal-4cli/src/app/utils/entities/publicationInfo.ts @@ -6,10 +6,10 @@ export class PublicationInfo { dateofacceptance: string; embargoEndDate: string; types: string[]; - downloadFrom: Map; //key is name - publishedIn: Map; //key is name + //downloadFrom: Map; //key is name + //publishedIn: Map; //key is name - downloadAndCollectedFrom: {"downloadName":string, "url": string[], "downloadAccessMode": string[], "bestAccessMode": string, "collectedName": string, "id": string}[]; + hostedBy_collectedFrom: {"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string}[]; identifiers: Map; //key is the classname publisher: string; @@ -20,7 +20,7 @@ export class PublicationInfo { classifiedSubjects: Map; // description: string; //bestaccessright: string; - collectedFrom: { "name": string, "id": string}[]; + //collectedFrom: { "name": string, "id": string}[]; projectsProvenanceVocabulary: { "sysimport:crosswalk:repository": string, "sysimport:crosswalk:entityregistry": string, "sysimport:crosswalk:datasetarchive": string, diff --git a/portal-4cli/src/app/utils/entities/softwareInfo.ts b/portal-4cli/src/app/utils/entities/softwareInfo.ts index d3014bde..1e4b90f0 100644 --- a/portal-4cli/src/app/utils/entities/softwareInfo.ts +++ b/portal-4cli/src/app/utils/entities/softwareInfo.ts @@ -6,16 +6,16 @@ export class SoftwareInfo { dateofacceptance: string; embargoEndDate: string; types: string[]; - downloadFrom: Map; //key is name - publishedIn: Map; //key is name + hostedBy_collectedFrom: { "downloadName": string, "downloadUrl": string[], + "collectedName": string, "collectedId": string, + "accessMode": string[], "bestAccessMode": string, + "type": string, "year":string}[]; identifiers: Map; publisher: string; subjects: string[]; otherSubjects: Map; classifiedSubjects: Map; description: string; - //bestaccessright: string; - collectedFrom: { "name": string, "id": string}[]; projectsProvenanceVocabulary: { "sysimport:crosswalk:repository": string, "sysimport:crosswalk:entityregistry": string, "sysimport:crosswalk:datasetarchive": string,