com.hp.hpl.jena.sparql.resultset
Class CSVInput
java.lang.Object
com.hp.hpl.jena.sparql.resultset.CSVInput
public class CSVInput
- extends Object
Convenient comma separated values - see also TSV (tab separated values)
which outputs full RDF terms (in Turtle-style).
The CSV format supported is:
- First row is variable names without '?'
- Strings, quoted if necessary and numbers output only.
No language tags, or datatypes.
URIs are send without $lt;>
CSV is RFC 4180, but there are many variations.
This code reads the file and treats everything as strings.
The code also allows for parsing boolean results where we expect the header to be a single string
from the set: true yes false no
Any other value is considered an error for parsing a boolean results and anything past the first line is ignored
CSVInput
public CSVInput()
fromCSV
public static ResultSet fromCSV(InputStream in)
booleanFromCSV
public static boolean booleanFromCSV(InputStream in)
Licenced under the Apache License, Version 2.0