Revision 44051
Added by Argiro Kokogiannaki about 8 years ago
modules/uoa-services-portal/trunk/portal-2/src/app/utils/properties/searchFields.ts | ||
---|---|---|
24 | 24 |
|
25 | 25 |
public PROJECT_PARAM_FIELDS:string[] = ["funder","fl0","fl1", "fl2", "start","end","sc39"]; |
26 | 26 |
|
27 |
public FIELDS_NAMES: { [key:string]:string } = {["funderid"]:"Funder",["fundinglevel0_id"]:"Funding Level 0", |
|
28 |
["fundinglevel1_id"]:"Funding Level 1", ["fundinglevel2_id"]:"Funding Level 2", ["relfunderid"]:"Funder", |
|
29 |
["relfundinglevel0_id"]:"Funding Level 0",["relfundinglevel1_id"]:"Funding Level 1", ["relfundinglevel2_id"]:"Funding Level 2", |
|
30 |
["instancetypenameid"]:"Type",["resultlanguageid"]: "Language",["communityid"]: "Context",["resultacceptanceyear"]:"Year", |
|
31 |
["resultbestlicense"]:"Access Mode",["resulthostingdatasourceid"]:"Hosting Data provider", |
|
32 |
["collectedfromdatasourceid"]:"Collected from", ["datasourcetypeuiid"]:"Compatibility Type", ["datasourceodlanguages"]:"Language", |
|
33 |
["datasourceodcontenttypes"]: "Type", ["datasourcecompatibilityid"]:"Compatibility Type", ["organizationcountryid"]:"Country", |
|
34 |
["organizationeclegalbody"]:"Type",["projectstartyear"]:"Start Year",["projectendyear"]:"End Year",["projectecsc39"]:"Special Clause 39"}; |
|
27 | 35 |
public getPROJECT_FIELDS(){ |
28 | 36 |
return this.PROJECT_FIELDS; |
29 | 37 |
} |
modules/uoa-services-portal/trunk/portal-2/src/app/services/servicesUtils/refineResuts.service.ts | ||
---|---|---|
3 | 3 |
import {Observable} from 'rxjs/Observable'; |
4 | 4 |
// import {RefineParsingUtils} from './services-utils/refineResults.class'; |
5 | 5 |
import { Filter, Value} from '../../searchPages/searchUtils/searchHelperClasses.class'; |
6 |
import { SearchFields} from '../../utils/properties/searchFields'; |
|
6 | 7 |
|
7 | 8 |
@Injectable() |
8 | 9 |
export class RefineResultsService { |
... | ... | |
22 | 23 |
} |
23 | 24 |
public parseRefineResults (data, fields:string[]):Filter[] { |
24 | 25 |
// var data = this.json.refineReuslts; |
26 |
var searchFields:SearchFields = new SearchFields(); |
|
25 | 27 |
var filters:Filter[] = []; |
26 | 28 |
for(let j=0; j<data.length; j++) { |
27 | 29 |
|
28 | 30 |
var filter:Filter = new Filter(); |
29 | 31 |
console.log("Parsing field :" + fields[j] ); |
30 | 32 |
|
31 |
filter.title = fields[j];
|
|
33 |
filter.title = searchFields.FIELDS_NAMES[fields[j]];
|
|
32 | 34 |
filter.filterId = fields[j]; |
33 | 35 |
filter.originalFilterId = fields[j]; |
34 | 36 |
let field = data[j][fields[j]]; |
Also available in: Unified diff
minor changes in Filters