|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ashridgetech.jamda.uml.ModelElement | +--com.ashridgetech.jamda.uml.TagDefinition
A UML Tag Definition. Referenced by various other UML metamodel classes.
Nested Class Summary | |
static class |
TagDefinition.TagType
Type-safe enumeration for the allowable tag types. |
Nested classes inherited from class com.ashridgetech.jamda.uml.ModelElement |
ModelElement.DuplicateElementException, ModelElement.ElementListStore, ModelElement.ElementNameListStore, ModelElement.ElementNameStore, ModelElement.ElementStore, ModelElement.TaggedValue, ModelElement.UnknownElementException |
Field Summary |
Fields inherited from class com.ashridgetech.jamda.uml.ModelElement |
DUMMY_STORE |
Constructor Summary | |
|
TagDefinition(Model model,
java.lang.String name,
TagDefinition.TagType tagType,
int lowerMultiplicity,
int upperMultiplicity)
Creates new TagDefinition belonging to the Model . |
protected |
TagDefinition(Model model,
java.lang.String name,
TagDefinition.TagType tagType,
int lowerMultiplicity,
int upperMultiplicity,
Stereotype owner)
Creates new TagDefinition with a new NSUML MTagDefinition object. |
protected |
TagDefinition(ru.novosoft.uml.foundation.core.MTagDefinition ms,
ModelElement parent)
Creates new TagDefinition from a NSUML MTagDefinition object. |
|
TagDefinition(Stereotype owner,
java.lang.String name,
TagDefinition.TagType tagType,
int lowerMultiplicity,
int upperMultiplicity)
Creates new TagDefinition belonging to a Stereotype . |
Method Summary | |
void |
checkValid()
Check whether this object is valid. |
java.lang.String |
getClassNameForTagType()
Get the full class name for the class in the com.ashridgetech.jamda.uml package, or (or Boolean or String ) which
corresponds to a tag type name. |
java.lang.String |
getDescription()
Get a description of this element for logging, which includes the stereotype name if it has one |
int |
getLowerMultiplicity()
Get the lower multiplicity of this TagDefinition . |
Stereotype |
getOwnerStereotype()
Get the Stereotype to which this TagDefinition belongs, if any. |
TagDefinition.TagType |
getTagType()
Get the type of this TagDefinition . |
java.lang.Class |
getType()
Get the type from the com.ashridgetech.jamda.uml package, (or Boolean or String )
which is contained by tagged values with this TagDefinition . |
int |
getUpperMultiplicity()
Get the upper multiplicity of this TagDefinition . |
boolean |
isBooleanType()
Shows whether this TagDefinition is for a boolean value. |
boolean |
isMultiple()
Indicate whether this TagDefinition can have multiple values. |
boolean |
isPermittedValue(java.lang.Object value)
Show whether a given value is legal for this TagDefinition . |
boolean |
isReferenceType()
Shows whether this TagDefinition holds references to model elements. |
boolean |
isStringType()
Shows whether this TagDefinition is for String value(s). |
Methods inherited from class com.ashridgetech.jamda.uml.ModelElement |
add, addStereotype, addTaggedValue, addTaggedValue, addTaggedValues, addTaggedValuesInternal, checkInitialised, checkState, findTaggedValueCollection, getBooleanTaggedValue, getChildElements, getComment, getDirectSource, getElement, getElementType, getFullName, getId, getModel, getName, getNsElement, getOriginalSource, getParentElement, getProperties, getStereotypes, getStringTaggedValue, getSubElementStore, getTaggedValue, getTaggedValues, getXpathContext, hasStereotype, hasTaggedValue, init, initLoad, isInitialised, load, load, load, loadElement, logChange, logger, logger, logLoad, logLoadWarning, logNew, logWarning, removeTaggedValue, select, setComment, setDirectSource, setTaggedValue, setTaggedValue, setTaggedValue, setTaggedValues, stereotype, tag, tagError, toString, type, type, type, xpath, xpathList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TagDefinition(Model model, java.lang.String name, TagDefinition.TagType tagType, int lowerMultiplicity, int upperMultiplicity)
TagDefinition
belonging to the Model
.
model
- the Model
to which the definition belongsname
- the name of this definitiontagType
- the type of the UML model element, or String or Boolean, to which the tag applies * @param lowerMultiplicity the lowest number of tagged values for this tagupperMultiplicity
- the greatest number of tagged values for this tag
belongs - may be null for a tag not attached to a Stereotype
public TagDefinition(Stereotype owner, java.lang.String name, TagDefinition.TagType tagType, int lowerMultiplicity, int upperMultiplicity)
TagDefinition
belonging to a Stereotype
.
owner
- the Stereotype
to which this TagDefinition
belongs - may not be nullname
- the name of this definitiontagType
- the type of the UML model element, or String or Boolean, to which the tag applies * @param lowerMultiplicity the lowest number of tagged values for this tagupperMultiplicity
- the greatest number of tagged values for this tagprotected TagDefinition(Model model, java.lang.String name, TagDefinition.TagType tagType, int lowerMultiplicity, int upperMultiplicity, Stereotype owner)
TagDefinition
with a new NSUML MTagDefinition
object.
model
- the Model
to which the definition belongsname
- the name of this definitiontagType
- the type of the UML model element, or String or Boolean, to which the tag applieslowerMultiplicity
- the lowest number of tagged values for this tagupperMultiplicity
- the greatest number of tagged values for this tagowner
- the Stereotype
to which this TagDefinition
belongs - may be null for a tag not attached to a Stereotype
protected TagDefinition(ru.novosoft.uml.foundation.core.MTagDefinition ms, ModelElement parent)
TagDefinition
from a NSUML MTagDefinition object.
Method Detail |
public Stereotype getOwnerStereotype()
Stereotype
to which this TagDefinition
belongs, if any.
TagDefinition
belongs to the Model
public TagDefinition.TagType getTagType()
TagDefinition
.
public int getLowerMultiplicity()
TagDefinition
.
public boolean isMultiple()
TagDefinition
can have multiple values.
Uses the rules of NSUtil.isMultiple(ru.novosoft.uml.foundation.data_types.MMultiplicity)
public int getUpperMultiplicity()
TagDefinition
.
public boolean isBooleanType()
TagDefinition
is for a boolean value.
TagDefinition
is for a boolean valuepublic boolean isStringType()
TagDefinition
is for String
value(s).
TagDefinition
is for String
valuespublic boolean isReferenceType()
TagDefinition
holds references to model elements.
TagDefinition
has reference values, false
if it has data valuespublic boolean isPermittedValue(java.lang.Object value)
TagDefinition
.
value
- the Object
to test
value
is a legal value for this tagpublic java.lang.Class getType()
Boolean
or String
)
which is contained by tagged values with this TagDefinition
.
Class
of the contained typepublic java.lang.String getClassNameForTagType()
Boolean
or String
) which
corresponds to a tag type name.
public java.lang.String getDescription()
getDescription
in class ModelElement
public void checkValid() throws java.lang.IllegalStateException
TagType
checkValid
in class ModelElement
java.lang.IllegalStateException
- if a problem is found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |