org.eclipse.rdf4j.query.parser.sparql.manifest

## Class SPARQLComplianceTest

- java.lang.Object
- - org.eclipse.rdf4j.query.parser.sparql.manifest.SPARQLComplianceTest

- Direct Known Subclasses:
    SPARQL11UpdateComplianceTest, SPARQLQueryComplianceTest, SPARQLSyntaxComplianceTest

      public abstract class SPARQLComplianceTest
      extends Object

  Base functionality for SPARQL compliance test suites using a W3C-style Manifest.
  Author:
    Jeen Broekstra

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SPARQLComplianceTest(String displayName, String testURI, String name)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addIgnoredTest(String ignoredTest)`
    `protected void` | `compareGraphs(Iterable<Statement> queryResult, Iterable<Statement> expectedResult)`
    `protected abstract Repository` | `getDataRepository()`
    `String` | `getDisplayName()`
    `protected List<String>` | `getIgnoredTests()`
    `String` | `getName()`
    `String` | `getTestURI()`
    `protected static boolean` | `includeSubManifest(String subManifestFile, List<String> excludedSubdirs)` Verifies if the selected subManifest occurs in the supplied list of excluded subdirs.
    `protected static void` | `printBindingSet(BindingSet bs, StringBuilder appendable)`
    `protected abstract void` | `runTest()`
    `protected void` | `setIgnoredTests(List<String> ignoredTests)`
    `void` | `test()`
    `protected void` | `upload(IRI graphURI, Resource context)`
    `protected void` | `uploadDataset(Dataset dataset)`

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

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

- - ### Constructor Detail

    - #### SPARQLComplianceTest

          public SPARQLComplianceTest(String displayName,
                                      String testURI,
                                      String name)

      Parameters:
        `displayName` -
        `testURI2` -
        `name2` -
        `queryFileURL2` -
        `resultFileURL2` -
        `dataset2` -
        `ordered2` -

  - ### Method Detail

    - #### test

          public void test()
                    throws Exception

      Throws:
        `Exception`

    - #### getDisplayName

          public String getDisplayName()

      Returns:
        the displayName

    - #### getTestURI

          public String getTestURI()

      Returns:
        the testURI

    - #### getName

          public String getName()

      Returns:
        the name

    - #### runTest

          protected abstract void runTest()
                                   throws Exception

      Throws:
        `Exception`

    - #### getDataRepository

          protected abstract Repository getDataRepository()

    - #### includeSubManifest

          protected static boolean includeSubManifest(String subManifestFile,
                                                      List<String> excludedSubdirs)

      Verifies if the selected subManifest occurs in the supplied list of excluded subdirs.
      Parameters:
        `subManifestFile` - the url of a sub-manifest
        `excludedSubdirs` - an array of directory names. May be null.
      Returns:
        `false` if the supplied list of excluded subdirs is not empty and contains a match for the supplied sub-manifest, `true` otherwise.

    - #### uploadDataset

          protected void uploadDataset(Dataset dataset)
                                throws Exception

      Throws:
        `Exception`

    - #### upload

          protected void upload(IRI graphURI,
                                Resource context)
                         throws Exception

      Throws:
        `Exception`

    - #### printBindingSet

          protected static final void printBindingSet(BindingSet bs,
                                                      StringBuilder appendable)

    - #### getIgnoredTests

          protected List<String> getIgnoredTests()

      Returns:
        the ignoredTests

    - #### addIgnoredTest

          protected void addIgnoredTest(String ignoredTest)

    - #### setIgnoredTests

          protected void setIgnoredTests(List<String> ignoredTests)

      Parameters:
        `ignoredTests` - the ignoredTests to set

    - #### compareGraphs

          protected void compareGraphs(Iterable<Statement> queryResult,
                                       Iterable<Statement> expectedResult)
                                throws Exception

      Throws:
        `Exception`

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