public class ElementOwnedElementMatcher extends org.eclipse.viatra.query.runtime.api.impl.BaseMatcher<ElementOwnedElementMatch>
Use the pattern matcher on a given model via on(ViatraQueryEngine)
,
e.g. in conjunction with ViatraQueryEngine#on(Notifier)
.
Matches of the pattern will be represented as ElementOwnedElementMatch
.
Original source:
@Surrogate(feature = "ownedElement")
@QueryExplorer(checked = false)
pattern elementOwnedElement(source: Element, target: Element)
{ Abstraction.mapping(source, target); } or
{ AcceptEventAction.trigger(source, target); } or
{ find actionInput(source, target); } or
{ Action.localPostcondition(source, target); } or
{ Action.localPrecondition(source, target); } or
{ find actionOutput(source, target); } or
{ ActionInputPin.fromAction(source, target); } or
{ Activity.edge(source, target); } or
{ find activityGroup(source, target); } or
{ find activityNode(source, target); } or
{ ActivityEdge.guard(source, target); } or
{ ActivityEdge.weight(source, target); } or
{ find activityGroupSubgroup(source, target); } or
{ Artifact.manifestation(source, target); } or
{ BehavioredClassifier.interfaceRealization(source, target); } or
{ ChangeEvent.changeExpression(source, target); } or
{ Classifier.collaborationUse(source, target); } or
{ Classifier.generalization(source, target); } or
{ Classifier.substitution(source, target); } or
{ CollaborationUse.roleBinding(source, target); } or
{ CombinedFragment.cfragmentGate(source, target); } or
{ CombinedFragment.operand(source, target); } or
{ Component.realization(source, target); } or
{ ConditionalNode.clause(source, target); } or
{ Connector.end(source, target); } or
{ Constraint.specification(source, target); } or
{ Deployment.configuration(source, target); } or
{ DeploymentTarget.deployment(source, target); } or
{ Duration.expr(source, target); } or
{ Element.ownedComment(source, target); } or
{ ExecutableNode.handler(source, target); } or
{ Expression.operand(source, target); } or
{ Extend.condition(source, target); } or
{ InstanceSpecification.slot(source, target); } or
{ InstanceSpecification.specification(source, target); } or
{ Interaction.action(source, target); } or
{ InteractionConstraint.maxint(source, target); } or
{ InteractionConstraint.minint(source, target); } or
{ InteractionFragment.generalOrdering(source, target); } or
{ InteractionOperand.guard(source, target); } or
{ InteractionUse.actualGate(source, target); } or
{ InteractionUse.argument(source, target); } or
{ InteractionUse.returnValue(source, target); } or
{ JoinNode.joinSpec(source, target); } or
{ Lifeline.selector(source, target); } or
{ LinkAction.endData(source, target); } or
{ LinkEndData.qualifier(source, target); } or
{ LoopNode.loopVariable(source, target); } or
{ Message.argument(source, target); } or
{ MultiplicityElement.lowerValue(source, target); } or
{ MultiplicityElement.upperValue(source, target); } or
{ NamedElement.nameExpression(source, target); } or
{ Namespace.elementImport(source, target); } or
{ find namespaceOwnedMember(source, target); } or
{ Namespace.packageImport(source, target); } or
{ ObjectNode.upperBound(source, target); } or
{ Package.packageMerge(source, target); } or
{ Package.profileApplication(source, target); } or
{ Parameter.defaultValue(source, target); } or
{ ParameterSet.condition(source, target); } or
{ Property.defaultValue(source, target); } or
{ Property.qualifier(source, target); } or
{ ProtocolStateMachine.conformance(source, target); } or
{ Slot.value(source, target); } or
{ State.deferrableTrigger(source, target); } or
{ State.doActivity(source, target); } or
{ State.entry(source, target); } or
{ State.exit(source, target); } or
{ StateInvariant.invariant(source, target); } or
{ Stereotype.icon(source, target); } or
{ StringExpression.subExpression(source, target); } or
{ StructuredActivityNode.edge(source, target); } or
{ StructuredActivityNode.node(source, target); } or
{ TemplateBinding.parameterSubstitution(source, target); } or
{ TemplateParameter.ownedDefault(source, target); } or
{ TemplateParameter.ownedParameteredElement(source, target); } or
{ TemplateParameterSubstitution.ownedActual(source, target); } or
{ TemplateSignature.ownedParameter(source, target); } or
{ TemplateableElement.ownedTemplateSignature(source, target); } or
{ TemplateableElement.templateBinding(source, target); } or
{ TimeEvent.when(source, target); } or
{ TimeExpression.expr(source, target); } or
{ Transition.effect(source, target); } or
{ Transition.trigger(source, target); } or
{ ValuePin.value(source, target); } or
{ ValueSpecificationAction.value(source, target); }
ElementOwnedElementMatch
,
ElementOwnedElementProcessor
,
ElementOwnedElementQuerySpecification
Modifier and Type | Method and Description |
---|---|
int |
countMatches(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
|
void |
forEachMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget,
org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super ElementOwnedElementMatch> processor)
Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
forOneArbitraryMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget,
org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super ElementOwnedElementMatch> processor)
Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
java.util.Collection<ElementOwnedElementMatch> |
getAllMatches(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOfsource()
Retrieve the set of values that occur in matches for source.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOfsource(org.eclipse.uml2.uml.Element pTarget)
Retrieve the set of values that occur in matches for source.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOfsource(ElementOwnedElementMatch partialMatch)
Retrieve the set of values that occur in matches for source.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOftarget()
Retrieve the set of values that occur in matches for target.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOftarget(org.eclipse.uml2.uml.Element pSource)
Retrieve the set of values that occur in matches for target.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOftarget(ElementOwnedElementMatch partialMatch)
Retrieve the set of values that occur in matches for target.
|
ElementOwnedElementMatch |
getOneArbitraryMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
hasMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
under any possible substitution of the unspecified parameters (if any).
|
ElementOwnedElementMatch |
newMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Returns a new (partial) match.
|
static ElementOwnedElementMatcher |
on(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine engine)
Initializes the pattern matcher within an existing VIATRA Query engine.
|
static org.eclipse.viatra.query.runtime.api.IQuerySpecification<ElementOwnedElementMatcher> |
querySpecification() |
countMatches, countMatches, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, newEmptyMatch, newMatch
public static ElementOwnedElementMatcher on(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine engine) throws org.eclipse.viatra.query.runtime.exception.ViatraQueryException
engine
- the existing VIATRA Query engine in which this matcher will be created.org.eclipse.viatra.query.runtime.exception.ViatraQueryException
- if an error occurs during pattern matcher creationpublic java.util.Collection<ElementOwnedElementMatch> getAllMatches(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public ElementOwnedElementMatch getOneArbitraryMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public boolean hasMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public int countMatches(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public void forEachMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget, org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super ElementOwnedElementMatch> processor)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.processor
- the action that will process each pattern match.public boolean forOneArbitraryMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget, org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super ElementOwnedElementMatch> processor)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.processor
- the action that will process the selected match.public ElementOwnedElementMatch newMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
The returned match will be immutable. Use BaseMatcher.newEmptyMatch()
to obtain a mutable match object.
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOfsource()
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOfsource(ElementOwnedElementMatch partialMatch)
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOfsource(org.eclipse.uml2.uml.Element pTarget)
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOftarget()
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOftarget(ElementOwnedElementMatch partialMatch)
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOftarget(org.eclipse.uml2.uml.Element pSource)
public static org.eclipse.viatra.query.runtime.api.IQuerySpecification<ElementOwnedElementMatcher> querySpecification() throws org.eclipse.viatra.query.runtime.exception.ViatraQueryException
org.eclipse.viatra.query.runtime.exception.ViatraQueryException
- if the pattern definition could not be loaded