blackfennec.document_system package

Subpackages

Submodules

blackfennec.document_system.document module

class blackfennec.document_system.document.Document(document_registry, mime_type: MimeType, resource_type: ResourceType, uri: str = '', location: str = '')[source]

Bases: object

A document can contain a structure which is lazy loaded from a given URI via it’s resource and mime type

property content: Structure

Get the content of the document

property location: str

Get the location of the document

property mime_type: MimeType

Get the mime type of the document

property resource_type: ResourceType

Get the resource type of the document

save()[source]

Save the document

property uri: str

Get the uri of the document

blackfennec.document_system.document_factory module

class blackfennec.document_system.document_factory.DocumentFactory(document_registry: ~blackfennec.document_system.document_registry.DocumentRegistry, resource_type_registry: ~blackfennec.document_system.resource_type.resource_type_registry.ResourceTypeRegistry, mime_type_registry: ~blackfennec.document_system.mime_type.mime_type_registry.MimeTypeRegistry, document_type: ~typing.Type[~blackfennec.document_system.document.Document] = <class 'blackfennec.document_system.document.Document'>)[source]

Bases: object

create(uri: str, resource_type_id: Optional[str] = None, mime_type_id: Optional[str] = None, location: Optional[str] = None) Document[source]
get_document(structure) Document[source]

blackfennec.document_system.document_registry module

class blackfennec.document_system.document_registry.DocumentRegistry[source]

Bases: object

get_document(structure: Structure) Document[source]
register_document(document: Document)[source]

Module contents