csv in search pages added (simple, advanced, data providers) | html tags not considered in description (search pages, publication landing, dataset landing)
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@45484 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
f035292eb3
commit
c1af4972d8
|
@ -18,7 +18,7 @@ import {OrganizationService} from '../services/organization.service';
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="status == errorCodes.LOADING || (status == errorCodes.LOADING && searchDataprovidersComponent.searchUtils.status == errorCodes.LOADING)"
|
<div *ngIf="status == errorCodes.LOADING || (status == errorCodes.LOADING && searchDataprovidersComponent.searchUtils.status == errorCodes.LOADING)"
|
||||||
class="alert alert-info" role="alert">
|
class="uk-alert uk-alert-primary" role="alert">
|
||||||
Loading...
|
Loading...
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<blockquote *ngIf="datasetInfo.description != ''">
|
<blockquote *ngIf="datasetInfo.description != ''">
|
||||||
<div class="uk-text-justify" [innerHTML]="datasetInfo.description"></div>
|
<div class="uk-text-justify">{{datasetInfo.description}}</div>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<!--div class="uk-text-right">
|
<!--div class="uk-text-right">
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<blockquote *ngIf="publicationInfo.description != ''">
|
<blockquote *ngIf="publicationInfo.description != ''">
|
||||||
<div class="uk-text-justify" [innerHTML]="publicationInfo.description"></div>
|
<div class="uk-text-justify">{{publicationInfo.description}}</div>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<!--div class="uk-text-right">
|
<!--div class="uk-text-right">
|
||||||
<button (click)=" toggleClaimResult()" class = "uk-button uk-button-primary uk-button-mini" >Add Research Results</button>
|
<button (click)=" toggleClaimResult()" class = "uk-button uk-button-primary uk-button-mini" >Add Research Results</button>
|
||||||
|
|
|
@ -15,11 +15,12 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
selector: 'advanced-search-dataprovider',
|
selector: 'advanced-search-dataprovider',
|
||||||
template: `
|
template: `
|
||||||
<advanced-search-page pageTitle="Advanced Search Data Providers" entityType="dataprovider"
|
<advanced-search-page pageTitle="Advanced Search Data Providers" entityType="dataprovider"
|
||||||
type = "datasources"
|
type = "data providers"
|
||||||
[(results)] = "results"
|
[(results)] = "results"
|
||||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||||
[(searchUtils)] = "searchUtils"
|
[(searchUtils)] = "searchUtils"
|
||||||
(queryChange)="queryChanged($event)" [resourcesQuery]="resourcesQuery">
|
(queryChange)="queryChanged($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="resources">
|
||||||
</advanced-search-page>
|
</advanced-search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -36,8 +37,8 @@ export class AdvancedSearchDataProvidersComponent {
|
||||||
public selectedFields:AdvancedField[] = [];
|
public selectedFields:AdvancedField[] = [];
|
||||||
|
|
||||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||||
public resourcesQuery = "query=(oaftype exact datasource)";
|
public resourcesQuery = "(oaftype exact datasource)";
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute, private _searchDataProvidersService: SearchDataprovidersService ) {
|
constructor (private route: ActivatedRoute, private _searchDataProvidersService: SearchDataprovidersService ) {
|
||||||
|
|
||||||
|
@ -65,6 +66,12 @@ export class AdvancedSearchDataProvidersComponent {
|
||||||
}
|
}
|
||||||
sub: any;
|
sub: any;
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number){
|
||||||
|
if(parameters!= null && parameters != '' ) {
|
||||||
|
this.csvParams ="&type=datasources&query=( "+this.resourcesQuery + "and (" + parameters + "))";
|
||||||
|
}else{
|
||||||
|
this.csvParams ="&type=datasources&query="+this.resourcesQuery;
|
||||||
|
}
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -18,7 +18,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
[(results)] = "results"
|
[(results)] = "results"
|
||||||
[(searchUtils)] = "searchUtils"
|
[(searchUtils)] = "searchUtils"
|
||||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||||
(queryChange)="queryChanged($event)" [resourcesQuery]="resourcesQuery">
|
(queryChange)="queryChanged($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="resources">
|
||||||
</advanced-search-page>
|
</advanced-search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -38,8 +39,8 @@ export class AdvancedSearchDatasetsComponent {
|
||||||
public selectedFields:AdvancedField[] = [];
|
public selectedFields:AdvancedField[] = [];
|
||||||
|
|
||||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||||
public resourcesQuery = "query= ( (oaftype exact result) and (resulttypeid exact dataset) )";
|
public resourcesQuery = "( (oaftype exact result) and (resulttypeid exact dataset) )";
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute, private _searchDatasetsService: SearchDatasetsService ) {
|
constructor (private route: ActivatedRoute, private _searchDatasetsService: SearchDatasetsService ) {
|
||||||
|
|
||||||
|
@ -70,6 +71,12 @@ export class AdvancedSearchDatasetsComponent {
|
||||||
}
|
}
|
||||||
sub: any;
|
sub: any;
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number){
|
||||||
|
if(parameters!= null && parameters != '' ) {
|
||||||
|
this.csvParams ="&type=datasets&query=( "+this.resourcesQuery + "and (" + parameters + "))";
|
||||||
|
}else{
|
||||||
|
this.csvParams ="&type=datasets&query="+this.resourcesQuery;
|
||||||
|
}
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -18,7 +18,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
[(results)] = "results"
|
[(results)] = "results"
|
||||||
[(searchUtils)] = "searchUtils"
|
[(searchUtils)] = "searchUtils"
|
||||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||||
(queryChange)="queryChanged($event)" [resourcesQuery]="resourcesQuery">
|
(queryChange)="queryChanged($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="resources">
|
||||||
</advanced-search-page>
|
</advanced-search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -33,10 +34,11 @@ export class AdvancedSearchOrganizationsComponent {
|
||||||
public fieldIds: string[] = this.searchFields.ORGANIZATION_ADVANCED_FIELDS;
|
public fieldIds: string[] = this.searchFields.ORGANIZATION_ADVANCED_FIELDS;
|
||||||
public fieldIdsMap = this.searchFields.ORGANIZATION_FIELDS;
|
public fieldIdsMap = this.searchFields.ORGANIZATION_FIELDS;
|
||||||
public selectedFields:AdvancedField[] = [];
|
public selectedFields:AdvancedField[] = [];
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||||
|
|
||||||
public resourcesQuery = "query=(oaftype exact organization)";
|
public resourcesQuery = "(oaftype exact organization)";
|
||||||
constructor (private route: ActivatedRoute, private _searchOrganizationsService: SearchOrganizationsService ) {
|
constructor (private route: ActivatedRoute, private _searchOrganizationsService: SearchOrganizationsService ) {
|
||||||
|
|
||||||
this.results =[];
|
this.results =[];
|
||||||
|
@ -67,6 +69,12 @@ public resourcesQuery = "query=(oaftype exact organization)";
|
||||||
}
|
}
|
||||||
sub: any;
|
sub: any;
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number){
|
||||||
|
if(parameters!= null && parameters != '' ) {
|
||||||
|
this.csvParams ="&type=organizations&query=( "+this.resourcesQuery + "and (" + parameters + "))";
|
||||||
|
}else{
|
||||||
|
this.csvParams ="&type=organizations&query="+this.resourcesQuery;
|
||||||
|
}
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -18,7 +18,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
[(results)] = "results"
|
[(results)] = "results"
|
||||||
[(searchUtils)] = "searchUtils"
|
[(searchUtils)] = "searchUtils"
|
||||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||||
(queryChange)="queryChanged($event)" [resourcesQuery]="resourcesQuery">
|
(queryChange)="queryChanged($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="resources">
|
||||||
</advanced-search-page>
|
</advanced-search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -37,8 +38,8 @@ export class AdvancedSearchPeopleComponent {
|
||||||
public selectedFields:AdvancedField[] = [];
|
public selectedFields:AdvancedField[] = [];
|
||||||
|
|
||||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||||
public resourcesQuery = "query=(oaftype exact person)";
|
public resourcesQuery = "(oaftype exact person)";
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute, private _searchPeopleService: SearchPeopleService ) {
|
constructor (private route: ActivatedRoute, private _searchPeopleService: SearchPeopleService ) {
|
||||||
|
|
||||||
|
@ -69,6 +70,12 @@ export class AdvancedSearchPeopleComponent {
|
||||||
}
|
}
|
||||||
sub: any;
|
sub: any;
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number){
|
||||||
|
if(parameters!= null && parameters != '' ) {
|
||||||
|
this.csvParams ="&type=people&query=( "+this.resourcesQuery + "and (" + parameters + "))";
|
||||||
|
}else{
|
||||||
|
this.csvParams ="&type=people&query="+this.resourcesQuery;
|
||||||
|
}
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -17,7 +17,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
[(results)] = "results"
|
[(results)] = "results"
|
||||||
[(searchUtils)] = "searchUtils"
|
[(searchUtils)] = "searchUtils"
|
||||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||||
(queryChange)="queryChanged($event)" [resourcesQuery]="resourcesQuery">
|
(queryChange)="queryChanged($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="resources">
|
||||||
</advanced-search-page>
|
</advanced-search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -36,8 +37,8 @@ export class AdvancedSearchProjectsComponent {
|
||||||
public selectedFields:AdvancedField[] = [];
|
public selectedFields:AdvancedField[] = [];
|
||||||
|
|
||||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||||
public resourcesQuery = "query=(oaftype exact project)";
|
public resourcesQuery = "(oaftype exact project)";
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute, private _searchProjectsService: SearchProjectsService ) {
|
constructor (private route: ActivatedRoute, private _searchProjectsService: SearchProjectsService ) {
|
||||||
|
|
||||||
|
@ -68,6 +69,12 @@ export class AdvancedSearchProjectsComponent {
|
||||||
}
|
}
|
||||||
sub: any;
|
sub: any;
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number){
|
||||||
|
if(parameters!= null && parameters != '' ) {
|
||||||
|
this.csvParams ="&type=projects&query=( "+this.resourcesQuery + "and (" + parameters + "))";
|
||||||
|
}else{
|
||||||
|
this.csvParams ="&type=projects&query="+this.resourcesQuery;
|
||||||
|
}
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -18,7 +18,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
[(results)] = "results"
|
[(results)] = "results"
|
||||||
[(searchUtils)] = "searchUtils"
|
[(searchUtils)] = "searchUtils"
|
||||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||||
(queryChange)="queryChanged($event)" [resourcesQuery]="resourcesQuery">
|
(queryChange)="queryChanged($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="resources">
|
||||||
</advanced-search-page>
|
</advanced-search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -34,7 +35,8 @@ export class AdvancedSearchPublicationsComponent {
|
||||||
public fieldIds: string[] = this.searchFields.RESULT_ADVANCED_FIELDS;
|
public fieldIds: string[] = this.searchFields.RESULT_ADVANCED_FIELDS;
|
||||||
public fieldIdsMap= this.searchFields.RESULT_FIELDS;
|
public fieldIdsMap= this.searchFields.RESULT_FIELDS;
|
||||||
public selectedFields:AdvancedField[] = [];
|
public selectedFields:AdvancedField[] = [];
|
||||||
public resourcesQuery = "query=((oaftype exact result) and (resulttypeid exact publication))";
|
public resourcesQuery = "((oaftype exact result) and (resulttypeid exact publication))";
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
@ViewChild (AdvancedSearchPageComponent) searchPage : AdvancedSearchPageComponent ;
|
||||||
|
|
||||||
|
@ -69,6 +71,12 @@ export class AdvancedSearchPublicationsComponent {
|
||||||
}
|
}
|
||||||
sub: any;
|
sub: any;
|
||||||
public getResults(parameters:string, page: number, size: number){
|
public getResults(parameters:string, page: number, size: number){
|
||||||
|
if(parameters!= null && parameters != '' ) {
|
||||||
|
this.csvParams ="&type=publications&query=("+this.resourcesQuery +" and (" + parameters + "))";
|
||||||
|
}else{
|
||||||
|
this.csvParams ="&type=publications&query="+this.resourcesQuery;
|
||||||
|
}
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -18,7 +18,8 @@ import {ExportCSVComponent} from '../../utils/exportCSV.component';
|
||||||
<search-page pageTitle="Compatible Dataproviders" type="datasources" [(filters)] = "filters"
|
<search-page pageTitle="Compatible Dataproviders" type="datasources" [(filters)] = "filters"
|
||||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[baseUrl] = "baseUrl" [showResultCount]=false (queryChange)="queryChanged($event)"
|
[baseUrl] = "baseUrl" [showResultCount]=false (queryChange)="queryChanged($event)"
|
||||||
(downloadClick)="downloadClicked($event)" [resourcesQuery]="resourcesQuery" >
|
(downloadClick)="downloadClicked($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="resources">
|
||||||
</search-page>
|
</search-page>
|
||||||
<!--table-view [(datasources)] = results></table-view-->
|
<!--table-view [(datasources)] = results></table-view-->
|
||||||
|
|
||||||
|
@ -43,7 +44,8 @@ export class SearchCompatibleDataprovidersComponent {
|
||||||
"export":[]
|
"export":[]
|
||||||
};
|
};
|
||||||
public CSVDownloaded = false;
|
public CSVDownloaded = false;
|
||||||
public resourcesQuery = "query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = hostedBy) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))";
|
public resourcesQuery = "&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = hostedBy) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))";
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||||
|
|
||||||
|
@ -81,6 +83,8 @@ export class SearchCompatibleDataprovidersComponent {
|
||||||
this.subResults.unsubscribe();
|
this.subResults.unsubscribe();
|
||||||
} }
|
} }
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||||
|
this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -18,7 +18,8 @@ import {ExportCSVComponent} from '../../utils/exportCSV.component';
|
||||||
<search-page pageTitle="Entity Registries" type="datasources" [(filters)] = "filters"
|
<search-page pageTitle="Entity Registries" type="datasources" [(filters)] = "filters"
|
||||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[baseUrl] = "baseUrl" [showResultCount]=false (queryChange)="queryChanged($event)"
|
[baseUrl] = "baseUrl" [showResultCount]=false (queryChange)="queryChanged($event)"
|
||||||
(downloadClick)="downloadClicked($event)" [resourcesQuery]="resourcesQuery" >
|
(downloadClick)="downloadClicked($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="resources">
|
||||||
</search-page>
|
</search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -45,7 +46,8 @@ export class SearchEntityRegistriesComponent {
|
||||||
public CSVDownloaded = false;
|
public CSVDownloaded = false;
|
||||||
|
|
||||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||||
public resourcesQuery = "query=((oaftype exact datasource) and(datasourcetypeuiid = other))";
|
public resourcesQuery = "&query=((oaftype exact datasource) and(datasourcetypeuiid = other))";
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
|
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
|
@ -82,6 +84,8 @@ export class SearchEntityRegistriesComponent {
|
||||||
this.subResults.unsubscribe();
|
this.subResults.unsubscribe();
|
||||||
} }
|
} }
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||||
|
this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -38,6 +38,7 @@ import {ModalLoading} from '../../utils/modal/loading.component';
|
||||||
</advanced-search-form>
|
</advanced-search-form>
|
||||||
<!--div class="uk-text-right" *ngIf="results && results.length>= size"-->
|
<!--div class="uk-text-right" *ngIf="results && results.length>= size"-->
|
||||||
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseURLWithParameters" ></search-paging>
|
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseURLWithParameters" ></search-paging>
|
||||||
|
<search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" (downloadClick)="downloadClicked($event)"></search-download>
|
||||||
|
|
||||||
<!--/div-->
|
<!--/div-->
|
||||||
<div>
|
<div>
|
||||||
|
@ -62,7 +63,8 @@ export class AdvancedSearchPageComponent {
|
||||||
@Input() selectedFields:AdvancedField[];
|
@Input() selectedFields:AdvancedField[];
|
||||||
@Input() simpleSearchUrl: string;
|
@Input() simpleSearchUrl: string;
|
||||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||||
@Input() resourcesQuery = "";
|
@Input() csvParams: string;
|
||||||
|
@Input() csvPath: string;
|
||||||
|
|
||||||
public baseURLWithParameters:string = '';
|
public baseURLWithParameters:string = '';
|
||||||
|
|
||||||
|
|
|
@ -7,34 +7,28 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||||
selector: 'search-download',
|
selector: 'search-download',
|
||||||
template: `
|
template: `
|
||||||
<div class= "searchDownload" *ngIf="totalResults > 0">
|
<div class= "searchDownload" *ngIf="totalResults > 0">
|
||||||
<div class="uk-text-right" *ngIf="totalResults <= 10000">
|
<p class="uk-text-right" *ngIf="totalResults <= 10000">
|
||||||
<!--a (click)="download()"-->
|
<!--a (click)="download()"-->
|
||||||
<a href="{{downloadURLAPI}}publications?format=csv">
|
<a href="{{downloadURLAPI}}{{type}}?format=csv&page=0&size={{totalResults}}{{csvParams}}">
|
||||||
<span class="glyphicon glyphicon-download" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-download" aria-hidden="true"></span>
|
||||||
Download report (CSV)
|
CSV Download
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</p>
|
||||||
<!--div class="uk-text-right" *ngIf="totalResults > 100000">
|
|
||||||
<a (click)="denialOfDownload()">
|
|
||||||
<span class="glyphicon glyphicon-download" aria-hidden="true"></span>
|
|
||||||
Download report (CSV)
|
|
||||||
</a>
|
|
||||||
</div-->
|
|
||||||
</div>
|
</div>
|
||||||
<modal-alert></modal-alert>
|
<!--modal-alert></modal-alert-->
|
||||||
|
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
export class SearchDownloadComponent {
|
export class SearchDownloadComponent {
|
||||||
@Input() totalResults:number = 0;
|
@Input() totalResults:number = 0;
|
||||||
|
@Input() csvParams: string;
|
||||||
|
@Input() type: string;
|
||||||
@ViewChild(AlertModal) alertApplyAll;
|
@ViewChild(AlertModal) alertApplyAll;
|
||||||
@Output() downloadClick = new EventEmitter();
|
@Output() downloadClick = new EventEmitter();
|
||||||
private downloadURLAPI: string;
|
private downloadURLAPI: string;
|
||||||
|
|
||||||
constructor () {
|
constructor () {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.downloadURLAPI = OpenaireProperties.getCsvAPIURL();
|
this.downloadURLAPI = OpenaireProperties.getCsvAPIURL();
|
||||||
|
|
|
@ -39,8 +39,8 @@ import {ModalLoading} from '../../utils/modal/loading.component';
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-width-large-3-4 uk-width-medium-3-4 uk-width-small-1-1" >
|
<div class="uk-width-large-3-4 uk-width-medium-3-4 uk-width-small-1-1" >
|
||||||
<search-download [totalResults]="searchUtils.totalResults" (downloadClick)="downloadClicked($event)"></search-download>
|
|
||||||
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseURLWithParameters"></search-paging>
|
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseURLWithParameters"></search-paging>
|
||||||
|
<search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" (downloadClick)="downloadClicked($event)"></search-download>
|
||||||
<search-result [results]="results" [totalResults]="searchUtils.totalResults" [status]=searchUtils.status [page]="searchUtils.page"></search-result>
|
<search-result [results]="results" [totalResults]="searchUtils.totalResults" [status]=searchUtils.status [page]="searchUtils.page"></search-result>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,11 +48,10 @@ import {ModalLoading} from '../../utils/modal/loading.component';
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="!showRefine" >
|
<div *ngIf="!showRefine" >
|
||||||
|
|
||||||
<search-form [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)"></search-form>
|
<search-form [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)"></search-form>
|
||||||
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseURLWithParameters"></search-paging>
|
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseURLWithParameters"></search-paging>
|
||||||
<search-result [results]="results" [totalResults]="searchUtils.totalResults" [status]=searchUtils.status [page]="searchUtils.page"></search-result>
|
<search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" (downloadClick)="downloadClicked($event)"></search-download>
|
||||||
|
<search-result [results]="results" [totalResults]="searchUtils.totalResults" [status]=searchUtils.status [page]="searchUtils.page"></search-result>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -73,7 +72,8 @@ export class SearchPageComponent {
|
||||||
@Input() showResultCount:boolean = true;
|
@Input() showResultCount:boolean = true;
|
||||||
@Input() showRefine:boolean = true;
|
@Input() showRefine:boolean = true;
|
||||||
@Input() refineFields = [];
|
@Input() refineFields = [];
|
||||||
@Input() resourcesQuery = "";
|
@Input() csvParams: string;
|
||||||
|
@Input() csvPath: string;
|
||||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||||
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
|
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
|
||||||
private searchFieldsHelper:SearchFields = new SearchFields();
|
private searchFieldsHelper:SearchFields = new SearchFields();
|
||||||
|
|
|
@ -58,7 +58,9 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<blockquote *ngIf="result.description != undefined && result.description != ''">
|
<blockquote *ngIf="result.description != undefined && result.description != ''">
|
||||||
<div class="text-justify" [innerHTML]="result.description"></div>
|
<div class="text-justify">
|
||||||
|
{{result.description}}
|
||||||
|
</div>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<mark *ngIf="result.embargoEndDate != undefined && result.embargoEndDate != ''">Embargo End Date: {{result.embargoEndDate}}</mark>
|
<mark *ngIf="result.embargoEndDate != undefined && result.embargoEndDate != ''">Embargo End Date: {{result.embargoEndDate}}</mark>
|
||||||
|
|
|
@ -14,9 +14,10 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
selector: 'search-dataproviders',
|
selector: 'search-dataproviders',
|
||||||
template: `
|
template: `
|
||||||
|
|
||||||
<search-page pageTitle="Search Dataproviders" type="datasources" [(filters)] = "filters"
|
<search-page pageTitle="Search Dataproviders" type="data providers" [(filters)] = "filters"
|
||||||
[(results)] = "results" [(searchUtils)] = "searchUtils" [baseUrl] = "baseUrl"
|
[(results)] = "results" [(searchUtils)] = "searchUtils" [baseUrl] = "baseUrl"
|
||||||
(queryChange)="queryChanged($event)" (downloadClick)="downloadClicked($event)">
|
(queryChange)="queryChanged($event)" (downloadClick)="downloadClicked($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="datasources">
|
||||||
</search-page>
|
</search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -36,6 +37,7 @@ export class SearchDataprovidersComponent {
|
||||||
"export":[]
|
"export":[]
|
||||||
};
|
};
|
||||||
public CSVDownloaded = false;
|
public CSVDownloaded = false;
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||||
|
|
||||||
|
@ -212,6 +214,8 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number)
|
||||||
this._getResults(parameters,refine,page,this.searchUtils.size);
|
this._getResults(parameters,refine,page,this.searchUtils.size);
|
||||||
}
|
}
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||||
|
this.csvParams = parameters;
|
||||||
|
|
||||||
if(!refine && !this.searchPage){
|
if(!refine && !this.searchPage){
|
||||||
this.searchPage = new SearchPageComponent(this._location);
|
this.searchPage = new SearchPageComponent(this._location);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,12 +17,12 @@ import {DOI} from '../../utils/string-utils.class';
|
||||||
|
|
||||||
<search-page pageTitle="Search Datasets" type="datasets" [(filters)] = "filters"
|
<search-page pageTitle="Search Datasets" type="datasets" [(filters)] = "filters"
|
||||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)" >
|
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="datasets">
|
||||||
</search-page>
|
</search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export class SearchDatasetsComponent {
|
export class SearchDatasetsComponent {
|
||||||
public results =[];
|
public results =[];
|
||||||
public filters: Filter[] =[];
|
public filters: Filter[] =[];
|
||||||
|
@ -37,7 +37,7 @@ export class SearchDatasetsComponent {
|
||||||
public fieldIdsMap=this.searchFields.RESULT_FIELDS;
|
public fieldIdsMap=this.searchFields.RESULT_FIELDS;
|
||||||
private urlParams : Map<string, string>;
|
private urlParams : Map<string, string>;
|
||||||
private _location:Location;
|
private _location:Location;
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||||
constructor (private route: ActivatedRoute, private _searchDatasetsService: SearchDatasetsService ) {
|
constructor (private route: ActivatedRoute, private _searchDatasetsService: SearchDatasetsService ) {
|
||||||
|
@ -162,6 +162,8 @@ public getResults(keyword:string,refine:boolean, page: number, size: number){
|
||||||
this._getResults(parameters,refine,page,size);
|
this._getResults(parameters,refine,page,size);
|
||||||
}
|
}
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||||
|
this.csvParams = parameters;
|
||||||
|
|
||||||
if(!refine && !this.searchPage){
|
if(!refine && !this.searchPage){
|
||||||
this.searchPage = new SearchPageComponent(this._location);
|
this.searchPage = new SearchPageComponent(this._location);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
|
|
||||||
<search-page pageTitle="Search Organizations" type="organizations" [(filters)] = "filters"
|
<search-page pageTitle="Search Organizations" type="organizations" [(filters)] = "filters"
|
||||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)" >
|
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="organizations">
|
||||||
</search-page>
|
</search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -33,6 +34,7 @@ export class SearchOrganizationsComponent {
|
||||||
public fieldIdsMap = this.searchFields.ORGANIZATION_FIELDS;
|
public fieldIdsMap = this.searchFields.ORGANIZATION_FIELDS;
|
||||||
public urlParams : Map<string, string>;
|
public urlParams : Map<string, string>;
|
||||||
public _location:Location;
|
public _location:Location;
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||||
|
|
||||||
|
@ -75,6 +77,7 @@ export class SearchOrganizationsComponent {
|
||||||
this._getResults(parameters,refine,page,this.searchUtils.size);
|
this._getResults(parameters,refine,page,this.searchUtils.size);
|
||||||
}
|
}
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||||
|
this.csvParams = parameters;
|
||||||
|
|
||||||
if(!refine && !this.searchPage){
|
if(!refine && !this.searchPage){
|
||||||
this.searchPage = new SearchPageComponent(this._location);
|
this.searchPage = new SearchPageComponent(this._location);
|
||||||
|
|
|
@ -16,8 +16,9 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
template: `
|
template: `
|
||||||
|
|
||||||
<search-page pageTitle="Search People" type="people" [(filters)] = "filters"
|
<search-page pageTitle="Search People" type="people" [(filters)] = "filters"
|
||||||
[(results)] = "results"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[(searchUtils)] = "searchUtils" [baseUrl] = "baseUrl" (queryChange)="queryChanged($event)" [showRefine]=false >
|
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)" [showRefine]=false
|
||||||
|
[csvParams]="csvParams" csvPath="people">
|
||||||
</search-page>
|
</search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -32,6 +33,7 @@ export class SearchPeopleComponent {
|
||||||
public _location:Location;
|
public _location:Location;
|
||||||
public searchFields:SearchFields = new SearchFields();
|
public searchFields:SearchFields = new SearchFields();
|
||||||
public refineFields = this.searchFields.PERSON_REFINE_FIELDS;
|
public refineFields = this.searchFields.PERSON_REFINE_FIELDS;
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||||
|
|
||||||
|
@ -152,6 +154,8 @@ public getResults(keyword:string,refine:boolean, page: number, size: number){
|
||||||
this._getResults(parameters,refine,page,this.searchUtils.size);
|
this._getResults(parameters,refine,page,this.searchUtils.size);
|
||||||
}
|
}
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||||
|
this.csvParams = parameters;
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
|
@ -14,9 +14,9 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||||
template: `
|
template: `
|
||||||
|
|
||||||
<search-page pageTitle="Search Projects" type="projects" [(filters)] = "filters"
|
<search-page pageTitle="Search Projects" type="projects" [(filters)] = "filters"
|
||||||
[(results)] = "results"
|
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||||
[(searchUtils)] = "searchUtils"
|
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
|
||||||
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)" >
|
[csvParams]="csvParams" csvPath="projects">
|
||||||
</search-page>
|
</search-page>
|
||||||
`
|
`
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ export class SearchProjectsComponent {
|
||||||
public fieldIdsMap = this.searchFields.PROJECT_FIELDS;
|
public fieldIdsMap = this.searchFields.PROJECT_FIELDS;
|
||||||
public urlParams : Map<string, string>;
|
public urlParams : Map<string, string>;
|
||||||
public _location:Location;
|
public _location:Location;
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||||
|
|
||||||
|
@ -81,6 +82,8 @@ export class SearchProjectsComponent {
|
||||||
this._getResults(parameters,refine,page,this.searchUtils.size);
|
this._getResults(parameters,refine,page,this.searchUtils.size);
|
||||||
}
|
}
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||||
|
this.csvParams = parameters;
|
||||||
|
|
||||||
if(!refine && !this.searchPage){
|
if(!refine && !this.searchPage){
|
||||||
this.searchPage = new SearchPageComponent(this._location);
|
this.searchPage = new SearchPageComponent(this._location);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,11 @@ import {DOI} from '../../utils/string-utils.class';
|
||||||
selector: 'search-publications',
|
selector: 'search-publications',
|
||||||
template: `
|
template: `
|
||||||
|
|
||||||
<search-page pageTitle="Search Publications" type="publications" [(filters)] = "filters"
|
<search-page pageTitle="Search Publications" type="publications"
|
||||||
[(results)] = "results"
|
[(filters)] = "filters" [(results)] = "results"
|
||||||
[(searchUtils)] = "searchUtils" [(baseUrl)] = baseUrl
|
[(searchUtils)] = "searchUtils" [(baseUrl)] = baseUrl
|
||||||
(queryChange)="queryChanged($event)" (downloadClick)="downloadClicked($event)">
|
(queryChange)="queryChanged($event)" (downloadClick)="downloadClicked($event)"
|
||||||
|
[csvParams]="csvParams" csvPath="publications">
|
||||||
</search-page>
|
</search-page>
|
||||||
|
|
||||||
`
|
`
|
||||||
|
@ -47,6 +48,7 @@ export class SearchPublicationsComponent {
|
||||||
"export":[]
|
"export":[]
|
||||||
};
|
};
|
||||||
public CSVDownloaded = false;
|
public CSVDownloaded = false;
|
||||||
|
public csvParams: string;
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute, private _searchPublicationsService: SearchPublicationsService ) {
|
constructor (private route: ActivatedRoute, private _searchPublicationsService: SearchPublicationsService ) {
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
|
@ -61,12 +63,11 @@ export class SearchPublicationsComponent {
|
||||||
this.searchPage.type = "publication";
|
this.searchPage.type = "publication";
|
||||||
|
|
||||||
this.sub = this.route.queryParams.subscribe(params => {
|
this.sub = this.route.queryParams.subscribe(params => {
|
||||||
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
|
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
|
||||||
this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
|
this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
|
||||||
|
|
||||||
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
|
|
||||||
this._getResults(queryParameters, true, this.searchUtils.page, this.searchUtils.size);
|
|
||||||
|
|
||||||
|
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||||
|
this._getResults(queryParameters, true, this.searchUtils.page, this.searchUtils.size);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,13 +191,18 @@ public getResults(keyword:string,refine:boolean, page: number, size: number){
|
||||||
}
|
}
|
||||||
this._getResults(parameters,refine,page,size);
|
this._getResults(parameters,refine,page,size);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
private _getResults(parameters:string,refine:boolean, page: number, size: number){
|
||||||
|
this.csvParams = parameters;
|
||||||
|
|
||||||
if(!refine && !this.searchPage){
|
if(!refine && !this.searchPage){
|
||||||
this.searchPage = new SearchPageComponent(this._location);
|
this.searchPage = new SearchPageComponent(this._location);
|
||||||
}
|
}
|
||||||
|
|
||||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = errorCodes.LOADING;
|
this.searchUtils.status = errorCodes.LOADING;
|
||||||
this.searchPage.openLoading();
|
this.searchPage.openLoading();
|
||||||
|
|
||||||
this.subResults = this._searchPublicationsService.searchPublications(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, this.searchPage.getFields()).subscribe(
|
this.subResults = this._searchPublicationsService.searchPublications(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, this.searchPage.getFields()).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.searchUtils.totalResults = data[0];
|
this.searchUtils.totalResults = data[0];
|
||||||
|
|
|
@ -49,7 +49,6 @@ export class SearchDataprovidersService {
|
||||||
}
|
}
|
||||||
|
|
||||||
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
||||||
url += "&format=json";
|
|
||||||
let key = url;
|
let key = url;
|
||||||
if (this._cache.has(key)) {
|
if (this._cache.has(key)) {
|
||||||
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results'])])
|
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results'])])
|
||||||
|
@ -72,7 +71,6 @@ export class SearchDataprovidersService {
|
||||||
url += refineParams;
|
url += refineParams;
|
||||||
}
|
}
|
||||||
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
||||||
url += "&format=json";
|
|
||||||
let key = url;
|
let key = url;
|
||||||
if (this._cache.has(key)) {
|
if (this._cache.has(key)) {
|
||||||
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "datasource")]);
|
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "datasource")]);
|
||||||
|
@ -95,7 +93,6 @@ export class SearchDataprovidersService {
|
||||||
url += refineParams;
|
url += refineParams;
|
||||||
}
|
}
|
||||||
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
||||||
url += "&format=json";
|
|
||||||
let key = url;
|
let key = url;
|
||||||
if (this._cache.has(key)) {
|
if (this._cache.has(key)) {
|
||||||
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "datasource")]);
|
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "datasource")]);
|
||||||
|
@ -119,7 +116,6 @@ export class SearchDataprovidersService {
|
||||||
}
|
}
|
||||||
let url = link+"?query=(((deletedbyinference = false) AND (oaftype exact datasource)) "+((compatibilities && compatibilities.length > 0)?" "+compatibilities+" ":"")+") and (relorganizationid exact "+id+")";
|
let url = link+"?query=(((deletedbyinference = false) AND (oaftype exact datasource)) "+((compatibilities && compatibilities.length > 0)?" "+compatibilities+" ":"")+") and (relorganizationid exact "+id+")";
|
||||||
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
||||||
url += "&format=json";
|
|
||||||
|
|
||||||
let key = url;
|
let key = url;
|
||||||
if (this._cache.has(key)) {
|
if (this._cache.has(key)) {
|
||||||
|
@ -143,7 +139,6 @@ export class SearchDataprovidersService {
|
||||||
}
|
}
|
||||||
|
|
||||||
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
url += "&page="+(page-1)+"&size="+size+"&format=json";
|
||||||
url += "&format=json";
|
|
||||||
let key = url;
|
let key = url;
|
||||||
if (this._cache.has(key)) {
|
if (this._cache.has(key)) {
|
||||||
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results'])]);
|
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results'])]);
|
||||||
|
|
|
@ -20,7 +20,7 @@ export class SearchPublicationsService {
|
||||||
|
|
||||||
let link = OpenaireProperties.getSearchAPIURLLast()+"publications";
|
let link = OpenaireProperties.getSearchAPIURLLast()+"publications";
|
||||||
|
|
||||||
let url = link+"?"+"&format=json&";
|
let url = link+"?"+"&format=json";
|
||||||
if(params!= null && params != '' ) {
|
if(params!= null && params != '' ) {
|
||||||
url += params;
|
url += params;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ export class SearchPublicationsService {
|
||||||
|
|
||||||
let link = OpenaireProperties.getSearchAPIURLLast()+"publications";
|
let link = OpenaireProperties.getSearchAPIURLLast()+"publications";
|
||||||
|
|
||||||
let url = link+"?"+"&format=json&";
|
let url = link+"?"+"&format=json";
|
||||||
if(params!= null && params != '' ) {
|
if(params!= null && params != '' ) {
|
||||||
url += params;
|
url += params;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ export class OpenaireProperties {
|
||||||
//private static searchServiveURL = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/";
|
//private static searchServiveURL = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/";
|
||||||
private static searchServiveURL = "http://beta.services.openaire.eu:8480/search/";
|
private static searchServiveURL = "http://beta.services.openaire.eu:8480/search/";
|
||||||
// private static searchServiveURL = "http://services.openaire.eu:8380/search/";
|
// private static searchServiveURL = "http://services.openaire.eu:8380/search/";
|
||||||
//private static searchServiveURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/";
|
private static searchServiveURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/";
|
||||||
|
|
||||||
private static csvAPIURL = "http://beta.services.openaire.eu:8480/search/rest/v2/api/";//publications?format=csv
|
private static csvAPIURL = "http://beta.services.openaire.eu:8480/search/rest/v2/api/";//publications?format=csv
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue