With my column header selection function working from last week, I started implementing some of the functions that will use it. The data environment keeps track at all times now which columns are selected in an array. Some of the functions are toggle functions, for turning on or off certain types of enhancements on the CSV file – these functions can be called on a group of selected columns as well as on one at a time. These two functions keep their own arrays of which columns have been toggled “on” for their respective enhancements. Updating these arrays relies on the selected column array, so the functions know which columns to add or remove.
The data environment also needs to be able to accept any annotations the user may wish to add to the data set for conversion. For example, some of my labmates are working with some data where the column headers for measurements in the table include the units in the header; one table header says, “NH4+ (mg/L)”. A human user can figure out that this means every number in that column is a measurement with the units “milligrams per liter”, but it would take some careful parsing for the computer to know that. The easy alternative is to allow the human performing the CSV to RDF conversion to provide this information explicitly. Annotations could also be important for providing additional metadata describing how a particular procedure, or give a definition for something that might be internal to the institution who created the CSV data table.
The CSV to RDF data environment now creates an empty row just for these types of annotations when the table is generated, between the column header names and the remainder of the data table. This row is hidden when the table is first generated, but it appears when the user uses the context menu to add a comment. Right now, I have this capability working in a very basic sense, and in the next week or so, I hope to provide a good interface window for the user to enter their comment, and maybe even select what type of annotation they want to make from a standard set of annotation properties.