org.eclipse.rdf4j.sail.memory.model

## Class MemStatement

- java.lang.Object
- - org.eclipse.rdf4j.model.impl.SimpleStatement
  - - org.eclipse.rdf4j.model.impl.ContextStatement
    - - org.eclipse.rdf4j.sail.memory.model.MemStatement

- All Implemented Interfaces:
    Serializable, Statement

      public class MemStatement
      extends ContextStatement

  A MemStatement is a Statement which contains context information and a flag indicating whether the statement is explicit or inferred.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemStatement(MemResource subject, MemIRI predicate, MemValue object, MemResource context, boolean explicit, int sinceSnapshot)` Creates a new MemStatement with the supplied subject, predicate, object and context.
    `MemStatement(MemResource subject, MemIRI predicate, MemValue object, MemResource context, int sinceSnapshot)` Creates a new MemStatement with the supplied subject, predicate, object and context and marks it as 'explicit'.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addToComponentLists()` Lets this statement add itself to the appropriate statement lists of its subject, predicate, object and context.
    `MemResource` | `getContext()` Gets the context of this statement.
    `MemValue` | `getObject()` Gets the object of this statement.
    `MemIRI` | `getPredicate()` Gets the predicate of this statement.
    `int` | `getSinceSnapshot()`
    `MemResource` | `getSubject()` Gets the subject of this statement.
    `int` | `getTillSnapshot()`
    `boolean` | `isExplicit()`
    `boolean` | `isInSnapshot(int snapshot)`
    `void` | `removeFromComponentLists()` Lets this statement remove itself from the appropriate statement lists of its subject, predicate, object and context.
    `void` | `setExplicit(boolean explicit)`
    `void` | `setSinceSnapshot(int snapshot)`
    `void` | `setTillSnapshot(int snapshot)`

    - ### Methods inherited from class org.eclipse.rdf4j.model.impl.ContextStatement

      `toString`

    - ### Methods inherited from class org.eclipse.rdf4j.model.impl.SimpleStatement

      `equals, hashCode`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### MemStatement

          public MemStatement(MemResource subject,
                              MemIRI predicate,
                              MemValue object,
                              MemResource context,
                              int sinceSnapshot)

      Creates a new MemStatement with the supplied subject, predicate, object and context and marks it as 'explicit'.

    - #### MemStatement

          public MemStatement(MemResource subject,
                              MemIRI predicate,
                              MemValue object,
                              MemResource context,
                              boolean explicit,
                              int sinceSnapshot)

      Creates a new MemStatement with the supplied subject, predicate, object and context. The value of the `explicit` parameter determines if this statement is marked as 'explicit' or not.

  - ### Method Detail

    - #### getSubject

          public MemResource getSubject()

      Description copied from interface: `Statement`
      Gets the subject of this statement.
      Specified by:
        `getSubject` in interface `Statement`
      Overrides:
        `getSubject` in class `SimpleStatement`
      Returns:
        The statement's subject.

    - #### getPredicate

          public MemIRI getPredicate()

      Description copied from interface: `Statement`
      Gets the predicate of this statement.
      Specified by:
        `getPredicate` in interface `Statement`
      Overrides:
        `getPredicate` in class `SimpleStatement`
      Returns:
        The statement's predicate.

    - #### getObject

          public MemValue getObject()

      Description copied from interface: `Statement`
      Gets the object of this statement.
      Specified by:
        `getObject` in interface `Statement`
      Overrides:
        `getObject` in class `SimpleStatement`
      Returns:
        The statement's object.

    - #### getContext

          public MemResource getContext()

      Description copied from interface: `Statement`
      Gets the context of this statement.
      Specified by:
        `getContext` in interface `Statement`
      Overrides:
        `getContext` in class `ContextStatement`
      Returns:
        The statement's context, or `null` in case of the null context or if not applicable.

    - #### setSinceSnapshot

          public void setSinceSnapshot(int snapshot)

    - #### getSinceSnapshot

          public int getSinceSnapshot()

    - #### setTillSnapshot

          public void setTillSnapshot(int snapshot)

    - #### getTillSnapshot

          public int getTillSnapshot()

    - #### isInSnapshot

          public boolean isInSnapshot(int snapshot)

    - #### setExplicit

          public void setExplicit(boolean explicit)

    - #### isExplicit

          public boolean isExplicit()

    - #### addToComponentLists

          public void addToComponentLists()

      Lets this statement add itself to the appropriate statement lists of its subject, predicate, object and context. The transaction status will be set to new.

    - #### removeFromComponentLists

          public void removeFromComponentLists()

      Lets this statement remove itself from the appropriate statement lists of its subject, predicate, object and context. The transaction status will be set to `null`.

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