From b496cfd52c499947c95f1a2fd4c681b65586c306 Mon Sep 17 00:00:00 2001
From: Kazgatari <56477241+Kazgatari@users.noreply.github.com>
Date: Wed, 17 Jun 2026 11:46:16 +0200
Subject: [PATCH 1/2] removed old code and truncated cards in person search to
keep layout static
---
service/sentence_transformer/index_topics.py | 82 -------------------
.../person-card/person-card.component.html | 36 ++++----
.../person-card/person-card.component.scss | 39 ++++++++-
.../person-card/person-card.component.ts | 40 ++++++---
4 files changed, 86 insertions(+), 111 deletions(-)
diff --git a/service/sentence_transformer/index_topics.py b/service/sentence_transformer/index_topics.py
index 35cea0cb..7b506427 100644
--- a/service/sentence_transformer/index_topics.py
+++ b/service/sentence_transformer/index_topics.py
@@ -35,15 +35,6 @@ headers = {
"Content-Type": "application/json"
}
-def float_array_to_base64(vector):
- """
- Convert a float vector into a Base64 string representing 32-bit big-endian float bytes.
- Elasticsearch expects big-endian floats for binary/Base64 dense_vector encoding.
- """
- arr = np.asarray(vector, dtype=np.float32)
- big_endian_bytes = arr.astype('>f4').tobytes()
- return base64.b64encode(big_endian_bytes).decode('utf-8')
-
def split_into_sentences(text):
if not text:
return []
@@ -52,77 +43,6 @@ def split_into_sentences(text):
# Filter out empty or extremely short sentences
return [s for s in sentences if len(s.strip()) > 3]
-def check_and_update_mapping():
- print("Checking 'topicvectors' index...")
-
- with httpx.Client(timeout=30.0) as client:
- exists_resp = client.head(f"{ELASTIC_URL}topicvectors", headers=headers)
- if exists_resp.status_code == 404:
- print("Index 'topicvectors' does not exist. Creating index with mapping...")
- create_payload = {
- "mappings": {
- "properties": {
- "id": {"type": "keyword"},
- "display_name": {
- "type": "text",
- "fields": {
- "keyword": {"type": "keyword", "ignore_above": 256}
- }
- },
- "display_name_vector": {
- "type": "dense_vector",
- "dims": 768,
- "index": True,
- "similarity": "cosine",
- "index_options": {
- "type": "int8_hnsw",
- "m": 16,
- "ef_construction": 100
- }
- },
- "description": {"type": "text"},
- "description_vectors": {
- "type": "nested",
- "properties": {
- "vector": {
- "type": "dense_vector",
- "dims": 768,
- "index": True,
- "similarity": "cosine",
- "index_options": {
- "type": "int8_hnsw",
- "m": 16,
- "ef_construction": 100
- }
- }
- }
- },
- "keywords": {
- "type": "text",
- "fields": {
- "keyword": {"type": "keyword"}
- }
- },
- "cited_by_count": {"type": "long"},
- "works_count": {"type": "long"},
- "updated_date": {"type": "date"},
- "created_date": {"type": "date"}
- }
- }
- }
- resp = client.put(
- f"{ELASTIC_URL}topicvectors",
- json=create_payload,
- headers=headers
- )
- if resp.status_code == 200:
- print("Successfully created 'topicvectors' index.")
- else:
- print(f"Failed to create index: {resp.status_code} - {resp.text}")
- resp.raise_for_status()
- else:
- print("Index 'topicvectors' already exists.")
-
def fetch_all_topics():
print("Fetching topics from 'openalex-topics'...")
topics = []
@@ -204,8 +124,6 @@ def bulk_index_topics(topics, display_name_vectors, nested_description_vectors):
print(f"Indexed batch {i} to {i + len(batch_topics)}")
def main():
- check_and_update_mapping()
-
topics = fetch_all_topics()
if not topics:
print("No topics found. Exiting.")
diff --git a/webapp/src/app/modules/person-card/person-card.component.html b/webapp/src/app/modules/person-card/person-card.component.html
index d8e39eae..43698f60 100644
--- a/webapp/src/app/modules/person-card/person-card.component.html
+++ b/webapp/src/app/modules/person-card/person-card.component.html
@@ -5,15 +5,7 @@
{{ getInitials(person.display_name) }}
-
- @if (person.relevance_rating) {
-
- {{ person.relevance_rating }}
-
- }
+
-
{{ person.display_name }}
+
+ {{ person.display_name ?? '' }}
+
- {{ getDistinguishingId(person) }}
+ {{ getDistinguishingId(person) ?? '' }}
- Publikationen: {{ person.works_count }} · Zitationen:
- {{ person.cited_by_count }}
+ {{ getStatsString() }}
-
- h_index: {{person.summary_stats?.h_index }}
+
+ {{ getHIndexString() }}
@@ -60,9 +56,12 @@
"
>apartment
-
{{
- inst.display_name ?? '' | truncate: 30
- }}
+
{{ inst.display_name ?? '' }}
@if (inst.country_code && !loading) {
{{ inst.country_code.toUpperCase() }}
diff --git a/webapp/src/app/modules/person-card/person-card.component.scss b/webapp/src/app/modules/person-card/person-card.component.scss
index 02be7ac6..f3a53722 100644
--- a/webapp/src/app/modules/person-card/person-card.component.scss
+++ b/webapp/src/app/modules/person-card/person-card.component.scss
@@ -108,6 +108,11 @@
font-size: 16px;
font-weight: 600;
color: var(--sg-text);
+ min-height: 24px;
+ line-height: 24px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.institution {
display: flex;
@@ -133,6 +138,26 @@
display: inline-flex;
align-items: center;
transition: all 0.2s ease;
+ max-width: 100%;
+ box-sizing: border-box;
+
+ .institution-name {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ min-width: 0;
+ flex: 1;
+ }
+
+ .flag-img {
+ flex-shrink: 0;
+ }
+
+ .country-code {
+ display: inline-block;
+ flex-shrink: 0;
+ white-space: nowrap;
+ }
&:hover {
background: var(--sg-primary);
@@ -143,13 +168,15 @@
.flag-img {
border: 1px solid;
- vertical-align: -10px;
+ vertical-align: middle;
}
.person-id {
margin: 2px 0 0;
font-size: 10px;
color: var(--sg-text-soft);
+ min-height: 15px;
+ line-height: 15px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -159,6 +186,11 @@
margin: 4px 0 0;
font-size: 10px;
color: var(--sg-text-muted);
+ min-height: 15px;
+ line-height: 15px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
.card-body {
@@ -186,6 +218,11 @@
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
+ max-width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ box-sizing: border-box;
&:hover {
background: var(--sg-primary-soft);
diff --git a/webapp/src/app/modules/person-card/person-card.component.ts b/webapp/src/app/modules/person-card/person-card.component.ts
index 13e889bd..89f0440c 100644
--- a/webapp/src/app/modules/person-card/person-card.component.ts
+++ b/webapp/src/app/modules/person-card/person-card.component.ts
@@ -3,18 +3,11 @@ import { CommonModule } from '@angular/common';
import { RouterLink } from '@angular/router';
import { MatIconModule } from '@angular/material/icon';
import { CustomAuthor, DehydratedInstitution, WorkTopic } from '../../api';
-import { TruncatePipe } from '../../shared/pipes/truncate.pipe';
import { SkTextDirective } from '../../custom-directives/sk-text.directive';
@Component({
selector: 'app-person-card',
standalone: true,
- imports: [
- CommonModule,
- RouterLink,
- MatIconModule,
- TruncatePipe,
- SkTextDirective,
- ],
+ imports: [CommonModule, RouterLink, MatIconModule, SkTextDirective],
templateUrl: './person-card.component.html',
styleUrl: './person-card.component.scss',
})
@@ -62,8 +55,11 @@ export class PersonCardComponent {
if (topic.field?.display_name) parts.push(topic.field.display_name);
if (topic.subfield?.display_name) parts.push(topic.subfield.display_name);
- if (parts.length === 0) return topic.display_name || '';
- return parts.join(' - ');
+ const path = parts.join(' - ');
+ if (topic.display_name) {
+ return path ? `${topic.display_name}\n(${path})` : topic.display_name;
+ }
+ return path;
}
getDistinguishingId(person: CustomAuthor): string {
@@ -74,6 +70,30 @@ export class PersonCardComponent {
return '';
}
+ getStatsString(): string {
+ const works = this.person.works_count;
+ const citations = this.person.cited_by_count;
+ const hasWorks = works !== undefined && works !== null;
+ const hasCitations = citations !== undefined && citations !== null;
+
+ if (hasWorks && hasCitations) {
+ return `Publikationen: ${works} · Zitationen: ${citations}`;
+ } else if (hasWorks) {
+ return `Publikationen: ${works}`;
+ } else if (hasCitations) {
+ return `Zitationen: ${citations}`;
+ }
+ return '';
+ }
+
+ getHIndexString(): string {
+ const hIndex = this.person.summary_stats?.h_index;
+ if (hIndex !== undefined && hIndex !== null) {
+ return `h_index: ${hIndex}`;
+ }
+ return '';
+ }
+
toggleBookmark(): void {
this.bookmarkToggle.emit(this.person);
}
From 029bdb5bca56371bd7c1d6ddbafbefc79fafd917 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mats=20Paul=20Ton=C4=8Dik?=
Date: Wed, 17 Jun 2026 20:03:42 +0200
Subject: [PATCH 2/2] Added institutions search
---
service/src/data/search_scores.json | 156 +-
.../institutions_search_client.py | 158 +-
service/src/main/inse/institutions/model.py | 17 +
.../institutions/{service.py => router.py} | 58 +-
service/src/main/inse/main.py | 4 +-
service/src/main/inse/projects/router.py | 2 +-
ude_person.http | 34 +
webapp/src/app/api/.openapi-generator/FILES | 1 +
webapp/src/app/api/README.md | 91 +-
webapp/src/app/api/api.base.service.ts | 158 +-
webapp/src/app/api/api.module.ts | 52 +-
webapp/src/app/api/api/api.ts | 13 +-
webapp/src/app/api/api/funding.service.ts | 366 +--
.../app/api/api/iNSEAccountService.service.ts | 482 ++-
webapp/src/app/api/api/iNSEService.service.ts | 1357 +++------
.../src/app/api/api/institutions.service.ts | 711 ++---
webapp/src/app/api/api/items.service.ts | 903 ++----
.../src/app/api/api/personNetwork.service.ts | 215 +-
webapp/src/app/api/api/persons.service.ts | 2592 ++++++-----------
webapp/src/app/api/api/projects.service.ts | 723 ++---
webapp/src/app/api/api/topics.service.ts | 1136 +++-----
webapp/src/app/api/api/works.service.ts | 1014 +++----
webapp/src/app/api/configuration.ts | 368 ++-
webapp/src/app/api/encoder.ts | 24 +-
webapp/src/app/api/model/accessGrant.ts | 16 +-
webapp/src/app/api/model/authAccount.ts | 12 +-
webapp/src/app/api/model/authScope.ts | 14 +-
webapp/src/app/api/model/author.ts | 40 +-
.../app/api/model/authorAffiliationsInner.ts | 10 +-
.../app/api/model/authorCountsByYearInner.ts | 12 +-
webapp/src/app/api/model/authorIds.ts | 12 +-
webapp/src/app/api/model/authorNetworkNode.ts | 34 +-
.../app/api/model/authorParsedLongestName.ts | 16 +-
.../src/app/api/model/authorPositionCount.ts | 14 +-
.../src/app/api/model/authorSummaryStats.ts | 12 +-
.../app/api/model/authorsFilterProperties.ts | 30 +-
.../src/app/api/model/authorsListResponse.ts | 12 +-
webapp/src/app/api/model/authorship.ts | 20 +-
.../src/app/api/model/autocompleteResponse.ts | 10 +-
.../app/api/model/autocompleteResponseMeta.ts | 10 +-
.../model/autocompleteResponseResultsInner.ts | 20 +-
webapp/src/app/api/model/award.ts | 18 +-
webapp/src/app/api/model/bundProject.ts | 62 +-
webapp/src/app/api/model/bundProjectPage.ts | 38 +-
webapp/src/app/api/model/categoryNested.ts | 28 +-
.../src/app/api/model/collaborationNetwork.ts | 54 +-
.../app/api/model/collaborationNetworkEdge.ts | 22 +-
.../api/model/collaborationNetworkNodeType.ts | 13 +-
webapp/src/app/api/model/costUsd.ts | 7 +-
webapp/src/app/api/model/customAuthor.ts | 42 +-
.../api/model/customAuthorsListResponse.ts | 14 +-
webapp/src/app/api/model/dehydratedAuthor.ts | 12 +-
webapp/src/app/api/model/dehydratedFunder.ts | 12 +-
.../app/api/model/dehydratedInstitution.ts | 18 +-
webapp/src/app/api/model/dehydratedSource.ts | 28 +-
webapp/src/app/api/model/dfgProjectPage.ts | 38 +-
webapp/src/app/api/model/dfgProjectSummary.ts | 32 +-
.../api/model/displayCodeSplittedNested.ts | 8 +-
webapp/src/app/api/model/euProject.ts | 72 +-
webapp/src/app/api/model/euProjectPage.ts | 38 +-
webapp/src/app/api/model/filterInformation.ts | 38 +-
webapp/src/app/api/model/filterProperties.ts | 18 +-
webapp/src/app/api/model/funderByAuthor.ts | 22 +-
.../app/api/model/fundersByAuthorResponse.ts | 14 +-
webapp/src/app/api/model/fwci.ts | 7 +-
webapp/src/app/api/model/groupByResult.ts | 12 +-
.../src/app/api/model/hTTPValidationError.ts | 8 +-
webapp/src/app/api/model/identityGrant.ts | 14 +-
webapp/src/app/api/model/institution.ts | 46 +-
webapp/src/app/api/model/institutionGeo.ts | 20 +-
webapp/src/app/api/model/institutionIds.ts | 18 +-
.../app/api/model/institutionInformation.ts | 22 +-
.../app/api/model/institutionNetworkNode.ts | 34 +-
webapp/src/app/api/model/institutionPage.ts | 31 +
.../app/api/model/institutionsListResponse.ts | 12 +-
webapp/src/app/api/model/item.ts | 30 +-
webapp/src/app/api/model/itemCreate.ts | 22 +-
webapp/src/app/api/model/itemPage.ts | 38 +-
webapp/src/app/api/model/keywordNested.ts | 8 +-
webapp/src/app/api/model/latitude.ts | 7 +-
webapp/src/app/api/model/location.ts | 24 +-
webapp/src/app/api/model/longitude.ts | 7 +-
webapp/src/app/api/model/meta.ts | 20 +-
.../app/api/model/model2YrMeanCitedness.ts | 7 +-
webapp/src/app/api/model/models.ts | 1 +
webapp/src/app/api/model/openAccess.ts | 14 +-
.../src/app/api/model/organizationNested.ts | 18 +-
webapp/src/app/api/model/personBio.ts | 14 +-
webapp/src/app/api/model/programmeNested.ts | 12 +-
.../api/model/publicationDetailByFunder.ts | 68 +-
.../model/publicationIdsByAuthorPosition.ts | 14 +-
.../api/model/publicationsByAuthorResponse.ts | 20 +-
webapp/src/app/api/model/score.ts | 7 +-
webapp/src/app/api/model/topic.ts | 32 +-
webapp/src/app/api/model/topicCount.ts | 26 +-
webapp/src/app/api/model/topicDomain.ts | 10 +-
webapp/src/app/api/model/topicField.ts | 10 +-
webapp/src/app/api/model/topicIds.ts | 10 +-
webapp/src/app/api/model/topicSubfield.ts | 10 +-
webapp/src/app/api/model/topicsByTime.ts | 46 +-
webapp/src/app/api/model/topicsByYear.ts | 38 +-
.../src/app/api/model/topicsListResponse.ts | 12 +-
webapp/src/app/api/model/validationError.ts | 12 +-
.../app/api/model/validationErrorLocInner.ts | 7 +-
webapp/src/app/api/model/value.ts | 7 +-
webapp/src/app/api/model/work.ts | 82 +-
webapp/src/app/api/model/workBiblio.ts | 14 +-
.../model/workCitationNormalizedPercentile.ts | 12 +-
.../api/model/workCitedByPercentileYear.ts | 10 +-
.../app/api/model/workCountsByYearInner.ts | 10 +-
webapp/src/app/api/model/workHasContent.ts | 10 +-
webapp/src/app/api/model/workIds.ts | 16 +-
webapp/src/app/api/model/workKeyword.ts | 12 +-
webapp/src/app/api/model/workMeshInner.ts | 16 +-
webapp/src/app/api/model/workNetworkNode.ts | 38 +-
webapp/src/app/api/model/workPage.ts | 46 +-
.../workSustainableDevelopmentGoalsInner.ts | 12 +-
webapp/src/app/api/model/workTopic.ts | 18 +-
webapp/src/app/api/model/workTopicDomain.ts | 10 +-
webapp/src/app/api/model/workTopicField.ts | 10 +-
.../src/app/api/model/workTopicInformation.ts | 22 +-
webapp/src/app/api/model/workTopicSubfield.ts | 10 +-
.../app/api/model/worksFilterProperties.ts | 46 +-
webapp/src/app/api/model/worksListResponse.ts | 12 +-
webapp/src/app/api/param.ts | 37 +-
webapp/src/app/api/provide-api.ts | 24 +-
webapp/src/app/api/variables.ts | 10 +-
webapp/src/app/app.config.ts | 3 +
webapp/src/app/app.routes.ts | 26 +
.../institution-publications.component.html | 1 +
.../institution-publications.component.scss | 0
.../institution-publications.component.ts | 11 +
.../institution/institution.component.ts | 3 +-
.../institutions/institutions.component.html | 116 +
.../institutions/institutions.component.scss | 99 +
.../institutions/institutions.component.ts | 108 +
.../app/resolvers/institutions.resolver.ts | 29 +
.../shared/ui/app-menu/app-menu.component.ts | 13 +
138 files changed, 5516 insertions(+), 7722 deletions(-)
create mode 100644 service/src/main/inse/institutions/model.py
rename service/src/main/inse/institutions/{service.py => router.py} (72%)
create mode 100644 webapp/src/app/api/model/institutionPage.ts
create mode 100644 webapp/src/app/modules/institution-publications/institution-publications.component.html
create mode 100644 webapp/src/app/modules/institution-publications/institution-publications.component.scss
create mode 100644 webapp/src/app/modules/institution-publications/institution-publications.component.ts
create mode 100644 webapp/src/app/modules/institutions/institutions.component.html
create mode 100644 webapp/src/app/modules/institutions/institutions.component.scss
create mode 100644 webapp/src/app/modules/institutions/institutions.component.ts
create mode 100644 webapp/src/app/resolvers/institutions.resolver.ts
diff --git a/service/src/data/search_scores.json b/service/src/data/search_scores.json
index 3f7d4e0b..ae1db7b2 100644
--- a/service/src/data/search_scores.json
+++ b/service/src/data/search_scores.json
@@ -1,150 +1,114 @@
{
- "query": "Robotics",
- "max_score": 22.734766,
+ "query": "localization",
+ "max_score": 23.237041,
"results": [
{
- "topic_name": "Soft Robotics and Applications",
- "score": 22.734766
- },
- {
- "topic_name": "Robotics and Automated Systems",
- "score": 21.997686
- },
- {
- "topic_name": "Educational Robotics and Engineering",
- "score": 21.919401
- },
- {
- "topic_name": "Prosthetics and Rehabilitation Robotics",
- "score": 21.846806
- },
- {
- "topic_name": "Micro and Nano Robotics",
- "score": 21.820261
- },
- {
- "topic_name": "Reinforcement Learning in Robotics",
- "score": 21.757397
+ "topic_name": "Indoor and Outdoor Localization Technologies",
+ "score": 23.237041
},
{
"topic_name": "Robotics and Sensor-Based Localization",
- "score": 19.993645
+ "score": 21.511477
},
{
- "topic_name": "Social Robot Interaction and HRI",
- "score": 13.187252
+ "topic_name": "Spectral Theory in Mathematical Physics",
+ "score": 14.039959
},
{
- "topic_name": "Robotic Locomotion and Control",
- "score": 12.283064
+ "topic_name": "Socioeconomic Development in MENA",
+ "score": 11.518878
},
{
- "topic_name": "Power Line Inspection Robots",
- "score": 11.873396
+ "topic_name": "Electrical Fault Detection and Protection",
+ "score": 10.770052
},
{
- "topic_name": "Mechatronics Education and Applications",
- "score": 11.171629
+ "topic_name": "Machine Learning in Bioinformatics",
+ "score": 10.322677
},
{
- "topic_name": "Educational Technology and Optimization",
- "score": 10.924184
+ "topic_name": "Software System Performance and Reliability",
+ "score": 10.112644
},
{
- "topic_name": "Mechanical and Thermal Properties Analysis",
- "score": 10.924184
+ "topic_name": "Quantum many-body systems",
+ "score": 10.112644
},
{
- "topic_name": "Psychiatry, Mental Health, Neuroscience",
- "score": 10.687462
+ "topic_name": "Random lasers and scattering media",
+ "score": 10.112644
},
{
- "topic_name": "Advanced Materials and Mechanics",
- "score": 10.460782
+ "topic_name": "Insect Pheromone Research and Control",
+ "score": 9.910988
},
{
- "topic_name": "Wetland Management and Conservation",
- "score": 10.460782
+ "topic_name": "Tactile and Sensory Interactions",
+ "score": 9.910988
},
{
- "topic_name": "Artificial Intelligence Applications",
- "score": 10.243518
+ "topic_name": "Handwritten Text Recognition Techniques",
+ "score": 9.910988
},
{
- "topic_name": "Digitalization, Law, and Regulation",
- "score": 10.243518
+ "topic_name": "Integrated Circuits and Semiconductor Failure Analysis",
+ "score": 9.910988
},
{
- "topic_name": "Engineering and Technology Innovations",
- "score": 10.243518
+ "topic_name": "Medical Imaging and Analysis",
+ "score": 9.7172165
},
{
- "topic_name": "Advanced Algorithms and Applications",
- "score": 10.035095
+ "topic_name": "Microwave Imaging and Scattering Analysis",
+ "score": 9.7172165
},
{
- "topic_name": "Teaching and Learning Programming",
- "score": 10.035095
+ "topic_name": "Neurology and Historical Studies",
+ "score": 9.7172165
},
{
- "topic_name": "Distributed Control Multi-Agent Systems",
- "score": 10.035095
+ "topic_name": "High-Velocity Impact and Material Behavior",
+ "score": 9.7172165
},
{
- "topic_name": "Advanced Scientific and Engineering Studies",
- "score": 9.834986
+ "topic_name": "Software Engineering Research",
+ "score": 9.530875
},
{
- "topic_name": "Space Satellite Systems and Control",
- "score": 9.6427
+ "topic_name": "Software Testing and Debugging Techniques",
+ "score": 9.530875
},
{
- "topic_name": "Smart Agriculture and AI",
- "score": 9.279837
+ "topic_name": "Digital Media Forensic Detection",
+ "score": 9.530875
+ },
+ {
+ "topic_name": "Infrared Thermography in Medicine",
+ "score": 9.351548
+ },
+ {
+ "topic_name": "Explainable Artificial Intelligence (XAI)",
+ "score": 9.351548
},
{
"topic_name": "Underwater Vehicles and Communication Systems",
- "score": 9.279837
+ "score": 9.351548
},
{
- "topic_name": "Modular Robots and Swarm Intelligence",
- "score": 7.7584143
+ "topic_name": "Diffusion and Search Dynamics",
+ "score": 8.8518915
},
{
- "topic_name": "Diverse Perspectives in Modern Studies",
+ "topic_name": "Direction-of-Arrival Estimation Techniques",
+ "score": 5.968384
+ },
+ {
+ "topic_name": "Retinal Imaging and Analysis",
"score": 5.6107
},
{
- "topic_name": "Teleoperation and Haptic Systems",
- "score": 5.2510495
- },
- {
- "topic_name": "Optimization and Search Problems",
- "score": 5.1682277
- },
- {
- "topic_name": "Adaptive Dynamic Programming Control",
- "score": 4.8615155
- },
- {
- "topic_name": "Robotic Mechanisms and Dynamics",
- "score": 2.6450925
- },
- {
- "topic_name": "Control and Dynamics of Mobile Robots",
- "score": 2.5917463
- },
- {
- "topic_name": "Robot Manipulation and Learning",
- "score": 2.5859585
- },
- {
- "topic_name": "Robotic Process Automation Applications",
- "score": 1.7370787
- },
- {
- "topic_name": "Robotic Path Planning Algorithms",
- "score": 1.6302633
+ "topic_name": "Radar Systems and Signal Processing",
+ "score": 4.721418
}
]
-}
+}
\ No newline at end of file
diff --git a/service/src/main/inse/institutions/institutions_search_client.py b/service/src/main/inse/institutions/institutions_search_client.py
index 23a736af..19f6eb21 100644
--- a/service/src/main/inse/institutions/institutions_search_client.py
+++ b/service/src/main/inse/institutions/institutions_search_client.py
@@ -1,10 +1,11 @@
import logging
-from typing import List, Set
+from typing import Any, Dict, List, Literal, Optional, Set
import httpx
from inse.models.openalex.institution import Institution
from inse.exceptions import NotFoundException
+from inse.institutions.model import InstitutionPage
logger = logging.getLogger(__name__)
@@ -50,7 +51,117 @@ class InstitutionsSearchClient:
f"Institution with ID '{raw_institution_id}' not found."
)
- return Institution.from_dict(hits[0]["_source"])
+ institution = self._convert_hit_to_institution(hits[0])
+ if not institution:
+ raise NotFoundException(
+ f"Institution with ID '{raw_institution_id}' could not be parsed."
+ )
+
+ return institution
+
+ async def get_institutions_by_name(
+ self,
+ name: str,
+ page: int = 0,
+ size: int = 10,
+ sort_by: Literal[
+ "relevance", "name", "works_count", "citations_count"
+ ] = "relevance",
+ sorting_direction: Literal["asc", "desc"] = "asc",
+ ) -> InstitutionPage:
+ sort_config: list = []
+
+ if sort_by == "relevance":
+ sort_config.append(
+ {
+ "_score": {
+ "order": sorting_direction if sorting_direction else "desc"
+ }
+ }
+ )
+ elif sort_by == "works_count":
+ sort_config.append({"works_count": {"order": sorting_direction}})
+ elif sort_by == "citations_count":
+ sort_config.append({"cited_by_count": {"order": sorting_direction}})
+ else:
+ sort_config.append({"display_name.keyword": {"order": sorting_direction}})
+
+ query: Dict[str, Any] = {
+ "from": page * size,
+ "size": size,
+ "sort": sort_config,
+ }
+
+ if len(name) > 0:
+ query["query"] = {
+ "match_phrase_prefix": {
+ "display_name": {
+ "query": name,
+ "max_expansions": 50,
+ }
+ }
+ }
+ elif sort_by == "relevance":
+ query["sort"] = [{"display_name.keyword": {"order": sorting_direction}}]
+
+ logger.debug(
+ "Searching institutions with name='%s', page=%d, size=%d, sorting_direction='%s', query: %s",
+ name,
+ page,
+ size,
+ sorting_direction,
+ query,
+ )
+ async with httpx.AsyncClient() as client:
+ response = await client.post(
+ "https://project.nes.uni-due.de/elastic/openalex-institutions/_search",
+ json=query,
+ headers=self.headers,
+ )
+ try:
+ response.raise_for_status()
+ except httpx.HTTPStatusError as e:
+ logger.exception(
+ "Error searching institutions with name='%s': %s, response content: %s",
+ name,
+ str(e),
+ response.text,
+ )
+ return InstitutionPage(elements=[], page=page, size=size, total=0)
+ return self.response_to_institution_page(response.json(), page, size)
+
+ def response_to_institution_page(
+ self, response: Dict[str, Any], page: int, size: int
+ ) -> InstitutionPage:
+ hits = response.get("hits", {}).get("hits", [])
+
+ ALLOWED_TYPES = {
+ "education",
+ "healthcare",
+ "company",
+ "archive",
+ "nonprofit",
+ "government",
+ "facility",
+ "other",
+ }
+
+ institutions = []
+ for hit in hits:
+ institution = self._convert_hit_to_institution(hit)
+ if institution:
+ institutions.append(institution)
+
+ total = response.get("hits", {}).get("total", {}).get("value", 0)
+ logger.debug(
+ "Parsed institution page: page=%d, size=%d, total=%d", page, size, total
+ )
+ return InstitutionPage(
+ elements=institutions,
+ page=page,
+ size=size,
+ total=total,
+ )
async def get_authors_by_institution_id(self, raw_institution_id: str) -> List[str]:
query = {
@@ -192,3 +303,46 @@ class InstitutionsSearchClient:
)
aliases.append(alias.replace("-", " "))
return aliases
+
+ def _convert_hit_to_institution(self, hit: Dict[str, Any]) -> Optional[Institution]:
+ """Convert an Elasticsearch hit to an Institution object, applying necessary data cleaning and validation.
+
+ Args:
+ hit (Dict[str, Any]): The Elasticsearch hit to convert.
+
+ Returns:
+ Optional[Institution]: The converted Institution object or None if conversion fails.
+ """
+ source = hit.get("_source")
+ if not source:
+ return None
+
+ ALLOWED_TYPES = {
+ "education",
+ "healthcare",
+ "company",
+ "archive",
+ "nonprofit",
+ "government",
+ "facility",
+ "other",
+ }
+
+ cleaned_source = {}
+ for key, value in source.items():
+ if isinstance(value, str) and "T" in value:
+ cleaned_source[key] = value.split("T")[0]
+
+ elif key == "type" and value not in ALLOWED_TYPES:
+ cleaned_source[key] = "other"
+
+ else:
+ cleaned_source[key] = value
+
+ try:
+ return Institution.model_validate(cleaned_source)
+ except Exception as e:
+ logger.exception(
+ "Failed to validate institution hit ID %s: %s", hit.get("_id"), e
+ )
+ return None
diff --git a/service/src/main/inse/institutions/model.py b/service/src/main/inse/institutions/model.py
new file mode 100644
index 00000000..0eaf3c61
--- /dev/null
+++ b/service/src/main/inse/institutions/model.py
@@ -0,0 +1,17 @@
+from typing import List
+
+from pydantic import BaseModel, Field
+
+from inse.models.openalex.institution import Institution
+
+
+class InstitutionPage(BaseModel):
+ elements: List[Institution] = Field(
+ default_factory=list, description="List of institutions in the current page."
+ )
+ page: int = Field(default=0, description="Current page number. (0-indexed)")
+ size: int = Field(default=10, description="Number of institutions per page.")
+ total: int = Field(
+ default=0,
+ description="Total number of institutions matching the search criteria.",
+ )
diff --git a/service/src/main/inse/institutions/service.py b/service/src/main/inse/institutions/router.py
similarity index 72%
rename from service/src/main/inse/institutions/service.py
rename to service/src/main/inse/institutions/router.py
index dd13b718..12ea2664 100644
--- a/service/src/main/inse/institutions/service.py
+++ b/service/src/main/inse/institutions/router.py
@@ -5,7 +5,7 @@ REST API for OpenAlex institutions.
"""
from functools import lru_cache
-from typing import Annotated
+from typing import Annotated, Literal
from fastapi import APIRouter, Depends, status, Query
@@ -14,6 +14,7 @@ from inse.models.openalex.institutions_list_response import InstitutionsListResp
from inse.tags import Tags
from inse.config import get_settings
from inse.models.openalex.institution import Institution
+from inse.institutions.model import InstitutionPage
from . import logic
from inse.institutions.institutions_search_client import InstitutionsSearchClient
@@ -35,6 +36,61 @@ def get_institutions_search_client() -> InstitutionsSearchClient:
)
+@router.get(
+ "/search",
+ summary="Searches for institutions by name.",
+ description="Searches for institutions by name with pagination.",
+ operation_id="searchInstitutionsByName",
+ responses={
+ status.HTTP_200_OK: {
+ "description": "Successful Response",
+ "model": InstitutionPage,
+ },
+ },
+ response_model_exclude_none=True,
+)
+async def search_institutions_by_name(
+ client: Annotated[
+ InstitutionsSearchClient, Depends(get_institutions_search_client)
+ ],
+ name: Annotated[
+ str,
+ Query(
+ description="Institution name to search for, for example 'University of Duisburg Essen'.",
+ ),
+ ] = "",
+ page: Annotated[
+ int,
+ Query(description="Page number (0-indexed).", ge=0),
+ ] = 0,
+ size: Annotated[
+ int,
+ Query(description="Number of institutions per page.", ge=1, le=100),
+ ] = 10,
+ sort_by: Annotated[
+ Literal["relevance", "name", "works_count", "citations_count"],
+ Query(
+ description="Field to sort by, either 'relevance', 'name', 'works_count', or 'citations_count'.",
+ regex="^(relevance|name|works_count|citations_count)$",
+ ),
+ ] = "name",
+ sorting_direction: Annotated[
+ Literal["asc", "desc"],
+ Query(
+ description="Sorting direction, either 'asc' or 'desc'.",
+ regex="^(asc|desc)$",
+ ),
+ ] = "asc",
+) -> InstitutionPage:
+ return await client.get_institutions_by_name(
+ name=name,
+ page=page,
+ size=size,
+ sort_by=sort_by,
+ sorting_direction=sorting_direction,
+ )
+
+
@router.get(
"/{id}",
summary="Returns a single institution by ID.",
diff --git a/service/src/main/inse/main.py b/service/src/main/inse/main.py
index 450a4dd9..3b405f50 100644
--- a/service/src/main/inse/main.py
+++ b/service/src/main/inse/main.py
@@ -11,7 +11,7 @@ from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse, RedirectResponse
from fastapi.middleware.cors import CORSMiddleware
from inse.collaboration_network.router import router as collaboration_network_router
-from inse.institutions.service import router as institutions_service_router
+from inse.institutions.router import router as institutions_router
from inse.topics.service import router as topics_service_router
from inse.works.service import router as works_service_router
from inse.persons.service import router as persons_service_router
@@ -39,7 +39,7 @@ app = FastAPI(
servers=settings.servers,
)
app.include_router(collaboration_network_router)
-app.include_router(institutions_service_router)
+app.include_router(institutions_router)
app.include_router(topics_service_router)
app.include_router(works_service_router)
app.include_router(persons_service_router)
diff --git a/service/src/main/inse/projects/router.py b/service/src/main/inse/projects/router.py
index cf8e2a12..296fd58b 100644
--- a/service/src/main/inse/projects/router.py
+++ b/service/src/main/inse/projects/router.py
@@ -15,7 +15,7 @@ from inse.projects.projects_search_client import (
from inse.institutions.institutions_search_client import (
InstitutionsSearchClient,
)
-from inse.institutions.service import get_institutions_search_client
+from inse.institutions.router import get_institutions_search_client
logger = logging.getLogger(__name__)
diff --git a/ude_person.http b/ude_person.http
index e41036ba..b2bd7353 100644
--- a/ude_person.http
+++ b/ude_person.http
@@ -337,6 +337,11 @@ Content-Type: application/json
# }
# }
+###
+GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_mapping
+Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw==
+Content-Type: application/json
+
###
GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_search
Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw==
@@ -688,6 +693,29 @@ GET https://project.nes.uni-due.de/elastic/openalex-authors/_search
Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ==
Content-Type: application/json
+{
+ "query": {
+ "bool": {
+ "must": [
+ {
+ "prefix": {
+ "display_name.keyword": "Marcus Roth"
+ }
+ },
+ {
+ "nested": {
+ "path": "last_known_institutions",
+ "query": {
+ "match": {
+ "last_known_institutions.display_name": "University of Duisburg-Essen"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
###
@@ -785,6 +813,12 @@ Content-Type: application/json
###
+GET https://project.nes.uni-due.de/elastic/openalex-institutions/_mapping
+Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ==
+Content-Type: application/json
+
+###
+
GET https://project.nes.uni-due.de/elastic/openalex-awards/_search
Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ==
Content-Type: application/json
diff --git a/webapp/src/app/api/.openapi-generator/FILES b/webapp/src/app/api/.openapi-generator/FILES
index 8e08ac07..f01b44f9 100644
--- a/webapp/src/app/api/.openapi-generator/FILES
+++ b/webapp/src/app/api/.openapi-generator/FILES
@@ -67,6 +67,7 @@ model/institutionGeo.ts
model/institutionIds.ts
model/institutionInformation.ts
model/institutionNetworkNode.ts
+model/institutionPage.ts
model/institutionsListResponse.ts
model/item.ts
model/itemCreate.ts
diff --git a/webapp/src/app/api/README.md b/webapp/src/app/api/README.md
index 2df9da7b..dfa7b6e7 100644
--- a/webapp/src/app/api/README.md
+++ b/webapp/src/app/api/README.md
@@ -46,10 +46,10 @@ npm link
In your project:
```console
-npm link
+npm link
```
-**Note for Windows users:** The Angular CLI has troubles to use linked npm packages.
+__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.
Please refer to this issue for a solution / workaround.
Published packages are not effected by this issue.
@@ -58,22 +58,22 @@ Published packages are not effected by this issue.
In your Angular project:
```typescript
+
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
export const appConfig: ApplicationConfig = {
- providers: [
- // ...
- provideHttpClient(),
- provideApi(),
- ],
+ providers: [
+ // ...
+ provideHttpClient(),
+ provideApi()
+ ],
};
```
**NOTE**
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module:
-
```typescript
import { ApiModule } from '';
```
@@ -86,11 +86,11 @@ import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
export const appConfig: ApplicationConfig = {
- providers: [
- // ...
- provideHttpClient(),
- provideApi('http://localhost:9999'),
- ],
+ providers: [
+ // ...
+ provideHttpClient(),
+ provideApi('http://localhost:9999')
+ ],
};
```
@@ -101,15 +101,15 @@ import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
export const appConfig: ApplicationConfig = {
- providers: [
- // ...
- provideHttpClient(),
- provideApi({
- withCredentials: true,
- username: 'user',
- password: 'password',
- }),
- ],
+ providers: [
+ // ...
+ provideHttpClient(),
+ provideApi({
+ withCredentials: true,
+ username: 'user',
+ password: 'password'
+ })
+ ],
};
```
@@ -120,22 +120,21 @@ import { provideHttpClient } from '@angular/common/http';
import { provideApi, Configuration } from '';
export const appConfig: ApplicationConfig = {
- providers: [
- // ...
- provideHttpClient(),
- {
- provide: Configuration,
- useFactory: (authService: AuthService) =>
- new Configuration({
- basePath: 'http://localhost:9999',
- withCredentials: true,
- username: authService.getUsername(),
- password: authService.getPassword(),
- }),
- deps: [AuthService],
- multi: false,
- },
- ],
+ providers: [
+ // ...
+ provideHttpClient(),
+ {
+ provide: Configuration,
+ useFactory: (authService: AuthService) => new Configuration({
+ basePath: 'http://localhost:9999',
+ withCredentials: true,
+ username: authService.getUsername(),
+ password: authService.getPassword(),
+ }),
+ deps: [AuthService],
+ multi: false
+ }
+ ],
};
```
@@ -152,12 +151,12 @@ import { HttpClientModule } from '@angular/common/http';
import { environment } from '../environments/environment';
export const appConfig: ApplicationConfig = {
- providers: [
- // ...
- provideHttpClient(),
- provideUserApi(environment.basePath),
- provideAdminApi(environment.basePath),
- ],
+ providers: [
+ // ...
+ provideHttpClient(),
+ provideUserApi(environment.basePath),
+ provideAdminApi(environment.basePath),
+ ],
};
```
@@ -177,8 +176,8 @@ Example value for use in your Configuration-Provider:
```typescript
new Configuration({
- encodeParam: (param: Param) => myFancyParamEncoder(param),
-});
+ encodeParam: (param: Param) => myFancyParamEncoder(param),
+})
```
[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations
diff --git a/webapp/src/app/api/api.base.service.ts b/webapp/src/app/api/api.base.service.ts
index d9ec8f2e..dcf56358 100644
--- a/webapp/src/app/api/api.base.service.ts
+++ b/webapp/src/app/api/api.base.service.ts
@@ -1,109 +1,83 @@
/**
* 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 {
- HttpHeaders,
- HttpParams,
- HttpParameterCodec,
-} from '@angular/common/http';
+import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
import { CustomHttpParameterCodec } from './encoder';
import { Configuration } from './configuration';
export class BaseService {
- protected basePath = 'http://localhost:8000';
- public defaultHeaders = new HttpHeaders();
- public configuration: Configuration;
- public encoder: HttpParameterCodec;
+ protected basePath = 'http://localhost:8000';
+ public defaultHeaders = new HttpHeaders();
+ public configuration: Configuration;
+ public encoder: HttpParameterCodec;
- constructor(basePath?: string | string[], configuration?: Configuration) {
- this.configuration = configuration || new Configuration();
- if (typeof this.configuration.basePath !== 'string') {
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
- if (firstBasePath != undefined) {
- basePath = firstBasePath;
- }
+ constructor(basePath?: string|string[], configuration?: Configuration) {
+ this.configuration = configuration || new Configuration();
+ if (typeof this.configuration.basePath !== 'string') {
+ const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
+ if (firstBasePath != undefined) {
+ basePath = firstBasePath;
+ }
- if (typeof basePath !== 'string') {
- basePath = this.basePath;
- }
- this.configuration.basePath = basePath;
- }
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
- }
-
- protected canConsumeForm(consumes: string[]): boolean {
- return consumes.indexOf('multipart/form-data') !== -1;
- }
-
- protected addToHttpParams(
- httpParams: HttpParams,
- value: any,
- key?: string,
- isDeep: boolean = false,
- ): HttpParams {
- // If the value is an object (but not a Date), recursively add its keys.
- if (typeof value === 'object' && !(value instanceof Date)) {
- return this.addToHttpParamsRecursive(
- httpParams,
- value,
- isDeep ? key : undefined,
- isDeep,
- );
- }
- return this.addToHttpParamsRecursive(httpParams, value, key);
- }
-
- protected addToHttpParamsRecursive(
- httpParams: HttpParams,
- value?: any,
- key?: string,
- isDeep: boolean = false,
- ): HttpParams {
- if (value === null || value === undefined) {
- return httpParams;
- }
- if (typeof value === 'object') {
- // If JSON format is preferred, key must be provided.
- if (key != null) {
- return isDeep
- ? Object.keys(value as Record).reduce(
- (hp, k) => hp.append(`${key}[${k}]`, value[k]),
- httpParams,
- )
- : httpParams.append(key, JSON.stringify(value));
- }
- // Otherwise, if it's an array, add each element.
- if (Array.isArray(value)) {
- value.forEach(
- (elem) =>
- (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)),
- );
- } else if (value instanceof Date) {
- if (key != null) {
- httpParams = httpParams.append(key, value.toISOString());
- } else {
- throw Error('key may not be null if value is Date');
+ if (typeof basePath !== 'string') {
+ basePath = this.basePath;
+ }
+ this.configuration.basePath = basePath;
}
- } else {
- Object.keys(value).forEach((k) => {
- const paramKey = key ? `${key}.${k}` : k;
- httpParams = this.addToHttpParamsRecursive(
- httpParams,
- value[k],
- paramKey,
- );
- });
- }
- return httpParams;
- } else if (key != null) {
- return httpParams.append(key, value);
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
+ }
+
+ protected canConsumeForm(consumes: string[]): boolean {
+ return consumes.indexOf('multipart/form-data') !== -1;
+ }
+
+ protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
+ // If the value is an object (but not a Date), recursively add its keys.
+ if (typeof value === 'object' && !(value instanceof Date)) {
+ return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
+ }
+ return this.addToHttpParamsRecursive(httpParams, value, key);
+ }
+
+ protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
+ if (value === null || value === undefined) {
+ return httpParams;
+ }
+ if (typeof value === 'object') {
+ // If JSON format is preferred, key must be provided.
+ if (key != null) {
+ return isDeep
+ ? Object.keys(value as Record).reduce(
+ (hp, k) => hp.append(`${key}[${k}]`, value[k]),
+ httpParams,
+ )
+ : httpParams.append(key, JSON.stringify(value));
+ }
+ // Otherwise, if it's an array, add each element.
+ if (Array.isArray(value)) {
+ value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
+ } else if (value instanceof Date) {
+ if (key != null) {
+ httpParams = httpParams.append(key, value.toISOString());
+ } else {
+ throw Error("key may not be null if value is Date");
+ }
+ } else {
+ Object.keys(value).forEach(k => {
+ const paramKey = key ? `${key}.${k}` : k;
+ httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey);
+ });
+ }
+ return httpParams;
+ } else if (key != null) {
+ return httpParams.append(key, value);
+ }
+ throw Error("key may not be null if value is not object or array");
}
- throw Error('key may not be null if value is not object or array');
- }
}
diff --git a/webapp/src/app/api/api.module.ts b/webapp/src/app/api/api.module.ts
index e29250f2..58d341fb 100644
--- a/webapp/src/app/api/api.module.ts
+++ b/webapp/src/app/api/api.module.ts
@@ -1,42 +1,30 @@
-import {
- NgModule,
- ModuleWithProviders,
- SkipSelf,
- Optional,
-} from '@angular/core';
+import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
import { Configuration } from './configuration';
import { HttpClient } from '@angular/common/http';
+
@NgModule({
- imports: [],
+ imports: [],
declarations: [],
- exports: [],
- providers: [],
+ exports: [],
+ providers: []
})
export class ApiModule {
- public static forRoot(
- configurationFactory: () => Configuration,
- ): ModuleWithProviders {
- return {
- ngModule: ApiModule,
- providers: [{ provide: Configuration, useFactory: configurationFactory }],
- };
- }
+ public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders {
+ return {
+ ngModule: ApiModule,
+ providers: [ { provide: Configuration, useFactory: configurationFactory } ]
+ };
+ }
- constructor(
- @Optional() @SkipSelf() parentModule: ApiModule,
- @Optional() http: HttpClient,
- ) {
- if (parentModule) {
- throw new Error(
- 'ApiModule is already loaded. Import in your base AppModule only.',
- );
+ constructor( @Optional() @SkipSelf() parentModule: ApiModule,
+ @Optional() http: HttpClient) {
+ if (parentModule) {
+ throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
+ }
+ if (!http) {
+ throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
+ 'See also https://github.com/angular/angular/issues/20575');
+ }
}
- if (!http) {
- throw new Error(
- 'You need to import the HttpClientModule in your AppModule! \n' +
- 'See also https://github.com/angular/angular/issues/20575',
- );
- }
- }
}
diff --git a/webapp/src/app/api/api/api.ts b/webapp/src/app/api/api/api.ts
index 559a00bc..5406f421 100644
--- a/webapp/src/app/api/api/api.ts
+++ b/webapp/src/app/api/api/api.ts
@@ -18,15 +18,4 @@ export * from './topics.service';
import { TopicsService } from './topics.service';
export * from './works.service';
import { WorksService } from './works.service';
-export const APIS = [
- FundingService,
- INSEAccountServiceService,
- INSEServiceService,
- InstitutionsService,
- ItemsService,
- PersonNetworkService,
- PersonsService,
- ProjectsService,
- TopicsService,
- WorksService,
-];
+export const APIS = [FundingService, INSEAccountServiceService, INSEServiceService, InstitutionsService, ItemsService, PersonNetworkService, PersonsService, ProjectsService, TopicsService, WorksService];
diff --git a/webapp/src/app/api/api/funding.service.ts b/webapp/src/app/api/api/funding.service.ts
index f1f0a1a7..46772768 100644
--- a/webapp/src/app/api/api/funding.service.ts
+++ b/webapp/src/app/api/api/funding.service.ts
@@ -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,12 @@
*/
/* 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 { FundersByAuthorResponse } from '../model/fundersByAuthorResponse';
@@ -30,246 +24,138 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
import { PublicationsByAuthorResponse } from '../model/publicationsByAuthorResponse';
// @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 FundingService extends BaseService {
- constructor(
- protected httpClient: HttpClient,
- @Optional() @Inject(BASE_PATH) basePath: string | string[],
- @Optional() configuration?: Configuration,
- ) {
- super(basePath, configuration);
- }
- /**
- * Get funding organizations by author.
- * @endpoint get /api/inse-service/authors/{author_id}/funders
- * @param authorId
- * @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 getFundersByAuthor(
- authorId: string,
- observe?: 'body',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable;
- public getFundersByAuthor(
- authorId: string,
- observe?: 'response',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public getFundersByAuthor(
- authorId: string,
- observe?: 'events',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public getFundersByAuthor(
- authorId: string,
- observe: any = 'body',
- reportProgress: boolean = false,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable {
- if (authorId === null || authorId === undefined) {
- throw new Error(
- 'Required parameter authorId was null or undefined when calling getFundersByAuthor.',
- );
+ constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
+ super(basePath, configuration);
}
- let localVarHeaders = this.defaultHeaders;
+ /**
+ * Get funding organizations by author.
+ * @endpoint get /api/inse-service/authors/{author_id}/funders
+ * @param authorId
+ * @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 getFundersByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getFundersByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getFundersByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getFundersByAuthor(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (authorId === null || authorId === undefined) {
+ throw new Error('Required parameter authorId was null or undefined when calling getFundersByAuthor.');
+ }
- const localVarHttpHeaderAcceptSelected: string | undefined =
- options?.httpHeaderAccept ??
- this.configuration.selectHeaderAccept(['application/json']);
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set(
- 'Accept',
- localVarHttpHeaderAcceptSelected,
- );
+ 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/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/funders`;
+ const { basePath, withCredentials } = this.configuration;
+ return this.httpClient.request('get', `${basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ ...(withCredentials ? { withCredentials } : {}),
+ headers: localVarHeaders,
+ observe: observe,
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
+ reportProgress: reportProgress
+ }
+ );
}
- const localVarHttpContext: HttpContext =
- options?.context ?? new HttpContext();
+ /**
+ * Get funded publications by author.
+ * @endpoint get /api/inse-service/authors/{author_id}/publications
+ * @param authorId
+ * @param page
+ * @param pageSize
+ * @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 getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (authorId === null || authorId === undefined) {
+ throw new Error('Required parameter authorId was null or undefined when calling getPublicationsByAuthor.');
+ }
- const localVarTransferCache: boolean = options?.transferCache ?? true;
+ let localVarQueryParameters = new HttpParams({encoder: this.encoder});
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
+ page, 'page');
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
+ pageSize, 'page_size');
- 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 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/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/publications`;
+ const { basePath, withCredentials } = this.configuration;
+ return this.httpClient.request('get', `${basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ params: localVarQueryParameters,
+ responseType: responseType_,
+ ...(withCredentials ? { withCredentials } : {}),
+ headers: localVarHeaders,
+ observe: observe,
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
+ reportProgress: reportProgress
+ }
+ );
}
- let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/funders`;
- const { basePath, withCredentials } = this.configuration;
- return this.httpClient.request(
- 'get',
- `${basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- ...(withCredentials ? { withCredentials } : {}),
- headers: localVarHeaders,
- observe: observe,
- ...(localVarTransferCache !== undefined
- ? { transferCache: localVarTransferCache }
- : {}),
- reportProgress: reportProgress,
- },
- );
- }
-
- /**
- * Get funded publications by author.
- * @endpoint get /api/inse-service/authors/{author_id}/publications
- * @param authorId
- * @param page
- * @param pageSize
- * @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 getPublicationsByAuthor(
- authorId: string,
- page?: number,
- pageSize?: number,
- observe?: 'body',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable;
- public getPublicationsByAuthor(
- authorId: string,
- page?: number,
- pageSize?: number,
- observe?: 'response',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public getPublicationsByAuthor(
- authorId: string,
- page?: number,
- pageSize?: number,
- observe?: 'events',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public getPublicationsByAuthor(
- authorId: string,
- page?: number,
- pageSize?: number,
- observe: any = 'body',
- reportProgress: boolean = false,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable {
- if (authorId === null || authorId === undefined) {
- throw new Error(
- 'Required parameter authorId was null or undefined when calling getPublicationsByAuthor.',
- );
- }
-
- let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
- localVarQueryParameters = this.addToHttpParams(
- localVarQueryParameters,
- page,
- 'page',
- );
- localVarQueryParameters = this.addToHttpParams(
- localVarQueryParameters,
- pageSize,
- 'page_size',
- );
-
- 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/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/publications`;
- const { basePath, withCredentials } = this.configuration;
- return this.httpClient.request(
- 'get',
- `${basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- params: localVarQueryParameters,
- responseType: responseType_,
- ...(withCredentials ? { withCredentials } : {}),
- headers: localVarHeaders,
- observe: observe,
- ...(localVarTransferCache !== undefined
- ? { transferCache: localVarTransferCache }
- : {}),
- reportProgress: reportProgress,
- },
- );
- }
}
diff --git a/webapp/src/app/api/api/iNSEAccountService.service.ts b/webapp/src/app/api/api/iNSEAccountService.service.ts
index 116f1dd4..7b43eaa5 100644
--- a/webapp/src/app/api/api/iNSEAccountService.service.ts
+++ b/webapp/src/app/api/api/iNSEAccountService.service.ts
@@ -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,12 @@
*/
/* 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 { AccessGrant } from '../model/accessGrant';
@@ -30,314 +24,190 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
import { IdentityGrant } from '../model/identityGrant';
// @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 INSEAccountServiceService extends BaseService {
- constructor(
- protected httpClient: HttpClient,
- @Optional() @Inject(BASE_PATH) basePath: string | string[],
- @Optional() configuration?: Configuration,
- ) {
- super(basePath, configuration);
- }
- /**
- * Get Access Grant
- * @endpoint post /inse-account/auth/access
- * @param secret
- * @param account
- * @param organization
- * @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 getAccessGrantInseAccountAuthAccessPost(
- secret: string,
- account: number,
- organization: number,
- observe?: 'body',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable;
- public getAccessGrantInseAccountAuthAccessPost(
- secret: string,
- account: number,
- organization: number,
- observe?: 'response',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public getAccessGrantInseAccountAuthAccessPost(
- secret: string,
- account: number,
- organization: number,
- observe?: 'events',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public getAccessGrantInseAccountAuthAccessPost(
- secret: string,
- account: number,
- organization: number,
- observe: any = 'body',
- reportProgress: boolean = false,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable {
- if (secret === null || secret === undefined) {
- throw new Error(
- 'Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
- );
- }
- if (account === null || account === undefined) {
- throw new Error(
- 'Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
- );
- }
- if (organization === null || organization === undefined) {
- throw new Error(
- 'Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
- );
+ constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
+ super(basePath, configuration);
}
- let localVarHeaders = this.defaultHeaders;
+ /**
+ * Get Access Grant
+ * @endpoint post /inse-account/auth/access
+ * @param secret
+ * @param account
+ * @param organization
+ * @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 getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (secret === null || secret === undefined) {
+ throw new Error('Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.');
+ }
+ if (account === null || account === undefined) {
+ throw new Error('Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.');
+ }
+ if (organization === null || organization === undefined) {
+ throw new Error('Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.');
+ }
- const localVarHttpHeaderAcceptSelected: string | undefined =
- options?.httpHeaderAccept ??
- this.configuration.selectHeaderAccept(['application/json']);
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set(
- 'Accept',
- localVarHttpHeaderAcceptSelected,
- );
+ 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/x-www-form-urlencoded'
+ ];
+
+ const canConsumeForm = this.canConsumeForm(consumes);
+
+ let localVarFormParams: { append(param: string, value: any): any; };
+ let localVarUseForm = false;
+ let localVarConvertFormParamsToString = false;
+ if (localVarUseForm) {
+ localVarFormParams = new FormData();
+ } else {
+ localVarFormParams = new HttpParams({encoder: this.encoder});
+ }
+
+ if (secret !== undefined) {
+ localVarFormParams = localVarFormParams.append('secret', secret) as any || localVarFormParams;
+ }
+ if (account !== undefined) {
+ localVarFormParams = localVarFormParams.append('account', account) as any || localVarFormParams;
+ }
+ if (organization !== undefined) {
+ localVarFormParams = localVarFormParams.append('organization', organization) as any || localVarFormParams;
+ }
+
+ 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 = `/inse-account/auth/access`;
+ const { basePath, withCredentials } = this.configuration;
+ return this.httpClient.request('post', `${basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
+ responseType: responseType_,
+ ...(withCredentials ? { withCredentials } : {}),
+ headers: localVarHeaders,
+ observe: observe,
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
+ reportProgress: reportProgress
+ }
+ );
}
- const localVarHttpContext: HttpContext =
- options?.context ?? new HttpContext();
+ /**
+ * Get Identity Grant
+ * @endpoint post /inse-account/auth/id
+ * @param username
+ * @param password
+ * @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 getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (username === null || username === undefined) {
+ throw new Error('Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.');
+ }
+ if (password === null || password === undefined) {
+ throw new Error('Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.');
+ }
- const localVarTransferCache: boolean = options?.transferCache ?? true;
+ let localVarHeaders = this.defaultHeaders;
- // to determine the Content-Type header
- const consumes: string[] = ['application/x-www-form-urlencoded'];
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
+ 'application/json'
+ ]);
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
- const canConsumeForm = this.canConsumeForm(consumes);
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
- let localVarFormParams: { append(param: string, value: any): any };
- let localVarUseForm = false;
- let localVarConvertFormParamsToString = false;
- if (localVarUseForm) {
- localVarFormParams = new FormData();
- } else {
- localVarFormParams = new HttpParams({ encoder: this.encoder });
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
+
+ // to determine the Content-Type header
+ const consumes: string[] = [
+ 'application/x-www-form-urlencoded'
+ ];
+
+ const canConsumeForm = this.canConsumeForm(consumes);
+
+ let localVarFormParams: { append(param: string, value: any): any; };
+ let localVarUseForm = false;
+ let localVarConvertFormParamsToString = false;
+ if (localVarUseForm) {
+ localVarFormParams = new FormData();
+ } else {
+ localVarFormParams = new HttpParams({encoder: this.encoder});
+ }
+
+ if (username !== undefined) {
+ localVarFormParams = localVarFormParams.append('username', username) as any || localVarFormParams;
+ }
+ if (password !== undefined) {
+ localVarFormParams = localVarFormParams.append('password', password) as any || localVarFormParams;
+ }
+
+ 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 = `/inse-account/auth/id`;
+ const { basePath, withCredentials } = this.configuration;
+ return this.httpClient.request('post', `${basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
+ responseType: responseType_,
+ ...(withCredentials ? { withCredentials } : {}),
+ headers: localVarHeaders,
+ observe: observe,
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
+ reportProgress: reportProgress
+ }
+ );
}
- if (secret !== undefined) {
- localVarFormParams =
- (localVarFormParams.append('secret', secret) as any) ||
- localVarFormParams;
- }
- if (account !== undefined) {
- localVarFormParams =
- (localVarFormParams.append('account', account) as any) ||
- localVarFormParams;
- }
- if (organization !== undefined) {
- localVarFormParams =
- (localVarFormParams.append('organization', organization) as any) ||
- localVarFormParams;
- }
-
- 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 = `/inse-account/auth/access`;
- const { basePath, withCredentials } = this.configuration;
- return this.httpClient.request(
- 'post',
- `${basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: localVarConvertFormParamsToString
- ? localVarFormParams.toString()
- : localVarFormParams,
- responseType: responseType_,
- ...(withCredentials ? { withCredentials } : {}),
- headers: localVarHeaders,
- observe: observe,
- ...(localVarTransferCache !== undefined
- ? { transferCache: localVarTransferCache }
- : {}),
- reportProgress: reportProgress,
- },
- );
- }
-
- /**
- * Get Identity Grant
- * @endpoint post /inse-account/auth/id
- * @param username
- * @param password
- * @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 getIdentityGrantInseAccountAuthIdPost(
- username: string,
- password: string,
- observe?: 'body',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable;
- public getIdentityGrantInseAccountAuthIdPost(
- username: string,
- password: string,
- observe?: 'response',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public getIdentityGrantInseAccountAuthIdPost(
- username: string,
- password: string,
- observe?: 'events',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public getIdentityGrantInseAccountAuthIdPost(
- username: string,
- password: string,
- observe: any = 'body',
- reportProgress: boolean = false,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable {
- if (username === null || username === undefined) {
- throw new Error(
- 'Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.',
- );
- }
- if (password === null || password === undefined) {
- throw new Error(
- 'Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.',
- );
- }
-
- 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/x-www-form-urlencoded'];
-
- const canConsumeForm = this.canConsumeForm(consumes);
-
- let localVarFormParams: { append(param: string, value: any): any };
- let localVarUseForm = false;
- let localVarConvertFormParamsToString = false;
- if (localVarUseForm) {
- localVarFormParams = new FormData();
- } else {
- localVarFormParams = new HttpParams({ encoder: this.encoder });
- }
-
- if (username !== undefined) {
- localVarFormParams =
- (localVarFormParams.append('username', username) as any) ||
- localVarFormParams;
- }
- if (password !== undefined) {
- localVarFormParams =
- (localVarFormParams.append('password', password) as any) ||
- localVarFormParams;
- }
-
- 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 = `/inse-account/auth/id`;
- const { basePath, withCredentials } = this.configuration;
- return this.httpClient.request(
- 'post',
- `${basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: localVarConvertFormParamsToString
- ? localVarFormParams.toString()
- : localVarFormParams,
- responseType: responseType_,
- ...(withCredentials ? { withCredentials } : {}),
- headers: localVarHeaders,
- observe: observe,
- ...(localVarTransferCache !== undefined
- ? { transferCache: localVarTransferCache }
- : {}),
- reportProgress: reportProgress,
- },
- );
- }
}
diff --git a/webapp/src/app/api/api/iNSEService.service.ts b/webapp/src/app/api/api/iNSEService.service.ts
index 8788adee..cf95d68e 100644
--- a/webapp/src/app/api/api/iNSEService.service.ts
+++ b/webapp/src/app/api/api/iNSEService.service.ts
@@ -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,12 @@
*/
/* 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';
@@ -32,922 +26,513 @@ import { ItemCreate } from '../model/itemCreate';
import { ItemPage } from '../model/itemPage';
// @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 INSEServiceService extends BaseService {
- constructor(
- protected httpClient: HttpClient,
- @Optional() @Inject(BASE_PATH) basePath: string | string[],
- @Optional() configuration?: Configuration,
- ) {
- super(basePath, configuration);
- }
- /**
- * Adds a new item.
- * @endpoint post /api/inse-service/items
- * @param itemCreate
- * @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 addItem(
- itemCreate: ItemCreate,
- observe?: 'body',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable- ;
- public addItem(
- itemCreate: ItemCreate,
- observe?: 'response',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public addItem(
- itemCreate: ItemCreate,
- observe?: 'events',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable>;
- public addItem(
- itemCreate: ItemCreate,
- observe: any = 'body',
- reportProgress: boolean = false,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable {
- if (itemCreate === null || itemCreate === undefined) {
- throw new Error(
- 'Required parameter itemCreate was null or undefined when calling addItem.',
- );
+ constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
+ super(basePath, configuration);
}
- let localVarHeaders = this.defaultHeaders;
+ /**
+ * Adds a new item.
+ * @endpoint post /api/inse-service/items
+ * @param itemCreate
+ * @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 addItem(itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable
- ;
+ public addItem(itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public addItem(itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public addItem(itemCreate: ItemCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (itemCreate === null || itemCreate === undefined) {
+ throw new Error('Required parameter itemCreate was null or undefined when calling addItem.');
+ }
- // authentication (bearer) required
- localVarHeaders = this.configuration.addCredentialToHeaders(
- 'bearer',
- 'Authorization',
- localVarHeaders,
- 'Bearer ',
- );
+ let localVarHeaders = this.defaultHeaders;
- const localVarHttpHeaderAcceptSelected: string | undefined =
- options?.httpHeaderAccept ??
- this.configuration.selectHeaderAccept(['application/json']);
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set(
- 'Accept',
- localVarHttpHeaderAcceptSelected,
- );
- }
+ // authentication (bearer) required
+ localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
- const localVarHttpContext: HttpContext =
- options?.context ?? new HttpContext();
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
+ 'application/json'
+ ]);
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
- const localVarTransferCache: boolean = options?.transferCache ?? true;
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
- // 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,
- );
- }
+ 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/inse-service/items`;
- const { basePath, withCredentials } = this.configuration;
- return this.httpClient.request
- ('post', `${basePath}${localVarPath}`, {
- context: localVarHttpContext,
- body: itemCreate,
- responseType: 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);
+ }
- /**
- * Builds the topic hierarchy cache.
- * @endpoint get /api/inse-service/topics/cache
- * @param pageSize Page size for each search page.
- * @param saveJson Persist cache JSON to data folder.
- * @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 buildTopicCache(
- pageSize?: number,
- saveJson?: boolean,
- observe?: 'body',
- reportProgress?: boolean,
- options?: {
- httpHeaderAccept?: 'application/json';
- context?: HttpContext;
- transferCache?: boolean;
- },
- ): Observable