Production release (for EOSC EXPLORE) December 2023 #24
|
@ -557,8 +557,8 @@ export class ClaimInsertComponent {
|
|||
getStatus(){
|
||||
if(this.feedRecordsJob && ! (this.feedRecordsJob.status == "COMPLETE" || this.feedRecordsJob.status == "ERROR") ) {
|
||||
this.subscriptions.push(this.claimService.getStatus(this.feedRecordsJob.id, this.properties.claimsAPIURL).subscribe(data => {
|
||||
console.log("feed", data);
|
||||
this.feedRecordsJob = data.data;
|
||||
// console.log("feed", this.feedRecordsJob.status);
|
||||
if (this.feedRecordsJob.status == "COMPLETE" || data.data.status == "ERROR") {
|
||||
this.insertedRecords = this.feedRecordsJob.insertedIds;
|
||||
this.errorInRecords = this.feedRecordsJob.errorInClaims;
|
||||
|
@ -577,9 +577,9 @@ export class ClaimInsertComponent {
|
|||
}
|
||||
if(this.claimsJob) {
|
||||
this.subscriptions.push(this.claimService.getStatus(this.claimsJob.id, this.properties.claimsAPIURL).subscribe(data => {
|
||||
console.log("claim", data);
|
||||
this.claimsJob = data.data;
|
||||
if ((this.claimsJob.status == "COMPLETE" || data.data.status == "ERROR") && ( !this.feedRecordsJob || !(this.feedRecordsJob.status == "COMPLETE" || data.data.status == "ERROR")) ) {
|
||||
// console.log("claim: ", this.claimsJob.status, this.feedRecordsJob.status?this.feedRecordsJob.status:" no feed job");
|
||||
if ((this.claimsJob.status == "COMPLETE" || data.data.status == "ERROR") && ( !this.feedRecordsJob || (this.feedRecordsJob.status == "COMPLETE" || data.data.status == "ERROR")) ) {
|
||||
this.insertedClaims = this.claimsJob.insertedIds;
|
||||
this.errorInClaims = this.claimsJob.errorInClaims;
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@ import {StringUtils} from "../../utils/string-utils.class";
|
|||
})
|
||||
export class ParsingFunctions {
|
||||
public eoscSubjects = [
|
||||
{label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:"EOSC%5C:%5C:Jupyter%20Notebook"', value: 'Jupyter Notebook'},
|
||||
{label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/data-source?q=*&fq=tag_list:%22eosc%5C:%5C:ro%5C-crate%22', value: 'RO-crate'},
|
||||
{label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22eosc%5C:%5C:galaxy%20workflow%22', value: 'Galaxy Workflow'},
|
||||
{label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22EOSC%5C:%5C:Twitter%20Data%22', value: 'Twitter Data'},
|
||||
{label: 'EOSC::Data Cube', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22EOSC%5C:%5C:Data%20Cube%22', value: 'Data Cube'}
|
||||
{label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22Jupyter%20Notebook%22', value: 'Jupyter Notebook'},
|
||||
{label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22RO%5C-crate%22', value: 'RO-crate'},
|
||||
{label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22Galaxy%20Workflow%22', value: 'Galaxy Workflow'},
|
||||
{label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22Twitter%20Data%22', value: 'Twitter Data'},
|
||||
{label: 'EOSC::Data Cube', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22Data%20Cube%22', value: 'Data Cube'}
|
||||
]
|
||||
public notebookInSubjects: boolean = false;
|
||||
private notebookKeyword: string = "eosc jupyter notebook";
|
||||
|
|
|
@ -48,6 +48,7 @@ import {properties} from "src/environments/environment";
|
|||
import {NotificationHandler} from "../../utils/notification-handler";
|
||||
|
||||
declare var UIkit;
|
||||
declare var copy;
|
||||
|
||||
@Component({
|
||||
selector: 'indicators',
|
||||
|
@ -1476,17 +1477,15 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
|||
}
|
||||
|
||||
copyToClipboard(value) {
|
||||
const tempBox = document.createElement('textarea');
|
||||
const tempBox = document.createElement('div');
|
||||
tempBox.id = 'tempBox';
|
||||
tempBox.style.position = 'fixed';
|
||||
tempBox.style.left = '0';
|
||||
tempBox.style.top = '0';
|
||||
tempBox.style.opacity = '0';
|
||||
tempBox.value = value;
|
||||
tempBox.innerHTML = value.toString();
|
||||
document.body.appendChild(tempBox);
|
||||
tempBox.focus();
|
||||
tempBox.select();
|
||||
tempBox.setSelectionRange(0, 99999);
|
||||
document.execCommand('copy');
|
||||
copy.exec('tempBox');
|
||||
document.body.removeChild(tempBox);
|
||||
NotificationHandler.rise('Copied to clipboard');
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
import { Filter, Value} from '../../searchPages/searchUtils/searchHelperClasses.class';
|
||||
import { SearchFields, FieldDetails} from '../../utils/properties/searchFields';
|
||||
import { SearchFields} from '../../utils/properties/searchFields';
|
||||
|
||||
|
||||
export class RefineResultsUtils {
|
||||
|
|
|
@ -80,7 +80,7 @@ export let common: EnvProperties = {
|
|||
|
||||
//connect
|
||||
enermapsURL:"https://lab.idiap.ch/enermaps",
|
||||
zenodoCommunities: 'https://zenodo.org/api/communities/',
|
||||
zenodoCommunities: 'https://zenodo.org/api/communities',
|
||||
shareInZenodoPage: '/participate/deposit/zenodo',
|
||||
afterLoginRedirectLink: '/myCommunities',
|
||||
searchLinkToCommunities: '/search/find/communities',
|
||||
|
|
|
@ -0,0 +1,836 @@
|
|||
import {properties} from "../../../../environments/environment";
|
||||
import {OpenaireEntities} from "./searchFields";
|
||||
|
||||
export class SearchFieldsBase {
|
||||
|
||||
//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"
|
||||
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"
|
||||
},
|
||||
["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": "="},
|
||||
{"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"
|
||||
},
|
||||
["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"
|
||||
},
|
||||
};
|
||||
|
||||
// public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
||||
public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
||||
"datasourcejurisdiction"];
|
||||
// public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
||||
public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
||||
"datasourcejurisdiction"];
|
||||
// public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
||||
public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
||||
"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"];
|
||||
|
||||
public COMMUNITIES_SEARCH_FIELDS: string[] = ["type", "access", "role"];
|
||||
|
||||
public STAKEHOLDER_SEARCH_FIELDS: string[] = ["type", "access", "role"];
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
getResultAdvancedFields() {
|
||||
// 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];
|
||||
} 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";
|
||||
}
|
||||
|
||||
/*
|
||||
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";
|
||||
} 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";
|
||||
}
|
|
@ -1,789 +1,6 @@
|
|||
import {Filter} from "../../searchPages/searchUtils/searchHelperClasses.class";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {SearchFieldsBase} from "src/app/openaireLibrary/utils/properties/searchFields.base";
|
||||
|
||||
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"
|
||||
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"
|
||||
},
|
||||
["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": "="},
|
||||
{"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"
|
||||
},
|
||||
["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"
|
||||
},
|
||||
};
|
||||
|
||||
// public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
||||
public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
||||
"datasourcejurisdiction"];
|
||||
// public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
||||
public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
||||
"datasourcejurisdiction"];
|
||||
// public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
||||
public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic",
|
||||
"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"];
|
||||
|
||||
public COMMUNITIES_SEARCH_FIELDS: string[] = ["type", "access", "role"];
|
||||
|
||||
public STAKEHOLDER_SEARCH_FIELDS: string[] = ["type", "access", "role"];
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
getResultAdvancedFields() {
|
||||
// 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];
|
||||
} 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";
|
||||
}
|
||||
export class SearchFields extends SearchFieldsBase {
|
||||
|
||||
public static getParameterOrder(fieldId: string, params): number {
|
||||
let fields = [];
|
||||
|
@ -809,55 +26,6 @@ export class SearchFields {
|
|||
}
|
||||
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";
|
||||
} 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";
|
||||
}
|
||||
|
||||
export enum OpenaireEntities {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div *ngIf="result" class="uk-card" [class.uk-card-default]="isMobile">
|
||||
<div *ngIf="result" class="uk-card uk-card-hover" [ngClass]="modifier">
|
||||
<div class="uk-padding-small">
|
||||
<div>
|
||||
<div class="uk-grid uk-flex uk-flex-middle">
|
||||
|
|
|
@ -7,7 +7,7 @@ import {properties} from "../../../../environments/environment";
|
|||
import {Identifier, StringUtils} from "../string-utils.class";
|
||||
import {OpenaireEntities} from "../properties/searchFields";
|
||||
import {HelperFunctions} from "../HelperFunctions.class";
|
||||
import {NumberUtils} from '../../utils/number-utils.class';
|
||||
import {NumberUtils} from '../number-utils.class';
|
||||
|
||||
@Component({
|
||||
selector: 'result-preview',
|
||||
|
@ -29,6 +29,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
|||
* */
|
||||
@Input() isCard: boolean = false;
|
||||
@Input() isMobile: boolean = false;
|
||||
@Input() modifier: 'uk-card-default' | null = null;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
public urlParam: string;
|
||||
public url: string;
|
||||
|
@ -54,6 +55,9 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
|||
public embed: boolean = false;
|
||||
|
||||
ngOnInit(): void {
|
||||
if(this.isMobile) {
|
||||
this.modifier = "uk-card-default";
|
||||
}
|
||||
if (this.hasLink) {
|
||||
if (this.result.resultType === "publication") {
|
||||
this.urlParam = "articleId";
|
||||
|
|
|
@ -193,7 +193,7 @@ export class Identifier {
|
|||
pid = Identifier.getRawDOIValue(pid);
|
||||
return {"class": "doi", "id": pid};
|
||||
} else if (Identifier.isValidORCID(pid)) {
|
||||
return {"class": "ORCID", "id": pid};
|
||||
return {"class": "ORCID", "id": Identifier.getRawORCID(pid)};
|
||||
} else if (Identifier.isValidPMCID(pid)) {
|
||||
return {"class": "pmc", "id": pid};
|
||||
} else if (Identifier.isValidPMID(pid)) {
|
||||
|
@ -236,9 +236,15 @@ export class Identifier {
|
|||
|
||||
public static isValidORCID(str: string): boolean {
|
||||
let exp = /\b\d{4}-\d{4}-\d{4}-(\d{3}X|\d{4})\b/g;
|
||||
return str.match(exp) != null;
|
||||
return str.match(exp) != null || this.getRawORCID(str).match(exp) != null;
|
||||
}
|
||||
public static getRawORCID(id: string): string {
|
||||
if(id.indexOf("orcid.org")!=-1 && id.split("orcid.org/").length > 1){
|
||||
id = id.split("orcid.org/")[1];
|
||||
}
|
||||
return id;
|
||||
|
||||
}
|
||||
|
||||
public static isValidPMID(str: string): boolean {
|
||||
let exp = /^\d*$/g;
|
||||
return str.match(exp) != null;
|
||||
|
@ -278,7 +284,7 @@ export class StringUtils {
|
|||
public static jsonRegex = /^[\],:{}\s]*$/;
|
||||
|
||||
public static urlPrefix(url: string): string {
|
||||
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
|
||||
if (!url || url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
|
||||
return "";
|
||||
} else {
|
||||
return "//";
|
||||
|
|
Loading…
Reference in New Issue