Resource that contains a rich text that can be exported to a lab note
Resource to manage a set of resources. By default the sytem create a new resource for each resource in the set when saving the set
flagged: bool
name: str
style: TypingStyle
tags: TagList
technical_info: TechnicalInfoDict
title: str
uid: str
Constructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters.
str
Add a blank line to the note resource content.
Add a default view to the note resource content. This method is reponsible for generating the view of the input resource and the input resource will be attached to the NoteResource.
Resource
str
str
str
bool
- False
Add a figure to the note resource content.
File
str
str
str
bool
- False
Add a figure to the note resource content.
str
str
str
str
Add a file to the note resource content.
File
str
bool
- False
Add a file to the note resource content.
str
str
Add a header to the note resource content.
str
RichTextParagraphHeaderLevel
Add a paragraph to the note resource content.
str
Add a resource to the set
Resource
str
bool
- True
Add technical information on the resource. Technical info are useful to set additional information on the resource.
TechnicalInfo
Add a time stamp to the note resource content.
RichTextTimestampData
str
Add a view to the note resource content. In this case the resource is not attached to the NoteResource, the view is considered as standalone. This can be useful when you want to add a view of a resource that does not exist in the system (manually created resource).
View
Dict
str
str
str
Add a view to the note resource content. This method is reponsible for generating the view of the input resource and the input resource will be attached to the NoteResource. To get the information of the views, once you opened the view in the application, you can click on View settings > Show view configuration
Resource
str
Dict
str
str
str
bool
- False
Append a rich text (that comes from a note or note template) to the note resource.
RichText
RichTextObjectType
str
Append a basic rich content to this note resource content. It does not support file, figure, or views
RichText
Append a block to the note
RichTextBlock
int
Append the content of another note resource at the end of this note resource content.
NoteResource
Call a view method on the resource.
str
str
Dict
CallViewResultDTO
You can redefine this method to define custom logic to check this resource. If there is a problem with the resource, return a string that define the error, otherwise return None This method is called on output resources of a task. If there is an error returned, the task will be set to error and next proceses will not be run. It is also call when uploading a resource (usually for files or folder), if there is an error returned, the resource will not be uploaded
Optional
Clear the resources
Clone the resource to create a new instance with a new id. It copies the RFields.
ResourceType
Export the note as a note. The note is automatically saved in the database.
str
str
str
Note
Get the block at the specified index
int
RichTextBlock
Get the block by id
str
RichTextBlock
Get the index of the block by id
str
int
Get the blocks of the note resource
List
Get the blocks of the note resource by type
RichTextBlockType
List
You can redefine this method to set a name of the resource. When saving the resource the name will be saved automatically This can be useful to distinguish this resource from another one or to search for the resource
str
Get the default style of the resource
TypingStyle
Get the figure of the note as a File resource.
str
File
Get the file of the note as a File resource.
str
File
Get the path of the file.
str
str
Get the id of the resource model in the database. It is provided by the system for input resources of a task.
str
Get the name of the resource or the default name if the name is None
str
Return the resource with the given name
str
Resource
Return the resource model ids of the sub resources
Set
Return the resource models of the sub resources list
List[ResourceModel]
Return the resource with the given name or None if not found
str
gws_core.resource.resource.Resource | None
Return the sub resources as a dict
Dict
Return the sub resources as a set
Set
RichText
Get the technical information of the resource
str
TechnicalInfo
Return true if the resource with the given id is in the resource list
str
bool
This can be overwritten to perform custom initialization of the resource. This method is called after the init (constructor) of the resource. The values of RFields are set when this method is called.
Replace current resources by the resources in the dict
Dict
Return true if the resource with the given name exists in the dict
str
Resource
ResourceOrigin
Scenario
TaskModel
str
List[ResourceModel]
Set the value of a parameter.
str
Any
bool
- False
Returns the name of the class
bool
- False
bool
- False
bool
- False
str
Copy the style of the resource with the possibility to override some properties. Useful when settings the style for a task based on the resource style.
str
TypingIconType
str
TypingIconColor
TypingStyle
Returns the full name of the class
bool
- False
bool
- False
str
Get the human name of the resource
str
Get the short description of the resource
str
Get the style of the resource
TypingStyle
Get the typing name of the resource
str
Get all the classes that inherit this class
List
Create a note resource from a note.
Note
str
NoteResource
Create a note resource from a note template.
NoteTemplate
str
NoteResource