2019-06-13 14:40:03 +02:00
import { SearchCustomFilter } from "../openaireLibrary/searchPages/searchUtils/searchUtils.class" ;
2020-11-25 18:39:05 +01:00
import { Portal } from "../openaireLibrary/utils/entities/adminTool/portal" ;
2021-11-25 15:10:20 +01:00
import { properties } from "../../environments/environment" ;
2019-06-13 14:40:03 +02:00
2020-12-15 13:48:37 +01:00
export class AggregatorInfo {
2019-06-13 14:40:03 +02:00
menuId : string ;
title : string ;
logoUrl : string ;
fieldName : string ; //Country
queryFieldName : string ; //country
valueId : string ; //gr
valueName : string ; // Greece
2021-01-28 10:45:22 +01:00
graphSectionTitle : string ;
graphSectionText : string ;
2022-02-18 15:58:47 +01:00
enableLogin : boolean ;
2022-10-03 19:25:37 +02:00
/** @deprecated */
2022-05-03 15:53:37 +02:00
customCss :string ;
showHeaderAlways :boolean ;
2019-06-13 14:40:03 +02:00
2021-01-28 10:45:22 +01:00
constructor ( menuId : string , title : string , logoUrl : string , fieldName : string , queryFieldName : string , valueId : string ,
2022-05-03 15:53:37 +02:00
valueName : string , graphSectionTitle : string = null , graphSectionText :string = null , enableLogin :boolean = true , showHeaderAlways :boolean = true , customCss :string = "" ) {
2019-06-13 14:40:03 +02:00
this . menuId = menuId ;
this . title = title ;
this . logoUrl = logoUrl ;
this . fieldName = fieldName ;
this . queryFieldName = queryFieldName ;
this . valueId = valueId ;
this . valueName = valueName ;
2021-01-28 10:45:22 +01:00
this . graphSectionTitle = graphSectionTitle ;
this . graphSectionText = graphSectionText ;
2022-02-18 15:58:47 +01:00
this . enableLogin = enableLogin ;
2022-05-03 15:53:37 +02:00
this . showHeaderAlways = showHeaderAlways ;
this . customCss = customCss ;
2019-06-13 14:40:03 +02:00
}
}
export class PortalAggregators {
2020-12-15 13:48:37 +01:00
static list : AggregatorInfo [ ] = [
2022-05-03 15:53:37 +02:00
new AggregatorInfo ( "canada" , "Canadian Aggregator" , "assets/canada-logo.png" , "Country" ,
"country" , "CA" , "Canada" ,
2021-01-28 10:45:22 +01:00
"Portal to Canadian Research Outputs" , ` <span>
2021-12-08 15:00:44 +01:00
Welcome to the Portal of Canadian Research Outputs . This has been developed as part of a collaboration between
Canadian Association of Research Libraries ( CARL ) and OpenAIRE . The portal presents research results collected
from Canadian institutional repositories compliant to < a
href = "https://guidelines.openaire.eu/" target = "_blank" > OpenAIRE guidelines < / a > and from the OpenAIRE Research Graph .
It links them to three Canadian funders , Natural Sciences and Engineering Research Council of Canada , Canadian Institutes of Health Research and
Social Sciences and Humanities Research Council . For more information , visit the < a
Social Sciences and Humanities Research Council . For more information , visit the < a
2021-01-28 10:45:22 +01:00
href = "https://www.carl-abrc.ca/advancing-research/institutional-repositories/open-repositories-working-group/openaire-collaboration/" target = "_blank" > CARL website < / a > .
< / span >
< br >
< span >
2021-12-08 15:00:44 +01:00
Bienvenue sur le portal des résultats de la recherche canadienne , qui a é té développé dans le cadre d 'une collaboration entre l' ABRC et OpenAIRE dans le contexte du projet OpenAIRE Advance . Le portail permet aux utilisateurs de repérer et de parcourir le contenu canadien inclus sur la plateforme OpenAIRE . La quantité des résultats de la recherche canadienne disponible sur la plateforme augmentera tout au long de l 'année 2021 au fur et à mesure que les dépôts canadiens se conformeront aux directives d' OpenAIRE et que les détails relatifs aux affiliations canadiennes seront améliorés . Pour plus d ' informations ,
2021-01-28 10:45:22 +01:00
< a
href = "https://www.carl-abrc.ca/fr/faire-avancer-la-recherche/depots-institutionnels/groupe-de-travail-depots-ouverts/collaboration-avec-openaire/" target = "_blank" > veuillez visiter le site Web de l ’ ABRC < / a > .
2022-05-03 15:53:37 +02:00
< / span > ` ,true, true, `
: root {
-- primary - color : # E80000 ;
-- primary - color - rgb : 232 , 0 , 0 ;
-- primary - dark - color : # ad0000 ;
-- graph - background : url ( '/assets/canada-background.svg' ) no - repeat bottom ;
-- label - secondary : # E80000 ;
/* Fonts */
-- text - primary - color : var ( primary - color ) ;
-- text - gradient - color : linear - gradient ( 110 deg , var ( primary - color ) 0 % , var ( -- monitor - dark - color ) 100 % ) ;
/** Label */
-- label - secondary : var ( -- primary - color ) ;
}
` ),
2020-12-15 13:48:37 +01:00
new AggregatorInfo ( "italy" , "Italian Aggregator" , "assets/common-assets/logo-small-aggregator.png" , "Country" , "country" , "IT" , "Italy" ) ,
2022-08-08 16:20:28 +02:00
new AggregatorInfo ( "greece" , "Greek Aggregator" , "assets/common-assets/logo-small-aggregator.png" , "Country" , "country" , "GR" , "Greece" )
2019-06-13 14:40:03 +02:00
] ;
2020-11-25 18:39:05 +01:00
static disabled = {
[Aggregator | new-theme]: [NEW] Added service entity in Menu, properties and added landing and search pages.
1. aggregators.ts: Added in PortalAggregators.disabled object, service entity & route.
2. app.component.ts: Added in menuItems "Serive" and use for menuItems entity names from OpenaireEntities.
3. app-routing.module.ts: Added routes for service landing, search and advanced search pages.
4. environments/: Added values for properties searchLinkToService, searchLinkToServices, searchLinkToAdvancedServices, errorLink
5. [NEW] Files added for services landing, search and advanced search pages: landingPages/service/, advancedSearchServices.component.ts, advancedSearchServices.module.ts, advancedSearchServices-routing.module.ts, searchServices.component.ts, searchServices.module.ts, searchServices-routing.module.ts
2022-05-13 15:07:09 +02:00
"canada" : { pages : [ "/search/find/services" ] , entities : [ "software" , "service" ] } ,
"italy" : { pages : [ "/search/find/services" ] , entities : [ "service" ] } ,
2022-08-08 16:20:28 +02:00
"greece" : { pages : [ "/search/find/services" ] , entities : [ "service" ] }
2020-11-25 18:39:05 +01:00
} ;
2020-12-15 13:48:37 +01:00
static defaultAggregator : AggregatorInfo = PortalAggregators . list [ 0 ] ;
2019-06-13 14:40:03 +02:00
2020-12-15 13:48:37 +01:00
public static getList ( ) : AggregatorInfo [ ] {
2019-06-13 14:40:03 +02:00
return PortalAggregators . list ;
}
2020-12-15 13:48:37 +01:00
public static getFilterInfoByMenuId ( menuId : string ) : AggregatorInfo {
2019-06-13 14:40:03 +02:00
for ( let agg of this . getList ( ) ) {
if ( agg . menuId == menuId ) {
return agg ;
}
}
return PortalAggregators . defaultAggregator ;
}
2020-12-15 13:48:37 +01:00
public static getSearchCustomFilterByAggregator ( agg : AggregatorInfo ) : SearchCustomFilter {
2019-06-13 14:40:03 +02:00
let filter :SearchCustomFilter = null ;
2022-02-18 15:58:47 +01:00
if ( agg && agg . fieldName ) {
2019-06-13 14:40:03 +02:00
filter = new SearchCustomFilter ( agg . fieldName , agg . queryFieldName , agg . valueId , agg . valueName ) ;
2020-11-26 16:03:13 +01:00
filter . promptToAddFilter = false ;
filter . isHiddenFilter = true ;
2019-06-13 14:40:03 +02:00
}
return filter ;
}
2020-11-25 18:39:05 +01:00
public static getCommunityInfoByMenuId ( menuId : string ) : any {
if ( PortalAggregators . disabled [ menuId ] ) {
2022-10-03 19:25:37 +02:00
return Portal . getMockCommunityInfo ( menuId , PortalAggregators . disabled [ menuId ] . entities , PortalAggregators . disabled [ menuId ] . pages ) ;
2020-11-25 18:39:05 +01:00
}
2022-10-03 19:25:37 +02:00
return Portal . getMockCommunityInfo ( menuId , [ ] , [ ] ) ;
2020-11-25 18:39:05 +01:00
}
2019-06-13 14:40:03 +02:00
}