From 4a797c2ecdec6874175b4618732c7b70eadea13d Mon Sep 17 00:00:00 2001 From: sahalali Date: Mon, 21 Oct 2024 16:38:19 +0530 Subject: [PATCH] Updated signe laval config to use a custom file --- .github/workflows/export-cms-entities.yml | 54 +- ...xport-signe-laval-entities-to-artsdata.yml | 2 +- .../cms-custom-signe-laval-configuration.json | 120 ++ .../cms-events-signe-laval-configuration.json | 1215 ----------------- 4 files changed, 160 insertions(+), 1231 deletions(-) create mode 100644 ontotext-refine/cms-custom-signe-laval-configuration.json delete mode 100644 ontotext-refine/cms-events-signe-laval-configuration.json diff --git a/.github/workflows/export-cms-entities.yml b/.github/workflows/export-cms-entities.yml index 1d6aa56..84a6776 100644 --- a/.github/workflows/export-cms-entities.yml +++ b/.github/workflows/export-cms-entities.yml @@ -6,7 +6,7 @@ on: source: required: true type: string - event_mapping_file: + custom_config_file: required: false type: string secrets: @@ -76,17 +76,22 @@ jobs: - name: Download configuration files for transformation id: step-5 - run: | - event_url=${{ inputs.event_mapping_file || 'cms-events-configuration.json' }} - - curl "https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/${event_url}" >> event-transform-config.json && + run: | + curl "https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/cms-events-configuration.json" >> event-transform-config.json && curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/cms-places-configuration.json' >> place-transform-config.json && curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/cms-organizations-configuration.json' >> organization-transform-config.json && curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/cms-people-configuration.json' >> person-transform-config.json && - curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/cms-taxonomies-configuration.json' >> taxonomy-transform-config.json + curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/cms-taxonomies-configuration.json' >> taxonomy-transform-config.json + + - name: Download custom configuration file + id: step-6 + if: ${{ inputs.custom_config_file }} + run: | + custom_url=${{ inputs.custom_config_file }} + curl "https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/${custom_url}" >> custom-transform-config.json - name: Download column addition files for transformation - id: step-6 + id: step-7 run: | curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/column-additions/event.json' >> event-columns.json && curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/column-additions/place.json' >> place-columns.json && @@ -94,7 +99,7 @@ jobs: curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-footlight/main/ontotext-refine/column-additions/person.json' >> person-columns.json - name: Transform configurations to include column additions - id: step-7 + id: step-8 shell: bash run: | entities=("event" "place" "organization" "person") @@ -110,7 +115,7 @@ jobs: - name: Transform events in JSON to RDF - id: step-8 + id: step-9 run: | /opt/ontorefine/dist/bin/ontorefine-cli \ transform events.json \ @@ -119,7 +124,7 @@ jobs: -f json >> events.ttl - name: Transform places in JSON to RDF - id: step-9 + id: step-10 run: | /opt/ontorefine/dist/bin/ontorefine-cli \ transform places.json \ @@ -128,7 +133,7 @@ jobs: -f json >> places.ttl - name: Transform organizations in JSON to RDF - id: step-10 + id: step-11 run: | /opt/ontorefine/dist/bin/ontorefine-cli \ transform organizations.json \ @@ -137,7 +142,7 @@ jobs: -f json >> organizations.ttl - name: Transform people in JSON to RDF - id: step-11 + id: step-12 run: | /opt/ontorefine/dist/bin/ontorefine-cli \ transform people.json \ @@ -146,16 +151,26 @@ jobs: -f json >> people.ttl - name: Transform taxonomies in JSON to RDF - id: step-12 + id: step-13 run: | /opt/ontorefine/dist/bin/ontorefine-cli \ transform '/__w/artsdata-planet-footlight/artsdata-planet-footlight/flatten-taxonomies.json' \ -u http://localhost:7333 \ --configurations taxonomy-transform-config.json \ -f json >> taxonomies.ttl + + - name: Transform custom fields in JSON to RDF + if: ${{ inputs.custom_config_file }} + id: step-14 + run: | + /opt/ontorefine/dist/bin/ontorefine-cli \ + transform events.json \ + -u http://localhost:7333 \ + --configurations custom-transform-config.json \ + -f json >> custom.ttl - name: Concatenate the files - id: step-13 + id: step-15 run : | cat \ events.ttl \ @@ -165,8 +180,17 @@ jobs: taxonomies.ttl \ > ${{inputs.source}}.ttl + - name: Concatenate custom fields + id: step-16 + if: ${{ inputs.custom_config_file }} + run: | + cat \ + ${{inputs.source}}.ttl \ + custom.ttl \ + > ${{inputs.source}}.ttl + - name: Upload entities in RDF to S3 - id: step-14 + id: step-17 uses: keithweaver/aws-s3-github-action@v1.0.0 with: command: cp diff --git a/.github/workflows/export-signe-laval-entities-to-artsdata.yml b/.github/workflows/export-signe-laval-entities-to-artsdata.yml index 28fa073..2273947 100644 --- a/.github/workflows/export-signe-laval-entities-to-artsdata.yml +++ b/.github/workflows/export-signe-laval-entities-to-artsdata.yml @@ -10,7 +10,7 @@ jobs: uses: ./.github/workflows/export-cms-entities.yml with: source: signe-laval - event_mapping_file: "cms-events-signe-laval-configuration.json" + custom_config_file: "cms-custom-signe-laval-configuration.json" secrets: PUBLISHER_URI_GREGORY: ${{ secrets.PUBLISHER_URI_GREGORY }} S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} diff --git a/ontotext-refine/cms-custom-signe-laval-configuration.json b/ontotext-refine/cms-custom-signe-laval-configuration.json new file mode 100644 index 0000000..e00fe8d --- /dev/null +++ b/ontotext-refine/cms-custom-signe-laval-configuration.json @@ -0,0 +1,120 @@ +{ + "importOptions": [ + { + "recordPath": [ + "_", + "data", + "_" + ], + "limit": -1, + "trimStrings": false, + "guessCellValueTypes": false, + "storeEmptyStrings": false, + "includeFileSources": false, + "includeArchiveFileName": false, + "disableAutoPreview": false, + "projectName": "cli-transform-events.json-2024-08-02", + "projectTags": [], + "fileSource": "events.json", + "archiveFileName": null + } + ], + "operations": [ + { + "op": "core/fill-down", + "engineConfig": { + "facets": [], + "mode": "record-based" + }, + "columnName": "_ - id", + "description": "Fill down cells in column _ - id" + }, + { + "op": "core/column-addition-by-fetching-urls", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "baseColumnName": "_ - id", + "urlExpression": "grel:\"https://api.footlight.io/events/\" + value", + "onError": "set-to-blank", + "newColumnName": "eventType", + "columnInsertIndex": 1, + "delay": 5000, + "cacheResponses": true, + "httpHeadersJson": [ + { + "name": "authorization", + "value": "" + }, + { + "name": "user-agent", + "value": "OpenRefine [1]" + }, + { + "name": "accept", + "value": "*/*" + } + ], + "description": "Create column eventType at index 1 by fetching URLs based on column _ - id using expression grel:\"https://api.footlight.io/events/\" + value" + }, + { + "op": "mapping-editor/save-rdf-mapping", + "mapping": { + "baseIRI": "http://lod.footlight.io/resource/", + "namespaces": { + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "skos": "http://www.w3.org/2004/02/skos/core#", + "footlight": "http://lod.footlight.io/resource/" + }, + "subjectMappings": [ + { + "subject": { + "valueSource": { + "source": "column", + "columnName": "_ - id" + }, + "transformation": { + "language": "prefix", + "expression": "footlight" + } + }, + "typeMappings": [], + "propertyMappings": [ + { + "property": { + "valueSource": { + "source": "constant", + "constant": "additionalType" + }, + "transformation": { + "language": "prefix", + "expression": "schema" + } + }, + "values": [ + { + "valueSource": { + "source": "row_index" + }, + "transformation": { + "language": "grel", + "expression": "forEach(parseJson(cells[\"eventType\"].value).data[\"63bd80901c6b6c005aad6f4b\"], v, \"http://lod.footlight.io/resource/\" + v.id)" + }, + "valueType": { + "type": "iri", + "typeMappings": [], + "propertyMappings": [] + } + } + ] + } + ] + } + ] + }, + "description": "Save RDF Mapping" + } + ] + } \ No newline at end of file diff --git a/ontotext-refine/cms-events-signe-laval-configuration.json b/ontotext-refine/cms-events-signe-laval-configuration.json deleted file mode 100644 index 217b2b8..0000000 --- a/ontotext-refine/cms-events-signe-laval-configuration.json +++ /dev/null @@ -1,1215 +0,0 @@ -{ - "importOptions": [ - { - "recordPath": [ - "_", - "data", - "_" - ], - "limit": -1, - "trimStrings": false, - "guessCellValueTypes": false, - "storeEmptyStrings": false, - "includeFileSources": false, - "includeArchiveFileName": false, - "disableAutoPreview": false, - "projectName": "cli-transform-events.json-2024-08-02", - "projectTags": [], - "fileSource": "events.json", - "archiveFileName": null - } - ], - "operations": [ - { - "op": "core/fill-down", - "engineConfig": { - "facets": [], - "mode": "record-based" - }, - "columnName": "_ - id", - "description": "Fill down cells in column _ - id" - }, - { - "op": "core/column-addition-by-fetching-urls", - "engineConfig": { - "facets": [], - "mode": "row-based" - }, - "baseColumnName": "_ - id", - "urlExpression": "grel:\"https://api.footlight.io/events/\" + value", - "onError": "set-to-blank", - "newColumnName": "eventType", - "columnInsertIndex": 1, - "delay": 5000, - "cacheResponses": true, - "httpHeadersJson": [ - { - "name": "authorization", - "value": "" - }, - { - "name": "user-agent", - "value": "OpenRefine [1]" - }, - { - "name": "accept", - "value": "*/*" - } - ], - "description": "Create column eventType at index 1 by fetching URLs based on column _ - id using expression grel:\"https://api.footlight.io/events/\" + value" - }, - { - "op": "mapping-editor/save-rdf-mapping", - "mapping": { - "baseIRI": "http://lod.footlight.io/resource/", - "namespaces": { - "xsd": "http://www.w3.org/2001/XMLSchema#", - "schema": "http://schema.org/", - "skos": "http://www.w3.org/2004/02/skos/core#", - "footlight": "http://lod.footlight.io/resource/" - }, - "subjectMappings": [ - { - "subject": { - "valueSource": { - "source": "column", - "columnName": "_ - id" - }, - "transformation": { - "language": "prefix", - "expression": "footlight" - } - }, - "typeMappings": [ - { - "valueSource": { - "source": "constant", - "constant": "Event" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - } - ], - "propertyMappings": [ - { - "property": { - "valueSource": { - "source": "constant", - "constant": "name" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - name - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - name - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "additionalType" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - additionalType - _ - id" - }, - "transformation": { - "language": "prefix", - "expression": "footlight" - }, - "valueType": { - "type": "iri", - "typeMappings": [], - "propertyMappings": [] - } - }, - { - "valueSource": { - "source": "row_index" - }, - "transformation": { - "language": "grel", - "expression": "forEach(parseJson(cells[\"eventType\"].value).data[\"63bd80901c6b6c005aad6f4b\"], v, \"http://lod.footlight.io/resource/\" + v.id)" - }, - "valueType": { - "type": "iri", - "typeMappings": [], - "propertyMappings": [] - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "location" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - id" - }, - "transformation": { - "language": "prefix", - "expression": "footlight" - }, - "valueType": { - "type": "iri", - "typeMappings": [ - { - "valueSource": { - "source": "constant", - "constant": "Place" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - } - ], - "propertyMappings": [ - { - "property": { - "valueSource": { - "source": "constant", - "constant": "name" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - name - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - name - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "address" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - id" - }, - "transformation": { - "language": "prefix", - "expression": "footlight" - }, - "valueType": { - "type": "iri", - "typeMappings": [ - { - "valueSource": { - "source": "constant", - "constant": "PostalAddress" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - } - ], - "propertyMappings": [ - { - "property": { - "valueSource": { - "source": "constant", - "constant": "addressCountry" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - addressCountry - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - addressCountry - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "addressLocality" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - addressLocality - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - addressLocality - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "addressRegion" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - addressRegion - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - addressRegion - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "postalCode" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - postalCode" - }, - "valueType": { - "type": "literal" - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "streetAddress" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - streetAddress - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - address - streetAddress - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - } - ] - } - ] - } - } - ] - } - ] - } - }, - { - "valueSource": { - "source": "row_index" - }, - "transformation": { - "language": "grel", - "expression": "if(cells[\"_ - location - _ - type\"].value ==\"VirtualLocation\",\"http://lod.footlight.io/resource/\"+cells[\"_ - id\"].value+\"#VirtualLocation\",null )" - }, - "valueType": { - "type": "iri", - "typeMappings": [ - { - "valueSource": { - "source": "constant", - "constant": "VirtualLocation" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - } - ], - "propertyMappings": [ - { - "property": { - "valueSource": { - "source": "constant", - "constant": "url" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - url" - }, - "valueType": { - "type": "literal" - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "name" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - name - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - location - _ - name - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - } - ] - } - ] - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "eventAttendanceMode" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - eventAttendanceMode" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - }, - "valueType": { - "type": "iri", - "typeMappings": [], - "propertyMappings": [] - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "eventStatus" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - eventStatus" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - }, - "valueType": { - "type": "iri", - "typeMappings": [], - "propertyMappings": [] - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "sameAs" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - sameAs - sameAs" - }, - "transformation": { - "language": "raw" - }, - "valueType": { - "type": "iri", - "typeMappings": [], - "propertyMappings": [] - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "startDate" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - startDate" - }, - "valueType": { - "type": "datatype_literal", - "datatype": { - "valueSource": { - "source": "constant", - "constant": "date" - }, - "transformation": { - "language": "prefix", - "expression": "xsd" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - startDateTime" - }, - "valueType": { - "type": "datatype_literal", - "datatype": { - "valueSource": { - "source": "constant", - "constant": "dateTime" - }, - "transformation": { - "language": "prefix", - "expression": "xsd" - } - } - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "endDate" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - endDate" - }, - "valueType": { - "type": "datatype_literal", - "datatype": { - "valueSource": { - "source": "constant", - "constant": "date" - }, - "transformation": { - "language": "prefix", - "expression": "xsd" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - endDateTime" - }, - "valueType": { - "type": "datatype_literal", - "datatype": { - "valueSource": { - "source": "constant", - "constant": "dateTime" - }, - "transformation": { - "language": "prefix", - "expression": "xsd" - } - } - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "url" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - url" - }, - "valueType": { - "type": "literal" - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "description" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - description - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - description - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "image" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - image - original" - }, - "valueType": { - "type": "literal" - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "performer" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "row_index" - }, - "transformation": { - "language": "grel", - "expression": "if(cells[\"_ - performers - _ - type\"].value != null, unescape(\"http://lod.footlight.io/resource/\" +cells[\"_ - performers - _ - id\"].value,\"url\"),null )" - }, - "valueType": { - "type": "iri", - "typeMappings": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - performers - _ - type" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - } - ], - "propertyMappings": [ - { - "property": { - "valueSource": { - "source": "constant", - "constant": "name" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - performers - _ - name - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - performers - _ - name - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - } - ] - } - ] - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "organizer" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "row_index" - }, - "transformation": { - "language": "grel", - "expression": "if(cells[\"_ - organizers - _ - type\"].value != null, unescape(\"http://lod.footlight.io/resource/\" +cells[\"_ - organizers - _ - id\"].value,\"url\"),null )" - }, - "valueType": { - "type": "iri", - "typeMappings": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - organizers - _ - type" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - } - ], - "propertyMappings": [ - { - "property": { - "valueSource": { - "source": "constant", - "constant": "name" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - organizers - _ - name - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - organizers - _ - name - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - } - ] - } - ] - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "offers" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "row_index" - }, - "transformation": { - "language": "grel", - "expression": "if(cells[\"_ - offers - _ - type\"].value == \"AggregateOffer\", \"http://lod.footlight.io/resource/\" + cells[\"_ - id\"].value + \"#Offer\",null )" - }, - "valueType": { - "type": "iri", - "typeMappings": [ - { - "valueSource": { - "source": "constant", - "constant": "AggregateOffer" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - } - ], - "propertyMappings": [ - { - "property": { - "valueSource": { - "source": "constant", - "constant": "url" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - offers - _ - url" - }, - "valueType": { - "type": "literal" - } - } - ] - }, - { - "property": { - "valueSource": { - "source": "constant", - "constant": "price" - }, - "transformation": { - "language": "prefix", - "expression": "schema" - } - }, - "values": [ - { - "valueSource": { - "source": "row_index" - }, - "transformation": { - "language": "grel", - "expression": "if(cells[\"_ - offers - _ - additionalType\"].value == \"FREE\", \"0.0\", nil)" - }, - "valueType": { - "type": "literal" - } - } - ] - } - ] - } - } - ] - } - ] - }, - { - "subject": { - "valueSource": { - "source": "column", - "columnName": "_ - additionalType - _ - id" - }, - "transformation": { - "language": "prefix", - "expression": "footlight" - } - }, - "typeMappings": [ - { - "valueSource": { - "source": "constant", - "constant": "Concept" - }, - "transformation": { - "language": "prefix", - "expression": "skos" - } - } - ], - "propertyMappings": [ - { - "property": { - "valueSource": { - "source": "constant", - "constant": "prefLabel" - }, - "transformation": { - "language": "prefix", - "expression": "skos" - } - }, - "values": [ - { - "valueSource": { - "source": "column", - "columnName": "_ - additionalType - _ - name - fr" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "fr" - } - } - } - }, - { - "valueSource": { - "source": "column", - "columnName": "_ - additionalType - _ - name - en" - }, - "valueType": { - "type": "language_literal", - "language": { - "valueSource": { - "source": "constant", - "constant": "en" - } - } - } - } - ] - } - ] - } - ] - }, - "description": "Save RDF Mapping" - } - ] - } \ No newline at end of file