Package org.eclipse.rdf4j.sail.shacl.wrapper.data

## Class VerySimpleRdfsBackwardsChainingConnection

- java.lang.Object
- - org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
  - - org.eclipse.rdf4j.sail.shacl.wrapper.data.VerySimpleRdfsBackwardsChainingConnection

- All Implemented Interfaces:
    `AutoCloseable`, `FederatedServiceResolverClient`, `ThreadSafetyAware`, `SailConnection`

      public class VerySimpleRdfsBackwardsChainingConnection
      extends SailConnectionWrapper

  Very simple RDFS backwardschaining connection that supports type inference on hasStatement and getStatement. It does not support inference for SPARQL queries.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `VerySimpleRdfsBackwardsChainingConnection​(SailConnection wrappedCon, RdfsSubClassOfReasoner rdfsSubClassOfReasoner)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CloseableIteration<? extends Statement,​SailException>` | `getStatements​(Resource subj, IRI pred, Value obj, boolean includeInferred, Resource... contexts)` | Gets all statements from the specified contexts that have a specific subject, predicate and/or object.
    `boolean` | `hasStatement​(Resource subj, IRI pred, Value obj, boolean includeInferred, Resource... contexts)` | Determines if the store contains any statements from the specified contexts that have a specific subject, predicate and/or object.

    - ### Methods inherited from class org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper

      `addStatement, addStatement, begin, begin, clear, clearNamespaces, close, commit, endUpdate, evaluate, explain, flush, getContextIDs, getNamespace, getNamespaces, getWrappedConnection, isActive, isOpen, pendingRemovals, prepare, prepareQuery, removeNamespace, removeStatement, removeStatements, rollback, setFederatedServiceResolver, setNamespace, setTransactionSettings, size, size, startUpdate, supportsConcurrentReads`

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

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

- - ### Constructor Detail

    - #### VerySimpleRdfsBackwardsChainingConnection

          public VerySimpleRdfsBackwardsChainingConnection​(SailConnection wrappedCon,
                                                           RdfsSubClassOfReasoner rdfsSubClassOfReasoner)

  - ### Method Detail

    - #### hasStatement

          public boolean hasStatement​(Resource subj,
                                      IRI pred,
                                      Value obj,
                                      boolean includeInferred,
                                      Resource... contexts)
                               throws SailException

      Description copied from interface: `SailConnection`
      Determines if the store contains any statements from the specified contexts that have a specific subject, predicate and/or object. All three parameters may be null to indicate wildcards. The includeInferred parameter can be used to control which statements are checked: all statements or only the statements that have been added explicitly.
      Specified by:
        `hasStatement` in interface `SailConnection`
      Overrides:
        `hasStatement` in class `SailConnectionWrapper`
      Parameters:
        `subj` - A Resource specifying the subject, or null for a wildcard.
        `pred` - An IRI specifying the predicate, or null for a wildcard.
        `obj` - A Value specifying the object, or null for a wildcard.
        `includeInferred` - if false, no inferred statements are returned; if true, inferred statements are returned if available
        `contexts` - The context(s) to get the data from. Note that this parameter is a vararg and as such is optional. If no contexts are specified the method operates on the entire repository. A null value can be used to match context-less statements.
      Returns:
        `true` iff the store contains any statements matching the supplied criteria, `false` otherwise.
      Throws:
        `SailException` - If the Sail object encountered an error or unexpected situation internally.

    - #### getStatements

          public CloseableIteration<? extends Statement,​SailException> getStatements​(Resource subj,
                                                                                           IRI pred,
                                                                                           Value obj,
                                                                                           boolean includeInferred,
                                                                                           Resource... contexts)
                                                                                    throws SailException

      Description copied from interface: `SailConnection`
      Gets all statements from the specified contexts that have a specific subject, predicate and/or object. All three parameters may be null to indicate wildcards. The includeInferred parameter can be used to control which statements are fetched: all statements or only the statements that have been added explicitly.
      Specified by:
        `getStatements` in interface `SailConnection`
      Overrides:
        `getStatements` in class `SailConnectionWrapper`
      Parameters:
        `subj` - A Resource specifying the subject, or null for a wildcard.
        `pred` - A URI specifying the predicate, or null for a wildcard.
        `obj` - A Value specifying the object, or null for a wildcard.
        `includeInferred` - if false, no inferred statements are returned; if true, inferred statements are returned if available
        `contexts` - The context(s) to get the data from. Note that this parameter is a vararg and as such is optional. If no contexts are specified the method operates on the entire repository. A null value can be used to match context-less statements.
      Returns:
        The statements matching the specified pattern.
      Throws:
        `SailException` - If the Sail object encountered an error or unexpected situation internally.