class Document:
Constructors: Document.from_json(raw_content)
, Document.from_text(title, raw_content)
, Document(title, content, metadatas)
This is a class representing a document. Attributes: title (str): The title of the document. links (list[str]): A list of URLs or references to where the document can be accessed. tags (list[str]): A list of tags to which the document belongs. pictures (list[str]): A list of image URLs or paths to pictures of the document. notes (list[str]): The list of note_title names if any. content (str): The text content of the document. Methods: from_text(raw: str) -> Document: Creates a new Document object from text input. from_json(raw: str) -> Document: Creates a new Document object from JSON input. catalog_entry -> dict: Returns a short dict representation as it is stored in the catalog. json -> str: Returns the JSON representation of the document as it is used in the REST API. text -> str: Returns the text representation of the document as it is store in the database.
Class Method | from |
Undocumented |
Class Method | from |
Undocumented |
Method | __init__ |
Undocumented |
Instance Variable | content |
Undocumented |
Instance Variable | metadatas |
Undocumented |
Instance Variable | title |
Undocumented |
Property | catalog |
Undocumented |
Property | dict |
Undocumented |
Property | text |
Undocumented |