Merge branch 'dev' of nes.uni-due.de:lbs/smartguide into feature/keywords-analysis

This commit is contained in:
2026-07-22 23:43:32 +02:00
131 changed files with 59928 additions and 4913 deletions
+28 -1
View File
@@ -42,6 +42,33 @@ export * from './universityRankings.service';
import { UniversityRankingsService } from './universityRankings.service';
export * from './works.service';
import { WorksService } from './works.service';
export * from './ranking.service';
import { RankingService } from './ranking.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, TopicsService, TopicsV2Service, UniversityRankingsService, WorksService, WorksV2Service];
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,
];
+222 -122
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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';
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 { AuthorPage } from '../model/authorPage';
@@ -22,137 +28,231 @@ import { AuthorPage } from '../model/authorPage';
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class AuthorsV2Service extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Returns a paginated list of authors for a given search term based on their display name.
* @endpoint get /api/v2/authors/autocomplete/selector
* @param query A search term to filter authors by (partial matches allowed).
* @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 autocompleteAuthorsForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<AuthorPage>;
public autocompleteAuthorsForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<AuthorPage>>;
public autocompleteAuthorsForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<AuthorPage>>;
public autocompleteAuthorsForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Returns a paginated list of authors for a given search term based on their display name.
* @endpoint get /api/v2/authors/autocomplete/selector
* @param query A search term to filter authors by (partial matches allowed).
* @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 autocompleteAuthorsForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<AuthorPage>;
public autocompleteAuthorsForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<AuthorPage>>;
public autocompleteAuthorsForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<AuthorPage>>;
public autocompleteAuthorsForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarHeaders = this.defaultHeaders;
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';
}
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarPath = `/api/v2/authors/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AuthorPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
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/v2/authors/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AuthorPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
/**
* Returns a paginated list of authors for a given list of author IDs.
* @endpoint get /api/v2/authors/authors/id
* @param authorIds A list of author IDs to retrieve.
* @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 getAuthorsByIds(
authorIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<AuthorPage>;
public getAuthorsByIds(
authorIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<AuthorPage>>;
public getAuthorsByIds(
authorIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<AuthorPage>>;
public getAuthorsByIds(
authorIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (authorIds) {
authorIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'author_ids',
);
});
}
/**
* Returns a paginated list of authors for a given list of author IDs.
* @endpoint get /api/v2/authors/authors/id
* @param authorIds A list of author IDs to retrieve.
* @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 getAuthorsByIds(authorIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<AuthorPage>;
public getAuthorsByIds(authorIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<AuthorPage>>;
public getAuthorsByIds(authorIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<AuthorPage>>;
public getAuthorsByIds(authorIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (authorIds) {
authorIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'author_ids');
})
}
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;
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/v2/authors/authors/id`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AuthorPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
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;
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/v2/authors/authors/id`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AuthorPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+366 -191
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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';
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 { CreatePersonBookmark } from '../model/createPersonBookmark';
@@ -24,206 +30,375 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
import { PersonBookmarkResponse } from '../model/personBookmarkResponse';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class BookmarksService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Bookmark Person
* @endpoint put /api/bookmarks/persons/{person_id}
* @param personId
* @param createPersonBookmark
* @param secureFgpAcc
* @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 bookmarkPerson(
personId: string,
createPersonBookmark: CreatePersonBookmark,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<PersonBookmarkResponse>;
public bookmarkPerson(
personId: string,
createPersonBookmark: CreatePersonBookmark,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<PersonBookmarkResponse>>;
public bookmarkPerson(
personId: string,
createPersonBookmark: CreatePersonBookmark,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<PersonBookmarkResponse>>;
public bookmarkPerson(
personId: string,
createPersonBookmark: CreatePersonBookmark,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (personId === null || personId === undefined) {
throw new Error(
'Required parameter personId was null or undefined when calling bookmarkPerson.',
);
}
if (createPersonBookmark === null || createPersonBookmark === undefined) {
throw new Error(
'Required parameter createPersonBookmark was null or undefined when calling bookmarkPerson.',
);
}
/**
* Bookmark Person
* @endpoint put /api/bookmarks/persons/{person_id}
* @param personId
* @param createPersonBookmark
* @param secureFgpAcc
* @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 bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PersonBookmarkResponse>;
public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PersonBookmarkResponse>>;
public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PersonBookmarkResponse>>;
public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (personId === null || personId === undefined) {
throw new Error('Required parameter personId was null or undefined when calling bookmarkPerson.');
}
if (createPersonBookmark === null || createPersonBookmark === undefined) {
throw new Error('Required parameter createPersonBookmark was null or undefined when calling bookmarkPerson.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
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/bookmarks/persons/${this.configuration.encodeParam({name: "personId", value: personId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PersonBookmarkResponse>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createPersonBookmark,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* List Person Bookmarks
* @endpoint get /api/bookmarks/persons
* @param secureFgpAcc
* @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 listPersonBookmarks(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<PersonBookmarkResponse>>;
public listPersonBookmarks(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<PersonBookmarkResponse>>>;
public listPersonBookmarks(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<PersonBookmarkResponse>>>;
public listPersonBookmarks(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarHeaders = this.defaultHeaders;
const localVarTransferCache: boolean = options?.transferCache ?? true;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
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;
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/bookmarks/persons`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<PersonBookmarkResponse>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
// 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,
);
}
/**
* Remove Person Bookmark
* @endpoint delete /api/bookmarks/persons/{person_id}
* @param personId
* @param secureFgpAcc
* @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 removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;
public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public removePersonBookmark(personId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (personId === null || personId === undefined) {
throw new Error('Required parameter personId was null or undefined when calling removePersonBookmark.');
}
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
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;
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/bookmarks/persons/${this.configuration.encodeParam({name: "personId", value: personId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
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/bookmarks/persons/${this.configuration.encodeParam({ name: 'personId', value: personId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PersonBookmarkResponse>(
'put',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createPersonBookmark,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* List Person Bookmarks
* @endpoint get /api/bookmarks/persons
* @param secureFgpAcc
* @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 listPersonBookmarks(
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Array<PersonBookmarkResponse>>;
public listPersonBookmarks(
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Array<PersonBookmarkResponse>>>;
public listPersonBookmarks(
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Array<PersonBookmarkResponse>>>;
public listPersonBookmarks(
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
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;
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/bookmarks/persons`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<PersonBookmarkResponse>>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Remove Person Bookmark
* @endpoint delete /api/bookmarks/persons/{person_id}
* @param personId
* @param secureFgpAcc
* @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 removePersonBookmark(
personId: string,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any>;
public removePersonBookmark(
personId: string,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<any>>;
public removePersonBookmark(
personId: string,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<any>>;
public removePersonBookmark(
personId: string,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (personId === null || personId === undefined) {
throw new Error(
'Required parameter personId was null or undefined when calling removePersonBookmark.',
);
}
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
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;
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/bookmarks/persons/${this.configuration.encodeParam({ name: 'personId', value: personId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>(
'delete',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+222 -122
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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';
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 { DfgInstitutionSummaryPage } from '../model/dfgInstitutionSummaryPage';
@@ -22,137 +28,231 @@ import { DfgInstitutionSummaryPage } from '../model/dfgInstitutionSummaryPage';
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class DFGInstitutionsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/dfg/institutions/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getDfgInstitutionAutocompleteForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<DfgInstitutionSummaryPage>;
public getDfgInstitutionAutocompleteForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<DfgInstitutionSummaryPage>>;
public getDfgInstitutionAutocompleteForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<DfgInstitutionSummaryPage>>;
public getDfgInstitutionAutocompleteForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/dfg/institutions/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgInstitutionSummaryPage>;
public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgInstitutionSummaryPage>>;
public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgInstitutionSummaryPage>>;
public getDfgInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarHeaders = this.defaultHeaders;
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';
}
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarPath = `/api/dfg/institutions/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgInstitutionSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
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/dfg/institutions/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgInstitutionSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
/**
* Returns a list of institutions based on their IDs.
* @endpoint get /api/dfg/institutions/ids
* @param institutionIds A list of institution IDs to retrieve.
* @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 getDfgInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<DfgInstitutionSummaryPage>;
public getDfgInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<DfgInstitutionSummaryPage>>;
public getDfgInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<DfgInstitutionSummaryPage>>;
public getDfgInstitutionsByIds(
institutionIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'institution_ids',
);
});
}
/**
* Returns a list of institutions based on their IDs.
* @endpoint get /api/dfg/institutions/ids
* @param institutionIds A list of institution IDs to retrieve.
* @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 getDfgInstitutionsByIds(institutionIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgInstitutionSummaryPage>;
public getDfgInstitutionsByIds(institutionIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgInstitutionSummaryPage>>;
public getDfgInstitutionsByIds(institutionIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgInstitutionSummaryPage>>;
public getDfgInstitutionsByIds(institutionIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'institution_ids');
})
}
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;
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/dfg/institutions/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgInstitutionSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
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;
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/dfg/institutions/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgInstitutionSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+222 -122
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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';
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 { DfgPersonSummaryPage } from '../model/dfgPersonSummaryPage';
@@ -22,137 +28,231 @@ import { DfgPersonSummaryPage } from '../model/dfgPersonSummaryPage';
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class DFGPersonsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Returns a list of persons based on a search term for autocomplete functionality.
* @endpoint get /api/dfg/persons/autocomplete/selector
* @param query A search term to filter persons by (partial matches allowed).
* @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 getDfgPersonAutocompleteForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<DfgPersonSummaryPage>;
public getDfgPersonAutocompleteForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<DfgPersonSummaryPage>>;
public getDfgPersonAutocompleteForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<DfgPersonSummaryPage>>;
public getDfgPersonAutocompleteForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Returns a list of persons based on a search term for autocomplete functionality.
* @endpoint get /api/dfg/persons/autocomplete/selector
* @param query A search term to filter persons by (partial matches allowed).
* @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 getDfgPersonAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgPersonSummaryPage>;
public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgPersonSummaryPage>>;
public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgPersonSummaryPage>>;
public getDfgPersonAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarHeaders = this.defaultHeaders;
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';
}
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarPath = `/api/dfg/persons/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgPersonSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
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/dfg/persons/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgPersonSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
/**
* Returns a list of persons based on their IDs.
* @endpoint get /api/dfg/persons/ids
* @param personIds A list of person IDs to retrieve.
* @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 getDfgPersonsByIds(
personIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<DfgPersonSummaryPage>;
public getDfgPersonsByIds(
personIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<DfgPersonSummaryPage>>;
public getDfgPersonsByIds(
personIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<DfgPersonSummaryPage>>;
public getDfgPersonsByIds(
personIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (personIds) {
personIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'person_ids',
);
});
}
/**
* Returns a list of persons based on their IDs.
* @endpoint get /api/dfg/persons/ids
* @param personIds A list of person IDs to retrieve.
* @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 getDfgPersonsByIds(personIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgPersonSummaryPage>;
public getDfgPersonsByIds(personIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgPersonSummaryPage>>;
public getDfgPersonsByIds(personIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgPersonSummaryPage>>;
public getDfgPersonsByIds(personIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (personIds) {
personIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'person_ids');
})
}
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;
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/dfg/persons/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgPersonSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
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;
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/dfg/persons/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgPersonSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
File diff suppressed because it is too large Load Diff
+222 -122
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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';
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 { HTTPValidationError } from '../model/hTTPValidationError';
@@ -22,137 +28,231 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
import { InstitutionPageV2 } from '../model/institutionPageV2';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class InstitutionsV2Service extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/v2/institutions/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getInstitutionAutocompleteForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<InstitutionPageV2>;
public getInstitutionAutocompleteForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<InstitutionPageV2>>;
public getInstitutionAutocompleteForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<InstitutionPageV2>>;
public getInstitutionAutocompleteForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/v2/institutions/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InstitutionPageV2>;
public getInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InstitutionPageV2>>;
public getInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InstitutionPageV2>>;
public getInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarHeaders = this.defaultHeaders;
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';
}
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarPath = `/api/v2/institutions/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPageV2>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
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/v2/institutions/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPageV2>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
/**
* Returns a list of institutions based on their IDs.
* @endpoint get /api/v2/institutions/ids
* @param institutionIds A list of institution IDs to retrieve.
* @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 getInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<InstitutionPageV2>;
public getInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<InstitutionPageV2>>;
public getInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<InstitutionPageV2>>;
public getInstitutionsByIds(
institutionIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'institution_ids',
);
});
}
/**
* Returns a list of institutions based on their IDs.
* @endpoint get /api/v2/institutions/ids
* @param institutionIds A list of institution IDs to retrieve.
* @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 getInstitutionsByIds(institutionIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InstitutionPageV2>;
public getInstitutionsByIds(institutionIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InstitutionPageV2>>;
public getInstitutionsByIds(institutionIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InstitutionPageV2>>;
public getInstitutionsByIds(institutionIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'institution_ids');
})
}
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;
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/v2/institutions/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPageV2>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
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;
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/v2/institutions/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPageV2>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+518
View File
@@ -0,0 +1,518 @@
/**
* 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 { KeywordToAuthorRequest } from '../model/keywordToAuthorRequest';
// @ts-ignore
import { RankedAuthor } from '../model/rankedAuthor';
// @ts-ignore
import { RankSelectedAuthorRequest } from '../model/rankSelectedAuthorRequest';
// @ts-ignore
import { AuthorTopicStats } from '../model/authorTopicStats';
// @ts-ignore
import { AuthorTopicProfile } from '../model/authorTopicProfile';
// @ts-ignore
import { AuthorStaticStats } from '../model/authorStaticStats';
// @ts-ignore
import { AuthorMetricsRequest } from '../model/authorMetricsRequest';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
})
export class RankingService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Ranks a university\'s authors by a weighted score over works and citations.
* @endpoint post /api/rank/rank-author
* @param keywordToAuthorRequest
* @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 rankAuthor(
keywordToAuthorRequest: KeywordToAuthorRequest,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Array<RankedAuthor>>;
public rankAuthor(
keywordToAuthorRequest: KeywordToAuthorRequest,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Array<RankedAuthor>>>;
public rankAuthor(
keywordToAuthorRequest: KeywordToAuthorRequest,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Array<RankedAuthor>>>;
public rankAuthor(
keywordToAuthorRequest: KeywordToAuthorRequest,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (
keywordToAuthorRequest === null ||
keywordToAuthorRequest === undefined
) {
throw new Error(
'Required parameter keywordToAuthorRequest was null or undefined when calling rankAuthor.',
);
}
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/rank/rank-author`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<RankedAuthor>>(
'post',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: keywordToAuthorRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Section 1: combined stats over each selected author\'s topic-filtered works.
* @endpoint post /api/rank/topic-stats
* @param rankSelectedAuthorRequest
* @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 topicStats(
rankSelectedAuthorRequest: RankSelectedAuthorRequest,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Array<AuthorTopicStats>>;
public topicStats(
rankSelectedAuthorRequest: RankSelectedAuthorRequest,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Array<AuthorTopicStats>>>;
public topicStats(
rankSelectedAuthorRequest: RankSelectedAuthorRequest,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Array<AuthorTopicStats>>>;
public topicStats(
rankSelectedAuthorRequest: RankSelectedAuthorRequest,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (
rankSelectedAuthorRequest === null ||
rankSelectedAuthorRequest === undefined
) {
throw new Error(
'Required parameter rankSelectedAuthorRequest was null or undefined when calling topicStats.',
);
}
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;
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/rank/topic-stats`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<AuthorTopicStats>>(
'post',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: rankSelectedAuthorRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Section 3: topic profile over ALL works of each selected author.
* @endpoint post /api/rank/topic-profile
* @param rankSelectedAuthorRequest
* @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 topicProfile(
rankSelectedAuthorRequest: RankSelectedAuthorRequest,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Array<AuthorTopicProfile>>;
public topicProfile(
rankSelectedAuthorRequest: RankSelectedAuthorRequest,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Array<AuthorTopicProfile>>>;
public topicProfile(
rankSelectedAuthorRequest: RankSelectedAuthorRequest,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Array<AuthorTopicProfile>>>;
public topicProfile(
rankSelectedAuthorRequest: RankSelectedAuthorRequest,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (
rankSelectedAuthorRequest === null ||
rankSelectedAuthorRequest === undefined
) {
throw new Error(
'Required parameter rankSelectedAuthorRequest was null or undefined when calling topicProfile.',
);
}
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;
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/rank/topic-profile`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<AuthorTopicProfile>>(
'post',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: rankSelectedAuthorRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Section 2: keyword-independent author-level stats (companies, news, patents).
* @endpoint post /api/rank/static-stats
* @param authorMetricsRequest
* @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 staticStats(
authorMetricsRequest: AuthorMetricsRequest,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Array<AuthorStaticStats>>;
public staticStats(
authorMetricsRequest: AuthorMetricsRequest,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Array<AuthorStaticStats>>>;
public staticStats(
authorMetricsRequest: AuthorMetricsRequest,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Array<AuthorStaticStats>>>;
public staticStats(
authorMetricsRequest: AuthorMetricsRequest,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (authorMetricsRequest === null || authorMetricsRequest === undefined) {
throw new Error(
'Required parameter authorMetricsRequest was null or undefined when calling staticStats.',
);
}
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;
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/rank/static-stats`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<AuthorStaticStats>>(
'post',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: authorMetricsRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+222 -122
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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';
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 { HTTPValidationError } from '../model/hTTPValidationError';
@@ -22,137 +28,231 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
import { TopicPageV2 } from '../model/topicPageV2';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class TopicsV2Service extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Returns a paginated list of topics for a given search term based on their display name.
* @endpoint get /api/v2/topics/autocomplete/selector
* @param query A search term to filter topics by (partial matches allowed).
* @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 autocompleteTopicsForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<TopicPageV2>;
public autocompleteTopicsForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<TopicPageV2>>;
public autocompleteTopicsForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<TopicPageV2>>;
public autocompleteTopicsForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Returns a paginated list of topics for a given search term based on their display name.
* @endpoint get /api/v2/topics/autocomplete/selector
* @param query A search term to filter topics by (partial matches allowed).
* @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 autocompleteTopicsForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<TopicPageV2>;
public autocompleteTopicsForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TopicPageV2>>;
public autocompleteTopicsForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TopicPageV2>>;
public autocompleteTopicsForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarHeaders = this.defaultHeaders;
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';
}
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarPath = `/api/v2/topics/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<TopicPageV2>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
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/v2/topics/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<TopicPageV2>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
/**
* Returns a paginated list of topics for a given list of topic IDs.
* @endpoint get /api/v2/topics/topics/id
* @param topicIds A list of topic IDs to retrieve.
* @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 getTopicsByIds(
topicIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<TopicPageV2>;
public getTopicsByIds(
topicIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<TopicPageV2>>;
public getTopicsByIds(
topicIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<TopicPageV2>>;
public getTopicsByIds(
topicIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (topicIds) {
topicIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'topic_ids',
);
});
}
/**
* Returns a paginated list of topics for a given list of topic IDs.
* @endpoint get /api/v2/topics/topics/id
* @param topicIds A list of topic IDs to retrieve.
* @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 getTopicsByIds(topicIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<TopicPageV2>;
public getTopicsByIds(topicIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TopicPageV2>>;
public getTopicsByIds(topicIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TopicPageV2>>;
public getTopicsByIds(topicIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (topicIds) {
topicIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'topic_ids');
})
}
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;
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/v2/topics/topics/id`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<TopicPageV2>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
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;
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/v2/topics/topics/id`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<TopicPageV2>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+44 -48
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,51 +10,47 @@
import { TokenType } from './tokenType';
import { UserRole } from './userRole';
export interface AccessToken {
/**
* The unique identifier of the real account associated with this token.
*/
real_account_id: string;
/**
* The timestamp indicating when the token will expire.
*/
expires_at: string;
/**
* The epoch value for the token. Used for versioning of tokens.
*/
epoch?: number;
/**
* The type of the token, which is always ACCESS_TOKEN for this class.
*/
token_type?: TokenType;
/**
* A unique fingerprint of the user, used for additional security checks.
*/
user_fingerprint_hash: string;
/**
* The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation.
*/
effective_account_id: string;
/**
* The specific role this access token grants within its organization.
*/
effective_role?: UserRole;
/**
* The roles this access token grants within its organization.
*/
effective_roles?: Array<UserRole>;
/**
* The unique identifier of the organization associated with this access token.
*/
effective_organization_id: string;
effective_institution_id?: string | null;
/**
* The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes.
*/
raw_token: string;
export interface AccessToken {
/**
* The unique identifier of the real account associated with this token.
*/
real_account_id: string;
/**
* The timestamp indicating when the token will expire.
*/
expires_at: string;
/**
* The epoch value for the token. Used for versioning of tokens.
*/
epoch?: number;
/**
* The type of the token, which is always ACCESS_TOKEN for this class.
*/
token_type?: TokenType;
/**
* A unique fingerprint of the user, used for additional security checks.
*/
user_fingerprint_hash: string;
/**
* The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation.
*/
effective_account_id: string;
/**
* The specific role this access token grants within its organization.
*/
effective_role?: UserRole;
/**
* The roles this access token grants within its organization.
*/
effective_roles?: Array<UserRole>;
/**
* The unique identifier of the organization associated with this access token.
*/
effective_organization_id: string;
effective_institution_id?: string | null;
/**
* The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes.
*/
raw_token: string;
}
export namespace AccessToken {
}
export namespace AccessToken {}
+13 -15
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,16 @@
*/
import { UserRole } from './userRole';
export interface AccountProfile {
id: string;
email: string;
name: string;
roles: Array<UserRole>;
organization_id: string;
organization_name: string;
deleted: boolean;
activated: boolean;
is_current?: boolean;
is_real_account?: boolean;
is_impersonating?: boolean;
export interface AccountProfile {
id: string;
email: string;
name: string;
roles: Array<UserRole>;
organization_id: string;
organization_name: string;
deleted: boolean;
activated: boolean;
is_current?: boolean;
is_real_account?: boolean;
is_impersonating?: boolean;
}
@@ -0,0 +1,20 @@
/**
* 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 AuthorMetricsRequest {
/**
* OpenAlex IDs of the authors.
*/
author_ids: Array<string>;
/**
* Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'.
*/
company_status?: string;
}
+18 -20
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,26 +9,24 @@
*/
import { Author } from './author';
/**
* A paginated response containing a list of authors.
*/
export interface AuthorPage {
/**
* The elements of the page.
*/
elements?: Array<Author>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface AuthorPage {
/**
* The elements of the page.
*/
elements?: Array<Author>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
@@ -0,0 +1,32 @@
/**
* 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 AuthorStaticStats {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* Number of Handelsregister company connections matched by the author\'s name.
*/
companies_count: number;
/**
* Number of news articles that mention the author by exact name.
*/
news_count: number;
/**
* Number of patents matched to the author (from the org_patents index).
*/
patents_count: number;
}
@@ -0,0 +1,65 @@
/**
* 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.
*/
/**
* One slice of an author\'s topic profile: works whose primary topic is in this subfield.
*/
export interface SubfieldShare {
/**
* The subfield display name.
*/
name: string;
/**
* Number of works whose primary topic belongs to this subfield.
*/
count: number;
}
/**
* Section 3: how an author\'s complete body of work distributes over topics. All counts are based on each work\'s primary topic.
*/
export interface AuthorTopicProfile {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* All works of the author in the timespan, regardless of the topic filter.
*/
works_total: number;
/**
* Works matching the topic filter (same subset as Section 1).
*/
matched_works: number;
/**
* Matched works where one of the searched topics is the work\'s primary topic.
*/
primary_topic_matches: number;
/**
* Number of distinct primary topics across all works.
*/
distinct_topics: number;
/**
* Number of distinct primary-topic subfields across all works.
*/
distinct_subfields: number;
/**
* Number of distinct primary-topic fields across all works.
*/
distinct_fields: number;
/**
* Top subfields over all works, by primary topic, largest first.
*/
subfields: Array<SubfieldShare>;
}
@@ -0,0 +1,96 @@
/**
* 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 AuthorTopicStats {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* Number of the author\'s works matching the topic filter.
*/
works_total: number;
/**
* Number of the author\'s topic works where they are the corresponding author.
*/
corresponding_count: number;
/**
* Average field-normalized citation percentile (0-1) over the author\'s topic works.
*/
avg_percentile: number;
/**
* Number of the author\'s topic works in the top 1% most-cited.
*/
top1_count: number;
/**
* Number of the author\'s topic works in the top 10% most-cited.
*/
top10_count: number;
/**
* Number of the author\'s topic works with a field-weighted citation impact (FWCI) above 1.
*/
fwci_above_one_count: number;
/**
* Total citations across the author\'s topic works.
*/
citations_total: number;
/**
* Average citations per topic work.
*/
avg_citations: number;
/**
* Citations of the author\'s most-cited topic work.
*/
max_citations: number;
/**
* h-index over the author\'s topic works (capped at 100).
*/
h_index: number;
/**
* Average field-weighted citation impact (FWCI) over the author\'s topic works.
*/
avg_fwci: number;
/**
* Number of the author\'s topic works with at least one co-author institution of type \'company\'.
*/
industry_works_count: number;
/**
* Earliest publication year among the author\'s topic works.
*/
first_year: number | null;
/**
* Latest publication year among the author\'s topic works.
*/
last_year: number | null;
/**
* Number of the author\'s topic works where the matched keyword\'s relevance score is above 0.8.
*/
relevance_above_80_count: number;
/**
* Average matched-keyword relevance score (0-1) over the author\'s topic works.
*/
avg_relevance: number;
/**
* Number of the author\'s topic works where they are the first author.
*/
first_author_count: number;
/**
* Number of the author\'s topic works where they are a middle author.
*/
middle_author_count: number;
/**
* Number of the author\'s topic works where they are the last author.
*/
last_author_count: number;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,13 +9,11 @@
*/
import { UserRole } from './userRole';
export interface CreateAccountRequest {
email: string;
name: string;
roles?: Array<UserRole>;
organization_id: string;
password: string;
openalex_person_id?: string | null;
export interface CreateAccountRequest {
email: string;
name: string;
roles?: Array<UserRole>;
organization_id: string;
password: string;
openalex_person_id?: string | null;
}
@@ -1,15 +1,13 @@
/**
* 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 CreatePersonBookmark {
person_name?: string | null;
export interface CreatePersonBookmark {
person_name?: string | null;
}
@@ -1,25 +1,23 @@
/**
* 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.
*/
/**
* DFGProjectFachgebieteInner
*/
export interface DFGProjectFachgebieteInner {
fach?: string | null;
fach_code?: string | null;
fachgebiet?: string | null;
fachgebiet_code?: string | null;
fachkollegium?: string | null;
fachkollegium_code?: string | null;
wissenschaftsbereich?: string | null;
wissenschaftsbereich_code?: string | null;
export interface DFGProjectFachgebieteInner {
fach?: string | null;
fach_code?: string | null;
fachgebiet?: string | null;
fachgebiet_code?: string | null;
fachkollegium?: string | null;
fachkollegium_code?: string | null;
wissenschaftsbereich?: string | null;
wissenschaftsbereich_code?: string | null;
}
@@ -1,17 +1,15 @@
/**
* 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 DashboardStatisticValue {
institution_id: string;
organization_name: string;
value: number;
export interface DashboardStatisticValue {
institution_id: string;
organization_name: string;
value: number;
}
+10 -12
View File
@@ -1,22 +1,20 @@
/**
* 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 DashboardStatistics {
institution_id: string;
organization_name: string;
publications: number;
persons: number;
projects: number;
dfg_projects: number;
eu_projects: number;
bmbf_projects: number;
export interface DashboardStatistics {
institution_id: string;
organization_name: string;
publications: number;
persons: number;
projects: number;
dfg_projects: number;
eu_projects: number;
bmbf_projects: number;
}
@@ -1,25 +1,23 @@
/**
* 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.
*/
/**
* A summary of a DFG institution.
*/
export interface DfgInstitutionSummary {
id: number;
institute_name_de?: string | null;
institute_name_en?: string | null;
root_id?: number | null;
root_name_de?: string | null;
root_name_en?: string | null;
address_country_de?: string | null;
address_country_en?: string | null;
export interface DfgInstitutionSummary {
id: number;
institute_name_de?: string | null;
institute_name_en?: string | null;
root_id?: number | null;
root_name_de?: string | null;
root_name_en?: string | null;
address_country_de?: string | null;
address_country_en?: string | null;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,26 +9,24 @@
*/
import { DfgInstitutionSummary } from './dfgInstitutionSummary';
/**
* A paginated response containing a list of institutions.
*/
export interface DfgInstitutionSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<DfgInstitutionSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface DfgInstitutionSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<DfgInstitutionSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
+9 -11
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,14 +9,12 @@
*/
import { DfgInstitutionSummary } from './dfgInstitutionSummary';
export interface DfgPersonSummary {
person_id: number;
orcid_id?: string | null;
project_ref_id?: number | null;
full_name?: string | null;
role_label_en?: string | null;
role_label_de?: string | null;
institution?: DfgInstitutionSummary | null;
export interface DfgPersonSummary {
person_id: number;
orcid_id?: string | null;
project_ref_id?: number | null;
full_name?: string | null;
role_label_en?: string | null;
role_label_de?: string | null;
institution?: DfgInstitutionSummary | null;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,26 +9,24 @@
*/
import { DfgPersonSummary } from './dfgPersonSummary';
/**
* A paginated response containing a list of persons.
*/
export interface DfgPersonSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<DfgPersonSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface DfgPersonSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<DfgPersonSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
+14 -16
View File
@@ -1,26 +1,24 @@
/**
* 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 FileUpload {
/**
* The name of the uploaded file.
*/
filename: string;
/**
* The base64-encoded content of the uploaded file.
*/
content_base64: string;
/**
* The MIME type of the uploaded file, e.g., \'application/pdf\', \'image/png\', etc.
*/
mime_type: string;
export interface FileUpload {
/**
* The name of the uploaded file.
*/
filename: string;
/**
* The base64-encoded content of the uploaded file.
*/
content_base64: string;
/**
* The MIME type of the uploaded file, e.g., \'application/pdf\', \'image/png\', etc.
*/
mime_type: string;
}
+18 -20
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,26 +9,24 @@
*/
import { Institution } from './institution';
/**
* A paginated response containing a list of institutions.
*/
export interface InstitutionPageV2 {
/**
* The elements of the page.
*/
elements?: Array<Institution>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface InstitutionPageV2 {
/**
* The elements of the page.
*/
elements?: Array<Institution>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
+13 -15
View File
@@ -1,28 +1,26 @@
/**
* 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.
*/
/**
* Traceable title/abstract evidence for keyword text retrieval.
*/
export interface KeywordEvidence {
phrase_in_title?: boolean;
phrase_in_abstract?: boolean;
full_token_match?: boolean;
partial_token_match?: boolean;
word_match_score?: number;
matched_phrases?: Array<string>;
matched_words?: Array<string>;
/**
* phrase_title | phrase_abstract | full_token | partial_token | none
*/
text_match_kind?: string;
export interface KeywordEvidence {
phrase_in_title?: boolean;
phrase_in_abstract?: boolean;
full_token_match?: boolean;
partial_token_match?: boolean;
word_match_score?: number;
matched_phrases?: Array<string>;
matched_words?: Array<string>;
/**
* phrase_title | phrase_abstract | full_token | partial_token | none
*/
text_match_kind?: string;
}
@@ -1,19 +1,18 @@
/**
* 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 KeywordPatentLevel = {
Broad: 'broad',
Coarse: 'coarse',
Fine: 'fine',
Custom: 'custom'
Broad: 'broad',
Coarse: 'coarse',
Fine: 'fine',
Custom: 'custom',
} as const;
export type KeywordPatentLevel = typeof KeywordPatentLevel[keyof typeof KeywordPatentLevel];
export type KeywordPatentLevel =
(typeof KeywordPatentLevel)[keyof typeof KeywordPatentLevel];
@@ -1,20 +1,19 @@
/**
* 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 KeywordPatentMappingStatus = {
Mapped: 'mapped',
Uncertain: 'uncertain',
NoMapping: 'no_mapping',
NoPatentsFound: 'no_patents_found',
SearchError: 'search_error'
Mapped: 'mapped',
Uncertain: 'uncertain',
NoMapping: 'no_mapping',
NoPatentsFound: 'no_patents_found',
SearchError: 'search_error',
} as const;
export type KeywordPatentMappingStatus = typeof KeywordPatentMappingStatus[keyof typeof KeywordPatentMappingStatus];
export type KeywordPatentMappingStatus =
(typeof KeywordPatentMappingStatus)[keyof typeof KeywordPatentMappingStatus];
+27 -29
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,32 +10,30 @@
import { KeywordEvidence } from './keywordEvidence';
import { PatentEntry } from './patentEntry';
export interface KeywordPatentMatch {
patent: PatentEntry;
/**
* Combined match quality score.
*/
match_score: number;
/**
* IPC/CPC classification match score.
*/
ipc_score: number;
/**
* Graded OpenAlex topic overlap: 1.0 topic_id, 0.7 subfield, 0.3 compatible field, 0.0 none.
*/
topic_score: number;
/**
* Title/abstract keyword overlap score.
*/
text_score: number;
matched_keywords?: Array<string>;
matched_ipc_symbols?: Array<string>;
/**
* True when the patent was retrieved via title/abstract keyword search because IPC mapping was uncertain, missing, or yielded no hits.
*/
text_retrieval?: boolean;
keyword_evidence?: KeywordEvidence | null;
topic_match_kind?: string | null;
export interface KeywordPatentMatch {
patent: PatentEntry;
/**
* Combined match quality score.
*/
match_score: number;
/**
* IPC/CPC classification match score.
*/
ipc_score: number;
/**
* Graded OpenAlex topic overlap: 1.0 topic_id, 0.7 subfield, 0.3 compatible field, 0.0 none.
*/
topic_score: number;
/**
* Title/abstract keyword overlap score.
*/
text_score: number;
matched_keywords?: Array<string>;
matched_ipc_symbols?: Array<string>;
/**
* True when the patent was retrieved via title/abstract keyword search because IPC mapping was uncertain, missing, or yielded no hits.
*/
text_retrieval?: boolean;
keyword_evidence?: KeywordEvidence | null;
topic_match_kind?: string | null;
}
@@ -1,32 +1,30 @@
/**
* 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.
*/
/**
* Pipeline counters for evaluation (no effect on ranking thresholds).
*/
export interface KeywordPatentSearchDiagnostics {
/**
* ipc | text | none
*/
search_path: string;
es_query_size_per_index?: number;
raw_patents_after_dedupe?: number;
filtered_by_ipc?: number;
filtered_by_relevance_gate?: number;
filtered_by_min_score?: number;
passed_relevance_gate?: number;
scored_before_cap?: number;
returned?: number;
max_patents_cap?: number;
hit_return_cap?: boolean;
ipc_cluster_selections?: Array<object>;
export interface KeywordPatentSearchDiagnostics {
/**
* ipc | text | none
*/
search_path: string;
es_query_size_per_index?: number;
raw_patents_after_dedupe?: number;
filtered_by_ipc?: number;
filtered_by_relevance_gate?: number;
filtered_by_min_score?: number;
passed_relevance_gate?: number;
scored_before_cap?: number;
returned?: number;
max_patents_cap?: number;
hit_return_cap?: boolean;
ipc_cluster_selections?: Array<object>;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,23 +9,19 @@
*/
import { KeywordPatentLevel } from './keywordPatentLevel';
export interface KeywordPatentSearchItem {
/**
* Extracted keyword text.
*/
keyword: string;
keyword_level?: KeywordPatentLevel | null;
topic_id?: string | null;
topic_display_name?: string | null;
subfield_name?: string | null;
field_name?: string | null;
/**
* LLM relevance score for the keyword.
*/
relevance_score?: number;
export interface KeywordPatentSearchItem {
/**
* Extracted keyword text.
*/
keyword: string;
keyword_level?: KeywordPatentLevel | null;
topic_id?: string | null;
topic_display_name?: string | null;
subfield_name?: string | null;
field_name?: string | null;
/**
* LLM relevance score for the keyword.
*/
relevance_score?: number;
}
export namespace KeywordPatentSearchItem {
}
export namespace KeywordPatentSearchItem {}
@@ -0,0 +1,49 @@
/**
* 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 { RankingWeights } from './rankingWeights';
export interface KeywordToAuthorRequest {
/**
* One or more keywords to rank the author by.
*/
keywords: Array<string>;
/**
* Weights for the ranking metrics. Required.
*/
weights: RankingWeights;
/**
* How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'.
*/
operator?: string;
/**
* What the \'keywords\' values match against: \'keyword\' or \'topic\'. Defaults to \'keyword\'.
*/
filter_type?: string;
/**
* The selected institution display name. (Default Uni-Due)
*/
institution_name?: string;
/**
* Optional filter: only keep authors in one of these career stages.
*/
career_stages?: Array<string>;
/**
* Optional filter: only count works of these publication types.
*/
publication_types?: Array<string>;
/**
* Optional filter: only count works whose publication_year is within [from, to].
*/
timespan?: { from: number; to: number };
/**
* Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'.
*/
company_status?: string;
}
+15 -17
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,20 +9,18 @@
*/
import { FileUpload } from './fileUpload';
export interface KeywordsRequest {
/**
* The input text from which to extract keywords.
*/
query: string;
files?: Array<FileUpload> | null;
/**
* The mode of keyword extraction, e.g., \'url\', \'text\', or \'keywords\'.
*/
mode: string;
/**
* The maximum number of keywords to extract.
*/
limit?: number;
export interface KeywordsRequest {
/**
* The input text from which to extract keywords.
*/
query: string;
files?: Array<FileUpload> | null;
/**
* The mode of keyword extraction, e.g., \'url\', \'text\', or \'keywords\'.
*/
mode: string;
/**
* The maximum number of keywords to extract.
*/
limit?: number;
}
+8
View File
@@ -238,3 +238,11 @@ export * from './workTopicSubfield';
export * from './worksFilterProperties';
export * from './worksListResponse';
export * from './yearlyData';
export * from './rankingWeights';
export * from './rankedAuthor';
export * from './keywordToAuthorRequest';
export * from './rankSelectedAuthorRequest';
export * from './authorTopicStats';
export * from './authorTopicProfile';
export * from './authorStaticStats';
export * from './authorMetricsRequest';
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -11,17 +11,13 @@ import { KeywordPatentMappingStatus } from './keywordPatentMappingStatus';
import { KeywordPatentSearchDiagnostics } from './keywordPatentSearchDiagnostics';
import { KeywordPatentMatch } from './keywordPatentMatch';
export interface PatentsByKeywordsResponse {
patent_count: number;
patents: Array<KeywordPatentMatch>;
/**
* IPC mapping outcome: mapped (IPC used), uncertain (fragmented evidence; may include text-retrieved patents), no_mapping (no usable IPC evidence; may include text-retrieved patents), no_patents_found (neither IPC nor keyword text search produced relevant patents), or search_error (technical failure talking to the search backend).
*/
mapping_status: KeywordPatentMappingStatus;
diagnostics?: KeywordPatentSearchDiagnostics | null;
export interface PatentsByKeywordsResponse {
patent_count: number;
patents: Array<KeywordPatentMatch>;
/**
* IPC mapping outcome: mapped (IPC used), uncertain (fragmented evidence; may include text-retrieved patents), no_mapping (no usable IPC evidence; may include text-retrieved patents), no_patents_found (neither IPC nor keyword text search produced relevant patents), or search_error (technical failure talking to the search backend).
*/
mapping_status: KeywordPatentMappingStatus;
diagnostics?: KeywordPatentSearchDiagnostics | null;
}
export namespace PatentsByKeywordsResponse {
}
export namespace PatentsByKeywordsResponse {}
@@ -1,17 +1,15 @@
/**
* 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 PersonBookmarkResponse {
person_id: string;
person_name: string | null;
created_at: string;
export interface PersonBookmarkResponse {
person_id: string;
person_name: string | null;
created_at: string;
}
@@ -1,22 +1,20 @@
/**
* 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 PrimaryCategoryYearAggregation {
/**
* The publication year.
*/
publication_year: number;
/**
* A mapping of primary categories to their counts for the given year.
*/
categories?: { [key: string]: number; };
export interface PrimaryCategoryYearAggregation {
/**
* The publication year.
*/
publication_year: number;
/**
* A mapping of primary categories to their counts for the given year.
*/
categories?: { [key: string]: number };
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,23 +9,21 @@
*/
import { PrimaryCategoryYearAggregation } from './primaryCategoryYearAggregation';
export interface PrimaryCategoryYearAggregationPage {
/**
* The elements of the page.
*/
elements?: Array<PrimaryCategoryYearAggregation>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface PrimaryCategoryYearAggregationPage {
/**
* The elements of the page.
*/
elements?: Array<PrimaryCategoryYearAggregation>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
@@ -0,0 +1,36 @@
/**
* 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 RankSelectedAuthorRequest {
/**
* OpenAlex IDs of the authors to rank.
*/
author_ids: Array<string>;
/**
* One or more keywords defining the topic.
*/
keywords: Array<string>;
/**
* How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'.
*/
operator?: string;
/**
* What the \'keywords\' values match against: \'keyword\' or \'topic\'. Defaults to \'keyword\'.
*/
filter_type?: string;
/**
* Optional filter: only count works of these publication types.
*/
publication_types?: Array<string>;
/**
* Optional filter: only count works whose publication_year is within [from, to].
*/
timespan?: { from: number; to: number };
}
+48
View File
@@ -0,0 +1,48 @@
/**
* 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 RankedAuthor {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* Number of matching works by this author.
*/
works_count: number;
/**
* Total citations across this author\'s matching works.
*/
citations_count: number;
/**
* Number of Handelsregister company connections matched by the author\'s name (proxy for company foundations).
*/
companies_count?: number;
/**
* Number of news articles that mention the author by exact name (proxy for media visibility).
*/
news_count?: number;
/**
* Number of patents matched to the author (from the precomputed org_patents index).
*/
patents_count?: number;
/**
* Normalized weighted score used for ranking.
*/
score?: number;
/**
* Career stage derived from the author\'s active publication years.
*/
career_stage?: string;
}
@@ -0,0 +1,32 @@
/**
* 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 RankingWeights {
/**
* Weight for the citation metric (0.0 - 1.0).
*/
citation: number;
/**
* Weight for the works metric (0.0 - 1.0).
*/
works: number;
/**
* Weight for the company-foundations metric (0.0 - 1.0).
*/
companies?: number;
/**
* Weight for the news/media-visibility metric (0.0 - 1.0).
*/
news?: number;
/**
* Weight for the patents metric (0.0 - 1.0).
*/
patents?: number;
}
+5 -7
View File
@@ -1,17 +1,15 @@
/**
* 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 TopAuthor {
id?: string | null;
name: string;
count: number;
export interface TopAuthor {
id?: string | null;
name: string;
count: number;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,10 @@
*/
import { TopAuthor } from './topAuthor';
export interface TopAuthorStatistics {
institution_id: string;
works: Array<TopAuthor>;
projects: Array<TopAuthor>;
patents: Array<TopAuthor>;
news: Array<TopAuthor>;
export interface TopAuthorStatistics {
institution_id: string;
works: Array<TopAuthor>;
projects: Array<TopAuthor>;
patents: Array<TopAuthor>;
news: Array<TopAuthor>;
}
+4 -6
View File
@@ -1,16 +1,14 @@
/**
* 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 TopTopicItem {
name: string;
count: number;
export interface TopTopicItem {
name: string;
count: number;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,8 +9,6 @@
*/
import { TopTopicItem } from './topTopicItem';
export interface TopTopicsResponse {
items: Array<TopTopicItem>;
export interface TopTopicsResponse {
items: Array<TopTopicItem>;
}
+6 -8
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,11 +9,9 @@
*/
import { TopicHeatmapField } from './topicHeatmapField';
export interface TopicHeatmap {
institution_id: string;
organization_name: string;
years: Array<number>;
fields: Array<TopicHeatmapField>;
export interface TopicHeatmap {
institution_id: string;
organization_name: string;
years: Array<number>;
fields: Array<TopicHeatmapField>;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,11 +9,9 @@
*/
import { TopicHeatmapValue } from './topicHeatmapValue';
export interface TopicHeatmapField {
id: string;
name: string;
total: number;
values: Array<TopicHeatmapValue>;
export interface TopicHeatmapField {
id: string;
name: string;
total: number;
values: Array<TopicHeatmapValue>;
}
@@ -1,17 +1,15 @@
/**
* 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 TopicHeatmapValue {
year: number;
count: number;
share: number;
export interface TopicHeatmapValue {
year: number;
count: number;
share: number;
}
+18 -20
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,23 +9,21 @@
*/
import { Topic } from './topic';
export interface TopicPageV2 {
/**
* The elements of the page.
*/
elements?: Array<Topic>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface TopicPageV2 {
/**
* The elements of the page.
*/
elements?: Array<Topic>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
+9 -10
View File
@@ -1,21 +1,20 @@
/**
* 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 TrendSearchType = {
Publications: 'publications',
Authors: 'authors',
Patents: 'patents',
Projects: 'projects',
News: 'news',
All: 'all'
Publications: 'publications',
Authors: 'authors',
Patents: 'patents',
Projects: 'projects',
News: 'news',
All: 'all',
} as const;
export type TrendSearchType = typeof TrendSearchType[keyof typeof TrendSearchType];
export type TrendSearchType =
(typeof TrendSearchType)[keyof typeof TrendSearchType];
+15 -17
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,22 +9,20 @@
*/
import { TopicYearlyData } from './topicYearlyData';
export interface TrendSeries {
entity_id: string;
entity_name: string;
entity_type: TrendSeries.EntityTypeEnum;
country_code?: string | null;
topic_data: { [key: string]: Array<TopicYearlyData>; };
export interface TrendSeries {
entity_id: string;
entity_name: string;
entity_type: TrendSeries.EntityTypeEnum;
country_code?: string | null;
topic_data: { [key: string]: Array<TopicYearlyData> };
}
export namespace TrendSeries {
export const EntityTypeEnum = {
Institution: 'institution',
Country: 'country',
Region: 'region',
Author: 'author'
} as const;
export type EntityTypeEnum = typeof EntityTypeEnum[keyof typeof EntityTypeEnum];
export const EntityTypeEnum = {
Institution: 'institution',
Country: 'country',
Region: 'region',
Author: 'author',
} as const;
export type EntityTypeEnum =
(typeof EntityTypeEnum)[keyof typeof EntityTypeEnum];
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,15 +9,13 @@
*/
import { UserRole } from './userRole';
export interface UpdateAccountRequest {
email?: string | null;
name?: string | null;
roles?: Array<UserRole> | null;
organization_id?: string | null;
password?: string | null;
openalex_person_id?: string | null;
deleted?: boolean | null;
activated?: boolean | null;
export interface UpdateAccountRequest {
email?: string | null;
name?: string | null;
roles?: Array<UserRole> | null;
organization_id?: string | null;
password?: string | null;
openalex_person_id?: string | null;
deleted?: boolean | null;
activated?: boolean | null;
}
+24 -26
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,32 +14,30 @@ import { WorkClassificationMeta } from './workClassificationMeta';
import { WorkClassificationValidation } from './workClassificationValidation';
import { WorkClassificationAuthor } from './workClassificationAuthor';
/**
* Represents a full work-classification document.
*/
export interface WorkClassification {
/**
* The full OpenAlex work id/URL.
*/
work_id: string;
doi?: string | null;
title?: string | null;
publication_year?: number | null;
/**
* The authors of the work.
*/
authors?: Array<WorkClassificationAuthor>;
/**
* The institutions associated with the work.
*/
institutions?: Array<WorkClassificationInstitution>;
/**
* The topics associated with the work.
*/
topics?: Array<WorkClassificationTopic>;
classification?: WorkClassificationDetails | null;
classification_meta?: WorkClassificationMeta | null;
validation?: WorkClassificationValidation | null;
export interface WorkClassification {
/**
* The full OpenAlex work id/URL.
*/
work_id: string;
doi?: string | null;
title?: string | null;
publication_year?: number | null;
/**
* The authors of the work.
*/
authors?: Array<WorkClassificationAuthor>;
/**
* The institutions associated with the work.
*/
institutions?: Array<WorkClassificationInstitution>;
/**
* The topics associated with the work.
*/
topics?: Array<WorkClassificationTopic>;
classification?: WorkClassificationDetails | null;
classification_meta?: WorkClassificationMeta | null;
validation?: WorkClassificationValidation | null;
}
@@ -1,20 +1,18 @@
/**
* 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.
*/
/**
* An author entry within a work classification document.
*/
export interface WorkClassificationAuthor {
id?: string | null;
display_name?: string | null;
orcid?: string | null;
export interface WorkClassificationAuthor {
id?: string | null;
display_name?: string | null;
orcid?: string | null;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,20 +9,16 @@
*/
import { WorkPrimaryCategory } from './workPrimaryCategory';
/**
* The core classification result for a work.
*/
export interface WorkClassificationDetails {
primary_category?: WorkPrimaryCategory | null;
confidence?: string | null;
pasteur_quadrant?: string | null;
applied_orientation_score?: number | null;
insufficient_context?: boolean | null;
signals_used?: Array<string> | null;
classification_reason?: string | null;
export interface WorkClassificationDetails {
primary_category?: WorkPrimaryCategory | null;
confidence?: string | null;
pasteur_quadrant?: string | null;
applied_orientation_score?: number | null;
insufficient_context?: boolean | null;
signals_used?: Array<string> | null;
classification_reason?: string | null;
}
export namespace WorkClassificationDetails {
}
export namespace WorkClassificationDetails {}
@@ -1,20 +1,18 @@
/**
* 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.
*/
/**
* An institution entry within a work classification document.
*/
export interface WorkClassificationInstitution {
id?: string | null;
display_name?: string | null;
ror?: string | null;
export interface WorkClassificationInstitution {
id?: string | null;
display_name?: string | null;
ror?: string | null;
}
@@ -1,20 +1,18 @@
/**
* 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.
*/
/**
* Metadata about how and when a classification was produced.
*/
export interface WorkClassificationMeta {
model?: string | null;
prompt_version?: string | null;
classified_at?: string | null;
export interface WorkClassificationMeta {
model?: string | null;
prompt_version?: string | null;
classified_at?: string | null;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,23 +9,21 @@
*/
import { WorkClassification } from './workClassification';
export interface WorkClassificationPage {
/**
* The elements of the page.
*/
elements?: Array<WorkClassification>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface WorkClassificationPage {
/**
* The elements of the page.
*/
elements?: Array<WorkClassification>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,16 +9,14 @@
*/
import { WorkClassificationTopicGroup } from './workClassificationTopicGroup';
/**
* A topic entry within a work classification document.
*/
export interface WorkClassificationTopic {
id?: string | null;
display_name?: string | null;
score?: number | null;
domain?: WorkClassificationTopicGroup | null;
field?: WorkClassificationTopicGroup | null;
subfield?: WorkClassificationTopicGroup | null;
export interface WorkClassificationTopic {
id?: string | null;
display_name?: string | null;
score?: number | null;
domain?: WorkClassificationTopicGroup | null;
field?: WorkClassificationTopicGroup | null;
subfield?: WorkClassificationTopicGroup | null;
}
@@ -1,19 +1,17 @@
/**
* 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.
*/
/**
* A domain/field/subfield group referenced within a classification topic.
*/
export interface WorkClassificationTopicGroup {
id?: string | null;
display_name?: string | null;
export interface WorkClassificationTopicGroup {
id?: string | null;
display_name?: string | null;
}
@@ -1,20 +1,18 @@
/**
* 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.
*/
/**
* Validation results for a classification.
*/
export interface WorkClassificationValidation {
valid?: boolean | null;
errors?: Array<string> | null;
corrections?: Array<string> | null;
export interface WorkClassificationValidation {
valid?: boolean | null;
errors?: Array<string> | null;
corrections?: Array<string> | null;
}
+22 -24
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,27 +9,25 @@
*/
import { Work } from './work';
export interface WorkPage {
/**
* Total number of works matching the query
*/
total: number;
/**
* List of works on the current page
*/
elements: Array<Work>;
/**
* Offset of the current page
*/
offset: number;
/**
* Size of the current page
*/
size: number;
/**
* Indicates if the current page is the last page
*/
last_page: boolean;
export interface WorkPage {
/**
* Total number of works matching the query
*/
total: number;
/**
* List of works on the current page
*/
elements: Array<Work>;
/**
* Offset of the current page
*/
offset: number;
/**
* Size of the current page
*/
size: number;
/**
* Indicates if the current page is the last page
*/
last_page: boolean;
}
+18 -20
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,23 +9,21 @@
*/
import { Work } from './work';
export interface WorkPageV2 {
/**
* The elements of the page.
*/
elements?: Array<Work>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface WorkPageV2 {
/**
* The elements of the page.
*/
elements?: Array<Work>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
@@ -1,23 +1,22 @@
/**
* 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.
*/
/**
* Represents the primary category of a work.
*/
export const WorkPrimaryCategory = {
BasicResearch: 'basic_research',
AppliedResearch: 'applied_research',
NonResearch: 'non_research',
ExperimentalDevelopment: 'experimental_development',
NotClassified: 'not_classified'
BasicResearch: 'basic_research',
AppliedResearch: 'applied_research',
NonResearch: 'non_research',
ExperimentalDevelopment: 'experimental_development',
NotClassified: 'not_classified',
} as const;
export type WorkPrimaryCategory = typeof WorkPrimaryCategory[keyof typeof WorkPrimaryCategory];
export type WorkPrimaryCategory =
(typeof WorkPrimaryCategory)[keyof typeof WorkPrimaryCategory];
+7 -9
View File
@@ -1,20 +1,18 @@
/**
* 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 WorkSortBy = {
Title: 'title',
Type: 'type',
PublicationYear: 'publication_year',
Language: 'language',
CitedByCount: 'cited_by_count'
Title: 'title',
Type: 'type',
PublicationYear: 'publication_year',
Language: 'language',
CitedByCount: 'cited_by_count',
} as const;
export type WorkSortBy = typeof WorkSortBy[keyof typeof WorkSortBy];
export type WorkSortBy = (typeof WorkSortBy)[keyof typeof WorkSortBy];
+15
View File
@@ -94,6 +94,21 @@ export const routes: Routes = [
(mod) => mod.DashboardComponent,
),
},
{
path: 'compare',
canActivate: [
roleGuard([
UserRole.User,
UserRole.Manager,
UserRole.Admin,
UserRole.SuperAdmin,
]),
],
loadComponent: () =>
import('./modules/compare-authors/compare-authors.component').then(
(mod) => mod.CompareAuthorsComponent,
),
},
{
path: 'bookmarks',
canActivate: [
@@ -0,0 +1,179 @@
<div class="compare-layout">
<header class="compare-header">
<h1>Autoren-Vergleich</h1>
<div class="compare-meta">
@if (keywords().length > 0) {
<span class="meta-chip">
<mat-icon>topic</mat-icon>
{{ keywords().join(', ') }}
</span>
}
@if (timespan(); as span) {
<span class="meta-chip">
<mat-icon>date_range</mat-icon>
{{ span.from }}–{{ span.to }}
</span>
}
</div>
@if (hasData()) {
<ul class="author-legend">
@for (author of summary(); track author.authorId) {
<li class="legend-item">
<span
class="legend-swatch"
[style.background]="author.color"></span>
<span class="legend-name">{{ author.name }}</span>
</li>
}
</ul>
}
</header>
@if (loading()) {
<p class="compare-hint">Lädt…</p>
} @else if (!hasData()) {
<p class="compare-hint">Keine Daten für die ausgewählten Autoren.</p>
} @else {
<!-- section 1: stats over the topic-filtered works -->
<section class="card">
<h2 class="card-title">Kennzahlen zu den Keywords</h2>
<p class="card-sub">
Bester Wert je Zeile ist hervorgehoben. „–“ bedeutet, dass der Wert für
diese:n Autor:in nicht vorliegt.
</p>
<ng-container
[ngTemplateOutlet]="statsTable"
[ngTemplateOutletContext]="{ rows: topicRows() }" />
</section>
<!-- section 2: author-level stats, independent of the keywords and time -->
<section class="card">
<h2 class="card-title">Kennzahlen zur Person</h2>
<p class="card-sub">Unabhängig von den Keywords und Zeitraum.</p>
<ng-container
[ngTemplateOutlet]="statsTable"
[ngTemplateOutletContext]="{ rows: staticRows() }" />
</section>
<!-- section 3: topic profile over ALL works of each author -->
<section class="card">
<h2 class="card-title">Themenprofil</h2>
<p class="card-sub">"Topic-Analyse"</p>
@if (profileLoading()) {
<p class="compare-hint">Lädt…</p>
} @else if (orderedProfiles().length > 0) {
<h3 class="chart-title">Themenverteilung nach Subfield</h3>
<p class="chart-hint">
Von allen Arbeiten der Autor:innen im Zeitraum: der Anteil je
Subfield, bestimmt über das Primärthema jeder Arbeit. (Top 5)
</p>
<div
echarts
[options]="subfieldChart()"
class="profile-chart profile-chart-wide"></div>
<div class="chart-grid">
<div class="chart-box">
<h3 class="chart-title">Themen-Fokus</h3>
<p class="chart-hint">
Anzahl der Werke zum Suchthema im Verhältnis zum Gesamtwerk – und
wie viele davon das Suchthema als Primärthema tragen.
</p>
<div echarts [options]="focusChart()" class="profile-chart"></div>
</div>
<div class="chart-box">
<h3 class="chart-title">Themenbreite</h3>
<p class="chart-hint">
Einzigartige Primärthemen, Subfields und Fields im Gesamtwerk
(Primary Topic)
</p>
<div echarts [options]="breadthChart()" class="profile-chart"></div>
</div>
</div>
} @else {
<p class="compare-hint">Keine Daten für das Themenprofil.</p>
}
</section>
}
</div>
<ng-template #statsTable let-rows="rows">
<div class="table-scroll">
<table class="compare-table">
<thead>
<tr>
<th class="metric-col">Kennzahl</th>
@for (author of summary(); track author.authorId) {
<th class="author-col">
<span class="th-name">
<span
class="legend-swatch"
[style.background]="author.color"></span>
{{ author.name }}
</span>
</th>
}
</tr>
</thead>
<tbody>
@for (row of rows; track row.label) {
<tr>
<th scope="row" class="metric-col">
<span class="metric-label">{{ row.label }}</span>
<span class="metric-hint">{{ row.hint }}</span>
@if (row.kind === 'group') {
<span class="position-legend">
@for (seg of row.segments; track $index; let i = $index) {
@if (i > 0) {
<span class="pos-sep">|</span>
}
<span class="pos {{ seg.colorClass }}">{{
seg.label
}}</span>
}
</span>
}
</th>
@if (row.kind === 'group') {
@for (gc of row.groupCells; track $index) {
<td class="value-cell position-cell">
@for (v of gc.values; track $index; let i = $index) {
@if (i > 0) {
<span class="pos-sep">|</span>
}
<span class="pos {{ row.segments[i].colorClass }}">
{{
v === null
? '–'
: row.segments[i].plain
? v
: row.segments[i].decimals
? (v | number: '1.2-2')
: (v | number)
}}
</span>
}
</td>
}
} @else {
@for (cell of row.cells; track $index) {
<td class="value-cell" [class.best]="cell.best">
@if (cell.raw === null) {
<span class="value-empty">–</span>
} @else if (row.decimals) {
{{ cell.raw | number: '1.2-2' }}
} @else {
{{ cell.raw | number }}
}
</td>
}
}
</tr>
}
</tbody>
</table>
</div>
</ng-template>
@@ -0,0 +1,279 @@
.compare-layout {
padding: 28px 32px 42px;
display: flex;
flex-direction: column;
gap: 18px;
max-width: 1280px;
margin: 0 auto;
box-sizing: border-box;
}
/* ---- header ---- */
.compare-header {
display: flex;
flex-direction: column;
gap: 12px;
h1 {
margin: 0;
font-size: 24px;
font-weight: 700;
color: var(--sg-text, #101a3d);
}
}
.compare-meta {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.meta-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 12px;
border-radius: 999px;
background: var(--sg-surface-muted, #f7f9ff);
border: 1px solid var(--sg-border, #dde5f2);
color: var(--sg-text-muted, #64708f);
font-size: 13px;
mat-icon {
font-size: 16px;
width: 16px;
height: 16px;
color: var(--sg-text-soft, #8a95b3);
}
}
.author-legend {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 8px 18px;
}
.legend-item {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 14px;
font-weight: 600;
color: var(--sg-text, #101a3d);
}
.legend-swatch {
width: 12px;
height: 12px;
border-radius: 3px;
flex: 0 0 auto;
}
/* ---- cards ---- */
.card {
background: #fff;
border: 1px solid #d7e4ff;
border-radius: 16px;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
padding: 20px 22px;
}
.card-title {
margin: 0;
font-size: 16px;
font-weight: 700;
color: var(--sg-text, #101a3d);
}
.card-sub {
margin: 4px 0 0;
font-size: 13px;
color: var(--sg-text-muted, #64708f);
}
.compare-hint {
padding: 24px;
text-align: center;
color: var(--sg-text-muted, #64708f);
}
/* ---- comparison table ---- */
.table-scroll {
margin-top: 14px;
overflow-x: auto;
}
.compare-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
thead th {
text-align: left;
padding: 0 16px 10px;
border-bottom: 2px solid var(--sg-border, #dde5f2);
vertical-align: bottom;
}
.author-col {
text-align: right;
}
.th-name {
display: inline-flex;
align-items: center;
gap: 8px;
font-weight: 700;
color: var(--sg-text, #101a3d);
}
tbody tr + tr th,
tbody tr + tr td {
border-top: 1px solid var(--sg-border, #dde5f2);
}
tbody th,
tbody td {
padding: 12px 16px;
}
}
.metric-col {
min-width: 220px;
}
.metric-label {
display: block;
font-weight: 600;
color: var(--sg-text, #101a3d);
}
.metric-hint {
display: block;
margin-top: 2px;
font-size: 12px;
font-weight: 400;
color: var(--sg-text-soft, #8a95b3);
}
.value-cell {
text-align: right;
font-variant-numeric: tabular-nums;
color: var(--sg-text, #101a3d);
white-space: nowrap;
&.best {
font-weight: 700;
color: var(--sg-primary, #0b1020);
background: var(--sg-surface-soft, #f3f6fd);
}
}
.value-empty {
color: var(--sg-text-soft, #8a95b3);
}
/* author-position row: first / middle / last shown together, colour-coded */
.position-cell {
white-space: nowrap;
}
.pos {
font-weight: 700;
font-variant-numeric: tabular-nums;
&.pos-first {
color: #16a34a;
}
&.pos-middle {
color: #d97706;
}
&.pos-last {
color: #2563eb;
}
&.rel-count {
color: #7c3aed;
}
&.rel-avg {
color: #0891b2;
}
&.cit-total {
color: #b91c1c;
}
&.cit-avg {
color: #ea580c;
}
&.fwci-count {
color: #4d7c0f;
}
&.fwci-avg {
color: #0d9488;
}
&.year-from {
color: #6d28d9;
}
&.year-to {
color: #be185d;
}
&.ind-count {
color: #92400e;
}
&.ind-share {
color: #1d4ed8;
}
}
.pos-sep {
margin: 0 4px;
color: var(--sg-text-soft, #b6bed6);
font-weight: 400;
}
.position-legend {
display: block;
margin-top: 4px;
font-size: 11px;
font-weight: 600;
}
/* ---- section 3: topic profile charts ---- */
.chart-title {
margin: 18px 0 0;
font-size: 14px;
font-weight: 700;
color: var(--sg-text, #101a3d);
}
.chart-hint {
margin: 2px 0 8px;
font-size: 12px;
color: var(--sg-text-muted, #64708f);
}
.profile-chart {
width: 100%;
height: 260px;
}
.profile-chart-wide {
height: 320px;
}
.chart-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px 24px;
}
@media (max-width: 900px) {
.compare-layout {
padding: 20px 16px 32px;
}
.chart-grid {
grid-template-columns: 1fr;
}
}
@@ -0,0 +1,701 @@
import { Component, OnInit, computed, inject, signal } from '@angular/core';
import { DecimalPipe, NgTemplateOutlet } from '@angular/common';
import { ActivatedRoute } from '@angular/router';
import { MatIconModule } from '@angular/material/icon';
import { EChartsOption } from 'echarts';
import { NgxEchartsDirective } from 'ngx-echarts';
import {
AuthorStaticStats,
AuthorTopicProfile,
AuthorTopicStats,
RankingService,
} from '../../api';
const AUTHOR_COLORS = ['#1565c0', '#e6550d', '#2ca02c', '#9467bd'];
const SUBFIELD_COLORS = [
'#2563eb',
'#16a34a',
'#d97706',
'#7c3aed',
'#0891b2',
'#db2777',
'#65a30d',
'#b45309',
];
const OTHER_COLOR = '#9ca3af';
const SUBFIELD_LIMIT = 5;
interface AuthorSummary {
authorId: string;
name: string;
color: string;
// section 1
// topic stats
totalWorks: number | null;
corresponding: number | null;
avgPercentile: number | null;
top10: number | null;
top1: number | null;
fwciAboveOne: number | null;
avgFwci: number | null;
// citations over the topic works
citationsTotal: number | null;
avgCitations: number | null;
maxCitations: number | null;
hIndex: number | null;
// industry collaboration (works with a company co-author institution)
industryWorks: number | null;
industryShare: number | null;
// active years within the topic
firstYear: number | null;
lastYear: number | null;
// topic-relevance (matched keyword score)
relevanceAbove80: number | null;
avgRelevance: number | null;
// author-position split (first / middle / last)
firstAuthor: number | null;
middleAuthor: number | null;
lastAuthor: number | null;
// section 2: author-level stats (keyword-independent)
companies: number | null;
news: number | null;
patents: number | null;
}
interface MetricCell {
raw: number | null;
best: boolean;
}
interface GroupSegment {
label: string;
colorClass: string;
decimals: boolean;
// render the value as-is, without the number pipe (e.g. years)
plain: boolean;
}
interface GroupCell {
values: (number | null)[];
}
interface MetricRow {
label: string;
hint: string;
decimals: boolean;
kind: 'scalar' | 'group';
cells: MetricCell[];
segments: GroupSegment[];
groupCells: GroupCell[];
}
interface RowDef {
label: string;
hint: string;
select: (a: AuthorSummary) => number | null;
decimals?: boolean;
}
interface SegmentDef {
label: string;
colorClass: string;
select: (a: AuthorSummary) => number | null;
decimals?: boolean;
plain?: boolean;
}
@Component({
selector: 'app-compare-authors',
standalone: true,
imports: [DecimalPipe, NgTemplateOutlet, MatIconModule, NgxEchartsDirective],
templateUrl: './compare-authors.component.html',
styleUrl: './compare-authors.component.scss',
})
export class CompareAuthorsComponent implements OnInit {
private readonly route = inject(ActivatedRoute);
private readonly rankingService = inject(RankingService);
readonly keywords = signal<string[]>([]);
readonly timespan = signal<{ from: number; to: number } | null>(null);
// full OpenAlex ids in the requested order — the source of truth for colour + order
readonly authorIds = signal<string[]>([]);
// section 1: combined topic stats, one entry per author
readonly topic = signal<AuthorTopicStats[]>([]);
// section 2: keyword-independent author-level stats
readonly staticStats = signal<AuthorStaticStats[]>([]);
// section 3: topic profile over ALL works of each author
readonly profile = signal<AuthorTopicProfile[]>([]);
readonly profileLoading = signal(false);
readonly loading = signal(false);
// maps both sections onto one row per author, in the requested order
readonly summary = computed<AuthorSummary[]>(() => {
const topicById = new Map(this.topic().map((a) => [a.author_id, a]));
const staticById = new Map(this.staticStats().map((a) => [a.author_id, a]));
return this.authorIds().map((id, index) => {
const t = topicById.get(id);
const m = staticById.get(id);
const name =
t?.display_name ?? m?.display_name ?? id.split('/').pop() ?? id;
return {
authorId: id,
name,
color: AUTHOR_COLORS[index % AUTHOR_COLORS.length],
totalWorks: t ? t.works_total : null,
corresponding: t ? t.corresponding_count : null,
avgPercentile: t ? t.avg_percentile : null,
top10: t ? t.top10_count : null,
top1: t ? t.top1_count : null,
fwciAboveOne: t ? t.fwci_above_one_count : null,
avgFwci: t ? t.avg_fwci : null,
citationsTotal: t ? t.citations_total : null,
avgCitations: t ? t.avg_citations : null,
maxCitations: t ? t.max_citations : null,
hIndex: t ? t.h_index : null,
industryWorks: t ? t.industry_works_count : null,
industryShare:
t && t.works_total > 0
? t.industry_works_count / t.works_total
: null,
firstYear: t ? t.first_year : null,
lastYear: t ? t.last_year : null,
relevanceAbove80: t ? t.relevance_above_80_count : null,
avgRelevance: t ? t.avg_relevance : null,
firstAuthor: t ? t.first_author_count : null,
middleAuthor: t ? t.middle_author_count : null,
lastAuthor: t ? t.last_author_count : null,
companies: m ? m.companies_count : null,
news: m ? m.news_count : null,
patents: m ? m.patents_count : null,
};
});
});
readonly hasData = computed(() => this.summary().length > 0);
// section 1 table: stats over the topic-filtered works
readonly topicRows = computed<MetricRow[]>(() => [
...this.buildRows([
{
label: 'Werke gesamt',
hint: 'Publikationen zum Thema im Zeitraum',
select: (a) => a.totalWorks,
},
{
label: 'Corresponding-Author-Werke',
hint: 'Werke, in denen die Person korrespondierende:r Autor:in ist',
select: (a) => a.corresponding,
},
]),
this.buildGroupRow(
'Zitationen',
'Zitationen der Themen-Werke: gesamt | Ø pro Werk',
[
{
label: 'gesamt',
colorClass: 'cit-total',
select: (a) => a.citationsTotal,
},
{
label: 'Ø',
colorClass: 'cit-avg',
decimals: true,
select: (a) => a.avgCitations,
},
],
),
...this.buildRows([
{
label: 'Ø Impact-Perzentil',
hint: 'Feld-normalisiertes Zitations-Perzentil (0–1)',
select: (a) => a.avgPercentile,
decimals: true,
},
{
label: 'h-Index',
hint: 'h-Index über die Werke zum Thema',
select: (a) => a.hIndex,
},
{
label: 'Meistzitiertes Werk',
hint: 'Zitationen des meistzitierten Werks zum Thema',
select: (a) => a.maxCitations,
},
{
label: 'Top-10%-Werke',
hint: 'Werke unter den 10% meistzitierten',
select: (a) => a.top10,
},
{
label: 'Top-1%-Werke',
hint: 'Werke unter den 1% meistzitierten',
select: (a) => a.top1,
},
]),
this.buildGroupRow(
'FWCI',
'Field-Weighted Citation Impact: Werke über Feld-Durchschnitt | Ø über alle',
[
{
label: '> 1',
colorClass: 'fwci-count',
select: (a) => a.fwciAboveOne,
},
{
label: 'Ø',
colorClass: 'fwci-avg',
decimals: true,
select: (a) => a.avgFwci,
},
],
),
this.buildGroupRow(
'Themen-Relevanz',
'Match-Score der Keywords: Werke > 80% | Ø über alle',
[
{
label: '> 80%',
colorClass: 'rel-count',
select: (a) => a.relevanceAbove80,
},
{
label: 'Ø',
colorClass: 'rel-avg',
decimals: true,
select: (a) => a.avgRelevance,
},
],
),
this.buildGroupRow(
'Autor-Position',
'Werke nach Position (Erst | Mittel | Letzt)',
[
{
label: 'Erst',
colorClass: 'pos-first',
select: (a) => a.firstAuthor,
},
{
label: 'Mittel',
colorClass: 'pos-middle',
select: (a) => a.middleAuthor,
},
{ label: 'Letzt', colorClass: 'pos-last', select: (a) => a.lastAuthor },
],
),
this.buildGroupRow(
'Industrie-Kollaboration',
'Werke mit Co-Autor:in aus einem Unternehmen: Anzahl | Anteil',
[
{
label: 'Anzahl',
colorClass: 'ind-count',
select: (a) => a.industryWorks,
},
{
label: 'Anteil',
colorClass: 'ind-share',
decimals: true,
select: (a) => a.industryShare,
},
],
),
this.buildGroupRow(
'Aktiv im Thema',
'Erstes und letztes Publikationsjahr zum Thema',
[
{
label: 'von',
colorClass: 'year-from',
plain: true,
select: (a) => a.firstYear,
},
{
label: 'bis',
colorClass: 'year-to',
plain: true,
select: (a) => a.lastYear,
},
],
),
]);
// section 2 table: author-level stats, independent of the keywords
readonly staticRows = computed<MetricRow[]>(() =>
this.buildRows([
{
label: 'Unternehmensgründungen',
hint: 'Handelsregister-Verbindungen über den Namen',
select: (a) => a.companies,
},
{
label: 'News-Artikel',
hint: 'Nachrichtenartikel, die die Person namentlich nennen',
select: (a) => a.news,
},
{
label: 'Patente',
hint: 'Der Person zugeordnete Patente',
select: (a) => a.patents,
},
]),
);
// section 3: profiles in the requested author order (drives all charts)
readonly orderedProfiles = computed<AuthorTopicProfile[]>(() => {
const byId = new Map(this.profile().map((p) => [p.author_id, p]));
return this.authorIds()
.map((id) => byId.get(id))
.filter((p): p is AuthorTopicProfile => p !== undefined);
});
// colours the author names on the chart axes like the legend chips
private authorAxisLabel(profiles: AuthorTopicProfile[]) {
const rich: Record<string, { color: string; fontWeight: number }> = {};
profiles.forEach((_, i) => {
rich[`a${i}`] = {
color: AUTHOR_COLORS[i % AUTHOR_COLORS.length],
fontWeight: 600,
};
});
return {
formatter: (value: string) => {
const index = profiles.findIndex((p) => p.display_name === value);
return index >= 0 ? `{a${index}|${value}}` : value;
},
rich,
// rich-text labels are measured slightly too narrow — leave some slack
margin: 12,
};
}
// chart 1: how each author's complete body of work distributes over subfields
readonly subfieldChart = computed<EChartsOption>(() => {
const profiles = this.orderedProfiles();
if (profiles.length === 0) return {};
// union of the biggest subfields across all authors, one colour each
const totals = new Map<string, number>();
for (const p of profiles) {
for (const s of p.subfields) {
totals.set(s.name, (totals.get(s.name) ?? 0) + s.count);
}
}
const topSubfields = [...totals.entries()]
.sort((a, b) => b[1] - a[1])
.slice(0, SUBFIELD_LIMIT)
.map(([name]) => name);
const shownCounts = profiles.map((p) =>
topSubfields.map(
(name) => p.subfields.find((s) => s.name === name)?.count ?? 0,
),
);
const series: any[] = topSubfields.map((name, si) => ({
name,
type: 'bar',
stack: 'profil',
barWidth: 22,
emphasis: { focus: 'series' },
itemStyle: { color: SUBFIELD_COLORS[si % SUBFIELD_COLORS.length] },
data: profiles.map((p, ai) => {
const count = shownCounts[ai][si];
return {
value:
p.works_total > 0
? Math.round((count / p.works_total) * 1000) / 10
: 0,
count,
};
}),
}));
// everything outside the shown subfields (incl. works without primary topic)
series.push({
name: 'Sonstige',
type: 'bar',
stack: 'profil',
barWidth: 22,
emphasis: { focus: 'series' },
itemStyle: { color: OTHER_COLOR },
data: profiles.map((p, ai) => {
const rest =
p.works_total - shownCounts[ai].reduce((sum, c) => sum + c, 0);
return {
value:
p.works_total > 0
? Math.round((rest / p.works_total) * 1000) / 10
: 0,
count: rest,
};
}),
});
return {
tooltip: {
trigger: 'axis',
axisPointer: { type: 'shadow' },
formatter: (params: any) => {
const lines = params
.filter((p: any) => p.data.count > 0)
.map(
(p: any) =>
`${p.marker} ${p.seriesName}: <b>${p.data.value} %</b> (${p.data.count} Werke)`,
);
return `<b>${params[0]?.name ?? ''}</b><br/>${lines.join('<br/>')}`;
},
},
legend: { type: 'scroll', top: 0 },
grid: { left: 16, right: 24, top: 56, bottom: 8, containLabel: true },
xAxis: {
type: 'value',
max: 100,
axisLabel: { formatter: '{value} %' },
},
yAxis: {
type: 'category',
inverse: true,
data: profiles.map((p) => p.display_name),
axisLabel: this.authorAxisLabel(profiles),
},
series,
} as EChartsOption;
});
// chart 2: topic focus — how much of the complete body of work is on the searched topic
readonly focusChart = computed<EChartsOption>(() => {
const profiles = this.orderedProfiles();
if (profiles.length === 0) return {};
const pct = (part: number, whole: number) =>
whole > 0 ? Math.round((part / whole) * 1000) / 10 : 0;
return {
tooltip: {
trigger: 'axis',
axisPointer: { type: 'shadow' },
formatter: (params: any) => {
const lines = params.map(
(p: any) =>
`${p.marker} ${p.seriesName}: <b>${p.data.value} %</b> (${p.data.part} von ${p.data.whole} Werken)`,
);
return `<b>${params[0]?.name ?? ''}</b><br/>${lines.join('<br/>')}`;
},
},
legend: { top: 0 },
grid: { left: 16, right: 40, top: 32, bottom: 8, containLabel: true },
xAxis: {
type: 'value',
max: 100,
axisLabel: { formatter: '{value} %' },
},
yAxis: {
type: 'category',
inverse: true,
data: profiles.map((p) => p.display_name),
axisLabel: this.authorAxisLabel(profiles),
},
series: [
{
name: 'Anteil am Gesamtwerk',
type: 'bar',
itemStyle: { color: '#2563eb' },
label: { show: true, position: 'right', formatter: '{c} %' },
data: profiles.map((p) => ({
value: pct(p.matched_works, p.works_total),
part: p.matched_works,
whole: p.works_total,
})),
},
{
name: 'davon Primärthema',
type: 'bar',
itemStyle: { color: '#7c3aed' },
label: { show: true, position: 'right', formatter: '{c} %' },
data: profiles.map((p) => ({
value: pct(p.primary_topic_matches, p.matched_works),
part: p.primary_topic_matches,
whole: p.matched_works,
})),
},
],
} as EChartsOption;
});
// chart 3: topic breadth — how many distinct (sub)fields the author publishes in
readonly breadthChart = computed<EChartsOption>(() => {
const profiles = this.orderedProfiles();
if (profiles.length === 0) return {};
return {
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
legend: { top: 0 },
grid: { left: 16, right: 40, top: 32, bottom: 8, containLabel: true },
xAxis: { type: 'value' },
yAxis: {
type: 'category',
inverse: true,
data: profiles.map((p) => p.display_name),
axisLabel: this.authorAxisLabel(profiles),
},
series: [
{
name: 'Themen',
type: 'bar',
itemStyle: { color: '#0891b2' },
label: { show: true, position: 'right' },
data: profiles.map((p) => p.distinct_topics),
},
{
name: 'Subfields',
type: 'bar',
itemStyle: { color: '#d97706' },
label: { show: true, position: 'right' },
data: profiles.map((p) => p.distinct_subfields),
},
{
name: 'Fields',
type: 'bar',
itemStyle: { color: '#16a34a' },
label: { show: true, position: 'right' },
data: profiles.map((p) => p.distinct_fields),
},
],
} as EChartsOption;
});
// turns row definitions into table rows, marking the best value per row
private buildRows(defs: RowDef[]): MetricRow[] {
const authors = this.summary();
return defs.map((def) => {
const values = authors.map(def.select);
const present = values.filter((v): v is number => v !== null);
const max = present.length ? Math.max(...present) : null;
return {
label: def.label,
hint: def.hint,
decimals: def.decimals ?? false,
kind: 'scalar' as const,
cells: values.map((raw) => ({
raw,
best: raw !== null && max !== null && raw === max && max > 0,
})),
segments: [],
groupCells: [],
};
});
}
private buildGroupRow(
label: string,
hint: string,
segs: SegmentDef[],
): MetricRow {
return {
label,
hint,
decimals: false,
kind: 'group' as const,
cells: [],
segments: segs.map((s) => ({
label: s.label,
colorClass: s.colorClass,
decimals: s.decimals ?? false,
plain: s.plain ?? false,
})),
groupCells: this.summary().map((a) => ({
values: segs.map((s) => s.select(a)),
})),
};
}
ngOnInit(): void {
// everything is read from the URL so a shared link lands on the same view
const rawAuthors = this.route.snapshot.queryParamMap.get('authors') ?? '';
const rawKeywords = this.route.snapshot.queryParamMap.get('keywords') ?? '';
const rawOperator = this.route.snapshot.queryParamMap.get('operator');
const rawPubType = this.route.snapshot.queryParamMap.get('pubType');
const rawTFrom = this.route.snapshot.queryParamMap.get('tFrom');
const rawTTo = this.route.snapshot.queryParamMap.get('tTo');
const authorIds = this.parseList(rawAuthors);
const keywords = this.parseList(rawKeywords);
this.keywords.set(keywords);
if (authorIds.length === 0 || keywords.length === 0) {
return;
}
const operator = rawOperator === 'and' ? 'and' : 'or';
const publication_types = rawPubType
? this.parseList(rawPubType)
: undefined;
const timespan =
rawTFrom && rawTTo ? { from: +rawTFrom, to: +rawTTo } : undefined;
this.timespan.set(timespan ?? null);
// ids in the url are bare (A5036...); the endpoint expects full OpenAlex urls
const fullIds = authorIds.map((id) => `https://openalex.org/${id}`);
this.authorIds.set(fullIds);
const request = {
author_ids: fullIds,
keywords: keywords,
operator: operator,
filter_type: 'topic',
publication_types: publication_types,
timespan: timespan,
};
// section 1: topic-filtered works stats
this.loading.set(true);
this.rankingService.topicStats(request).subscribe({
next: (results) => {
this.topic.set(results);
this.loading.set(false);
},
error: (error) => {
console.error(error);
this.topic.set([]);
this.loading.set(false);
},
});
// section 3: topic profile over ALL works (same filter, own endpoint)
this.profileLoading.set(true);
this.rankingService.topicProfile(request).subscribe({
next: (results) => {
this.profile.set(results);
this.profileLoading.set(false);
},
error: (error) => {
console.error(error);
this.profile.set([]);
this.profileLoading.set(false);
},
});
// section 2: keyword-independent author-level stats
this.rankingService.staticStats({ author_ids: fullIds }).subscribe({
next: (results) => {
this.staticStats.set(results);
},
error: (error) => {
console.error(error);
this.staticStats.set([]);
},
});
}
private parseList(raw: string): string[] {
return raw
.split(',')
.map((value) => value.trim())
.filter(Boolean);
}
}
@@ -54,18 +54,21 @@ export class InstitutionComponent implements OnInit {
this.institution = institution;
});
const institutionId = this.activatedRoute.snapshot.paramMap.get('institutionId');
const institutionId =
this.activatedRoute.snapshot.paramMap.get('institutionId');
if (!institutionId) return;
// The "Patente" tab only makes sense once org_patents has been indexed for
// this institution (currently a manual, ~30-40 min-per-institution process),
// so only show it once we know there is actually data behind it.
this.patentsApi.getOrgPatentsByInstitution(institutionId, undefined, 0, 0).subscribe({
next: (result) => {
if ((result.patent_count ?? 0) > 0) {
this.links = [...this.links, PATENTS_LINK];
}
},
});
this.patentsApi
.getOrgPatentsByInstitution(institutionId, undefined, 0, 0)
.subscribe({
next: (result) => {
if ((result.patent_count ?? 0) > 0) {
this.links = [...this.links, PATENTS_LINK];
}
},
});
}
}
@@ -59,17 +59,21 @@ export class InstitutionsComponent {
const id = this.extractInstitutionId(institution);
if (!id || this.patentsAvailable.has(id)) continue;
this.patentsAvailable.set(id, false);
this.patentsApi.getOrgPatentsByInstitution(id, undefined, 0, 0).subscribe({
next: (result) => {
this.patentsAvailable.set(id, (result.patent_count ?? 0) > 0);
},
});
this.patentsApi
.getOrgPatentsByInstitution(id, undefined, 0, 0)
.subscribe({
next: (result) => {
this.patentsAvailable.set(id, (result.patent_count ?? 0) > 0);
},
});
}
});
}
hasPatents(institution: Institution): boolean {
return this.patentsAvailable.get(this.extractInstitutionId(institution)) ?? false;
return (
this.patentsAvailable.get(this.extractInstitutionId(institution)) ?? false
);
}
sortingOptions: SelectorOption[] = [
@@ -1,31 +1,205 @@
<div class="result-layout">
<mat-card class="results-card">
<mat-card-content class="results-placeholder">
<mat-icon>groups</mat-icon>
<h2>Personenliste</h2>
<p>
Die aktuelle Gewichtung ist unter <code>normalized</code> verfügbar.
</p>
<mat-card-content>
@if (loading()) {
<p class="results-hint">Lädt…</p>
} @else if (authors().length === 0) {
<div class="results-placeholder">
<mat-icon>groups</mat-icon>
<h2>Keine Autoren gefunden</h2>
<p>Passe die Keywords oder die Gewichtung an.</p>
</div>
} @else {
<div class="results-toolbar">
<span class="selected-hint">
{{ selectedIds().length }} / {{ MAX_SELECTED }} ausgewählt
</span>
<button
mat-flat-button
color="primary"
[disabled]="!canCompare()"
(click)="compare()">
<mat-icon>insights</mat-icon>
Vergleichen
</button>
</div>
<ul class="author-list">
@for (author of paginatedAuthors(); track author.author_id) {
<li class="author-item">
<mat-checkbox
class="author-select"
[checked]="isSelected(author)"
(change)="toggleSelect(author)" />
<a
class="author-name"
[routerLink]="['/person', authorProfileId(author), 'overview']">
{{ author.display_name }}
</a>
<span class="author-score">
Score: {{ author.score | number: '1.3-3' }}
</span>
</li>
}
</ul>
<app-query-param-paginator [total]="authors().length" />
}
</mat-card-content>
</mat-card>
<mat-card class="weights-card">
<mat-card-content>
<app-weights-sliders
[options]="weightOptions"
[initialWeights]="defaultWeights"
title="Personen-Gewichtung"
description="Werte zwischen 0 und 1. Summe wird normalisiert zu 1."
resetLabel="Ausgewogen"
applyLabel="Neu gewichten"
normalizedTitle="Normalisiert"
queryParamPrefix="personW_"
[persistInQueryParams]="true"
[showApplyButton]="true"
[showResetButton]="true"
[showNormalizedPreview]="true"
(weightsChange)="onWeightsChange($event)"
(applyWeights)="onApplyWeights($event)" />
</mat-card-content>
</mat-card>
<div class="controls-column">
<app-weights-sliders
[options]="weightOptions"
[initialWeights]="defaultWeights"
title="Personen-Gewichtung"
description="Bestimme die Relevanz der einzelnen Faktoren."
resetLabel="Ausgewogen"
applyLabel="Neu gewichten"
normalizedTitle="Normalisiert"
queryParamPrefix="personW_"
[persistInQueryParams]="true"
[showApplyButton]="true"
[showResetButton]="true"
[showNormalizedPreview]="true"
(weightsChange)="onWeightsChange($event)"
(applyWeights)="onApplyWeights($event)">
<section class="filter-section">
<div class="filter-section-header">
<h3>Filter</h3>
<button mat-stroked-button color="primary" (click)="resetFilters()">
<mat-icon>restart_alt</mat-icon>
Zurücksetzen
</button>
</div>
<div class="weight-row filter-row pub-type-row" style="display: block">
<mat-form-field
appearance="outline"
style="width: 100%; margin-bottom: -1.25em">
<mat-label>Art der Work</mat-label>
<mat-select
multiple
[ngModel]="selectedPubTypes()"
(ngModelChange)="onPubTypesChange($event)">
<div class="pub-type-search">
<mat-icon
class="search-icon"
style="
margin-left: 16px;
margin-right: 8px;
color: rgba(0, 0, 0, 0.54);
"
>search</mat-icon
>
<input
matInput
placeholder="Suchen..."
style="flex: 1; outline: none; border: none; padding: 12px 0"
[ngModel]="pubTypeSearchTerm()"
(ngModelChange)="pubTypeSearchTerm.set($event)"
(keydown)="onPubTypeKeydown($event)"
autocomplete="off" />
@if (pubTypeSearchTerm()) {
<button
mat-icon-button
(click)="
pubTypeSearchTerm.set(''); $event.stopPropagation()
"
style="margin-right: 8px; transform: scale(0.8)">
<mat-icon>close</mat-icon>
</button>
}
</div>
@for (pt of filteredPubTypes(); track pt) {
<mat-option [value]="pt">{{ pt }}</mat-option>
}
</mat-select>
</mat-form-field>
</div>
<div
class="weight-row filter-row keyword-operator-row"
style="display: block">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Keyword-Verknüpfung</mat-label>
<mat-select
[ngModel]="keywordOperator()"
(ngModelChange)="onKeywordOperatorChange($event)">
@for (option of KEYWORD_OPERATOR_OPTIONS; track option.value) {
<mat-option [value]="option.value">{{
option.label
}}</mat-option>
}
</mat-select>
</mat-form-field>
</div>
<div
class="weight-row filter-row career-stage-row"
style="display: block">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Karrierestufe</mat-label>
<mat-select
multiple
[ngModel]="careerStages()"
(ngModelChange)="onCareerStagesChange($event)">
@for (option of CAREER_STAGE_OPTIONS; track option.value) {
<mat-option [value]="option.value">{{
option.label
}}</mat-option>
}
</mat-select>
</mat-form-field>
</div>
<div
class="weight-row filter-row company-filter-row"
style="display: block">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Unternehmen</mat-label>
<mat-select
[ngModel]="companyStatus()"
(ngModelChange)="onCompanyStatusChange($event)">
@for (option of COMPANY_STATUS_OPTIONS; track option.value) {
<mat-option [value]="option.value">{{
option.label
}}</mat-option>
}
</mat-select>
</mat-form-field>
</div>
<div class="weight-row filter-row timespan-row">
<div class="weight-label">
<mat-icon class="icon-small">date_range</mat-icon>
<span>Zeitraum</span>
</div>
<div class="slider-container">
<div class="slider-labels timespan-range-label">
<span>{{ timespanFrom() }} – {{ timespanTo() }}</span>
</div>
<mat-slider
class="timespan-slider"
[min]="minYear"
[max]="maxYear"
[step]="1"
discrete>
<input
matSliderStartThumb
[value]="timespanFrom()"
(valueChange)="timespanFrom.set($event)"
(dragEnd)="onTimespanChange()" />
<input
matSliderEndThumb
[value]="timespanTo()"
(valueChange)="timespanTo.set($event)"
(dragEnd)="onTimespanChange()" />
</mat-slider>
</div>
</div>
</section>
</app-weights-sliders>
</div>
</div>
@@ -7,12 +7,21 @@
grid-template-areas: 'summary results';
gap: 0.75rem;
align-items: start;
width: 100%;
}
.search-summary-card {
.search-summary-card,
.controls-column {
grid-area: summary;
}
.controls-column {
display: flex;
flex-direction: column;
gap: 0.75rem;
min-width: 0;
}
.results-card {
grid-area: results;
}
@@ -27,3 +36,123 @@
padding: 0.75rem;
}
}
/* ============================================================
AUTHOR LIST
============================================================ */
.author-list {
list-style: none;
margin: 0;
padding: 0;
}
.results-toolbar {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.75rem;
padding: 0.25rem;
margin-bottom: 0.25rem;
}
.selected-hint {
color: var(--sg-text-secondary, rgba(0, 0, 0, 0.6));
font-size: 0.85rem;
}
.author-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.5rem 0.25rem;
border-bottom: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.08));
}
.author-name {
flex: 1;
font-weight: 500;
text-decoration: none;
color: var(--sg-primary, #1565c0);
&:hover {
text-decoration: underline;
}
}
.author-score {
font-variant-numeric: tabular-nums;
color: var(--sg-text-secondary, rgba(0, 0, 0, 0.6));
white-space: nowrap;
}
.results-hint {
padding: 0.5rem 0.25rem;
}
/* ============================================================
FILTER SECTION (closed, bordered block below the sliders)
============================================================ */
::ng-deep .filter-section {
margin-top: 0.75rem;
padding: 0.5rem 0.6rem 0.6rem;
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
border-radius: 6px;
background: var(--sg-surface-variant, rgba(0, 0, 0, 0.015));
}
.filter-section-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.4rem;
margin-bottom: 0.4rem;
h3 {
margin: 0;
font-size: 0.8rem;
font-weight: 650;
color: var(--sg-text-primary);
}
button {
min-height: 44px;
padding: 0.2rem 0.4rem;
font-size: 0.75rem;
line-height: 1.2;
}
}
/* divider between filter rows — not before the first one */
::ng-deep .filter-section .filter-row + .filter-row {
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.08));
}
::ng-deep .company-filter-row {
font-size: 0.8rem;
}
/* ============================================================
TIMESPAN
============================================================ */
::ng-deep .timespan-range-label {
justify-content: center !important;
font-weight: 500;
color: var(--sg-text-primary) !important;
}
::ng-deep .timespan-slider {
width: 100%;
margin: 0;
}
::ng-deep .pub-type-search {
display: flex;
align-items: center;
position: sticky;
top: 0;
z-index: 10;
background: white;
border-bottom: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
}
@@ -1,7 +1,18 @@
import { Component, inject, signal } from '@angular/core';
import { Component, OnInit, computed, inject, signal } from '@angular/core';
import { toSignal } from '@angular/core/rxjs-interop';
import { DecimalPipe } from '@angular/common';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatIconModule } from '@angular/material/icon';
import { MatSliderModule } from '@angular/material/slider';
import { MatSnackBar } from '@angular/material/snack-bar';
import { FormsModule } from '@angular/forms';
import { MatSelectModule } from '@angular/material/select';
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
import {
WeightMap,
@@ -9,37 +20,86 @@ import {
WeightsSlidersComponent,
WeightsSlidersValue,
} from '../../../../shared/ui/weights-sliders/weights-sliders.component';
import { QueryParamPaginatorComponent } from '../../../../shared/ui/query-param-paginator/query-param-paginator.component';
import {
KeywordToAuthorRequest,
RankedAuthor,
RankingService,
} from '../../../../api';
import { SearchResultsStateService } from '../search-results-state.service';
@Component({
selector: 'app-persons-results',
standalone: true,
imports: [MatCardModule, MatIconModule, WeightsSlidersComponent],
imports: [
DecimalPipe,
RouterLink,
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatIconModule,
MatSliderModule,
FormsModule,
MatSelectModule,
MatInputModule,
MatFormFieldModule,
QueryParamPaginatorComponent,
WeightsSlidersComponent,
],
templateUrl: './persons-results.component.html',
styleUrl: './persons-results.component.scss',
})
export class KeywordsToPersonsResultsComponent {
export class KeywordsToPersonsResultsComponent implements OnInit {
// injects the state set by the parent route — no duplicate parsing here
private readonly state = inject(SearchResultsStateService);
private readonly rankingService = inject(RankingService);
private readonly route = inject(ActivatedRoute);
private readonly router = inject(Router);
private readonly snackBar = inject(MatSnackBar);
private readonly queryParams = toSignal(this.route.queryParams);
readonly pageIndex = computed(() => {
const p = this.queryParams();
return p && p['page'] ? +p['page'] || 0 : 0;
});
readonly pageSize = computed(() => {
const p = this.queryParams();
return p && p['size'] ? +p['size'] || 10 : 10;
});
readonly paginatedAuthors = computed(() => {
const all = this.authors();
const start = this.pageIndex() * this.pageSize();
return all.slice(start, start + this.pageSize());
});
// author selection for the compare view (max 4)
readonly MAX_SELECTED = 4;
readonly selectedIds = signal<string[]>([]);
readonly canCompare = computed(() => this.selectedIds().length >= 1);
// works, citations and company foundations are used as metrics/weights
readonly defaultWeights: WeightMap = {
publications: 0.5,
works: 0.5,
citations: 0.5,
companies: 0.5,
news: 0.5,
patents: 0.5,
projects: 0.5,
mediaVisibility: 0.5,
};
readonly weightOptions: WeightSliderOption[] = [
{
key: 'publications',
label: 'Publikationen',
key: 'works',
label: 'Works',
icon: 'article',
description:
'Gewichtet die Anzahl und Relevanz wissenschaftlicher Arbeiten.',
defaultValue: 0.5,
queryParamName: 'wPublications',
queryParamName: 'wWorks',
},
{
key: 'citations',
@@ -49,87 +109,369 @@ export class KeywordsToPersonsResultsComponent {
defaultValue: 0.5,
queryParamName: 'wCitations',
},
{
key: 'companies',
label: 'Unternehmensgründungen',
icon: 'business',
description:
'Gewichtet die Anzahl der Unternehmensgründungen (Handelsregister-Verbindungen).',
defaultValue: 0.5,
queryParamName: 'wCompanies',
},
{
key: 'news',
label: 'Medien-Sichtbarkeit',
icon: 'visibility',
description:
'Gewichtet die öffentliche Sichtbarkeit über Nennungen in Nachrichtenartikeln.',
defaultValue: 0.5,
queryParamName: 'wNews',
},
{
key: 'patents',
label: 'Patente',
icon: 'workspace_premium',
description: 'Gewichtet Innovations- und Transferleistung.',
description: 'Gewichtet Innovations- und Transferleistung über Patente.',
defaultValue: 0.5,
queryParamName: 'wPatents',
},
{
/*{
key: 'projects',
label: 'Projekte',
icon: 'account_tree',
description: 'Gewichtet Beteiligung an relevanten Forschungsprojekten.',
defaultValue: 0.5,
queryParamName: 'wProjects',
},
{
key: 'mediaVisibility',
label: 'Medien-Sichtbarkeit',
icon: 'visibility',
description: 'Gewichtet öffentliche und mediale Sichtbarkeit.',
defaultValue: 0.5,
queryParamName: 'wMedia',
},
}, */
];
readonly currentWeights = signal<WeightsSlidersValue>({
raw: this.defaultWeights,
normalized: {
publications: 0.2,
citations: 0.2,
patents: 0.2,
projects: 0.2,
mediaVisibility: 0.2,
works: 1 / 5,
citations: 1 / 5,
companies: 1 / 5,
news: 1 / 5,
patents: 1 / 5,
},
rawSum: 2.5,
normalizedSum: 1,
valid: true,
});
readonly persons = signal<unknown[]>([]); // placeholder until the results service lands
// publication-year timespan filter (range slider)
readonly minYear = 1900;
readonly maxYear = 2026;
readonly timespanFrom = signal(this.minYear);
readonly timespanTo = signal(this.maxYear);
// which companies to count for the company-foundations metric
readonly COMPANY_STATUS_OPTIONS = [
{ value: 'all', label: 'Alle Unternehmen' },
{ value: 'active', label: 'Nur aktive Unternehmen' },
{ value: 'deleted', label: 'Nur gelöschte Unternehmen' },
];
readonly companyStatus = signal<'all' | 'active' | 'deleted'>('all');
// publication types
readonly ALL_PUBLICATION_TYPES = [
'article',
'other',
'dataset',
'book-chapter',
'book',
'dissertation',
'preprint',
'paratext',
'libguides',
'review',
'letter',
'reference-entry',
'editorial',
'peer-review',
'report',
'standard',
'erratum',
'retraction',
'supplementary-materials',
'book-section',
'database',
'software',
'report-component',
'grant',
];
readonly pubTypeSearchTerm = signal('');
readonly selectedPubTypes = computed(() => {
const p = this.queryParams();
const val = p?.['pubType'];
if (!val) return [];
return Array.isArray(val) ? val : val.split(',');
});
readonly filteredPubTypes = computed(() => {
const term = this.pubTypeSearchTerm().toLowerCase();
if (!term) return this.ALL_PUBLICATION_TYPES;
return this.ALL_PUBLICATION_TYPES.filter((pt) =>
pt.toLowerCase().includes(term),
);
});
onPubTypesChange(selected: string[]) {
const val = selected.length > 0 ? selected.join(',') : null;
this.router.navigate([], {
relativeTo: this.route,
queryParams: { pubType: val, page: null },
queryParamsHandling: 'merge',
});
}
onPubTypeKeydown(event: KeyboardEvent) {
if (event.key === ' ') {
event.stopPropagation();
}
}
readonly KEYWORD_OPERATOR_OPTIONS = [
{ value: 'and', label: 'UND' },
{ value: 'or', label: 'ODER' },
];
readonly keywordOperator = signal<'and' | 'or'>('or');
onKeywordOperatorChange(operator: 'and' | 'or'): void {
this.keywordOperator.set(operator);
this.router.navigate([], {
relativeTo: this.route,
queryParams: {
operator: operator,
page: null,
},
queryParamsHandling: 'merge',
replaceUrl: true,
});
this.loadAuthors();
}
readonly CAREER_STAGE_OPTIONS = [
{ value: 'Early', label: 'Early' },
{ value: 'Emerging', label: 'Emerging' },
{ value: 'Established', label: 'Established' },
{ value: 'Senior', label: 'Senior' },
];
readonly careerStages = signal<string[]>([]);
onCareerStagesChange(selected: string[]) {
this.careerStages.set(selected);
const val = selected.length > 0 ? selected.join(',') : null;
this.router.navigate([], {
relativeTo: this.route,
queryParams: { careerStage: val, page: null },
queryParamsHandling: 'merge',
});
}
readonly authors = signal<RankedAuthor[]>([]);
readonly loading = signal(false);
private hasLoadedInitial = false;
ngOnInit(): void {
// restore the timespan from the URL so the range is shareable/bookmarkable
this.timespanFrom.set(this.readYearParam('tFrom', this.minYear));
this.timespanTo.set(this.readYearParam('tTo', this.maxYear));
const status = this.route.snapshot.queryParamMap.get('companyStatus');
if (status === 'active' || status === 'deleted') {
this.companyStatus.set(status);
}
const careerStage = this.route.snapshot.queryParamMap.get('careerStage');
if (careerStage) {
this.careerStages.set(careerStage.split(','));
}
const operator = this.route.snapshot.queryParamMap.get('operator');
if (operator === 'and' || operator === 'or') {
this.keywordOperator.set(operator);
}
}
// reads a year query param, clamped to the valid range; falls back on invalid input
private readYearParam(name: string, fallback: number): number {
const rawValue = this.route.snapshot.queryParamMap.get(name);
if (rawValue === null) {
return fallback;
}
const year = Number(rawValue);
if (!Number.isFinite(year)) {
return fallback;
}
return Math.min(this.maxYear, Math.max(this.minYear, Math.round(year)));
}
private writeTimespanToUrl(): void {
this.router.navigate([], {
relativeTo: this.route,
queryParams: { tFrom: this.timespanFrom(), tTo: this.timespanTo() },
queryParamsHandling: 'merge',
replaceUrl: true,
});
}
onWeightsChange(value: WeightsSlidersValue): void {
this.currentWeights.set(value);
// fires once with the query-param-aware initial state — use it to load
if (!this.hasLoadedInitial) {
this.hasLoadedInitial = true;
this.loadPersons();
this.loadAuthors();
}
}
onApplyWeights(value: WeightsSlidersValue): void {
this.currentWeights.set(value);
this.loadPersons();
this.loadAuthors();
}
private loadPersons(): void {
const weights = this.currentWeights();
const requestPayload = {
manualKeywords: this.state.manualKeywords(),
extractedKeywords: this.state.extractedKeywords(),
keywords: this.state.keywords(),
fuzzy: this.state.fuzzySearch(),
weights: {
raw: weights.raw,
normalized: weights.normalized,
// change the company-status filter — persist to the URL and reload
onCompanyStatusChange(status: 'all' | 'active' | 'deleted'): void {
this.companyStatus.set(status);
this.router.navigate([], {
relativeTo: this.route,
queryParams: {
companyStatus: status === 'all' ? null : status,
page: null,
},
queryParamsHandling: 'merge',
replaceUrl: true,
});
this.loadAuthors();
}
resetFilters(): void {
this.timespanFrom.set(this.minYear);
this.timespanTo.set(this.maxYear);
this.companyStatus.set('all');
this.careerStages.set([]);
this.keywordOperator.set('and');
this.pubTypeSearchTerm.set('');
this.router.navigate([], {
relativeTo: this.route,
queryParams: {
pubType: null,
careerStage: null,
tFrom: null,
tTo: null,
companyStatus: null,
operator: null,
page: null,
},
queryParamsHandling: 'merge',
replaceUrl: true,
});
}
// called when a timespan thumb is released — persist to the URL and reload
onTimespanChange(): void {
if (this.timespanFrom() > this.timespanTo()) {
return;
}
this.writeTimespanToUrl();
this.loadAuthors();
}
// the backend returns the full OpenAlex url; the profile route needs only the id
authorProfileId(author: RankedAuthor): string {
const parts = author.author_id.split('/');
return parts[parts.length - 1];
}
isSelected(author: RankedAuthor): boolean {
return this.selectedIds().includes(this.authorProfileId(author));
}
toggleSelect(author: RankedAuthor): void {
const id = this.authorProfileId(author);
const current = this.selectedIds();
if (current.includes(id)) {
this.selectedIds.set(current.filter((existing) => existing !== id));
return;
}
if (current.length >= this.MAX_SELECTED) {
this.snackBar.open(
`Es können maximal ${this.MAX_SELECTED} Autoren verglichen werden.`,
'OK',
{ duration: 3000 },
);
return;
}
this.selectedIds.set([...current, id]);
}
// opens the compare page; everything needed is encoded in the URL so the link is shareable
compare(): void {
if (!this.canCompare()) {
return;
}
this.router.navigate(['/compare'], {
queryParams: {
authors: this.selectedIds().join(','),
keywords: this.state.topicsList().join(','),
operator: this.keywordOperator(),
pubType:
this.selectedPubTypes().length > 0
? this.selectedPubTypes().join(',')
: null,
tFrom: this.timespanFrom(),
tTo: this.timespanTo(),
},
});
}
private loadAuthors(): void {
const rawWeights = this.currentWeights().raw;
const request: KeywordToAuthorRequest = {
keywords: this.state.topicsList(),
operator: this.keywordOperator(),
filter_type: 'topic',
publication_types:
this.selectedPubTypes().length > 0
? this.selectedPubTypes()
: undefined,
career_stages:
this.careerStages().length > 0 ? this.careerStages() : undefined,
weights: {
works: rawWeights['works'],
citation: rawWeights['citations'],
companies: rawWeights['companies'],
news: rawWeights['news'],
patents: rawWeights['patents'],
},
timespan: {
from: this.timespanFrom(),
to: this.timespanTo(),
},
company_status: this.companyStatus(),
};
console.log(requestPayload);
/**
* TODO:
* this.personsService.searchPersons(requestPayload).subscribe({
* next: results => this.persons.set(results),
* error: error => console.error(error),
* });
*/
this.loading.set(true);
this.rankingService.rankAuthor(request).subscribe({
next: (results) => {
this.authors.set(results);
this.loading.set(false);
},
error: (error) => {
console.error(error);
this.authors.set([]);
this.loading.set(false);
},
});
}
}
@@ -218,6 +218,8 @@
}
</section>
<app-research-profile [workClassification]="workClassification()" />
@if (publication.topics?.length) {
<section class="card">
<div class="section-title">
@@ -21,6 +21,7 @@ import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
import { WorkTypePipe } from '../../shared/pipes/work-type.pipe';
import { LanguageCodePipe } from '../../shared/pipes/language-code.pipe';
import { WorkPrimaryCategoryPipe } from '../../shared/pipes/work-primary-category.pipe';
import { ResearchProfileComponent } from './research-profile/research-profile.component';
interface DetailLink {
label: string;
@@ -47,7 +48,8 @@ interface InstitutionDetail {
TopicChipComponent,
WorkTypePipe,
LanguageCodePipe,
WorkPrimaryCategoryPipe
WorkPrimaryCategoryPipe,
ResearchProfileComponent,
],
templateUrl: './publication-detail.component.html',
styleUrl: './publication-detail.component.scss',
@@ -0,0 +1,106 @@
@if (details(); as profile) {
<mat-card appearance="outlined" class="research-profile-card">
<mat-card-header class="profile-header">
<mat-icon class="profile-icon">science</mat-icon>
<div class="profile-heading">
<mat-card-title>Forschungsprofil</mat-card-title>
<mat-card-subtitle>
Einordnung der Forschungsorientierung dieser Publikation
</mat-card-subtitle>
</div>
</mat-card-header>
<mat-card-content>
<div class="visualizations">
<section aria-labelledby="pasteur-title">
<h3 id="pasteur-title" class="visualization-title">
Pasteur-Quadrant
</h3>
<div class="quadrant-chart-frame">
<div
echarts
class="quadrant-chart"
[options]="quadrantOptions()"
(chartInit)="onQuadrantChartInit($event)"></div>
</div>
</section>
<mat-divider vertical></mat-divider>
<section aria-labelledby="score-title" class="score-section">
<h3 id="score-title" class="visualization-title">
Orientierungsscore
</h3>
<div class="score-content">
<div echarts class="score-chart" [options]="scoreOptions()"></div>
<div class="score-labels" aria-hidden="true">
<span>Grundlagenorientiert</span>
<span>Anwendungsorientiert</span>
</div>
@if (profile.primary_category; as category) {
<app-topic-chip
[label]="category | workPrimaryCategory"
[color]="primaryCategoryChipColor()"
[disabled]="true" />
}
</div>
</section>
</div>
@if (
profile.confidence === 'medium' ||
profile.confidence === 'low' ||
profile.insufficient_context
) {
<mat-divider class="notices-divider"></mat-divider>
<div class="notices" aria-label="Hinweise zur Klassifikation">
@if (
profile.confidence === 'medium' || profile.confidence === 'low'
) {
<mat-card
appearance="outlined"
class="warning-note"
[style.--warning-border]="
confidenceWarningTokens(profile.confidence).border
"
[style.--warning-background]="
confidenceWarningTokens(profile.confidence).background
"
[style.--warning-text]="
confidenceWarningTokens(profile.confidence).color
">
<span>{{ confidenceLabel(profile.confidence) }}</span>
<mat-icon
class="info-icon"
[matTooltip]="confidenceTooltip(profile.confidence)"
matTooltipPosition="above"
(click)="$event.stopPropagation()"
aria-label="Erläuterung zur Konfidenz">
info_outline
</mat-icon>
</mat-card>
}
@if (profile.insufficient_context) {
<mat-card
appearance="outlined"
class="warning-note"
[style.--warning-border]="warningTokens.border"
[style.--warning-background]="warningTokens.background"
[style.--warning-text]="warningTokens.color">
<span>Begrenzte Informationsgrundlage</span>
<mat-icon
class="info-icon"
matTooltip="Für diese Einordnung standen nicht genügend inhaltliche Angaben zur Verfügung."
matTooltipPosition="above"
(click)="$event.stopPropagation()"
aria-label="Erläuterung zur Informationsgrundlage">
info_outline
</mat-icon>
</mat-card>
}
</div>
}
</mat-card-content>
</mat-card>
}
@@ -0,0 +1,185 @@
:host {
display: block;
}
.research-profile-card {
border-color: var(--sg-border);
border-radius: var(--sg-radius-md);
background: var(--sg-surface);
box-shadow: var(--sg-shadow-sm);
}
.profile-header {
align-items: flex-start;
padding: 22px 24px 12px;
}
.profile-icon {
flex: 0 0 24px;
width: 24px;
height: 24px;
margin: 1px 12px 0 0;
color: var(--sg-text-muted);
font-size: 24px;
line-height: 24px;
}
.profile-heading {
min-width: 0;
}
mat-card-title {
font-size: 20px;
font-weight: 700;
line-height: 1.25;
}
mat-card-subtitle {
margin-top: 3px;
line-height: 1.4;
}
mat-card-content {
padding: 8px 24px 24px;
}
.visualizations {
display: grid;
grid-template-columns: minmax(0, 1fr) 1px minmax(240px, 300px);
gap: 20px;
align-items: stretch;
width: 100%;
}
.visualizations section {
display: flex;
flex-direction: column;
min-width: 0;
}
.visualizations .visualization-title {
margin: 8px 0 4px;
color: var(--sg-text);
font:
700 16px/1.3 'Open Sans',
Arial,
sans-serif !important;
}
.quadrant-chart-frame {
position: relative;
width: 100%;
height: 320px;
}
.quadrant-chart {
width: 100%;
height: 100%;
}
.score-section {
align-items: center;
min-width: 0;
overflow: hidden;
}
.score-section .visualization-title {
align-self: flex-start;
}
.score-content {
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
padding-bottom: 22px;
}
.score-chart {
width: 100%;
max-width: 280px;
height: 180px;
}
.score-labels {
display: flex;
justify-content: space-between;
width: min(100%, 280px);
margin-top: -36px;
color: var(--sg-text-muted);
font-size: 11px;
font-weight: 600;
}
.score-content app-topic-chip {
margin-top: 24px;
max-width: 100%;
}
.notices-divider {
margin-top: 6px;
}
.notices {
display: flex;
flex-wrap: wrap;
gap: 10px;
padding-top: 14px;
}
.warning-note {
display: flex;
flex-direction: row;
align-items: center;
gap: 10px;
min-height: 42px;
padding: 9px 12px;
border-color: var(--warning-border);
border-radius: 12px;
background: var(--warning-background);
color: var(--warning-text);
box-shadow: none;
font-size: 13px;
line-height: 1.4;
}
.warning-note .info-icon {
flex: 0 0 auto;
width: 16px;
height: 16px;
color: inherit;
font-size: 16px;
line-height: 16px;
opacity: 0.7;
cursor: default;
&:hover {
opacity: 1;
}
}
@media (max-width: 900px) {
.visualizations {
grid-template-columns: 1fr;
}
.visualizations > mat-divider {
display: none;
}
}
@media (max-width: 560px) {
.profile-header {
padding-inline: 16px;
}
mat-card-content {
padding-inline: 16px;
}
.quadrant-chart-frame {
height: 350px;
}
}
@@ -0,0 +1,422 @@
import {
Component,
DestroyRef,
computed,
inject,
input,
signal,
} from '@angular/core';
import { MatCardModule } from '@angular/material/card';
import { MatDividerModule } from '@angular/material/divider';
import { MatIconModule } from '@angular/material/icon';
import { MatTooltipModule } from '@angular/material/tooltip';
import { EChartsOption, EChartsType } from 'echarts';
import { NgxEchartsDirective } from 'ngx-echarts';
import {
WorkClassification,
WorkClassificationDetails,
WorkPrimaryCategory,
} from '../../../api';
import { WorkPrimaryCategoryPipe } from '../../../shared/pipes/work-primary-category.pipe';
import {
TopicChipComponent,
TopicChipPaletteColor,
topicChipColorTokens,
} from '../../../shared/ui/topic-chip/topic-chip.component';
type PasteurQuadrant =
| 'pure_basic'
| 'use_inspired_basic'
| 'pure_applied'
| 'not_applicable';
interface QuadrantDefinition {
key: PasteurQuadrant;
coordinate: [string, string];
title: string;
description: string;
color?: 'blue' | 'purple' | 'green';
}
const QUADRANTS: readonly QuadrantDefinition[] = [
{
key: 'pure_basic',
coordinate: ['Niedrig', 'Hoch'],
title: 'Bohr',
description: 'Reine\nGrundlagenforschung',
color: 'blue',
},
{
key: 'use_inspired_basic',
coordinate: ['Hoch', 'Hoch'],
title: 'Pasteur',
description: 'Vom Nutzen inspirierte\nGrundlagenforschung',
color: 'purple',
},
{
key: 'not_applicable',
coordinate: ['Niedrig', 'Niedrig'],
title: 'Weder noch',
description: 'Keine eindeutige\nForschungsorientierung',
},
{
key: 'pure_applied',
coordinate: ['Hoch', 'Niedrig'],
title: 'Edison',
description: 'Angewandte Forschung\nund Entwicklung',
color: 'green',
},
];
const BLUE_TOKENS = topicChipColorTokens('blue');
const WARNING_TOKENS = topicChipColorTokens('orange');
const LOW_CONFIDENCE_TOKENS = topicChipColorTokens('pink');
@Component({
selector: 'app-research-profile',
standalone: true,
imports: [
MatCardModule,
MatDividerModule,
MatIconModule,
MatTooltipModule,
NgxEchartsDirective,
TopicChipComponent,
WorkPrimaryCategoryPipe,
],
templateUrl: './research-profile.component.html',
styleUrl: './research-profile.component.scss',
})
export class ResearchProfileComponent {
private readonly destroyRef = inject(DestroyRef);
private readonly quadrantChartSize = signal({ width: 640, height: 320 });
private quadrantResizeObserver?: ResizeObserver;
workClassification = input.required<WorkClassification | null>();
readonly warningTokens = WARNING_TOKENS;
details = computed<WorkClassificationDetails | null>(() => {
const details = this.workClassification()?.classification;
if (
!details ||
details.primary_category === WorkPrimaryCategory.NonResearch
) {
return null;
}
return details;
});
quadrantOptions = computed<EChartsOption>(() =>
this.buildQuadrantOptions(this.details()?.pasteur_quadrant),
);
scoreOptions = computed<EChartsOption>(() =>
this.buildScoreOptions(this.details()?.applied_orientation_score ?? 0),
);
primaryCategoryChipColor = computed<TopicChipPaletteColor>(() => {
switch (this.details()?.primary_category) {
case WorkPrimaryCategory.BasicResearch:
return 'green';
case WorkPrimaryCategory.AppliedResearch:
return 'pink';
case WorkPrimaryCategory.ExperimentalDevelopment:
return 'purple';
default:
return 'orange';
}
});
confidenceLabel(confidence: string | null | undefined): string {
return confidence === 'low' ? 'Geringe Konfidenz' : 'Mittlere Konfidenz';
}
confidenceTooltip(confidence: string | null | undefined): string {
return confidence === 'low'
? 'Das Klassifikationsergebnis wurde mit geringer Konfidenz bestimmt.'
: 'Das Klassifikationsergebnis wurde mit mittlerer Konfidenz bestimmt.';
}
confidenceWarningTokens(confidence: string | null | undefined) {
return confidence === 'low' ? LOW_CONFIDENCE_TOKENS : WARNING_TOKENS;
}
onQuadrantChartInit(chart: EChartsType): void {
const updateSize = (width: number, height: number) => {
const current = this.quadrantChartSize();
if (current.width !== width || current.height !== height) {
this.quadrantChartSize.set({ width, height });
}
};
updateSize(chart.getWidth(), chart.getHeight());
if (typeof ResizeObserver !== 'function') {
return;
}
this.quadrantResizeObserver?.disconnect();
this.quadrantResizeObserver = new ResizeObserver(([entry]) => {
if (entry) {
updateSize(entry.contentRect.width, entry.contentRect.height);
}
});
this.quadrantResizeObserver.observe(chart.getDom());
this.destroyRef.onDestroy(() => this.quadrantResizeObserver?.disconnect());
}
private buildQuadrantOptions(
activeQuadrant: string | null | undefined,
): EChartsOption {
const textColor = this.cssColor('--sg-text-muted', BLUE_TOKENS.color);
const inactiveColor = this.cssColor(
'--sg-surface-muted',
BLUE_TOKENS.background,
);
const neutralActiveColor = this.cssColor('--sg-border', BLUE_TOKENS.border);
const surfaceColor = this.cssColor('--sg-surface', 'white');
const axisColor = this.cssColor('--sg-text', BLUE_TOKENS.color);
const { width: chartWidth, height: chartHeight } = this.quadrantChartSize();
const axisLeft = 59;
const axisTop = 12;
const axisRight = 12;
const axisBottom = 39;
const horizontalY = chartHeight - axisBottom;
const horizontalTipX = chartWidth - axisRight;
return {
animation: false,
tooltip: { show: false },
visualMap: {
type: 'piecewise',
show: false,
dimension: 2,
pieces: [
{ value: 0, color: inactiveColor },
{ value: 1, color: topicChipColorTokens('blue').activeBackground },
{
value: 2,
color: topicChipColorTokens('purple').activeBackground,
},
{ value: 3, color: topicChipColorTokens('green').activeBackground },
{ value: 4, color: neutralActiveColor },
],
},
matrix: {
left: 68,
right: 12,
top: 12,
bottom: 48,
x: {
show: false,
data: ['Niedrig', 'Hoch'],
dividerLineStyle: { width: 0, opacity: 0 },
itemStyle: { borderWidth: 0, opacity: 0 },
},
y: {
show: false,
data: ['Hoch', 'Niedrig'],
dividerLineStyle: { width: 0, opacity: 0 },
itemStyle: { borderWidth: 0, opacity: 0 },
},
body: {
itemStyle: { borderWidth: 0, opacity: 0 },
label: { show: false },
},
corner: {
itemStyle: { borderWidth: 0, opacity: 0 },
label: { show: false },
},
backgroundStyle: { borderWidth: 0, opacity: 0 },
},
graphic: [
{
type: 'line',
silent: true,
shape: {
x1: axisLeft,
y1: horizontalY,
x2: horizontalTipX - 10,
y2: horizontalY,
},
style: { stroke: axisColor, lineWidth: 2 },
},
{
type: 'polygon',
silent: true,
shape: {
points: [
[horizontalTipX, horizontalY],
[horizontalTipX - 10, horizontalY - 6],
[horizontalTipX - 10, horizontalY + 6],
],
},
style: { fill: axisColor },
},
{
type: 'line',
silent: true,
shape: {
x1: axisLeft,
y1: horizontalY,
x2: axisLeft,
y2: axisTop + 10,
},
style: { stroke: axisColor, lineWidth: 2 },
},
{
type: 'polygon',
silent: true,
shape: {
points: [
[axisLeft, axisTop],
[axisLeft - 6, axisTop + 10],
[axisLeft + 6, axisTop + 10],
],
},
style: { fill: axisColor },
},
{
type: 'text',
x: axisLeft + (horizontalTipX - axisLeft) / 2,
y: chartHeight - 17,
style: {
text: 'Anwendungsorientierung',
fill: textColor,
fontSize: 12,
fontWeight: 600,
align: 'center',
verticalAlign: 'bottom',
},
},
{
type: 'text',
left: 38,
top: 'middle',
rotation: Math.PI / 2,
style: {
text: 'Erkenntnisorientierung',
fill: textColor,
fontSize: 12,
fontWeight: 600,
},
},
],
series: [
{
type: 'heatmap',
coordinateSystem: 'matrix',
silent: true,
emphasis: { disabled: true },
data: QUADRANTS.map((quadrant) => {
const active = quadrant.key === activeQuadrant;
const activeTokens = quadrant.color
? topicChipColorTokens(quadrant.color)
: BLUE_TOKENS;
const activeColorValue = quadrant.color
? ({ blue: 1, purple: 2, green: 3 } as const)[quadrant.color]
: 4;
return {
value: [...quadrant.coordinate, active ? activeColorValue : 0],
itemStyle: {
borderColor: surfaceColor,
borderWidth: 4,
borderRadius: 10,
},
label: {
show: true,
color: active ? activeTokens.color : textColor,
fontSize: 11,
lineHeight: 16,
fontWeight: 400,
formatter: [
`{title|${quadrant.title}}`,
`{description|${quadrant.description}}`,
...(active ? ['{active|✓ Diese Publikation}'] : []),
].join('\n'),
rich: {
title: {
color: active ? activeTokens.color : textColor,
fontSize: 13,
fontWeight: 700,
lineHeight: 19,
},
description: {
color: active ? activeTokens.color : textColor,
fontSize: 11,
fontWeight: 400,
lineHeight: 16,
},
active: {
color: activeTokens.color,
backgroundColor: surfaceColor,
borderColor: activeTokens.color,
borderWidth: 1,
borderRadius: 11,
padding: [5, 10, 2, 10],
fontSize: 10,
fontWeight: 700,
lineHeight: 18,
align: 'center',
verticalAlign: 'middle',
},
},
},
};
}),
},
],
};
}
private buildScoreOptions(score: number): EChartsOption {
const boundedScore = Math.max(0, Math.min(100, score));
const textColor = this.cssColor('--sg-text', BLUE_TOKENS.color);
return {
animation: false,
series: [
{
type: 'gauge',
min: 0,
max: 100,
startAngle: 180,
endAngle: 0,
center: ['50%', '70%'],
radius: '92%',
progress: {
show: true,
width: 13,
itemStyle: { color: BLUE_TOKENS.color },
},
axisLine: {
lineStyle: { width: 13, color: [[1, BLUE_TOKENS.background]] },
},
pointer: { show: false },
axisTick: { show: false },
splitLine: { show: false },
axisLabel: { show: false },
anchor: { show: false },
title: { show: false },
detail: {
valueAnimation: false,
offsetCenter: [0, '-8%'],
color: textColor,
fontSize: 25,
fontWeight: 700,
formatter: '{value}',
},
data: [{ value: boundedScore }],
},
],
};
}
private cssColor(variable: string, fallback: string): string {
if (typeof getComputedStyle !== 'function') {
return fallback;
}
return (
getComputedStyle(document.documentElement)
.getPropertyValue(variable)
.trim() || fallback
);
}
}
@@ -132,6 +132,7 @@
[label]="topic"
[active]="activeChartTopic() === topic"
[color]="getTopicColor(topic)"
[disabled]="isTopicEmpty(topic)"
(chipClick)="updateActiveChartTopic(topic)">
</app-topic-chip>
}
@@ -76,7 +76,7 @@ export const TREND_CONFIGS: Record<string, TrendStrategyConfig> = {
chartTitle: 'Autorentrends',
},
patents: {
showInstitutionSelector: true,
showInstitutionSelector: false,
showLocationSelector: false,
showAuthorSelector: false,
yAxisLabel: 'Patentanmeldungen',
@@ -231,12 +231,23 @@ export class UniTrendParentComponent implements OnInit {
getTopicColor(topic: string): string {
const mapped = this.getMappedTopic(topic);
const entries = this.state?.selectedKeywordEntries() ?? [];
const ext = this.state?.extractedKeywords() ?? [];
const man = this.state?.manualKeywords() ?? [];
const all = [...ext, ...man];
const all = [...entries, ...ext, ...man];
const targetLower = topic.toLowerCase().trim();
const mappedLower = mapped.toLowerCase().trim();
const match = all.find(
(e) => e.topic_mapping?.topic?.display_name === mapped,
(e) =>
e.topic_mapping?.topic?.display_name?.toLowerCase().trim() ===
mappedLower ||
e.topic_mapping?.topic?.display_name?.toLowerCase().trim() ===
targetLower ||
e.llm_keyword?.keyword?.toLowerCase().trim() === targetLower,
);
if (match && match.topic_mapping?.topic) {
return topicHierarchyColor({
name: match.topic_mapping.topic.display_name,
@@ -340,7 +351,7 @@ export class UniTrendParentComponent implements OnInit {
if (!raw) return null;
const type = this.selectedSearchType();
if (type === 'news' || type === 'all') {
if (type === 'news' || type === 'all' || type === 'patents') {
return {
...raw,
series: raw.series.map((s) => ({
@@ -444,12 +455,23 @@ export class UniTrendParentComponent implements OnInit {
const searchType = this.selectedSearchType();
if (topics.length > 0) {
// Find existing selections that are still in topics, or default to all
const validSelections = currentSelections.filter((t: string) =>
topics.includes(t),
);
if (validSelections.length > 0) {
this.selectedTrendTopics.set(validSelections);
const altTopics = fuzzy ? kws : (this.state?.topicsList() ?? kws);
const mappedSelections: string[] = [];
currentSelections.forEach((item) => {
if (topics.includes(item)) {
mappedSelections.push(item);
} else {
const idx = altTopics.indexOf(item);
if (idx !== -1 && idx < topics.length && topics[idx]) {
mappedSelections.push(topics[idx]);
}
}
});
const finalSelections = Array.from(new Set(mappedSelections));
if (finalSelections.length > 0) {
this.selectedTrendTopics.set(finalSelections);
} else {
this.selectedTrendTopics.set(topics);
}
@@ -883,8 +905,8 @@ export class UniTrendParentComponent implements OnInit {
.searchPersonsList(
undefined, // query
'University of Duisburg-Essen', // primary institution
undefined, // sortBy
undefined, // sortOrder
'cited_by_count', // sortBy
'desc', // sortOrder
[topic], // topic
1, // page
3, // pageSize
@@ -972,8 +994,8 @@ export class UniTrendParentComponent implements OnInit {
.searchPersonsList(
undefined, // query
'University of Duisburg-Essen', // UDE
undefined, // sortBy
undefined, // sortOrder
'cited_by_count', // sortBy
'desc', // sortOrder
[topic], // topic
1, // page
6, // pageSize
@@ -990,8 +1012,8 @@ export class UniTrendParentComponent implements OnInit {
.searchPersonsList(
undefined,
undefined, // global!
undefined,
undefined,
'cited_by_count',
'desc',
[topic],
1,
6,
@@ -1231,8 +1253,8 @@ export class UniTrendParentComponent implements OnInit {
.searchPersonsList(
undefined, // query
name, // institutionName
undefined, // sortBy
undefined, // sortOrder
'cited_by_count', // sortBy
'desc', // sortOrder
[topic], // topic
1, // page
3, // pageSize
@@ -1289,8 +1311,37 @@ export class UniTrendParentComponent implements OnInit {
this.updateUrlParams();
}
isTopicEmpty(topic: string): boolean {
const data = this.trendResponse();
if (!data || !data.series || data.series.length === 0) {
return false;
}
const mapped = this.getMappedTopic(topic);
const startYr = this.startYear();
const endYr = this.endYear();
let totalRaw = 0;
data.series.forEach((s) => {
if (s.visible !== false && s.topic_data) {
const items = s.topic_data[topic] || s.topic_data[mapped];
if (items) {
items.forEach((y) => {
if (y.year >= startYr && y.year <= endYr) {
totalRaw += y.raw || 0;
}
});
}
}
});
return totalRaw === 0;
}
// Topic tab toggle (data reuses instantly)
updateActiveChartTopic(topic: string) {
if (this.isTopicEmpty(topic)) {
return;
}
this.activeChartTopic.set(topic);
this.updateUrlParams();
}
@@ -1,8 +1,11 @@
import { inject } from '@angular/core';
import { ResolveFn } from '@angular/router';
import { TopicPageV2, TopicsV2Service } from '../api';
import { TopicPageV2, TopicsV2Service } from '../api';
export const selectedTopicsResolver: ResolveFn<TopicPageV2> = (route, state) => {
export const selectedTopicsResolver: ResolveFn<TopicPageV2> = (
route,
state,
) => {
const topicIdQueryParamKey =
(route.data['topicIdQueryParamKey'] as string) || 'topicId';
@@ -71,7 +71,9 @@ export function classificationSectionColor(
section: string | null | undefined,
): string {
const letter = section?.trim().charAt(0).toUpperCase();
const hue = (letter ? IPC_SECTION_HUES[letter] : undefined) ?? stableHue(section ?? 'section');
const hue =
(letter ? IPC_SECTION_HUES[letter] : undefined) ??
stableHue(section ?? 'section');
return `hsl(${normalizeHue(hue)} ${FIELD_COLOR_SATURATION}% ${FIELD_COLOR_LIGHTNESS}%)`;
}
@@ -25,7 +25,7 @@ export class WorkPrimaryCategoryPipe implements PipeTransform {
transform(
value: WorkPrimaryCategory | null | undefined,
...args: unknown[]
): unknown {
): string {
return transformWorkPrimaryCategory(value);
}
}
@@ -97,7 +97,11 @@
<div class="loading-indicator">
@if (isNavigating()) {
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
@if (collapsed()) {
<mat-spinner [diameter]="32"></mat-spinner>
} @else {
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
}
}
</div>
@@ -10,6 +10,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatDialog } from '@angular/material/dialog';
import { ConfirmationDialogComponent } from '../confirmation-dialog/confirmation-dialog.component';
import { MatCardContent, MatCardModule } from '@angular/material/card';
import { MatProgressSpinner } from '@angular/material/progress-spinner';
type NavItem = {
label: string;
@@ -42,6 +43,7 @@ type NavItemGroup = {
MatTooltipModule,
MatCardModule,
MatCardContent,
MatProgressSpinner,
],
templateUrl: './app-menu.component.html',
styleUrl: './app-menu.component.scss',
@@ -6,18 +6,32 @@
<!-- Autocomplete Search Input for Institutions -->
<div class="autocomplete-search">
<mat-icon class="search-icon">search</mat-icon>
<input
type="text"
placeholder="Einrichtung suchen, um deren Top-3 Autoren hinzuzufügen..."
[value]="searchQuery()"
(input)="onSearchInput($event)" />
<mat-form-field appearance="outline" class="search-form-field">
<mat-icon matPrefix>search</mat-icon>
<mat-label>Einrichtung suchen</mat-label>
<input
matInput
type="text"
placeholder="Einrichtung suchen, um deren Top-3 Autoren hinzuzufügen..."
[value]="searchQuery()"
(input)="onSearchInput($event)" />
@if (searchQuery()) {
<button
mat-icon-button
matSuffix
(click)="searchChange.emit('')"
aria-label="Löschen"
type="button">
<mat-icon>clear</mat-icon>
</button>
}
</mat-form-field>
@if (searchResults().length > 0) {
<ul class="autocomplete-results">
@for (result of searchResults(); track result.id) {
<li>
<button (click)="onSelectResult(result)">
<button type="button" (click)="onSelectResult(result)">
<span class="name">{{ result.display_name }}</span>
<span class="hint">{{
result.hint || result.entity_type
@@ -1,15 +1,32 @@
import { Component, input, output } from '@angular/core';
import {
Component,
ElementRef,
HostListener,
inject,
input,
output,
} from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatIconModule } from '@angular/material/icon';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatButtonModule } from '@angular/material/button';
@Component({
selector: 'app-author-institution-selector',
standalone: true,
imports: [CommonModule, MatIconModule],
imports: [
CommonModule,
MatIconModule,
MatFormFieldModule,
MatInputModule,
MatButtonModule,
],
templateUrl: './author-institution-selector.component.html',
styleUrl: './author-institution-selector.component.scss',
})
export class AuthorInstitutionSelectorComponent {
private readonly elementRef = inject(ElementRef);
readonly searchQuery = input<string>('');
readonly searchResults = input<any[]>([]);
@@ -21,10 +38,27 @@ export class AuthorInstitutionSelectorComponent {
this.searchChange.emit(val);
}
@HostListener('document:click', ['$event'])
onDocumentClick(event: MouseEvent): void {
if (!this.elementRef.nativeElement.contains(event.target as Node)) {
if (this.searchResults().length > 0) {
this.searchChange.emit('');
}
}
}
@HostListener('document:keydown.escape')
onEscape(): void {
if (this.searchResults().length > 0) {
this.searchChange.emit('');
}
}
onSelectResult(result: any): void {
this.addInstitutionAuthors.emit({
id: result.id || '',
name: result.display_name || '',
});
this.searchChange.emit('');
}
}
@@ -7,18 +7,32 @@
<!-- Autocomplete Search Input for Authors -->
<div class="autocomplete-search">
<mat-icon class="search-icon">search</mat-icon>
<input
type="text"
placeholder="Autor suchen und hinzufügen..."
[value]="searchQuery()"
(input)="onSearchInput($event)" />
<mat-form-field appearance="outline" class="search-form-field">
<mat-icon matPrefix>search</mat-icon>
<mat-label>Autor vergleichen</mat-label>
<input
matInput
type="text"
placeholder="Autor suchen und hinzufügen..."
[value]="searchQuery()"
(input)="onSearchInput($event)" />
@if (searchQuery()) {
<button
mat-icon-button
matSuffix
(click)="searchChange.emit('')"
aria-label="Löschen"
type="button">
<mat-icon>clear</mat-icon>
</button>
}
</mat-form-field>
@if (searchResults().length > 0) {
<ul class="autocomplete-results">
@for (result of searchResults(); track result.id) {
<li>
<button (click)="onSelectResult(result)">
<button type="button" (click)="onSelectResult(result)">
<span class="name">{{ result.display_name }}</span>
<span class="hint">{{
result.last_known_institutions?.[0]?.display_name ||
@@ -1,6 +1,16 @@
import { Component, input, output } from '@angular/core';
import {
Component,
ElementRef,
HostListener,
inject,
input,
output,
} from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatIconModule } from '@angular/material/icon';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatButtonModule } from '@angular/material/button';
export interface CompareItem {
id: string;
@@ -10,11 +20,18 @@ export interface CompareItem {
@Component({
selector: 'app-author-selector',
standalone: true,
imports: [CommonModule, MatIconModule],
imports: [
CommonModule,
MatIconModule,
MatFormFieldModule,
MatInputModule,
MatButtonModule,
],
templateUrl: './author-selector.component.html',
styleUrl: './author-selector.component.scss',
})
export class AuthorSelectorComponent {
private readonly elementRef = inject(ElementRef);
readonly activeTab = input<string>('publications');
readonly comparisonAuthors = input<CompareItem[]>([]);
readonly topSuggestions = input<any[]>([]);
@@ -53,11 +70,28 @@ export class AuthorSelectorComponent {
this.searchChange.emit(val);
}
@HostListener('document:click', ['$event'])
onDocumentClick(event: MouseEvent): void {
if (!this.elementRef.nativeElement.contains(event.target as Node)) {
if (this.searchResults().length > 0) {
this.searchChange.emit('');
}
}
}
@HostListener('document:keydown.escape')
onEscape(): void {
if (this.searchResults().length > 0) {
this.searchChange.emit('');
}
}
onSelectResult(result: any): void {
this.addAuthor.emit({
id: result.id || '',
name: result.display_name || '',
});
this.searchChange.emit('');
}
onSelectSuggestion(item: any): void {
@@ -24,18 +24,32 @@
<!-- Autocomplete Search Input -->
<div class="autocomplete-search">
<mat-icon class="search-icon">search</mat-icon>
<input
type="text"
placeholder="Einrichtung suchen und hinzufügen..."
[value]="searchQuery()"
(input)="onSearchInput($event)" />
<mat-form-field appearance="outline" class="search-form-field">
<mat-icon matPrefix>search</mat-icon>
<mat-label>Einrichtung vergleichen</mat-label>
<input
matInput
type="text"
placeholder="Einrichtung suchen und hinzufügen..."
[value]="searchQuery()"
(input)="onSearchInput($event)" />
@if (searchQuery()) {
<button
mat-icon-button
matSuffix
(click)="searchChange.emit('')"
aria-label="Löschen"
type="button">
<mat-icon>clear</mat-icon>
</button>
}
</mat-form-field>
@if (searchResults().length > 0) {
<ul class="autocomplete-results">
@for (result of searchResults(); track result.id) {
<li>
<button (click)="onSelectResult(result)">
<button type="button" (click)="onSelectResult(result)">
<span class="name">{{ result.display_name }}</span>
<span class="hint">{{
result.hint || result.entity_type
@@ -1,6 +1,16 @@
import { Component, input, output } from '@angular/core';
import {
Component,
ElementRef,
HostListener,
inject,
input,
output,
} from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatIconModule } from '@angular/material/icon';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatButtonModule } from '@angular/material/button';
export interface CompareItem {
id: string;
@@ -10,11 +20,18 @@ export interface CompareItem {
@Component({
selector: 'app-institution-selector',
standalone: true,
imports: [CommonModule, MatIconModule],
imports: [
CommonModule,
MatIconModule,
MatFormFieldModule,
MatInputModule,
MatButtonModule,
],
templateUrl: './institution-selector.component.html',
styleUrl: './institution-selector.component.scss',
})
export class InstitutionSelectorComponent {
private readonly elementRef = inject(ElementRef);
readonly activeTab = input<string>('publications');
readonly comparisonInstitutions = input<CompareItem[]>([]);
readonly primaryInstitution = input<string | null>(null);
@@ -68,11 +85,28 @@ export class InstitutionSelectorComponent {
this.searchChange.emit(val);
}
@HostListener('document:click', ['$event'])
onDocumentClick(event: MouseEvent): void {
if (!this.elementRef.nativeElement.contains(event.target as Node)) {
if (this.searchResults().length > 0) {
this.searchChange.emit('');
}
}
}
@HostListener('document:keydown.escape')
onEscape(): void {
if (this.searchResults().length > 0) {
this.searchChange.emit('');
}
}
onSelectResult(result: any): void {
this.addInstitution.emit({
id: result.id || '',
name: result.display_name || '',
});
this.searchChange.emit('');
}
onSelectSuggestion(item: any): void {
@@ -103,16 +103,31 @@
<!-- Autocomplete-Suche für Länder/Kontinente -->
<div class="autocomplete-search">
<input
type="text"
placeholder="Land oder Kontinent suchen..."
[value]="locationQuery()"
(input)="onSearchInput($event)" />
<mat-form-field appearance="outline" class="search-form-field">
<mat-icon matPrefix>search</mat-icon>
<mat-label>Land oder Kontinent suchen</mat-label>
<input
matInput
type="text"
placeholder="Land oder Kontinent suchen..."
[value]="locationQuery()"
(input)="onSearchInput($event)" />
@if (locationQuery()) {
<button
mat-icon-button
matSuffix
(click)="searchChange.emit('')"
aria-label="Löschen"
type="button">
<mat-icon>clear</mat-icon>
</button>
}
</mat-form-field>
@if (locationSearchResults().length > 0) {
<ul class="autocomplete-results">
@for (loc of locationSearchResults(); track loc.id) {
<li>
<button (click)="onSelectResult(loc)">
<button type="button" (click)="onSelectResult(loc)">
<span class="name">{{ loc.display_name }}</span>
<span class="hint">{{
loc.type === 'country' ? 'Land' : 'Kontinent'

Some files were not shown because too many files have changed in this diff Show More