Class SPARQLResultsTSVMappingStrategy
java.lang.Object
org.eclipse.rdf4j.query.resultio.text.SPARQLResultsXSVMappingStrategy
org.eclipse.rdf4j.query.resultio.text.tsv.SPARQLResultsTSVMappingStrategy
- All Implemented Interfaces:
com.opencsv.bean.MappingStrategy<BindingSet>
- Direct Known Subclasses:
SPARQLStarResultsTSVMappingStrategy
Implements a
MappingStrategy to allow opencsv to work in parallel. This is where the input
is converted into BindingSets.-
Field Summary
Fields inherited from class SPARQLResultsXSVMappingStrategy
bindingNames, numberPattern, valueFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcaptureHeader(com.opencsv.CSVReader reader) protected static StringDecodes an encoded Turtle string.private intfindEndOfLabel(String literal) Finds the end of the label in a literal string.protected LiteralparseLiteral(String literal) Parses a literal, creates an object for it and returns this object.protected ValueparseValue(String valueString) populateNewBean(String[] line) Methods inherited from class SPARQLResultsXSVMappingStrategy
generateHeader, getBindingNames, isAnnotationDriven, parseNumberPatternMatch, setErrorLocale, setType, transmuteBeanMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.opencsv.bean.MappingStrategy
ignoreFields, setProfile
-
Constructor Details
-
SPARQLResultsTSVMappingStrategy
-
-
Method Details
-
captureHeader
- Throws:
IOException
-
populateNewBean
-
parseValue
-
parseLiteral
Parses a literal, creates an object for it and returns this object.- Parameters:
literal- The literal to parse.- Returns:
- An object representing the parsed literal.
- Throws:
IllegalArgumentException- If the supplied literal could not be parsed correctly.
-
findEndOfLabel
Finds the end of the label in a literal string.- Returns:
- The index of the double quote ending the label.
-
decodeString
Decodes an encoded Turtle string. Any \-escape sequences are substituted with their decoded value.- Parameters:
s- An encoded Turtle string.- Returns:
- The unencoded string.
- Throws:
IllegalArgumentException- If the supplied string is not a correctly encoded Turtle string.
-