-
Notifications
You must be signed in to change notification settings - Fork 36
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:
- conversion:charset - to specify the character encoding of the input file.
- conversion:HeaderRow - to specify the row that contains header data (or [dimensional values](Converting with cell based subjects)).
-
conversion:DataStartRow - to specify the first (inclusive) row that contains data.
- conversion:delimits_cell - to specify the character that terminates a cell.
- conversion:Only_if_column - to omit processing a row if a certain column's value is missing.
- conversion:Repeat_previous_if_empty_column - to "downfill" an empty cell with the value from above.
- conversion:repeat_previous - to specify a value that indicates repetition (instead of just an empty value).
- conversion:Omitted - to specify a column to omit.
- conversion:DataEndRow - to specify the last (inclusive) row that contains data.
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.