org.eclipse.rdf4j.query.parser.sparql

## 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

      public class SPARQLUpdateDataBlockParser
      extends TriGStarParser

  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* triples (from TriG*).
  Author:
    Jeen Broekstra
  See Also:
    SPARQL 1.1 Grammar production for INSERT DATA, SPARQL 1.1 Grammar production for DELETE DATA

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.rdf4j.rio.RDFParser

      `RDFParser.DatatypeHandling`

  - ### 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

    Constructors
    Constructor and Description
    `SPARQLUpdateDataBlockParser()` Creates a new parser that will use a `SimpleValueFactory` 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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `getLineNumber()`
    `RDFFormat` | `getRDFFormat()` Gets the RDF format that this parser can parse.
    `boolean` | `isAllowBlankNodes()`
    `protected void` | `parseGraph()`
    `protected Resource` | `parseImplicitBlank()` Parses an implicit blank node.
    `protected Resource` | `parseNodeID()` 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, 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, createNode, createNode, createStatement, createStatement, createURI, datatypeHandling, getNamespace, getParseErrorListener, getParseLocationListener, getParserConfig, getRDFHandler, initializeNamespaceTableFromConfiguration, preserveBNodeIDs, reportError, reportError, reportError, reportError, reportFatalError, reportFatalError, reportFatalError, reportLocation, reportWarning, resolveURI, set, setBaseURI, setBaseURI, setDatatypeHandling, setNamespace, setParseErrorListener, setParseLocationListener, setParserConfig, setPreserveBNodeIDs, setRDFHandler, setStopAtFirstError, setValueFactory, setVerifyData, stopAtFirstError, verifyData`

    - ### 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.rio.RDFParser

      `parse, parse`

- - ### Constructor Detail

    - #### SPARQLUpdateDataBlockParser

          public SPARQLUpdateDataBlockParser()

      Creates a new parser that will use a `SimpleValueFactory` to create RDF model objects.

    - #### SPARQLUpdateDataBlockParser

          public SPARQLUpdateDataBlockParser(ValueFactory valueFactory)

      Creates a new parser that will use the supplied ValueFactory to create RDF model objects.
      Parameters:
        `valueFactory` - A ValueFactory.

  - ### Method Detail

    - #### getRDFFormat

          public RDFFormat getRDFFormat()

      Description copied from interface: `RDFParser`
      Gets the RDF format that this parser can parse.
      Specified by:
        `getRDFFormat` in interface `RDFParser`
      Overrides:
        `getRDFFormat` in class `TriGStarParser`

    - #### parseGraph

          protected void parseGraph()
                             throws RDFParseException,
                                    RDFHandlerException,
                                    IOException

      Overrides:
        `parseGraph` in class `TriGParser`
      Throws:
        `RDFParseException`
        `RDFHandlerException`
        `IOException`

    - #### parseImplicitBlank

          protected Resource parseImplicitBlank()
                                         throws IOException,
                                                RDFParseException,
                                                RDFHandlerException

      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 class `TurtleParser`
      Throws:
        `IOException`
        `RDFParseException`
        `RDFHandlerException`

    - #### parseNodeID

          protected Resource parseNodeID()
                                  throws IOException,
                                         RDFParseException

      Description copied from class: `TurtleParser`
      Parses a blank node ID, e.g. `_:node1`.
      Overrides:
        `parseNodeID` in class `TurtleParser`
      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 class `TurtleParser`

    - #### setLineNumberOffset

          public void setLineNumberOffset(int lineNumberOffset)

      Parameters:
        `lineNumberOffset` -

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.