Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Domain

The Domain class represents a domain, a named collection of entity classes, in a document. Domain is a subclass of ImmutableDomain and supports full mutation.

Instances obtained from document-level paths — document.getDomainByName(name), document.domains, document.newDomain(name) — are mutable Domain objects. Instances obtained via entity.entityClass.domain are ImmutableDomain and do not allow mutation. See ImmutableDomain for details.

Fields

FieldTypeDescription
namestringThe domain's name.
uuidstringAPI 1.18
Read-only. A unique identifier for this domain.
builtInbooleanRead-only. True if the domain is built-in and cannot be modified.
hiddenbooleanTrue if hidden from the domain panel.
entityClasseslist of EntityClassEntity classes in the domain.

Methods

getEntityClassByName( name )

Returns the entity class in the domain with name, as an EntityClass. Returns None if there is no such class.

newEntityClass( )

Creates and returns a new entity class in the domain, as an EntityClass.

deleteEntityClass( entityclass )

Deletes the given entity class from the domain. Accepts both EntityClass and ImmutableEntityClass.

export( path )

Exports the domain to the file at path, asking the user to select a file if path is None.

duplicate( )

Returns a duplicate of the domain with the name modified to include "copy," as a Domain.