public abstract class BaseQuerySpecification<Matcher extends IncQueryMatcher<? extends IPatternMatch>> extends java.lang.Object implements IQuerySpecification<Matcher>
| Constructor and Description |
|---|
BaseQuerySpecification(PQuery wrappedPQuery)
Instantiates query specification for the given internal query representation.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<PAnnotation> |
getAllAnnotations()
Returns the list of annotations specified for this query
|
java.util.List<PAnnotation> |
getAnnotationsByName(java.lang.String annotationName)
Returns the list of annotations with a specified name
|
PAnnotation |
getFirstAnnotationByName(java.lang.String annotationName)
Returns the first annotation with a specified name
|
java.lang.String |
getFullyQualifiedName()
Identifies the pattern for which matchers can be instantiated.
|
PQuery |
getInternalQueryRepresentation()
Returns the definition of the query in a format intended for consumption by the query evaluator.
|
Matcher |
getMatcher(IncQueryEngine engine)
Initializes the pattern matcher within an existing
IncQueryEngine. |
Matcher |
getMatcher(org.eclipse.emf.common.notify.Notifier emfRoot)
Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
|
java.util.List<java.lang.String> |
getParameterNames()
Return the list of parameter names
|
java.util.List<PParameter> |
getParameters()
Returns a list of parameter descriptions
|
java.lang.Integer |
getPositionOfParameter(java.lang.String parameterName)
Returns the index of a named parameter
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPreferredScopeClass, newEmptyMatch, newMatchpublic BaseQuerySpecification(PQuery wrappedPQuery)
public PQuery getInternalQueryRepresentation()
IQuerySpecificationgetInternalQueryRepresentation in interface IQuerySpecification<Matcher extends IncQueryMatcher<? extends IPatternMatch>>public Matcher getMatcher(org.eclipse.emf.common.notify.Notifier emfRoot) throws IncQueryException
IQuerySpecificationThe scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
The match set will be incrementally refreshed upon updates from this scope.
The matcher will be created within the managed IncQueryEngine belonging to the EMF model root, so
multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
getMatcher in interface IQuerySpecification<Matcher extends IncQueryMatcher<? extends IPatternMatch>>emfRoot - the root of the EMF tree where the pattern matcher will operate. Recommended: Resource or ResourceSet.IncQueryException - if an error occurs during pattern matcher creationpublic Matcher getMatcher(IncQueryEngine engine) throws IncQueryException
IQuerySpecificationIncQueryEngine. 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.
getMatcher in interface IQuerySpecification<Matcher extends IncQueryMatcher<? extends IPatternMatch>>engine - the existing IncQuery engine in which this matcher will be created.IncQueryException - if an error occurs during pattern matcher creationpublic java.util.List<PAnnotation> getAllAnnotations()
PQueryHeadergetAllAnnotations in interface PQueryHeaderpublic java.util.List<PAnnotation> getAnnotationsByName(java.lang.String annotationName)
PQueryHeadergetAnnotationsByName in interface PQueryHeaderpublic PAnnotation getFirstAnnotationByName(java.lang.String annotationName)
PQueryHeadergetFirstAnnotationByName in interface PQueryHeaderpublic java.lang.String getFullyQualifiedName()
PQueryHeadergetFullyQualifiedName in interface PQueryHeaderpublic java.util.List<java.lang.String> getParameterNames()
PQueryHeadergetParameterNames in interface PQueryHeaderpublic java.util.List<PParameter> getParameters()
PQueryHeadergetParameters in interface PQueryHeaderpublic java.lang.Integer getPositionOfParameter(java.lang.String parameterName)
PQueryHeadergetPositionOfParameter in interface PQueryHeader