julee.domain.models.document.document ===================================== .. py:module:: julee.domain.models.document.document .. autoapi-nested-parse:: Document domain models for the Capture, Extract, Assemble, Publish workflow. This module contains the core document domain objects that represent documents and their metadata in the CEAP workflow system. All domain models use Pydantic BaseModel for validation, serialization, and type safety, following the patterns established in the sample project. Classes ------- .. autoapisummary:: julee.domain.models.document.document.Document julee.domain.models.document.document.DocumentStatus Functions --------- .. autoapisummary:: julee.domain.models.document.document.delegate_to_content Module Contents --------------- .. py:class:: Document(/, **data) Bases: :py:obj:`pydantic.BaseModel` Complete document entity including content and metadata. This is the primary domain model that represents a complete document in the CEAP workflow system. Content is provided as a ContentStream for efficient handling of both small and large documents. The content stream is excluded from JSON serialization - use separate content endpoints for streaming binary data over HTTP. .. py:method:: content_multihash_must_not_be_empty(v) :classmethod: .. py:method:: content_type_must_not_be_empty(v) :classmethod: .. py:method:: document_id_must_not_be_empty(v) :classmethod: .. py:method:: filename_must_not_be_empty(v) :classmethod: .. py:method:: validate_content_fields(info) Ensure document has at least content, or content_bytes. .. py:attribute:: additional_metadata :type: dict[str, Any] :value: None .. py:attribute:: assembly_types :type: list[str] :value: None .. py:attribute:: content :type: julee.domain.models.custom_fields.content_stream.ContentStream | None :value: None .. py:attribute:: content_bytes :type: bytes | None :value: None .. py:attribute:: content_multihash :type: str :value: None .. py:attribute:: content_type :type: str .. py:attribute:: created_at :type: datetime.datetime | None :value: None .. py:attribute:: document_id :type: str .. py:attribute:: knowledge_service_id :type: str | None :value: None .. py:attribute:: original_filename :type: str .. py:attribute:: size_bytes :type: int :value: None .. py:attribute:: status :type: DocumentStatus .. py:attribute:: updated_at :type: datetime.datetime | None :value: None .. py:class:: DocumentStatus Bases: :py:obj:`str`, :py:obj:`enum.Enum` Status of a document through the Capture, Extract, Assemble, Publish pipeline. .. py:attribute:: ASSEMBLED :value: 'assembled' .. py:attribute:: ASSEMBLY_SPECIFICATION_IDENTIFIED :value: 'assembly_specification_identified' .. py:attribute:: CAPTURED :value: 'captured' .. py:attribute:: EXTRACTED :value: 'extracted' .. py:attribute:: FAILED :value: 'failed' .. py:attribute:: PUBLISHED :value: 'published' .. py:attribute:: REGISTERED :value: 'registered' .. py:function:: delegate_to_content(*method_names) Decorator to delegate IO methods to the content stream property.