-
Notifications
You must be signed in to change notification settings - Fork 35
Codebook enhancements
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.
See conversion:Enhancement; see also Enhancement parameters.
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)