openaire-library/utils/properties/searchFields.ts

896 lines
27 KiB
TypeScript
Raw Normal View History

import {Filter} from "../../searchPages/searchUtils/searchHelperClasses.class";
import {properties} from "../../../../environments/environment";
export class SearchFields {
//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
// "resultacceptanceyear",
public RESULT_RANGE_FIELDS = [
["resultacceptanceyear", "resultacceptanceyear"]
];
// Remove Collected From Filter "collectedfrom","collectedfrom"
public RESULT_REFINE_FIELDS = [
"resultbestaccessright", "instancetypename", (properties.environment !== 'production' ? "foslabel" : "fos"), "relfunder",
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];
public RESULT_ADVANCED_FIELDS: string[] = ["q", "resulttitle", "resultauthor", "authorid", "resultdescription", "resultsubject", "eoscifguidelines", "resultpublisher",
"resultbestaccessright", "community", "collectedfromdatasourceid", "resulthostingdatasourceid", "resultdateofacceptance",
"relfunder",
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
"resultlanguagename", "relorganizationid", "pid", "relprojectid", "instancetypename", "fos", "sdg"];
public RESULT_FIELDS: { [key: string]: FieldDetails } = {
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
["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
},
["eoscifguidelines"]: {
name: "EOSC Subject",
type: "refine",
param: "eoscSubj",
operator: "es",
equalityOperator: " exact ",
filterType: null
},
["resultdescription"]: {
name: "Abstract",
type: "keyword",
param: "description",
operator: "ds",
equalityOperator: "=",
filterType: null
},
["resultpublisher"]: {
name: "Publisher",
type: "keyword",
param: "publisher",
operator: "pb",
equalityOperator: "=",
filterType: null
},
["pid"]: {
name: "PID",
type: "keyword",
param: "pid",
operator: "pd",
equalityOperator: " exact ",
filterType: null
},
["resulthostingdatasourceid"]: {
name: "Hosting " + OpenaireEntities.DATASOURCE,
type: "entity",
param: "hostedBy",
operator: "hs",
equalityOperator: " exact ",
filterType: null
},
["resulthostingdatasource"]: {
name: "Source",
type: "refine",
param: "hostedBy",
operator: "hs",
equalityOperator: " exact ",
filterType: "checkbox"
},
["instancetypename"]: {
name: "Document Type",
type: "vocabulary",
param: "type",
operator: "tp",
equalityOperator: " exact ",
filterType: "checkbox"
},
["resultlanguagename"]: {
name: "Language",
type: "vocabulary",
param: "lang",
operator: "ln",
equalityOperator: " exact ",
filterType: "checkbox"
},
["community"]: {
name: OpenaireEntities.COMMUNITY,
type: "refine",
param: "community",
operator: "cm",
equalityOperator: " exact ",
filterType: "checkbox"
},
["relproject"]: {
name: "Project",
type: "refine",
param: "project",
operator: "po",
equalityOperator: " exact ",
filterType: "checkbox"
},
["relprojectid"]: {
name: OpenaireEntities.PROJECT,
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"]: {
name: "Access",
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"]: {
name: "Collected from " + OpenaireEntities.DATASOURCE,
type: "entity",
param: "collectedFrom",
operator: "cl",
equalityOperator: " exact ",
filterType: null
},
["resulttypeid"]: {
name: "Type",
type: "refine",
param: "types",
operator: "tp",
equalityOperator: " exact ",
filterType: "radio"
},
["country"]: {
name: "Country",
type: "refine",
param: "country",
operator: "cu",
equalityOperator: " exact ",
filterType: "checkbox"
},
["sdg"]: {
name: "SDG [Beta]",
type: "vocabulary",
param: "sdg",
operator: "sg",
equalityOperator: " exact ",
filterType: "checkbox"
},
["fos"]: {
name: "Field of Science [Beta]",
type: "vocabulary",
param: "fos",
operator: "fs",
equalityOperator: " exact ",
filterType: "checkbox"
},
["foslabel"]: {
name: "Field of Science [Beta]",
type: "vocabulary",
param: "foslabel",
operator: "fl",
equalityOperator: " exact ",
filterType: "checkbox"
}
};
//PROJECT
public PROJECT_RANGE_FIELDS = [
["projectendyear", "projectstartyear"]
];
public PROJECT_REFINE_FIELDS: string[] = ["funder", "fundinglevel0_id", "fundinglevel1_id",
"fundinglevel2_id", "projectoamandatepublications", "projectstartyear", "projectendyear"];
public PROJECT_ADVANCED_FIELDS: string[] = ["q", "projectacronym", "projecttitle", "projectkeywords",
"funder", "fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id",
"projectstartdate", "projectenddate",
"projectcode_nt", "relorganizationid", "collectedfromdatasourceid"];
public PROJECT_FIELDS: { [key: string]: FieldDetails } = {
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
["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"]: {
name: "Keyword",
type: "keyword",
param: "keywords",
operator: "ky",
equalityOperator: "=",
filterType: null
},
["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
},
// ["projectecsc39"]: {
// name: "Special Clause 39",
// type: "boolean",
// param: "sc39",
// operator: "sc",
// equalityOperator: " exact ",
// filterType: "radio"
// },
["projectoamandatepublications"]: {
name: "OA " + OpenaireEntities.PUBLICATIONS + " Mandate",
type: "boolean",
param: "oapubl",
operator: "oap",
equalityOperator: " exact ",
filterType: "radio"
},
["projectoamandatedata"]: {
name: "OA " + OpenaireEntities.DATASETS + " Mandate",
type: "boolean",
param: "oadata",
operator: "oad",
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"]: {
name: "Collected from " + OpenaireEntities.DATASOURCE,
type: "entity",
param: "collectedFrom",
operator: "cl",
equalityOperator: " exact ",
filterType: null
}
};
//DATAPROVIDERS
// add Collected From Filter "collectedfromname"
[Eosc Explore]: Updated some styles | Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" | Do not add hardcoded compatibility label "Not yet registered" | Bug fix in Access filter 1. styles.less: Renamed from styles.css and added imports of less files and portal-custom.css (to be updated). 2. angular.json: In styles configuration added styles.less. 3. index.html & beta/index.html: In beta badge, used background instead of background-color to css rules. 4. portal-custom.css: Added rule for .search-form to inherit color in background. 5. searchFields.ts: a. Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources refine filter "Type". b. In method "getResultAdvancedFields()" return always RESULT_ADVANCED_FIELDS without excluding "eoscifguidelines". 6. datasourcesHelper.class.ts: Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources queries and used updated type names "Research Entity Registry" (old "Registry") and "Journal Archive" (old "Journal archive"). 7. cache-interceptor.service.ts: Updated cachingRequests array, using new "eoscdatasourcetype" and its values. 8. dataProvider.component.html && result-preview.component.html: Do not add hardcoded compatibility label "Not yet registered" and updated checks. 9. resultLanding.service.ts & parsingFunctions.class.ts: Parse resultLandingInfo.eoscSubjects only by "eoscifguidelines" field not "subjects". 10. searchFilter.component.ts: [Bug fix] In Access filter, fixed bug in view all, when clearing the preselected value. * Do not forget to add in package.json in devDependencies, "@types/express-serve-static-core": "4.17.28"
2022-09-30 13:51:00 +02:00
public DATASOURCE_REFINE_FIELDS: string[] = ["eoscdatasourcetype", "datasourceodlanguages", "datasourceodcontenttypes",
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
"datasourcejurisdiction"];
public DATASOURCE_ADVANCED_FIELDS: string[] = ["q", "datasourceofficialname",
"datasourceenglishname", "datasourceodsubjects", "datasourcetypename", "datasourceodlanguages",
"datasourceodcontenttypes", "datasourcecompatibilityname", "relorganizationid", "collectedfromdatasourceid", "pid"];
public DATASOURCE_FIELDS: { [key: string]: FieldDetails } = {
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
["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 ",
filterType: "radio"
},
[Eosc Explore]: Updated some styles | Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" | Do not add hardcoded compatibility label "Not yet registered" | Bug fix in Access filter 1. styles.less: Renamed from styles.css and added imports of less files and portal-custom.css (to be updated). 2. angular.json: In styles configuration added styles.less. 3. index.html & beta/index.html: In beta badge, used background instead of background-color to css rules. 4. portal-custom.css: Added rule for .search-form to inherit color in background. 5. searchFields.ts: a. Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources refine filter "Type". b. In method "getResultAdvancedFields()" return always RESULT_ADVANCED_FIELDS without excluding "eoscifguidelines". 6. datasourcesHelper.class.ts: Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources queries and used updated type names "Research Entity Registry" (old "Registry") and "Journal Archive" (old "Journal archive"). 7. cache-interceptor.service.ts: Updated cachingRequests array, using new "eoscdatasourcetype" and its values. 8. dataProvider.component.html && result-preview.component.html: Do not add hardcoded compatibility label "Not yet registered" and updated checks. 9. resultLanding.service.ts & parsingFunctions.class.ts: Parse resultLandingInfo.eoscSubjects only by "eoscifguidelines" field not "subjects". 10. searchFilter.component.ts: [Bug fix] In Access filter, fixed bug in view all, when clearing the preselected value. * Do not forget to add in package.json in devDependencies, "@types/express-serve-static-core": "4.17.28"
2022-09-30 13:51:00 +02:00
["eoscdatasourcetype"]: {
name: "Type",
type: "refine",
param: "type",
operator: "tp",
equalityOperator: " exact ",
filterType: "radio"
},
["datasourcetypename"]: {
name: "Type",
type: "vocabulary",
param: "type",
operator: "tp",
equalityOperator: " exact ",
filterType: "radio"
},
["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"]: {
name: "Collected from " + OpenaireEntities.DATASOURCE,
type: "entity",
param: "collectedFrom",
operator: "cl",
equalityOperator: " exact ",
filterType: null
},
["country"]: {
name: "Country",
type: "vocabulary",
param: "country",
operator: "cu",
equalityOperator: " exact ",
filterType: "checkbox"
},
["datasourcethematic"]: {
name: "Thematic",
type: "boolean",
param: "thematic",
operator: "th",
equalityOperator: " exact ",
filterType: "radio"
},
["datasourcejurisdiction"]: {
name: "Jurisdiction",
type: "vocabulary",
param: "jurisdiction",
operator: "ju",
equalityOperator: " exact ",
filterType: "checkbox"
},
["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " exact ", filterType: null}
};
public DEPOSIT_DATASOURCE_KEYWORD_FIELDS: { "name": string, "equalityOperator": string } [] = [
{"name": "relorganizationname", "equalityOperator": "="},
{"name": "relorganizationshortname", "equalityOperator": "="},
{"name": "datasourceofficialname", "equalityOperator": "="},
{"name": "datasourceenglishname", "equalityOperator": "="},
[Eosc Explore]: Updated some styles | Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" | Do not add hardcoded compatibility label "Not yet registered" | Bug fix in Access filter 1. styles.less: Renamed from styles.css and added imports of less files and portal-custom.css (to be updated). 2. angular.json: In styles configuration added styles.less. 3. index.html & beta/index.html: In beta badge, used background instead of background-color to css rules. 4. portal-custom.css: Added rule for .search-form to inherit color in background. 5. searchFields.ts: a. Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources refine filter "Type". b. In method "getResultAdvancedFields()" return always RESULT_ADVANCED_FIELDS without excluding "eoscifguidelines". 6. datasourcesHelper.class.ts: Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources queries and used updated type names "Research Entity Registry" (old "Registry") and "Journal Archive" (old "Journal archive"). 7. cache-interceptor.service.ts: Updated cachingRequests array, using new "eoscdatasourcetype" and its values. 8. dataProvider.component.html && result-preview.component.html: Do not add hardcoded compatibility label "Not yet registered" and updated checks. 9. resultLanding.service.ts & parsingFunctions.class.ts: Parse resultLandingInfo.eoscSubjects only by "eoscifguidelines" field not "subjects". 10. searchFilter.component.ts: [Bug fix] In Access filter, fixed bug in view all, when clearing the preselected value. * Do not forget to add in package.json in devDependencies, "@types/express-serve-static-core": "4.17.28"
2022-09-30 13:51:00 +02:00
{"name": "eoscdatasourcetype", "equalityOperator": " exact "},
{"name": "country", "equalityOperator": " exact "},
{"name": "datasourcesubject", "equalityOperator": " all "}
];
public DEPOSIT_DATASOURCE_REFINE_FIELDS: string[] = ["datasourcetypename", "country", "datasourceodsubjects", "datasourceodcontenttypes", "datasourcecompatibilityname", "datasourcethematic", "datasourcejurisdiction"];
public DEPOSIT_DATASOURCE_FIELDS: { [key: string]: FieldDetails } = {
["datasourcetypeuiname"]: {
name: "Repository type",
type: "refine",
param: "type",
operator: "tp",
equalityOperator: " exact ",
filterType: "radio"
},
[Eosc Explore]: Updated some styles | Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" | Do not add hardcoded compatibility label "Not yet registered" | Bug fix in Access filter 1. styles.less: Renamed from styles.css and added imports of less files and portal-custom.css (to be updated). 2. angular.json: In styles configuration added styles.less. 3. index.html & beta/index.html: In beta badge, used background instead of background-color to css rules. 4. portal-custom.css: Added rule for .search-form to inherit color in background. 5. searchFields.ts: a. Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources refine filter "Type". b. In method "getResultAdvancedFields()" return always RESULT_ADVANCED_FIELDS without excluding "eoscifguidelines". 6. datasourcesHelper.class.ts: Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources queries and used updated type names "Research Entity Registry" (old "Registry") and "Journal Archive" (old "Journal archive"). 7. cache-interceptor.service.ts: Updated cachingRequests array, using new "eoscdatasourcetype" and its values. 8. dataProvider.component.html && result-preview.component.html: Do not add hardcoded compatibility label "Not yet registered" and updated checks. 9. resultLanding.service.ts & parsingFunctions.class.ts: Parse resultLandingInfo.eoscSubjects only by "eoscifguidelines" field not "subjects". 10. searchFilter.component.ts: [Bug fix] In Access filter, fixed bug in view all, when clearing the preselected value. * Do not forget to add in package.json in devDependencies, "@types/express-serve-static-core": "4.17.28"
2022-09-30 13:51:00 +02:00
["eoscdatasourcetype"]: {
name: "Repository type",
type: "refine",
param: "type",
operator: "tp",
equalityOperator: " exact ",
filterType: "radio"
},
["country"]: {
name: "Countries",
type: "vocabulary",
param: "country",
operator: "cu",
equalityOperator: " exact ",
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"
},
};
[Explore | Library | new-theme]: Added more refine filters in Repositories, Journals, Registries pages | Search & Datasource landing: Show not compatible datasources | Result Landing: get relations names by relationsVocabulary (dnet:relation_relClass.json). 1. env-properties.ts & environments/: Removed old properties searchLinkToEntityRegistriesDataProvidersTable and searchLinkToJournalsTable. 2. fetchDataproviders.class.ts & searchDataproviders.service.ts: Removed old unused methods related to subjects/ tables/ csv. 3. searchFields.ts: Added more refine filters in Repositories, Journals, Registries pages (COMPATIBLE_DATAPROVIDER_FIELDS, ENTITY_REGISTRIES_FIELDS, JOURNAL_FIELDS). 4. result-preview.component.ts: Added field @Input() deposit: boolean = false; 5. result-preview.component.html: a. Added link to landing page even for not compatible datasources. b. Added class "uk-label-danger" when compatibility = "not available" only when deposit=true. 6. searchResultsInDeposit.component.html: In <result-preview> added parameter deposit="true". 7. dataProvider.component.html: a. Added class "uk-label-danger" when compatibility = "not available". b. Show custom "Not yet registered" compatibility label when compatibility = "not available". 8. ISVocabularies.service.ts: Added methods for getting relationsVocabulary (dnet:relation_relClass.json). 9. resultLanding.service.ts & parsingFunctions.class.ts: When parsing relations, get relationName from relationsVocabulary. 10. resultLanding.component.ts: Get relationsVocabulary and pass it to "getResultLandingInfo()". 11. orcid-work.component.ts: When calling "getResultLandingInfo()", added null parameter for relationsVocabulary. 12. configuration.service.ts: [Bug fix] Added more checks in method "isPageEnabledByStateAsync()".
2022-08-03 17:21:14 +02:00
// public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
[Explore | Library | new-theme]: Added more refine filters in Repositories, Journals, Registries pages | Search & Datasource landing: Show not compatible datasources | Result Landing: get relations names by relationsVocabulary (dnet:relation_relClass.json). 1. env-properties.ts & environments/: Removed old properties searchLinkToEntityRegistriesDataProvidersTable and searchLinkToJournalsTable. 2. fetchDataproviders.class.ts & searchDataproviders.service.ts: Removed old unused methods related to subjects/ tables/ csv. 3. searchFields.ts: Added more refine filters in Repositories, Journals, Registries pages (COMPATIBLE_DATAPROVIDER_FIELDS, ENTITY_REGISTRIES_FIELDS, JOURNAL_FIELDS). 4. result-preview.component.ts: Added field @Input() deposit: boolean = false; 5. result-preview.component.html: a. Added link to landing page even for not compatible datasources. b. Added class "uk-label-danger" when compatibility = "not available" only when deposit=true. 6. searchResultsInDeposit.component.html: In <result-preview> added parameter deposit="true". 7. dataProvider.component.html: a. Added class "uk-label-danger" when compatibility = "not available". b. Show custom "Not yet registered" compatibility label when compatibility = "not available". 8. ISVocabularies.service.ts: Added methods for getting relationsVocabulary (dnet:relation_relClass.json). 9. resultLanding.service.ts & parsingFunctions.class.ts: When parsing relations, get relationName from relationsVocabulary. 10. resultLanding.component.ts: Get relationsVocabulary and pass it to "getResultLandingInfo()". 11. orcid-work.component.ts: When calling "getResultLandingInfo()", added null parameter for relationsVocabulary. 12. configuration.service.ts: [Bug fix] Added more checks in method "isPageEnabledByStateAsync()".
2022-08-03 17:21:14 +02:00
"datasourcejurisdiction"];
// public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
[Explore | Library | new-theme]: Added more refine filters in Repositories, Journals, Registries pages | Search & Datasource landing: Show not compatible datasources | Result Landing: get relations names by relationsVocabulary (dnet:relation_relClass.json). 1. env-properties.ts & environments/: Removed old properties searchLinkToEntityRegistriesDataProvidersTable and searchLinkToJournalsTable. 2. fetchDataproviders.class.ts & searchDataproviders.service.ts: Removed old unused methods related to subjects/ tables/ csv. 3. searchFields.ts: Added more refine filters in Repositories, Journals, Registries pages (COMPATIBLE_DATAPROVIDER_FIELDS, ENTITY_REGISTRIES_FIELDS, JOURNAL_FIELDS). 4. result-preview.component.ts: Added field @Input() deposit: boolean = false; 5. result-preview.component.html: a. Added link to landing page even for not compatible datasources. b. Added class "uk-label-danger" when compatibility = "not available" only when deposit=true. 6. searchResultsInDeposit.component.html: In <result-preview> added parameter deposit="true". 7. dataProvider.component.html: a. Added class "uk-label-danger" when compatibility = "not available". b. Show custom "Not yet registered" compatibility label when compatibility = "not available". 8. ISVocabularies.service.ts: Added methods for getting relationsVocabulary (dnet:relation_relClass.json). 9. resultLanding.service.ts & parsingFunctions.class.ts: When parsing relations, get relationName from relationsVocabulary. 10. resultLanding.component.ts: Get relationsVocabulary and pass it to "getResultLandingInfo()". 11. orcid-work.component.ts: When calling "getResultLandingInfo()", added null parameter for relationsVocabulary. 12. configuration.service.ts: [Bug fix] Added more checks in method "isPageEnabledByStateAsync()".
2022-08-03 17:21:14 +02:00
"datasourcejurisdiction"];
// public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
[Explore | Library | new-theme]: Added more refine filters in Repositories, Journals, Registries pages | Search & Datasource landing: Show not compatible datasources | Result Landing: get relations names by relationsVocabulary (dnet:relation_relClass.json). 1. env-properties.ts & environments/: Removed old properties searchLinkToEntityRegistriesDataProvidersTable and searchLinkToJournalsTable. 2. fetchDataproviders.class.ts & searchDataproviders.service.ts: Removed old unused methods related to subjects/ tables/ csv. 3. searchFields.ts: Added more refine filters in Repositories, Journals, Registries pages (COMPATIBLE_DATAPROVIDER_FIELDS, ENTITY_REGISTRIES_FIELDS, JOURNAL_FIELDS). 4. result-preview.component.ts: Added field @Input() deposit: boolean = false; 5. result-preview.component.html: a. Added link to landing page even for not compatible datasources. b. Added class "uk-label-danger" when compatibility = "not available" only when deposit=true. 6. searchResultsInDeposit.component.html: In <result-preview> added parameter deposit="true". 7. dataProvider.component.html: a. Added class "uk-label-danger" when compatibility = "not available". b. Show custom "Not yet registered" compatibility label when compatibility = "not available". 8. ISVocabularies.service.ts: Added methods for getting relationsVocabulary (dnet:relation_relClass.json). 9. resultLanding.service.ts & parsingFunctions.class.ts: When parsing relations, get relationName from relationsVocabulary. 10. resultLanding.component.ts: Get relationsVocabulary and pass it to "getResultLandingInfo()". 11. orcid-work.component.ts: When calling "getResultLandingInfo()", added null parameter for relationsVocabulary. 12. configuration.service.ts: [Bug fix] Added more checks in method "isPageEnabledByStateAsync()".
2022-08-03 17:21:14 +02:00
"datasourcejurisdiction"];
//ORGANIZATION
public ORGANIZATION_REFINE_FIELDS: string[] = ["country"]
public ORGANIZATION_ADVANCED_FIELDS: string[] = ["q", "organizationlegalname", "organizationlegalshortname", "country"];
public ORGANIZATION_FIELDS: { [key: string]: FieldDetails } = {
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
["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",
equalityOperator: " exact ",
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}} ={
// ["q"]:{name:"Any field",operator:"op", type:"keyword", indexField:null, operator: "op", equalityOperator: "="},
// ["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 "},
//
// };
//add project field depending on funder
public HIDDEN_FIELDS: string[] = ["fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id",
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject", "instancetypename"];
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",
["relfundinglevel2_id"]: "relfundinglevel1_id",
["instancetypename"]: "type"
};
public ADVANCED_SEARCH_OPERATORS: string[] = ["and", "or"];
2021-11-03 20:08:16 +01:00
public COMMUNITIES_SEARCH_FIELDS: string[] = ["type", "access", "role"];
public STAKEHOLDER_SEARCH_FIELDS: string[] = ["type", "access", "role"];
constructor() {
}
getResultAdvancedFields() {
[Eosc Explore]: Updated some styles | Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" | Do not add hardcoded compatibility label "Not yet registered" | Bug fix in Access filter 1. styles.less: Renamed from styles.css and added imports of less files and portal-custom.css (to be updated). 2. angular.json: In styles configuration added styles.less. 3. index.html & beta/index.html: In beta badge, used background instead of background-color to css rules. 4. portal-custom.css: Added rule for .search-form to inherit color in background. 5. searchFields.ts: a. Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources refine filter "Type". b. In method "getResultAdvancedFields()" return always RESULT_ADVANCED_FIELDS without excluding "eoscifguidelines". 6. datasourcesHelper.class.ts: Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources queries and used updated type names "Research Entity Registry" (old "Registry") and "Journal Archive" (old "Journal archive"). 7. cache-interceptor.service.ts: Updated cachingRequests array, using new "eoscdatasourcetype" and its values. 8. dataProvider.component.html && result-preview.component.html: Do not add hardcoded compatibility label "Not yet registered" and updated checks. 9. resultLanding.service.ts & parsingFunctions.class.ts: Parse resultLandingInfo.eoscSubjects only by "eoscifguidelines" field not "subjects". 10. searchFilter.component.ts: [Bug fix] In Access filter, fixed bug in view all, when clearing the preselected value. * Do not forget to add in package.json in devDependencies, "@types/express-serve-static-core": "4.17.28"
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";
// })
// }
return this.RESULT_ADVANCED_FIELDS;
}
getField(fieldId: string, fieldType: string): any {
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
return this.RESULT_FIELDS[fieldId];
} else if (fieldType == "project") {
return this.PROJECT_FIELDS[fieldId];
} else if (fieldType == "organization") {
return this.ORGANIZATION_FIELDS[fieldId];
} else if (fieldType == "datasource" || fieldType == "dataprovider") {
return this.DATASOURCE_FIELDS[fieldId];
2022-05-13 14:57:31 +02:00
} else if (fieldType == "service") {
return this.DATASOURCE_FIELDS[fieldId];
} else {
return null;
}
}
getFieldName(fieldId: string, fieldType: string): string {
let field = this.getField(fieldId, fieldType);
return field ? field.name : "UNDEFINED";
}
sortFieldsByName(fieldIds: string[], fieldIdsMap: { [key: string]: FieldDetails }) {
fieldIds.sort((a: string, b: string) => {
if (a == "q") {
return -1;
} else if (b == "q") {
return 1;
}
let nameA: string = fieldIdsMap[a].name;
let nameB: string = fieldIdsMap[b].name;
return nameA.localeCompare(nameB);
})
}
getFieldFilterType(fieldId: string, fieldType: string, usedBy: string = "search"): string {
let field = this.getField(fieldId, fieldType);
return field ? field.filterType : "checkbox";
}
getFieldParam(fieldId: string, fieldType: string): string {
let field = this.getField(fieldId, fieldType);
return field ? field.param : "UNDEFINED";
}
public static getParameterOrder(fieldId: string, params): number {
let fields = [];
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;
}
let index = fields.indexOf(fieldId);
let paramIndex = 0;
if (index != -1) {
for (let keyValue of params) {
if (fields.indexOf(keyValue[0]) > index) {
break;
}
paramIndex++
}
}
return paramIndex;
}
/*
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
Datasource: resulthostingdatasource
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:
*/
getFieldOperator(fieldId: string): string {
if (fieldId == "relfunder" || fieldId == "relfundinglevel0_id" || fieldId == "relfundinglevel1_id" || fieldId == "relfundinglevel2_id"
|| fieldId == "relproject" || fieldId == "community" || fieldId == "projectendyear-range-projectstartyear") {
return "and";
[Eosc Explore]: Updated some styles | Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" | Do not add hardcoded compatibility label "Not yet registered" | Bug fix in Access filter 1. styles.less: Renamed from styles.css and added imports of less files and portal-custom.css (to be updated). 2. angular.json: In styles configuration added styles.less. 3. index.html & beta/index.html: In beta badge, used background instead of background-color to css rules. 4. portal-custom.css: Added rule for .search-form to inherit color in background. 5. searchFields.ts: a. Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources refine filter "Type". b. In method "getResultAdvancedFields()" return always RESULT_ADVANCED_FIELDS without excluding "eoscifguidelines". 6. datasourcesHelper.class.ts: Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources queries and used updated type names "Research Entity Registry" (old "Registry") and "Journal Archive" (old "Journal archive"). 7. cache-interceptor.service.ts: Updated cachingRequests array, using new "eoscdatasourcetype" and its values. 8. dataProvider.component.html && result-preview.component.html: Do not add hardcoded compatibility label "Not yet registered" and updated checks. 9. resultLanding.service.ts & parsingFunctions.class.ts: Parse resultLandingInfo.eoscSubjects only by "eoscifguidelines" field not "subjects". 10. searchFilter.component.ts: [Bug fix] In Access filter, fixed bug in view all, when clearing the preselected value. * Do not forget to add in package.json in devDependencies, "@types/express-serve-static-core": "4.17.28"
2022-09-30 13:51:00 +02:00
} else if (fieldId == "instancetypename" || fieldId == "eoscdatasourcetype"
|| fieldId == "resultlanguagename" || fieldId == "datasourceodlanguages"
|| fieldId == "datasourcecompatibilityname" || fieldId == "country" || fieldId == "datasourceodcontenttypes"
|| fieldId == "resulthostingdatasource" || fieldId == "collectedfrom") {
return "or";
}
return "or";
}
}
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 {
RESULTS = "Research products",
2022-04-08 15:54:45 +02:00
PUBLICATIONS = "Publications",
DATASETS = "Research data",
SOFTWARE = "Research software",
2022-04-08 15:54:45 +02:00
OTHER = "Other research products",
PROJECTS = "Projects",
ORGANIZATIONS = "Organizations",
DATASOURCES = "Data sources",
2022-05-13 14:57:31 +02:00
SERVICES = "Services",
COMMUNITIES = "Research communities",
RESULT = "Research product",
PUBLICATION = "Publication",
DATASET = "Research data",
SOFTWARE_SINGULAR = "Research software",
OTHER_SINGULAR = "Other research product",
PROJECT = "Project",
ORGANIZATION = "Organization",
DATASOURCE = "Data source",
2022-05-13 14:57:31 +02:00
SERVICE = "Service",
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",
DATASOURCES_FILE = "data-sources",
2022-05-13 14:57:31 +02:00
SERVICES_FILE = "services",
2022-04-08 15:54:45 +02:00
}