Skip to content

conversion:Only_if_column

timrdf edited this page Jul 6, 2012 · 13 revisions
csv2rdf4lod-automation is licensed under the [Apache License, Version 2.0](https://github.com/timrdf/csv2rdf4lod-automation/wiki/License)

Structural conversion:Enhancements:


The processing of an entire row can be omitted using the Only if column enhancement type. When an enhancement is typed to this class, its column must contain a non-empty value to be processed.

e.g. Dataset 10030

@prefix rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:       <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:        <http://www.w3.org/2001/XMLSchema#> .
@prefix void:       <http://rdfs.org/ns/void#> .
@prefix ov:         <http://open.vocab.org/terms/> .
@prefix conversion: <http://purl.org/twc/vocab/conversion/> .
@prefix :           <http://logd.tw.rpi.edu/dfid-gov-uk/dataset/10030/params/enhancement/1/> .

:dataset a void:Dataset;
   conv:base_uri           "http://logd.tw.rpi.edu"^^xsd:anyURI;
   conv:source_identifier  "dfid-gov-uk";
   conv:dataset_identifier "10030";
   conv:dataset_version    "12-Jan-2010";
   conv:conversion_process [
      conversion:enhancement_identifier "1";
      conversion:headerRow             4;
      conversion:dataStartRow          8;
      conversion:dataEndRow            150;
      conversion:enhance [
         ov:csvCol        "1"^^xsd:integer; 
         conversion:range rdfs:Resource;
      ];
      conversion:enhance [
         ov:csvCol        "2"^^xsd:integer; 
         a conversion:Only_if_column;
         conversion:range xsd:date;
      ];
   ];
.

TODO: accept pattern for what should be accepted beyond non-empty.

Clone this wiki locally