org.eclipse.rdf4j.query.parser.sparql

## Class SPARQLUpdateTest

- java.lang.Object
- - org.eclipse.rdf4j.query.parser.sparql.SPARQLUpdateTest

-     public abstract class SPARQLUpdateTest
      extends Object

  Tests for SPARQL 1.1 Update functionality.
  Author:
    Jeen Broekstra

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected IRI` | `alice`
    `protected IRI` | `bob`
    `protected RepositoryConnection` | `con`
    `protected static String` | `EX_NS`
    `protected ValueFactory` | `f`
    `protected IRI` | `graph1`
    `protected IRI` | `graph2`
    `protected static org.slf4j.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SPARQLUpdateTest()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `contextualInsertDeleteData()`
    `protected Repository` | `createRepository()` Creates, initializes and clears a repository.
    `protected String` | `getNamespaceDeclarations()` Get a set of useful namespace prefix declarations.
    `protected void` | `loadDataset(String datasetFile)`
    `protected abstract Repository` | `newRepository()` Create a new Repository object.
    `void` | `setUp()`
    `void` | `tearDown()`
    `void` | `testAddFromDefault()`
    `void` | `testAddFromDefaultToDefault()`
    `void` | `testAddToDefault()`
    `void` | `testAddToExistingNamed()`
    `void` | `testAddToNewNamed()`
    `void` | `testAutoCommitHandling()`
    `void` | `testClearAll()`
    `void` | `testClearDefault()`
    `void` | `testClearGraph()`
    `void` | `testClearNamed()`
    `void` | `testConsecutiveUpdatesInSameTransaction()`
    `void` | `testCopyFromDefault()`
    `void` | `testCopyFromDefaultToDefault()`
    `void` | `testCopyToDefault()`
    `void` | `testCopyToExistingNamed()`
    `void` | `testCopyToNewNamed()`
    `void` | `testCreateExistingGraph()`
    `void` | `testCreateNewGraph()`
    `void` | `testDeleteData()`
    `void` | `testDeleteDataFromGraph()`
    `void` | `testDeleteDataFromWrongGraph()`
    `void` | `testDeleteDataMultiplePatterns()`
    `void` | `testDeleteDataUnicode()`
    `void` | `testDeleteFromDefaultGraph()`
    `void` | `testDeleteFromDefaultGraphUsingWith()`
    `void` | `testDeleteInsertWhere()`
    `void` | `testDeleteInsertWhereInvalidTriple()`
    `void` | `testDeleteInsertWhereLoopingBehavior()`
    `void` | `testDeleteInsertWhereWithBindings()`
    `void` | `testDeleteInsertWhereWithBindings2()`
    `void` | `testDeleteTransformedWhere()`
    `void` | `testDeleteWhere()`
    `void` | `testDeleteWhereInvalidTriple()`
    `void` | `testDeleteWhereOptional()`
    `void` | `testDeleteWhereShortcut()`
    `void` | `testDropAll()`
    `void` | `testDropDefault()`
    `void` | `testDropGraph()`
    `void` | `testDropNamed()`
    `void` | `testInsertData()`
    `void` | `testInsertData2()`
    `void` | `testInsertDataBlankNode()`
    `void` | `testInsertDataGraph1()`
    `void` | `testInsertDataGraph2()`
    `void` | `testInsertDataGraph3()`
    `void` | `testInsertDataInGraph()`
    `void` | `testInsertDataInGraph2()`
    `void` | `testInsertDataLangTaggedLiteral()`
    `void` | `testInsertDataMultiplePatterns()`
    `void` | `testInsertEmptyWhere()`
    `void` | `testInsertEmptyWhereWithBinding()`
    `void` | `testInsertNonMatchingWhere()`
    `void` | `testInsertNonMatchingWhereWithBindings()`
    `void` | `testInsertTransformedWhere()`
    `void` | `testInsertWhere()`
    `void` | `testInsertWhereGraph()`
    `void` | `testInsertWhereInvalidTriple()`
    `void` | `testInsertWhereUsing()`
    `void` | `testInsertWhereUsingWith()`
    `void` | `testInsertWhereWith()`
    `void` | `testInsertWhereWithBinding()`
    `void` | `testInsertWhereWithBindings()`
    `void` | `testInsertWhereWithBindings2()`
    `void` | `testInsertWhereWithBlankNode()`
    `void` | `testInsertWhereWithOptional()`
    `void` | `testInvalidDeleteUpdate()`
    `void` | `testInvalidInsertUpdate()`
    `void` | `testMoveFromDefault()`
    `void` | `testMoveFromDefaultToDefault()`
    `void` | `testMoveToDefault()`
    `void` | `testMoveToNewNamed()`
    `void` | `testUpdateSequenceDeleteInsert()`
    `void` | `testUpdateSequenceInsertDelete()`
    `void` | `testUpdateSequenceInsertDelete2()`
    `void` | `testUpdateSequenceInsertDeleteExample9()`
    `void` | `testUpdateSequenceWithRelativeIRI()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final org.slf4j.Logger logger

    - #### con

          protected RepositoryConnection con

    - #### f

          protected ValueFactory f

    - #### bob

          protected IRI bob

    - #### alice

          protected IRI alice

    - #### graph1

          protected IRI graph1

    - #### graph2

          protected IRI graph2

    - #### EX_NS

          protected static final String EX_NS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SPARQLUpdateTest

          public SPARQLUpdateTest()

  - ### Method Detail

    - #### setUp

          public void setUp()
                     throws Exception

      Throws:
        `Exception`

    - #### tearDown

          public void tearDown()
                        throws Exception

      Throws:
        `Exception`

    - #### testDeleteFromDefaultGraph

          public void testDeleteFromDefaultGraph()
                                          throws Exception

      Throws:
        `Exception`

    - #### testDeleteFromDefaultGraphUsingWith

          public void testDeleteFromDefaultGraphUsingWith()
                                                   throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereInvalidTriple

          public void testInsertWhereInvalidTriple()
                                            throws Exception

      Throws:
        `Exception`

    - #### testDeleteWhereInvalidTriple

          public void testDeleteWhereInvalidTriple()
                                            throws Exception

      Throws:
        `Exception`

    - #### testDeleteInsertWhereInvalidTriple

          public void testDeleteInsertWhereInvalidTriple()
                                                  throws Exception

      Throws:
        `Exception`

    - #### testInsertWhere

          public void testInsertWhere()
                               throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereWithBinding

          public void testInsertWhereWithBinding()
                                          throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereWithBindings2

          public void testInsertWhereWithBindings2()
                                            throws Exception

      Throws:
        `Exception`

    - #### testInsertEmptyWhere

          public void testInsertEmptyWhere()
                                    throws Exception

      Throws:
        `Exception`

    - #### testInsertEmptyWhereWithBinding

          public void testInsertEmptyWhereWithBinding()
                                               throws Exception

      Throws:
        `Exception`

    - #### testInsertNonMatchingWhere

          public void testInsertNonMatchingWhere()
                                          throws Exception

      Throws:
        `Exception`

    - #### testInsertNonMatchingWhereWithBindings

          public void testInsertNonMatchingWhereWithBindings()
                                                      throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereWithBindings

          public void testInsertWhereWithBindings()
                                           throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereWithOptional

          public void testInsertWhereWithOptional()
                                           throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereWithBlankNode

          public void testInsertWhereWithBlankNode()
                                            throws Exception

      Throws:
        `Exception`

    - #### testDeleteInsertWhere

          public void testDeleteInsertWhere()
                                     throws Exception

      Throws:
        `Exception`

    - #### testDeleteWhereOptional

          public void testDeleteWhereOptional()
                                       throws Exception

      Throws:
        `Exception`

    - #### testDeleteInsertWhereWithBindings

          public void testDeleteInsertWhereWithBindings()
                                                 throws Exception

      Throws:
        `Exception`

    - #### testDeleteInsertWhereWithBindings2

          public void testDeleteInsertWhereWithBindings2()
                                                  throws Exception

      Throws:
        `Exception`

    - #### testDeleteInsertWhereLoopingBehavior

          public void testDeleteInsertWhereLoopingBehavior()
                                                    throws Exception

      Throws:
        `Exception`

    - #### testAutoCommitHandling

          public void testAutoCommitHandling()
                                      throws Exception

      Throws:
        `Exception`

    - #### testConsecutiveUpdatesInSameTransaction

          public void testConsecutiveUpdatesInSameTransaction()
                                                       throws Exception

      Throws:
        `Exception`

    - #### testInsertTransformedWhere

          public void testInsertTransformedWhere()
                                          throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereGraph

          public void testInsertWhereGraph()
                                    throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereUsing

          public void testInsertWhereUsing()
                                    throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereUsingWith

          public void testInsertWhereUsingWith()
                                        throws Exception

      Throws:
        `Exception`

    - #### testInsertWhereWith

          public void testInsertWhereWith()
                                   throws Exception

      Throws:
        `Exception`

    - #### testDeleteWhereShortcut

          public void testDeleteWhereShortcut()
                                       throws Exception

      Throws:
        `Exception`

    - #### testDeleteWhere

          public void testDeleteWhere()
                               throws Exception

      Throws:
        `Exception`

    - #### testDeleteTransformedWhere

          public void testDeleteTransformedWhere()
                                          throws Exception

      Throws:
        `Exception`

    - #### testInsertData

          public void testInsertData()
                              throws Exception

      Throws:
        `Exception`

    - #### testInsertData2

          public void testInsertData2()
                               throws Exception

      Throws:
        `Exception`

    - #### testInsertDataLangTaggedLiteral

          public void testInsertDataLangTaggedLiteral()
                                               throws Exception

      Throws:
        `Exception`

    - #### testInsertDataGraph1

          public void testInsertDataGraph1()
                                    throws Exception

      Throws:
        `Exception`

    - #### testInsertDataGraph2

          public void testInsertDataGraph2()
                                    throws Exception

      Throws:
        `Exception`

    - #### testInsertDataGraph3

          public void testInsertDataGraph3()
                                    throws Exception

      Throws:
        `Exception`

    - #### testInsertDataBlankNode

          public void testInsertDataBlankNode()
                                       throws Exception

      Throws:
        `Exception`

    - #### testInsertDataMultiplePatterns

          public void testInsertDataMultiplePatterns()
                                              throws Exception

      Throws:
        `Exception`

    - #### testInsertDataInGraph

          public void testInsertDataInGraph()
                                     throws Exception

      Throws:
        `Exception`

    - #### testInsertDataInGraph2

          public void testInsertDataInGraph2()
                                      throws Exception

      Throws:
        `Exception`

    - #### testDeleteData

          public void testDeleteData()
                              throws Exception

      Throws:
        `Exception`

    - #### testDeleteDataUnicode

          public void testDeleteDataUnicode()
                                     throws Exception

      Throws:
        `Exception`

    - #### testDeleteDataMultiplePatterns

          public void testDeleteDataMultiplePatterns()
                                              throws Exception

      Throws:
        `Exception`

    - #### testDeleteDataFromGraph

          public void testDeleteDataFromGraph()
                                       throws Exception

      Throws:
        `Exception`

    - #### testDeleteDataFromWrongGraph

          public void testDeleteDataFromWrongGraph()
                                            throws Exception

      Throws:
        `Exception`

    - #### testCreateNewGraph

          public void testCreateNewGraph()
                                  throws Exception

      Throws:
        `Exception`

    - #### testCreateExistingGraph

          public void testCreateExistingGraph()
                                       throws Exception

      Throws:
        `Exception`

    - #### testCopyToDefault

          public void testCopyToDefault()
                                 throws Exception

      Throws:
        `Exception`

    - #### testCopyToExistingNamed

          public void testCopyToExistingNamed()
                                       throws Exception

      Throws:
        `Exception`

    - #### testCopyToNewNamed

          public void testCopyToNewNamed()
                                  throws Exception

      Throws:
        `Exception`

    - #### testCopyFromDefault

          public void testCopyFromDefault()
                                   throws Exception

      Throws:
        `Exception`

    - #### testCopyFromDefaultToDefault

          public void testCopyFromDefaultToDefault()
                                            throws Exception

      Throws:
        `Exception`

    - #### testAddToDefault

          public void testAddToDefault()
                                throws Exception

      Throws:
        `Exception`

    - #### testAddToExistingNamed

          public void testAddToExistingNamed()
                                      throws Exception

      Throws:
        `Exception`

    - #### testAddToNewNamed

          public void testAddToNewNamed()
                                 throws Exception

      Throws:
        `Exception`

    - #### testAddFromDefault

          public void testAddFromDefault()
                                  throws Exception

      Throws:
        `Exception`

    - #### testAddFromDefaultToDefault

          public void testAddFromDefaultToDefault()
                                           throws Exception

      Throws:
        `Exception`

    - #### testMoveToDefault

          public void testMoveToDefault()
                                 throws Exception

      Throws:
        `Exception`

    - #### testMoveToNewNamed

          public void testMoveToNewNamed()
                                  throws Exception

      Throws:
        `Exception`

    - #### testMoveFromDefault

          public void testMoveFromDefault()
                                   throws Exception

      Throws:
        `Exception`

    - #### testMoveFromDefaultToDefault

          public void testMoveFromDefaultToDefault()
                                            throws Exception

      Throws:
        `Exception`

    - #### testClearAll

          public void testClearAll()
                            throws Exception

      Throws:
        `Exception`

    - #### testClearDefault

          public void testClearDefault()
                                throws Exception

      Throws:
        `Exception`

    - #### testClearGraph

          public void testClearGraph()
                              throws Exception

      Throws:
        `Exception`

    - #### testClearNamed

          public void testClearNamed()
                              throws Exception

      Throws:
        `Exception`

    - #### testDropAll

          public void testDropAll()
                           throws Exception

      Throws:
        `Exception`

    - #### testDropDefault

          public void testDropDefault()
                               throws Exception

      Throws:
        `Exception`

    - #### testDropGraph

          public void testDropGraph()
                             throws Exception

      Throws:
        `Exception`

    - #### testDropNamed

          public void testDropNamed()
                             throws Exception

      Throws:
        `Exception`

    - #### testUpdateSequenceDeleteInsert

          public void testUpdateSequenceDeleteInsert()
                                              throws Exception

      Throws:
        `Exception`

    - #### testUpdateSequenceInsertDelete

          public void testUpdateSequenceInsertDelete()
                                              throws Exception

      Throws:
        `Exception`

    - #### testUpdateSequenceInsertDelete2

          public void testUpdateSequenceInsertDelete2()
                                               throws Exception

      Throws:
        `Exception`

    - #### testUpdateSequenceInsertDeleteExample9

          public void testUpdateSequenceInsertDeleteExample9()
                                                      throws Exception

      Throws:
        `Exception`

    - #### testUpdateSequenceWithRelativeIRI

          public void testUpdateSequenceWithRelativeIRI()
                                                 throws Exception

      Throws:
        `Exception`

    - #### contextualInsertDeleteData

          public void contextualInsertDeleteData()
                                          throws RepositoryException,
                                                 MalformedQueryException,
                                                 UpdateExecutionException

      Throws:
        `RepositoryException`
        `MalformedQueryException`
        `UpdateExecutionException`

    - #### testInvalidInsertUpdate

          public void testInvalidInsertUpdate()

    - #### testInvalidDeleteUpdate

          public void testInvalidDeleteUpdate()

    - #### loadDataset

          protected void loadDataset(String datasetFile)
                              throws RDFParseException,
                                     RepositoryException,
                                     IOException

      Throws:
        `RDFParseException`
        `RepositoryException`
        `IOException`

    - #### getNamespaceDeclarations

          protected String getNamespaceDeclarations()

      Get a set of useful namespace prefix declarations.
      Returns:
        namespace prefix declarations for rdf, rdfs, dc, foaf and ex.

    - #### createRepository

          protected Repository createRepository()
                                         throws Exception

      Creates, initializes and clears a repository.
      Returns:
        an initialized empty repository.
      Throws:
        `Exception`

    - #### newRepository

          protected abstract Repository newRepository()
                                               throws Exception

      Create a new Repository object. Subclasses are expected to implement this method to supply the test case with a specific Repository type and configuration.
      Returns:
        a new (uninitialized) Repository
      Throws:
        `Exception`

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