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:
@idMUST be present for dataset identification (REQUIRED)odrl:hasPolicyMUST 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
@idoruidfor identification dcat:distributionMUST be present (REQUIRED)
Type System Design:
- W3C DCAT spec defines
odrl:hasPolicyas optional singularIOdrlPolicy - 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
- https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
- https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
- IOdrlOffer from @twin.org/standards-w3c-odrl
- IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
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.