ObjectSpaceState
Overview
ObjectSpaceState is a class in Aspose.Note for Python.
ObjectSpaceState.get_latest_root(role, context_id) returns the latest root GUID for the given role and context, or None if not found.
ObjectSpaceState is an enumeration in Aspose.Note for Python that describes the synchronisation state of an object space within a OneNote package. It inherits from Python’s Enum base class and provides named, symbolic constants for use with Aspose.Note API methods and properties. Values: various constants.
Description
ObjectSpaceState is a class in the Aspose.Note FOSS library for Python that exposes 3 methods and 8 properties for programmatic use.
Core capabilities include: extendedguid; dict[int, extendedguid]; dict[extendedguid, onestoreobject]. These operations enable developers to integrate objectspacestate functionality directly into Python applications.
The class also provides the gosid property (holds the global object store identifier as an extendedguid), the root_roles property (maps role integers to their associated root extendedguids), the objects property (provides a dictionary of all onestoreobject instances keyed by their extendedguid).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
gosid | ExtendedGUID | Read | Holds the global object store identifier as an ExtendedGUID |
root_roles | dict[int, ExtendedGUID] | Read | Maps role integers to their associated root ExtendedGUIDs |
objects | dict[ExtendedGUID, OneStoreObject] | Read | Provides a dictionary of all OneStoreObject instances keyed by their ExtendedGUID |
section_display_name | str | None | Read | Contains the optional display name of the section |
revisions | list[RevisionManifestRecord] | Read | Is a list of RevisionManifestRecord objects representing document revisions |
role_bindings | list[RevisionRoleBinding] | Read | Stores a list of RevisionRoleBinding linking roles to revisions |
latest_roots_by_context_role | dict[tuple[ExtendedGUID | None, int], ExtendedGUID] | Read | Maps (context GUID, role) tuples to the latest root GUID |
latest_revision_indices_by_context_role | dict[tuple[ExtendedGUID | None, int], int] | Read | Maps (context GUID, role) to the latest revision index |
Methods
| Signature | Description |
|---|---|
get_latest_root(role: int, context_id: ExtendedGUID | None) → ExtendedGUID | None | Returns the latest root GUID for the given role and context, or None if not found |
iter_latest_roots(role: int) → list[tuple[ExtendedGUID | None, ExtendedGUID]] | Yields a list of (context GUID, root GUID) pairs for the specified role |
get_latest_revision_index(role: int, context_id: ExtendedGUID | None) → int | None | Returns the latest revision index for the role and optional context |