Note resource
Resource that contains a rich text that can be exported to a lab note
flagged: boolname: strstyle: TypingStyletags: TagListtechnical_info: TechnicalInfoDicttitle: struid: strConstructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters.
strAdd 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.
Resourcestrstrstrbool - FalseAdd a figure to the note resource content.
Filestrstrstrbool - FalseAdd a figure to the note resource content.
strstrstrstrAdd a file to the note resource content.
Filestrbool - FalseAdd a file to the note resource content.
strstrAdd a header to the note resource content.
strRichTextBlockHeaderLevelAdd a paragraph to the note resource content.
strAdd a resource to the set
Resourcestrbool - TrueAdd technical information on the resource. Technical info are useful to set additional information on the resource.
TechnicalInfoAdd a time stamp to the note resource content.
RichTextBlockTimestampstrAdd 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).
ViewDictstrstrstrAdd 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
ResourcestrDictstrstrstrbool - FalseAppend a rich text (that comes from a note or note template) to the note resource.
RichTextRichTextObjectTypestrAppend a basic rich content to this note resource content. It does not support file, figure, or views
RichTextAppend a block to the note
RichTextBlockintAppend a note content to the note resource content.
NoteAppend the content of another note resource at the end of this note resource content.
NoteResourceAppend a note template content to the note resource content.
NoteTemplateCall a view method on the resource.
strstrDictCallViewResultDTOYou 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
OptionalClear the resources
Clone the resource to create a new instance with a new id. It copies the RFields.
ResourceTypeDelete a parameter.
strExport the note as a note. The note is automatically saved in the database.
strstrstrNoteGet the block at the specified index
intRichTextBlockGet the block by id
strRichTextBlockGet the index of the block by id
strintGet the blocks of the note resource
ListGet the blocks of the note resource by type
RichTextBlockTypeListYou 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
strGet the default style of the resource
TypingStyleGet the figure of the note as a File resource.
strFileGet the file of the note as a File resource.
strFileGet the path of the file.
strstrGet the id of the resource model in the database. It is provided by the system for input resources of a task.
strGet the name of the resource or the default name if the name is None
strReturn the resource with the given name
strResourceReturn the resource model ids of the sub resources
SetReturn the resource models of the sub resources list
List[ResourceModel]Return the resource with the given name or None if not found
strgws_core.resource.resource.Resource | NoneReturn the sub resources as a dict
DictReturn the sub resources as a set
SetRichTextGet the technical information of the resource
strTechnicalInfoReturn true if the resource with the given id is in the resource list
strboolThis 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
DictReturn true if the resource with the given name exists in the dict
strResourceResourceOriginScenarioTaskModelstrList[ResourceModel]Set the name of the resource. You can override this method to force a format for the name of the resource.
OptionalSet the value of a parameter.
strAnybool - FalseConvert the note resource to markdown.
strReturns the name of the class
bool - Falsebool - Falsebool - FalsestrCopy 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.
strTypingIconTypestrTypingIconColorTypingStyleReturns the full name of the class
bool - Falsebool - FalsestrstrVersionGet the human name of the object
strGet the short description of the object
strGet the style of the object
TypingStyleGet the typing name of the object Ex: 'RESOURCE.gws_core.Table'
strTypingNameObjGet all the classes that inherit this class
ListCreate a note resource from a note.
NotestrNoteResourceCreate a note resource from a note template.
NoteTemplatestrNoteResource