public class EAAttributeUtil extends AbstractEAUtil
Constructor and Description |
---|
EAAttributeUtil() |
Modifier and Type | Method and Description |
---|---|
static org.sparx.AttributeConstraint |
addConstraint(org.sparx.Attribute att,
String name,
String type,
String text) |
static void |
addTaggedValue(org.sparx.Attribute att,
EATaggedValue tv)
Adds the given collection of tagged values to the tagged values of the
given attribute, NOT checking for duplicate tags.
|
static void |
addTaggedValues(org.sparx.Attribute att,
List<EATaggedValue> tvs)
Adds the given collection of tagged values to the tagged values of the
given attribute, NOT checking for duplicate tags.
|
static void |
addTaggedValues(org.sparx.Attribute att,
TaggedValues tvs)
Adds the given collection of tagged values to the tagged values of the
given attribute, NOT checking for duplicate tags.
|
static void |
deleteTaggedValue(org.sparx.Attribute a,
String nameOfTVToDelete) |
static SortedMap<String,EATaggedValue> |
getEATaggedValues(org.sparx.Attribute att) |
static String |
message(int mnr) |
static void |
setEAAllowDuplicates(org.sparx.Attribute att,
boolean allowDuplicates) |
static void |
setEAIsCollection(org.sparx.Attribute att,
boolean isCollection) |
static void |
setEAIsOrdered(org.sparx.Attribute att,
boolean isOrdered) |
static void |
setEALength(org.sparx.Attribute att,
String length) |
static void |
setEAPrecision(org.sparx.Attribute att,
int precision) |
static void |
setEAScale(org.sparx.Attribute att,
int scale) |
static void |
setTaggedValue(org.sparx.Attribute att,
EATaggedValue tv)
Sets the given tagged value in the tagged values of the given attribute.
|
static void |
setTaggedValue(org.sparx.Attribute att,
String name,
String value)
Sets the given tagged value in the tagged values of the given attribute.
|
static void |
setTaggedValues(org.sparx.Attribute att,
List<EATaggedValue> tvs)
Sets the given tagged values in the given attribute.
|
static void |
setTaggedValues(org.sparx.Attribute att,
TaggedValues tvs)
Sets the given tagged values in the given attribute.
|
static String |
taggedValue(org.sparx.Attribute att,
String tvName)
Retrieves the first tagged value with given name of the given attribute.
|
createMessage, createMessage, createMessage, createMessage, stereotypesCSV
public static void addTaggedValue(org.sparx.Attribute att, EATaggedValue tv) throws EAException
WARNING: Enterprise Architect may initialize default tagged values for a model element that adheres to a specific UML profile. In that case, adding the same tagged values would lead to duplicates. If duplicates shall be prevented, set the tagged value instead of adding it.
att
- the attribute to which the tagged values shall be addedtvs
- collection of tagged values to addEAException
public static void addTaggedValues(org.sparx.Attribute att, List<EATaggedValue> tvs) throws EAException
WARNING: Enterprise Architect may initialize default tagged values for a model element that adheres to a specific UML profile. In that case, adding the same tagged values would lead to duplicates. If duplicates shall be prevented, set the tagged value instead of adding it.
att
- the attribute to which the tagged values shall be addedtvs
- collection of tagged values to addEAException
public static void addTaggedValues(org.sparx.Attribute att, TaggedValues tvs) throws EAException
WARNING: Enterprise Architect may initialize default tagged values for a model element that adheres to a specific UML profile. In that case, adding the same tagged values would lead to duplicates. If duplicates shall be prevented, set the tagged value instead of adding it.
att
- the attribute to which the tagged values shall be addedtvs
- collection of tagged values to addEAException
public static void deleteTaggedValue(org.sparx.Attribute a, String nameOfTVToDelete)
public static void setEAAllowDuplicates(org.sparx.Attribute att, boolean allowDuplicates) throws EAException
EAException
public static void setEAIsCollection(org.sparx.Attribute att, boolean isCollection) throws EAException
EAException
public static void setEAIsOrdered(org.sparx.Attribute att, boolean isOrdered) throws EAException
EAException
public static void setEALength(org.sparx.Attribute att, String length) throws EAException
EAException
public static void setEAPrecision(org.sparx.Attribute att, int precision) throws EAException
EAException
public static void setEAScale(org.sparx.Attribute att, int scale) throws EAException
EAException
public static void setTaggedValue(org.sparx.Attribute att, EATaggedValue tv) throws EAException
att
- the attribute in which the tagged value shall be settv
- tagged value to set, must not be null
EAException
public static void setTaggedValue(org.sparx.Attribute att, String name, String value) throws EAException
att
- the attribute in which the tagged value shall be setname
- name of the tagged value to set, must not be null
value
- value of the tagged value to set, can be null
EAException
public static void setTaggedValues(org.sparx.Attribute att, List<EATaggedValue> tvs) throws EAException
att
- the attribute in which the tagged values shall be settvs
- tagged values to set, must not be null
EAException
public static void setTaggedValues(org.sparx.Attribute att, TaggedValues tvs) throws EAException
att
- the attribute in which the tagged values shall be settvs
- tagged values to set, must not be null
EAException
public static String taggedValue(org.sparx.Attribute att, String tvName)
att
- attribute that contains the tagged values to searchtvName
- name of the tagged value to retrievenull
if the tagged value was not found. If there are multiple values
with the tag only the first is provided.public static SortedMap<String,EATaggedValue> getEATaggedValues(org.sparx.Attribute att)
att
- null
public static org.sparx.AttributeConstraint addConstraint(org.sparx.Attribute att, String name, String type, String text) throws EAException
att
- Attribute to which the new constraint shall be added.name
- Name of the new constrainttype
- Type of the new constrainttext
- Text of the new constraintEAException
public static String message(int mnr)
Copyright © 2018. All rights reserved.