Interface MaterializedData
- All Superinterfaces:
Iterable<Atom>, QueryableData, TermCompound
- All Known Subinterfaces:
CSVCopyable, DatalogDelegable, FactBase, MaterializedDataCollection<T>, MaterializedWritableDataCollection<Q,W>
- All Known Implementing Classes:
DefaultInMemoryAtomSet, FactBaseDelAtomsWrapper, FederatedFactBase, LightInMemoryGraphStore, RDBMSStore, SimpleInMemoryGraphStore, TripleStoreStore
A queryable data source that can iterate over its materialized atoms.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanTests whether a given atom is present in this data source.getAtomsByPredicate(Predicate predicate) Returns an iterator over all atoms with the specified predicate.getAtomsByTerm(Term term) Returns a stream over all atoms with the specified term.Returns a set of all the atoms in the sourcegetTermsByPredicatePosition(Predicate p, int position) Returns a stream over terms which are in a specific position in at least one atom with the given predicate.default booleanisEmpty()Indicates whether this data source contains no atoms.iterator()default longsize()Counts the atoms contained in this data source.stream()Streams every atom contained in this data source.Methods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface QueryableData
estimateBound, estimateBound, evaluate, evaluate, getAtomicPattern, getPredicates, getSupportedOperations, hasPredicateMethods inherited from interface TermCompound
getAllNestedTerms, getConstants, getLiterals, getNestedTerms, getTerms, getVariables
-
Method Details
-
stream
-
iterator
-
getAtomSet
-
getAtomsByTerm
-
getTermsByPredicatePosition
Returns a stream over terms which are in a specific position in at least one atom with the given predicate.- Parameters:
p- predicateposition- the position of the term in atoms, positions starts from 0.- Returns:
- a stream over terms which appear in the specified position of the specified predicate.
-
contains
Tests whether a given atom is present in this data source.- Parameters:
a- the atom to find- Returns:
- true iff this storage contains the given atom
-
size
default long size()Counts the atoms contained in this data source.- Returns:
- the number of atoms
-
getAtomsByPredicate
-
isEmpty
default boolean isEmpty()Indicates whether this data source contains no atoms.- Returns:
truewhen the data source is empty
-