ValueKey

class dsviper.ValueKey

Bases: object

A class used to represent a value of type key<element_type>. Use the static factory method create(…).

Note: Not directly instantiable.

static cast(value: Value) ValueKey

Return a key or raise.

copy() ValueKey

Return a deep copy.

static create(type_concept: TypeConcept, instance_id: str | ValueUUId | None = None) ValueKey

Return a new key with the instance_id or a generated one if not specified.

description(*, namespace: NameSpace | None = None) str

Return the description.

detail_representation() str

Return a detailed representation.

detail_type_representation() str

Return the detail type representation.

has_parent_key() bool

Return True if a parent key is available.

hash() int

Return the hash value.

instance_id() ValueUUId

Return the uuid of the instance.

is_member(target_concept: TypeConcept) bool

Return True if target_concept is a member.

static keys(key: ValueKey) list[ValueKey]

Return the list of hierarchical keys.

representation() str

Return the representation.

to_any_concept_key() ValueKey

Return an key<any_concept>.

to_club_key(type_club: TypeClub) ValueKey

Return a key<type_club> or raise.

to_concept_key() ValueKey

Return a key<type_concept>.

to_key(type_key: TypeKey) ValueKey

Return a key<type_key> or raise.

to_member_key(target_concept: TypeConcept) ValueKey

Return a key<target_concept> or raise.

to_parent_key() ValueKey

Return a key<parent_concept> or raise.

type() Type

Return the type.

type_code() str

Return the type code.

type_concept() TypeConcept

Return the type of the concept.

type_key() TypeKey

Return the TypeKey.