@ts4nfdi/terminology-service-suite 5.4.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/api/OntoPortalApi.js +151 -0
- package/dist/esm/api/OntoPortalApi.js.map +1 -0
- package/dist/esm/api/SkosApi.js +187 -0
- package/dist/esm/api/SkosApi.js.map +1 -0
- package/dist/esm/api/ols/OlsBaseApi.d.ts +6 -0
- package/dist/esm/api/ols/OlsBaseApi.js +24 -0
- package/dist/esm/api/ols/OlsBaseApi.js.map +1 -0
- package/dist/esm/api/ols/OlsEntityApi.d.ts +82 -0
- package/dist/esm/api/ols/OlsEntityApi.js +232 -0
- package/dist/esm/api/ols/OlsEntityApi.js.map +1 -0
- package/dist/esm/api/ols/OlsHierarchyApi.d.ts +38 -0
- package/dist/esm/api/ols/OlsHierarchyApi.js +469 -0
- package/dist/esm/api/ols/OlsHierarchyApi.js.map +1 -0
- package/dist/esm/api/ols/OlsOntologyApi.d.ts +22 -0
- package/dist/esm/api/ols/OlsOntologyApi.js +78 -0
- package/dist/esm/api/ols/OlsOntologyApi.js.map +1 -0
- package/dist/esm/api/ols/OlsSearchApi.d.ts +17 -0
- package/dist/esm/api/ols/OlsSearchApi.js +66 -0
- package/dist/esm/api/ols/OlsSearchApi.js.map +1 -0
- package/dist/esm/api/ols/OlsThingApi.d.ts +11 -0
- package/dist/esm/api/ols/OlsThingApi.js +59 -0
- package/dist/esm/api/ols/OlsThingApi.js.map +1 -0
- package/dist/esm/{types/app → app}/globals.d.ts +1 -1
- package/dist/esm/{types/app → app}/types.d.ts +11 -4
- package/dist/esm/app/util.js +134 -0
- package/dist/esm/app/util.js.map +1 -0
- package/dist/esm/{types/app → app}/widgetDescriptions.d.ts +1 -0
- package/dist/esm/{types/components → components}/index.d.ts +1 -0
- package/dist/esm/components/server/BreadcrumbData.d.ts +9 -0
- package/dist/esm/components/server/BreadcrumbData.js +13 -0
- package/dist/esm/components/server/BreadcrumbData.js.map +1 -0
- package/dist/esm/components/server/index.d.ts +1 -0
- package/dist/esm/components/widgets/AutocompleteWidget/AutocompleteWidget.js +373 -0
- package/dist/esm/components/widgets/AutocompleteWidget/AutocompleteWidget.js.map +1 -0
- package/dist/esm/components/widgets/DataContentWidget/DataContentWidget.js +49 -0
- package/dist/esm/components/widgets/DataContentWidget/DataContentWidget.js.map +1 -0
- package/dist/esm/components/widgets/EntityInfoWidget/EntityInfoWidget.js +310 -0
- package/dist/esm/components/widgets/EntityInfoWidget/EntityInfoWidget.js.map +1 -0
- package/dist/esm/components/widgets/EntityRelationsWidget/EntityRelationsWidget.js +363 -0
- package/dist/esm/components/widgets/EntityRelationsWidget/EntityRelationsWidget.js.map +1 -0
- package/dist/esm/components/widgets/GraphViewWidget/GraphViewWidget.js +395 -0
- package/dist/esm/components/widgets/GraphViewWidget/GraphViewWidget.js.map +1 -0
- package/dist/esm/components/widgets/JsonApiWidget/JsonApiWidget.js +22 -0
- package/dist/esm/components/widgets/JsonApiWidget/JsonApiWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.d.ts +6 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.js +41 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.stories.d.ts +107 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentationHTML.stories.d.ts +107 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentationStories.d.ts +111 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.js +49 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.js.map +1 -0
- package/dist/esm/{types/components → components}/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidgetStories.d.ts +16 -0
- package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/index.d.ts +2 -0
- package/dist/esm/components/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.js +21 -0
- package/dist/esm/components/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.js +29 -0
- package/dist/esm/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.js +39 -0
- package/dist/esm/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.js +54 -0
- package/dist/esm/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.js +39 -0
- package/dist/esm/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.js +59 -0
- package/dist/esm/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/IriWidget/IriWidget.js +54 -0
- package/dist/esm/components/widgets/MetadataWidget/IriWidget/IriWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/MetadataWidget.js +93 -0
- package/dist/esm/components/widgets/MetadataWidget/MetadataWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.js +25 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.js +41 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.js +26 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.js +36 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.js.map +1 -0
- package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.d.ts +0 -7
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.js +168 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/TabPresentation.js +91 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/TabPresentation.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/TabWidget.js +36 -0
- package/dist/esm/components/widgets/MetadataWidget/TabWidget/TabWidget.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/TitleWidget/TitlePresentation.js +38 -0
- package/dist/esm/components/widgets/MetadataWidget/TitleWidget/TitlePresentation.js.map +1 -0
- package/dist/esm/components/widgets/MetadataWidget/TitleWidget/TitleWidget.js +29 -0
- package/dist/esm/components/widgets/MetadataWidget/TitleWidget/TitleWidget.js.map +1 -0
- package/dist/esm/components/widgets/OntologyInfoWidget/OntologyInfoWidget.js +98 -0
- package/dist/esm/components/widgets/OntologyInfoWidget/OntologyInfoWidget.js.map +1 -0
- package/dist/esm/components/widgets/ResourcesWidget/ResourcesWidget.js +285 -0
- package/dist/esm/components/widgets/ResourcesWidget/ResourcesWidget.js.map +1 -0
- package/dist/esm/components/widgets/SearchBarWidget/SearchBarWidget.js +84 -0
- package/dist/esm/components/widgets/SearchBarWidget/SearchBarWidget.js.map +1 -0
- package/dist/esm/components/widgets/SearchResultsListWidget/MetadataCompact.js +80 -0
- package/dist/esm/components/widgets/SearchResultsListWidget/MetadataCompact.js.map +1 -0
- package/dist/esm/components/widgets/SearchResultsListWidget/SearchResultsListWidget.js +224 -0
- package/dist/esm/components/widgets/SearchResultsListWidget/SearchResultsListWidget.js.map +1 -0
- package/dist/esm/components/widgets/TermDepictionWidget/TermDepictionWidget.js +44 -0
- package/dist/esm/components/widgets/TermDepictionWidget/TermDepictionWidget.js.map +1 -0
- package/dist/esm/{types/components → components}/widgets/index.d.ts +2 -1
- package/dist/esm/components/widgets/index.js +73 -0
- package/dist/esm/components/widgets/index.js.map +1 -0
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +25 -6325
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model/LinkedEntities.js +32 -0
- package/dist/esm/model/LinkedEntities.js.map +1 -0
- package/dist/esm/model/ModelObjectCreator.js +100 -0
- package/dist/esm/model/ModelObjectCreator.js.map +1 -0
- package/dist/esm/model/ModelTypeCheck.js +57 -0
- package/dist/esm/model/ModelTypeCheck.js.map +1 -0
- package/dist/esm/model/Reified.js +57 -0
- package/dist/esm/model/Reified.js.map +1 -0
- package/dist/esm/model/StructureRendering.js +524 -0
- package/dist/esm/model/StructureRendering.js.map +1 -0
- package/dist/esm/model/interfaces/Hierarchy.js +155 -0
- package/dist/esm/model/interfaces/Hierarchy.js.map +1 -0
- package/dist/esm/model/ols-model/OLSSelect.js +12 -0
- package/dist/esm/model/ols-model/OLSSelect.js.map +1 -0
- package/dist/esm/model/ols-model/OLSSelectResult.js +57 -0
- package/dist/esm/model/ols-model/OLSSelectResult.js.map +1 -0
- package/dist/esm/model/ols3-model/OLS3Class.js +38 -0
- package/dist/esm/model/ols3-model/OLS3Class.js.map +1 -0
- package/dist/esm/model/ols3-model/OLS3Entity.js +125 -0
- package/dist/esm/model/ols3-model/OLS3Entity.js.map +1 -0
- package/dist/esm/model/ols3-model/OLS3Individual.js +36 -0
- package/dist/esm/model/ols3-model/OLS3Individual.js.map +1 -0
- package/dist/esm/model/ols3-model/OLS3Ontologies.js +24 -0
- package/dist/esm/model/ols3-model/OLS3Ontologies.js.map +1 -0
- package/dist/esm/model/ols3-model/OLS3Ontology.js +132 -0
- package/dist/esm/model/ols3-model/OLS3Ontology.js.map +1 -0
- package/dist/esm/model/ols3-model/OLS3Property.js +36 -0
- package/dist/esm/model/ols3-model/OLS3Property.js.map +1 -0
- package/dist/esm/model/ols3-model/OLS3Thing.js +73 -0
- package/dist/esm/model/ols3-model/OLS3Thing.js.map +1 -0
- package/dist/esm/model/ols4-model/OLS4Class.js +27 -0
- package/dist/esm/model/ols4-model/OLS4Class.js.map +1 -0
- package/dist/esm/model/ols4-model/OLS4Entity.js +154 -0
- package/dist/esm/model/ols4-model/OLS4Entity.js.map +1 -0
- package/dist/esm/model/ols4-model/OLS4Individual.js +33 -0
- package/dist/esm/model/ols4-model/OLS4Individual.js.map +1 -0
- package/dist/esm/model/ols4-model/OLS4Ontologies.js +24 -0
- package/dist/esm/model/ols4-model/OLS4Ontologies.js.map +1 -0
- package/dist/esm/model/ols4-model/OLS4Ontology.js +118 -0
- package/dist/esm/model/ols4-model/OLS4Ontology.js.map +1 -0
- package/dist/esm/model/ols4-model/OLS4Property.js +33 -0
- package/dist/esm/model/ols4-model/OLS4Property.js.map +1 -0
- package/dist/esm/model/ols4-model/OLS4Thing.js +104 -0
- package/dist/esm/model/ols4-model/OLS4Thing.js.map +1 -0
- package/dist/esm/model/ts4nfdi-model/Ts4nfdiSearchResult.js +57 -0
- package/dist/esm/model/ts4nfdi-model/Ts4nfdiSearchResult.js.map +1 -0
- package/dist/esm/{types/stories → stories}/storyArgs.d.ts +6 -1
- package/dist/esm/utils/olsApiTypes.d.ts +54 -0
- package/dist/esm/utils/olsApiUtils.d.ts +15 -0
- package/dist/esm/utils/olsApiUtils.js +140 -0
- package/dist/esm/utils/olsApiUtils.js.map +1 -0
- package/dist/server/32px.png +0 -0
- package/dist/server/api/HierarchyBuilder.d.ts +26 -0
- package/dist/server/api/OntoPortalApi.d.ts +11 -0
- package/dist/server/api/SkosApi.d.ts +10 -0
- package/dist/server/api/ols/OlsBaseApi.d.ts +6 -0
- package/dist/server/api/ols/OlsEntityApi.d.ts +82 -0
- package/dist/server/api/ols/OlsHierarchyApi.d.ts +38 -0
- package/dist/server/api/ols/OlsOntologyApi.d.ts +22 -0
- package/dist/server/api/ols/OlsSearchApi.d.ts +17 -0
- package/dist/server/api/ols/OlsThingApi.d.ts +11 -0
- package/dist/server/app/globals.d.ts +9 -0
- package/dist/server/app/index.d.ts +1 -0
- package/dist/server/app/types.d.ts +533 -0
- package/dist/server/app/util.d.ts +44 -0
- package/dist/server/app/widgetDescriptions.d.ts +23 -0
- package/dist/server/components/index.d.ts +2 -0
- package/dist/server/components/server/BreadcrumbData.d.ts +9 -0
- package/dist/server/components/server/index.d.ts +1 -0
- package/dist/server/components/widgets/AutocompleteWidget/AutocompleteWidget.d.ts +10 -0
- package/dist/server/components/widgets/AutocompleteWidget/AutocompleteWidget.stories.d.ts +119 -0
- package/dist/server/components/widgets/AutocompleteWidget/AutocompleteWidgetHTML.stories.d.ts +121 -0
- package/dist/server/components/widgets/AutocompleteWidget/AutocompleteWidgetStories.d.ts +274 -0
- package/dist/server/components/widgets/AutocompleteWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/DataContentWidget/DataContentWidget.d.ts +5 -0
- package/dist/server/components/widgets/DataContentWidget/DataContentWidget.stories.d.ts +42 -0
- package/dist/server/components/widgets/DataContentWidget/DataContentWidgetHTML.stories.d.ts +44 -0
- package/dist/server/components/widgets/DataContentWidget/DataContentWidgetStories.d.ts +45 -0
- package/dist/server/components/widgets/DataContentWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/EntityInfoWidget/EntityInfoWidget.d.ts +5 -0
- package/dist/server/components/widgets/EntityInfoWidget/EntityInfoWidget.stories.d.ts +187 -0
- package/dist/server/components/widgets/EntityInfoWidget/EntityInfoWidgetHTML.stories.d.ts +186 -0
- package/dist/server/components/widgets/EntityInfoWidget/EntityInfoWidgetStories.d.ts +250 -0
- package/dist/server/components/widgets/EntityInfoWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/EntityRelationsWidget/EntityRelationsWidget.d.ts +5 -0
- package/dist/server/components/widgets/EntityRelationsWidget/EntityRelationsWidget.stories.d.ts +176 -0
- package/dist/server/components/widgets/EntityRelationsWidget/EntityRelationsWidgetHTML.stories.d.ts +175 -0
- package/dist/server/components/widgets/EntityRelationsWidget/EntityRelationsWidgetStories.d.ts +248 -0
- package/dist/server/components/widgets/EntityRelationsWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/GraphViewWidget/GraphViewWidget.d.ts +6 -0
- package/dist/server/components/widgets/GraphViewWidget/GraphViewWidget.stories.d.ts +65 -0
- package/dist/server/components/widgets/GraphViewWidget/GraphViewWidgetHTML.stories.d.ts +68 -0
- package/dist/server/components/widgets/GraphViewWidget/GraphViewWidgetStories.d.ts +126 -0
- package/dist/server/components/widgets/GraphViewWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/JsonApiWidget/JsonApiWidget.d.ts +5 -0
- package/dist/server/components/widgets/JsonApiWidget/JsonApiWidget.stories.d.ts +52 -0
- package/dist/server/components/widgets/JsonApiWidget/JsonApiWidgetHTML.stories.d.ts +54 -0
- package/dist/server/components/widgets/JsonApiWidget/JsonApiWidgetStories.d.ts +44 -0
- package/dist/server/components/widgets/JsonApiWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.d.ts +6 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.stories.d.ts +107 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentationHTML.stories.d.ts +107 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentationStories.d.ts +111 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.stories.d.ts +143 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidgetHTML.stories.d.ts +143 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidgetStories.d.ts +198 -0
- package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/index.d.ts +2 -0
- package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.stories.d.ts +123 -0
- package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidgetHTML.stories.d.ts +126 -0
- package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidgetStories.d.ts +141 -0
- package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.d.ts +6 -0
- package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.stories.d.ts +115 -0
- package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidgetHTML.stories.d.ts +115 -0
- package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidgetStories.d.ts +120 -0
- package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.d.ts +6 -0
- package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.stories.d.ts +115 -0
- package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidgetHTML.stories.d.ts +115 -0
- package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidgetStories.d.ts +127 -0
- package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/IriWidget/IriWidget.d.ts +6 -0
- package/dist/server/components/widgets/MetadataWidget/IriWidget/IriWidget.stories.d.ts +90 -0
- package/dist/server/components/widgets/MetadataWidget/IriWidget/IriWidgetHTML.stories.d.ts +93 -0
- package/dist/server/components/widgets/MetadataWidget/IriWidget/IriWidgetStories.d.ts +98 -0
- package/dist/server/components/widgets/MetadataWidget/IriWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/MetadataWidget.d.ts +7 -0
- package/dist/server/components/widgets/MetadataWidget/MetadataWidget.stories.d.ts +171 -0
- package/dist/server/components/widgets/MetadataWidget/MetadataWidgetHTML.stories.d.ts +170 -0
- package/dist/server/components/widgets/MetadataWidget/MetadataWidgetStories.d.ts +238 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.stories.d.ts +102 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetHTML.stories.d.ts +105 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetStories.d.ts +111 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.stories.d.ts +88 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidgetHTML.stories.d.ts +91 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefWidgetStories.d.ts +98 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.d.ts +7 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.stories.d.ts +198 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidgetStories.d.ts +303 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidgetsHTML.stories.d.ts +197 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/TabPresentation.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/TabWidget.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/TabWidget.stories.d.ts +130 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/TabWidgetHTML.stories.d.ts +133 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/TabWidgetStories.d.ts +192 -0
- package/dist/server/components/widgets/MetadataWidget/TabWidget/index.d.ts +4 -0
- package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitlePresentation.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitleWidget.d.ts +5 -0
- package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitleWidget.stories.d.ts +134 -0
- package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitleWidgetHTML.stories.d.ts +137 -0
- package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitleWidgetStories.d.ts +214 -0
- package/dist/server/components/widgets/MetadataWidget/TitleWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/MetadataWidget/index.d.ts +8 -0
- package/dist/server/components/widgets/OntologyInfoWidget/OntologyInfoWidget.d.ts +6 -0
- package/dist/server/components/widgets/OntologyInfoWidget/OntologyInfoWidget.stories.d.ts +165 -0
- package/dist/server/components/widgets/OntologyInfoWidget/OntologyInfoWidgetHTML.stories.d.ts +163 -0
- package/dist/server/components/widgets/OntologyInfoWidget/OntologyInfoWidgetStories.d.ts +175 -0
- package/dist/server/components/widgets/OntologyInfoWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/ResourcesWidget/ResourcesWidget.d.ts +6 -0
- package/dist/server/components/widgets/ResourcesWidget/ResourcesWidget.stories.d.ts +137 -0
- package/dist/server/components/widgets/ResourcesWidget/ResourcesWidgetHTML.stories.d.ts +139 -0
- package/dist/server/components/widgets/ResourcesWidget/ResourcesWidgetStories.d.ts +175 -0
- package/dist/server/components/widgets/ResourcesWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/SearchBarWidget/SearchBarWidget.d.ts +5 -0
- package/dist/server/components/widgets/SearchBarWidget/SearchBarWidget.stories.d.ts +59 -0
- package/dist/server/components/widgets/SearchBarWidget/SearchBarWidgetHTML.stories.d.ts +62 -0
- package/dist/server/components/widgets/SearchBarWidget/SearchBarWidgetStories.d.ts +69 -0
- package/dist/server/components/widgets/SearchBarWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/SearchResultsListWidget/MetadataCompact.d.ts +4 -0
- package/dist/server/components/widgets/SearchResultsListWidget/SearchResultsListWidget.d.ts +6 -0
- package/dist/server/components/widgets/SearchResultsListWidget/SearchResultsListWidget.stories.d.ts +101 -0
- package/dist/server/components/widgets/SearchResultsListWidget/SearchResultsListWidgetHTML.stories.d.ts +104 -0
- package/dist/server/components/widgets/SearchResultsListWidget/SearchResultsListWidgetStories.d.ts +140 -0
- package/dist/server/components/widgets/SearchResultsListWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/TermDepictionWidget/TermDepictionWidget.d.ts +6 -0
- package/dist/server/components/widgets/TermDepictionWidget/TermDepictionWidget.stories.d.ts +63 -0
- package/dist/server/components/widgets/TermDepictionWidget/TermDepictionWidgetHTML.stories.d.ts +65 -0
- package/dist/server/components/widgets/TermDepictionWidget/TermDepictionWidgetStories.d.ts +64 -0
- package/dist/server/components/widgets/TermDepictionWidget/index.d.ts +1 -0
- package/dist/server/components/widgets/index.d.ts +36 -0
- package/dist/server/index.css +1 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +1439 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/model/LinkedEntities.d.ts +18 -0
- package/dist/server/model/ModelObjectCreator.d.ts +10 -0
- package/dist/server/model/ModelTypeCheck.d.ts +24 -0
- package/dist/server/model/Reified.d.ts +8 -0
- package/dist/server/model/StructureRendering.d.ts +69 -0
- package/dist/server/model/Suggest.d.ts +7 -0
- package/dist/server/model/interfaces/Class.d.ts +6 -0
- package/dist/server/model/interfaces/Entity.d.ts +30 -0
- package/dist/server/model/interfaces/Hierarchy.d.ts +65 -0
- package/dist/server/model/interfaces/Individual.d.ts +6 -0
- package/dist/server/model/interfaces/Ontologies.d.ts +9 -0
- package/dist/server/model/interfaces/Ontology.d.ts +28 -0
- package/dist/server/model/interfaces/Property.d.ts +9 -0
- package/dist/server/model/interfaces/Select.d.ts +5 -0
- package/dist/server/model/interfaces/SelectResult.d.ts +13 -0
- package/dist/server/model/interfaces/Thing.d.ts +22 -0
- package/dist/server/model/interfaces/index.d.ts +7 -0
- package/dist/server/model/ols-model/OLSSelect.d.ts +7 -0
- package/dist/server/model/ols-model/OLSSelectResult.d.ts +15 -0
- package/dist/server/model/ols3-model/OLS3Class.d.ts +14 -0
- package/dist/server/model/ols3-model/OLS3Entity.d.ts +40 -0
- package/dist/server/model/ols3-model/OLS3Individual.d.ts +13 -0
- package/dist/server/model/ols3-model/OLS3Ontologies.d.ts +11 -0
- package/dist/server/model/ols3-model/OLS3Ontology.d.ts +40 -0
- package/dist/server/model/ols3-model/OLS3Property.d.ts +15 -0
- package/dist/server/model/ols3-model/OLS3Thing.d.ts +24 -0
- package/dist/server/model/ols3-model/index.d.ts +7 -0
- package/dist/server/model/ols4-model/OLS4Class.d.ts +11 -0
- package/dist/server/model/ols4-model/OLS4Entity.d.ts +32 -0
- package/dist/server/model/ols4-model/OLS4Individual.d.ts +11 -0
- package/dist/server/model/ols4-model/OLS4Ontologies.d.ts +11 -0
- package/dist/server/model/ols4-model/OLS4Ontology.d.ts +30 -0
- package/dist/server/model/ols4-model/OLS4Property.d.ts +13 -0
- package/dist/server/model/ols4-model/OLS4Thing.d.ts +24 -0
- package/dist/server/model/ols4-model/index.d.ts +7 -0
- package/dist/server/model/ts4nfdi-model/Ts4nfdiSearchResult.d.ts +15 -0
- package/dist/server/stories/storyArgs.d.ts +767 -0
- package/dist/server/utils/olsApiTypes.d.ts +54 -0
- package/dist/server/utils/olsApiUtils.d.ts +15 -0
- package/package.json +16 -2
- package/dist/esm/types/api/OlsApi.d.ts +0 -202
- package/dist/esm/types/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation.d.ts +0 -5
- package/dist/esm/types/components/widgets/MetadataWidget/BreadcrumbWidget/index.d.ts +0 -1
- /package/dist/esm/{types/api → api}/HierarchyBuilder.d.ts +0 -0
- /package/dist/esm/{types/api → api}/OntoPortalApi.d.ts +0 -0
- /package/dist/esm/{types/api → api}/SkosApi.d.ts +0 -0
- /package/dist/esm/{types/app → app}/index.d.ts +0 -0
- /package/dist/esm/{types/app → app}/util.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/AutocompleteWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/AutocompleteWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/AutocompleteWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/AutocompleteWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/DataContentWidget/DataContentWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/DataContentWidget/DataContentWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/DataContentWidget/DataContentWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/DataContentWidget/DataContentWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/DataContentWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/EntityInfoWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/EntityInfoWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/EntityInfoWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/EntityInfoWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/EntityRelationsWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/EntityRelationsWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/EntityRelationsWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/EntityRelationsWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/GraphViewWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/GraphViewWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/GraphViewWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/GraphViewWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/JsonApiWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/JsonApiWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/JsonApiWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/JsonApiWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/IriWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/IriWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/IriWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/IriWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/MetadataWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/MetadataWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/MetadataWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/MetadataWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidgetsHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabPresentation.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitlePresentation.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitleWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitleWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitleWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitleWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/MetadataWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/OntologyInfoWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/OntologyInfoWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/OntologyInfoWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/OntologyInfoWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/ResourcesWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/ResourcesWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/ResourcesWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/ResourcesWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/SearchBarWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/SearchBarWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/SearchBarWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/SearchBarWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/MetadataCompact.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/SearchResultsListWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/SearchResultsListWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/SearchResultsListWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/SearchResultsListWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/index.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/TermDepictionWidget.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/TermDepictionWidget.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/TermDepictionWidgetHTML.stories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/TermDepictionWidgetStories.d.ts +0 -0
- /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/index.d.ts +0 -0
- /package/dist/esm/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/esm/{types/model → model}/LinkedEntities.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ModelObjectCreator.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ModelTypeCheck.d.ts +0 -0
- /package/dist/esm/{types/model → model}/Reified.d.ts +0 -0
- /package/dist/esm/{types/model → model}/StructureRendering.d.ts +0 -0
- /package/dist/esm/{types/model → model}/Suggest.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Class.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Entity.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Hierarchy.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Individual.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Ontologies.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Ontology.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Property.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Select.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/SelectResult.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/Thing.d.ts +0 -0
- /package/dist/esm/{types/model → model}/interfaces/index.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols-model/OLSSelect.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols-model/OLSSelectResult.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols3-model/OLS3Class.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols3-model/OLS3Entity.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols3-model/OLS3Individual.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols3-model/OLS3Ontologies.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols3-model/OLS3Ontology.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols3-model/OLS3Property.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols3-model/OLS3Thing.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols3-model/index.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols4-model/OLS4Class.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols4-model/OLS4Entity.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols4-model/OLS4Individual.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols4-model/OLS4Ontologies.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols4-model/OLS4Ontology.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols4-model/OLS4Property.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols4-model/OLS4Thing.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ols4-model/index.d.ts +0 -0
- /package/dist/esm/{types/model → model}/ts4nfdi-model/Ts4nfdiSearchResult.d.ts +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { Hierarchy, TreeNode } from '../model/interfaces/Hierarchy.js';
|
|
3
|
+
import { pluralizeType } from '../app/util.js';
|
|
4
|
+
|
|
5
|
+
function HierarchyNodeToEntityData(hierarchyNode) {
|
|
6
|
+
return {
|
|
7
|
+
iri: hierarchyNode["@id"],
|
|
8
|
+
label: hierarchyNode["prefLabel"],
|
|
9
|
+
hasChildren: hierarchyNode["hasChildren"],
|
|
10
|
+
parents: [],
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
class OntoPortalApi {
|
|
14
|
+
axiosInstance;
|
|
15
|
+
apiKey;
|
|
16
|
+
constructor(api, apiKey) {
|
|
17
|
+
this.axiosInstance = axios.create({
|
|
18
|
+
baseURL: api,
|
|
19
|
+
headers: {
|
|
20
|
+
Accept: "application/json",
|
|
21
|
+
// Content_Type: "application/json", // leads to preflight error
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
this.apiKey = apiKey;
|
|
25
|
+
this.axiosInstance.interceptors.request.use((config) => {
|
|
26
|
+
config.params = config.params || {};
|
|
27
|
+
// default params
|
|
28
|
+
config.params["apikey"] = this.apiKey;
|
|
29
|
+
config.params["format"] = "json";
|
|
30
|
+
return config;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async makeCall(url, config) {
|
|
34
|
+
return (await this.axiosInstance.get(url, config)).data;
|
|
35
|
+
}
|
|
36
|
+
async buildHierarchyWithIri(props) {
|
|
37
|
+
const { iri, ontologyId, entityType, showSiblingsOnInit } = props;
|
|
38
|
+
if (!ontologyId)
|
|
39
|
+
throw Error("ontologyId has to be specified for OntoPortal API.");
|
|
40
|
+
if (!entityType)
|
|
41
|
+
throw Error("entityType has to be specified for OntoPortal API.");
|
|
42
|
+
const rootEntities = [];
|
|
43
|
+
const entitiesData = new Map();
|
|
44
|
+
const parentChildRelations = new Map();
|
|
45
|
+
const allChildrenPresent = new Set();
|
|
46
|
+
const onInitialPath = new Set(); // only used if showSiblingsOnInit == false
|
|
47
|
+
function buildRelations(currNode) {
|
|
48
|
+
entitiesData.set(currNode["@id"], HierarchyNodeToEntityData(currNode));
|
|
49
|
+
if (currNode.hasChildren && currNode.children.length > 0) {
|
|
50
|
+
parentChildRelations.set(currNode["@id"], currNode.children.map((c) => {
|
|
51
|
+
return { childIri: c["@id"] };
|
|
52
|
+
}));
|
|
53
|
+
allChildrenPresent.add(currNode["@id"]);
|
|
54
|
+
onInitialPath.add(currNode["@id"]);
|
|
55
|
+
for (const child of currNode.children) {
|
|
56
|
+
buildRelations(child);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (iri) {
|
|
61
|
+
// TODO: property which is child of multiple properties only is returned in one parent in /tree query (-> do it right manually?) (e.g.: http://sweetontology.net/relaTime/hasNHTime -> has more than one parent, but is only shown in one parent in /tree)
|
|
62
|
+
const api_tree = await this.makeCall(`/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(entityType, false)}/${encodeURIComponent(iri)}/tree`, {
|
|
63
|
+
params: {
|
|
64
|
+
include: "@id,prefLabel,hasChildren,children",
|
|
65
|
+
language: "EN",
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
for (const rootNode of api_tree) {
|
|
69
|
+
rootEntities.push(rootNode["@id"]);
|
|
70
|
+
onInitialPath.add(rootNode["@id"]);
|
|
71
|
+
buildRelations(rootNode);
|
|
72
|
+
}
|
|
73
|
+
onInitialPath.add(iri);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const roots = await this.makeCall(`/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(entityType, false)}/roots`, {
|
|
77
|
+
params: {
|
|
78
|
+
include: "@id,prefLabel,hasChildren",
|
|
79
|
+
language: "EN",
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
for (const rootNode of roots) {
|
|
83
|
+
rootEntities.push(rootNode["@id"]);
|
|
84
|
+
onInitialPath.add(rootNode["@id"]);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function createTreeNode(entityData, cycleCheck) {
|
|
88
|
+
cycleCheck.add(entityData.iri); // add current entity to cycle check set
|
|
89
|
+
const node = new TreeNode(entityData);
|
|
90
|
+
const children = parentChildRelations.get(entityData.iri) || [];
|
|
91
|
+
if (!showSiblingsOnInit) {
|
|
92
|
+
for (const child of children) {
|
|
93
|
+
if (cycleCheck.has(child.childIri)) {
|
|
94
|
+
// cyclic tree, skip cycle
|
|
95
|
+
console.error(`Cyclic tree at entity "${child.childIri}".`);
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
99
|
+
if (onInitialPath.has(child.childIri))
|
|
100
|
+
node.addChild(createTreeNode(entitiesData.get(child.childIri), cycleCheck));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
for (const child of children) {
|
|
105
|
+
if (cycleCheck.has(child.childIri)) {
|
|
106
|
+
// cyclic tree, skip cycle
|
|
107
|
+
console.error(`Cyclic tree at entity "${child.childIri}".`);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
111
|
+
node.addChild(createTreeNode(entitiesData.get(child.childIri), cycleCheck));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (node.loadedChildren.length > 0)
|
|
115
|
+
node.expanded = true;
|
|
116
|
+
cycleCheck.delete(entityData.iri);
|
|
117
|
+
return node;
|
|
118
|
+
}
|
|
119
|
+
const cycleCheck = new Set(); // Contains iris of all entities that have occurred within the current recursion branch. Is used to check for cycles.
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
121
|
+
const rootNodes = rootEntities
|
|
122
|
+
.map((rootEntity) => createTreeNode(entitiesData.get(rootEntity), cycleCheck))
|
|
123
|
+
.sort((a, b) => (a.entityData.label || a.entityData.iri).localeCompare(b.entityData.label || b.entityData.iri));
|
|
124
|
+
return new Hierarchy({
|
|
125
|
+
parentChildRelations: parentChildRelations,
|
|
126
|
+
entitiesData: entitiesData,
|
|
127
|
+
allChildrenPresent: allChildrenPresent,
|
|
128
|
+
roots: rootNodes,
|
|
129
|
+
api: new OntoPortalApi(this.axiosInstance.getUri(), this.apiKey),
|
|
130
|
+
ontologyId: ontologyId,
|
|
131
|
+
mainEntityIri: iri,
|
|
132
|
+
keepExpansionStates: props.keepExpansionStates,
|
|
133
|
+
entityType: entityType,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
async loadHierarchyChildren(props) {
|
|
137
|
+
const { nodeToExpand, ontologyId, entityType } = props;
|
|
138
|
+
if (entityType == undefined)
|
|
139
|
+
throw Error("entityType has to be provided to load children in an OntoPortal hierarchy.");
|
|
140
|
+
const children = (await this.makeCall(`/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(entityType, false)}/${encodeURIComponent(nodeToExpand.entityData.iri)}/children`, {
|
|
141
|
+
params: {
|
|
142
|
+
include: "@id,prefLabel,hasChildren",
|
|
143
|
+
language: "EN",
|
|
144
|
+
},
|
|
145
|
+
}))["collection"];
|
|
146
|
+
return children.map((child) => HierarchyNodeToEntityData(child));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export { OntoPortalApi };
|
|
151
|
+
//# sourceMappingURL=OntoPortalApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OntoPortalApi.js","sources":["../../../../src/api/OntoPortalApi.ts"],"sourcesContent":["import {\n BuildHierarchyProps,\n HierarchyBuilder,\n HierarchyIriProp,\n LoadHierarchyChildrenProps,\n} from \"./HierarchyBuilder\";\nimport axios, { AxiosInstance, AxiosRequestConfig } from \"axios\";\nimport {\n Hierarchy,\n ParentChildRelation,\n TreeNode,\n} from \"../model/interfaces/Hierarchy\";\nimport { pluralizeType } from \"../app/util\";\nimport { EntityData } from \"../app/types\";\n\ntype HierarchyNode = {\n prefLabel: string;\n hasChildren: boolean;\n children: HierarchyNode[];\n obsolete: boolean; // TODO: use this to enable showing obsoleteTerms?\n [\"@id\"]: string;\n [\"@type\"]: string;\n // links: object - not needed here\n [\"@context\"]: {\n [\"@vocab\"]: string;\n prefLabel: string;\n obsolete: string;\n [\"@language\"]: string;\n };\n};\n\nfunction HierarchyNodeToEntityData(hierarchyNode: HierarchyNode): EntityData {\n return {\n iri: hierarchyNode[\"@id\"],\n label: hierarchyNode[\"prefLabel\"],\n hasChildren: hierarchyNode[\"hasChildren\"],\n parents: [],\n };\n}\n\nexport class OntoPortalApi implements HierarchyBuilder {\n private axiosInstance: AxiosInstance;\n private apiKey: string;\n\n constructor(api: string, apiKey: string) {\n this.axiosInstance = axios.create({\n baseURL: api,\n headers: {\n Accept: \"application/json\",\n // Content_Type: \"application/json\", // leads to preflight error\n },\n });\n this.apiKey = apiKey;\n this.axiosInstance.interceptors.request.use((config) => {\n config.params = config.params || {};\n\n // default params\n config.params[\"apikey\"] = this.apiKey;\n config.params[\"format\"] = \"json\";\n\n return config;\n });\n }\n\n private async makeCall(url: string, config?: AxiosRequestConfig<never>) {\n return (await this.axiosInstance.get(url, config)).data;\n }\n\n public async buildHierarchyWithIri(\n props: BuildHierarchyProps & HierarchyIriProp,\n ): Promise<Hierarchy> {\n const { iri, ontologyId, entityType, showSiblingsOnInit } = props;\n\n if (!ontologyId)\n throw Error(\"ontologyId has to be specified for OntoPortal API.\");\n if (!entityType)\n throw Error(\"entityType has to be specified for OntoPortal API.\");\n\n const rootEntities: string[] = [];\n const entitiesData: Map<string, EntityData> = new Map<string, EntityData>();\n const parentChildRelations: Map<string, ParentChildRelation[]> = new Map<\n string,\n ParentChildRelation[]\n >();\n const allChildrenPresent: Set<string> = new Set<string>();\n const onInitialPath: Set<string> = new Set<string>(); // only used if showSiblingsOnInit == false\n\n function buildRelations(currNode: HierarchyNode) {\n entitiesData.set(currNode[\"@id\"], HierarchyNodeToEntityData(currNode));\n if (currNode.hasChildren && currNode.children.length > 0) {\n parentChildRelations.set(\n currNode[\"@id\"],\n currNode.children.map((c) => {\n return { childIri: c[\"@id\"] };\n }),\n );\n\n allChildrenPresent.add(currNode[\"@id\"]);\n onInitialPath.add(currNode[\"@id\"]);\n\n for (const child of currNode.children) {\n buildRelations(child);\n }\n }\n }\n\n if (iri) {\n // TODO: property which is child of multiple properties only is returned in one parent in /tree query (-> do it right manually?) (e.g.: http://sweetontology.net/relaTime/hasNHTime -> has more than one parent, but is only shown in one parent in /tree)\n const api_tree: HierarchyNode[] = await this.makeCall(\n `/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(\n entityType,\n false,\n )}/${encodeURIComponent(iri)}/tree`,\n {\n params: {\n include: \"@id,prefLabel,hasChildren,children\",\n language: \"EN\",\n },\n },\n );\n\n for (const rootNode of api_tree) {\n rootEntities.push(rootNode[\"@id\"]);\n onInitialPath.add(rootNode[\"@id\"]);\n buildRelations(rootNode);\n }\n onInitialPath.add(iri);\n } else {\n const roots: HierarchyNode[] = await this.makeCall(\n `/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(\n entityType,\n false,\n )}/roots`,\n {\n params: {\n include: \"@id,prefLabel,hasChildren\",\n language: \"EN\",\n },\n },\n );\n\n for (const rootNode of roots) {\n rootEntities.push(rootNode[\"@id\"]);\n onInitialPath.add(rootNode[\"@id\"]);\n }\n }\n\n function createTreeNode(\n entityData: EntityData,\n cycleCheck: Set<string>,\n ): TreeNode {\n cycleCheck.add(entityData.iri); // add current entity to cycle check set\n\n const node = new TreeNode(entityData);\n const children = parentChildRelations.get(entityData.iri) || [];\n\n if (!showSiblingsOnInit) {\n for (const child of children) {\n if (cycleCheck.has(child.childIri)) {\n // cyclic tree, skip cycle\n console.error(`Cyclic tree at entity \"${child.childIri}\".`);\n continue;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (onInitialPath.has(child.childIri))\n node.addChild(\n createTreeNode(entitiesData.get(child.childIri)!, cycleCheck),\n );\n }\n } else {\n for (const child of children) {\n if (cycleCheck.has(child.childIri)) {\n // cyclic tree, skip cycle\n console.error(`Cyclic tree at entity \"${child.childIri}\".`);\n continue;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n node.addChild(\n createTreeNode(entitiesData.get(child.childIri)!, cycleCheck),\n );\n }\n }\n\n if (node.loadedChildren.length > 0) node.expanded = true;\n\n cycleCheck.delete(entityData.iri);\n return node;\n }\n\n const cycleCheck: Set<string> = new Set<string>(); // Contains iris of all entities that have occurred within the current recursion branch. Is used to check for cycles.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const rootNodes: TreeNode[] = rootEntities\n .map((rootEntity) =>\n createTreeNode(entitiesData.get(rootEntity)!, cycleCheck),\n )\n .sort((a, b) =>\n (a.entityData.label || a.entityData.iri).localeCompare(\n b.entityData.label || b.entityData.iri,\n ),\n );\n\n return new Hierarchy({\n parentChildRelations: parentChildRelations,\n entitiesData: entitiesData,\n allChildrenPresent: allChildrenPresent,\n roots: rootNodes,\n api: new OntoPortalApi(this.axiosInstance.getUri(), this.apiKey),\n ontologyId: ontologyId,\n mainEntityIri: iri,\n keepExpansionStates: props.keepExpansionStates,\n entityType: entityType,\n });\n }\n\n public async loadHierarchyChildren(\n props: LoadHierarchyChildrenProps,\n ): Promise<EntityData[]> {\n const { nodeToExpand, ontologyId, entityType } = props;\n\n if (entityType == undefined)\n throw Error(\n \"entityType has to be provided to load children in an OntoPortal hierarchy.\",\n );\n\n const children: HierarchyNode[] = (\n await this.makeCall(\n `/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(\n entityType,\n false,\n )}/${encodeURIComponent(nodeToExpand.entityData.iri)}/children`,\n {\n params: {\n include: \"@id,prefLabel,hasChildren\",\n language: \"EN\",\n },\n },\n )\n )[\"collection\"];\n\n return children.map((child) => HierarchyNodeToEntityData(child));\n }\n}\n"],"names":[],"mappings":";;;;AA+BA,SAAS,yBAAyB,CAAC,aAA4B,EAAA;IAC7D,OAAO;AACL,QAAA,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC;AACzB,QAAA,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC;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A,CACF,EACD,YAAY,CAAC,CAAC;AAEhB,QAAA,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC;KAClE;AACF;;;;"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { Hierarchy, TreeNode } from '../model/interfaces/Hierarchy.js';
|
|
3
|
+
import Reified from '../model/Reified.js';
|
|
4
|
+
import { dictFromParamString } from '../app/util.js';
|
|
5
|
+
|
|
6
|
+
class SkosEntityDataBuilder {
|
|
7
|
+
static fromTopConcept(obj) {
|
|
8
|
+
return {
|
|
9
|
+
iri: obj.uri,
|
|
10
|
+
label: obj.label,
|
|
11
|
+
hasChildren: obj.hasChildren,
|
|
12
|
+
parents: [],
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
static fromHierarchyResult(obj) {
|
|
16
|
+
return {
|
|
17
|
+
iri: obj.uri,
|
|
18
|
+
label: obj.prefLabel,
|
|
19
|
+
hasChildren: obj.narrower != undefined && obj.narrower.length > 0,
|
|
20
|
+
parents: Reified.fromJson(obj.broader),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static fromPrefAndUriAndChildren(obj, parents) {
|
|
24
|
+
return {
|
|
25
|
+
iri: obj.uri,
|
|
26
|
+
label: obj.prefLabel,
|
|
27
|
+
hasChildren: obj.hasChildren,
|
|
28
|
+
parents: Reified.fromJson(parents),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static fromLabelAndUriAndChildren(obj, parents) {
|
|
32
|
+
return {
|
|
33
|
+
iri: obj.uri,
|
|
34
|
+
label: obj.label,
|
|
35
|
+
hasChildren: obj.hasChildren,
|
|
36
|
+
parents: Reified.fromJson(parents),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
class SkosApi {
|
|
41
|
+
axiosInstance;
|
|
42
|
+
constructor(api) {
|
|
43
|
+
this.axiosInstance = axios.create({
|
|
44
|
+
baseURL: api,
|
|
45
|
+
headers: {
|
|
46
|
+
Accept: "application/json",
|
|
47
|
+
// Content_Type: "application/json", // leads to preflight error
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async makeCall(url, config) {
|
|
52
|
+
return (await this.axiosInstance.get(url, config)).data;
|
|
53
|
+
}
|
|
54
|
+
async buildHierarchyWithIri(props) {
|
|
55
|
+
const { iri, ontologyId, showSiblingsOnInit, parameter } = props;
|
|
56
|
+
if (!ontologyId)
|
|
57
|
+
throw Error("ontologyId has to be specified for SKOS API.");
|
|
58
|
+
const rootEntities = [];
|
|
59
|
+
const parentChildRelations = new Map();
|
|
60
|
+
const entitiesData = new Map();
|
|
61
|
+
const allChildrenPresent = new Set();
|
|
62
|
+
const onInitialPath = new Set(); // only used if showSiblingsOnInit == false
|
|
63
|
+
if (iri) {
|
|
64
|
+
const broaderTransitive = await this.makeCall(`/${ontologyId}/hierarchy`, {
|
|
65
|
+
params: {
|
|
66
|
+
uri: iri,
|
|
67
|
+
lang: "en",
|
|
68
|
+
format: "application/json",
|
|
69
|
+
...dictFromParamString(parameter),
|
|
70
|
+
},
|
|
71
|
+
}).then((obj) => Object.keys(obj["broaderTransitive"]).map((key) => obj["broaderTransitive"][key]));
|
|
72
|
+
// stores all entities appearing in broaderTransitive
|
|
73
|
+
//const entities: Map<string, EntityData> = new Map<string, EntityData>()
|
|
74
|
+
for (const node of broaderTransitive) {
|
|
75
|
+
const nodeData = SkosEntityDataBuilder.fromHierarchyResult(node);
|
|
76
|
+
entitiesData.set(nodeData.iri, nodeData);
|
|
77
|
+
if (node.top)
|
|
78
|
+
rootEntities.push(nodeData.iri);
|
|
79
|
+
if (!showSiblingsOnInit)
|
|
80
|
+
onInitialPath.add(nodeData.iri);
|
|
81
|
+
}
|
|
82
|
+
for (const node of broaderTransitive) {
|
|
83
|
+
if (node.narrower != undefined) {
|
|
84
|
+
const children = [];
|
|
85
|
+
for (const childNode of node.narrower) {
|
|
86
|
+
let childNodeData = entitiesData.get(childNode.uri);
|
|
87
|
+
if (childNodeData == undefined) {
|
|
88
|
+
childNodeData = SkosEntityDataBuilder.fromLabelAndUriAndChildren(childNode, [node.uri]);
|
|
89
|
+
entitiesData.set(childNodeData.iri, childNodeData);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
if (!childNodeData?.parents?.map((r) => r.value).includes(node.uri))
|
|
93
|
+
if (childNodeData?.parents) {
|
|
94
|
+
childNodeData?.parents?.push(...Reified.fromJson(node.uri));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
children.push(childNodeData);
|
|
98
|
+
}
|
|
99
|
+
children.sort((a, b) => (a.label || a.iri).localeCompare(b.label || b.iri));
|
|
100
|
+
parentChildRelations.set(node.uri, children.map((c) => {
|
|
101
|
+
return { childIri: c.iri };
|
|
102
|
+
}));
|
|
103
|
+
allChildrenPresent.add(node.uri); // in skos, all children are loaded if any are
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const topconcepts = await this.makeCall(`/${ontologyId}/topConcepts`, {
|
|
109
|
+
params: {
|
|
110
|
+
lang: "en",
|
|
111
|
+
format: "application/json",
|
|
112
|
+
...dictFromParamString(parameter),
|
|
113
|
+
},
|
|
114
|
+
}).then((obj) => obj["topconcepts"]);
|
|
115
|
+
for (const concept of topconcepts) {
|
|
116
|
+
rootEntities.push(concept.uri);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function createTreeNode(entityData, cycleCheck) {
|
|
120
|
+
cycleCheck.add(entityData.iri); // add current entity to cycle check set
|
|
121
|
+
const node = new TreeNode(entityData);
|
|
122
|
+
const children = parentChildRelations.get(entityData.iri) || [];
|
|
123
|
+
if (!showSiblingsOnInit) {
|
|
124
|
+
for (const child of children) {
|
|
125
|
+
if (cycleCheck.has(child.childIri)) {
|
|
126
|
+
// cyclic tree, skip cycle
|
|
127
|
+
console.error(`Cyclic tree at entity "${child.childIri}".`);
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const childData = entitiesData.get(child.childIri);
|
|
131
|
+
if (childData != undefined && onInitialPath.has(child.childIri)) {
|
|
132
|
+
node.addChild(createTreeNode(childData, cycleCheck));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
for (const child of children) {
|
|
138
|
+
if (cycleCheck.has(child.childIri)) {
|
|
139
|
+
// cyclic tree, skip cycle
|
|
140
|
+
console.error(`Cyclic tree at entity "${child.childIri}".`);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const childData = entitiesData.get(child.childIri);
|
|
144
|
+
if (childData != undefined)
|
|
145
|
+
node.addChild(createTreeNode(childData, cycleCheck));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (node.loadedChildren.length > 0)
|
|
149
|
+
node.expanded = true;
|
|
150
|
+
cycleCheck.delete(entityData.iri);
|
|
151
|
+
return node;
|
|
152
|
+
}
|
|
153
|
+
const cycleCheck = new Set(); // Contains iris of all entities that have occurred within the current recursion branch. Is used to check for cycles.
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
155
|
+
const rootNodes = rootEntities
|
|
156
|
+
.map((rootEntity) => createTreeNode(entitiesData.get(rootEntity), cycleCheck))
|
|
157
|
+
.sort((a, b) => (a.entityData.label || a.entityData.iri).localeCompare(b.entityData.label || b.entityData.iri));
|
|
158
|
+
return new Hierarchy({
|
|
159
|
+
parentChildRelations: parentChildRelations,
|
|
160
|
+
entitiesData: entitiesData,
|
|
161
|
+
allChildrenPresent: allChildrenPresent,
|
|
162
|
+
roots: rootNodes,
|
|
163
|
+
api: new SkosApi(this.axiosInstance.getUri()),
|
|
164
|
+
ontologyId: ontologyId,
|
|
165
|
+
mainEntityIri: iri,
|
|
166
|
+
keepExpansionStates: props.keepExpansionStates,
|
|
167
|
+
parameter: parameter,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
async loadHierarchyChildren(props) {
|
|
171
|
+
const { nodeToExpand, ontologyId, parameter } = props;
|
|
172
|
+
const narrower = (await this.makeCall(`/${ontologyId}/children`, {
|
|
173
|
+
params: {
|
|
174
|
+
uri: nodeToExpand.entityData.iri,
|
|
175
|
+
lang: "en",
|
|
176
|
+
format: "application/json",
|
|
177
|
+
...dictFromParamString(parameter),
|
|
178
|
+
},
|
|
179
|
+
}))["narrower"];
|
|
180
|
+
return narrower.map((obj) => SkosEntityDataBuilder.fromPrefAndUriAndChildren(obj, [
|
|
181
|
+
nodeToExpand.entityData.iri,
|
|
182
|
+
]));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export { SkosApi };
|
|
187
|
+
//# sourceMappingURL=SkosApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkosApi.js","sources":["../../../../src/api/SkosApi.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosRequestConfig } from \"axios\";\nimport {\n BuildHierarchyProps,\n HierarchyBuilder,\n HierarchyIriProp,\n LoadHierarchyChildrenProps,\n} from \"./HierarchyBuilder\";\nimport {\n Hierarchy,\n ParentChildRelation,\n TreeNode,\n} from \"../model/interfaces/Hierarchy\";\nimport Reified from \"../model/Reified\";\nimport { EntityData } from \"../app/types\";\nimport { dictFromParamString } from \"../app/util\";\n\ntype TopConcept = {\n uri: string;\n label?: string;\n topConceptOf?: string;\n hasChildren: boolean;\n notation?: string;\n};\n\ntype LabelAndUriAndChildren = {\n uri: string;\n label: string;\n hasChildren: boolean;\n notation?: string;\n};\n\ntype HierarchyResult = {\n uri: string;\n prefLabel: string;\n top?: string;\n broader?: string[];\n narrower?: LabelAndUriAndChildren[];\n};\n\ntype PrefAndUriAndChildren = {\n uri: string;\n prefLabel: string;\n hasChildren: boolean;\n notation?: string;\n};\n\nabstract class SkosEntityDataBuilder {\n static fromTopConcept(obj: TopConcept): EntityData {\n return {\n iri: obj.uri,\n label: obj.label,\n hasChildren: obj.hasChildren,\n parents: [],\n };\n }\n\n static fromHierarchyResult(obj: HierarchyResult): EntityData {\n return {\n iri: obj.uri,\n label: obj.prefLabel,\n hasChildren: obj.narrower != undefined && obj.narrower.length > 0,\n parents: Reified.fromJson(obj.broader),\n };\n }\n\n static fromPrefAndUriAndChildren(\n obj: PrefAndUriAndChildren,\n parents?: string[],\n ): EntityData {\n return {\n iri: obj.uri,\n label: obj.prefLabel,\n hasChildren: obj.hasChildren,\n parents: Reified.fromJson(parents),\n };\n }\n\n static fromLabelAndUriAndChildren(\n obj: LabelAndUriAndChildren,\n parents?: string[],\n ): EntityData {\n return {\n iri: obj.uri,\n label: obj.label,\n hasChildren: obj.hasChildren,\n parents: Reified.fromJson(parents),\n };\n }\n}\n\nexport class SkosApi implements HierarchyBuilder {\n private axiosInstance: AxiosInstance;\n\n constructor(api: string) {\n this.axiosInstance = axios.create({\n baseURL: api,\n headers: {\n Accept: \"application/json\",\n // Content_Type: \"application/json\", // leads to preflight error\n },\n });\n }\n\n private async makeCall(\n url: string,\n config: AxiosRequestConfig<never> | undefined,\n ) {\n return (await this.axiosInstance.get(url, config)).data;\n }\n\n public async buildHierarchyWithIri(\n props: BuildHierarchyProps & HierarchyIriProp,\n ): Promise<Hierarchy> {\n const { iri, ontologyId, showSiblingsOnInit, parameter } = props;\n\n if (!ontologyId)\n throw Error(\"ontologyId has to be specified for SKOS API.\");\n\n const rootEntities: string[] = [];\n const parentChildRelations: Map<string, ParentChildRelation[]> = new Map<\n string,\n ParentChildRelation[]\n >();\n const entitiesData: Map<string, EntityData> = new Map<string, EntityData>();\n const allChildrenPresent: Set<string> = new Set<string>();\n const onInitialPath: Set<string> = new Set<string>(); // only used if showSiblingsOnInit == false\n\n if (iri) {\n const broaderTransitive: HierarchyResult[] = await this.makeCall(\n `/${ontologyId}/hierarchy`,\n {\n params: {\n uri: iri,\n lang: \"en\",\n format: \"application/json\",\n ...dictFromParamString(parameter),\n },\n },\n ).then((obj) =>\n Object.keys(obj[\"broaderTransitive\"]).map(\n (key) => obj[\"broaderTransitive\"][key],\n ),\n );\n\n // stores all entities appearing in broaderTransitive\n //const entities: Map<string, EntityData> = new Map<string, EntityData>()\n\n for (const node of broaderTransitive) {\n const nodeData: EntityData =\n SkosEntityDataBuilder.fromHierarchyResult(node);\n\n entitiesData.set(nodeData.iri, nodeData);\n if (node.top) rootEntities.push(nodeData.iri);\n\n if (!showSiblingsOnInit) onInitialPath.add(nodeData.iri);\n }\n for (const node of broaderTransitive) {\n if (node.narrower != undefined) {\n const children: EntityData[] = [];\n\n for (const childNode of node.narrower) {\n let childNodeData = entitiesData.get(childNode.uri);\n if (childNodeData == undefined) {\n childNodeData = SkosEntityDataBuilder.fromLabelAndUriAndChildren(\n childNode,\n [node.uri],\n );\n\n entitiesData.set(childNodeData.iri, childNodeData);\n } else {\n if (\n !childNodeData?.parents?.map((r) => r.value).includes(node.uri)\n )\n if (childNodeData?.parents) {\n childNodeData?.parents?.push(\n ...Reified.fromJson<string>(node.uri),\n );\n }\n }\n children.push(childNodeData);\n }\n\n children.sort((a, b) =>\n (a.label || a.iri).localeCompare(b.label || b.iri),\n );\n\n parentChildRelations.set(\n node.uri,\n children.map((c) => {\n return { childIri: c.iri };\n }),\n );\n allChildrenPresent.add(node.uri); // in skos, all children are loaded if any are\n }\n }\n } else {\n const topconcepts: TopConcept[] = await this.makeCall(\n `/${ontologyId}/topConcepts`,\n {\n params: {\n lang: \"en\",\n format: \"application/json\",\n ...dictFromParamString(parameter),\n },\n },\n ).then((obj) => obj[\"topconcepts\"]);\n\n for (const concept of topconcepts) {\n rootEntities.push(concept.uri);\n }\n }\n\n function createTreeNode(\n entityData: EntityData,\n cycleCheck: Set<string>,\n ): TreeNode {\n cycleCheck.add(entityData.iri); // add current entity to cycle check set\n\n const node = new TreeNode(entityData);\n const children = parentChildRelations.get(entityData.iri) || [];\n\n if (!showSiblingsOnInit) {\n for (const child of children) {\n if (cycleCheck.has(child.childIri)) {\n // cyclic tree, skip cycle\n console.error(`Cyclic tree at entity \"${child.childIri}\".`);\n continue;\n }\n\n const childData = entitiesData.get(child.childIri);\n if (childData != undefined && onInitialPath.has(child.childIri)) {\n node.addChild(createTreeNode(childData, cycleCheck));\n }\n }\n } else {\n for (const child of children) {\n if (cycleCheck.has(child.childIri)) {\n // cyclic tree, skip cycle\n console.error(`Cyclic tree at entity \"${child.childIri}\".`);\n continue;\n }\n\n const childData = entitiesData.get(child.childIri);\n if (childData != undefined)\n node.addChild(createTreeNode(childData, cycleCheck));\n }\n }\n\n if (node.loadedChildren.length > 0) node.expanded = true;\n\n cycleCheck.delete(entityData.iri);\n return node;\n }\n\n const cycleCheck: Set<string> = new Set<string>(); // Contains iris of all entities that have occurred within the current recursion branch. Is used to check for cycles.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const rootNodes: TreeNode[] = rootEntities\n .map((rootEntity) =>\n createTreeNode(entitiesData.get(rootEntity)!, cycleCheck),\n )\n .sort((a, b) =>\n (a.entityData.label || a.entityData.iri).localeCompare(\n b.entityData.label || b.entityData.iri,\n ),\n );\n\n return new Hierarchy({\n parentChildRelations: parentChildRelations,\n entitiesData: entitiesData,\n allChildrenPresent: allChildrenPresent,\n roots: rootNodes,\n api: new SkosApi(this.axiosInstance.getUri()),\n ontologyId: ontologyId,\n mainEntityIri: iri,\n keepExpansionStates: props.keepExpansionStates,\n parameter: parameter,\n });\n }\n\n public async loadHierarchyChildren(\n props: LoadHierarchyChildrenProps,\n ): Promise<EntityData[]> {\n const { nodeToExpand, ontologyId, parameter } = props;\n\n const narrower: PrefAndUriAndChildren[] = (\n await this.makeCall(`/${ontologyId}/children`, {\n params: {\n uri: nodeToExpand.entityData.iri,\n lang: \"en\",\n format: \"application/json\",\n ...dictFromParamString(parameter),\n },\n })\n )[\"narrower\"];\n\n return narrower.map((obj) =>\n SkosEntityDataBuilder.fromPrefAndUriAndChildren(obj, [\n nodeToExpand.entityData.iri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GAAG,EAAE,YAAY,CAAC,UAAU,CAAC,GAAG;AAChC,gBAAA,IAAI,EAAE,IAAI;AACV,gBAAA,MAAM,EAAE,kBAAkB;gBAC1B,GAAG,mBAAmB,CAAC,SAAS,CAAC;AAClC,aAAA;AACF,SAAA,CAAC,EACF,UAAU,CAAC,CAAC;AAEd,QAAA,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,KACtB,qBAAqB,CAAC,yBAAyB,CAAC,GAAG,EAAE;YACnD,YAAY,CAAC,UAAU,CAAC,GAAG;AAC5B,SAAA,CAAC,CACH,CAAC;KACH;AACF;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig } from "axios";
|
|
2
|
+
export declare class OlsBaseApi {
|
|
3
|
+
protected axiosInstance: AxiosInstance;
|
|
4
|
+
constructor(api: string | AxiosInstance);
|
|
5
|
+
protected makeCall(url: string, config: AxiosRequestConfig<any> | undefined, useLegacy: boolean): Promise<any>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { getUseLegacy } from '../../app/util.js';
|
|
3
|
+
import { check_for_errors } from '../../utils/olsApiUtils.js';
|
|
4
|
+
|
|
5
|
+
class OlsBaseApi {
|
|
6
|
+
axiosInstance;
|
|
7
|
+
constructor(api) {
|
|
8
|
+
this.axiosInstance =
|
|
9
|
+
typeof api === "string"
|
|
10
|
+
? axios.create({
|
|
11
|
+
baseURL: api,
|
|
12
|
+
headers: { Accept: "application/json" },
|
|
13
|
+
})
|
|
14
|
+
: api;
|
|
15
|
+
}
|
|
16
|
+
async makeCall(url, config, useLegacy) {
|
|
17
|
+
const apiVersionPrefix = getUseLegacy(useLegacy) ? "" : "v2/";
|
|
18
|
+
const response = (await this.axiosInstance.get(apiVersionPrefix + url, config)).data;
|
|
19
|
+
return check_for_errors(response);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { OlsBaseApi };
|
|
24
|
+
//# sourceMappingURL=OlsBaseApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OlsBaseApi.js","sources":["../../../../../src/api/ols/OlsBaseApi.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosRequestConfig } from \"axios\";\nimport { getUseLegacy } from \"../../app/util\";\nimport { check_for_errors } from \"../../utils/olsApiUtils\";\n\nexport class OlsBaseApi {\n protected axiosInstance: AxiosInstance;\n\n constructor(api: string | AxiosInstance) {\n this.axiosInstance =\n typeof api === \"string\"\n ? axios.create({\n baseURL: api,\n headers: { Accept: \"application/json\" },\n })\n : api;\n }\n\n protected async makeCall(\n url: string,\n config: AxiosRequestConfig<any> | undefined,\n useLegacy: boolean,\n ) {\n const apiVersionPrefix = getUseLegacy(useLegacy) ? \"\" : \"v2/\";\n const response = (\n await this.axiosInstance.get(apiVersionPrefix + url, config)\n ).data;\n return check_for_errors(response);\n }\n}\n"],"names":[],"mappings":";;;;MAIa,UAAU,CAAA;AACX,IAAA,aAAa,CAAgB;AAEvC,IAAA,WAAA,CAAY,GAA2B,EAAA;AACrC,QAAA,IAAI,CAAC,aAAa;YAChB,OAAO,GAAG,KAAK,QAAQ;AACrB,kBAAE,KAAK,CAAC,MAAM,CAAC;AACX,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE;iBACxC,CAAC;kBACF,GAAG,CAAC;KACX;AAES,IAAA,MAAM,QAAQ,CACtB,GAAW,EACX,MAA2C,EAC3C,SAAkB,EAAA;AAElB,QAAA,MAAM,gBAAgB,GAAG,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;AAC9D,QAAA,MAAM,QAAQ,GAAG,CACf,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,GAAG,GAAG,EAAE,MAAM,CAAC,EAC5D,IAAI,CAAC;AACP,QAAA,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;KACnC;AACF;;;;"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { OlsBaseApi } from "./OlsBaseApi";
|
|
2
|
+
import { EntityTypeName } from "../../model/ModelTypeCheck";
|
|
3
|
+
import { Entity, Individual } from "../../model/interfaces";
|
|
4
|
+
import { apiCallFn, ContentParams, JsTreeParams } from "../../utils/olsApiTypes";
|
|
5
|
+
export declare class OlsEntityApi extends OlsBaseApi {
|
|
6
|
+
/**
|
|
7
|
+
* Is used to fetch all terms from the api
|
|
8
|
+
* @param paginationParams
|
|
9
|
+
* @param sortingParams
|
|
10
|
+
* @param contentParams
|
|
11
|
+
* @param parameter
|
|
12
|
+
* @param `useLegacy` Depending on the value of `useLegacy`, `"terms"` (`useLegacy == true`) or `"classes"` (`useLegacy == false`) will be used in the query url
|
|
13
|
+
*/
|
|
14
|
+
getTerms: apiCallFn;
|
|
15
|
+
getProperties: apiCallFn;
|
|
16
|
+
getIndividuals: apiCallFn;
|
|
17
|
+
/**
|
|
18
|
+
* Is used to fetch a term from the api
|
|
19
|
+
* @param paginationParams
|
|
20
|
+
* @param sortingParams
|
|
21
|
+
* @param `contentParams` Always requires the respective object IRI in `contentParams` to be set.
|
|
22
|
+
* If ontologyId is undefined in contentParams, the object will be queried from all ontologies, containing a list of results.
|
|
23
|
+
* If an ontologyId is provided in contentParams, the returned list will only contain the object from that specific ontology.
|
|
24
|
+
* @param parameter
|
|
25
|
+
* @param `useLegacy` Depending on the value of `useLegacy`, `"terms"` (`useLegacy == true`) or `"classes"` (`useLegacy == false`) will be used in the query url
|
|
26
|
+
* @param abortSignal
|
|
27
|
+
*/
|
|
28
|
+
getTerm: apiCallFn;
|
|
29
|
+
/**
|
|
30
|
+
* Is used to fetch a property from the api in ols3.
|
|
31
|
+
* Always requires the respective object IRI in contentParams to be set
|
|
32
|
+
* If ontologyId is undefined in contentParams, the object will be queried from all ontologies, containing a list of results
|
|
33
|
+
* If an ontologyId is provided in contentParams, the returned list will only contain the object from that specific ontology
|
|
34
|
+
*/
|
|
35
|
+
getProperty: apiCallFn;
|
|
36
|
+
/**
|
|
37
|
+
* Is used to fetch an individual from the api in ols3.
|
|
38
|
+
* Always requires the respective object IRI in contentParams to be set
|
|
39
|
+
* If ontologyId is undefined in contentParams, the object will be queried from all ontologies, containing a list of results
|
|
40
|
+
* If an ontologyId is provided in contentParams, the returned list will only contain the object from that specific ontology
|
|
41
|
+
*/
|
|
42
|
+
getIndividual: apiCallFn;
|
|
43
|
+
/**
|
|
44
|
+
* Is used to fetch an entity from the /entities endpoint in the api in ols4.
|
|
45
|
+
* Always requires the respective object IRI in contentParams to be set
|
|
46
|
+
* If ontologyId is undefined in contentParams, the object will be queried from all ontologies, containing a list of results
|
|
47
|
+
* If an ontologyId is provided in contentParams, the returned list will only contain the object from that specific ontology
|
|
48
|
+
*/
|
|
49
|
+
getEntity: apiCallFn;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the whole entity response json with a comfortable wrapper handling entityType, ontologyId and useLegacy
|
|
52
|
+
* @param iri
|
|
53
|
+
* @param entityType queries specific routes if provided and infers type if not
|
|
54
|
+
* @param ontologyId queries ontology routes if provided, otherwise not
|
|
55
|
+
* @param parameter
|
|
56
|
+
* @param useLegacy affects how entityType is inferred if not provided
|
|
57
|
+
*/
|
|
58
|
+
getEntityResponse(iri: string, entityType?: EntityTypeName, ontologyId?: string, parameter?: string, useLegacy?: boolean): Promise<any>;
|
|
59
|
+
private getEntityWithEntityTypeProvided;
|
|
60
|
+
private getEntityWithInferredEntityType;
|
|
61
|
+
/**
|
|
62
|
+
* Returns an Entity object (implementing 'Class', 'Property' or 'Individual').
|
|
63
|
+
* Indirectly fetches the response JSON for the specified entityType, iri, ontologyId, parameter and API version (useLegacy).
|
|
64
|
+
*
|
|
65
|
+
* @param entityType
|
|
66
|
+
* @param iri
|
|
67
|
+
* @param ontologyId
|
|
68
|
+
* @param parameter
|
|
69
|
+
* @param useLegacy
|
|
70
|
+
*/
|
|
71
|
+
getEntityObject(iri: string, entityType?: EntityTypeName, ontologyId?: string, parameter?: string, useLegacy?: boolean): Promise<Entity>;
|
|
72
|
+
getClassInstances(iri: string, ontologyId: string): Promise<Individual[]>;
|
|
73
|
+
getTermRelations: (contentParams: ContentParams) => Promise<any>;
|
|
74
|
+
/**
|
|
75
|
+
* getTermTree:
|
|
76
|
+
* This method always requires an ontologyId in contentParams
|
|
77
|
+
* 1) If no termIri is defined in contentParams, the ontology roots will be queried
|
|
78
|
+
* 2) If a termIri is defined but no child in jsTreeParams, the hierarchy containing that term will be queried
|
|
79
|
+
* 3) If a termIri is defined and also a child in jsTreeParams, the subhierarchy of that child will be queried
|
|
80
|
+
*/
|
|
81
|
+
getTermTree: (contentParams: ContentParams, treeParams: JsTreeParams) => Promise<any>;
|
|
82
|
+
}
|