AtesComp / rdf-transform

RDF Transform is an extension for OpenRefine to transform data into RDF formats.
Other
28 stars 7 forks source link

Process Sub-Records of a Record in Record Mode #1

Open AtesComp opened 2 years ago

AtesComp commented 2 years ago

Currently, when exporting an RDF file, the exporter uses OpenRefine's record indicator to start processing Root Node subject maps as records starting on non-empty cells of the first column and all subsequent empty cells in the column indicating the rest of the record--a following non-empty cell beings a new record. Once a record is identified, as it processes other columns in the transform, the record processing changes to row processing. This is done to process data as independent lines in the record. Otherwise, the record elements would be considered one long row (or rather squashed row) and complimentary subjects of a column acquire properties and objects belonging to other otherwise separate subjects.

However, there may be sub-record structures in a given record designated by the same first column logic but applied to other columns and the initial record processing would be desirable on these columns. The transform should reset the row processing on these sub-records to record mode via a setting on an object mapping to act as a subject record processor by detecting the object column's non-blank and blank cells--forming sub-record ranges mirroring OpenRefine's reported record range--and processing them accordingly.

This is predicated on the initial record or row setting for the data--it should process sub-records only when the data has been set to record mode in OpenRefine.