public class GenericEMFPatternPQuery extends BasePQuery implements InitializablePQuery
End users should use {link GenericQuerySpecification} instead.
PQuery.PQueryStatus
pProblems, status, visibility
Constructor and Description |
---|
GenericEMFPatternPQuery(Pattern pattern)
Initializes a generic query representation for a given pattern.
|
GenericEMFPatternPQuery(Pattern pattern,
boolean delayedInitialization)
Initializes a generic query specification for a given pattern.
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(PAnnotation annotation)
Adds an annotation to the specification.
|
void |
addError(PProblem problem)
Adds a detected error.
|
protected java.util.Set<PBody> |
doGetContainedBodies()
Creates and returns the bodies of the query.
|
boolean |
equals(java.lang.Object obj) |
PDisjunction |
getDisjunctBodies()
Returns all bodies associated with the query in their canonical form.
|
java.lang.String |
getFullyQualifiedName()
Identifies the pattern for which matchers can be instantiated.
|
java.util.List<PParameter> |
getParameters()
Returns a list of parameter descriptions
|
Pattern |
getPattern() |
int |
hashCode() |
void |
initializeBodies(java.util.Set<PBody> bodies)
Sets up the bodies of the pattern.
|
void |
setStatus(PQuery.PQueryStatus newStatus)
Sets the query status.
|
checkMutability, ensureInitialized, getAllAnnotations, getAllReferredQueries, getAnnotationsByName, getDirectReferredQueries, getEvaluationHints, getFirstAnnotationByName, getParameterNames, getPositionOfParameter, getPProblems, getStatus, getTypeGuarantees, getVisibility, isMutable, publishedAs, setBodies, setEvaluationHints, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
checkMutability, ensureInitialized, getAllReferredQueries, getDirectReferredQueries, getEvaluationHints, getPProblems, getStatus, getTypeGuarantees, isMutable, publishedAs
getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getParameter, getParameterNames, getPositionOfParameter, getSimpleName, getVisibility
public GenericEMFPatternPQuery(Pattern pattern)
Warning: it is not recommended to directly instantiate GenericPQuery instances as
they will not reuse previously built specifications- use SpecificationBuilder
instead.
pattern
- the pattern for which the matcher is to be constructed.ViatraQueryRuntimeException
public GenericEMFPatternPQuery(Pattern pattern, boolean delayedInitialization)
pattern
- the pattern for which matchers are to be constructed.delayedInitialization
- true if the query is not created automatically - in this case before use the
initializeBodies(Set)
methodViatraQueryRuntimeException
public Pattern getPattern()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getFullyQualifiedName()
PQueryHeader
getFullyQualifiedName
in interface PQueryHeader
public java.util.List<PParameter> getParameters()
PQueryHeader
getParameters
in interface PQueryHeader
public PDisjunction getDisjunctBodies()
PQuery
getDisjunctBodies
in interface PQuery
getDisjunctBodies
in class BasePQuery
public void addAnnotation(PAnnotation annotation)
InitializablePQuery
uninitialized
.addAnnotation
in interface InitializablePQuery
addAnnotation
in class BasePQuery
protected java.util.Set<PBody> doGetContainedBodies()
BasePQuery
doGetContainedBodies
in class BasePQuery
public void initializeBodies(java.util.Set<PBody> bodies)
InitializablePQuery
uninitialized
.initializeBodies
in interface InitializablePQuery
public final void setStatus(PQuery.PQueryStatus newStatus)
InitializablePQuery
uninitialized
.setStatus
in interface InitializablePQuery
setStatus
in class BasePQuery
newStatus
- the new statuspublic void addError(PProblem problem)
InitializablePQuery
uninitialized
.addError
in interface InitializablePQuery
addError
in class BasePQuery
problem
- the new problem