logs-py 4.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- LOGS/Auxiliary/CheckClassName.py +1075 -0
- LOGS/Auxiliary/Constants.py +99 -0
- LOGS/Auxiliary/CustomEntityClassGenerator.py +254 -0
- LOGS/Auxiliary/CustomFieldClassGenerator.py +115 -0
- LOGS/Auxiliary/CustomFieldValueTypeChecker.py +168 -0
- LOGS/Auxiliary/CustomSectionClassGenerator.py +113 -0
- LOGS/Auxiliary/CustomTypeClassGenerator.py +147 -0
- LOGS/Auxiliary/DateTimeConverter.py +66 -0
- LOGS/Auxiliary/Decorators.py +109 -0
- LOGS/Auxiliary/Exceptions.py +341 -0
- LOGS/Auxiliary/LOGSErrorResponse.py +89 -0
- LOGS/Auxiliary/MinimalModelGenerator.py +236 -0
- LOGS/Auxiliary/ParameterHelper.py +56 -0
- LOGS/Auxiliary/ReplaceMessage.py +13 -0
- LOGS/Auxiliary/Tools.py +432 -0
- LOGS/Auxiliary/__init__.py +15 -0
- LOGS/Converter/Conversion.py +248 -0
- LOGS/Converter/Converter.py +96 -0
- LOGS/Converter/ConverterParameter.py +88 -0
- LOGS/Converter/DateTimeRange.py +58 -0
- LOGS/Converter/ExportParameters.py +89 -0
- LOGS/Converter/__init__.py +13 -0
- LOGS/Entities/Attachment.py +84 -0
- LOGS/Entities/AttachmentMinimal.py +8 -0
- LOGS/Entities/AttachmentRequestParameter.py +42 -0
- LOGS/Entities/Attachments.py +53 -0
- LOGS/Entities/AutoloadFileInfo.py +12 -0
- LOGS/Entities/AutoloadStatusError.py +7 -0
- LOGS/Entities/AxisNaming.py +33 -0
- LOGS/Entities/AxisZoom.py +33 -0
- LOGS/Entities/Bridge.py +165 -0
- LOGS/Entities/BridgeClientInfo.py +93 -0
- LOGS/Entities/BridgeMinimal.py +8 -0
- LOGS/Entities/BridgeRequestParameter.py +49 -0
- LOGS/Entities/BridgeType.py +7 -0
- LOGS/Entities/Bridges.py +12 -0
- LOGS/Entities/CustomField.py +243 -0
- LOGS/Entities/CustomFieldMinimal.py +8 -0
- LOGS/Entities/CustomFieldModels.py +111 -0
- LOGS/Entities/CustomFieldRequestParameter.py +69 -0
- LOGS/Entities/CustomFieldSearchQuery.py +40 -0
- LOGS/Entities/CustomFields.py +12 -0
- LOGS/Entities/CustomType.py +212 -0
- LOGS/Entities/CustomTypeMinimal.py +8 -0
- LOGS/Entities/CustomTypeRequestParameter.py +60 -0
- LOGS/Entities/CustomTypeSection.py +63 -0
- LOGS/Entities/CustomTypes.py +12 -0
- LOGS/Entities/DataFormat.py +97 -0
- LOGS/Entities/DataFormatInstrument.py +18 -0
- LOGS/Entities/DataFormatInstrumentMinimal.py +8 -0
- LOGS/Entities/DataFormatInstrumentRequestParameter.py +17 -0
- LOGS/Entities/DataFormatInstruments.py +16 -0
- LOGS/Entities/DataFormatMinimal.py +18 -0
- LOGS/Entities/DataFormatRequestParameter.py +21 -0
- LOGS/Entities/DataFormats.py +12 -0
- LOGS/Entities/DataSource.py +218 -0
- LOGS/Entities/DataSourceConnectionStatus.py +12 -0
- LOGS/Entities/DataSourceMinimal.py +8 -0
- LOGS/Entities/DataSourceRequestParameter.py +57 -0
- LOGS/Entities/DataSourceStatus.py +108 -0
- LOGS/Entities/DataSourceStatusIterator.py +16 -0
- LOGS/Entities/DataSourceStatusRequestParameter.py +31 -0
- LOGS/Entities/DataSources.py +12 -0
- LOGS/Entities/Dataset.py +439 -0
- LOGS/Entities/DatasetBase.py +196 -0
- LOGS/Entities/DatasetCreator.py +148 -0
- LOGS/Entities/DatasetInfo.py +147 -0
- LOGS/Entities/DatasetMatchTypes.py +157 -0
- LOGS/Entities/DatasetMatching.py +196 -0
- LOGS/Entities/DatasetMinimal.py +8 -0
- LOGS/Entities/DatasetModels.py +33 -0
- LOGS/Entities/DatasetRequestParameter.py +92 -0
- LOGS/Entities/DatasetTemplate.py +23 -0
- LOGS/Entities/DatasetUploadParameter.py +14 -0
- LOGS/Entities/Datasets.py +142 -0
- LOGS/Entities/Datatrack.py +179 -0
- LOGS/Entities/DatatrackFormattedTable.py +25 -0
- LOGS/Entities/DatatrackGeneric.py +34 -0
- LOGS/Entities/DatatrackImage.py +25 -0
- LOGS/Entities/DatatrackNumericArray.py +30 -0
- LOGS/Entities/DatatrackNumericMatrix.py +98 -0
- LOGS/Entities/Entities.py +71 -0
- LOGS/Entities/EntitiesRequestParameter.py +18 -0
- LOGS/Entities/EntityOriginWriteModelWithId.py +15 -0
- LOGS/Entities/FileEntry.py +138 -0
- LOGS/Entities/FileExcludePattern.py +8 -0
- LOGS/Entities/FormatMetaData.py +56 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTable.py +135 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTableCell.py +108 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTableSettings.py +11 -0
- LOGS/Entities/FormattedTable/__init__.py +9 -0
- LOGS/Entities/HierarchyLeaf.py +15 -0
- LOGS/Entities/HierarchyNode.py +40 -0
- LOGS/Entities/ILiteraryTypedEntity.py +19 -0
- LOGS/Entities/InventoryItem.py +102 -0
- LOGS/Entities/InventoryItemMinimal.py +25 -0
- LOGS/Entities/InventoryItemRequestParameter.py +58 -0
- LOGS/Entities/InventoryItems.py +12 -0
- LOGS/Entities/LabNotebook.py +33 -0
- LOGS/Entities/LabNotebookEntries.py +16 -0
- LOGS/Entities/LabNotebookEntry.py +106 -0
- LOGS/Entities/LabNotebookEntryContent/BasicAttribute.py +15 -0
- LOGS/Entities/LabNotebookEntryContent/EntityAttribute.py +85 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentBlockquote.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentBulletList.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentCallout.py +40 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentContentPlaceholderNode.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentConverter.py +207 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentDocument.py +8 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentEntity.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentEntityMention.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentHeading.py +33 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentHorizontalRule.py +12 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentItem.py +37 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentListItem.py +49 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentOrderedList.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentParagraph.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTable.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTableCell.py +40 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTableRow.py +8 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTaskList.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTaskListItem.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentText.py +33 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithAttribute.py +23 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithContent.py +38 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithTextAttribute.py +16 -0
- LOGS/Entities/LabNotebookEntryContent/TextAttribute.py +46 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarkAtributes.py +64 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarkConverter.py +45 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarks.py +71 -0
- LOGS/Entities/LabNotebookEntryContent/__init__.py +34 -0
- LOGS/Entities/LabNotebookEntryMinimal.py +8 -0
- LOGS/Entities/LabNotebookEntryRequestParameter.py +59 -0
- LOGS/Entities/LabNotebookExperiment.py +58 -0
- LOGS/Entities/LabNotebookExperimentMinimal.py +8 -0
- LOGS/Entities/LabNotebookExperimentRequestParameter.py +52 -0
- LOGS/Entities/LabNotebookExperiments.py +16 -0
- LOGS/Entities/LabNotebookMinimal.py +8 -0
- LOGS/Entities/LabNotebookModels.py +14 -0
- LOGS/Entities/LabNotebookRequestParameter.py +42 -0
- LOGS/Entities/LabNotebookTemplate.py +42 -0
- LOGS/Entities/LabNotebookTemplateMinimal.py +8 -0
- LOGS/Entities/LabNotebookTemplateRequestParameter.py +38 -0
- LOGS/Entities/LabNotebookTemplates.py +16 -0
- LOGS/Entities/LabNotebooks.py +12 -0
- LOGS/Entities/Method.py +66 -0
- LOGS/Entities/MethodMinimal.py +8 -0
- LOGS/Entities/MethodRequestParameter.py +16 -0
- LOGS/Entities/Methods.py +12 -0
- LOGS/Entities/Origin.py +53 -0
- LOGS/Entities/OriginMinimal.py +8 -0
- LOGS/Entities/OriginRequestParameter.py +28 -0
- LOGS/Entities/Origins.py +12 -0
- LOGS/Entities/ParserLog.py +49 -0
- LOGS/Entities/Permission.py +9 -0
- LOGS/Entities/Person.py +145 -0
- LOGS/Entities/PersonCategory.py +12 -0
- LOGS/Entities/PersonMinimal.py +8 -0
- LOGS/Entities/PersonRequestParameter.py +58 -0
- LOGS/Entities/Persons.py +12 -0
- LOGS/Entities/Project.py +52 -0
- LOGS/Entities/ProjectMinimal.py +8 -0
- LOGS/Entities/ProjectPersonPermission.py +102 -0
- LOGS/Entities/ProjectRequestParameter.py +58 -0
- LOGS/Entities/Projects.py +12 -0
- LOGS/Entities/Role.py +94 -0
- LOGS/Entities/RoleMinimal.py +8 -0
- LOGS/Entities/RoleRequestParameter.py +40 -0
- LOGS/Entities/Roles.py +12 -0
- LOGS/Entities/RunState.py +9 -0
- LOGS/Entities/Sample.py +53 -0
- LOGS/Entities/SampleMinimal.py +8 -0
- LOGS/Entities/SampleRequestParameter.py +54 -0
- LOGS/Entities/Samples.py +12 -0
- LOGS/Entities/SharedContent.py +87 -0
- LOGS/Entities/SharedContentMinimal.py +8 -0
- LOGS/Entities/SharedContentRequestParameter.py +38 -0
- LOGS/Entities/SharedContents.py +12 -0
- LOGS/Entities/Signature.py +60 -0
- LOGS/Entities/Track.py +93 -0
- LOGS/Entities/TrackData.py +20 -0
- LOGS/Entities/TrackImage.py +21 -0
- LOGS/Entities/TrackImageData.py +20 -0
- LOGS/Entities/TrackMatrix.py +28 -0
- LOGS/Entities/TrackMatrixData.py +22 -0
- LOGS/Entities/TrackSettings.py +55 -0
- LOGS/Entities/TrackTable.py +21 -0
- LOGS/Entities/TrackTableData.py +22 -0
- LOGS/Entities/TrackXY.py +40 -0
- LOGS/Entities/TrackXYComplex.py +51 -0
- LOGS/Entities/TrackXYComplexData.py +50 -0
- LOGS/Entities/TrackXYData.py +31 -0
- LOGS/Entities/Vendor.py +40 -0
- LOGS/Entities/VendorMinimal.py +8 -0
- LOGS/Entities/VendorRequestParameter.py +17 -0
- LOGS/Entities/Vendors.py +12 -0
- LOGS/Entities/__init__.py +118 -0
- LOGS/Entity/ConnectedEntity.py +170 -0
- LOGS/Entity/Entity.py +203 -0
- LOGS/Entity/EntityConnector.py +70 -0
- LOGS/Entity/EntityIterator.py +263 -0
- LOGS/Entity/EntityMinimal.py +141 -0
- LOGS/Entity/EntityMinimalWithIntId.py +36 -0
- LOGS/Entity/EntityMinimalWithStrId.py +36 -0
- LOGS/Entity/EntityMinimalWithType.py +47 -0
- LOGS/Entity/EntityRequestParameter.py +104 -0
- LOGS/Entity/EntitySortBy.py +69 -0
- LOGS/Entity/EntityWithIntId.py +26 -0
- LOGS/Entity/EntityWithStrId.py +26 -0
- LOGS/Entity/IGenericEntityOrderBy.py +55 -0
- LOGS/Entity/IdIterator.py +207 -0
- LOGS/Entity/SerializableContent.py +834 -0
- LOGS/Entity/__init__.py +23 -0
- LOGS/Interfaces/ICustomFieldValue.py +92 -0
- LOGS/Interfaces/ICustomSectionValue.py +161 -0
- LOGS/Interfaces/ICustomTypeValue.py +152 -0
- LOGS/Interfaces/ICustomValue.py +28 -0
- LOGS/Interfaces/IEntityInterface.py +7 -0
- LOGS/Interfaces/IEntryRecord.py +57 -0
- LOGS/Interfaces/IHierarchicalEntity.py +41 -0
- LOGS/Interfaces/IHierarchyType.py +63 -0
- LOGS/Interfaces/ILockableEntity.py +52 -0
- LOGS/Interfaces/IModificationRecord.py +56 -0
- LOGS/Interfaces/INamedEntity.py +25 -0
- LOGS/Interfaces/IOwnedEntity.py +27 -0
- LOGS/Interfaces/IPaginationRequest.py +11 -0
- LOGS/Interfaces/IPermissionedEntity.py +72 -0
- LOGS/Interfaces/IProjectBased.py +27 -0
- LOGS/Interfaces/ISessionedEntity.py +59 -0
- LOGS/Interfaces/ISignableEntity.py +49 -0
- LOGS/Interfaces/ISoftDeletable.py +28 -0
- LOGS/Interfaces/ITypedEntity.py +129 -0
- LOGS/Interfaces/IUniqueEntity.py +61 -0
- LOGS/Interfaces/IVersionedEntity.py +39 -0
- LOGS/Interfaces/__init__.py +7 -0
- LOGS/LOGS.py +1436 -0
- LOGS/LOGSConnection.py +647 -0
- LOGS/LOGSOptions.py +11 -0
- LOGS/Parameters/Color.py +92 -0
- LOGS/Parameters/ParameterBase.py +55 -0
- LOGS/Parameters/ParameterConverter.py +24 -0
- LOGS/Parameters/ParameterElement.py +99 -0
- LOGS/Parameters/ParameterList.py +52 -0
- LOGS/Parameters/ParameterTable.py +64 -0
- LOGS/Parameters/__init__.py +13 -0
- LOGS/ServerMetaData.py +120 -0
- LOGS/__init__.py +12 -0
- logs_py-4.0.7.dist-info/METADATA +51 -0
- logs_py-4.0.7.dist-info/RECORD +251 -0
- logs_py-4.0.7.dist-info/WHEEL +5 -0
- logs_py-4.0.7.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
2
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
3
|
+
IEntryContentWithAttribute,
|
|
4
|
+
)
|
|
5
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
6
|
+
IEntryContentWithContent,
|
|
7
|
+
)
|
|
8
|
+
from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class EntryContentBulletList(
|
|
12
|
+
EntryContentItem,
|
|
13
|
+
IEntryContentWithContent,
|
|
14
|
+
IEntryContentWithAttribute[BasicAttribute],
|
|
15
|
+
):
|
|
16
|
+
_attrType = BasicAttribute
|
|
17
|
+
_type = "bulletList"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
5
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
6
|
+
IEntryContentWithAttribute,
|
|
7
|
+
)
|
|
8
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
9
|
+
IEntryContentWithContent,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CalloutAttribute(BasicAttribute):
|
|
14
|
+
_type: Optional[str] = None
|
|
15
|
+
_emoji: Optional[str] = None
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def type(self) -> Optional[str]:
|
|
19
|
+
return self._type
|
|
20
|
+
|
|
21
|
+
@type.setter
|
|
22
|
+
def type(self, value):
|
|
23
|
+
self._type = self.checkAndConvertNullable(value, str, "type")
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def emoji(self) -> Optional[str]:
|
|
27
|
+
return self._emoji
|
|
28
|
+
|
|
29
|
+
@emoji.setter
|
|
30
|
+
def emoji(self, value):
|
|
31
|
+
self._emoji = self.checkAndConvertNullable(value, str, "emoji")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class EntryContentCallout(
|
|
35
|
+
EntryContentItem,
|
|
36
|
+
IEntryContentWithContent,
|
|
37
|
+
IEntryContentWithAttribute[CalloutAttribute],
|
|
38
|
+
):
|
|
39
|
+
_attrType = CalloutAttribute
|
|
40
|
+
_type = "callout"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
5
|
+
IEntryContentWithAttribute,
|
|
6
|
+
)
|
|
7
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
8
|
+
IEntryContentWithContent,
|
|
9
|
+
)
|
|
10
|
+
from LOGS.Entities.LabNotebookEntryContent.TextAttribute import TextAttribute
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PlaceholderNodeAttribute(TextAttribute):
|
|
14
|
+
_label: Optional[str] = None
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def label(self) -> Optional[str]:
|
|
18
|
+
return self._label
|
|
19
|
+
|
|
20
|
+
@label.setter
|
|
21
|
+
def label(self, value):
|
|
22
|
+
self._label = self.checkAndConvertNullable(value, str, "label")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class EntryContentContentPlaceholderNode(
|
|
26
|
+
EntryContentItem,
|
|
27
|
+
IEntryContentWithContent,
|
|
28
|
+
IEntryContentWithAttribute[PlaceholderNodeAttribute],
|
|
29
|
+
):
|
|
30
|
+
_attrType = PlaceholderNodeAttribute
|
|
31
|
+
_type = "contentPlaceholderNode"
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
from typing import Generic, List, Optional, TypeVar, cast
|
|
2
|
+
|
|
3
|
+
from LOGS.Auxiliary.Tools import Tools
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
5
|
+
|
|
6
|
+
_T = TypeVar("_T", bound=EntryContentItem)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class EntryContentConverter(Generic[_T]):
|
|
10
|
+
|
|
11
|
+
@classmethod
|
|
12
|
+
def _convertEntryContentDocument(cls, item: dict):
|
|
13
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentDocument import (
|
|
14
|
+
EntryContentDocument,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
return EntryContentDocument(item)
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def _convertEntryContentHeading(cls, item: dict):
|
|
21
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentHeading import (
|
|
22
|
+
EntryContentHeading,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
return EntryContentHeading(item)
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def _convertEntryContentText(cls, item: dict):
|
|
29
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentText import (
|
|
30
|
+
EntryContentText,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return EntryContentText(item)
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def _convertEntryContentParagraph(cls, item: dict):
|
|
37
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentParagraph import (
|
|
38
|
+
EntryContentParagraph,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
return EntryContentParagraph(item)
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def _convertEntryContentBlockquote(cls, item: dict):
|
|
45
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentBlockquote import (
|
|
46
|
+
EntryContentBlockquote,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return EntryContentBlockquote(item)
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def _convertEntryContentBulletList(cls, item: dict):
|
|
53
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentBulletList import (
|
|
54
|
+
EntryContentBulletList,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
return EntryContentBulletList(item)
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def _convertEntryContentOrderedList(cls, item: dict):
|
|
61
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentOrderedList import (
|
|
62
|
+
EntryContentOrderedList,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
return EntryContentOrderedList(item)
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def _convertEntryContentCallout(cls, item: dict):
|
|
69
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentCallout import (
|
|
70
|
+
EntryContentCallout,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
return EntryContentCallout(item)
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def _convertEntryContentContentPlaceholderNode(cls, item: dict):
|
|
77
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentContentPlaceholderNode import (
|
|
78
|
+
EntryContentContentPlaceholderNode,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return EntryContentContentPlaceholderNode(item)
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def _convertEntryContentEntity(cls, item: dict):
|
|
85
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentEntity import (
|
|
86
|
+
EntryContentEntity,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return EntryContentEntity(item)
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def _convertEntryContentEntityMention(cls, item: dict):
|
|
93
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentEntityMention import (
|
|
94
|
+
EntryContentEntityMention,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
return EntryContentEntityMention(item)
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def _convertEntryContentHorizontalRule(cls, item: dict):
|
|
101
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentHorizontalRule import (
|
|
102
|
+
EntryContentHorizontalRule,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
return EntryContentHorizontalRule(item)
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def _convertEntryContentListItem(cls, item: dict):
|
|
109
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentListItem import (
|
|
110
|
+
EntryContentListItem,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
return EntryContentListItem(item)
|
|
114
|
+
|
|
115
|
+
@classmethod
|
|
116
|
+
def _convertEntryContentTaskList(cls, item: dict):
|
|
117
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentTaskList import (
|
|
118
|
+
EntryContentTaskList,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
return EntryContentTaskList(item)
|
|
122
|
+
|
|
123
|
+
@classmethod
|
|
124
|
+
def _convertEntryContentTaskListItem(cls, item: dict):
|
|
125
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentTaskListItem import (
|
|
126
|
+
EntryContentTaskListItem,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
return EntryContentTaskListItem(item)
|
|
130
|
+
|
|
131
|
+
@classmethod
|
|
132
|
+
def _convertEntryContentTable(cls, item: dict):
|
|
133
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentTable import (
|
|
134
|
+
EntryContentTable,
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
return EntryContentTable(item)
|
|
138
|
+
|
|
139
|
+
@classmethod
|
|
140
|
+
def _convertEntryContentTableCell(cls, item: dict):
|
|
141
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentTableCell import (
|
|
142
|
+
EntryContentTableCell,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
return EntryContentTableCell(item)
|
|
146
|
+
|
|
147
|
+
@classmethod
|
|
148
|
+
def _convertEntryContentTableRow(cls, item: dict):
|
|
149
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentTableRow import (
|
|
150
|
+
EntryContentTableRow,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
return EntryContentTableRow(item)
|
|
154
|
+
|
|
155
|
+
@classmethod
|
|
156
|
+
def convert(cls, item: dict, fieldName: Optional[str] = None) -> _T:
|
|
157
|
+
field = f"in field {fieldName}" if fieldName else ""
|
|
158
|
+
|
|
159
|
+
if isinstance(item, EntryContentItem):
|
|
160
|
+
return cast(_T, item)
|
|
161
|
+
|
|
162
|
+
if not isinstance(item, dict):
|
|
163
|
+
raise ValueError(
|
|
164
|
+
f"EntryContentItem {field} must be of type 'dict'. (Got type '{type(item).__name__}')"
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
if "type" not in item:
|
|
168
|
+
raise ValueError(
|
|
169
|
+
f"EntryContentItem {field} must contain a 'type' field. (Got '{Tools.truncString(str(item))}')"
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
_typeMapper = {
|
|
173
|
+
"blockquote": cls._convertEntryContentBlockquote,
|
|
174
|
+
"bulletList": cls._convertEntryContentBulletList,
|
|
175
|
+
"callout": cls._convertEntryContentCallout,
|
|
176
|
+
"contentPlaceholderNode": cls._convertEntryContentContentPlaceholderNode,
|
|
177
|
+
"doc": cls._convertEntryContentDocument,
|
|
178
|
+
"entity": cls._convertEntryContentEntity,
|
|
179
|
+
"entityMention": cls._convertEntryContentEntityMention,
|
|
180
|
+
"heading": cls._convertEntryContentHeading,
|
|
181
|
+
"horizontalRule": cls._convertEntryContentHorizontalRule,
|
|
182
|
+
"listItem": cls._convertEntryContentListItem,
|
|
183
|
+
"orderedList": cls._convertEntryContentOrderedList,
|
|
184
|
+
"paragraph": cls._convertEntryContentParagraph,
|
|
185
|
+
"table": cls._convertEntryContentTable,
|
|
186
|
+
"tableCell": cls._convertEntryContentTableCell,
|
|
187
|
+
"tableRow": cls._convertEntryContentTableRow,
|
|
188
|
+
"taskList": cls._convertEntryContentTaskList,
|
|
189
|
+
"taskListItem": cls._convertEntryContentTaskListItem,
|
|
190
|
+
"text": cls._convertEntryContentText,
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
mapper = _typeMapper.get(item["type"], None)
|
|
194
|
+
if mapper:
|
|
195
|
+
return cast(_T, mapper(item))
|
|
196
|
+
|
|
197
|
+
return cast(_T, EntryContentItem(item))
|
|
198
|
+
|
|
199
|
+
@classmethod
|
|
200
|
+
def convertList(cls, items, fieldName: Optional[str] = None) -> List[_T]:
|
|
201
|
+
if not isinstance(items, list):
|
|
202
|
+
items = [items]
|
|
203
|
+
|
|
204
|
+
return [
|
|
205
|
+
cls.convert(item, fieldName=f"{fieldName}[{i}]" if fieldName else None)
|
|
206
|
+
for i, item in enumerate(items)
|
|
207
|
+
]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
2
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
3
|
+
IEntryContentWithContent,
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class EntryContentDocument(EntryContentItem, IEntryContentWithContent):
|
|
8
|
+
_type = "doc"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from LOGS.Entities.LabNotebookEntryContent.EntityAttribute import EntityAttribute
|
|
2
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
4
|
+
IEntryContentWithAttribute,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class EntryContentEntity(
|
|
9
|
+
EntryContentItem,
|
|
10
|
+
IEntryContentWithAttribute[EntityAttribute],
|
|
11
|
+
):
|
|
12
|
+
_attrType = EntityAttribute
|
|
13
|
+
_type = "entity"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.EntityAttribute import EntityAttribute
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
5
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
6
|
+
IEntryContentWithAttribute,
|
|
7
|
+
)
|
|
8
|
+
from LOGS.Entities.LabNotebookEntryContent.TextMarkConverter import TextMarkConverter
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class EntryContentEntityMention(
|
|
12
|
+
EntryContentItem,
|
|
13
|
+
IEntryContentWithAttribute[EntityAttribute],
|
|
14
|
+
):
|
|
15
|
+
_attrType = EntityAttribute
|
|
16
|
+
_type = "entityMention"
|
|
17
|
+
|
|
18
|
+
_marks: Optional[List[IEntryContentWithAttribute]] = None
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def marks(self) -> Optional[List[IEntryContentWithAttribute]]:
|
|
22
|
+
return self._marks
|
|
23
|
+
|
|
24
|
+
@marks.setter
|
|
25
|
+
def marks(self, value):
|
|
26
|
+
self._marks = self.checkListAndConvertNullable(
|
|
27
|
+
value,
|
|
28
|
+
IEntryContentWithAttribute,
|
|
29
|
+
"marks",
|
|
30
|
+
converter=TextMarkConverter.convert,
|
|
31
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
5
|
+
IEntryContentWithContent,
|
|
6
|
+
)
|
|
7
|
+
from LOGS.Entities.LabNotebookEntryContent.TextAttribute import TextAttribute
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class HeadingAttribute(TextAttribute):
|
|
11
|
+
_level: Optional[int] = None
|
|
12
|
+
|
|
13
|
+
@property
|
|
14
|
+
def level(self) -> Optional[int]:
|
|
15
|
+
return self._level
|
|
16
|
+
|
|
17
|
+
@level.setter
|
|
18
|
+
def level(self, value):
|
|
19
|
+
self._level = self.checkAndConvertNullable(value, int, "level")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class EntryContentHeading(EntryContentItem, IEntryContentWithContent):
|
|
23
|
+
_type = "heading"
|
|
24
|
+
|
|
25
|
+
_attrs: Optional[HeadingAttribute] = None
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def attrs(self) -> Optional[HeadingAttribute]:
|
|
29
|
+
return self._attrs
|
|
30
|
+
|
|
31
|
+
@attrs.setter
|
|
32
|
+
def attrs(self, value):
|
|
33
|
+
self._attrs = self.checkAndConvertNullable(value, HeadingAttribute, "attrs")
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
|
|
2
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
4
|
+
IEntryContentWithAttribute,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class EntryContentHorizontalRule(
|
|
9
|
+
EntryContentItem, IEntryContentWithAttribute[BasicAttribute]
|
|
10
|
+
):
|
|
11
|
+
_attrType = BasicAttribute
|
|
12
|
+
_type = "horizontalRule"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entity.SerializableContent import SerializableContent
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class EntryContentItem(SerializableContent):
|
|
7
|
+
__type: str = "Unknown"
|
|
8
|
+
_type: Optional[str] = None
|
|
9
|
+
|
|
10
|
+
def fromDict(self, ref) -> None:
|
|
11
|
+
if isinstance(ref, dict):
|
|
12
|
+
if "type" not in ref or not ref["type"]:
|
|
13
|
+
raise ValueError(
|
|
14
|
+
f"EntryContentItem must contain a 'type' field. (Got '{self.truncString(str(ref))}')"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
super().fromDict(ref)
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def type(self) -> str:
|
|
21
|
+
if type(self) == EntryContentItem:
|
|
22
|
+
return self.__type
|
|
23
|
+
|
|
24
|
+
if self._type:
|
|
25
|
+
return self._type
|
|
26
|
+
else:
|
|
27
|
+
raise ValueError(f"Field 'type' in class {type(self).__name__} is not set.")
|
|
28
|
+
|
|
29
|
+
@type.setter
|
|
30
|
+
def type(self, value):
|
|
31
|
+
if type(self) != EntryContentItem:
|
|
32
|
+
if self._type != value:
|
|
33
|
+
raise ValueError(
|
|
34
|
+
f"Field 'type' in class {type(self).__name__} is not mutable. (Got '{self.truncString(str(value))}' expected '{self._type}')"
|
|
35
|
+
)
|
|
36
|
+
return
|
|
37
|
+
self.__type = self.checkAndConvertNullable(value, str, "type")
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
5
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
6
|
+
IEntryContentWithAttribute,
|
|
7
|
+
)
|
|
8
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
9
|
+
IEntryContentWithContent,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ListItemAttribute(BasicAttribute):
|
|
14
|
+
_order: Optional[int] = None
|
|
15
|
+
_closed: Optional[bool] = False
|
|
16
|
+
_nested: Optional[bool] = False
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def closed(self) -> Optional[bool]:
|
|
20
|
+
return self._closed
|
|
21
|
+
|
|
22
|
+
@closed.setter
|
|
23
|
+
def closed(self, value):
|
|
24
|
+
self._closed = self.checkAndConvertNullable(value, bool, "closed")
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def nested(self) -> Optional[bool]:
|
|
28
|
+
return self._nested
|
|
29
|
+
|
|
30
|
+
@nested.setter
|
|
31
|
+
def nested(self, value):
|
|
32
|
+
self._nested = self.checkAndConvertNullable(value, bool, "nested")
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def order(self) -> Optional[int]:
|
|
36
|
+
return self._order
|
|
37
|
+
|
|
38
|
+
@order.setter
|
|
39
|
+
def order(self, value):
|
|
40
|
+
self._order = self.checkAndConvertNullable(value, int, "order")
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class EntryContentListItem(
|
|
44
|
+
EntryContentItem,
|
|
45
|
+
IEntryContentWithContent,
|
|
46
|
+
IEntryContentWithAttribute[ListItemAttribute],
|
|
47
|
+
):
|
|
48
|
+
_attrType = ListItemAttribute
|
|
49
|
+
_type = "listItem"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
5
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
6
|
+
IEntryContentWithAttribute,
|
|
7
|
+
)
|
|
8
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
9
|
+
IEntryContentWithContent,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class OrderedListAttribute(BasicAttribute):
|
|
14
|
+
_order: Optional[int] = None
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def order(self) -> Optional[int]:
|
|
18
|
+
return self._order
|
|
19
|
+
|
|
20
|
+
@order.setter
|
|
21
|
+
def order(self, value):
|
|
22
|
+
self._order = self.checkAndConvertNullable(value, int, "order")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class EntryContentOrderedList(
|
|
26
|
+
EntryContentItem,
|
|
27
|
+
IEntryContentWithContent,
|
|
28
|
+
IEntryContentWithAttribute[OrderedListAttribute],
|
|
29
|
+
):
|
|
30
|
+
_attrType = OrderedListAttribute
|
|
31
|
+
_type = "orderedList"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
2
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
3
|
+
IEntryContentWithContent,
|
|
4
|
+
)
|
|
5
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithTextAttribute import (
|
|
6
|
+
IEntryContentWithTextAttribute,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EntryContentParagraph(
|
|
11
|
+
EntryContentItem, IEntryContentWithContent, IEntryContentWithTextAttribute
|
|
12
|
+
):
|
|
13
|
+
_type = "paragraph"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
2
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
3
|
+
IEntryContentWithAttribute,
|
|
4
|
+
)
|
|
5
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
6
|
+
IEntryContentWithContent,
|
|
7
|
+
)
|
|
8
|
+
from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class EntryContentTable(
|
|
12
|
+
EntryContentItem,
|
|
13
|
+
IEntryContentWithContent,
|
|
14
|
+
IEntryContentWithAttribute[BasicAttribute],
|
|
15
|
+
):
|
|
16
|
+
_attrType = BasicAttribute
|
|
17
|
+
_type = "table"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
5
|
+
IEntryContentWithAttribute,
|
|
6
|
+
)
|
|
7
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
8
|
+
IEntryContentWithContent,
|
|
9
|
+
)
|
|
10
|
+
from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TableCellAttribute(BasicAttribute):
|
|
14
|
+
_colspan: Optional[int] = None
|
|
15
|
+
_rowspan: Optional[int] = None
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def colspan(self) -> Optional[int]:
|
|
19
|
+
return self._colspan
|
|
20
|
+
|
|
21
|
+
@colspan.setter
|
|
22
|
+
def colspan(self, value):
|
|
23
|
+
self._colspan = self.checkAndConvertNullable(value, int, "colspan")
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def rowspan(self) -> Optional[int]:
|
|
27
|
+
return self._rowspan
|
|
28
|
+
|
|
29
|
+
@rowspan.setter
|
|
30
|
+
def rowspan(self, value):
|
|
31
|
+
self._rowspan = self.checkAndConvertNullable(value, int, "rowspan")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class EntryContentTableCell(
|
|
35
|
+
EntryContentItem,
|
|
36
|
+
IEntryContentWithContent,
|
|
37
|
+
IEntryContentWithAttribute[TableCellAttribute],
|
|
38
|
+
):
|
|
39
|
+
_attrType = TableCellAttribute
|
|
40
|
+
_type = "tableCell"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
2
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
3
|
+
IEntryContentWithContent,
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class EntryContentTableRow(EntryContentItem, IEntryContentWithContent):
|
|
8
|
+
_type = "tableRow"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
2
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
3
|
+
IEntryContentWithAttribute,
|
|
4
|
+
)
|
|
5
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
6
|
+
IEntryContentWithContent,
|
|
7
|
+
)
|
|
8
|
+
from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class EntryContentTaskList(
|
|
12
|
+
EntryContentItem,
|
|
13
|
+
IEntryContentWithContent,
|
|
14
|
+
IEntryContentWithAttribute[BasicAttribute],
|
|
15
|
+
):
|
|
16
|
+
_attrType = BasicAttribute
|
|
17
|
+
_type = "taskList"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
|
|
4
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
|
|
5
|
+
IEntryContentWithAttribute,
|
|
6
|
+
)
|
|
7
|
+
from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
|
|
8
|
+
IEntryContentWithContent,
|
|
9
|
+
)
|
|
10
|
+
from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TaskListItemAttribute(BasicAttribute):
|
|
14
|
+
_checked: Optional[bool] = False
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def checked(self) -> Optional[bool]:
|
|
18
|
+
return self._checked
|
|
19
|
+
|
|
20
|
+
@checked.setter
|
|
21
|
+
def checked(self, value):
|
|
22
|
+
self._checked = self.checkAndConvertNullable(value, bool, "checked")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class EntryContentTaskListItem(
|
|
26
|
+
EntryContentItem,
|
|
27
|
+
IEntryContentWithContent,
|
|
28
|
+
IEntryContentWithAttribute[TaskListItemAttribute],
|
|
29
|
+
):
|
|
30
|
+
_attrType = TaskListItemAttribute
|
|
31
|
+
_type = "taskListItem"
|