Module arches_orm.static.adapter
Variables
LOAD_ALL_NODES
LOAD_FULL_NODE_OBJECTS
WKRM_DEFINITIONS
logger
Classes
StaticAdapter
class StaticAdapter(
key
)
Helper class that provides a standard way to create an ABC using
inheritance.
Ancestors (in MRO)
- arches_orm.adapter.Adapter
- abc.ABC
Class variables
key
Methods
context
def context(
self,
_ctx: 'dict[str, Any] | ContextVar | None | Literal[False]' = False,
_override=False,
**kwargs: 'dict[str, Any]'
) -> 'Generator[ContextVar[dict[str, Any] | None], None, None]'
context_free
def context_free(
self
) -> 'Generator[ContextVar[dict[str, Any] | None], None, None]'
derive_collection
def derive_collection(
self,
collection_id: 'str | UUID',
include: 'list[UUID] | None',
exclude: 'list[UUID] | None',
language: 'str | None' = None
) -> 'type[Enum]'
Note that include and exclude should be lists of concept, not value, IDs.
get_collection
def get_collection(
self,
collection_id: 'str | UUID'
) -> 'type[Enum]'
get_context
def get_context(
self
)
get_rdm
def get_rdm(
self
)
get_wkrm_definitions
def get_wkrm_definitions(
self
)
get_wrapper
def get_wrapper(
self
)
load_from_id
def load_from_id(
self,
resource_id,
from_prefetch=None
)
make_concept
def make_concept(
self,
concept_id: 'str | UUID',
values: 'dict[UUID, tuple[str, str]]',
children: 'list[UUID] | None'
) -> 'ConceptValueViewModel'
retrieve_concept
def retrieve_concept(
self,
concept_id: 'str | UUID'
) -> 'ConceptValueViewModel'
save_concept
def save_concept(
self,
concept: 'ConceptValueViewModel',
output_file: 'Path | None'
) -> 'None'
set_context_free
def set_context_free(
self
)
update_collections
def update_collections(
self,
concept: 'ConceptValueViewModel',
source_file: 'Path'
) -> 'None'