DSMAttachment

class dsviper.DSMAttachment

Bases: object

An attachment as declared: its qualified name, the concept it keys on, and the type of the document it holds.

Note: Not directly instantiable.

document_type() → DSMType

Return the type of the document as the model writes it - a DSMTypeReference when it is named, a DSM type such as DSMTypeVector when it is spelled out.

documentation() → str

Return the doc comment the attachment declaration carries in the DSM source, empty when none was written.

identifier() → str

Return the identifier: the key type and the name joined by a dot.

App::User.profile, for an attachment named profile on a concept User of namespace App.

key_type() → DSMTypeReference

Return the type reference of the key.

representation() → str

Return the DSM source of the whole declaration: attachment<key_type, document_type> followed by the qualified name. The other representation() methods of the DSM classes spell one type.

runtime_id() → ValueUUId

Return the uuid identifying this attachment.

It is computed from what the attachment is, so the same declaration yields the same id in any Definitions. Definitions says what each kind is computed from.

type_name() → TypeName

Return the TypeName.