Skip to main content

Class: FederatedCatalogueRestClient

Client for performing federated catalogue operations through REST endpoints.

Extends

  • BaseRestClient

Implements

  • IFederatedCatalogueComponent

Constructors

Constructor

new FederatedCatalogueRestClient(config): FederatedCatalogueRestClient

Create a new instance of FederatedCatalogueRestClient.

Parameters

config

IBaseRestClientConfig

The configuration for the client.

Returns

FederatedCatalogueRestClient

Overrides

BaseRestClient.constructor

Properties

CLASS_NAME

readonly static CLASS_NAME: string

Runtime name for the class.

Methods

className()

className(): string

Returns the class name of the component.

Returns

string

The class name of the component.

Implementation of

IFederatedCatalogueComponent.className


get()

get(datasetId, trustPayload): Promise<IDcatDataset | IDataspaceProtocolCatalogError>

Retrieve a specific dataset by its unique identifier.

Parameters

datasetId

string

The unique identifier of the dataset.

trustPayload

unknown

Optional payload for trust evaluation, if applicable.

Returns

Promise<IDcatDataset | IDataspaceProtocolCatalogError>

A promise that resolves with the dataset if found, or a CatalogError if not found or an error occurs.

Implementation of

IFederatedCatalogueComponent.get


set()

set(dataset, trustPayload): Promise<string | IDataspaceProtocolCatalogError>

Insert or update a dataset in the catalogue.

Parameters

dataset

IDcatDataset

The dataset to store.

trustPayload

unknown

Optional payload for trust evaluation, if applicable.

Returns

Promise<string | IDataspaceProtocolCatalogError>

A promise that resolves with the unique identifier of the stored dataset, or a CatalogError if an error occurs.

Implementation of

IFederatedCatalogueComponent.set


remove()

remove(datasetId, trustPayload): Promise<IDataspaceProtocolCatalogError | undefined>

Remove a dataset from the catalogue by its unique identifier.

Parameters

datasetId

string

The unique identifier of the dataset to remove.

trustPayload

unknown

Optional payload for trust evaluation, if applicable.

Returns

Promise<IDataspaceProtocolCatalogError | undefined>

A promise that resolves with undefined on success, or a CatalogError if removal fails.

Implementation of

IFederatedCatalogueComponent.remove


query()

query(filter, cursor, limit, trustPayload): Promise<{ result: IDataspaceProtocolCatalogError | IDataspaceProtocolCatalog; cursor?: string; }>

Query the federated catalogue with an optional filter.

Parameters

filter

unknown[] | undefined

Optional filter criteria for querying datasets.

cursor

string | undefined

Optional cursor for pagination.

limit

number | undefined

Optional limit for pagination.

trustPayload

unknown

Optional payload for trust evaluation, if applicable.

Returns

Promise<{ result: IDataspaceProtocolCatalogError | IDataspaceProtocolCatalog; cursor?: string; }>

A promise that resolves with the catalog result and optional next-page cursor.

Implementation of

IFederatedCatalogueComponent.query