class documentation
Class for the Node (NOD) resource type.
| Method | deactivate |
Deactivate an active resource. |
| Method | initialize |
This method is called when a new resource is created and before written to the database. |
| Class Variable | dispatcher |
Injected Dispatcher instance. |
| Method | _remove |
Remove NOD.ri from AE node link. |
Inherited from AnnounceableResource:
| Method | __init__ |
Initialization of a Resource instance. |
| Method | activate |
This method is called to activate a resource, usually in a CREATE request. |
| Method | add |
Add anouncement information to the resource. These are a list of tuples of the csi to which the resource is registered and the CSE-relative ri of the resource on the remote CSE. Also, add the reference in the at attribute. |
| Method | create |
Create the dict stub for the announced resource. |
| Method | get |
Return the internal announcedTo list attribute of a resource. |
| Method | remove |
Remove anouncement information from the resource. These are a list of tuples of the csi to which the resource is registered and the CSE-relative ri of the resource on the remote CSE. Also, remove the reference from the at attribute. |
| Method | set |
Set the internal announcedTo list attribute of a resource. |
| Method | update |
Update, add or remove resource attributes. |
| Method | validate |
Validate a resource. |
| Method | validate |
Possibility to add or modify the announced Dict. This can be implemented in the child classes. |
| Class Variable | announcement |
Injected AnnouncementManager instance. |
| Class Variable | validator |
Injected Validator instance. |
| Method | _create |
Actually create the resource dict. |
| Method | _get |
Return a list of mandatory and optional announced attributes. The function only returns those attributes that are also present in the resource! |
| Instance Variable | _orig |
Store the original announceableAttributes for later use in the update so that we can check whether they are removed. |
| Instance Variable | _orig |
Store the original at attribute for later use in the update so that we can check whether it is removed. |
Inherited from Resource (via AnnounceableResource):
| Method | __contains__ |
Implementation of the membership test operator. |
| Method | __delitem__ |
Implementation of the self[key| operation for deleting attributes. |
| Method | __eq__ |
Test for equality of the resource to another resource. |
| Method | __getattr__ |
Map the normal object attribute access to the internal resource attribute dictionary. |
| Method | __getitem__ |
Implementation of the self[key| operation for retrieving attributes. |
| Method | __repr__ |
Object representation as string. |
| Method | __setitem__ |
Implementation of the self[key] operation for assigning to attributes. |
| Method | __str__ |
String representation of the resource's attributes. |
| Method | as |
Get the JSON resource representation. |
| Method | attribute |
Return the value of an attribute. |
| Method | can |
Check whether resource is a valild child resource for this resource. |
| Method | child |
Called after a child resource was added to the resource. |
| Method | child |
Called when a child resource of the resource was removed. |
| Method | child |
Called when a child resource was updated. |
| Method | child |
Called before a child will be added to a resource. |
| Method | create |
Create a child resource from a JSON dictionary. |
| Method | db |
Add the resource to the database. |
| Method | db |
Delete the resource from the database. |
| Method | db |
Load a new copy of the same resource from the database. |
| Method | db |
Reload the resource instance from the database. |
| Method | db |
Update the resource in the database. |
| Method | decrement |
Decrement the subscription counter for the resource. |
| Method | del |
Delete the attribute 'key' from the resource. |
| Method | get |
Get all attributes of the resource. |
| Method | get |
Retrieve the current originator. This could be different from the originator / creator of the resource in case of the custodian attribute is set. |
| Method | get |
Determine and return the final value of an attribute during an update. |
| Method | get |
Retrieve a resource's location coordinates (internal attribute). |
| Method | get |
Retrieve a resource's originator. |
| Method | get |
Retrieve a resource's release version indicator. |
| Method | get |
Retrieve a resource's full structured resource name. |
| Method | get |
Retrieve the subscription counter for the resource. |
| Method | handle |
Process a CREATE request that is directed to a virtual resource. |
| Method | handle |
Process a DELETE request that is directed to a virtual resource. |
| Method | handle |
Process a notification request that is directed to a resource. |
| Method | handle |
Process a RETRIEVE request that is directed to a virtual resource. |
| Method | handle |
Process a UPDATE request that is directed to a virtual resource. |
| Method | has |
Check whether an attribute exists for the resource. |
| Method | has |
Test whether a resource supports the specified attribute. This method may be overwritten in sub-classes, for example for virtual resources. |
| Method | increment |
Increment the subscription counter for the resource. |
| Method | is |
Test whether a the resource's type is an announced type. |
| Method | is |
Test whether a resource has been created for another resource. |
| Method | is |
Test whether this resource has been modified after another resource. |
| Method | is |
Test whether the resource is a virtual resource. |
| Method | retrieve |
Retrieve the parent resource of this resouce. |
| Method | retrieve |
Retrieve the raw (!) parent resource of this resouce. |
| Method | select |
Determine the selected attributes for a partial retrieve of a resource. |
| Method | set |
Assign a value to a resource attribute. |
| Method | set |
Save the resource ID for which this resource was created for. |
| Method | set |
Set a resource's location coordinates (internal attribute). |
| Method | set |
Set a resource's originator. |
| Method | set |
Set the resource ID for the resource if not already set. |
| Method | set |
Set the resource name. |
| Method | set |
Assign the release version for a resource. |
| Method | set |
Set a resource's full structured resource name. |
| Method | structured |
Determine the structured path of a resource. |
| Method | type |
Return the resource type as a string. If the resource is a flex container, the specialization is added. |
| Method | updated |
Signal to a resource that is was successfully updated. |
| Method | will |
This method is called before a resource will be deactivated. |
| Method | will |
This method is called before a resource will be send back in a RETRIEVE response. |
| Method | will |
This method is called before a resource will be updated and before calling the update() method. |
| Class Variable | __slots__ |
Slots for the class. |
| Class Variable | factory |
Injected Factory instance. |
| Class Variable | importer |
Injected Importer instance. |
| Class Variable | notification |
Injected NotificationManager instance. |
| Class Variable | request |
Injected RequestManager instance. |
| Class Variable | storage |
Injected Storage instance. |
| Instance Variable | dict |
Dictionary for public and internal resource attributes. |
| Method | _check |
Check whether a referenced ACP resoure exists, and if yes, change the ID in the list to CSE relative unstructured format. |
| Method | _normalize |
Normalize the URLs in the given attribute. |
| Class Variable | _exclude |
Resource attributes that are excluded when updating the resource |
| Instance Variable | _original |
Original dictionary as it was created. This is used for validation in activate() later. |
Deactivate an active resource.
This usually happens when creating the resource via a request. A subscription check for deletion is performed.
This method is implemented in sub-classes as well.
| Parameters | |
originator:str | The requests originator that let to the deletion of the resource. |
parentResource | The resource's parent resource. |
This method is called when a new resource is created and before written to the database.
| Parameters | |
pi:str | The parent resource's ID. |