public interface IQuerySpecification<Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> extends PQueryHeader
As of 0.9.0, some internal details (mostly relevant for query evaluator backends) have been moved to getInternalQueryRepresentation()
.
Modifier and Type | Method and Description |
---|---|
PQuery |
getInternalQueryRepresentation()
Returns the definition of the query in a format intended for consumption by the query evaluator.
|
Matcher |
getMatcher(ViatraQueryEngine engine)
Initializes the pattern matcher within an existing
ViatraQueryEngine . |
java.lang.Class<? extends QueryScope> |
getPreferredScopeClass()
The query is formulated over this kind of modeling platform.
|
Matcher |
instantiate()
Creates a new uninitialized matcher, which is not functional until an engine initializes it.
|
IPatternMatch |
newEmptyMatch()
Returns an empty, mutable Match compatible with matchers of this query.
|
IPatternMatch |
newMatch(java.lang.Object... parameters)
Returns a new (partial) Match object compatible with matchers of this query.
|
getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getFullyQualifiedName, getParameterNames, getParameters, getPositionOfParameter
Matcher getMatcher(ViatraQueryEngine engine) throws ViatraQueryException
ViatraQueryEngine
. If the pattern matcher is already
constructed in the engine, only a lightweight reference is created.
The match set will be incrementally refreshed upon updates.
engine
- the existing VIATRA Query engine in which this matcher will be created.ViatraQueryException
- if an error occurs during pattern matcher creationIPatternMatch newEmptyMatch()
IPatternMatch newMatch(java.lang.Object... parameters)
The returned match will be immutable. Use newEmptyMatch()
to obtain a mutable match object.
parameters
- the fixed value of pattern parameters, or null if not bound.java.lang.Class<? extends QueryScope> getPreferredScopeClass()
EMFScope
class is returned.PQuery getInternalQueryRepresentation()
Matcher instantiate() throws ViatraQueryException
ViatraQueryEngine
instance to instantiate matchers.ViatraQueryException