<?xml version="1.0"?>
<!DOCTYPE sdmetricsmetamodel SYSTEM 'metamodel.dtd'>

<!-- metamodel.xml

	SDMetrics V2.0 metamodel definition file for
	Gentleware Poseidon 4.x -
	uses UML2.0 statemachine for state diagrams,
	UML2.0 activity graphs that do not distinguish "ObjectFlow" and "ControlFlow",
        UML2.0 interactions, messages, lifelines etc for sequence diagrams,
        but UML1.x objects and stimuli for collaboration diagrams,
        UML1.x for all other diagram types.
	(C)2006 Juergen Wuest
	www.sdmetrics.com

-->

<sdmetricsmetamodel version="2.0">



<modelelement name="sdmetricsbase">
	<attribute name="context" type="ref">Owner of the element in the UML model.</attribute>
	<attribute name="id" type="data">Unique identifier of the model element.</attribute>
	<attribute name="name" type="data">Name of the element in UML model.</attribute>
	<attribute name="stereotypes" type="ref" multiplicity="many">The stereotypes of the model element.</attribute>
</modelelement>


<!-- classes, interfaces, attributes, operations -->
<modelelement name="class">
	<attribute name="visibility" type="data">Visibility of the class (public, private, protected, package).</attribute>
	<attribute name="abstract" type="data">Boolean indicating if class is abstract.</attribute>
	<attribute name="leaf" type="data">Boolean indicating if a class must not have subclasses.</attribute>
</modelelement>
<modelelement name="interface" />
<modelelement name="datatype" />
<modelelement name="attribute">
	<attribute name="visibility" type="data">Visibility of the attribute (public, private, protected, package).</attribute>
	<attribute name="attributetype" type="ref">Reference to the attribute type (class, data type etc).</attribute>
	<attribute name="changeability" type="data">Changeability of the attribute (changeable or none, frozen, addOnly).</attribute>
</modelelement>

<modelelement name="operation">
	<attribute name="visibility" type="data">Visibility of the operation (public, private, protected, package).</attribute>
	<attribute name="abstract" type="data">Boolean indicating if operation is abstract.</attribute>
	<attribute name="isquery" type="data">Boolean indicating if operation is a query that does not change the classifier's state.</attribute>
</modelelement>
<modelelement name="parameter">
	<attribute name="kind" type="data">The kind of parameter (in, out, inout, return).</attribute>
	<attribute name="parametertype" type="ref">Reference to the parameter type (class, data type etc).</attribute>
</modelelement>
<modelelement name="method"/>

<!-- models, packages, subsystems -->
<modelelement name="model" />
<modelelement name="package" />
<modelelement name="subsystem" />

<!-- relationships: association, generalization, ... -->
<modelelement name="association">
	<attribute name="connection" type="ref" multiplicity="many">AssociationEnd collection.</attribute>
</modelelement>
<modelelement name="associationclass"/>
<modelelement name="associationend">
	<attribute name="navigable" type="data">Boolean indicating if the association end is navigable.</attribute>

	<attribute name="aggregation" type="data">Indicates if the association end is an aggregation or composite.</attribute>

	<attribute name="associationendtype" type="ref">A link to the element attached to the association end.</attribute>
</modelelement>
<modelelement name="generalization">
	<attribute name="genchild" type="ref">Link to the child in the generalization.</attribute>
	<attribute name="genparent" type="ref">Link to the parent in the generalization.</attribute>
</modelelement>
<modelelement name="abstraction">
	<attribute name="abssupplier" type="ref">Link to the interface.</attribute>
	<attribute name="absclient" type="ref">Link to the element implementing the interface</attribute>
</modelelement>
<modelelement name="dependency">
	<attribute name="depsupplier" type="ref">Link to the supplier of the dependency.</attribute>
	<attribute name="depclient" type="ref">Link to the client of the dependency.</attribute>
</modelelement>
<modelelement name="usage">
	<attribute name="depsupplier" type="ref">Link to the supplier of the usage.</attribute>
	<attribute name="depclient" type="ref">Link to the client of the usage.</attribute>
</modelelement>


<!-- objects, stimuli, links-->
<modelelement name="object">
	<attribute name="objtype" type="ref">Link to the element of which this object is an instance.</attribute>
</modelelement>
<modelelement name="stimulus">
	<attribute name="stimsender" type="ref">Sender of the stimulus.</attribute>
	<attribute name="stimreceiver" type="ref">Receiver of the stimulus.</attribute>
	<attribute name="stimaction" type="ref">The action that the stimulus dispatches.</attribute>
</modelelement>
<modelelement name="link"/>
<modelelement name="linkend">
	<attribute name="linkendtype" type="ref">The element that is attached to the link end.</attribute>
</modelelement>

<!-- classifierroles, messages -->
<modelelement name="collaboration"/>
<modelelement name="classifierrole">
	<attribute name="classifierbase" type="ref">The classifier which the classifier role is a view of.</attribute>
</modelelement>





<!-- instance specifications, connectors. -->
 
<modelelement name="collaboration" parent="class">
	<attribute name="ownedbehaviors" type="ref" multiplicity="many">Behavior specifications owned by the collaboration.</attribute>
</modelelement>

<modelelement name="interaction" parent="class">
  <attribute name="lifelines" type="ref" multiplicity="many">The lifelines involved in the interaction.</attribute>
  <attribute name="messages" type="ref" multiplicity="many">The messages sent within the interaction.</attribute>
	<attribute name="fragments" type="ref" multiplicity="many">The message occurrence specifications and combined fragments of the interaction.</attribute>
</modelelement>

<modelelement name="instancespecification">
	<attribute name="classifier" type="ref" multiplicity="many">Links to the classifiers that this entity is an instance of.</attribute>
  <attribute name="deployments" type="ref" multiplicity="many">The deployments where this instance specification is the target.</attribute>
</modelelement>

<modelelement name="lifeline">
	<attribute name="represents" type="ref">The interaction participant that this lifeline represents.</attribute>
</modelelement>

<modelelement name="message">
	<attribute name="receiveevent" type="ref">Occurrence specification for the message reception.</attribute>
	<attribute name="sendevent" type="ref">Occurrence specification for the message sending.</attribute>
  <attribute name="sort">The sort of communication (synchCall, asynchCall, asynchSignal).</attribute>
</modelelement>

<modelelement name="occurrencespec">
  <attribute name="covered" type="ref">The lifeline on which this occurrence specification appears.</attribute>
	<attribute name="event" type="ref">The occurring event.</attribute>
</modelelement>

<modelelement name="combinedfragment">
  <attribute name="operator">The interaction operator (alt, loop, break, opt, par, ref, etc.)</attribute>
  <attribute name="covered" type="ref" multiplicity="many">The lifelines covered by this combined fragment.</attribute>
	<attribute name="operands" type="ref" multiplicity="many">The interaction operands of this combined fragment.</attribute>
</modelelement>

<modelelement name="interactionoperand">
	<attribute name="fragments" type="ref" multiplicity="many">The message occurrence specifications and combined fragments of the interaction operand.</attribute>
</modelelement>


<!-- UML 2 state machines for poseidon -->
<modelelement name="statemachine" />
<modelelement name="region" />
<modelelement name="state">
	<attribute name="kind">The kind of state: empty (''), final, initial, deepHistory, shallowHistory, join, fork, choice, junction, entryPoint, exitPoint, terminate.</attribute>
  <attribute name="entry" type="ref" multiplicity="many">The entry activities of the state.</attribute>
  <attribute name="exit" type="ref" multiplicity="many">The exit activities of the state.</attribute>
  <attribute name="doactivity" type="ref" multiplicity="many">The do-activities of the state.</attribute>
</modelelement>
<modelelement name="transition">
  <attribute name="kind" type="data">The kind of transition: external, internal, or local.</attribute>
	<attribute name="transsource" type="ref">The source state of the transition.</attribute>
	<attribute name="transtarget" type="ref">The target state of the transition.</attribute>
	<attribute name="triggers" type="ref" multiplicity="many">The triggers of the transition.</attribute>
</modelelement>
<modelelement name="constraint"/>
<modelelement name="trigger">
  <attribute name="operation" type="ref">The operation of the call trigger.</attribute>
</modelelement>
<modelelement name="activity" />


<!-- activities 

activities have (activity)-node: action,  objectnodes centr/ds/actPara/pin, ctrlNodes actFinal, initial, flowFin, frk,join,merg,decis
activities have (activity)-group: can own groups (via ownedElement, subgroup)
	activityPartition (does not own its stuff, only references it)
	InterruptibleActivityRegion, ExpansionRegion
	StructuredActivityNode with subtypes ControlNode, LoopNode, SequenceNode, they can own Output pins and edges (containedEdge)
	and nodes (containedNode)
activities have (activity)-egdge: control flow, object flow 

-->

<modelelement name="activity">
  <attribute name="nodes"  type="ref" multiplicity="many">The action, control, and object nodes of the activity.</attribute>
  <attribute name="edges"  type="ref" multiplicity="many">The control and object flows of the activity.</attribute>
	<attribute name="groups" type="ref" multiplicity="many">The groups of the activity.</attribute>
</modelelement>

<modelelement name="sdmetricsabstractactivitygroup">
	<attribute name="edges"  type="ref" multiplicity="many">The contained edges of the group.</attribute>
	<attribute name="nodes"  type="ref" multiplicity="many">The contained nodes of the group.</attribute>
	<attribute name="groups" type="ref" multiplicity="many">The subgroups of the group.</attribute>
  <attribute name="handlers" type="ref" multiplicity="many">The exception handlers of the structured node group.</attribute>
	<attribute name="pins" type="ref" multiplicity="many">Pins owned by the activity group.</attribute>
</modelelement>

<modelelement name="activitygroup" parent="sdmetricsabstractactivitygroup">
  <attribute name="kind">The kind of group: partition, interruptible, expansion, structured, conditional, loop, sequence.</attribute>
</modelelement>

<modelelement name="sdmetricsabstractaction">
	<attribute name="kind" type="data">The kind of action: send, return, create, etc (there are many).</attribute>
  <attribute name="inputs" type="ref" multiplicity="many">The input pins of the action.</attribute>
  <attribute name="outputs" type="ref" multiplicity="many">The output pins of the action.</attribute>
  <attribute name="handlers" type="ref" multiplicity="many">The exception handlers owned by the action.</attribute>
</modelelement>

<modelelement name="action" parent="sdmetricsabstractaction" />

<modelelement name="controlnode">
  <attribute name="kind">The kind of control node: initial, activityfinal, flowfinal, fork, join, merge, or decision.</attribute>
</modelelement>

<modelelement name="objectnode">
  <attribute name="kind">The kind of object node: centralbuffer, datastore, activityparameter, or expansion.</attribute>
</modelelement>

<modelelement name="pin">
  <attribute name="kind">The kind of pin (input, output, value, actioninput).</attribute>
  <attribute name="type" type="ref">The type of the pin.</attribute>
</modelelement>


<modelelement name="activityedge">
  <attribute name="source" type="ref">Source of the control flow.</attribute>
	<attribute name="target" type="ref">Target of the control flow.</attribute>
	<attribute name="guard" type="ref">Guard of the control flow.</attribute>
</modelelement>


<modelelement name="signal"/>
<modelelement name="exceptionhandler">
  <attribute name="handlerbody" type="ref">The node that handles the exception.</attribute>
  <attribute name="exceptioninput" type="ref">The input node of the handler body that received the exception token.</attribute>
</modelelement>

<!-- Value specifications  -->
<modelelement name="expression"/>
<modelelement name="opaqueexpression"/>
<modelelement name="instancevalue"/>
<modelelement name="literalboolean"/>
<modelelement name="literalinteger"/>
<modelelement name="literalstring"/>
<modelelement name="literalunlimitednatural"/>
<modelelement name="literalnull"/>


<!-- use case model -->
<modelelement name="usecase"/>
<modelelement name="actor"/>
<modelelement name="usecaseextend">
	<attribute name="usecaseextbase" type="ref">The use case that is extended.</attribute>
	<attribute name="usecaseextension" type="ref">The use case that is the extension.</attribute>
	<attribute name="usecaseextensionpoint" type="ref">The extension point in the extended use case.</attribute>
</modelelement>
<modelelement name="usecaseinclude">
	<attribute name="usecaseincbase" type="ref">The including use case.</attribute>
	<attribute name="usecaseaddition" type="ref">The included use case.</attribute>
</modelelement>
<modelelement name="extensionpoint">
</modelelement>


<!-- components, nodes -->
<modelelement name="component">
	<attribute name="deploymentlocation" type="ref">The node on which the component is deployed.</attribute>
</modelelement>
<modelelement name="componentinstance">
	<attribute name="componenttype" type="ref">The component that is instantiated.</attribute>
</modelelement>
<modelelement name="node"/>
<modelelement name="nodeinstance">
	<attribute name="nodetype" type="ref">The node that is instantiated.</attribute>
</modelelement>




<!-- Extension mechanisms: stereotypes, tagged values -->
<modelelement name="stereotype">
  <attribute name="extendedelements" type="ref" multiplicity="many">The set of elements that the stereotype extends.</attribute>
</modelelement>
	
<modelelement name="taggedvalue">
	<attribute name="definition" type="ref">Definition of the tagged value.</attribute>
	<attribute name="value" type="data">The value of the tagged value.</attribute>
</modelelement>

<modelelement name="tagdefinition">
	<attribute name="tagtype" type="data">The tag name of a tagged value's tag.</attribute>
</modelelement>


<!-- UML diagram information -->
<modelelement name="diagram" >
	 <attribute name="type" type="data">The type of diagram (class diagram, sequence diagram, etc).</attribute>
</modelelement>

<modelelement name="diagramelement" >
	 <attribute name="element" type="ref">The element that is shown on the diagram.</attribute>
</modelelement>


<!-- Willian Nalepa Oizumi - UEM -->

<modelelement name="comment">
	<attribute name="annotatedElement" type="ref">Link to the ref element.</attribute>
	<attribute name="taggedValue" type="ref" multiplicity="many">Tagged Value collection.</attribute>
</modelelement>

</sdmetricsmetamodel>

