fix(collaboration-graph-v2)removed deprecated service and models
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -19,7 +19,6 @@ api/keywords.service.ts
|
||||
api/news.service.ts
|
||||
api/organization.service.ts
|
||||
api/patents.service.ts
|
||||
api/personNetwork.service.ts
|
||||
api/persons.service.ts
|
||||
api/projects.service.ts
|
||||
api/ranking.service.ts
|
||||
@@ -42,7 +41,6 @@ model/authorAffiliationsInner.ts
|
||||
model/authorCountsByYearInner.ts
|
||||
model/authorIds.ts
|
||||
model/authorMetricsRequest.ts
|
||||
model/authorNetworkNode.ts
|
||||
model/authorNode.ts
|
||||
model/authorPage.ts
|
||||
model/authorParsedLongestName.ts
|
||||
@@ -51,7 +49,6 @@ model/authorStaticStats.ts
|
||||
model/authorSummaryStats.ts
|
||||
model/authorTopicProfile.ts
|
||||
model/authorTopicStats.ts
|
||||
model/authorsFilterProperties.ts
|
||||
model/authorsListResponse.ts
|
||||
model/authorship.ts
|
||||
model/autocompleteLocationItem.ts
|
||||
@@ -73,9 +70,6 @@ model/careerStage.ts
|
||||
model/collaborationGraph.ts
|
||||
model/collaborationGraphStatus.ts
|
||||
model/collaborationGraphStatusResponse.ts
|
||||
model/collaborationNetwork.ts
|
||||
model/collaborationNetworkEdge.ts
|
||||
model/collaborationNetworkNodeType.ts
|
||||
model/companyConnection.ts
|
||||
model/companyConnectionsAvailability.ts
|
||||
model/companyConnectionsResponse.ts
|
||||
@@ -119,8 +113,6 @@ model/extractedKeywords.ts
|
||||
model/extractedKeywordsLLM.ts
|
||||
model/extractedKeywordsResponse.ts
|
||||
model/fileUpload.ts
|
||||
model/filterInformation.ts
|
||||
model/filterProperties.ts
|
||||
model/filterType.ts
|
||||
model/fp7EurosciVoc.ts
|
||||
model/fp7LegalBasis.ts
|
||||
@@ -164,8 +156,6 @@ model/institution.ts
|
||||
model/institutionFunderSummary.ts
|
||||
model/institutionGeo.ts
|
||||
model/institutionIds.ts
|
||||
model/institutionInformation.ts
|
||||
model/institutionNetworkNode.ts
|
||||
model/institutionNode.ts
|
||||
model/institutionPage.ts
|
||||
model/institutionPageV2.ts
|
||||
@@ -282,7 +272,6 @@ model/workHasContent.ts
|
||||
model/workIds.ts
|
||||
model/workKeyword.ts
|
||||
model/workMeshInner.ts
|
||||
model/workNetworkNode.ts
|
||||
model/workNode.ts
|
||||
model/workPage.ts
|
||||
model/workPageV2.ts
|
||||
@@ -292,9 +281,7 @@ model/workSustainableDevelopmentGoalsInner.ts
|
||||
model/workTopic.ts
|
||||
model/workTopicDomain.ts
|
||||
model/workTopicField.ts
|
||||
model/workTopicInformation.ts
|
||||
model/workTopicSubfield.ts
|
||||
model/worksFilterProperties.ts
|
||||
model/worksListResponse.ts
|
||||
model/yearlyData.ts
|
||||
param.ts
|
||||
|
||||
@@ -28,8 +28,6 @@ export * from './organization.service';
|
||||
import { OrganizationService } from './organization.service';
|
||||
export * from './patents.service';
|
||||
import { PatentsService } from './patents.service';
|
||||
export * from './personNetwork.service';
|
||||
import { PersonNetworkService } from './personNetwork.service';
|
||||
export * from './persons.service';
|
||||
import { PersonsService } from './persons.service';
|
||||
export * from './projects.service';
|
||||
@@ -46,4 +44,4 @@ export * from './works.service';
|
||||
import { WorksService } from './works.service';
|
||||
export * from './worksV2.service';
|
||||
import { WorksV2Service } from './worksV2.service';
|
||||
export const APIS = [AuthService, AuthorsV2Service, BookmarksService, CompanyConnectionsService, DFGInstitutionsService, DFGPersonsService, DashboardService, FundingService, INSEServiceService, InstitutionsService, InstitutionsV2Service, KeywordsService, NewsService, OrganizationService, PatentsService, PersonNetworkService, PersonsService, ProjectsService, RankingService, TopicsService, TopicsV2Service, UniversityRankingsService, WorksService, WorksV2Service];
|
||||
export const APIS = [AuthService, AuthorsV2Service, BookmarksService, CompanyConnectionsService, DFGInstitutionsService, DFGPersonsService, DashboardService, FundingService, INSEServiceService, InstitutionsService, InstitutionsV2Service, KeywordsService, NewsService, OrganizationService, PatentsService, PersonsService, ProjectsService, RankingService, TopicsService, TopicsV2Service, UniversityRankingsService, WorksService, WorksV2Service];
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
|
||||
} from '@angular/common/http';
|
||||
import { CustomHttpParameterCodec } from '../encoder';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
// @ts-ignore
|
||||
import { CollaborationNetwork } from '../model/collaborationNetwork';
|
||||
// @ts-ignore
|
||||
import { FilterProperties } from '../model/filterProperties';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
import { BaseService } from '../api.base.service';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PersonNetworkService extends BaseService {
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a person\'s collaboration network.
|
||||
* Returns a person\'s collaboration network based on their works and co-authors.
|
||||
* @endpoint post /api/person/network/{raw_user_id}
|
||||
* @param rawUserId The raw user ID of the person.
|
||||
* @param filterProperties
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CollaborationNetwork>;
|
||||
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CollaborationNetwork>>;
|
||||
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CollaborationNetwork>>;
|
||||
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (rawUserId === null || rawUserId === undefined) {
|
||||
throw new Error('Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/person/network/${this.configuration.encodeParam({name: "rawUserId", value: rawUserId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<CollaborationNetwork>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: filterProperties,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { CollaborationNetworkNodeType } from './collaborationNetworkNodeType';
|
||||
|
||||
|
||||
export interface AuthorNetworkNode {
|
||||
/**
|
||||
* The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID.
|
||||
*/
|
||||
raw_id: string;
|
||||
/**
|
||||
* The display name of the node.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The category of the node, either \'author\', \'institution\', or \'work\'.
|
||||
*/
|
||||
category: CollaborationNetworkNodeType;
|
||||
}
|
||||
export namespace AuthorNetworkNode {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface AuthorsFilterProperties {
|
||||
/**
|
||||
* The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included.
|
||||
*/
|
||||
allowed_institutions?: Array<string>;
|
||||
/**
|
||||
* The minimum number of collaborations required for an author to be included in the collaboration network.
|
||||
*/
|
||||
min_collaborations?: number;
|
||||
/**
|
||||
* The maximum number of collaborations allowed for an author to be included in the collaboration network.
|
||||
*/
|
||||
max_collaborations?: number;
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { FilterInformation } from './filterInformation';
|
||||
import { WorkNetworkNode } from './workNetworkNode';
|
||||
import { CollaborationNetworkEdge } from './collaborationNetworkEdge';
|
||||
import { InstitutionNetworkNode } from './institutionNetworkNode';
|
||||
import { AuthorNetworkNode } from './authorNetworkNode';
|
||||
|
||||
|
||||
export interface CollaborationNetwork {
|
||||
/**
|
||||
* The raw person ID of the person whose collaboration network this is.
|
||||
*/
|
||||
raw_person_id: string;
|
||||
/**
|
||||
* The work nodes in the collaboration network.
|
||||
*/
|
||||
work_nodes: Array<WorkNetworkNode>;
|
||||
/**
|
||||
* The author nodes in the collaboration network.
|
||||
*/
|
||||
author_nodes: Array<AuthorNetworkNode>;
|
||||
/**
|
||||
* The institution nodes in the collaboration network.
|
||||
*/
|
||||
institution_nodes: Array<InstitutionNetworkNode>;
|
||||
/**
|
||||
* The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I
|
||||
*/
|
||||
collaboration_edges: Array<CollaborationNetworkEdge>;
|
||||
/**
|
||||
* The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network.
|
||||
*/
|
||||
filter_information: FilterInformation;
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface CollaborationNetworkEdge {
|
||||
/**
|
||||
* The raw ID of the source node.
|
||||
*/
|
||||
raw_source_id: string;
|
||||
/**
|
||||
* The raw ID of the target node.
|
||||
*/
|
||||
raw_target_id: string;
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export const CollaborationNetworkNodeType = {
|
||||
Author: 'author',
|
||||
Institution: 'institution',
|
||||
Work: 'work'
|
||||
} as const;
|
||||
export type CollaborationNetworkNodeType = typeof CollaborationNetworkNodeType[keyof typeof CollaborationNetworkNodeType];
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { InstitutionInformation } from './institutionInformation';
|
||||
import { WorkTopicInformation } from './workTopicInformation';
|
||||
|
||||
|
||||
export interface FilterInformation {
|
||||
/**
|
||||
* The minimum publication year of the works in the collaboration network.
|
||||
*/
|
||||
min_possible_year: number;
|
||||
/**
|
||||
* The maximum publication year of the works in the collaboration network.
|
||||
*/
|
||||
max_possible_year: number;
|
||||
/**
|
||||
* The list of institutions associated with the works in the collaboration network.
|
||||
*/
|
||||
institutions: Array<InstitutionInformation>;
|
||||
/**
|
||||
* The list of topics associated with the works in the collaboration network.
|
||||
*/
|
||||
topics: Array<WorkTopicInformation>;
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { WorksFilterProperties } from './worksFilterProperties';
|
||||
import { AuthorsFilterProperties } from './authorsFilterProperties';
|
||||
|
||||
|
||||
export interface FilterProperties {
|
||||
/**
|
||||
* The type of filter to apply when generating the collaboration network. Can be either \'works\' or \'authors\'. If \'works\', the filter properties in the \'works_filter_properties\' field will be used. If \'authors\', the filter properties in the \'authors_filter_properties\' field will be used.
|
||||
*/
|
||||
filter_by?: string;
|
||||
works_filter_properties: WorksFilterProperties | null;
|
||||
authors_filter_properties: AuthorsFilterProperties | null;
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface InstitutionInformation {
|
||||
/**
|
||||
* The raw institution ID of the institution.
|
||||
*/
|
||||
raw_id: string;
|
||||
/**
|
||||
* The display name of the institution.
|
||||
*/
|
||||
display_name: string;
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { CollaborationNetworkNodeType } from './collaborationNetworkNodeType';
|
||||
|
||||
|
||||
export interface InstitutionNetworkNode {
|
||||
/**
|
||||
* The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID.
|
||||
*/
|
||||
raw_id: string;
|
||||
/**
|
||||
* The display name of the node.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The category of the node, either \'author\', \'institution\', or \'work\'.
|
||||
*/
|
||||
category: CollaborationNetworkNodeType;
|
||||
}
|
||||
export namespace InstitutionNetworkNode {
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ export * from './authorAffiliationsInner';
|
||||
export * from './authorCountsByYearInner';
|
||||
export * from './authorIds';
|
||||
export * from './authorMetricsRequest';
|
||||
export * from './authorNetworkNode';
|
||||
export * from './authorNode';
|
||||
export * from './authorPage';
|
||||
export * from './authorParsedLongestName';
|
||||
@@ -17,7 +16,6 @@ export * from './authorStaticStats';
|
||||
export * from './authorSummaryStats';
|
||||
export * from './authorTopicProfile';
|
||||
export * from './authorTopicStats';
|
||||
export * from './authorsFilterProperties';
|
||||
export * from './authorsListResponse';
|
||||
export * from './authorship';
|
||||
export * from './autocompleteLocationItem';
|
||||
@@ -39,9 +37,6 @@ export * from './careerStage';
|
||||
export * from './collaborationGraph';
|
||||
export * from './collaborationGraphStatus';
|
||||
export * from './collaborationGraphStatusResponse';
|
||||
export * from './collaborationNetwork';
|
||||
export * from './collaborationNetworkEdge';
|
||||
export * from './collaborationNetworkNodeType';
|
||||
export * from './companyConnection';
|
||||
export * from './companyConnectionsAvailability';
|
||||
export * from './companyConnectionsResponse';
|
||||
@@ -85,8 +80,6 @@ export * from './extractedKeywords';
|
||||
export * from './extractedKeywordsLLM';
|
||||
export * from './extractedKeywordsResponse';
|
||||
export * from './fileUpload';
|
||||
export * from './filterInformation';
|
||||
export * from './filterProperties';
|
||||
export * from './filterType';
|
||||
export * from './fp7EurosciVoc';
|
||||
export * from './fp7LegalBasis';
|
||||
@@ -130,8 +123,6 @@ export * from './institution';
|
||||
export * from './institutionFunderSummary';
|
||||
export * from './institutionGeo';
|
||||
export * from './institutionIds';
|
||||
export * from './institutionInformation';
|
||||
export * from './institutionNetworkNode';
|
||||
export * from './institutionNode';
|
||||
export * from './institutionPage';
|
||||
export * from './institutionPageV2';
|
||||
@@ -247,7 +238,6 @@ export * from './workHasContent';
|
||||
export * from './workIds';
|
||||
export * from './workKeyword';
|
||||
export * from './workMeshInner';
|
||||
export * from './workNetworkNode';
|
||||
export * from './workNode';
|
||||
export * from './workPage';
|
||||
export * from './workPageV2';
|
||||
@@ -257,8 +247,6 @@ export * from './workSustainableDevelopmentGoalsInner';
|
||||
export * from './workTopic';
|
||||
export * from './workTopicDomain';
|
||||
export * from './workTopicField';
|
||||
export * from './workTopicInformation';
|
||||
export * from './workTopicSubfield';
|
||||
export * from './worksFilterProperties';
|
||||
export * from './worksListResponse';
|
||||
export * from './yearlyData';
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { WorkTopicInformation } from './workTopicInformation';
|
||||
import { CollaborationNetworkNodeType } from './collaborationNetworkNodeType';
|
||||
|
||||
|
||||
export interface WorkNetworkNode {
|
||||
/**
|
||||
* The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID.
|
||||
*/
|
||||
raw_id: string;
|
||||
/**
|
||||
* The display name of the node.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The category of the node, either \'author\', \'institution\', or \'work\'.
|
||||
*/
|
||||
category: CollaborationNetworkNodeType;
|
||||
publication_year: number | null;
|
||||
work_topics_information: Set<WorkTopicInformation> | null;
|
||||
}
|
||||
export namespace WorkNetworkNode {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface WorkTopicInformation {
|
||||
/**
|
||||
* The ID of the topic.
|
||||
*/
|
||||
raw_topic_id: string;
|
||||
/**
|
||||
* The name of the topic.
|
||||
*/
|
||||
display_name: string;
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface WorksFilterProperties {
|
||||
/**
|
||||
* The start publication year for the works to include in the collaboration network.
|
||||
*/
|
||||
start_year?: number;
|
||||
/**
|
||||
* The end publication year for the works to include in the collaboration network.
|
||||
*/
|
||||
end_year?: number;
|
||||
/**
|
||||
* The list of raw topic IDs to include in the collaboration network. If empty, all topics will be included.
|
||||
*/
|
||||
allowed_topics?: Array<string>;
|
||||
/**
|
||||
* The minimum number of contributors required for a work to be included in the collaboration network.
|
||||
*/
|
||||
min_contributors?: number;
|
||||
/**
|
||||
* The maximum number of contributors allowed for a work to be included in the collaboration network.
|
||||
*/
|
||||
max_contributors?: number;
|
||||
}
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
import { ResolveFn } from '@angular/router';
|
||||
import { inject } from '@angular/core';
|
||||
import {
|
||||
AuthorsFilterProperties,
|
||||
CollaborationNetwork,
|
||||
FilterProperties,
|
||||
PersonNetworkService,
|
||||
WorksFilterProperties,
|
||||
} from '../api';
|
||||
|
||||
const DEFAULT_MIN_CONTRIBUTORS = 2;
|
||||
const DEFAULT_MAX_CONTRIBUTORS = 10;
|
||||
const DEFAULT_MIN_COLLABORATIONS = 1;
|
||||
const DEFAULT_MAX_COLLABORATIONS = 100;
|
||||
|
||||
export const collaborationNetworkResolver: ResolveFn<CollaborationNetwork> = (
|
||||
route,
|
||||
state,
|
||||
) => {
|
||||
const rawAuthorId = route.parent?.params['id'];
|
||||
if (!rawAuthorId) {
|
||||
throw new Error('Author ID is required to resolve collaboration network');
|
||||
}
|
||||
const startYear = route.queryParamMap.get('start_year');
|
||||
const endYear = route.queryParamMap.get('end_year');
|
||||
const minContributors = route.queryParamMap.get('min_contributors');
|
||||
const maxContributors = route.queryParamMap.get('max_contributors');
|
||||
const minCollaborations = route.queryParamMap.get('min_collaborations');
|
||||
const maxCollaborations = route.queryParamMap.get('max_collaborations');
|
||||
const institutions = route.queryParamMap.get('institutions');
|
||||
const topics = route.queryParamMap.get('topics');
|
||||
const filterBy = route.queryParamMap.get('filter_by') || 'works';
|
||||
|
||||
if (filterBy !== 'works' && filterBy !== 'authors') {
|
||||
throw new Error("Invalid filter_by value. Expected 'works' or 'authors'.");
|
||||
}
|
||||
|
||||
let worksFilterProperties: WorksFilterProperties | null = null;
|
||||
let authorsFilterProperties: AuthorsFilterProperties | null = null;
|
||||
if (filterBy === 'works') {
|
||||
worksFilterProperties = {
|
||||
start_year: startYear ? Number.parseInt(startYear, 10) : undefined,
|
||||
end_year: endYear ? Number.parseInt(endYear, 10) : undefined,
|
||||
min_contributors: minContributors
|
||||
? Number.parseInt(minContributors, 10)
|
||||
: DEFAULT_MIN_CONTRIBUTORS,
|
||||
max_contributors: maxContributors
|
||||
? Number.parseInt(maxContributors, 10)
|
||||
: DEFAULT_MAX_CONTRIBUTORS,
|
||||
allowed_topics: topics ? topics.split(',') : undefined,
|
||||
};
|
||||
}
|
||||
if (filterBy === 'authors') {
|
||||
authorsFilterProperties = {
|
||||
min_collaborations: minCollaborations
|
||||
? Number.parseInt(minCollaborations, 10)
|
||||
: DEFAULT_MIN_COLLABORATIONS,
|
||||
max_collaborations: maxCollaborations
|
||||
? Number.parseInt(maxCollaborations, 10)
|
||||
: DEFAULT_MAX_COLLABORATIONS,
|
||||
allowed_institutions: institutions ? institutions.split(',') : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
const filterProperties: FilterProperties = {
|
||||
filter_by: filterBy,
|
||||
works_filter_properties: worksFilterProperties,
|
||||
authors_filter_properties: authorsFilterProperties,
|
||||
};
|
||||
|
||||
return inject(PersonNetworkService).getCollaborationNetwork(
|
||||
rawAuthorId,
|
||||
filterProperties,
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user