In Search pubs/ data add Project filter | in creation of search query use quotes for fq values | in project LP add link to search page of pubs/data filtered by project

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44738 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2016-11-30 10:57:38 +00:00
parent 1428336295
commit 478b2c8714
4 changed files with 13 additions and 12 deletions

View File

@ -90,12 +90,12 @@ export class ProjectComponent{
private searchPublications() { private searchPublications() {
this.searchPublicationsComponent.getResultsForEntity("project", this.projectId, 1, 10); this.searchPublicationsComponent.getResultsForEntity("project", this.projectId, 1, 10);
this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications(); this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications() + "?relprojectid=" + this.projectId;
} }
private searchDatasets() { private searchDatasets() {
this.searchDatasetsComponent.getResultsForEntity("project", this.projectId, 1, 10); this.searchDatasetsComponent.getResultsForEntity("project", this.projectId, 1, 10);
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets(); this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets() + "?relprojectid=" + this.projectId;;
} }
private searchDatasetsInit() { private searchDatasetsInit() {

View File

@ -77,8 +77,8 @@ export class PublicationComponent {
this._publicationService.getPublicationInfo(this.articleId).subscribe( this._publicationService.getPublicationInfo(this.articleId).subscribe(
data => { data => {
this.publicationInfo = data; this.publicationInfo = data;
this.result = [] // this.result = []
this.result = {id: id, type :"dataset", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestlicense, embargoEndDate: ''}; // this.result = {id: id, type :"dataset", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestlicense, embargoEndDate: ''};
let bioentitiesNum = 0; let bioentitiesNum = 0;
if(this.publicationInfo.bioentities != undefined) { if(this.publicationInfo.bioentities != undefined) {

View File

@ -414,8 +414,7 @@ export class SearchPageComponent {
return "&refine=true"+fieldsStr; return "&refine=true"+fieldsStr;
} }
private quote(params: string):string { private quote(params: string):string {
// return encodeURIComponent('"'+params+'"'); return encodeURIComponent('"'+params+'"');
return encodeURIComponent(''+params+'');
} }
} }

View File

@ -1,13 +1,13 @@
export class SearchFields { export class SearchFields {
//main Entities //main Entities
//PUBLICATIONS //PUBLICATIONS
public PUBLICATION_INDEX:string[] = ["instancetypenameid", "resultlanguageid", "communityid", "relfunderid", public PUBLICATION_INDEX:string[] = ["instancetypenameid", "resultlanguageid", "communityid","relprojectid", "relfunderid",
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id", "relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
"resultacceptanceyear","resultbestlicenseid","resulthostingdatasourceid","collectedfromdatasourceid"]; "resultacceptanceyear","resultbestlicenseid","resulthostingdatasourceid","collectedfromdatasourceid"];
public ADVANCED_SEARCH_PUBLICATIONS_PARAM:string[] = ["q","title","author","publisher","type", "lang", "funder", "funderlv0", public ADVANCED_SEARCH_PUBLICATIONS_PARAM:string[] = ["q","title","author","publisher","type", "lang","project", "funder", "funderlv0",
"funderlv1","funderlv2","community","access","hostedBy","collectedFrom"]; "funderlv1","funderlv2","community","access","hostedBy","collectedFrom"];
public PUBLICATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["instancetypenameid"]:"type", ["resultlanguageid"]:"lang",["communityid"]:"community", public PUBLICATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["instancetypenameid"]:"type", ["resultlanguageid"]:"lang",["communityid"]:"community",
[ "relfunderid"]:"funder", [ "relprojectid"]:"project",[ "relfunderid"]:"funder",
["relfundinglevel0_id"]:"funderlv0",["relfundinglevel1_id"]:"funderlv1",["relfundinglevel2_id"]:"funderlv2", ["relfundinglevel0_id"]:"funderlv0",["relfundinglevel1_id"]:"funderlv1",["relfundinglevel2_id"]:"funderlv2",
["resultacceptanceyear"]:"year",["resultbestlicenseid"]:"access",["resulthostingdatasourceid"]:"hostedBy",["collectedfromdatasourceid"]:"collectedFrom"}; ["resultacceptanceyear"]:"year",["resultbestlicenseid"]:"access",["resulthostingdatasourceid"]:"hostedBy",["collectedfromdatasourceid"]:"collectedFrom"};
public PUBLICATION_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ={ public PUBLICATION_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ={
@ -15,6 +15,7 @@ export class SearchFields {
["title"]:{name:"Title",operator:"tt", type:"keyword" , indexField:"resulttitle", equalityOperator: "="}, ["title"]:{name:"Title",operator:"tt", type:"keyword" , indexField:"resulttitle", equalityOperator: "="},
["author"]:{name:"Author",operator:"at", type:"keyword", indexField:"relperson", equalityOperator: "="}, ["author"]:{name:"Author",operator:"at", type:"keyword", indexField:"relperson", equalityOperator: "="},
["publisher"]:{name:"Publisher",operator:"pb", type:"keyword", indexField:"resultpublisher", equalityOperator: "="}, ["publisher"]:{name:"Publisher",operator:"pb", type:"keyword", indexField:"resultpublisher", equalityOperator: "="},
["project"]:{name:"Project",operator:"po", type:"refine", indexField:"relprojectid", equalityOperator: " exact "},
["funder"]:{name:"Funder",operator:"fn", type:"refine", indexField:"relfunderid", equalityOperator: " exact "}, ["funder"]:{name:"Funder",operator:"fn", type:"refine", indexField:"relfunderid", equalityOperator: " exact "},
["funderlv0"]:{name:"Funding Stream",operator:"fn0", type:"refine", indexField:"relfundinglevel0_id", equalityOperator: " exact "}, ["funderlv0"]:{name:"Funding Stream",operator:"fn0", type:"refine", indexField:"relfundinglevel0_id", equalityOperator: " exact "},
["funderlv1"]:{name:"Funding Substream Level 1",operator:"fn1", type:"refine", indexField:"relfundinglevel1_id", equalityOperator: " exact "}, ["funderlv1"]:{name:"Funding Substream Level 1",operator:"fn1", type:"refine", indexField:"relfundinglevel1_id", equalityOperator: " exact "},
@ -77,13 +78,13 @@ export class SearchFields {
//DATASET //DATASET
public DATASET_INDEX:string[] = ["instancetypenameid", "resultlanguageid", //"communityid", public DATASET_INDEX:string[] = ["instancetypenameid", "resultlanguageid","relprojectid", //"communityid",
"relfunderid", "relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id", "relfunderid", "relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
"resultacceptanceyear","resultbestlicenseid","resulthostingdatasourceid","collectedfromdatasourceid"]; "resultacceptanceyear","resultbestlicenseid","resulthostingdatasourceid","collectedfromdatasourceid"];
public ADVANCED_SEARCH_DATASET_PARAM:string[] = ["q","title","author","publisher","type", "lang", "funder", "funderlv0", public ADVANCED_SEARCH_DATASET_PARAM:string[] = ["q","title","author","publisher","type", "lang", "funder", "funderlv0",
"funderlv1","funderlv2","community","access","hostedBy","collectedFrom"]; "funderlv1","funderlv2","community","access","hostedBy","collectedFrom"];
public DATASET_INDEX_PARAM_MAP:{ [key:string]:string } = {["instancetypenameid"]:"type", ["resultlanguageid"]:"lang",["communityid"]:"community", public DATASET_INDEX_PARAM_MAP:{ [key:string]:string } = {["instancetypenameid"]:"type", ["resultlanguageid"]:"lang",["communityid"]:"community",
[ "relfunderid"]:"funder", [ "relprojectid"]:"project", [ "relfunderid"]:"funder",
["relfundinglevel0_id"]:"funderlv0",["relfundinglevel1_id"]:"funderlv1",["relfundinglevel2_id"]:"funderlv2", ["relfundinglevel0_id"]:"funderlv0",["relfundinglevel1_id"]:"funderlv1",["relfundinglevel2_id"]:"funderlv2",
["resultacceptanceyear"]:"year",["resultbestlicenseid"]:"access",["resulthostingdatasourceid"]:"hostedBy",["collectedfromdatasourceid"]:"collectedFrom"}; ["resultacceptanceyear"]:"year",["resultbestlicenseid"]:"access",["resulthostingdatasourceid"]:"hostedBy",["collectedfromdatasourceid"]:"collectedFrom"};
public DATASET_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ={ public DATASET_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ={
@ -91,6 +92,7 @@ export class SearchFields {
["title"]:{name:"Title",operator:"tt", type:"keyword" , indexField:"resulttitle", equalityOperator: "="}, ["title"]:{name:"Title",operator:"tt", type:"keyword" , indexField:"resulttitle", equalityOperator: "="},
["author"]:{name:"Author",operator:"at", type:"keyword", indexField:"relperson", equalityOperator: "="}, ["author"]:{name:"Author",operator:"at", type:"keyword", indexField:"relperson", equalityOperator: "="},
["publisher"]:{name:"Publisher",operator:"pb", type:"keyword", indexField:"resultpublisher", equalityOperator: "="}, ["publisher"]:{name:"Publisher",operator:"pb", type:"keyword", indexField:"resultpublisher", equalityOperator: "="},
["project"]:{name:"Project",operator:"po", type:"refine", indexField:"relprojectid", equalityOperator: " exact "},
["funder"]:{name:"Funder",operator:"fn", type:"refine", indexField:"relfunderid", equalityOperator: " exact "}, ["funder"]:{name:"Funder",operator:"fn", type:"refine", indexField:"relfunderid", equalityOperator: " exact "},
["funderlv0"]:{name:"Funding Stream",operator:"fn0", type:"refine", indexField:"relfundinglevel0_id", equalityOperator: " exact "}, ["funderlv0"]:{name:"Funding Stream",operator:"fn0", type:"refine", indexField:"relfundinglevel0_id", equalityOperator: " exact "},
["funderlv1"]:{name:"Funding Substream Level 1",operator:"fn1", type:"refine", indexField:"relfundinglevel1_id", equalityOperator: " exact "}, ["funderlv1"]:{name:"Funding Substream Level 1",operator:"fn1", type:"refine", indexField:"relfundinglevel1_id", equalityOperator: " exact "},
@ -141,7 +143,7 @@ export class SearchFields {
// public PROJECT_PARAM_FIELDS:string[] = ["funder","fl0","fl1", "fl2", "start","end","sc39"]; // public PROJECT_PARAM_FIELDS:string[] = ["funder","fl0","fl1", "fl2", "start","end","sc39"];
public FIELDS_NAMES: { [key:string]:string } = {["funderid"]:"Funder",["fundinglevel0_id"]:"Funding Stream", public FIELDS_NAMES: { [key:string]:string } = {["relprojectid"]:"Project",["funderid"]:"Funder",["fundinglevel0_id"]:"Funding Stream",
["fundinglevel1_id"]:"Funding Substream Level 1", ["fundinglevel2_id"]:"Funding Substream Level 2", ["relfunderid"]:"Funder", ["fundinglevel1_id"]:"Funding Substream Level 1", ["fundinglevel2_id"]:"Funding Substream Level 2", ["relfunderid"]:"Funder",
["relfundinglevel0_id"]:"Funding Stream",["relfundinglevel1_id"]:"Funding Substream Level 1", ["relfundinglevel2_id"]:"Funding Substream Level 2", ["relfundinglevel0_id"]:"Funding Stream",["relfundinglevel1_id"]:"Funding Substream Level 1", ["relfundinglevel2_id"]:"Funding Substream Level 2",
["instancetypenameid"]:"Type",["resultlanguageid"]: "Language",["communityid"]: "Context",["resultacceptanceyear"]:"Year", ["instancetypenameid"]:"Type",["resultlanguageid"]: "Language",["communityid"]: "Context",["resultacceptanceyear"]:"Year",