Class AbstractSPARQLJSONParser
- java.lang.Object
-
- org.eclipse.rdf4j.query.resultio.AbstractQueryResultParser
-
- org.eclipse.rdf4j.query.resultio.sparqljson.AbstractSPARQLJSONParser
-
- All Implemented Interfaces:
QueryResultParser
- Direct Known Subclasses:
SPARQLBooleanJSONParser,SPARQLResultsJSONParser
public abstract class AbstractSPARQLJSONParser extends AbstractQueryResultParser
Abstract base class for SPARQL Results JSON Parsers. Provides a common implementation of both boolean and tuple parsing.- Author:
- Peter Ansell, Sebastian Schaffert
-
-
Field Summary
Fields Modifier and Type Field Description static StringBINDINGSstatic StringBNODEstatic StringBOOLEANstatic StringDATATYPEstatic StringHEADstatic StringLINKstatic StringLITERALstatic StringRESULTSstatic StringTYPEstatic StringTYPED_LITERALstatic StringURIstatic StringVALUEstatic StringVARSstatic StringXMLLANG-
Fields inherited from class org.eclipse.rdf4j.query.resultio.AbstractQueryResultParser
handler, valueFactory
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSPARQLJSONParser()protectedAbstractSPARQLJSONParser(org.eclipse.rdf4j.model.ValueFactory valueFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckTripleType(com.fasterxml.jackson.core.JsonParser jp, String type)Collection<org.eclipse.rdf4j.rio.RioSetting<?>>getSupportedSettings()voidparseQueryResult(InputStream in)protected booleanparseQueryResultInternal(InputStream in, boolean attemptParseBoolean, boolean attemptParseTuple)protected org.eclipse.rdf4j.model.TripleparseTripleValue(com.fasterxml.jackson.core.JsonParser jp, String fieldName)protected org.eclipse.rdf4j.model.ValueparseValue(com.fasterxml.jackson.core.JsonParser jp, String bindingStr)-
Methods inherited from class org.eclipse.rdf4j.query.resultio.AbstractQueryResultParser
getParseErrorListener, getParseLocationListener, getParserConfig, set, setParseErrorListener, setParseLocationListener, setParserConfig, setQueryResultHandler, setValueFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.query.resultio.QueryResultParser
getQueryResultFormat
-
-
-
-
Field Detail
-
HEAD
public static final String HEAD
- See Also:
- Constant Field Values
-
LINK
public static final String LINK
- See Also:
- Constant Field Values
-
VARS
public static final String VARS
- See Also:
- Constant Field Values
-
BOOLEAN
public static final String BOOLEAN
- See Also:
- Constant Field Values
-
RESULTS
public static final String RESULTS
- See Also:
- Constant Field Values
-
BINDINGS
public static final String BINDINGS
- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
VALUE
public static final String VALUE
- See Also:
- Constant Field Values
-
XMLLANG
public static final String XMLLANG
- See Also:
- Constant Field Values
-
DATATYPE
public static final String DATATYPE
- See Also:
- Constant Field Values
-
LITERAL
public static final String LITERAL
- See Also:
- Constant Field Values
-
TYPED_LITERAL
public static final String TYPED_LITERAL
- See Also:
- Constant Field Values
-
BNODE
public static final String BNODE
- See Also:
- Constant Field Values
-
URI
public static final String URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseQueryResult
public void parseQueryResult(InputStream in) throws IOException, QueryResultParseException, QueryResultHandlerException
-
parseQueryResultInternal
protected boolean parseQueryResultInternal(InputStream in, boolean attemptParseBoolean, boolean attemptParseTuple) throws IOException, QueryResultParseException, QueryResultHandlerException
-
parseValue
protected org.eclipse.rdf4j.model.Value parseValue(com.fasterxml.jackson.core.JsonParser jp, String bindingStr) throws IOException- Throws:
IOException
-
parseTripleValue
protected org.eclipse.rdf4j.model.Triple parseTripleValue(com.fasterxml.jackson.core.JsonParser jp, String fieldName) throws IOException- Throws:
IOException
-
checkTripleType
protected boolean checkTripleType(com.fasterxml.jackson.core.JsonParser jp, String type)
-
getSupportedSettings
public Collection<org.eclipse.rdf4j.rio.RioSetting<?>> getSupportedSettings()
- Specified by:
getSupportedSettingsin interfaceQueryResultParser- Overrides:
getSupportedSettingsin classAbstractQueryResultParser
-
-