altmetrics| mail for feedback | remove quotes from keyword queries q= | change doi queries in pubs , data use parameter doi| date range queries for advanced search of pubs, data, projects | change order of filters in pubs, data
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@46163 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
94857a762a
commit
b486713382
|
@ -64,6 +64,7 @@
|
|||
"js.clone": "0.0.3",
|
||||
"methods": "~1.1.2",
|
||||
"morgan": "^1.7.0",
|
||||
"mydatepicker": "^1.7.3",
|
||||
"preboot": "~4.5.2",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"webfontloader": "^1.6.26",
|
||||
|
|
|
@ -152,7 +152,7 @@ export class ClaimDatasetComponent {
|
|||
}
|
||||
);
|
||||
}else{
|
||||
this._searchDatasetsService.searchDatasets('q="'+term+'"', null, page, size, []).subscribe(
|
||||
this._searchDatasetsService.searchDatasets('q='+term+'', null, page, size, []).subscribe(
|
||||
data => {
|
||||
if(data != null) {
|
||||
this.openairePage=page;
|
||||
|
|
|
@ -184,7 +184,7 @@ private getCrossrefResults (term: string, size : number, page : number) {
|
|||
);
|
||||
}else{
|
||||
this.openaireStatus = this.errorCodes.LOADING;
|
||||
this._searchPublicationsService.searchPublications('q="'+term+'"', null, page, size, []).subscribe(
|
||||
this._searchPublicationsService.searchPublications('q='+term, null, page, size, []).subscribe(
|
||||
data => {
|
||||
if(data != null) {
|
||||
this.openairePage=page;
|
||||
|
|
|
@ -47,7 +47,13 @@
|
|||
<div class="uk-width-3-10">
|
||||
<ul class="uk-list uk-list-striped">
|
||||
<li>
|
||||
Share - Bookmark
|
||||
<dl class="uk-description-list-line">
|
||||
<dt >Share - Bookmark
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="addthis_inline_share_toolbox"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div>
|
||||
|
|
|
@ -13,7 +13,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
|
|
|
@ -10,7 +10,7 @@ import {Component, Input} from '@angular/core';
|
|||
<div *ngIf=" organizations && organizations.length > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div *ngFor="let item of organizations">
|
||||
|
|
|
@ -14,7 +14,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<div *ngIf="fetchProjects.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults > 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.searchUtils.totalResults}} results</a></div>
|
||||
|
|
|
@ -13,7 +13,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div>
|
||||
|
|
|
@ -16,7 +16,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
|||
<div *ngIf="fetchPublications.results.length > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<table class="uk-table uk-table-striped">
|
||||
|
|
|
@ -13,7 +13,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<div *ngIf="(searchPublicationsComponent.searchUtils.totalResults != 0 || searchDatasetsComponent.searchUtils.totalResults != 0)">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<p class="uk-text-bold">Latest Documents Timeline</p>
|
||||
<i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame>
|
||||
|
|
|
@ -104,7 +104,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<div *ngIf="(fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<p class="uk-text-bold">Latest Documents Timeline</p>
|
||||
<i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame>
|
||||
|
@ -198,7 +198,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<div *ngIf="(fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<p class="uk-text-bold">Latest Documents Timeline</p>
|
||||
<i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<div *ngIf="datasetInfo.relatedResearchResults != undefined">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<tabTable from="dataset" [info]="datasetInfo.relatedResearchResults"></tabTable>
|
||||
</div>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<div *ngIf="datasetInfo.similarResearchResults != undefined">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<tabTable from="dataset" [info]="datasetInfo.similarResearchResults"></tabTable>
|
||||
|
@ -110,11 +110,13 @@
|
|||
<div class="uk-width-3-10" *ngIf="datasetInfo != null">
|
||||
<ul class="uk-list uk-list-striped mainFunctionsBlock">
|
||||
<li>
|
||||
<dl class="uk-description-list-line functionsSection">
|
||||
<dt>Share - Bookmark</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="uk-description-list-line">
|
||||
<dt >Share - Bookmark
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="addthis_inline_share_toolbox"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li>
|
||||
<dl class="uk-description-list-line functionsSection">
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<div *ngIf="organizationInfo.projects != undefined">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div *ngIf="organizationInfo.projects.size == 1">
|
||||
|
@ -124,7 +124,7 @@
|
|||
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
|
@ -148,7 +148,13 @@
|
|||
<div class="uk-width-3-10">
|
||||
<ul class="uk-list uk-list-striped">
|
||||
<li>
|
||||
Share - Bookmark
|
||||
<dl class="uk-description-list-line">
|
||||
<dt >Share - Bookmark
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="addthis_inline_share_toolbox"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<ul *ngIf="organizationInfo.projects != undefined" class="uk-list uk-list-striped">
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" >
|
||||
|
@ -68,7 +68,7 @@
|
|||
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" >
|
||||
|
@ -89,7 +89,13 @@
|
|||
<div class="uk-width-3-10">
|
||||
<ul class="uk-list uk-list-striped">
|
||||
<li>
|
||||
Share - Bookmark
|
||||
<dl class="uk-description-list-line">
|
||||
<dt >Share - Bookmark
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="addthis_inline_share_toolbox"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div>
|
||||
|
@ -115,7 +115,7 @@
|
|||
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div>
|
||||
|
@ -134,7 +134,7 @@
|
|||
<div *ngIf="statsClicked && (fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
|
||||
<p class="uk-text-bold">
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<div>
|
||||
<p class="uk-text-bold">Scientific Results</p>
|
||||
|
@ -164,7 +164,13 @@
|
|||
<div class="uk-width-3-10">
|
||||
<ul class="uk-list uk-list-striped">
|
||||
<li>
|
||||
Share - Bookmark
|
||||
<dl class="uk-description-list-line">
|
||||
<dt >Share - Bookmark
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="addthis_inline_share_toolbox"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li *ngIf="fetchPublications.searchUtils.totalResults > 10">
|
||||
<a href="{{linkToSearchPublications}}">
|
||||
|
|
|
@ -54,7 +54,12 @@
|
|||
<blockquote *ngIf="publicationInfo.description != ''">
|
||||
<div class="uk-text-justify">{{publicationInfo.description}}</div>
|
||||
</blockquote>
|
||||
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','publication'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Links to research Results</a>
|
||||
|
||||
<!--div class="uk-clearfix uk-margin-top uk-margin-bottom">
|
||||
|
||||
<a class="uk-float-right uk-button" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','publication'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Links to research Results</a>
|
||||
</div-->
|
||||
|
||||
<ul class="uk-tab" data-uk-switcher="{connect: '#tab-content'}">
|
||||
<li id="citationsTab" class="uk-active">
|
||||
<a href="#citationsTab">
|
||||
|
@ -113,7 +118,7 @@
|
|||
<div *ngIf="publicationInfo.references != undefined">
|
||||
<div>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</div>
|
||||
|
||||
<tabPaging [showAll]="showAllReferences" [length]="publicationInfo.references.length" (changeShowAll)="showChange($event)"></tabPaging>
|
||||
|
@ -154,7 +159,7 @@
|
|||
<div *ngIf="publicationInfo.relatedResearchResults != undefined">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<tabTable from="publication" [info]="publicationInfo.relatedResearchResults"></tabTable>
|
||||
|
@ -169,7 +174,7 @@
|
|||
<div *ngIf="publicationInfo.similarResearchResults != undefined">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<tabTable from="publication" [info]="publicationInfo.similarResearchResults"></tabTable>
|
||||
|
@ -178,7 +183,7 @@
|
|||
<li *ngIf="publicationInfo.bioentities != undefined" id="bioentitiesTab">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<table id="bioentitiesTable" class="uk-table uk-table-striped">
|
||||
<thead>
|
||||
|
@ -205,7 +210,7 @@
|
|||
<li *ngIf="publicationInfo.software != undefined" id="softwareTab">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<table id="softwareTable" class="uk-table uk-table-striped">
|
||||
<thead>
|
||||
|
@ -243,8 +248,10 @@
|
|||
<ul class="uk-list uk-list-striped">
|
||||
<li>
|
||||
<dl class="uk-description-list-line">
|
||||
<dt >Share - Bookmark</dt>
|
||||
<dt >Share - Bookmark
|
||||
</dt>
|
||||
<dd>
|
||||
<div class="addthis_inline_share_toolbox"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
|
|
|
@ -154,7 +154,7 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
var value:Value = {name: value_names[i][j], id: value_original_ids[i][j], number:j, selected:false}
|
||||
values.push(value);
|
||||
}
|
||||
var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or'}
|
||||
var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or' };
|
||||
filters.push(filter);
|
||||
}
|
||||
return filters;
|
||||
|
|
|
@ -152,7 +152,7 @@ export class SearchEntityRegistriesComponent {
|
|||
var value:Value = {name: value_names[i][j], id: value_original_ids[i][j], number:j, selected:false}
|
||||
values.push(value);
|
||||
}
|
||||
var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or'}
|
||||
var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or' };
|
||||
filters.push(filter);
|
||||
}
|
||||
return filters;
|
||||
|
|
|
@ -20,6 +20,7 @@ import {SearchOrganizationsService} from '../../services/searchOrganizations.ser
|
|||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import {SearchFields} from '../../utils/properties/searchFields';
|
||||
import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Default,
|
||||
|
@ -40,32 +41,44 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<ul class="uk-tab uk-tab-left uk-width-large-1-5 uk-width-small-1-1 " data-uk-switcher="{connect:'#searchtabs'}">
|
||||
<li (click)="searchPublications()" >
|
||||
<a href="#pubsTab">
|
||||
Publications {{((keyword.length > 0)?'('+fetchPublications.searchUtils.totalResults+')':'')}}
|
||||
Publications
|
||||
<span *ngIf = "fetchPublications.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchPublications.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchPublications.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDatasets()">
|
||||
<a href="#dataTab" (click)="searchDatasets()">
|
||||
Datasets {{((keyword.length > 0)?'('+fetchDatasets.searchUtils.totalResults+')':'')}}
|
||||
Datasets
|
||||
<span *ngIf = "fetchDatasets.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchDatasets.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchDatasets.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchProjects()" >
|
||||
<a href="#projectsTab">
|
||||
Projects {{((keyword.length > 0)?'('+fetchProjects.searchUtils.totalResults+')':'')}}
|
||||
Projects
|
||||
<span *ngIf = "fetchProjects.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchProjects.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchProjects.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDataProviders()" >
|
||||
<a href="#dataProviderTab">
|
||||
Data Providers {{((keyword.length > 0)?'('+fetchDataproviders.searchUtils.totalResults+')':'')}}
|
||||
Data Providers
|
||||
<span *ngIf = "fetchDataproviders.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchDataproviders.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchDataproviders.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchOrganizations()" >
|
||||
<a href="#organizationsTab" >
|
||||
Organizations {{((keyword.length > 0)?'('+fetchOrganizations.searchUtils.totalResults+')':'')}}
|
||||
Organizations
|
||||
<span *ngIf = "fetchOrganizations.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchOrganizations.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchOrganizations.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchPeople()" >
|
||||
<a href="#peopleTab" >
|
||||
People {{((keyword.length > 0)?'('+fetchPeople.searchUtils.totalResults+')':'')}}
|
||||
People
|
||||
<span *ngIf = "fetchPeople.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchPeople.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchPeople.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -78,7 +91,7 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchPublications.results"
|
||||
[(status)]= "fetchPublications.status"
|
||||
[(status)]= "fetchPublications.searchUtils.status" showLoading = true
|
||||
type="publication" urlParam="articleId">
|
||||
</search-result>
|
||||
</div>
|
||||
|
@ -90,7 +103,7 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDatasets.results"
|
||||
[(status)]= "fetchDatasets.status"
|
||||
[(status)]= "fetchDatasets.searchUtils.status" showLoading = true
|
||||
type="dataset" urlParam="datasetId">
|
||||
</search-result>
|
||||
</div>
|
||||
|
@ -102,7 +115,7 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults> 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchProjects.results"
|
||||
[(status)]= "fetchProjects.status"
|
||||
[(status)]= "fetchProjects.searchUtils.status" showLoading = true
|
||||
type="project" urlParam="projectId">
|
||||
</search-result>
|
||||
</div>
|
||||
|
@ -114,7 +127,7 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDataproviders.results"
|
||||
[(status)]= "fetchDataproviders.status"
|
||||
[(status)]= "fetchDataproviders.searchUtils.status" showLoading = true
|
||||
type="dataprovider" urlParam="datasourceId">
|
||||
</search-result>
|
||||
</div>
|
||||
|
@ -126,7 +139,7 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchOrganizations.searchUtils.totalResults> 10" ><a [href] = "linkToSearchOrganizations" >View all {{fetchOrganizations.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchOrganizations.results"
|
||||
[(status)]= "fetchOrganizations.status"
|
||||
[(status)]= "fetchOrganizations.searchUtils.status" showLoading = true
|
||||
type="organization" urlParam="organizationId">
|
||||
</search-result>
|
||||
</div>
|
||||
|
@ -138,7 +151,7 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchPeople.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPeople" >View all {{fetchPeople.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchPeople.results"
|
||||
[(status)]= "fetchPeople.status"
|
||||
[(status)]= "fetchPeople.searchUtils.status" showLoading = true
|
||||
type="person" urlParam="personId">
|
||||
</search-result>
|
||||
</div>
|
||||
|
@ -156,12 +169,6 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
})
|
||||
export class SearchComponent {
|
||||
public sub: any;
|
||||
public subPublicationsCount: any;
|
||||
public subDatasetsCount: any;
|
||||
public subProjectsCount: any;
|
||||
public subDataprovidersCount: any;
|
||||
public subOrganizationsCount: any;
|
||||
public subPeopleCount: any;
|
||||
|
||||
public reloadPublications: boolean;
|
||||
public reloadDatasets: boolean;
|
||||
|
@ -195,6 +202,7 @@ export class SearchComponent {
|
|||
public fetchOrganizations: FetchOrganizations;
|
||||
public fetchPeople: FetchPeople;
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
||||
public subPub;public subData;public subProjects;public subOrg;public subPeople; public subDataPr;
|
||||
constructor ( private route: ActivatedRoute,
|
||||
|
@ -244,12 +252,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
if(this.subDataPr){
|
||||
this.subDataPr.unsubscribe();
|
||||
}
|
||||
this.subPublicationsCount.unsubscribe();
|
||||
this.subDatasetsCount.unsubscribe();
|
||||
this.subProjectsCount.unsubscribe();
|
||||
//this.subDataprovidersCount.unsubscribe();
|
||||
this.subOrganizationsCount.unsubscribe();
|
||||
this.subPeopleCount.unsubscribe();
|
||||
|
||||
}
|
||||
}
|
||||
public searchPublications() {
|
||||
|
@ -328,62 +331,80 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
}
|
||||
|
||||
private count() {
|
||||
this.subPublicationsCount = this.route.queryParams.subscribe(params => {
|
||||
this.subPub = this._searchPublicationsService.numOfSearchPublications(this.keyword).subscribe(
|
||||
if(this.activeTab != "publications"){
|
||||
this.fetchPublications.searchUtils.status = this.errorCodes.LOADING;
|
||||
this.subPub = this._searchPublicationsService.numOfSearchPublications(this.keyword).subscribe(
|
||||
data => {
|
||||
this.fetchPublications.searchUtils.totalResults = data;
|
||||
console.log("Count results: "+data);
|
||||
// this.fetchPublications.searchUtils.totalResults = data;
|
||||
this.fetchPublications.searchUtils.status = this.errorCodes.DONE;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
this.fetchPublications.searchUtils.status = this.errorCodes.ERROR;
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
this.subDatasetsCount = this.route.queryParams.subscribe(params => {
|
||||
this.subData = this._searchDatasetsService.numOfSearchDatasets(this.keyword).subscribe(
|
||||
);
|
||||
}
|
||||
if(this.activeTab != "datasets"){
|
||||
this.fetchDatasets.searchUtils.status = this.errorCodes.LOADING;
|
||||
this.subData = this._searchDatasetsService.numOfSearchDatasets(this.keyword).subscribe(
|
||||
data => {
|
||||
this.fetchDatasets.searchUtils.totalResults = data;
|
||||
this.fetchDatasets.searchUtils.status = this.errorCodes.DONE;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
this.fetchDatasets.searchUtils.status = this.errorCodes.ERROR;
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
this.subProjectsCount = this.route.queryParams.subscribe(params => {
|
||||
this.subProjects = this._searchProjectsService.numOfSearchProjects(this.keyword).subscribe(
|
||||
);
|
||||
}
|
||||
if(this.activeTab != "projects"){
|
||||
this.fetchProjects.searchUtils.status = this.errorCodes.LOADING;
|
||||
this.subProjects = this._searchProjectsService.numOfSearchProjects(this.keyword).subscribe(
|
||||
data => {
|
||||
this.fetchProjects.searchUtils.totalResults = data;
|
||||
this.fetchProjects.searchUtils.status = this.errorCodes.DONE;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
this.fetchProjects.searchUtils.status = this.errorCodes.ERROR;
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
);
|
||||
}
|
||||
if(this.activeTab != "dataproviders"){
|
||||
this.fetchDataproviders.getNumForSearch(this.keyword);
|
||||
|
||||
this.subOrganizationsCount = this.route.queryParams.subscribe(params => {
|
||||
this.subOrg = this._searchOrganizationsService.numOfSearchOrganizations(this.keyword).subscribe(
|
||||
}
|
||||
if(this.activeTab != "dataproviders"){
|
||||
this.fetchOrganizations.searchUtils.status = this.errorCodes.LOADING;
|
||||
this.subOrg = this._searchOrganizationsService.numOfSearchOrganizations(this.keyword).subscribe(
|
||||
data => {
|
||||
this.fetchOrganizations.searchUtils.totalResults = data;
|
||||
this.fetchOrganizations.searchUtils.status = this.errorCodes.DONE;
|
||||
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
}
|
||||
);
|
||||
})
|
||||
this.fetchOrganizations.searchUtils.status = this.errorCodes.ERROR;
|
||||
|
||||
this.subPeopleCount = this.route.queryParams.subscribe(params => {
|
||||
this.subPeople = this._searchPeopleService.numOfSearchPeople(this.keyword).subscribe(
|
||||
}
|
||||
);
|
||||
}
|
||||
if(this.activeTab != "people"){
|
||||
this.fetchPeople.searchUtils.status = this.errorCodes.LOADING;
|
||||
this.subPeople = this._searchPeopleService.numOfSearchPeople(this.keyword).subscribe(
|
||||
data => {
|
||||
this.fetchPeople.searchUtils.totalResults = data;
|
||||
this.fetchPeople.searchUtils.status = this.errorCodes.DONE;
|
||||
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
this.fetchPeople.searchUtils.status = this.errorCodes.ERROR;
|
||||
|
||||
}
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private reloadTabs() {
|
||||
|
|
|
@ -10,34 +10,38 @@ import {Dates} from '../../utils/string-utils.class';
|
|||
selector: 'advanced-search-form',
|
||||
template: `
|
||||
<form class="uk-form">
|
||||
<table class="uk-text-center">
|
||||
<table >
|
||||
<tr *ngFor="let selectedField of selectedFields; let i = index" class="uk-form-row ">
|
||||
<td *ngIf ="i==0 ">Search for:</td>
|
||||
<td *ngIf ="i==0 " class="">Search for:</td>
|
||||
|
||||
<td *ngIf = "i != 0" ><select [(ngModel)]="selectedField.operatorId" name="selectOp_{{i}}" >
|
||||
<td *ngIf = "i != 0" class=""><select [(ngModel)]="selectedField.operatorId" name="selectOp_{{i}}" >
|
||||
<option *ngFor="let op of operators" (change)="fieldOperatorChanged(i, op.id, op.id)" (click)="fieldOperatorChanged(i, op.id, op.id)" [value]="op.id">{{op.id}}</option>
|
||||
</select></td>
|
||||
<td><select [(ngModel)]="selectedField.id" name="selectField_{{i}}" (click)="fieldIdsChanged(i)" >
|
||||
<td ><select [(ngModel)]="selectedField.id" name="selectField_{{i}}" (click)="fieldIdsChanged(i)" >
|
||||
<option *ngFor="let id of fieldIds" [value]="id">{{fieldIdsMap[id].name}}</option>
|
||||
</select> </td>
|
||||
<td *ngIf = "selectedField.type == 'keyword'" class="uk-width-1-3" ><input type="text" class="form-control" placeholder="Type keywords..."
|
||||
<td *ngIf = "selectedField.type == 'keyword'" ><input type="text" class="form-control" placeholder="Type keywords..."
|
||||
[(ngModel)]="selectedField.value" name="value[{{i}}]"></td>
|
||||
<td *ngIf = "selectedField.type == 'year'" class="uk-width-1-3"><input type="text" class="form-control" placeholder="Type Year..."
|
||||
[(ngModel)]="selectedField.value" name="value[{{i}}]" (keyup)=validateDate(i,selectedField.value)></td>
|
||||
<td *ngIf = "selectedField.type == 'vocabulary'" class="uk-width-1-3">
|
||||
<td *ngIf = "selectedField.type == 'date'" >
|
||||
<!--input type="text" class="form-control" placeholder="Type Year..."
|
||||
[(ngModel)]="selectedField.value" name="value[{{i}}]" (keyup)=validateDate(i,selectedField.value)-->
|
||||
<date-filter [(dateValue)]=selectedField.dateValue ></date-filter>
|
||||
</td>
|
||||
<!--[(filterId)]=i -->
|
||||
<td *ngIf = "selectedField.type == 'vocabulary'" >
|
||||
<static-autocomplete [(vocabularyId)] = selectedField.param
|
||||
[(list)] = this.fieldList[selectedField.id] [entityName] = "entityType" [selectedValue]=selectedField.value [showSelected]=true
|
||||
[placeHolderMessage] = "'Search for '+selectedField.name" [title] = "selectedField.name" [multipleSelections]=false
|
||||
(selectedValueChanged)="valueChanged($event,i)" (listUpdated) = "listUpdated($event,selectedField.id)"></static-autocomplete>
|
||||
</td>
|
||||
<td *ngIf = " selectedField.type == 'refine'" class="uk-width-1-3">
|
||||
<td *ngIf = " selectedField.type == 'refine'" >
|
||||
<static-autocomplete [(list)] = this.fieldList[selectedField.id] [entityName] = "entityType" [fieldName] = [selectedField.id] [selectedValue]=selectedField.value [showSelected]=true [placeHolderMessage] = "'Search for '+selectedField.name" [title] = "selectedField.name" [multipleSelections]=false (selectedValueChanged)="valueChanged($event,i)" (listUpdated) = "listUpdated($event,selectedField.id)"></static-autocomplete></td>
|
||||
<td *ngIf = "selectedField.type == 'entity'" class="uk-width-1-3"><entities-autocomplete [entityType]=selectedField.param [selectedValue]=selectedField.value [showSelected]=true
|
||||
<td *ngIf = "selectedField.type == 'entity'" ><entities-autocomplete [entityType]=selectedField.param [selectedValue]=selectedField.value [showSelected]=true
|
||||
[placeHolderMessage] = "'Search for '+selectedField.name" [title] = "selectedField.name" [multipleSelections]=false
|
||||
(selectedValueChanged)="valueChanged($event,i)" (listUpdated) = "listUpdated($event,selectedField.id)" >
|
||||
</entities-autocomplete></td>
|
||||
|
||||
<td *ngIf = "selectedField.type == 'boolean'" class="input-group">
|
||||
<td *ngIf = "selectedField.type == 'boolean'" class="input-group" >
|
||||
<span class="input-group-addon">
|
||||
<input type="radio" [(ngModel)]="selectedField.value" [name]=selectedField.param value="true">Yes<br>
|
||||
</span>
|
||||
|
@ -45,7 +49,7 @@ import {Dates} from '../../utils/string-utils.class';
|
|||
<input type="radio" [(ngModel)]="selectedField.value" [name]=selectedField.param value="false">No<br>
|
||||
</span>
|
||||
</td>
|
||||
<td >
|
||||
<td class=" " >
|
||||
<button *ngIf="selectedFields.length > 1" type="button" class="uk-button uk-button-danger" (click)="removeField(i)">
|
||||
<i class="uk-icon-minus"></i>
|
||||
</button>
|
||||
|
@ -53,7 +57,7 @@ import {Dates} from '../../utils/string-utils.class';
|
|||
<i class="uk-icon-minus" ></i>
|
||||
</button>
|
||||
</td>
|
||||
<td *ngIf="i == selectedFields.length-1 " ><button type="button" class="uk-button uk-button-success" (click)="addField()">
|
||||
<td *ngIf="i == selectedFields.length-1 " class=" "><button type="button" class="uk-button uk-button-success" (click)="addField()">
|
||||
<i class="uk-icon-plus"></i>
|
||||
</button></td>
|
||||
</tr>
|
||||
|
@ -79,11 +83,9 @@ export class AdvancedSearchFormComponent {
|
|||
|
||||
public operators: [{name:string, id:string}] = this.searchFields.ADVANCED_SEARCH_OPERATORS;
|
||||
constructor () {
|
||||
console.log("Constr: Advanced search form");
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log("Init: Advanced search form");
|
||||
for(var i = 0; i < this.fieldIds.length; i++){
|
||||
this.fieldList[this.fieldIds[i]]=[];
|
||||
}
|
||||
|
@ -100,7 +102,6 @@ export class AdvancedSearchFormComponent {
|
|||
}
|
||||
|
||||
addField() {
|
||||
console.info("add filter"+this.fieldIds[0]+this.fieldIdsMap[this.fieldIds[0]].name+this.fieldIdsMap[this.fieldIds[0]].type);
|
||||
this.newFieldId = this.fieldIds[0];
|
||||
var type = this.fieldIdsMap[this.newFieldId].type;
|
||||
if(type == "boolean"){
|
||||
|
@ -112,7 +113,6 @@ export class AdvancedSearchFormComponent {
|
|||
}
|
||||
|
||||
removeField(index: number) {
|
||||
console.info("remove filter");
|
||||
this.selectedFields.splice(index, 1);
|
||||
|
||||
}
|
||||
|
|
|
@ -5,11 +5,12 @@ import { FormsModule } from '@angular/forms';
|
|||
import{AdvancedSearchFormComponent} from './advancedSearchForm.component';
|
||||
import {EntitiesAutocompleteModule} from '../../utils/entitiesAutoComplete/entitiesAutoComplete.module';
|
||||
import {StaticAutocompleteModule} from '../../utils/staticAutoComplete/staticAutoComplete.module';
|
||||
import {DateFilterModule} from './dateFilter.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, EntitiesAutocompleteModule, StaticAutocompleteModule
|
||||
CommonModule, FormsModule, EntitiesAutocompleteModule, StaticAutocompleteModule, DateFilterModule
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchFormComponent,
|
||||
|
|
|
@ -6,7 +6,8 @@ import {SearchResult} from '../../utils/entities/searchResult';
|
|||
import {SearchFields} from '../../utils/properties/searchFields';
|
||||
import {SearchUtilsClass} from './searchUtils.class';
|
||||
import {ModalLoading} from '../../utils/modal/loading.component';
|
||||
import {StringUtils} from '../../utils/string-utils.class';
|
||||
import {StringUtils, Dates} from '../../utils/string-utils.class';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'advanced-search-page',
|
||||
|
@ -17,19 +18,6 @@ import {StringUtils} from '../../utils/string-utils.class';
|
|||
<h1>{{pageTitle}}</h1>
|
||||
</div>
|
||||
<div>
|
||||
<!--div class="row row-offcanvas row-offcanvas-right">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<a *ngIf="isFiltered()" (click)="clearFilters()" > Clear Filters</a>
|
||||
<p *ngFor="let filter of filters " >
|
||||
<search-filter [filter]="filter" (change)="filterChanged($event)"></search-filter>
|
||||
</p>
|
||||
</div>
|
||||
[(fields)]="fields"
|
||||
[(selectedFields)]="selectedFields"
|
||||
[(quantifiers)]="quantifiers"
|
||||
[(selectedQuantifiers)]="selectedQuantifiers"
|
||||
[(keywords)]="keywords"
|
||||
<div class="col-xs-6 col-sm-9 sidebar-offcanvas" id="sidebar"-->
|
||||
<advanced-search-form
|
||||
[entityType] = "entityType"
|
||||
[(fieldIds)]="fieldIds"
|
||||
|
@ -37,11 +25,9 @@ import {StringUtils} from '../../utils/string-utils.class';
|
|||
[(selectedFields)]="selectedFields"
|
||||
(queryChange)="queryChanged($event)">
|
||||
</advanced-search-form>
|
||||
<!--div class="uk-text-right" *ngIf="results && results.length>= size"-->
|
||||
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "searchUtils.baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
|
||||
<search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" ></search-download>
|
||||
|
||||
<!--/div-->
|
||||
<div>
|
||||
<search-result [results]="results"
|
||||
[status]=searchUtils.status
|
||||
|
@ -49,8 +35,7 @@ import {StringUtils} from '../../utils/string-utils.class';
|
|||
[type]="entityType" [urlParam]="urlParam">
|
||||
</search-result>
|
||||
</div>
|
||||
<!--/div>
|
||||
</div-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<modal-loading [message]= "'Loading results...'"></modal-loading>
|
||||
|
@ -82,11 +67,9 @@ export class AdvancedSearchPageComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log("ASP init!");
|
||||
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
||||
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
||||
this.updateBaseUrlWithParameters();
|
||||
this.defineUrlParam();
|
||||
// this.searchUtils.totalResults = this.results.length;
|
||||
}
|
||||
|
||||
private defineUrlParam() {
|
||||
|
@ -106,7 +89,6 @@ export class AdvancedSearchPageComponent {
|
|||
}
|
||||
|
||||
public getSelectedFiltersFromUrl(params){
|
||||
// this.selectedFields =[];
|
||||
for(var i=0; i< this.fieldIds.length ; i++){
|
||||
|
||||
var fieldId = this.fieldIds[i];
|
||||
|
@ -122,7 +104,33 @@ export class AdvancedSearchPageComponent {
|
|||
var operators:string [] = (StringUtils.URIDecode(params[operatorId])).split(/,(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,-1);
|
||||
if(values.length == operators.length){
|
||||
for(var j=0; j< values.length ; j++){
|
||||
this.selectedFields.push(new AdvancedField(fieldId,fieldparam,this.fieldIdsMap[fieldId].name,this.fieldIdsMap[fieldId].type,StringUtils.unquote(values[j]),operators[j]) )
|
||||
if(this.fieldIdsMap[fieldId].type == "date"){
|
||||
var value:string =StringUtils.unquote(values[j]);
|
||||
var validDates:boolean = true;
|
||||
var dateField:AdvancedField = new AdvancedField(fieldId,fieldparam,this.fieldIdsMap[fieldId].name,this.fieldIdsMap[fieldId].type,value,operators[j]) ;
|
||||
if(value.indexOf("range") != -1){
|
||||
dateField.dateValue.type="range";
|
||||
if(value.length < 26 ){
|
||||
validDates =false;
|
||||
}else{
|
||||
if(!Dates.isValidDate(value.substring(5,15)) || !Dates.isValidDate(value.substring(16,26))){
|
||||
validDates =false;
|
||||
}else {
|
||||
dateField.dateValue.from = Dates.getDateFromString(value.substring(5,15));
|
||||
dateField.dateValue.to = Dates.getDateFromString(value.substring(16,26));
|
||||
}
|
||||
}
|
||||
// "rangeYYYY-MM-DD:YYYY-MM-DD"
|
||||
}else{
|
||||
dateField.dateValue.setDatesByType(value);
|
||||
}
|
||||
if(validDates){
|
||||
this.selectedFields.push(dateField);
|
||||
}
|
||||
|
||||
}else{
|
||||
this.selectedFields.push(new AdvancedField(fieldId,fieldparam,this.fieldIdsMap[fieldId].name,this.fieldIdsMap[fieldId].type,StringUtils.unquote(values[j]),operators[j]) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -136,15 +144,22 @@ export class AdvancedSearchPageComponent {
|
|||
this.parameterNames.splice(0,this.parameterNames.length);
|
||||
this.parameterValues.splice(0,this.parameterValues.length);
|
||||
var fields: { [key:string]:{ values:string[], operators:string[] }}={};
|
||||
console.log("In createUrlParameters :"+ this.selectedFields.length);
|
||||
for(var i = 0; i< this.selectedFields.length; i++){
|
||||
if(this.fieldIdsMap[this.selectedFields[i].id] != undefined && this.selectedFields[i].value.length > 0){
|
||||
for(var i = 0; i< this.selectedFields.length; i++){
|
||||
if(this.fieldIdsMap[this.selectedFields[i].id] != undefined && (this.selectedFields[i].value.length > 0 || this.selectedFields[i].type == "date" )){
|
||||
if(!fields[this.selectedFields[i].id]){
|
||||
fields[this.selectedFields[i].id] = {values:[], operators:[]};
|
||||
fields[this.selectedFields[i].id].values =[];
|
||||
fields[this.selectedFields[i].id].operators =[];
|
||||
}
|
||||
fields[this.selectedFields[i].id].values.push(StringUtils.quote(StringUtils.URIEncode(this.selectedFields[i].value)));
|
||||
if(this.selectedFields[i].type == "date"){
|
||||
if(this.selectedFields[i].dateValue.type == "range"){
|
||||
fields[this.selectedFields[i].id].values.push(StringUtils.quote(StringUtils.URIEncode("range"+Dates.getDateToString(this.selectedFields[i].dateValue.from)+":"+Dates.getDateToString(this.selectedFields[i].dateValue.to))));
|
||||
}else{
|
||||
fields[this.selectedFields[i].id].values.push(StringUtils.quote(StringUtils.URIEncode(this.selectedFields[i].dateValue.type)));
|
||||
}
|
||||
}else{
|
||||
fields[this.selectedFields[i].id].values.push(StringUtils.quote(StringUtils.URIEncode(this.selectedFields[i].value)));
|
||||
}
|
||||
fields[this.selectedFields[i].id].operators.push(this.selectedFields[i].operatorId);
|
||||
|
||||
}
|
||||
|
@ -163,25 +178,31 @@ export class AdvancedSearchPageComponent {
|
|||
if(includePage && this.searchUtils.page != 1){
|
||||
params += "&page="+this.searchUtils.page;
|
||||
}
|
||||
console.log("In end of createUrlParameters :"+ this.selectedFields.length);
|
||||
return '?'+params;
|
||||
return '?'+params;
|
||||
}
|
||||
public createQueryParameters(){
|
||||
var params="";
|
||||
var countParams = 0;
|
||||
for(var i = 0; i< this.selectedFields.length; i++){
|
||||
if(this.fieldIdsMap[this.selectedFields[i].id] != undefined && this.selectedFields[i].value != ""){
|
||||
if(this.selectedFields[i].id == "q"){
|
||||
var op = "";
|
||||
// if()
|
||||
params += (countParams == 0 ? "" : this.selectedFields[i].operatorId) + " " + '"' + StringUtils.URIEncode(this.selectedFields[i].value) + '"' + " ";
|
||||
}else if(countParams == 0 && this.selectedFields[i].operatorId == "not"){
|
||||
params += " "+ this.selectedFields[i].id + " <> "+'"' + StringUtils.URIEncode(this.selectedFields[i].value) +'"' + " ";
|
||||
if(this.fieldIdsMap[this.selectedFields[i].id] != undefined && (this.selectedFields[i].value != "" ||this.selectedFields[i].type == "date")){
|
||||
console.log("createQueryParameters::"+this.selectedFields[i].type);
|
||||
if(this.selectedFields[i].type == "date"){
|
||||
if(this.selectedFields[i].dateValue.type != "any"){
|
||||
params += (countParams == 0 ? "" : this.selectedFields[i].operatorId) + " " + this.selectedFields[i].id + this.fieldIdsMap[this.selectedFields[i].id].equalityOperator+ '"' + StringUtils.URIEncode(Dates.getDateToString(this.selectedFields[i].dateValue.from)) + " "
|
||||
+ StringUtils.URIEncode(Dates.getDateToString(this.selectedFields[i].dateValue.to)) + '"' + " ";
|
||||
}
|
||||
}else{
|
||||
params += (countParams == 0 ? "" : this.selectedFields[i].operatorId + " " ) + this.selectedFields[i].id + this.fieldIdsMap[this.selectedFields[i].id].equalityOperator+'"' + encodeURIComponent(this.selectedFields[i].value) +'"' + " ";
|
||||
|
||||
}
|
||||
if(this.selectedFields[i].id == "q"){
|
||||
var op = "";
|
||||
// if()
|
||||
params += (countParams == 0 ? "" : this.selectedFields[i].operatorId) + " " + '"' + StringUtils.URIEncode(this.selectedFields[i].value) + '"' + " ";
|
||||
}else if(countParams == 0 && this.selectedFields[i].operatorId == "not"){
|
||||
params += " "+ this.selectedFields[i].id + " <> "+'"' + StringUtils.URIEncode(this.selectedFields[i].value) +'"' + " ";
|
||||
}else{
|
||||
params += (countParams == 0 ? "" : this.selectedFields[i].operatorId + " " ) + this.selectedFields[i].id + this.fieldIdsMap[this.selectedFields[i].id].equalityOperator+'"' + encodeURIComponent(this.selectedFields[i].value) +'"' + " ";
|
||||
|
||||
}
|
||||
}
|
||||
countParams++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { MyDatePickerModule } from 'mydatepicker';
|
||||
import {DateFilterComponent} from './dateFilter.component';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, MyDatePickerModule
|
||||
],
|
||||
declarations: [
|
||||
DateFilterComponent
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
DateFilterComponent
|
||||
]
|
||||
})
|
||||
export class DateFilterModule { }
|
|
@ -1,3 +1,4 @@
|
|||
import {Dates} from '../../utils/string-utils.class';
|
||||
export class Filter{
|
||||
public title: string; // eg Type
|
||||
public filterId: string; // type (name in url parameter)
|
||||
|
@ -5,7 +6,10 @@ export class Filter{
|
|||
public countSelectedValues: number = 0;
|
||||
public values: Value[] = [];
|
||||
public filterOperator: string ='or';
|
||||
|
||||
|
||||
}
|
||||
|
||||
export class Value{
|
||||
public name: string; //eg Article, Journal
|
||||
public id: string; //0001
|
||||
|
@ -22,7 +26,7 @@ export class AdvancedField{
|
|||
public operatorId: string;
|
||||
public operatorName: string ="";
|
||||
public valid: boolean = true;
|
||||
|
||||
public dateValue:DateValue = new DateValue("any");
|
||||
|
||||
constructor(id:string,param:string,name:string, type:string, value:string,operator:string){
|
||||
this.id = id;
|
||||
|
@ -35,7 +39,43 @@ export class AdvancedField{
|
|||
|
||||
}
|
||||
}
|
||||
export class DateValue{
|
||||
public types = ["any","range","1mon","2mon","3mon","6mon","12mon","2year","5year","10year"];
|
||||
public typesTitle = ["any","in the specified date range","in the last month","in the last 2 months","in the last 3 months","in the last 6 months","in the last year","in the last 2 years","in the last 5 years","in the last 10 years"];
|
||||
public type: string ;
|
||||
public from:Date = new Date();
|
||||
public to:Date = new Date();
|
||||
constructor(type:string = "any"){
|
||||
this.setDatesByType(type);
|
||||
}
|
||||
public setDatesByType(type:string){
|
||||
if(this.types.indexOf(type) == -1){
|
||||
type=this.types[0];
|
||||
}
|
||||
this.type = type;
|
||||
this.to = Dates.getDateToday();
|
||||
if(this.type == "range" || this.type == "any"){ // for type "any" just to initiate with values
|
||||
this.from = Dates.getDateXMonthsAgo(1);
|
||||
}else if(this.type == "1mon"){
|
||||
this.from = Dates.getDateXMonthsAgo(1);
|
||||
}else if(this.type == "2mon"){
|
||||
this.from = Dates.getDateXMonthsAgo(2);
|
||||
}else if(this.type == "3mon"){
|
||||
this.from = Dates.getDateXMonthsAgo(3);
|
||||
}else if(this.type == "6mon"){
|
||||
this.from = Dates.getDateXMonthsAgo(6);
|
||||
}else if(this.type == "12mon"){
|
||||
this.from = Dates.getDateXMonthsAgo(12);
|
||||
}else if(this.type == "2year"){
|
||||
this.from = Dates.getDateXYearsAgo(2);
|
||||
}else if(this.type == "5year"){
|
||||
this.from = Dates.getDateXYearsAgo(5);
|
||||
}else if(this.type == "10year"){
|
||||
this.from = Dates.getDateXYearsAgo(10);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
export class OPERATOR{
|
||||
public static AND: string ="and";
|
||||
public static OR: string ="or";
|
||||
|
|
|
@ -164,13 +164,13 @@ export class SearchPageComponent {
|
|||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
doiQuery += "&q=("+doisParams+")"
|
||||
doiQuery += "&"+doisParams;
|
||||
}
|
||||
}else{
|
||||
keywordQuery += "&q=("+StringUtils.quote(StringUtils.URIEncode(keyword)) +")";
|
||||
keywordQuery += "&q="+StringUtils.URIEncode(keyword);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -212,10 +212,10 @@ export class SearchPageComponent {
|
|||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
doiQuery += "and ("+doisParams+")"
|
||||
doiQuery += "&"+doisParams;
|
||||
}
|
||||
}else{
|
||||
keywordQuery += "and ("+StringUtils.quote(StringUtils.URIEncode(keyword)) +")";
|
||||
|
@ -321,15 +321,15 @@ export class SearchPageComponent {
|
|||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
doiQuery += "&q=("+doisParams+")"
|
||||
doiQuery += "&"+doisParams;
|
||||
}else{
|
||||
keywordQuery += "&q=("+StringUtils.quote(StringUtils.URIEncode(this.searchUtils.keyword)) +")"
|
||||
keywordQuery += "&q="+StringUtils.URIEncode(this.searchUtils.keyword);
|
||||
}
|
||||
}else{
|
||||
keywordQuery += "&q=("+StringUtils.quote(StringUtils.URIEncode(this.searchUtils.keyword)) +")"
|
||||
keywordQuery += "&q="+StringUtils.URIEncode(this.searchUtils.keyword);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,10 +361,10 @@ export class SearchPageComponent {
|
|||
var DOIs:string[] = DOI.getDOIsFromString(this.searchUtils.keyword);
|
||||
var doisParams = "";
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
doiQuery += " and ("+doisParams+")"
|
||||
doiQuery += "&"+doisParams;
|
||||
}
|
||||
}else{
|
||||
keywordQuery += " and ("+StringUtils.quote(StringUtils.URIEncode(this.searchUtils.keyword)) +")"
|
||||
|
|
|
@ -6,11 +6,11 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
|||
@Component({
|
||||
selector: 'search-result',
|
||||
template: `
|
||||
|
||||
<ul class="uk-list uk-list-line uk-margin">
|
||||
<div *ngIf="status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No Results found</div>
|
||||
<div *ngIf="status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
|
||||
<div *ngIf="status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
|
||||
<div *ngIf="status == errorCodes.LOADING && showLoading" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
|
||||
|
||||
<li *ngFor="let result of results" class="uk-animation-fade">
|
||||
<h4 class = "{{result.title.accessMode}} {{result.title.sc39}}" [title] = result.title.accessMode >
|
||||
|
@ -134,6 +134,7 @@ export class SearchResultComponent {
|
|||
@Input() status: number;
|
||||
@Input() type: string;
|
||||
@Input() urlParam: string;
|
||||
@Input() showLoading: boolean = false;
|
||||
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
|
|
@ -108,7 +108,7 @@ export class SearchDataprovidersComponent {
|
|||
public getNumForSearch(keyword: string) {
|
||||
var parameters="datasources/count";
|
||||
if(keyword != "") {
|
||||
parameters += "?q="+'"'+keyword+'"';
|
||||
parameters += "?q="+keyword;
|
||||
}
|
||||
this._searchDataprovidersService.numOfDataproviders(parameters).subscribe(
|
||||
data => {
|
||||
|
@ -218,7 +218,7 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number)
|
|||
public getResults(keyword:string,refine:boolean, page: number, size: number){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q="+ keyword;
|
||||
}
|
||||
this._getResults(parameters,refine,page,this.searchUtils.size);
|
||||
}
|
||||
|
|
|
@ -155,14 +155,13 @@ public getResults(keyword:string,refine:boolean, page: number, size: number){
|
|||
if(keyword.length > 0){
|
||||
var DOIs:string[] = DOI.getDOIsFromString(keyword);
|
||||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
parameters += "q=("+doisParams+")"
|
||||
parameters += "&"+doisParams;
|
||||
}else{
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
}
|
||||
this._getResults(parameters,refine,page,size);
|
||||
|
|
|
@ -80,7 +80,7 @@ export class SearchOrganizationsComponent {
|
|||
public getResults(keyword:string,refine:boolean, page: number, size: number){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
this._getResults(parameters,refine,page,this.searchUtils.size);
|
||||
}
|
||||
|
|
|
@ -64,12 +64,12 @@ export class SearchPeopleComponent {
|
|||
|
||||
public ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
public getResults(keyword:string,refine:boolean, page: number, size: number){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q="+ keyword;
|
||||
}
|
||||
this._getResults(parameters,refine,page,this.searchUtils.size);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ export class SearchProjectsComponent {
|
|||
public getResults(keyword:string,refine:boolean, page: number, size: number){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q="+keyword;
|
||||
}
|
||||
this._getResults(parameters,refine,page,this.searchUtils.size);
|
||||
}
|
||||
|
|
|
@ -190,12 +190,12 @@ public getResults(keyword:string,refine:boolean, page: number, size: number){
|
|||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
parameters += "q=("+doisParams+")"
|
||||
parameters += "&"+doisParams;
|
||||
}else{
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
}
|
||||
this._getResults(parameters,refine,page,size);
|
||||
|
|
|
@ -60,10 +60,11 @@ export class SearchDatasetsService {
|
|||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
url += "q=("+doisParams+")"
|
||||
url += "&"+doisParams;
|
||||
|
||||
}
|
||||
if(refineParams!= null && refineParams != '' ) {
|
||||
url += refineParams;
|
||||
|
@ -267,7 +268,7 @@ export class SearchDatasetsService {
|
|||
|
||||
//OpenaireProperties.getSearchAPIURLLast()
|
||||
//"http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"datasets/count?q="+'"' + params + '"'+"&format=json";
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"datasets/count?q=" + params + "&format=json";
|
||||
let key = url;
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key));
|
||||
|
|
|
@ -187,7 +187,7 @@ export class SearchOrganizationsService {
|
|||
|
||||
//OpenaireProperties.getSearchAPIURLLast()
|
||||
//"http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"organizations/count?q="+'"' + params + '"'+ "&format=json";
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"organizations/count?q=" + params + "&format=json";
|
||||
|
||||
let key = url;
|
||||
if (this._cache.has(key)) {
|
||||
|
|
|
@ -110,7 +110,7 @@ export class SearchPeopleService {
|
|||
|
||||
//OpenaireProperties.getSearchAPIURLLast()
|
||||
//"http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"people/count?q="+'"' + params + '"'+ "&format=json";
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"people/count?q=" + params + "&format=json";
|
||||
let key = url;
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key));
|
||||
|
|
|
@ -235,7 +235,7 @@ export class SearchProjectsService {
|
|||
|
||||
//OpenaireProperties.getSearchAPIURLLast()
|
||||
//"http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"projects/count?q="+'"' + params + '"'+ "&format=json";
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"projects/count?q=" + params + "&format=json";
|
||||
let key = url;
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key));
|
||||
|
|
|
@ -91,10 +91,11 @@ export class SearchPublicationsService {
|
|||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
url += "q=("+doisParams+")"
|
||||
url +="&"+doisParams;
|
||||
|
||||
}
|
||||
if(refineParams!= null && refineParams != '' ) {
|
||||
url += refineParams;
|
||||
|
@ -434,7 +435,7 @@ export class SearchPublicationsService {
|
|||
|
||||
//OpenaireProperties.getSearchAPIURLLast()
|
||||
//"http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"publications/count?q="+ '"' + params + '"' +"&format=json";
|
||||
let url = OpenaireProperties.getSearchAPIURLLast()+"publications/count?q="+ params +"&format=json";
|
||||
let key = url;
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key));
|
||||
|
|
|
@ -32,7 +32,7 @@ export class FetchDataproviders {
|
|||
public getResultsByKeyword(keyword:string, page: number, size: number){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
@ -91,13 +91,16 @@ export class FetchDataproviders {
|
|||
}
|
||||
|
||||
public getNumForSearch(keyword: string) {
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = errorCodes.LOADING;
|
||||
var parameters="datasources/count";
|
||||
if(keyword != "") {
|
||||
parameters += "?q="+'"'+keyword+'"';
|
||||
parameters += "?q=" +keyword ;
|
||||
}
|
||||
this._searchDataprovidersService.numOfDataproviders(parameters).subscribe(
|
||||
data => {
|
||||
this.searchUtils.totalResults = data;
|
||||
this.searchUtils.status = errorCodes.DONE;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -38,12 +38,12 @@ export class FetchDatasets{
|
|||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
parameters += "q=("+doisParams+")"
|
||||
parameters += "&"+doisParams;
|
||||
}else{
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ export class FetchOrganizations {
|
|||
public getResultsByKeyword(keyword:string , page: number, size: number){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
|
|
@ -25,7 +25,7 @@ export class FetchPeople {
|
|||
public getResultsByKeyword(keyword:string, page: number, size: number){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
|
|
@ -27,7 +27,7 @@ export class FetchProjects{
|
|||
public getResultsByKeyword(keyword:string, page: number, size: number){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
|
|
@ -50,12 +50,12 @@ export class FetchPublications {
|
|||
var doisParams = "";
|
||||
|
||||
for(var i =0 ;i < DOIs.length; i++){
|
||||
doisParams+=(doisParams.length > 0?" or ":"")+'((pidclassid exact doi) and (pid exact "'+ DOIs[i]+'"))';
|
||||
doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
|
||||
}
|
||||
if(doisParams.length > 0){
|
||||
parameters += "q=("+doisParams+")"
|
||||
parameters += "&"+doisParams;
|
||||
}else{
|
||||
parameters = "q="+'"' + keyword + '"';
|
||||
parameters = "q=" + keyword;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,14 +3,17 @@ export class SearchFields {
|
|||
//RESULTS
|
||||
//Used for datasets and publications
|
||||
//In case Datasets should display different fields, use seperate tables for fields
|
||||
public RESULT_REFINE_FIELDS = ["instancetypename", "resultlanguagename", "community","relproject", "relfunderid",
|
||||
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
|
||||
"resultacceptanceyear","resultbestlicense"];//,"collectedfrom"];
|
||||
public RESULT_REFINE_FIELDS = [
|
||||
"relfunderid",
|
||||
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
|
||||
"relproject","resultacceptanceyear",
|
||||
|
||||
"resultbestlicense", "instancetypename", "resultlanguagename", "community","collectedfrom"];
|
||||
|
||||
public RESULT_ADVANCED_FIELDS:string[] = ["q","resulttitle","relperson","resultpublisher","instancetypename",
|
||||
"resultlanguagename", "community","relprojectid", "relfunderid",
|
||||
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
|
||||
"resultacceptanceyear","resultbestlicense","pid","resulthostingdatasourceid","collectedfromdatasourceid","relpersonid"];
|
||||
"resultdateofacceptance","resultbestlicense","pid","resulthostingdatasourceid","collectedfromdatasourceid","relpersonid"];
|
||||
public RESULT_FIELDS: { [key:string]:FieldDetails}={
|
||||
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
|
||||
["resulttitle"]:{name:"Title", type:"keyword", param:"title", equalityOperator: "="},
|
||||
|
@ -30,7 +33,8 @@ export class SearchFields {
|
|||
["relfundinglevel0_id"]:{name:"Funding Stream", type:"refine", param:"funderlv0", equalityOperator: " exact "},
|
||||
["relfundinglevel1_id"]:{name:"Funding Substream level 1", type:"refine", param:"funderlv1", equalityOperator: " exact "},
|
||||
["relfundinglevel2_id"]:{name:"Funding Substream level 2", type:"refine", param:"funderlv2", equalityOperator: " exact "},
|
||||
["resultacceptanceyear"]:{name:"Year", type:"year", param:"year", equalityOperator: " exact "},
|
||||
["resultacceptanceyear"]:{name:"Publication Date", type:"keyword", param:"year", equalityOperator: " exact "},
|
||||
["resultdateofacceptance"]:{name:"Publication Date", type:"date", param:"date", equalityOperator: " within "},
|
||||
["resultbestlicense"]:{name:"Access Mode", type:"vocabulary", param:"access", equalityOperator: " exact "},
|
||||
// ["resultbestlicenseid"]:{name:"Access Mode", type:"refine", param:"access", equalityOperator: " exact "},
|
||||
["collectedfrom"]:{name:"Datasource", type:"refine", param:"datasource", equalityOperator: " exact "},
|
||||
|
@ -43,7 +47,7 @@ export class SearchFields {
|
|||
"fundinglevel2_id","projectstartyear","projectendyear","projectecsc39"];
|
||||
public PROJECT_ADVANCED_FIELDS:string[] = ["q","projectacronym","projecttitle","projectkeywords",
|
||||
"funderid", "fundinglevel0_id","fundinglevel1_id", "fundinglevel2_id",
|
||||
"projectstartyear","projectendyear","projectecsc39",
|
||||
"projectstartdate","projectenddate","projectecsc39",
|
||||
"projectcode","relorganizationid", "collectedfromdatasourceid"];
|
||||
public PROJECT_FIELDS: { [key:string]:FieldDetails}={
|
||||
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
|
||||
|
@ -57,7 +61,8 @@ export class SearchFields {
|
|||
["fundinglevel2_id"]:{name:"Funding Substream level 2", type:"refine", param:"funderlv2", equalityOperator: " exact "},
|
||||
["projectstartyear"]:{name:"Start Year", type:"year", param:"startyear", equalityOperator: " exact "},
|
||||
["projectendyear"]:{name:"End Year", type:"year", param:"endyear", equalityOperator: " exact "},
|
||||
|
||||
["projectstartdate"]:{name:"Start Date", type:"date", param:"startdate", equalityOperator: " within "},
|
||||
["projectenddate"]:{name:"End Date", type:"date", param:"enddate", equalityOperator: " within "},
|
||||
["projectecsc39"]:{name:"Special Clause 39", type:"boolean", param:"sc39", equalityOperator: " exact "},
|
||||
["projectcode"]:{name:"Project Code", type:"keyword", param:"code", equalityOperator: " exact "},
|
||||
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", equalityOperator: " exact "},
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
export class RouterHelper {
|
||||
//Use this class function to create queryParams Objects in format {key1:value1} or {key1:value1,key2:value2,key3:value3,...} for multiple parameters
|
||||
constructor(){}
|
||||
// <a [queryParams]="RouterHelper.createQueryParam(filter.filterId,value.id)" routerLinkActive="router-link-active" [routerLink]=baseUrl>Link</a>
|
||||
public createQueryParam(key:string,value:string){
|
||||
var obj ={};
|
||||
|
@ -10,9 +11,9 @@ export class RouterHelper {
|
|||
return obj;
|
||||
|
||||
}
|
||||
public createQueryParamsPaging(keys:string[],values:string[],key:string,value:number){
|
||||
public createQueryParamsPaging(keys:string[],values:string[],pageParameter:string,pageValue:number){
|
||||
var obj = this.createQueryParams(keys, values);
|
||||
obj[key] = ""+value;
|
||||
obj[pageParameter] = ""+pageValue;
|
||||
return obj;
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import {Component, Input} from '@angular/core';
|
|||
<div *ngIf="dataProviders != undefined">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div role="separator" class="divider" *ngFor="let item of dataProviders">
|
||||
|
|
|
@ -11,7 +11,7 @@ export class Dates {
|
|||
return true;
|
||||
}
|
||||
//format YYYY-MM-DD
|
||||
public static isValidDate(dateString)
|
||||
public static isValidDate(dateString:string)
|
||||
{
|
||||
// First check for the pattern
|
||||
if(!/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(dateString))
|
||||
|
@ -40,11 +40,41 @@ export class Dates {
|
|||
return day > 0 && day <= monthLength[month - 1];
|
||||
|
||||
}
|
||||
public static getDateToday(){
|
||||
public static getDateToday():Date{
|
||||
var myDate = new Date();
|
||||
return myDate.getFullYear()+ "-" +(myDate.getMonth() + 1) + "-" + myDate.getDate() ;
|
||||
return myDate;
|
||||
|
||||
}
|
||||
public static getDateToString(myDate:Date):string{
|
||||
var date:string = myDate.getFullYear()+ "-" ;
|
||||
date+=((myDate.getMonth() + 1)<10)?"0"+(myDate.getMonth() + 1):(myDate.getMonth() + 1) ;
|
||||
date+="-";
|
||||
date+= (myDate.getDate() <10 )? "0"+myDate.getDate():myDate.getDate() ;
|
||||
return date;
|
||||
|
||||
}
|
||||
public static getDateXMonthsAgo(x:number):Date{
|
||||
var myDate = new Date();
|
||||
myDate.setMonth(myDate.getMonth() - x);
|
||||
return myDate;
|
||||
|
||||
}
|
||||
public static getDateXYearsAgo(x:number):Date{
|
||||
var myDate = new Date();
|
||||
myDate.setFullYear(myDate.getFullYear() - x);
|
||||
return myDate;
|
||||
|
||||
}
|
||||
public static getDateFromString(date:string):Date{
|
||||
|
||||
var myDate = new Date();
|
||||
myDate.setFullYear(+date.substring(0,4));
|
||||
myDate.setMonth(+date.substring(5,7)-1);
|
||||
myDate.setDate(+date.substring(8,11))
|
||||
return myDate;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class DOI{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!doctype html>
|
||||
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
|
||||
<head>
|
||||
<link href="http://demo.openaire.eu" rel="canonical" />
|
||||
<!--link href="http://demo.openaire.eu" rel="canonical" /-->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
@ -127,6 +127,9 @@
|
|||
display: inline-table;
|
||||
}
|
||||
|
||||
.dateFilter .mydp{
|
||||
margin-top:5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
@ -155,6 +158,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div-->
|
||||
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue