Variable: applyDcatMapping
ts
const applyDcatMapping: (sourceData, mapping, options) => object = applyRdfMapping;Defined in: application/services/transformers/rdf/rdf-mapping-engine.ts:1301
Applies a declarative mapping document to source data and returns JSON-LD of the form { '@context', '@graph' }. The graph holds the root node and, when any rule targets record.*, a secondary record node. The mapping's context replaces the default context.
Parameters
| Parameter | Type | Description |
|---|---|---|
sourceData | any | Document data, read through each rule's JSON-pointer source. |
mapping | any | Mapping document with rules and optional context, rootType, recordType, recordTopicProp and vocab. |
options? | RdfMappingOptions | - |
Returns
object
Example
ts
const entry = findRdfMapping('ds:datasheet-v2', 'dcat-ap');
if (entry) {
const jsonLd = applyRdfMapping(doc.data, entry.mapping, { rootUri: 'https://example.org/ds/1' });
}Deprecated
DCAT-flavoured name kept for compatibility — use applyRdfMapping.