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>

public class SPARQLResultsTSVMappingStrategy extends SPARQLResultsXSVMappingStrategy
Implements a MappingStrategy to allow opencsv to work in parallel. This is where the input is converted into BindingSets.
Author:
Andrew Rucker Jones
  • Constructor Details Link icon

    • SPARQLResultsTSVMappingStrategy Link icon

      public SPARQLResultsTSVMappingStrategy(ValueFactory valueFactory)
  • Method Details Link icon

    • captureHeader Link icon

      public void captureHeader(com.opencsv.CSVReader reader) throws IOException
      Throws:
      IOException
    • populateNewBean Link icon

      public BindingSet populateNewBean(String[] line)
    • parseValue Link icon

      protected Value parseValue(String valueString)
    • parseLiteral Link icon

      protected Literal parseLiteral(String literal) throws IllegalArgumentException
      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.
    • decodeString Link icon

      protected static String decodeString(String s)
      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.