Perfil de Ejemplo

Superior  Previo  Próximo

Abajo hay un ejemplo de Perfil UML mostrando la estructura del archivo y su uso:  

 

<?xml version="1.0" encoding="UTF-8"?>  

<UMLProfile>  

   <Documentation id="EAExample" name="UML Profile for Example" version="1" notes="An example set of stereotypes and tagged values"/>  

   <!-- The profile content -->  

   <Content>  

   <!-- List of stereotypes used in this profile-->  

   <Stereotypes>  

   <!--A profile is a list of stereotypes, that will apply to elements, links and features in a UML model. Stereotypes may have set tagged values, constraints,   

   Valid targets, default dimensions etc. The examples below are a good starting point -->  

   <Stereotype name="SimpleStereotype" notes="Place notes about stereotype here" metafile="router.emf">  

   <!-- Place a list of types that this ill apply to ...   

   valid types are any UML element (class, interface, component etc.,   

   aggregation, generalization, association, stateflow etc., operation and attribute. Make sure you use lowercase names, XML is case sensitive-->  

   <AppliesTo>  

   <Apply type="class"/>  

   <Apply type="interface"/>  

   <Apply type="node"/>  

   </AppliesTo>  

   <!--Add one or more tagged values for this stereotype. These will be automatically added to the target element when created  

   Note that you can specify a default value using "default=" and a pick list of values eg. " true | false" note the use   

   of a " | " to separate values -->  

   <TaggedValues>  

   <Tag name="hasNamespace" description="Indicates element is bound to Namespace" default="true" values="true | false"/>  

   <Tag name="targetNamespacePrefix" description="Prefix associated with namespace"/>  

   </TaggedValues>  

   <!-- Zero or more constraints to apply to element - specify name, type and notes -->  

   <Constraints>  

   <Constraint name="constraint1" type="pre" notes="My Notes"/>  

   </Constraints>  

   </Stereotype>  

   <!-- End of stereotype. When writing your own, you can duplicate a stereotype selection as above and   

   change it to start work on a new stereotype-->  

   <!-- <<AnotherExample>> -->  

   <Stereotype name="AnotherExample" cx="130" cy="100" notes="This element has a default height and width specified">  

   <AppliesTo>  

   <Apply type="class"/>  

   <Apply type="operation"/>  

   <Apply type="attribute"/>  

   </AppliesTo>  

   <TaggedValues>  

   <Tag name="memberNames" description="Schema version"/>  

   </TaggedValues>  

   <Constraints>  

   <Constraint name="constraint1" type="pre" notes="My Notes"/>  

   </Constraints>  

   </Stereotype>  

   <!-- <<Aggregation>> -->  

   <Stereotype name="aggregationLink" type="weak" notes="">  

   <AppliesTo>  

   <Apply type="aggregation"/>  

   </AppliesTo>  

   </Stereotype>  

   <!-- <<Composition>> -->  

   <Stereotype name="compositionLink" type="strong" notes="">  

   <AppliesTo>  

   <Apply type="aggregation"/>  

   </AppliesTo>  

   </Stereotype>  

   <!-- <<IndexKey>> -->  

   <Stereotype name="UniqueID" notes="">  

   <AppliesTo>  

   <Apply type="operation"/>  

   </AppliesTo>  

   <TaggedValues>  

   <Tag name="indexed" description="indicates if indexed or not" values="true | false" default="true"/>  

   </TaggedValues>  

   <Constraints>  

   <Constraint name="constraint1" type="pre" opType="pre" notes="My Notes"/>  

   <Constraint name="constraint2" type="pre" opType="post" notes="My Notes"/>  

   </Constraints>  

   </Stereotype>  

   <!-- <<Attribute>> -->  

   <Stereotype name="attname" notes="">  

   <AppliesTo>  

   <Apply type="attribute"/>  

   </AppliesTo>  

   <Constraints>  

   <Constraint name="constraint1" type="pre" notes="My Notes"/>  

   </Constraints>  

   </Stereotype>  

   <!-- <<Association>> -->  

   <Stereotype name="assocname" notes="">  

   <AppliesTo>  

   <Apply type="association"/>  

   </AppliesTo>  

   <Constraints>  

   <Constraint name="constraint1" type="pre" notes="My Notes"/>  

   </Constraints>  

   </Stereotype>  

   </Stereotypes>  

   </Content>  

</UMLProfile>