AnnotationResource
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/dsp_base_resources.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
create_new
Creates a new annotation resource. An annotation is a comment to another resource.
See XML documentation for details
Parameters:
Name | Type | Description | Default |
---|---|---|---|
res_id
|
str
|
ID of this annotation resource |
required |
label
|
str
|
label of this annotation resource |
required |
annotation_of
|
str
|
ID of the resource that this annotation refers to (cardinality 1) |
required |
comments
|
Collection[str]
|
the comment(s) that this annotation consists of, i.e. the annotation itself (cardinality 1-n) |
required |
permissions
|
Permissions
|
permissions of this annotation resource |
PROJECT_SPECIFIC_PERMISSIONS
|
Returns:
Type | Description |
---|---|
AnnotationResource
|
An annotation resource |
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/dsp_base_resources.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
add_comment
Add a comment to the resource
Parameters:
Name | Type | Description | Default |
---|---|---|---|
comment
|
str
|
text |
required |
Returns:
Type | Description |
---|---|
AnnotationResource
|
The original resource, with the added comment |
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/dsp_base_resources.py
77 78 79 80 81 82 83 84 85 86 87 88 |
|
add_comment_multiple
Add several comments to the resource
Parameters:
Name | Type | Description | Default |
---|---|---|---|
comments
|
Collection[str]
|
List of texts |
required |
Returns:
Type | Description |
---|---|
AnnotationResource
|
The original resource, with the added comments |
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/dsp_base_resources.py
90 91 92 93 94 95 96 97 98 99 100 101 |
|
add_comment_optional
If the value is not empty, add it as comment, otherwise return the resource unchanged.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
comment
|
Any
|
text or empty value |
required |
Returns:
Type | Description |
---|---|
AnnotationResource
|
The original resource, with the added comment |
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/dsp_base_resources.py
103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
add_migration_metadata
Add metadata from a SALSAH migration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
creation_date
|
str | None
|
creation date of the resource in SALSAH |
required |
iri
|
str | None
|
Original IRI in SALSAH |
None
|
ark
|
str | None
|
Original ARK in SALSAH |
None
|
Returns:
Type | Description |
---|---|
AnnotationResource
|
The original resource, with the added metadata |
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/dsp_base_resources.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|