Interface QueryableWritableDataCollection<Q extends QueryableData, W extends Writable>

Type Parameters:
Q - the queryable data type
W - the writable data type
All Superinterfaces:
QueryableData, QueryableDataCollection<Q>, Writable
All Known Subinterfaces:
MaterializedWritableDataCollection<Q,W>

public interface QueryableWritableDataCollection<Q extends QueryableData, W extends Writable> extends QueryableDataCollection<Q>, Writable
A QueryableDataCollection that also exposes writable targets.
  • Method Details

    • getAllWritableData

      Map<Predicate, W> getAllWritableData()
      Get all the writable data by Predicate
      Returns:
      a map from predicates to the writable data
    • getDefaultWritableData

      Optional<W> getDefaultWritableData()
      Get the default-writable data, if provided The default-writable data is where atoms are written if they have a predicate not assigned to a writable
      Returns:
      an optional, containing the default writable, if provided
    • getWritable

      default Optional<W> getWritable(Predicate predicate)
      Get a writable by predicate Return the writable bind to a predicate or, if the predicate is not bound to a writable, the default writable
      Parameters:
      predicate - the predicate for which we want to get the writable data
      Returns:
      an optional containing the writable bound to a predicate or the default writable if available
    • add

      default boolean add(Atom atom)
      Description copied from interface: Writable
      Stores the given atom
      Specified by:
      add in interface Writable
      Parameters:
      atom - to add
      Returns:
      true iff the atom is new
    • remove

      default boolean remove(Atom atom)
      Description copied from interface: Writable
      Removes the given atom
      Specified by:
      remove in interface Writable
      Parameters:
      atom - to remove
      Returns:
      true iff the atom is removed
    • clear

      default void clear()
      Description copied from interface: Writable
      Deletes all atoms
      Specified by:
      clear in interface Writable