Creates a new instance of the convertor.
Optionaloptions: Csvw2RdfOptionsOptions for the convertor.
PrivateinputPrivatelocationPrivatenumberPrivateoptionsPrivateoutputPrivateusedPrivate StaticdefaultPrivate StaticnormalizePrivatecolumnMain method for converting a CSVW to RDF, see https://w3c.github.io/csvw/csv2rdf/#json-ld-to-rdf for more information.
descriptor either as parsed or stringified JSON
OptionaloriginalUrl: stringoriginal URL of the descriptor
RDF stream
Convert CSVW to RDF from a CSV file URL. The descriptor will be resolved according to https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#locating-metadata. see https://w3c.github.io/csvw/csv2rdf/#json-ld-to-rdf for more information.
url of the CSV file
RDF stream
PrivateconvertPrivateconvertConverts a cell of the current row to RDF.
Default subject
The row node
The column number.
The offset of the rows.
The offset of the columns.
PrivateconvertConverts a table to RDF.
PrivateconvertConverts table row to RDF by row number.
The row number.
The offset of the rows.
PrivateconvertConverts the values of a table row to RDF.
PrivatecreateCreates a named node or a blank node based on the input.
Input object
PrivatecreatePrivatecreateCreates an RDF list https://ontola.io/blog/ordered-data-in-rdf based on rules provided at https://w3c.github.io/csvw/csv2rdf/#json-ld-to-rdf.
Values of the list
The head of the rdf list
PrivatedatatypeConvert string value to RDF literal based on the datatype URI.
string value to be converted
datatype URI
Optionallang: stringlanguage tag
RDF literal
PrivateemitPrivateemitPrivategetPrivategetPrivategetRetrieves URI templates from well-known URI file.
/.well-known/csvm is resolved relative to this url
URI templates of metadata locations
PrivateheaderPrivateinterpretInteprets the datatype of a value based on the current column description.
string value to be interpreted
Correctly built RDF literal
PrivateisCheck if value should be considered null based on the current column description.
string value to be checked
true if the value is null, false otherwise
PrivatenormalizeGet expanded datatype URI and description for the current column.
[datatype URI, datatype description]
PrivatenormalizeHandle whitespace normalization for the given value and datatype.
string value to be normalized
datatype URI
normalized value
PrivatepreparePrepares URI templates for the conversion.
PrivateprocessProcesses the header of a CSV file and its embedded metadata.
Input stream
The first row of the current table if there is no header and there are no columns defined in the table schema. This row is used to determine the column count and must be passed to the Csvw2RdfConvertor#convertTableRow method.
PrivateprocessProcesses the microsyntax of the CSV file. This currently includes only column titles.
default language of the csv file
number of header rows
number of nonvirtual columns defined in the table schema or undefined if the table schema has no columns defined
CSV stream
PrivatereformatPrivatereformatPrivatereformatReformat string value into a valid string representation of the datatype.
string value to be converted
datatype URI
datatype description
the reformatted value
PrivateresolveLocates metadata for tabular data, see https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#locating-metadata for more information.
CSV file url
URL of metadata file for the given CSV file
PrivatesetSets default values to options if no value is provided.
Optionaloptions: Csvw2RdfOptionsCorrected options
PrivatetemplateExpands a template URI.
Template to be expanded
Source column number (Csvw2RdfConvertor#location column + CsvwDialectDescription#skipColumns)
Source row number (Csvw2RdfConvertor#location row + CsvwDialectDescription#headerRowCount + CsvwDialectDescription#skipRows)
Base IRI
Expanded URI node
PrivatevalidatePrivatevalidatePrivatevalidatePrivateverifyVerify that the metadata URL is valid and contains a table description that matches the CSV file.
url to the descriptor
url to the CSV file
either descriptor and url or null if the descriptor is not valid
Class responsible for converting from CSVW to RDF. This class should not be used in parallel.