Class SPARQLUpdateDataBlockParser
java.lang.Object
org.eclipse.rdf4j.rio.helpers.AbstractRDFParser
org.eclipse.rdf4j.rio.turtle.TurtleParser
org.eclipse.rdf4j.rio.trig.TriGParser
org.eclipse.rdf4j.rio.trigstar.TriGStarParser
org.eclipse.rdf4j.query.parser.sparql.SPARQLUpdateDataBlockParser
- All Implemented Interfaces:
RDFParser
- Direct Known Subclasses:
SPARQLUpdateDataBlockParser
An extension of
TriGStarParser
that processes data in the format specified in the SPARQL 1.1 grammar for Quad
data (assuming no variables, as is the case for INSERT DATA and DELETE DATA operations). This format is almost
completely compatible with TriG, except for three differences:
- it introduces the 'GRAPH' keyword in front of each named graph identifier
- it does not allow the occurrence of blank nodes.
- it does not require curly braces around the default graph.
- it adds support for RDF-star triples (from TriG-star).
- Author:
- Jeen Broekstra
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.rio.turtle.TurtleParser
object, predicate, subject
Fields inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFParser
rdfHandler, valueFactory
-
Constructor Summary
ConstructorDescriptionCreates a new parser that will use aSimpleValueFactory
to create RDF model objects.SPARQLUpdateDataBlockParser
(ValueFactory valueFactory) Creates a new parser that will use the supplied ValueFactory to create RDF model objects. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Gets the RDF format that this parser can parse.boolean
protected void
protected Resource
Parses an implicit blank node.protected Resource
Parses a blank node ID, e.g.void
setAllowBlankNodes
(boolean allowBlankNodes) void
setLineNumberOffset
(int lineNumberOffset) Methods inherited from class org.eclipse.rdf4j.rio.trigstar.TriGStarParser
parseValue, setContext
Methods inherited from class org.eclipse.rdf4j.rio.trig.TriGParser
getContext, parseStatement, parseTriples, reportStatement
Methods inherited from class org.eclipse.rdf4j.rio.turtle.TurtleParser
getSupportedSettings, parse, parse, parseAnnotation, parseBase, parseCollection, parseDirective, parseLongString, parseNumber, parseObject, parseObjectList, parsePredicate, parsePredicateObjectList, parsePrefixID, parseQNameOrBoolean, parseQuotedLiteral, parseQuotedString, parseString, parseSubject, parseTripleValue, parseURI, peekCodePoint, peekIsTripleValue, processComment, readCodePoint, reportError, reportFatalError, reportFatalError, reportLocation, reportWarning, skipWSC, throwEOFException, unread, unread, verifyCharacterOrFail
Methods inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFParser
clear, clearBNodeIDMap, createBNode, createBNode, createLiteral, createLiteral, createLiteral, createNode, createNode, createStatement, createStatement, createURI, getNamespace, getParseErrorListener, getParseLocationListener, getParserConfig, getRDFHandler, initializeNamespaceTableFromConfiguration, preserveBNodeIDs, reportError, reportError, reportError, reportError, reportFatalError, reportFatalError, reportFatalError, reportLocation, reportWarning, resolveURI, set, setBaseURI, setBaseURI, setNamespace, setParseErrorListener, setParseLocationListener, setParserConfig, setPreserveBNodeIDs, setRDFHandler, setValueFactory
-
Constructor Details
-
SPARQLUpdateDataBlockParser
public SPARQLUpdateDataBlockParser()Creates a new parser that will use aSimpleValueFactory
to create RDF model objects. -
SPARQLUpdateDataBlockParser
Creates a new parser that will use the supplied ValueFactory to create RDF model objects.- Parameters:
valueFactory
- A ValueFactory.
-
-
Method Details
-
getRDFFormat
Description copied from interface:RDFParser
Gets the RDF format that this parser can parse.- Specified by:
getRDFFormat
in interfaceRDFParser
- Overrides:
getRDFFormat
in classTriGStarParser
-
parseGraph
- Overrides:
parseGraph
in classTriGParser
- Throws:
RDFParseException
RDFHandlerException
IOException
-
parseImplicitBlank
Description copied from class:TurtleParser
Parses an implicit blank node. This method parses the token [] and predicateObjectLists that are surrounded by square brackets.- Overrides:
parseImplicitBlank
in classTurtleParser
- Throws:
IOException
RDFParseException
RDFHandlerException
-
parseNodeID
Description copied from class:TurtleParser
Parses a blank node ID, e.g. _:node1.- Overrides:
parseNodeID
in classTurtleParser
- Throws:
IOException
RDFParseException
-
isAllowBlankNodes
public boolean isAllowBlankNodes()- Returns:
- Returns the allowBlankNodes.
-
setAllowBlankNodes
public void setAllowBlankNodes(boolean allowBlankNodes) - Parameters:
allowBlankNodes
- The allowBlankNodes to set.
-
getLineNumber
protected int getLineNumber()- Overrides:
getLineNumber
in classTurtleParser
-
setLineNumberOffset
public void setLineNumberOffset(int lineNumberOffset) - Parameters:
lineNumberOffset
-
-