2022-05-30 11:44:39 +02:00
|
|
|
import {Filter} from "../../searchPages/searchUtils/searchHelperClasses.class";
|
2022-09-08 23:46:44 +02:00
|
|
|
import {properties} from "../../../../environments/environment";
|
2022-05-30 11:44:39 +02:00
|
|
|
|
2017-12-19 13:53:46 +01:00
|
|
|
export class SearchFields {
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
//main Entities
|
|
|
|
//RESULTS
|
|
|
|
//Used for datasets and publications and software and orp
|
|
|
|
//In case Datasets or Software should display different fields, use seperate tables for fields
|
2020-02-17 15:19:14 +01:00
|
|
|
// "resultacceptanceyear",
|
2020-06-05 14:56:28 +02:00
|
|
|
public RESULT_RANGE_FIELDS = [
|
|
|
|
["resultacceptanceyear", "resultacceptanceyear"]
|
|
|
|
];
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
|
|
|
public RESULT_REFINE_FIELDS = [
|
2023-09-04 14:45:06 +02:00
|
|
|
"resultbestaccessright", "instancetypename", "foslabel", "relfunder",
|
2020-06-05 14:56:28 +02:00
|
|
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
2022-03-17 14:13:07 +01:00
|
|
|
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];
|
2020-09-08 15:17:38 +02:00
|
|
|
|
2022-09-08 23:46:44 +02:00
|
|
|
public RESULT_ADVANCED_FIELDS: string[] = ["q", "resulttitle", "resultauthor", "authorid", "resultdescription", "resultsubject", "eoscifguidelines", "resultpublisher",
|
2020-06-05 14:56:28 +02:00
|
|
|
"resultbestaccessright", "community", "collectedfromdatasourceid", "resulthostingdatasourceid", "resultdateofacceptance",
|
|
|
|
"relfunder",
|
|
|
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
2022-03-18 12:14:07 +01:00
|
|
|
"resultlanguagename", "relorganizationid", "pid", "relprojectid", "instancetypename", "fos", "sdg"];
|
2020-06-05 14:56:28 +02:00
|
|
|
public RESULT_FIELDS: { [key: string]: FieldDetails } = {
|
2022-06-01 12:27:46 +02:00
|
|
|
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
2020-06-05 14:56:28 +02:00
|
|
|
["resulttitle"]: {
|
|
|
|
name: "Title",
|
|
|
|
type: "keyword",
|
|
|
|
param: "title",
|
|
|
|
operator: "tt",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["resultauthor"]: {
|
|
|
|
name: "Author",
|
|
|
|
type: "keyword",
|
|
|
|
param: "author",
|
|
|
|
operator: "at",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["authorid"]: {
|
|
|
|
name: "Author ORCID",
|
|
|
|
type: "keyword",
|
|
|
|
param: "orcid",
|
|
|
|
operator: "oc",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["resultsubject"]: {
|
|
|
|
name: "Subject",
|
|
|
|
type: "keyword",
|
|
|
|
param: "subject",
|
|
|
|
operator: "sb",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
2022-09-08 23:46:44 +02:00
|
|
|
["eoscifguidelines"]: {
|
|
|
|
name: "EOSC Subject",
|
2023-07-06 11:53:37 +02:00
|
|
|
type: "refine",
|
2022-09-08 23:46:44 +02:00
|
|
|
param: "eoscSubj",
|
|
|
|
operator: "es",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
2020-06-05 14:56:28 +02:00
|
|
|
["resultdescription"]: {
|
2022-02-14 16:04:09 +01:00
|
|
|
name: "Abstract",
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "keyword",
|
|
|
|
param: "description",
|
|
|
|
operator: "ds",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["resultpublisher"]: {
|
|
|
|
name: "Publisher",
|
|
|
|
type: "keyword",
|
|
|
|
param: "publisher",
|
|
|
|
operator: "pb",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
2023-07-06 11:53:37 +02:00
|
|
|
["pid"]: {
|
|
|
|
name: "PID",
|
|
|
|
type: "keyword",
|
|
|
|
param: "pid",
|
|
|
|
operator: "pd",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
2020-06-05 14:56:28 +02:00
|
|
|
["resulthostingdatasourceid"]: {
|
2023-07-06 11:53:37 +02:00
|
|
|
name: "Hosting " + OpenaireEntities.DATASOURCE,
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "entity",
|
|
|
|
param: "hostedBy",
|
|
|
|
operator: "hs",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["resulthostingdatasource"]: {
|
2022-03-17 15:13:55 +01:00
|
|
|
name: "Source",
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "refine",
|
|
|
|
param: "hostedBy",
|
|
|
|
operator: "hs",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["instancetypename"]: {
|
2022-03-17 14:13:07 +01:00
|
|
|
name: "Document Type",
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "vocabulary",
|
|
|
|
param: "type",
|
|
|
|
operator: "tp",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["resultlanguagename"]: {
|
|
|
|
name: "Language",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "lang",
|
|
|
|
operator: "ln",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["community"]: {
|
[Monitor Dashboard & Library | new-theme]: Renaming entity types using OpenaireEntities.
Files updated: develop.component.ts, methodology.component.ts, claimEntitiesSelection.component.ts, directLinking.component.ts, linkingGeneric.component.html, linkingGeneric.component.ts, approved.component.ts, searchDataprovidersToDeposit.component.ts, errorPage.component.ts, dataProvider.component.html, dataProvider.component.ts, dataProvider.service.ts, relatedDatasourcesTab.component.ts, project.component.ts, myOrcidLinks.component.ts, searchMyOrcidResults.component.html, searchMyOrcidResults.component.ts, searchAll.component.html, searchAll.component.ts, advancedSearchForm.component.html, advancedSearchForm.component.ts, searchDataProviders.component.ts, searchResearchResults.service.ts, numbers.component.ts, other-portals.component.html, other-portals.component.ts, fetchDataproviders.class.ts, fetchResearchResults.class.ts, searchFields.ts, result-preview.component.ts
2022-05-09 12:13:44 +02:00
|
|
|
name: OpenaireEntities.COMMUNITY,
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "refine",
|
|
|
|
param: "community",
|
|
|
|
operator: "cm",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["relproject"]: {
|
|
|
|
name: "Project",
|
|
|
|
type: "refine",
|
|
|
|
param: "project",
|
|
|
|
operator: "po",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["relprojectid"]: {
|
[Monitor Dashboard & Library | new-theme]: Renaming entity types using OpenaireEntities.
Files updated: develop.component.ts, methodology.component.ts, claimEntitiesSelection.component.ts, directLinking.component.ts, linkingGeneric.component.html, linkingGeneric.component.ts, approved.component.ts, searchDataprovidersToDeposit.component.ts, errorPage.component.ts, dataProvider.component.html, dataProvider.component.ts, dataProvider.service.ts, relatedDatasourcesTab.component.ts, project.component.ts, myOrcidLinks.component.ts, searchMyOrcidResults.component.html, searchMyOrcidResults.component.ts, searchAll.component.html, searchAll.component.ts, advancedSearchForm.component.html, advancedSearchForm.component.ts, searchDataProviders.component.ts, searchResearchResults.service.ts, numbers.component.ts, other-portals.component.html, other-portals.component.ts, fetchDataproviders.class.ts, fetchResearchResults.class.ts, searchFields.ts, result-preview.component.ts
2022-05-09 12:13:44 +02:00
|
|
|
name: OpenaireEntities.PROJECT,
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "entity",
|
|
|
|
param: "project",
|
|
|
|
operator: "po",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["relfunder"]: {
|
|
|
|
name: "Funder",
|
|
|
|
type: "refine",
|
|
|
|
param: "funder",
|
|
|
|
operator: "fn",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["relfundinglevel0_id"]: {
|
|
|
|
name: "Funding Stream",
|
|
|
|
type: "refine",
|
|
|
|
param: "funderlv0",
|
|
|
|
operator: "fn0",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["relfundinglevel1_id"]: {
|
|
|
|
name: "Funding Substream level 1",
|
|
|
|
type: "refine",
|
|
|
|
param: "funderlv1",
|
|
|
|
operator: "fn1",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["relfundinglevel2_id"]: {
|
|
|
|
name: "Funding Substream level 2",
|
|
|
|
type: "refine",
|
|
|
|
param: "funderlv2",
|
|
|
|
operator: "fn0",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["resultacceptanceyear"]: {
|
|
|
|
name: "Publication Date",
|
|
|
|
type: "keyword",
|
|
|
|
param: "year",
|
|
|
|
operator: "ya",
|
|
|
|
equalityOperator: " = ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["resultdateofacceptance"]: {
|
|
|
|
name: "Publication Date",
|
|
|
|
type: "date",
|
|
|
|
param: "date",
|
|
|
|
operator: "dt",
|
|
|
|
equalityOperator: " within ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["resultacceptanceyear-range-resultacceptanceyear"]: {
|
|
|
|
name: "Year range",
|
|
|
|
type: "keyword",
|
|
|
|
param: "year",
|
|
|
|
operator: "ya",
|
|
|
|
equalityOperator: " within ",
|
|
|
|
filterType: "range"
|
|
|
|
},
|
|
|
|
["resultbestaccessright"]: {
|
2022-03-17 14:13:07 +01:00
|
|
|
name: "Access",
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "vocabulary",
|
|
|
|
param: "access",
|
|
|
|
operator: "ac",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "radio"
|
|
|
|
},
|
|
|
|
["collectedfrom"]: {
|
|
|
|
name: "Collected From",
|
|
|
|
type: "refine",
|
|
|
|
param: "datasource",
|
|
|
|
operator: "cl",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["relorganizationid"]: {
|
|
|
|
name: "Organization",
|
|
|
|
type: "entity",
|
|
|
|
param: "organization",
|
|
|
|
operator: "og",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["collectedfromdatasourceid"]: {
|
2023-07-06 11:53:37 +02:00
|
|
|
name: "Collected from " + OpenaireEntities.DATASOURCE,
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "entity",
|
|
|
|
param: "collectedFrom",
|
|
|
|
operator: "cl",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["resulttypeid"]: {
|
2022-03-17 14:13:07 +01:00
|
|
|
name: "Type",
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "refine",
|
|
|
|
param: "types",
|
|
|
|
operator: "tp",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "radio"
|
2020-09-08 15:17:38 +02:00
|
|
|
},
|
|
|
|
["country"]: {
|
|
|
|
name: "Country",
|
|
|
|
type: "refine",
|
|
|
|
param: "country",
|
|
|
|
operator: "cu",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
2022-03-15 22:31:10 +01:00
|
|
|
},
|
|
|
|
["sdg"]: {
|
2022-05-30 14:36:33 +02:00
|
|
|
name: "SDG [Beta]",
|
2022-03-18 12:14:07 +01:00
|
|
|
type: "vocabulary",
|
2022-03-15 22:31:10 +01:00
|
|
|
param: "sdg",
|
|
|
|
operator: "sg",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["fos"]: {
|
2022-05-30 14:36:33 +02:00
|
|
|
name: "Field of Science [Beta]",
|
2022-03-18 12:14:07 +01:00
|
|
|
type: "vocabulary",
|
2022-03-15 22:31:10 +01:00
|
|
|
param: "fos",
|
|
|
|
operator: "fs",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
2023-07-06 11:53:37 +02:00
|
|
|
},
|
|
|
|
["foslabel"]: {
|
|
|
|
name: "Field of Science [Beta]",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "foslabel",
|
|
|
|
operator: "fl",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
2020-06-05 14:56:28 +02:00
|
|
|
}
|
|
|
|
};
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
//PROJECT
|
|
|
|
public PROJECT_RANGE_FIELDS = [
|
|
|
|
["projectendyear", "projectstartyear"]
|
|
|
|
];
|
|
|
|
public PROJECT_REFINE_FIELDS: string[] = ["funder", "fundinglevel0_id", "fundinglevel1_id",
|
2023-04-26 11:28:37 +02:00
|
|
|
"fundinglevel2_id", "projectoamandatepublications", "projectstartyear", "projectendyear"];
|
2020-06-05 14:56:28 +02:00
|
|
|
public PROJECT_ADVANCED_FIELDS: string[] = ["q", "projectacronym", "projecttitle", "projectkeywords",
|
|
|
|
"funder", "fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id",
|
2022-05-30 11:44:39 +02:00
|
|
|
"projectstartdate", "projectenddate",
|
2020-06-05 14:56:28 +02:00
|
|
|
"projectcode_nt", "relorganizationid", "collectedfromdatasourceid"];
|
|
|
|
public PROJECT_FIELDS: { [key: string]: FieldDetails } = {
|
2022-06-01 12:27:46 +02:00
|
|
|
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
2020-06-05 14:56:28 +02:00
|
|
|
["projectacronym"]: {
|
|
|
|
name: "Acronym",
|
|
|
|
type: "keyword",
|
|
|
|
param: "acronym",
|
|
|
|
operator: "ar",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["projecttitle"]: {
|
|
|
|
name: "Title",
|
|
|
|
type: "keyword",
|
|
|
|
param: "title",
|
|
|
|
operator: "tt",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["projectkeywords"]: {
|
2022-06-02 16:44:56 +02:00
|
|
|
name: "Keyword",
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "keyword",
|
|
|
|
param: "keywords",
|
|
|
|
operator: "ky",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
["funder"]: {
|
|
|
|
name: "Funder",
|
|
|
|
type: "refine",
|
|
|
|
param: "funder",
|
|
|
|
operator: "fn",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["fundinglevel0_id"]: {
|
|
|
|
name: "Funding Stream",
|
|
|
|
type: "refine",
|
|
|
|
param: "funderlv0",
|
|
|
|
operator: "fn0",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["fundinglevel1_id"]: {
|
|
|
|
name: "Funding Substream level 1",
|
|
|
|
type: "refine",
|
|
|
|
param: "funderlv1",
|
|
|
|
operator: "fn1",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["fundinglevel2_id"]: {
|
|
|
|
name: "Funding Substream level 2",
|
|
|
|
type: "refine",
|
|
|
|
param: "funderlv2",
|
|
|
|
operator: "fn2",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["projectstartyear"]: {
|
|
|
|
name: "Start Year",
|
|
|
|
type: "year",
|
|
|
|
param: "startyear",
|
|
|
|
operator: "sy",
|
|
|
|
equalityOperator: " <= ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["projectendyear"]: {
|
|
|
|
name: "End Year",
|
|
|
|
type: "year",
|
|
|
|
param: "endyear",
|
|
|
|
operator: "ey",
|
|
|
|
equalityOperator: " >= ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["projectendyear-range-projectstartyear"]: {
|
|
|
|
name: "Active within",
|
|
|
|
type: "year",
|
|
|
|
param: "year",
|
|
|
|
operator: "ya",
|
|
|
|
equalityOperator: " = ",
|
|
|
|
filterType: "range"
|
|
|
|
},
|
|
|
|
["projectstartdate"]: {
|
|
|
|
name: "Start Date",
|
|
|
|
type: "date",
|
|
|
|
param: "startdate",
|
|
|
|
operator: "sd",
|
|
|
|
equalityOperator: " within ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["projectenddate"]: {
|
|
|
|
name: "End Date",
|
|
|
|
type: "date",
|
|
|
|
param: "enddate",
|
|
|
|
operator: "ed",
|
|
|
|
equalityOperator: " within ",
|
|
|
|
filterType: null
|
|
|
|
},
|
2022-06-15 12:54:49 +02:00
|
|
|
// ["projectecsc39"]: {
|
|
|
|
// name: "Special Clause 39",
|
|
|
|
// type: "boolean",
|
|
|
|
// param: "sc39",
|
|
|
|
// operator: "sc",
|
|
|
|
// equalityOperator: " exact ",
|
|
|
|
// filterType: "radio"
|
|
|
|
// },
|
|
|
|
["projectoamandatepublications"]: {
|
2023-07-06 11:53:37 +02:00
|
|
|
name: "OA " + OpenaireEntities.PUBLICATIONS + " Mandate",
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "boolean",
|
2022-06-15 12:54:49 +02:00
|
|
|
param: "oapubl",
|
|
|
|
operator: "oap",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "radio"
|
|
|
|
},
|
|
|
|
["projectoamandatedata"]: {
|
2023-07-06 11:53:37 +02:00
|
|
|
name: "OA " + OpenaireEntities.DATASETS + " Mandate",
|
2022-06-15 12:54:49 +02:00
|
|
|
type: "boolean",
|
|
|
|
param: "oadata",
|
|
|
|
operator: "oad",
|
2020-06-05 14:56:28 +02:00
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "radio"
|
|
|
|
},
|
|
|
|
["projectcode_nt"]: {
|
|
|
|
name: "Project Code",
|
|
|
|
type: "keyword",
|
|
|
|
param: "code",
|
|
|
|
operator: "cd",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["relorganizationid"]: {
|
|
|
|
name: "Organization",
|
|
|
|
type: "entity",
|
|
|
|
param: "organization",
|
|
|
|
operator: "og",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["collectedfromdatasourceid"]: {
|
2023-07-06 11:53:37 +02:00
|
|
|
name: "Collected from " + OpenaireEntities.DATASOURCE,
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "entity",
|
|
|
|
param: "collectedFrom",
|
|
|
|
operator: "cl",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
}
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
};
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
//DATAPROVIDERS
|
2020-05-21 15:17:28 +02:00
|
|
|
// add Collected From Filter "collectedfromname"
|
2022-09-30 13:51:00 +02:00
|
|
|
public DATASOURCE_REFINE_FIELDS: string[] = ["eoscdatasourcetype", "datasourceodlanguages", "datasourceodcontenttypes",
|
2023-07-06 11:53:37 +02:00
|
|
|
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
2022-05-30 11:44:39 +02:00
|
|
|
"datasourcejurisdiction"];
|
2020-06-05 14:56:28 +02:00
|
|
|
public DATASOURCE_ADVANCED_FIELDS: string[] = ["q", "datasourceofficialname",
|
|
|
|
"datasourceenglishname", "datasourceodsubjects", "datasourcetypename", "datasourceodlanguages",
|
2022-06-23 16:30:45 +02:00
|
|
|
"datasourceodcontenttypes", "datasourcecompatibilityname", "relorganizationid", "collectedfromdatasourceid", "pid"];
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
public DATASOURCE_FIELDS: { [key: string]: FieldDetails } = {
|
2022-06-01 12:27:46 +02:00
|
|
|
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
2020-06-05 14:56:28 +02:00
|
|
|
["datasourceofficialname"]: {
|
|
|
|
name: "English name",
|
|
|
|
type: "keyword",
|
|
|
|
param: "officialname",
|
|
|
|
operator: "of",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["datasourceenglishname"]: {
|
|
|
|
name: "Title",
|
|
|
|
type: "keyword",
|
|
|
|
param: "engname",
|
|
|
|
operator: "eg",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["datasourceodsubjects"]: {
|
|
|
|
name: "Subject",
|
|
|
|
type: "keyword",
|
|
|
|
param: "subjects",
|
|
|
|
operator: "sb",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["datasourcetypeuiid"]: {
|
|
|
|
name: "Type",
|
|
|
|
type: "refine",
|
|
|
|
param: "type",
|
|
|
|
operator: "tp",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["datasourcetypeuiname"]: {
|
|
|
|
name: "Type",
|
|
|
|
type: "refine",
|
|
|
|
param: "type",
|
|
|
|
operator: "tp",
|
|
|
|
equalityOperator: " exact ",
|
2022-02-16 17:43:20 +01:00
|
|
|
filterType: "radio"
|
2020-06-05 14:56:28 +02:00
|
|
|
},
|
2022-09-30 13:51:00 +02:00
|
|
|
["eoscdatasourcetype"]: {
|
|
|
|
name: "Type",
|
|
|
|
type: "refine",
|
|
|
|
param: "type",
|
|
|
|
operator: "tp",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "radio"
|
|
|
|
},
|
2020-06-05 14:56:28 +02:00
|
|
|
["datasourcetypename"]: {
|
|
|
|
name: "Type",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "type",
|
|
|
|
operator: "tp",
|
|
|
|
equalityOperator: " exact ",
|
2022-02-16 17:43:20 +01:00
|
|
|
filterType: "radio"
|
2020-06-05 14:56:28 +02:00
|
|
|
},
|
|
|
|
["datasourceodlanguages"]: {
|
|
|
|
name: "Language",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "lang",
|
|
|
|
operator: "ln",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["datasourceodcontenttypes"]: {
|
|
|
|
name: "Content",
|
|
|
|
type: "refine",
|
|
|
|
param: "content",
|
|
|
|
operator: "cn",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["datasourcecompatibilityid"]: {
|
|
|
|
name: "Compatibility Level",
|
|
|
|
type: "refine",
|
|
|
|
param: "compatibility",
|
|
|
|
operator: "cm",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["datasourcecompatibilityname"]: {
|
|
|
|
name: "Compatibility Level",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "compatibility",
|
|
|
|
operator: "cm",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["relorganizationid"]: {
|
|
|
|
name: "Organization",
|
|
|
|
type: "entity",
|
|
|
|
param: "organization",
|
|
|
|
operator: "og",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["collectedfromname"]: {
|
|
|
|
name: "Collected from",
|
|
|
|
type: "entity",
|
|
|
|
param: "collectedFrom",
|
|
|
|
operator: "cl",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["collectedfromdatasourceid"]: {
|
2023-07-06 11:53:37 +02:00
|
|
|
name: "Collected from " + OpenaireEntities.DATASOURCE,
|
2020-06-05 14:56:28 +02:00
|
|
|
type: "entity",
|
|
|
|
param: "collectedFrom",
|
|
|
|
operator: "cl",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["country"]: {
|
|
|
|
name: "Country",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "country",
|
|
|
|
operator: "cu",
|
2022-06-02 16:44:56 +02:00
|
|
|
equalityOperator: " exact ",
|
2020-06-05 14:56:28 +02:00
|
|
|
filterType: "checkbox"
|
2022-05-30 11:44:39 +02:00
|
|
|
},
|
|
|
|
["datasourcethematic"]: {
|
|
|
|
name: "Thematic",
|
|
|
|
type: "boolean",
|
|
|
|
param: "thematic",
|
|
|
|
operator: "th",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "radio"
|
|
|
|
},
|
|
|
|
["datasourcejurisdiction"]: {
|
|
|
|
name: "Jurisdiction",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "jurisdiction",
|
|
|
|
operator: "ju",
|
2022-06-02 16:44:56 +02:00
|
|
|
equalityOperator: " exact ",
|
2022-05-30 11:44:39 +02:00
|
|
|
filterType: "checkbox"
|
2022-06-23 16:30:45 +02:00
|
|
|
},
|
|
|
|
["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " exact ", filterType: null}
|
2020-06-05 14:56:28 +02:00
|
|
|
};
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
public DEPOSIT_DATASOURCE_KEYWORD_FIELDS: { "name": string, "equalityOperator": string } [] = [
|
|
|
|
{"name": "relorganizationname", "equalityOperator": "="},
|
|
|
|
{"name": "relorganizationshortname", "equalityOperator": "="},
|
|
|
|
{"name": "datasourceofficialname", "equalityOperator": "="},
|
|
|
|
{"name": "datasourceenglishname", "equalityOperator": "="},
|
2022-09-30 13:51:00 +02:00
|
|
|
{"name": "eoscdatasourcetype", "equalityOperator": " exact "},
|
2020-06-05 14:56:28 +02:00
|
|
|
{"name": "country", "equalityOperator": " exact "},
|
|
|
|
{"name": "datasourcesubject", "equalityOperator": " all "}
|
2019-07-15 18:11:07 +02:00
|
|
|
];
|
2023-07-06 11:53:37 +02:00
|
|
|
public DEPOSIT_DATASOURCE_REFINE_FIELDS: string[] = ["datasourcetypename", "country", "datasourceodsubjects", "datasourceodcontenttypes", "datasourcecompatibilityname", "datasourcethematic", "datasourcejurisdiction"];
|
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
public DEPOSIT_DATASOURCE_FIELDS: { [key: string]: FieldDetails } = {
|
|
|
|
["datasourcetypeuiname"]: {
|
|
|
|
name: "Repository type",
|
|
|
|
type: "refine",
|
|
|
|
param: "type",
|
|
|
|
operator: "tp",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "radio"
|
|
|
|
},
|
2022-09-30 13:51:00 +02:00
|
|
|
["eoscdatasourcetype"]: {
|
|
|
|
name: "Repository type",
|
|
|
|
type: "refine",
|
|
|
|
param: "type",
|
|
|
|
operator: "tp",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "radio"
|
|
|
|
},
|
2020-06-05 14:56:28 +02:00
|
|
|
["country"]: {
|
|
|
|
name: "Countries",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "country",
|
|
|
|
operator: "cu",
|
2022-06-02 16:44:56 +02:00
|
|
|
equalityOperator: " exact ",
|
2020-06-05 14:56:28 +02:00
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["datasourceodsubjects"]: {
|
|
|
|
name: "Subjects",
|
|
|
|
type: "keyword",
|
|
|
|
param: "subjects",
|
|
|
|
operator: "sb",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["datasourceodcontenttypes"]: {
|
|
|
|
name: "Content type",
|
|
|
|
type: "refine",
|
|
|
|
param: "content",
|
|
|
|
operator: "cn",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
["datasourcecompatibilityname"]: {
|
|
|
|
name: "Compatibility Level",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "compatibility",
|
|
|
|
operator: "cm",
|
|
|
|
equalityOperator: " exact ",
|
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
2019-07-15 18:11:07 +02:00
|
|
|
};
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2022-08-03 17:21:14 +02:00
|
|
|
// public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
|
|
|
public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
2023-07-06 11:53:37 +02:00
|
|
|
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
2022-08-03 17:21:14 +02:00
|
|
|
"datasourcejurisdiction"];
|
|
|
|
// public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
|
|
|
public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
2023-07-06 11:53:37 +02:00
|
|
|
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
2022-08-03 17:21:14 +02:00
|
|
|
"datasourcejurisdiction"];
|
|
|
|
// public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
|
|
|
public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
2023-07-06 11:53:37 +02:00
|
|
|
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
2022-08-03 17:21:14 +02:00
|
|
|
"datasourcejurisdiction"];
|
|
|
|
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
//ORGANIZATION
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
public ORGANIZATION_REFINE_FIELDS: string[] = ["country"]
|
|
|
|
public ORGANIZATION_ADVANCED_FIELDS: string[] = ["q", "organizationlegalname", "organizationlegalshortname", "country"];
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
public ORGANIZATION_FIELDS: { [key: string]: FieldDetails } = {
|
2022-06-01 12:27:46 +02:00
|
|
|
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
2020-06-05 14:56:28 +02:00
|
|
|
["organizationlegalname"]: {
|
|
|
|
name: "Legal Name",
|
|
|
|
type: "keyword",
|
|
|
|
param: "name",
|
|
|
|
operator: "nm",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["organizationlegalshortname"]: {
|
|
|
|
name: "Legal Short Name",
|
|
|
|
type: "keyword",
|
|
|
|
param: "shortname",
|
|
|
|
operator: "so",
|
|
|
|
equalityOperator: "=",
|
|
|
|
filterType: null
|
|
|
|
},
|
|
|
|
["country"]: {
|
|
|
|
name: "Country",
|
|
|
|
type: "vocabulary",
|
|
|
|
param: "country",
|
|
|
|
operator: "cu",
|
2022-06-02 16:44:56 +02:00
|
|
|
equalityOperator: " exact ",
|
2020-06-05 14:56:28 +02:00
|
|
|
filterType: "checkbox"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
// public ORGANIZATION_INDEX:string[] = ["organizationcountryname"]//,"organizationeclegalbody"];
|
|
|
|
// public ADVANCED_SEARCH_ORGANIZATION_PARAM:string[] = ["q","contenttype","compatibility","country","type"];
|
|
|
|
// public ORGANIZATION_INDEX_PARAM_MAP:{ [key:string]:string } = {["organizationlegalname"]:"contenttype", ["organizationlegalshortname"]:"type",
|
|
|
|
// ["organizationcountryname"]:"country"};//,["organizationeclegalbody"]:"type"};
|
|
|
|
// public ORGANIZATION_FIELDS_MAP: { [key:string]:{ name:string, operator:string, type:string, indexField:string , operator: "op", equalityOperator:string}} ={
|
2022-06-01 12:27:46 +02:00
|
|
|
// ["q"]:{name:"Any field",operator:"op", type:"keyword", indexField:null, operator: "op", equalityOperator: "="},
|
2020-06-05 14:56:28 +02:00
|
|
|
// ["contenttype"]:{name:"Legal Name",operator:"cn", type:"keyword" , indexField:"organizationlegalname", operator: "op", equalityOperator: "="},
|
|
|
|
// ["compatibility"]:{name:"Legal Short Name",operator:"cm", type:"keyword", indexField:"organizationlegalshortname", operator: "op", equalityOperator: "="},
|
|
|
|
// ["country"]:{name:"Country",operator:"cu", type:"vocabulary", indexField:"organizationcountryname", operator: "op", equalityOperator: " exact "},
|
|
|
|
// ["type"]:{name:"Type",operator:"tp", type:"refine", indexField:"organizationeclegalbody", operator: "op", equalityOperator: " exact "},
|
|
|
|
//
|
|
|
|
// };
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
|
2020-05-21 15:17:28 +02:00
|
|
|
//add project field depending on funder
|
2020-06-05 14:56:28 +02:00
|
|
|
public HIDDEN_FIELDS: string[] = ["fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id",
|
2023-05-12 17:52:13 +02:00
|
|
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject", "instancetypename"];
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
public DEPENDENT_FIELDS: { [key: string]: string } = {
|
|
|
|
["relproject"]: "relfunder",
|
|
|
|
["fundinglevel0_id"]: "funder",
|
|
|
|
["fundinglevel1_id"]: "fundinglevel0_id",
|
|
|
|
["fundinglevel2_id"]: "fundinglevel1_id",
|
|
|
|
["relfundinglevel0_id"]: "relfunder",
|
|
|
|
["relfundinglevel1_id"]: "relfundinglevel0_id",
|
2023-05-12 17:52:13 +02:00
|
|
|
["relfundinglevel2_id"]: "relfundinglevel1_id",
|
|
|
|
["instancetypename"]: "type"
|
2020-06-05 14:56:28 +02:00
|
|
|
};
|
2023-07-06 11:53:37 +02:00
|
|
|
|
|
|
|
|
2022-05-27 11:22:04 +02:00
|
|
|
public ADVANCED_SEARCH_OPERATORS: string[] = ["and", "or"];
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2021-11-03 20:08:16 +01:00
|
|
|
public COMMUNITIES_SEARCH_FIELDS: string[] = ["type", "access", "role"];
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
public STAKEHOLDER_SEARCH_FIELDS: string[] = ["type", "access", "role"];
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
constructor() {
|
|
|
|
}
|
2022-09-08 23:46:44 +02:00
|
|
|
|
|
|
|
getResultAdvancedFields() {
|
2022-09-30 13:51:00 +02:00
|
|
|
// if(properties.environment == "production") {
|
|
|
|
// this.RESULT_ADVANCED_FIELDS = this.RESULT_ADVANCED_FIELDS.filter((value, index, array) => {
|
|
|
|
// return value != "eoscifguidelines";
|
|
|
|
// })
|
|
|
|
// }
|
2022-09-08 23:46:44 +02:00
|
|
|
return this.RESULT_ADVANCED_FIELDS;
|
|
|
|
}
|
|
|
|
|
2022-05-30 11:44:39 +02:00
|
|
|
getField(fieldId: string, fieldType: string): any {
|
2020-06-05 14:56:28 +02:00
|
|
|
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
|
2022-05-30 11:44:39 +02:00
|
|
|
return this.RESULT_FIELDS[fieldId];
|
2020-06-05 14:56:28 +02:00
|
|
|
} else if (fieldType == "project") {
|
2022-05-30 11:44:39 +02:00
|
|
|
return this.PROJECT_FIELDS[fieldId];
|
2020-06-05 14:56:28 +02:00
|
|
|
} else if (fieldType == "organization") {
|
2022-05-30 11:44:39 +02:00
|
|
|
return this.ORGANIZATION_FIELDS[fieldId];
|
2020-06-05 14:56:28 +02:00
|
|
|
} else if (fieldType == "datasource" || fieldType == "dataprovider") {
|
2022-05-30 11:44:39 +02:00
|
|
|
return this.DATASOURCE_FIELDS[fieldId];
|
2022-05-13 14:57:31 +02:00
|
|
|
} else if (fieldType == "service") {
|
2022-05-30 11:44:39 +02:00
|
|
|
return this.DATASOURCE_FIELDS[fieldId];
|
2020-06-05 14:56:28 +02:00
|
|
|
} else {
|
2022-05-30 11:44:39 +02:00
|
|
|
return null;
|
2020-06-05 14:56:28 +02:00
|
|
|
}
|
|
|
|
}
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2022-05-30 11:44:39 +02:00
|
|
|
getFieldName(fieldId: string, fieldType: string): string {
|
2023-07-06 11:53:37 +02:00
|
|
|
let field = this.getField(fieldId, fieldType);
|
|
|
|
return field ? field.name : "UNDEFINED";
|
2022-05-30 11:44:39 +02:00
|
|
|
}
|
2022-06-23 16:30:45 +02:00
|
|
|
|
|
|
|
sortFieldsByName(fieldIds: string[], fieldIdsMap: { [key: string]: FieldDetails }) {
|
|
|
|
fieldIds.sort((a: string, b: string) => {
|
2023-07-06 11:53:37 +02:00
|
|
|
if (a == "q") {
|
2022-06-23 16:30:45 +02:00
|
|
|
return -1;
|
2023-07-06 11:53:37 +02:00
|
|
|
} else if (b == "q") {
|
2022-06-23 16:30:45 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
let nameA: string = fieldIdsMap[a].name;
|
|
|
|
let nameB: string = fieldIdsMap[b].name;
|
|
|
|
return nameA.localeCompare(nameB);
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
getFieldFilterType(fieldId: string, fieldType: string, usedBy: string = "search"): string {
|
2022-05-30 11:44:39 +02:00
|
|
|
let field = this.getField(fieldId, fieldType);
|
2023-07-06 11:53:37 +02:00
|
|
|
return field ? field.filterType : "checkbox";
|
2020-06-05 14:56:28 +02:00
|
|
|
}
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
getFieldParam(fieldId: string, fieldType: string): string {
|
2022-05-30 11:44:39 +02:00
|
|
|
let field = this.getField(fieldId, fieldType);
|
2023-07-06 11:53:37 +02:00
|
|
|
return field ? field.param : "UNDEFINED";
|
2020-02-17 15:19:14 +01:00
|
|
|
}
|
2023-07-06 11:53:37 +02:00
|
|
|
|
|
|
|
public static getParameterOrder(fieldId: string, params): number {
|
2021-05-19 09:39:08 +02:00
|
|
|
let fields = [];
|
2023-07-06 11:53:37 +02:00
|
|
|
let searchFields = new SearchFields();
|
|
|
|
if (searchFields.RESULT_REFINE_FIELDS.indexOf(fieldId) != -1) {
|
|
|
|
fields = searchFields.RESULT_REFINE_FIELDS;
|
|
|
|
} else if (searchFields.PROJECT_REFINE_FIELDS.indexOf(fieldId) != -1) {
|
|
|
|
fields = searchFields.PROJECT_REFINE_FIELDS
|
|
|
|
} else if (searchFields.ORGANIZATION_REFINE_FIELDS.indexOf(fieldId) != -1) {
|
|
|
|
fields = searchFields.ORGANIZATION_REFINE_FIELDS;
|
|
|
|
} else if (searchFields.DATASOURCE_REFINE_FIELDS.indexOf(fieldId) != -1) {
|
|
|
|
fields = searchFields.DATASOURCE_REFINE_FIELDS;
|
2021-05-19 09:39:08 +02:00
|
|
|
}
|
|
|
|
let index = fields.indexOf(fieldId);
|
2023-07-06 11:53:37 +02:00
|
|
|
let paramIndex = 0;
|
|
|
|
if (index != -1) {
|
|
|
|
for (let keyValue of params) {
|
|
|
|
if (fields.indexOf(keyValue[0]) > index) {
|
2021-05-19 09:39:08 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
paramIndex++
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return paramIndex;
|
|
|
|
}
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
/*
|
|
|
|
AND
|
|
|
|
Funder: relfunder, relfundinglevel0_id, relfundinglevel1_id, relfundinglevel2_id
|
|
|
|
Project: relproject
|
|
|
|
Community: community
|
|
|
|
OR
|
|
|
|
Type: instancetypename, datasourcetypeuiname
|
|
|
|
Language: resultlanguagename, datasourceodlanguages
|
|
|
|
Compatibility Level: datasourcecompatibilityname
|
|
|
|
Country: country
|
|
|
|
Content: datasourceodcontenttypes
|
[Monitor Dashboard & Library | new-theme]: Renaming entity types using OpenaireEntities.
Files updated: develop.component.ts, methodology.component.ts, claimEntitiesSelection.component.ts, directLinking.component.ts, linkingGeneric.component.html, linkingGeneric.component.ts, approved.component.ts, searchDataprovidersToDeposit.component.ts, errorPage.component.ts, dataProvider.component.html, dataProvider.component.ts, dataProvider.service.ts, relatedDatasourcesTab.component.ts, project.component.ts, myOrcidLinks.component.ts, searchMyOrcidResults.component.html, searchMyOrcidResults.component.ts, searchAll.component.html, searchAll.component.ts, advancedSearchForm.component.html, advancedSearchForm.component.ts, searchDataProviders.component.ts, searchResearchResults.service.ts, numbers.component.ts, other-portals.component.html, other-portals.component.ts, fetchDataproviders.class.ts, fetchResearchResults.class.ts, searchFields.ts, result-preview.component.ts
2022-05-09 12:13:44 +02:00
|
|
|
Datasource: resulthostingdatasource
|
2020-06-05 14:56:28 +02:00
|
|
|
Collected From: collectedfrom
|
|
|
|
BULLETS
|
|
|
|
Access Mode: resultbestaccessright
|
|
|
|
Special Clause 39: projectecsc39
|
|
|
|
Versioning:
|
|
|
|
|
|
|
|
RANGE
|
|
|
|
Publication date: resultacceptanceyear
|
|
|
|
Project life: projectstartyear, projectendyear
|
|
|
|
|
|
|
|
? WHAT ABOUT ?:
|
|
|
|
Subjects:
|
|
|
|
Supported Identifiers:
|
|
|
|
*/
|
2023-07-06 11:53:37 +02:00
|
|
|
|
2020-06-05 14:56:28 +02:00
|
|
|
getFieldOperator(fieldId: string): string {
|
|
|
|
if (fieldId == "relfunder" || fieldId == "relfundinglevel0_id" || fieldId == "relfundinglevel1_id" || fieldId == "relfundinglevel2_id"
|
2023-07-06 11:53:37 +02:00
|
|
|
|| fieldId == "relproject" || fieldId == "community" || fieldId == "projectendyear-range-projectstartyear") {
|
2020-06-05 14:56:28 +02:00
|
|
|
return "and";
|
2022-09-30 13:51:00 +02:00
|
|
|
} else if (fieldId == "instancetypename" || fieldId == "eoscdatasourcetype"
|
2023-07-06 11:53:37 +02:00
|
|
|
|| fieldId == "resultlanguagename" || fieldId == "datasourceodlanguages"
|
|
|
|
|| fieldId == "datasourcecompatibilityname" || fieldId == "country" || fieldId == "datasourceodcontenttypes"
|
|
|
|
|| fieldId == "resulthostingdatasource" || fieldId == "collectedfrom") {
|
2020-06-05 14:56:28 +02:00
|
|
|
return "or";
|
|
|
|
}
|
|
|
|
return "or";
|
2019-09-12 12:30:48 +02:00
|
|
|
}
|
2017-12-19 13:53:46 +01:00
|
|
|
}
|
2020-06-05 14:56:28 +02:00
|
|
|
|
|
|
|
export class FieldDetails {
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
param: string;
|
|
|
|
equalityOperator: string;
|
|
|
|
operator: string;
|
|
|
|
filterType: string = "checkbox";
|
|
|
|
}
|
2022-04-08 15:54:45 +02:00
|
|
|
|
|
|
|
export enum OpenaireEntities {
|
2022-04-19 17:47:38 +02:00
|
|
|
RESULTS = "Research products",
|
2022-04-08 15:54:45 +02:00
|
|
|
PUBLICATIONS = "Publications",
|
|
|
|
DATASETS = "Research data",
|
2022-04-19 17:47:38 +02:00
|
|
|
SOFTWARE = "Research software",
|
2022-04-08 15:54:45 +02:00
|
|
|
OTHER = "Other research products",
|
|
|
|
PROJECTS = "Projects",
|
|
|
|
ORGANIZATIONS = "Organizations",
|
2022-05-18 11:31:46 +02:00
|
|
|
DATASOURCES = "Data sources",
|
2022-05-13 14:57:31 +02:00
|
|
|
SERVICES = "Services",
|
2022-05-03 13:22:53 +02:00
|
|
|
COMMUNITIES = "Research communities",
|
|
|
|
|
|
|
|
RESULT = "Research product",
|
|
|
|
PUBLICATION = "Publication",
|
|
|
|
DATASET = "Research data",
|
|
|
|
SOFTWARE_SINGULAR = "Research software",
|
|
|
|
OTHER_SINGULAR = "Other research product",
|
|
|
|
PROJECT = "Project",
|
|
|
|
ORGANIZATION = "Organization",
|
2022-05-18 11:31:46 +02:00
|
|
|
DATASOURCE = "Data source",
|
2022-05-13 14:57:31 +02:00
|
|
|
SERVICE = "Service",
|
2022-05-05 19:29:55 +02:00
|
|
|
COMMUNITY = "Research community",
|
|
|
|
|
|
|
|
RESULTS_FILE = "research-products",
|
|
|
|
PUBLICATIONS_FILE = "publications",
|
|
|
|
DATASETS_FILE = "research-data",
|
|
|
|
SOFTWARE_FILE = "research-software",
|
|
|
|
OTHER_FILE = "other-research-products",
|
|
|
|
PROJECTS_FILE = "projects",
|
|
|
|
ORGANIZATIONS_FILE = "organizations",
|
2022-05-18 11:31:46 +02:00
|
|
|
DATASOURCES_FILE = "data-sources",
|
2022-05-13 14:57:31 +02:00
|
|
|
SERVICES_FILE = "services",
|
2022-04-08 15:54:45 +02:00
|
|
|
}
|