rename frontend external reference to fetcher external reference
This commit is contained in:
parent
7df098a010
commit
1b66d19bde
|
@ -1,10 +1,7 @@
|
|||
export interface ExternalReference {
|
||||
export interface FetcherExternalReference {
|
||||
id: string;
|
||||
name: string;
|
||||
abbreviation: string;
|
||||
pid: string;
|
||||
originalId: string;
|
||||
key: string;
|
||||
pidTypeField: string;
|
||||
uri: string;
|
||||
description: string;
|
||||
|
|
|
@ -14,7 +14,7 @@ import { BaseHttpService } from '../http/base-http.service';
|
|||
import { ConfigurationService } from '../configuration/configuration.service';
|
||||
import { LicenseCriteria } from '@app/core/query/license/license-criteria';
|
||||
import {PublicationCriteria} from "@app/core/query/publication/publication-criteria";
|
||||
import { ExternalReference } from '@app/core/model/external-reference/external-reference';
|
||||
import { FetcherExternalReference } from '@app/core/model/external-reference/external-reference';
|
||||
import { ExternalReferencesType } from '@app/core/common/enum/external-references-type';
|
||||
@Injectable()
|
||||
export class ExternalSourcesService {
|
||||
|
@ -59,11 +59,11 @@ export class ExternalSourcesService {
|
|||
return this.http.get<ExternalSourceItemModel[]>(this.actionUrl + 'licenses' + '?query=' + requestItem.criteria.like + '&type=' + requestItem.criteria.type, { headers: this.headers });
|
||||
}
|
||||
|
||||
public listExternal(externalType: ExternalReferencesType, query: string, type: string): Observable<ExternalReference[]> {
|
||||
public listExternal(externalType: ExternalReferencesType, query: string, type: string): Observable<FetcherExternalReference[]> {
|
||||
const url = this.configurationService.server + `external-references/search/${externalType}`;
|
||||
const options = { params: { query: query, type: type } };
|
||||
|
||||
return this.http.get<ExternalReference[]>(url, options);
|
||||
return this.http.get<FetcherExternalReference[]>(url, options);
|
||||
}
|
||||
|
||||
public searchDatasetTags(requestItem: RequestItem<TagCriteria>): Observable<ExternalSourceItemModel[]> {
|
||||
|
|
|
@ -48,7 +48,7 @@ import {MatDialog} from "@angular/material/dialog";
|
|||
import {HttpError} from "@common/modules/errors/error-handling/http-error-handling.service";
|
||||
import {HttpErrorResponse} from "@angular/common/http";
|
||||
import * as FileSaver from "file-saver";
|
||||
import { ExternalReference } from '@app/core/model/external-reference/external-reference';
|
||||
import { FetcherExternalReference } from '@app/core/model/external-reference/external-reference';
|
||||
import { ExternalReferencesType } from '@app/core/common/enum/external-references-type';
|
||||
|
||||
@Component({
|
||||
|
@ -464,7 +464,7 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
searchDatasetExternalDatasets(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalDatasets(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<ExternalDatasetCriteria> = new RequestItem();
|
||||
requestItem.criteria = new ExternalDatasetCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
|
@ -473,42 +473,42 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
|||
return this.externalSourcesService.listExternal(ExternalReferencesType.Datasets, requestItem.criteria.like, requestItem.criteria.type);
|
||||
}
|
||||
|
||||
searchDatasetExternalDataRepositories(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalDataRepositories(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<DataRepositoryCriteria> = new RequestItem();
|
||||
requestItem.criteria = new DataRepositoryCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
requestItem.criteria.type = '';
|
||||
return this.externalSourcesService.listExternal(ExternalReferencesType.DataRepositories, requestItem.criteria.like, requestItem.criteria.type);
|
||||
}
|
||||
searchDatasetExternalPubRepositories(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalPubRepositories(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<DataRepositoryCriteria> = new RequestItem();
|
||||
requestItem.criteria = new DataRepositoryCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
requestItem.criteria.type = '';
|
||||
return this.externalSourcesService.listExternal(ExternalReferencesType.PubRepositories, requestItem.criteria.like, requestItem.criteria.type);
|
||||
}
|
||||
searchDatasetExternalJournalRepositories(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalJournalRepositories(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<DataRepositoryCriteria> = new RequestItem();
|
||||
requestItem.criteria = new DataRepositoryCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
requestItem.criteria.type = '';
|
||||
return this.externalSourcesService.listExternal(ExternalReferencesType.Journals, requestItem.criteria.like, requestItem.criteria.type);
|
||||
}
|
||||
searchDatasetExternalTaxonomies(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalTaxonomies(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<TaxonomyCriteria> = new RequestItem();
|
||||
requestItem.criteria = new TaxonomyCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
requestItem.criteria.type = '';
|
||||
return this.externalSourcesService.listExternal(ExternalReferencesType.Taxonomies, requestItem.criteria.like, requestItem.criteria.type);
|
||||
}
|
||||
searchDatasetExternalLicences(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalLicences(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<LicenseCriteria> = new RequestItem();
|
||||
requestItem.criteria = new LicenseCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
requestItem.criteria.type = '';
|
||||
return this.externalSourcesService.listExternal(ExternalReferencesType.Licenses, requestItem.criteria.like, requestItem.criteria.type);
|
||||
}
|
||||
searchDatasetExternalPublications(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalPublications(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<PublicationCriteria> = new RequestItem();
|
||||
requestItem.criteria = new PublicationCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
|
@ -516,7 +516,7 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
|||
return this.externalSourcesService.listExternal(ExternalReferencesType.Publications, requestItem.criteria.like, requestItem.criteria.type);
|
||||
}
|
||||
|
||||
searchDatasetExternalRegistries(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalRegistries(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<RegistryCriteria> = new RequestItem();
|
||||
requestItem.criteria = new RegistryCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
|
@ -524,7 +524,7 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
|||
return this.externalSourcesService.listExternal(ExternalReferencesType.Registries, requestItem.criteria.like, requestItem.criteria.type);
|
||||
}
|
||||
|
||||
searchDatasetExternalServices(query: string): Observable<ExternalReference[]> {
|
||||
searchDatasetExternalServices(query: string): Observable<FetcherExternalReference[]> {
|
||||
const requestItem: RequestItem<ServiceCriteria> = new RequestItem();
|
||||
requestItem.criteria = new ServiceCriteria();
|
||||
requestItem.criteria.like = query;
|
||||
|
@ -591,12 +591,12 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
filterOrganisations(value: string): Observable<ExternalReference[]> {
|
||||
filterOrganisations(value: string): Observable<FetcherExternalReference[]> {
|
||||
//return this.externalSourcesService.searchDMPOrganizations(value);
|
||||
return this.externalSourcesService.listExternal(ExternalReferencesType.Organizations, value, '');
|
||||
}
|
||||
|
||||
filterResearchers(value: string): Observable<ExternalReference[]> {
|
||||
filterResearchers(value: string): Observable<FetcherExternalReference[]> {
|
||||
//return this.externalSourcesService.searchDMPResearchers({ criteria: { name: value, like: null } });
|
||||
return this.externalSourcesService.listExternal(ExternalReferencesType.Researcher, value, '');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue