org.eclipse.rdf4j.sail.memory.model

## Interface MemResource

- All Superinterfaces:
    MemValue, Resource, Serializable, Value
  All Known Implementing Classes:
    MemBNode, MemIRI, MemTriple

      public interface MemResource
      extends MemValue, Resource

  A MemoryStore-specific extension of Resource giving it subject statements.

- - ### Field Summary

    - ### Fields inherited from interface org.eclipse.rdf4j.sail.memory.model.MemValue

      `EMPTY_LIST`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addContextStatement(MemStatement st)` Adds a statement to this MemResource's list of statements for which it represents the context.
    `void` | `addSubjectStatement(MemStatement st)` Adds a statement to this MemResource's list of statements for which it is the subject.
    `void` | `cleanSnapshotsFromContextStatements(int currentSnapshot)` Removes statements from old snapshots (those that have expired at or before the specified snapshot version) from this MemValue's list of statements for which it is the context.
    `void` | `cleanSnapshotsFromSubjectStatements(int currentSnapshot)` Removes statements from old snapshots (those that have expired at or before the specified snapshot version) from this MemValue's list of statements for which it is the subject.
    `int` | `getContextStatementCount()` Gets the number of statements for which this MemResource represents the context.
    `MemStatementList` | `getContextStatementList()` Gets the list of statements for which this MemResource represents the context.
    `int` | `getSubjectStatementCount()` Gets the number of statements for which this MemResource is the subject.
    `MemStatementList` | `getSubjectStatementList()` Gets the list of statements for which this MemResource is the subject.
    `void` | `removeContextStatement(MemStatement st)` Removes a statement from this MemResource's list of statements for which it represents the context.
    `void` | `removeSubjectStatement(MemStatement st)` Removes a statement from this MemResource's list of statements for which it is the subject.

    - ### Methods inherited from interface org.eclipse.rdf4j.sail.memory.model.MemValue

      `addObjectStatement, cleanSnapshotsFromObjectStatements, getCreator, getObjectStatementCount, getObjectStatementList, hasStatements, removeObjectStatement`

    - ### Methods inherited from interface org.eclipse.rdf4j.model.Resource

      `isResource`

    - ### Methods inherited from interface org.eclipse.rdf4j.model.Value

      `isBNode, isIRI, isLiteral, isTriple, stringValue`

- - ### Method Detail

    - #### getSubjectStatementList

          MemStatementList getSubjectStatementList()

      Gets the list of statements for which this MemResource is the subject.
      Returns:
        a MemStatementList containing the statements.

    - #### getSubjectStatementCount

          int getSubjectStatementCount()

      Gets the number of statements for which this MemResource is the subject.
      Returns:
        An integer larger than or equal to 0.

    - #### addSubjectStatement

          void addSubjectStatement(MemStatement st)

      Adds a statement to this MemResource's list of statements for which it is the subject.
      Parameters:
        `st` -

    - #### removeSubjectStatement

          void removeSubjectStatement(MemStatement st)

      Removes a statement from this MemResource's list of statements for which it is the subject.
      Parameters:
        `st` -

    - #### cleanSnapshotsFromSubjectStatements

          void cleanSnapshotsFromSubjectStatements(int currentSnapshot)

      Removes statements from old snapshots (those that have expired at or before the specified snapshot version) from this MemValue's list of statements for which it is the subject.
      Parameters:
        `currentSnapshot` - The current snapshot version.

    - #### getContextStatementList

          MemStatementList getContextStatementList()

      Gets the list of statements for which this MemResource represents the context.
      Returns:
        a MemStatementList containing the statements.

    - #### getContextStatementCount

          int getContextStatementCount()

      Gets the number of statements for which this MemResource represents the context.
      Returns:
        An integer larger than or equal to 0.

    - #### addContextStatement

          void addContextStatement(MemStatement st)

      Adds a statement to this MemResource's list of statements for which it represents the context.
      Parameters:
        `st` -

    - #### removeContextStatement

          void removeContextStatement(MemStatement st)

      Removes a statement from this MemResource's list of statements for which it represents the context.
      Parameters:
        `st` -

    - #### cleanSnapshotsFromContextStatements

          void cleanSnapshotsFromContextStatements(int currentSnapshot)

      Removes statements from old snapshots (those that have expired at or before the specified snapshot version) from this MemValue's list of statements for which it is the context.
      Parameters:
        `currentSnapshot` - The current snapshot version.

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