com.ashridgetech.jamda.uml
Class StandardTagDef

java.lang.Object
  |
  +--com.ashridgetech.jamda.uml.StandardElementDef
        |
        +--com.ashridgetech.jamda.uml.StandardTagDef

public class StandardTagDef
extends StandardElementDef

Defines a standard TagDefinition which is required in a Model.

Author:
PBoocock

Constructor Summary
StandardTagDef(java.lang.String name, TagDefinition.TagType tagType, int lowerMultiplicity, int upperMultiplicity)
          Creates a new instance of StandardTagDef which does not belong to a Stereotype
StandardTagDef(java.lang.String name, TagDefinition.TagType tagType, StandardStereotypeDef stereotypeDef, int lowerMultiplicity, int upperMultiplicity)
          Creates a new instance of StandardTagDef
 
Method Summary
protected  ModelElement createElement(Model model)
          Create the element required by this definition in a given Model.
 java.lang.String getDescription()
          Get a description of the element required.
 int getLowerMultiplicity()
          Get the lower multiplicity of the required TagDefinition.
 StandardStereotypeDef getStereotypeDef()
          Get the definition of the Stereotype to which the required TagDefinition belongs.
 TagDefinition getTagDefinition(Model model)
          Get the TagDefinition required by this definition from a given Model.
 java.lang.String getTagName()
          Get the name of the required TagDefinition.
 TagDefinition.TagType getTagType()
          Get the type of the required TagDefinition.
 int getUpperMultiplicity()
          Get the upper multiplicity of the required TagDefinition.
 boolean hasElement(Model model)
          Check whether the TagDefinition required by this definition is present in a given Model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardTagDef

public StandardTagDef(java.lang.String name,
                      TagDefinition.TagType tagType,
                      StandardStereotypeDef stereotypeDef,
                      int lowerMultiplicity,
                      int upperMultiplicity)
Creates a new instance of StandardTagDef

Parameters:
name - the TagDefinition name
tagType - the UML element type, or String or Boolean, to which this tag refers

StandardTagDef

public StandardTagDef(java.lang.String name,
                      TagDefinition.TagType tagType,
                      int lowerMultiplicity,
                      int upperMultiplicity)
Creates a new instance of StandardTagDef which does not belong to a Stereotype

Parameters:
name - the TagDefinition name
tagType - the UML element type, or String or Boolean, to which this tag refers
Method Detail

getStereotypeDef

public StandardStereotypeDef getStereotypeDef()
Get the definition of the Stereotype to which the required TagDefinition belongs.

Returns:
the stereotype definition, or null if this tag does not belong to a Stereotype

getTagName

public java.lang.String getTagName()
Get the name of the required TagDefinition.

Returns:
the tag name

getTagType

public TagDefinition.TagType getTagType()
Get the type of the required TagDefinition.

Returns:
the tag type

getLowerMultiplicity

public int getLowerMultiplicity()
Get the lower multiplicity of the required TagDefinition.

Returns:
the lower multiplicity

getUpperMultiplicity

public int getUpperMultiplicity()
Get the upper multiplicity of the required TagDefinition.

Returns:
the upper multiplicity

hasElement

public boolean hasElement(Model model)
Check whether the TagDefinition required by this definition is present in a given Model.

Specified by:
hasElement in class StandardElementDef
Parameters:
model - the Model in which the check is to be performed
Returns:
true if the TagDefinition is present

createElement

protected ModelElement createElement(Model model)
Create the element required by this definition in a given Model.

Specified by:
createElement in class StandardElementDef
Parameters:
model - the Model in which the element is to be created
Returns:
the new ModelElement

getTagDefinition

public TagDefinition getTagDefinition(Model model)
Get the TagDefinition required by this definition from a given Model.

Parameters:
model - the Model in which the TagDefinition is to be found
Returns:
the TagDefinition

getDescription

public java.lang.String getDescription()
Get a description of the element required.

Specified by:
getDescription in class StandardElementDef
Returns:
the description


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.