Package com.complexible.common.rdf.query
Class SPARQLUpdateDataBlockParser
- java.lang.Object
-
- com.stardog.stark.io.turtle.TurtleParser
-
- com.stardog.stark.io.trig.TrigParser
-
- com.complexible.common.rdf.query.SPARQLUpdateDataBlockParser
-
- All Implemented Interfaces:
RDFParser
public class SPARQLUpdateDataBlockParser extends TrigParser
An extension ofTrigParser
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 differentces:- 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.
- Author:
- Jeen Broekstra
- See Also:
- SPARQL 1.1 Grammar production for INSERT DATA, SPARQL 1.1 Grammar production for DELETE DATA
-
-
Constructor Summary
Constructors Constructor Description SPARQLUpdateDataBlockParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RDFFormat
format()
The format this parser can parseboolean
isAllowBlankNodes()
protected void
parseGraph(TurtleParserContext theContext, boolean theGraphKeywordWasUsed)
protected Resource
parseImplicitBlank(TurtleParserContext theContext)
protected BNode
parseNodeID(IOParserContext theContext)
void
setAllowBlankNodes(boolean allowBlankNodes)
-
Methods inherited from class com.stardog.stark.io.trig.TrigParser
parseDirective, parseStatement, parseTriples
-
Methods inherited from class com.stardog.stark.io.turtle.TurtleParser
parse, parseBase, parseCollection, parseEmbeddedTriple, parseLongString, parseNumber, parseObject, parseObjectList, parsePredicate, parsePredicateObjectList, parsePredicateWithEdgeProperties, parsePrefixID, parseQNameOrBoolean, parseQuotedLiteral, parseQuotedString, parseString, parseSubject, parseSubjectResource, parseURI, parseValue, processComment, skipWSC
-
-
-
-
Method Detail
-
format
public RDFFormat format()
Description copied from class:TrigParser
The format this parser can parse- Specified by:
format
in interfaceRDFParser
- Overrides:
format
in classTrigParser
- Returns:
- the format
-
parseGraph
protected void parseGraph(@Nonnull TurtleParserContext theContext, boolean theGraphKeywordWasUsed) throws java.io.IOException, InvalidRDF, RDFHandlerException
- Overrides:
parseGraph
in classTrigParser
- Throws:
java.io.IOException
InvalidRDF
RDFHandlerException
-
parseImplicitBlank
@Nonnull protected Resource parseImplicitBlank(@Nonnull TurtleParserContext theContext) throws java.io.IOException, InvalidRDF, RDFHandlerException
- Overrides:
parseImplicitBlank
in classTurtleParser
- Throws:
java.io.IOException
InvalidRDF
RDFHandlerException
-
parseNodeID
@Nonnull protected BNode parseNodeID(@Nonnull IOParserContext theContext) throws java.io.IOException, InvalidRDF
- Overrides:
parseNodeID
in classTurtleParser
- Throws:
java.io.IOException
InvalidRDF
-
isAllowBlankNodes
public boolean isAllowBlankNodes()
- Returns:
- Returns the allowBlankNodes.
-
setAllowBlankNodes
public void setAllowBlankNodes(boolean allowBlankNodes)
- Parameters:
allowBlankNodes
- The allowBlankNodes to set.
-
-