-
Notifications
You must be signed in to change notification settings - Fork 36
Codebook enhancements
Codebook enhancements are specified by conversion:interpret, see it for an introduction and discussion.
See also conversion:Enhancement and Enhancement parameters.
Codebook enhancements effectively replace values found in cells of CSVs with a predefined value. This is done to avoid modifying the input file. Often, codes are used to abbreviate longer, more meaningful, values. Codebook enhancements are shown in Enhancement Parameters Reference.
edu.rpi.tw.data.csv.querylets.column.CodebookQuerylet
is used to obtain any codes that should be applied according to the input parameters (it returns a hashmap of java:String to sesame:Value). When processing bindings, the CodebookQuerylet
prints something similar to stderr (using the example at Enhancing a CSV that describes another CSV's headers):
CodebookQuerylet(1) .ID No.. -> ."id_no".
edu.rpi.tw.data.csv.impl.ValueHandlerFactory
uses CodebookQuerylet
to obtain the codes and pass them when instantiating the ValueHandler
for a column.
edu.rpi.tw.data.csv.CSVtoRDF#visit
passes the ValueHandler
the value of the CSV cell (after an optional conversion:delimit_object)