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 ofTrigParserthat 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 RDFFormatformat()The format this parser can parsebooleanisAllowBlankNodes()protected voidparseGraph(TurtleParserContext theContext, boolean theGraphKeywordWasUsed)protected ResourceparseImplicitBlank(TurtleParserContext theContext)protected BNodeparseNodeID(IOParserContext theContext)voidsetAllowBlankNodes(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:TrigParserThe format this parser can parse- Specified by:
formatin interfaceRDFParser- Overrides:
formatin classTrigParser- Returns:
- the format
-
parseGraph
protected void parseGraph(@Nonnull TurtleParserContext theContext, boolean theGraphKeywordWasUsed) throws java.io.IOException, InvalidRDF, RDFHandlerException- Overrides:
parseGraphin classTrigParser- Throws:
java.io.IOExceptionInvalidRDFRDFHandlerException
-
parseImplicitBlank
@Nonnull protected Resource parseImplicitBlank(@Nonnull TurtleParserContext theContext) throws java.io.IOException, InvalidRDF, RDFHandlerException
- Overrides:
parseImplicitBlankin classTurtleParser- Throws:
java.io.IOExceptionInvalidRDFRDFHandlerException
-
parseNodeID
@Nonnull protected BNode parseNodeID(@Nonnull IOParserContext theContext) throws java.io.IOException, InvalidRDF
- Overrides:
parseNodeIDin classTurtleParser- Throws:
java.io.IOExceptionInvalidRDF
-
isAllowBlankNodes
public boolean isAllowBlankNodes()
- Returns:
- Returns the allowBlankNodes.
-
setAllowBlankNodes
public void setAllowBlankNodes(boolean allowBlankNodes)
- Parameters:
allowBlankNodes- The allowBlankNodes to set.
-
-