All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fUML.Semantics.CommonBehaviors.Communications.CallEventBehavior Maven / Gradle / Ivy

Go to download

This open source software is a reference implementation, consisting of software and related files, for the OMG specification called the Semantics of a Foundational Subset for Executable UML Models (fUML). The reference implementation is intended to implement the execution semantics of UML activity models, accepting an XMI file from a conformant UML model as its input and providing an execution trace of the selected activity model(s) as its output. The core execution engine, which is directly generated from the normative syntactic and semantic models for fUML, may also be used as a library implementation of fUML in other software.

There is a newer version: 1.5.0a
Show newest version
/*
 * Copyright 2017 Data Access Technologies, Inc. 
 * 
 * Licensed under the Academic Free License version 3.0 
 * (http://www.opensource.org/licenses/afl-3.0.php), except as stated 
 * in the file entitled Licensing-Information. 
 */

package fUML.Semantics.CommonBehaviors.Communications;

import fUML.Syntax.Classes.Kernel.Operation;
import fUML.Syntax.Classes.Kernel.Parameter;
import fUML.Syntax.CommonBehaviors.BasicBehaviors.Behavior;

public class CallEventBehavior extends Behavior {
	
	public Operation operation = null;
	
	public void setOperation(Operation operation) {
		// Set the operation for this call event behavior and construct
		// the behavior signature based on the operation signature.
		
		this.operation = operation;
		for(int i = 0; i < operation.ownedParameter.size(); i++){
			Parameter operationParameter = operation.ownedParameter.get(i);
			Parameter parameter = new Parameter();
			parameter.name = operationParameter.name;
			parameter.type = operationParameter.type;
			parameter.multiplicityElement.lowerValue = 
					operationParameter.multiplicityElement.lowerValue;
			parameter.multiplicityElement.lower = 
					operationParameter.multiplicityElement.lower;
			parameter.multiplicityElement.upperValue = 
					operationParameter.multiplicityElement.upperValue;
			parameter.multiplicityElement.upper = 
					operationParameter.multiplicityElement.upper;
			parameter.direction = operationParameter.direction;
			parameter.owner = this;
			parameter.namespace = this;
			
			this.ownedElement.addValue(parameter);
			this.ownedMember.addValue(parameter);
			this.member.addValue(parameter);
			this.ownedParameter.addValue(parameter);
		}
		this.isReentrant = true;
		this.name = "CallEventBehavior";
		if (operation.name != null) {
			this.name = this.name + "(" + operation.name + ")";
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy