Documentation Repositories¶
-
class
motey.repositories.base_repository.
BaseRepository
[source]¶ Base repository to wrapp database handling.
-
class
motey.repositories.labeling_repository.
LabelingRepository
[source]¶ Repository for all label specific actions.
-
add
(label, label_type)[source]¶ Add a new label to the database.
Parameters: - label – the label to be added.
- label_type – the label type of the label.
-
has
(label)[source]¶ Checks if the given
label
exist in the database.Parameters: label – the label to search for. Returns: True if the lable exists, otherwise False
-
has_type
(label_type)[source]¶ Checks if a label with the given
label_type
exist in the database.Parameters: label_type – the type of the label to search for. Returns: True if the label type exists, otherwise False
-
-
class
motey.repositories.nodes_repository.
NodesRepository
[source]¶ Repository for all node specific actions.
-
add
(ip)[source]¶ Add a new node to the database if they not exist yet.
Parameters: ip – the ip of the new node.
-
-
class
motey.repositories.service_repository.
ServiceRepository
[source]¶ Repository for all service specific actions.
-
add
(service)[source]¶ Add a new service to the database if they not exist yet.
Parameters: service – a service model to be stored
-