Class SPARQLTSVResultParser
- java.lang.Object
-
- com.stardog.stark.query.io.text.tsv.SPARQLTSVResultParser
-
- All Implemented Interfaces:
QueryResultParser<SelectQueryResultHandler>,SelectQueryResultParser
public final class SPARQLTSVResultParser extends java.lang.Object implements SelectQueryResultParser
Implementation of
parsingquery resultsin SPARQL/TSV format.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Constructor Summary
Constructors Constructor Description SPARQLTSVResultParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringdecodeString(java.lang.String theStr)Decodes an encoded Turtle string.QueryResultFormatformat()The format this parser can parsevoidparse(java.io.InputStream theStream, SelectQueryResultHandler theHandler, Options theOptions)Parse the results.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.stardog.stark.query.io.QueryResultParser
parse
-
-
-
-
Method Detail
-
format
@Nonnull public QueryResultFormat format()
The format this parser can parse- Specified by:
formatin interfaceQueryResultParser<SelectQueryResultHandler>- Returns:
- the format
-
parse
public void parse(@Nonnull java.io.InputStream theStream, @Nonnull SelectQueryResultHandler theHandler, @Nonnull Options theOptions) throws java.io.IOExceptionParse the results.- Specified by:
parsein interfaceQueryResultParser<SelectQueryResultHandler>- Parameters:
theStream- the stream to read fromtheHandler- the handler to pass parse events totheOptions- the parsing options- Throws:
java.io.IOException- if there was an error while reading from the stream
-
decodeString
public static java.lang.String decodeString(@Nonnull java.lang.String theStr)Decodes an encoded Turtle string. Any \-escape sequences are substituted with their decoded value.- Parameters:
theStr- An encoded Turtle string.- Returns:
- The unencoded string.
- Throws:
java.lang.IllegalArgumentException- If the supplied string is not a correctly encoded Turtle string.
-
-