Interface QueryableDataCollection<T extends QueryableData>
- Type Parameters:
T- the type of queryable data stored in the collection
- All Superinterfaces:
QueryableData
- All Known Subinterfaces:
MaterializedDataCollection<T>, MaterializedWritableDataCollection<Q,W>, QueryableWritableDataCollection<Q, W>
A composite
QueryableData backed by multiple predicate-specific data sources.-
Method Summary
Modifier and TypeMethodDescriptionestimateBound(BasicQuery query) Estimate the number of answers to a query The estimation is the upper bound, meaning the actual number of answers will not exceed this number.evaluate(BasicQuery query) Try to evaluate a basic queryReturns every queryable data source indexed by predicate.default AtomicPatterngetAtomicPattern(Predicate predicate) Get the basic pattern for a given predicateReturns a collection of all predicates in this Readable.getQueryableData(Predicate predicate) Looks up the queryable data source that handles a predicate.Methods inherited from interface QueryableData
estimateBound, evaluate, getSupportedOperations, hasPredicate
-
Method Details
-
getAllQueryableData
-
getQueryableData
-
getPredicates
Description copied from interface:QueryableDataReturns a collection of all predicates in this Readable.- Specified by:
getPredicatesin interfaceQueryableData- Returns:
- a collection of all predicates.
-
evaluate
Description copied from interface:QueryableDataTry to evaluate a basic query- Specified by:
evaluatein interfaceQueryableData- Parameters:
query- the query to evaluate- Returns:
- Empty if the query is not evaluable, otherwise a stream containing substitutions that are the answers to the query
- Throws:
EvaluationException- if query evaluation fails
-
estimateBound
Description copied from interface:QueryableDataEstimate the number of answers to a query The estimation is the upper bound, meaning the actual number of answers will not exceed this number. Implementations may return an empty Optional if they cannot provide an estimation.- Specified by:
estimateBoundin interfaceQueryableData- Parameters:
query- the query for which we want to know the upper bound- Returns:
- an Optional containing the estimated upper bound of answers, or an empty Optional if estimation is not possible
-
getAtomicPattern
Description copied from interface:QueryableDataGet the basic pattern for a given predicate- Specified by:
getAtomicPatternin interfaceQueryableData- Parameters:
predicate- the predicate for which we want to know the basic pattern- Returns:
- a basic pattern for predicate
-