Skip to main content

Interface: IDataspaceProtocolDataset

Dataset interface compliant with Eclipse Data Space Protocol.

This interface extends IDataset and enforces DS Protocol-specific requirements by overriding properties with more specific types and constraints.

Requirements per DS Protocol:

  • @id MUST be present for dataset identification (REQUIRED)
  • odrl:hasPolicy MUST be present as an array of ODRL Offers (REQUIRED)
  • Array MUST contain at least one IOdrlOffer
  • Each Offer MUST have @type: "Offer"
  • Each Offer MUST have @id or uid for identification
  • dcat:distribution MUST be present (REQUIRED)

Type System Design:

  • W3C DCAT spec defines odrl:hasPolicy as optional singular IOdrlPolicy
  • DS Protocol requires it as a REQUIRED array of IOdrlOffer
  • Interface extension allows TypeScript to override inherited property types
  • Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
  • DS Protocol-specific constraints are defined here

Future Compatibility:

  • Currently only one Offer per dataset is supported
  • Array structure allows future support for multiple offers

See

Extends

  • Omit<IDcatDataset, "odrl:hasPolicy" | "dcat:distribution" | "@type" | "@context">

Indexable

[key: string]: string | number | boolean | IJsonLdContextDefinition | string[] | IJsonLdNodeObject | IJsonLdGraphObject | object & object | object & object | object & object | IJsonLdListObject | IJsonLdSetObject | IJsonLdNodePrimitive[] | IJsonLdLanguageMap | IJsonLdIndexMap | IJsonLdNodeObject[] | IJsonLdIdMap | IJsonLdTypeMap | IJsonLdContextDefinitionElement[] | IJsonLdJsonObject | IJsonLdJsonObject[] | {[key: string]: string; } | null | undefined

[key: number]: string | number | boolean | IJsonLdContextDefinition | string[] | IJsonLdNodeObject | IJsonLdGraphObject | object & object | object & object | object & object | IJsonLdListObject | IJsonLdSetObject | IJsonLdNodePrimitive[] | IJsonLdLanguageMap | IJsonLdIndexMap | IJsonLdNodeObject[] | IJsonLdIdMap | IJsonLdTypeMap | IJsonLdContextDefinitionElement[] | IJsonLdJsonObject | IJsonLdJsonObject[] | {[key: string]: string; } | null | undefined

Properties

@context

@context: DataspaceProtocolContextType

LD Context. Required per Eclipse Data Space Protocol.


@type

@type: "Dataset"

The type identifier for the dataset. REQUIRED per Eclipse Data Space Protocol.


@id

@id: string

Unique identifier for the dataset. REQUIRED per Eclipse Data Space Protocol.


hasPolicy

hasPolicy: ObjectOrArray<Omit<IOdrlOffer, "@context">>

Array of ODRL policies (Offers) as required by DS Protocol.

REQUIRED per Eclipse Data Space Protocol spec. Must contain at least one IOdrlOffer. Currently only single offer is supported, but array structure allows for future multi-offer support.


distribution

distribution: ObjectOrArray<Omit<IDataspaceProtocolDistribution, "@context">>

Distribution of the dataset. REQUIRED per Eclipse Data Space Protocol.