ocrd_network.models.workspace module

class ocrd_network.models.workspace.DBWorkspace(*args, _id: PydanticObjectId | None = None, revision_id: UUID | None = None, workspace_id: str, workspace_mets_path: str, ocrd_identifier: str, bagit_profile_identifier: str, ocrd_base_version_checksum: str | None = None, ocrd_mets: str | None = None, bag_info_adds: dict | None = None, mets_server_url: str | None = None, deleted: bool = False)[source]

Bases: Document

Model to store a workspace in the mongo-database.

Information to handle workspaces and from bag-info.txt are stored here.

ocrd_identifier             Ocrd-Identifier


bagit_profile_identifier    BagIt-Profile-Identifier


ocrd_base_version_checksum  Ocrd-Base-Version-Checksum


ocrd_mets                   Ocrd-Mets


bag_info_adds               bag-info.txt can also

key-value-pairs which are saved here



deleted                     the document is deleted if set, however, the record is still preserved
pages_locked                a data structure that holds output `fileGrp`s and their respective locked `page_id`

that are currently being processed by an OCR-D processor (server or worker). If no page_id field is set, an identifier “all_pages” will be used.

mets_server_url             If set, the reading from and writing to the mets file happens through the METS Server

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

workspace_id: str
workspace_mets_path: str
ocrd_identifier: str
bagit_profile_identifier: str
ocrd_base_version_checksum: str | None
ocrd_mets: str | None
bag_info_adds: dict | None
mets_server_url: str | None
deleted: bool
class Settings[source]

Bases: object

name = 'workspace'
id: PydanticObjectId | None
revision_id: UUID | None