public class LocalSearchResultProvider extends java.lang.Object implements IQueryResultProvider
| Constructor and Description |
|---|
LocalSearchResultProvider(LocalSearchBackend backend,
IQueryBackendContext context,
PQuery query,
IPlanProvider planProvider) |
LocalSearchResultProvider(LocalSearchBackend backend,
IQueryBackendContext context,
PQuery query,
IPlanProvider planProvider,
QueryEvaluationHint userHints) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUpdateListener(IUpdateable listener,
java.lang.Object listenerTag,
boolean fireNow)
Internal method that registers low-level callbacks for match appearance and disappearance.
|
int |
countMatches(java.lang.Object[] parameters)
Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
|
java.util.Collection<? extends Tuple> |
getAllMatches(java.lang.Object[] parameters)
Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
|
IMatcherCapability |
getCapabilites() |
Tuple |
getOneArbitraryMatch(java.lang.Object[] parameters)
Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
IQueryBackend |
getQueryBackend()
The underlying query evaluator backend.
|
LocalSearchMatcher |
newLocalSearchMatcher(java.lang.Object[] parameters) |
void |
prepare()
Prepare this result provider.
|
void |
removeUpdateListener(java.lang.Object listenerTag)
Removes an existing listener previously registered with the given tag.
|
public LocalSearchResultProvider(LocalSearchBackend backend, IQueryBackendContext context, PQuery query, IPlanProvider planProvider) throws QueryProcessingException
QueryProcessingExceptionpublic LocalSearchResultProvider(LocalSearchBackend backend, IQueryBackendContext context, PQuery query, IPlanProvider planProvider, QueryEvaluationHint userHints) throws QueryProcessingException
QueryProcessingExceptionpublic void prepare()
throws QueryProcessingException
QueryProcessingExceptionpublic LocalSearchMatcher newLocalSearchMatcher(java.lang.Object[] parameters) throws ViatraQueryException, QueryProcessingException
public Tuple getOneArbitraryMatch(java.lang.Object[] parameters)
IQueryResultProvidergetOneArbitraryMatch in interface IQueryResultProviderparameters - array where each non-null element binds the corresponding pattern parameter to a fixed value.Tuple representation.public int countMatches(java.lang.Object[] parameters)
IQueryResultProvidercountMatches in interface IQueryResultProviderparameters - array where each non-null element binds the corresponding pattern parameter to a fixed value.public java.util.Collection<? extends Tuple> getAllMatches(java.lang.Object[] parameters)
IQueryResultProvidergetAllMatches in interface IQueryResultProviderparameters - array where each non-null element binds the corresponding pattern parameter to a fixed value.Tuple representation.public IQueryBackend getQueryBackend()
IQueryResultProvidergetQueryBackend in interface IQueryResultProviderpublic void addUpdateListener(IUpdateable listener, java.lang.Object listenerTag, boolean fireNow)
IQueryResultProviderCaution: This is a low-level callback that is invoked when the pattern matcher is not necessarily in a consistent state yet. Importantly, no model modification permitted during the callback.
The callback can be unregistered via invoking IQueryResultProvider.removeUpdateListener(Object) with the same tag.
addUpdateListener in interface IQueryResultProviderlistener - the listener that will be notified of each new match that appears or disappears, starting from now.listenerTag - a tag by which to identify the listener for later removal by IQueryResultProvider.removeUpdateListener(Object).fireNow - if true, the insertion update allback will be immediately invoked on all current matches as a one-time effect.public void removeUpdateListener(java.lang.Object listenerTag)
IQueryResultProviderremoveUpdateListener in interface IQueryResultProviderpublic IMatcherCapability getCapabilites()