-
- 0"class="uk-label custom-label label-software " title="Type">{{softwareInfo.types.join(", ")}}
+
+ 0"class="uk-label custom-label label-software " title="Type">{{softwareInfo.types.join(", ")}}
+ 0" class="uk-label custom-label label-progrLanguage " title="Programming Language">{{softwareInfo.programmingLanguages.join(", ")}}
0" class="uk-label custom-label label-language " title="Language">{{softwareInfo.languages.join(", ")}}
- {{softwareInfo.title.accessMode}}
+ 0" class="uk-label custom-label label-country " title="Country">{{softwareInfo.countries.join(", ")}}
+
+ {{softwareInfo.accessMode}}
diff --git a/landingPages/software/software.component.ts b/landingPages/software/software.component.ts
index d2ef8c80..a872c057 100644
--- a/landingPages/software/software.component.ts
+++ b/landingPages/software/software.component.ts
@@ -114,19 +114,25 @@ export class SoftwareComponent {
this.errorMessage=""
this.showLoading = true;
+ this.softwareInfo = null;
+
this.infoSub = this._softwareService.getSoftwareInfo(id, this.properties).subscribe(
data => {
this.softwareInfo = data;
- if(this.softwareInfo.title.name != undefined && this.softwareInfo.title.name!= ''){
+ /*if(this.softwareInfo.title.name != undefined && this.softwareInfo.title.name!= ''){
this.updateTitle(this.softwareInfo.title.name);
this.updateDescription("Software, search, repositories, open access,"+this.softwareInfo.title.name);
+ }*/
+ if(this.softwareInfo.title){
+ this.updateTitle(this.softwareInfo.title);
+ this.updateDescription("Software, search, repositories, open access,"+this.softwareInfo.title);
}
if( this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
- this.piwiksub = this._piwikService.trackView(this.properties, this.softwareInfo.title.name, this.piwikSiteId).subscribe();
+ this.piwiksub = this._piwikService.trackView(this.properties, this.softwareInfo.title/*.name*/, this.piwikSiteId).subscribe();
}
this.result = []
- this.result = {id: id, type :"software", source : "openaire", title: this.softwareInfo.title,url: '', result: '', accessRights: this.softwareInfo.title.accessMode, embargoEndDate: ''};
+ this.result = {id: id, type :"software", source : "openaire", title: this.softwareInfo.title,url: '', result: '', accessRights: /*this.softwareInfo.title.accessMode*/this.softwareInfo.accessMode, embargoEndDate: ''};
let relatedResearchResultsNum = 0;
if(this.softwareInfo.relatedResearchResults != undefined) {
diff --git a/landingPages/software/software.service.ts b/landingPages/software/software.service.ts
index 14d66270..f73bc27c 100644
--- a/landingPages/software/software.service.ts
+++ b/landingPages/software/software.service.ts
@@ -43,6 +43,8 @@ export class SoftwareService {
res[0],
res[1]['creator'],
res[1]['language'],
+ res[1]['country'],
+ res[1]['programmingLanguage'],
res[2]
]).map(res => this.parseSoftwareInfo(res));
}
@@ -56,7 +58,7 @@ export class SoftwareService {
parseSoftwareInfo (data: any):any {
this.softwareInfo = new SoftwareInfo();
- this.softwareInfo.record = data[12];
+ this.softwareInfo.record = data[14];
if(data[0] != null) {
var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer
this.softwareInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
@@ -69,6 +71,7 @@ export class SoftwareService {
}
this.softwareInfo.embargoEndDate = data[0].embargoenddate;
}
+ /*
this.softwareInfo.title = {"name": "", "url": "", "accessMode": ""};
if(data[0]['bestaccessright'] && data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
this.softwareInfo.title.accessMode = data[0]['bestaccessright'].classid;
@@ -80,6 +83,17 @@ export class SoftwareService {
this.softwareInfo.title['name'] = data[1].content;
}
}
+ */
+ if(data[0]['bestaccessright'] && data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
+ this.softwareInfo.accessMode = data[0]['bestaccessright'].classid;
+ }
+ if(data[1] != null) {
+ if(Array.isArray(data[1])) {
+ this.softwareInfo.title = data[1][0].content;
+ } else {
+ this.softwareInfo.title = data[1].content;
+ }
+ }
if(data[2] != null) {
let relation;
@@ -136,7 +150,7 @@ export class SoftwareService {
}
if(instance.hasOwnProperty("hostedby")) {
- counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.softwareInfo.hostedBy_collectedFrom, instance, data[0], url, counter, this.softwareInfo.title);
+ counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.softwareInfo.hostedBy_collectedFrom, instance, data[0], url, counter/*, this.softwareInfo.title*/, this.softwareInfo.accessMode);
}
}
}
@@ -157,7 +171,7 @@ export class SoftwareService {
// null argument is for journal
this.softwareInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
this.softwareInfo.hostedBy_collectedFrom, this.softwareInfo.publisher,
- null, this.softwareInfo.identifiers, this.softwareInfo.title);
+ null, this.softwareInfo.identifiers/*, this.softwareInfo.title*/);
if(data[8] != null) {
this.softwareInfo.contexts = this.parsingFunctions.parseContexts(data[8]);
@@ -196,6 +210,13 @@ export class SoftwareService {
if(data[11] != null) {
this.softwareInfo.languages = this.parsingFunctions.parseLanguages(data[11]);
}
+ if(data[12] != null) {
+ this.softwareInfo.countries = this.parsingFunctions.parseCountries(data[12]);
+ }
+
+ if(data[13] != null) {
+ this.softwareInfo.programmingLanguages = this.parsingFunctions.parseProgrammingLanguages(data[13]);
+ }
if(this.softwareInfo.relatedResearchResults) {
let self = this;
diff --git a/searchPages/searchUtils/searchResult.component.html b/searchPages/searchUtils/searchResult.component.html
index d9d3e777..267cffac 100644
--- a/searchPages/searchUtils/searchResult.component.html
+++ b/searchPages/searchUtils/searchResult.component.html
@@ -15,7 +15,9 @@
0" [class]="'uk-label custom-label label-blue label-'+result.entityType" title="Type">{{result.types.join(", ")}}
+ 0" class="uk-label custom-label label-progrLanguage " title="Programming Language">{{result.programmingLanguages.join(", ")}}
0" class="uk-label custom-label label-language " title="Language">{{result.languages.join(", ")}}
+ 0" class="uk-label custom-label label-country " title="Country">{{result.countriesForResults.join(", ")}}
{{result.title.accessMode}}