public class UmlConstraint extends AbstractUmlObject
Currently, the only supported constraints are those attached to LN and CDC classes. For
recognised formats, see UmlConstraint.Kind
.
Design note: We could have had two subclasses, but it would have been an overkill at this point in time.
Modifier and Type | Class and Description |
---|---|
static class |
UmlConstraint.Data
Data from the UML model repository specific to
UmlConstraint . |
static class |
UmlConstraint.Kind
Kind of constraint.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SEPARATOR
Used to separate attribute names from the condition text for class constraints.
|
CLASS_SEPARATOR, NULL_OBJ_NAME, PACKAGE_SEPARATOR
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAttrNames()
Returns list of class attribute names if this is a class constraint, empty list otherwise.
|
java.lang.String |
getCondition()
Returns value for condition if this is an attribute constraint, or description of presence
condition if this is a class constraint.
|
UmlAttribute |
getContainingAttribute()
Returns containing attribute if this is an attribute constraint, null otherwise.
|
UmlClass |
getContainingClass()
Returns containing class if this is a class constraint, null otherwise.
|
UmlKind |
getKind()
Returns kind of this UML object, as assigned by the application.
|
Nature |
getNature()
Returns the nature of this UML object, which determines the validation rules to apply, and
sometimes document generation formats.
|
OwningWg |
getOwner()
Returns the IEC working group owning this UML object, as calculated by the application based
on the UML model structure.
|
PresenceCondition |
getPresenceCondition()
Returns presence condition deduced from this class constraint; null for attribute constraint.
|
java.lang.String |
getQualifiedName()
Returns the name of this UML object combined with some container-related information (e.g.,
packageName.className, or containingPackageName.packageName).
|
boolean |
isInformative()
Returns whether this UML object is informative (and thus should be ignored when generating
official IEC documents).
|
boolean |
isSupportsTags()
Returns whether tagged values are supported.
|
java.lang.String |
toString() |
protected void |
validateTag(java.lang.String name,
java.lang.String value)
Subclasses should overwride this method in case some validation about the tagged value is
needed before adding it.
|
addTaggedValue, classifyPerScope, classifyPerScopePerTag, classifyPerTag, collectDuplicateDescriptions, collectDuplicateNames, collectForScope, collectNames, collectQNames, findAllForName, findWithSameUuidAndLog, getAlias, getDescription, getHtmlDescription, getId, getName, getPredefinedTagNames, getSince, getStereotype, getTaggedValues, getUnallowedTagNames, getUuid, getVisibility, isDeprecated, saveTags, toShortString, toShortString
public static final java.lang.String SEPARATOR
public UmlClass getContainingClass()
public java.util.List<java.lang.String> getAttrNames()
public PresenceCondition getPresenceCondition()
public java.lang.String getCondition()
public UmlAttribute getContainingAttribute()
public boolean isSupportsTags()
public OwningWg getOwner()
UmlObject
getOwner
in interface UmlObject
getOwner
in class AbstractUmlObject
public Nature getNature()
UmlObject
getNature
in interface UmlObject
getNature
in class AbstractUmlObject
public boolean isInformative()
UmlObject
isInformative
in interface UmlObject
isInformative
in class AbstractUmlObject
public UmlKind getKind()
UmlObject
getKind
in interface UmlObject
getKind
in class AbstractUmlObject
public java.lang.String getQualifiedName()
UmlObject
getQualifiedName
in interface UmlObject
getQualifiedName
in class AbstractUmlObject
protected void validateTag(java.lang.String name, java.lang.String value)
AbstractUmlObject
validateTag
in class AbstractUmlObject
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2016 Tatjana (Tanja) Kostic