diff --git a/portal-2/src/app/landingPages/person/person.component.ts b/portal-2/src/app/landingPages/person/person.component.ts
index 95eda751..8ff38aaf 100644
--- a/portal-2/src/app/landingPages/person/person.component.ts
+++ b/portal-2/src/app/landingPages/person/person.component.ts
@@ -102,6 +102,7 @@ export class PersonComponent {
this.personInfo = data;
},
err => {
+
console.log(err)
console.info("error");
diff --git a/portal-2/src/app/landingPages/project/project.component.html b/portal-2/src/app/landingPages/project/project.component.html
index 89bf28da..afe39d58 100644
--- a/portal-2/src/app/landingPages/project/project.component.html
+++ b/portal-2/src/app/landingPages/project/project.component.html
@@ -2,7 +2,8 @@
diff --git a/portal-2/src/app/landingPages/project/project.component.ts b/portal-2/src/app/landingPages/project/project.component.ts
index 47ce1be3..a9f1ff27 100644
--- a/portal-2/src/app/landingPages/project/project.component.ts
+++ b/portal-2/src/app/landingPages/project/project.component.ts
@@ -23,6 +23,8 @@ export class ProjectComponent{
private projectId : string ;
public projectInfo: ProjectInfo;
private metrics: string;
+ private metricsClicked: boolean;
+ private viewsFrameUrl: string;
private project ;
@@ -53,6 +55,8 @@ export class ProjectComponent{
}
ngOnInit() {
+ this.metricsClicked = false;
+
this.sub = this.route.queryParams.subscribe(params => {
this.projectId = params['projectId'];
console.info("Id is :"+this.projectId);
@@ -126,6 +130,10 @@ export class ProjectComponent{
}
getMetrics() {
+ this.metricsClicked = true;
+ let projectName: string = (this.projectInfo.acronym != undefined && this.projectInfo.acronym != '') ? this.projectInfo.acronym : this.projectInfo.title;
+ this.viewsFrameUrl = ('http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"project_stats_monthly","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Number of views for project '+projectName+'","yaxisheaders":["sum of views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"id","values":["'+this.projectId+'"],"to":"-1"}]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true');
+
console.info("getProjectMetrics: component");
this._projectService.getMetrics(this.projectId).subscribe(
data => {
diff --git a/portal-2/src/app/landingPages/publication/publication.component.html b/portal-2/src/app/landingPages/publication/publication.component.html
index 6dcb5c12..aeeb8966 100644
--- a/portal-2/src/app/landingPages/publication/publication.component.html
+++ b/portal-2/src/app/landingPages/publication/publication.component.html
@@ -257,6 +257,8 @@
+
+
@@ -330,7 +332,7 @@
- 0">
+ 0">
- Published in
-
@@ -411,7 +413,7 @@
- - Related to
+ - Related to
-
{{item['labelContext']}}
diff --git a/portal-2/src/app/landingPages/publication/publication.component.ts b/portal-2/src/app/landingPages/publication/publication.component.ts
index 1a0853ef..4f623ea5 100644
--- a/portal-2/src/app/landingPages/publication/publication.component.ts
+++ b/portal-2/src/app/landingPages/publication/publication.component.ts
@@ -24,6 +24,8 @@ export class PublicationComponent {
constructor (private _publicationService: PublicationService, private route: ActivatedRoute) {
}
ngOnInit() {
+ this.metricsClicked = false;
+
this.sub = this.route.queryParams.subscribe(data => {
this.articleId = data['articleId'];
console.info("Article id is :"+this.articleId);
@@ -48,6 +50,9 @@ ngAfterContentInit() {
articleId: string;
public publicationInfo: PublicationInfo;
private metrics: Metrics;
+ private metricsClicked: boolean;
+ private viewsFrameUrl: string;
+ private openaireViewsFrameUrl: string;
public showAllReferences: boolean = false;
public showAllRelResData: boolean = false;
@@ -106,6 +111,10 @@ ngAfterContentInit() {
}
getMetrics() {
+ this.metricsClicked = true;
+ //this.viewsFrameUrl = 'http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"result_stats_monthly","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":0,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Number of views for '+this.publicationInfo.title.name+'","yaxisheaders":["sum of views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"result_stats_monthly(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
+ this.openaireViewsFrameUrl = 'http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"result_stats_monthly_charts","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"result_stats_monthly_charts(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]},{"table":"repo_view_stats_monthly_charts","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"repo_view_stats_monthly_charts(source)-(piwik_id)datasource_piwik(openaire_id)-(id)datasource-name","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":0,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"repo_view_stats_monthly_charts(id)-(orid)result_oids(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
+
console.info("getPublicationMetrics: component");
this._publicationService.getMetrics(this.articleId).subscribe(
data => {
diff --git a/portal-2/src/app/services/project.service.ts b/portal-2/src/app/services/project.service.ts
index b1db6673..a9495dc5 100644
--- a/portal-2/src/app/services/project.service.ts
+++ b/portal-2/src/app/services/project.service.ts
@@ -64,9 +64,10 @@ export class ProjectService {
}
return this.http.get(url)
.map(res => res.json())
- .map(res => [res['result']['metadata']['oaf:entity']['oaf:project'],
- res['result']['metadata']['oaf:entity']['oaf:project']['fundingtree'],
- res['result']['metadata']['oaf:entity']['oaf:project']['rels']['rel']])
+ .map(res => res['result']['metadata']['oaf:entity']['oaf:project'])
+ .map(res => [res,
+ res['fundingtree'],
+ res['rels']['rel']])
.do(res => {
this._cache.set(key, res);
})
diff --git a/portal-2/src/app/services/publication.service.ts b/portal-2/src/app/services/publication.service.ts
index e731d4b3..c1c1e831 100644
--- a/portal-2/src/app/services/publication.service.ts
+++ b/portal-2/src/app/services/publication.service.ts
@@ -21,7 +21,7 @@ export class PublicationService {
let url = OpenaireProperties. getSearchAPIURLLast() + 'publications/' +id+"?format=json";
let key = url;
if (this._cache.has(key)) {
- return Observable.of(this._cache.get(key)).map(res => this.parsePublicationInfo(res))
+ return Observable.of(this._cache.get(key)).map(res => this.parsePublicationInfo(res));
}
return this.http.get(url)
.map(res => res.json())
@@ -140,22 +140,22 @@ export class PublicationService {
}
if(data[2] != null) {
- let mydata;
+ let relation;
let counter = 0;
- let length = data[2].length!=undefined ? data[2].length : 1;
+ let length = Array.isArray(data[2]) ? data[2].length : 1;
for(let i=0; i();
}
- this.publicationInfo.authors[mydata.ranking-1] = {"name": "", "url": ""};
- this.publicationInfo.authors[mydata.ranking-1]['name'] = mydata.fullname;
- this.publicationInfo.authors[mydata.ranking-1]['url'] = OpenaireProperties.getsearchLinkToPerson() +mydata['to'].content;
- } else if(mydata['to'].class == "isProducedBy") {
+ this.publicationInfo.authors[relation.ranking-1] = {"name": "", "url": ""};
+ this.publicationInfo.authors[relation.ranking-1]['name'] = relation.fullname;
+ this.publicationInfo.authors[relation.ranking-1]['url'] = OpenaireProperties.getsearchLinkToPerson() + relation['to'].content;
+ } else if(relation['to'].class == "isProducedBy") {
if(this.publicationInfo.fundedByProjects == undefined) {
this.publicationInfo.fundedByProjects = new Array<
{ "url": string, "acronym": string, "title": string,
@@ -173,29 +173,29 @@ export class PublicationService {
}
this.publicationInfo.fundedByProjects[counter]['url'] =
- OpenaireProperties.getsearchLinkToProject() + mydata['to'].content;
- this.publicationInfo.fundedByProjects[counter]['acronym'] = mydata.acronym;
- this.publicationInfo.fundedByProjects[counter]['title'] = mydata.title;
- this.publicationInfo.fundedByProjects[counter]['code'] = mydata.code;
+ OpenaireProperties.getsearchLinkToProject() + relation['to'].content;
+ this.publicationInfo.fundedByProjects[counter]['acronym'] = relation.acronym;
+ this.publicationInfo.fundedByProjects[counter]['title'] = relation.title;
+ this.publicationInfo.fundedByProjects[counter]['code'] = relation.code;
- if(mydata.hasOwnProperty("funding")) {
- let length1 = Array.isArray(mydata['funding']) ? mydata['funding'].length : 1;
+ if(relation.hasOwnProperty("funding")) {
+ let length1 = Array.isArray(relation['funding']) ? relation['funding'].length : 1;
for(let j=0; j();
- let length = data[3]['instance'].length!=undefined ? data[3]['instance'].length : 1;
+ let length = Array.isArray(data[3]['instance']) ? data[3]['instance'].length : 1;
let types = new Set();
let counter = 0;
let counter1 = 0;
let counter2 = 0;
- let mydata;
+ let instance;
for(let i=0; i();
+ if(this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'] == null) {
+ this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'] = new Array();
}
- counter2 = this.publicationInfo.downloadFrom.get(mydata['hostedby'].name)['url'].length;
- this.publicationInfo.downloadFrom.get(mydata['hostedby'].name)['url'][counter2] = url;
+ counter2 = this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'].length;
+ this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'][counter2] = url;
- if(this.publicationInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'] == null) {
- this.publicationInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'] = new Array();
+ if(this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'] == null) {
+ this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'] = new Array();
}
- if(mydata.hasOwnProperty("licence")) {
- this.publicationInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'][counter2] = mydata['licence'].classid;
+ if(instance.hasOwnProperty("licence")) {
+ this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'][counter2] = instance['licence'].classid;
} else {
- this.publicationInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'][counter2] = "";
+ this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'][counter2] = "";
}
} else {
if(data[0] != null && data[0].hasOwnProperty("source")) {
@@ -344,15 +344,14 @@ export class PublicationService {
this.publicationInfo.publishedIn.get(key)['url'] = new Array();
}
- counter2 = this.publicationInfo.publishedIn.get(key)['url'].length;
- this.publicationInfo.publishedIn.get(key)['url'][counter2] = url;
+ this.publicationInfo.publishedIn.get(key)['url'].push(url);
if(this.publicationInfo.publishedIn.get(key)['accessMode'] == null) {
this.publicationInfo.publishedIn.get(key)['accessMode'] = new Array();
}
- if(mydata.hasOwnProperty("licence")) {
- this.publicationInfo.publishedIn.get(key)['accessMode'][counter2] = mydata['licence'].classid;
+ if(instance.hasOwnProperty("licence")) {
+ this.publicationInfo.publishedIn.get(key)['accessMode'][counter2] = instance['licence'].classid;
} else {
this.publicationInfo.publishedIn.get(key)['accessMode'][counter2] = "";
}
@@ -366,27 +365,27 @@ export class PublicationService {
switch (this.publicationInfo.title['accessMode']) {
case undefined:
- this.publicationInfo.title['accessMode'] = mydata['accessMode'].classid;
+ this.publicationInfo.title['accessMode'] = instance['accessMode'].classid;
this.publicationInfo.title['url'] = url;
break;
case "CLOSED":
- if(mydata['licence'].classid == "OPEN" ||
- mydata['licence'].classid == "EMBARGO" ||
- mydata['licence'].classid == "RESTRICTED") {
- this.publicationInfo.title['accessMode'] = mydata['licence'].classid;
+ if(instance['licence'].classid == "OPEN" ||
+ instance['licence'].classid == "EMBARGO" ||
+ instance['licence'].classid == "RESTRICTED") {
+ this.publicationInfo.title['accessMode'] = instance['licence'].classid;
this.publicationInfo.title['url'] = url;
}
break;
case "RESTRICTED":
- if(mydata['licence'].classid == "OPEN" ||
- mydata['licence'].classid == "EMBARGO") {
- this.publicationInfo.title['accessMode'] = mydata['licence'].classid;
+ if(instance['licence'].classid == "OPEN" ||
+ instance['licence'].classid == "EMBARGO") {
+ this.publicationInfo.title['accessMode'] = instance['licence'].classid;
this.publicationInfo.title['url'] = url;
}
break;
case "EMBARGO":
- if(mydata['licence'].classid == "OPEN") {
- this.publicationInfo.title['accessMode'] = mydata['licence'].classid;
+ if(instance['licence'].classid == "OPEN") {
+ this.publicationInfo.title['accessMode'] = instance['licence'].classid;
this.publicationInfo.title['url'] = url;
}
break;
@@ -400,29 +399,29 @@ export class PublicationService {
if(data[3].hasOwnProperty("externalreference")) {
let length = Array.isArray(data[3]['externalreference']) ? data[3]['externalreference'].length : 1;
- let mydata;
+ let externalreference;
for(let i=0; i>();
}
- if(!this.publicationInfo.bioentities.has(mydata.sitename)) {
- this.publicationInfo.bioentities.set(mydata.sitename, new Map());
+ if(!this.publicationInfo.bioentities.has(externalreference.sitename)) {
+ this.publicationInfo.bioentities.set(externalreference.sitename, new Map());
}
- this.publicationInfo.bioentities.get(mydata.sitename).set(mydata.refidentifier, mydata.url);
+ this.publicationInfo.bioentities.get(externalreference.sitename).set(externalreference.refidentifier, externalreference.url);
- } else if(mydata['qualifier'].classid == "software") {
+ } else if(externalreference['qualifier'].classid == "software") {
if(this.publicationInfo.software == undefined) {
this.publicationInfo.software = new Array<{"name": string, "url": string}>();
}
- this.publicationInfo.software.push({"name": mydata.sitename, "url": mydata.url});
+ this.publicationInfo.software.push({"name": externalreference.sitename, "url": externalreference.url});
}
}
}
@@ -430,7 +429,6 @@ export class PublicationService {
}
if(data[4] != null) {
- let counter = 0;
this.publicationInfo.identifiers = new Map();
if(data[4].hasOwnProperty("classname") && data[4]['classname'] != "") {
@@ -438,8 +436,7 @@ export class PublicationService {
if(!this.publicationInfo.identifiers.has(data[4].classname)) {
this.publicationInfo.identifiers.set(data[4].classname, new Array());
}
- counter = this.publicationInfo.identifiers.get(data[4].classname).length;
- this.publicationInfo.identifiers.get(data[4].classname)[counter] = data[4].content;
+ this.publicationInfo.identifiers.get(data[4].classname).push(data[4].content);
}
} else {
for(let i=0; i());
}
- counter = this.publicationInfo.identifiers.get(data[4][i].classname).length;
- this.publicationInfo.identifiers.get(data[4][i].classname)[counter] = data[4][i].content;
+ this.publicationInfo.identifiers.get(data[4][i].classname).push(data[4][i].content);
}
}
}
@@ -475,39 +471,39 @@ export class PublicationService {
}
if(data[7] != null) {
- let mydata;
- let length = data[7].length!=undefined ? data[7].length : 1;
+ let subject;
+ let length = Array.isArray(data[7]) ? data[7].length : 1;
for(let i=0; i();
}
- if(!this.publicationInfo.classifiedSubjects.has(mydata.classname)) {
- this.publicationInfo.classifiedSubjects.set(mydata.classname, new Array());
+ if(!this.publicationInfo.classifiedSubjects.has(subject.classname)) {
+ this.publicationInfo.classifiedSubjects.set(subject.classname, new Array());
}
- this.publicationInfo.classifiedSubjects.get(mydata.classname).push(mydata.content);
+ this.publicationInfo.classifiedSubjects.get(subject.classname).push(subject.content);
} else {
- if(mydata.classid == "keyword") {
+ if(subject.classid == "keyword") {
if(this.publicationInfo.subjects == undefined) {
this.publicationInfo.subjects = new Array();
}
- this.publicationInfo.subjects.push(mydata.content);
+ this.publicationInfo.subjects.push(subject.content);
} else {
if(this.publicationInfo.otherSubjects == undefined) {
this.publicationInfo.otherSubjects = new Map();
}
- if(!this.publicationInfo.otherSubjects.has(mydata.classname)) {
- this.publicationInfo.otherSubjects.set(mydata.classname, new Array());
+ if(!this.publicationInfo.otherSubjects.has(subject.classname)) {
+ this.publicationInfo.otherSubjects.set(subject.classname, new Array());
}
- this.publicationInfo.otherSubjects.get(mydata.classname).push(mydata.content);
+ this.publicationInfo.otherSubjects.get(subject.classname).push(subject.content);
}
}
}
@@ -521,14 +517,14 @@ export class PublicationService {
if(data[9] != null) {
this.publicationInfo.collectedFrom = new Array<{"name": string, "url": string}>();
- let mydata;
- let length = data[9].length!=undefined ? data[9].length : 1;
+ let collectedFrom;
+ let length = Array.isArray(data[9]) ? data[9].length : 1;
for(let i=0; i();
- let mydata;
- let length = data[10].length!=undefined ? data[10].length : 1;
+ let citation;
+ let length = Array.isArray(data[10]) ? data[10].length : 1;
for(let i=0; i 1 ? mydata['id'][j] : mydata['id'];
+ citationId = Array.isArray(citation['id']) ? citation['id'][j] : citation['id'];
- if(mydata1.type == "pmid") {
- url = OpenaireProperties.getPmidURL()+mydata1.value;
+ if(citationId.type == "pmid") {
+ url = OpenaireProperties.getPmidURL()+citationId.value;
}
}
}
- this.publicationInfo.references[mydata.position-1] = { "name": "", "url": ""};
- this.publicationInfo.references[mydata.position-1]['name'] = mydata.rawText;
- this.publicationInfo.references[mydata.position-1]['url'] = url;
+ this.publicationInfo.references[citation.position-1] = { "name": "", "url": ""};
+ this.publicationInfo.references[citation.position-1]['name'] = citation.rawText;
+ this.publicationInfo.references[citation.position-1]['url'] = url;
}
}
@@ -594,35 +590,35 @@ export class PublicationService {
let position = 0;
let labels = "";
- let mydata;
- let length = data[11].length!=undefined ? data[11].length : 1;
+ let context;
+ let length = Array.isArray(data[11]) ? data[11].length : 1;
for(let i=0; i 1 ? mydata['category']['concept'][j] : mydata['category']['concept'];
+ categoryConcept = Array.isArray(context['category']['concept']) ? context['category']['concept'][j] : context['category']['concept'];
this.publicationInfo.contexts[position] = {"labelContext": "", "labelCategory": "", "labelConcept": "", inline: false };
- this.publicationInfo.contexts[position]['labelContext'] = mydata.label;
- this.publicationInfo.contexts[position]['labelCategory'] = mydata['category'].label;;
- this.publicationInfo.contexts[position]['labelConcept'] = mydata1.label;
+ this.publicationInfo.contexts[position]['labelContext'] = context.label;
+ this.publicationInfo.contexts[position]['labelCategory'] = context['category'].label;
+ this.publicationInfo.contexts[position]['labelConcept'] = categoryConcept.label;
position++;
}
} else {
this.publicationInfo.contexts[position] = {"labelContext": "", "labelCategory": "", "labelConcept": "", inline: false};
- this.publicationInfo.contexts[position]['labelContext'] = mydata.label;
- this.publicationInfo.contexts[position]['labelCategory'] = mydata['category'].label;;
+ this.publicationInfo.contexts[position]['labelContext'] = context.label;
+ this.publicationInfo.contexts[position]['labelCategory'] = context['category'].label;
this.publicationInfo.contexts[position]['labelConcept'] = null;
}
} else {
this.publicationInfo.contexts[position] = {"labelContext": "", "labelCategory": "", "labelConcept": "", inline: false};
- this.publicationInfo.contexts[position]['labelContext'] = mydata.label;
+ this.publicationInfo.contexts[position]['labelContext'] = context.label;
this.publicationInfo.contexts[position]['labelCategory'] = null;
this.publicationInfo.contexts[position]['labelConcept'] = null;
this.publicationInfo.contexts[position]['new'] = false;
@@ -631,120 +627,6 @@ export class PublicationService {
}
}
- //this.printPublicationInfo();
return this.publicationInfo;
-
}
-
- printPublicationInfo() {
- console.info("DATE: "+this.publicationInfo.date);
- console.info("PUBLISHER: "+this.publicationInfo.publisher);
- console.info("DESCRIPTION: "+this.publicationInfo.description);
-
- console.info("TITLE: "+this.publicationInfo.title);
-
- console.info("AUTHORS: "+this.publicationInfo.authors);
- console.info("\nFUNDED BY PROJECTS:");
- if(this.publicationInfo.fundedByProjects != undefined) {
- this.publicationInfo.fundedByProjects.forEach(function (value, key, map) {
- console.info(key + " = " + value);
- });
- } else {
- console.info("undefined");
- }
- console.info("\n");
-/*
- console.info("\nRELATED RESEARCH DATA:");
- if(this.publicationInfo.relatedResearchData != undefined) {
- this.publicationInfo.relatedResearchData.forEach(function (value, key, map) {
- console.info(key + " = " + value);
- });
- } else {
- console.info("undefined");
- }
- console.info("\n");
-
- console.info("\nSIMILAR PUBLICATIONS:");
- if(this.publicationInfo.similarPublications != undefined) {
- this.publicationInfo.similarPublications.forEach(function (value, key, map) {
- console.info(key + " = " + value);
- });
- } else {
- console.info("undefined");
- }
- console.info("\n");
-*/
- console.info("TYPES: "+this.publicationInfo.types);
- console.info("\nDOWNLOAD FROM:");
- if(this.publicationInfo.downloadFrom != undefined) {
- this.publicationInfo.downloadFrom.forEach(function (value, key, map) {
- console.info(key + " = " + value);
- });
- } else {
- console.info("undefined");
- }
- console.info("\n");
- console.info("\nBIOENTITIES:");
- if(this.publicationInfo.bioentities != undefined) {
- this.publicationInfo.bioentities.forEach(function (value, key, map) {
- value.forEach(function (value1, key1, map1) {
- console.info(key + " = " + key1 + " = " + value1);
- })
- })
- } else {
- console.info("undefined");
- }
- console.info("\n");
-
- console.info("\nIDENTIFIERS:");
- if(this.publicationInfo.identifiers != undefined) {
- this.publicationInfo.identifiers.forEach(function (value, key, map) {
- console.info(key + " = " + value);
- });
- } else {
- console.info("undefined");
- }
- console.info("\n");
-
- console.info("JOURNAL: "+this.publicationInfo.journal);
-
-
- console.info("LANGUAGES: "+this.publicationInfo.languages);
-
-
- console.info("SUBJECTS: "+this.publicationInfo.subjects);
- console.info("\nCLASSIFIED OBJECTS:");
- if(this.publicationInfo.classifiedSubjects != undefined) {
- this.publicationInfo.classifiedSubjects.forEach(function (value, key, map) {
- console.info(key + " = " + value);
- });
- } else {
- console.info("undefined");
- }
- console.info("\n");
-
- console.info("BEST LICENSE: "+this.publicationInfo.bestlicense);
-
- console.info("\nCOLLECTED FROM:");
- if(this.publicationInfo.collectedFrom != undefined) {
- this.publicationInfo.collectedFrom.forEach(function (value, key, map) {
- console.info(key + " = " + value);
- });
- } else {
- console.info("undefined");
- }
- console.info("\n");
-
- console.info("\nREFERENCES:");
- if(this.publicationInfo.references != undefined) {
- for(let i in this.publicationInfo.references) {
- for(let key in this.publicationInfo.references[i]) {
- console.info(key+" : "+this.publicationInfo.references[i][key]);
- }
- }
- } else {
- console.info("undefined");
- }
- }
-
}