public class UmlConstraint extends AbstractUmlObject
Initially, we have designed it to allow handling of complex IEC61850 presence conditions (through
class constraints; for recognised formats, see UmlConstraint.Kind
) and IEC61850 array min/max index
(through attribute constraint).
Then we retrofitted the implementation to be able to use "vanilla" constraints on classes (without any special processing). For CIM domains, just ignore specials and use normal UmlObject methods on this class that you normally use for other UmlObject-s.
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
(61850) 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.
|
Namespace |
getNamespace()
Returns the namespace of this UML object, based on tagged values in the UML model and when
missing, calculated 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.
|
java.util.Set<java.lang.String> |
getPredefinedTagNames()
Returns allowed tag names, as expected to be found in the UML model.
|
PresenceCondition |
getPresenceCondition()
Returns presence condition deduced from this IEC61850 class constraint; null for other model
nature classes and 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.
|
addDeprecAndInf, addTaggedValue, appendRemainingCustomStereotypes, classifyPerScope, classifyPerScopePerTag, classifyPerTag, collectDuplicateDescriptions, collectDuplicateNames, collectForScope, collectNames, collectQNames, findAllForName, findWithSameUuidAndLog, getAlias, getDescription, getHtmlDescription, getId, getName, getSince, getStereotype, getTaggedValues, getUnallowedTagNames, getUuid, getVisibility, initFromTags, 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 Namespace getNamespace()
UmlObject
public Nature getNature()
UmlObject
getNature
in interface UmlObject
getNature
in class AbstractUmlObject
public boolean isInformative()
This default implementation returns true if objects steretypes include . If there are additional criteria for deriving informative status, ensure to invoke this default implementation first.
Returns whether its container is informative, ignoring any potential stereotype (these cannot be stored in the model).
isInformative
in interface UmlObject
isInformative
in class AbstractUmlObject
UmlObject.isInformative()
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.util.Set<java.lang.String> getPredefinedTagNames()
Always returns empty set.
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2016 Tatjana (Tanja) Kostic