EntityClass
The EntityClass class represents an entity class. EntityClass is a subclass of ImmutableEntityClass and supports full mutation.
Instances obtained from domain-level paths — domain.getEntityClassByName(name), domain.entityClasses, document.defaultEntityClass — are mutable EntityClass objects. Instances obtained via entity.entityClass are ImmutableEntityClass and do not allow mutation. See ImmutableEntityClass for details.
Fields
| Field | Type | Description |
|---|---|---|
name | string | The class name. |
uuid | string | Read-only. A unique identifier for this entity class. |
builtIn | boolean | Read-only. True if the class is built-in and cannot be modified. |
color | Color | The background color behind the class title. |
nameColor | Color | Read-only. The color the class name is rendered in on an entity shape (auto-computed for contrast). |
weight | number | The default weight for new edges created with entities of this class, between -1.0 and 1.0. |
symbol | Symbol | The symbol inherited by new entities of this class. |
milestone | boolean | True if entities of this class are zero-effort milestone tasks. |
resourceAssignment | Resource Assignment Type | The default resource assignment type for entities of this class. |
showName | boolean | True if the class name is shown on entity shapes. |
domain | Domain | Read-only. The parent domain of this class. |
filterUserDefinedAttributes | boolean | True if UDA visibility on entities of this class is restricted to the keys in userDefinedAttributesFilterList. When False, all UDAs are shown. The filter list and this flag are independent — set the list first, then enable filtering. |
userDefinedAttributesFilterList | list of string | The UDA key names shown on entities of this class when filterUserDefinedAttributes is True. Set to None to clear. Empty if no keys have been set. |
Methods
duplicate( )
Creates and returns a unique duplicate of this class with the name modified to include "copy," as an EntityClass.