mirror of
https://github.com/yweber/lodel2.git
synced 2026-08-06 04:18:37 +02:00
Changed the relation's methods header of the dummy datasource
This commit is contained in:
parent
81d194974b
commit
ff983409fc
1 changed files with 9 additions and 8 deletions
|
|
@ -53,24 +53,25 @@ class DummyDatasource(object):
|
|||
return []
|
||||
|
||||
## @brief Link two object given a relation nature, depth and rank
|
||||
# @param id_sup int : a lodel_id
|
||||
# @param id_sub int : a lodel_id
|
||||
# @param lesup LeObject : a LeObject
|
||||
# @param lesub LeObject : a LeObject
|
||||
# @param nature str|None : The relation nature or None if rel2type
|
||||
# @param rank int : a rank
|
||||
def add_relation(self, id_sup, id_sub, nature=None, depth=None, rank=None):
|
||||
def add_relation(self, lesup, lesub, nature=None, depth=None, rank=None, **rel_attr):
|
||||
pass
|
||||
|
||||
|
||||
## @brief Delete a link between two objects given a relation nature
|
||||
# @param id_sup int : a lodel_id
|
||||
# @param id_sub int : a lodel_id
|
||||
# @param lesup LeObject : a LeObject
|
||||
# @param lesub LeObject : a LeObject
|
||||
# @param nature str|None : The relation nature
|
||||
def del_relation(self, id_sup, id_sub, nature=None):
|
||||
def del_relation(self, lesup, lesub, nature=None):
|
||||
pass
|
||||
|
||||
## @brief Return all relation of a lodel_id given a position and a nature
|
||||
# @param lodel_id int : We want the relations of this lodel_id
|
||||
# @param leo LeObject : We want the relations of this LeObject
|
||||
# @param superior bool : If true search the relations where lodel_id is in id_sup
|
||||
# @param nature str|None : Search for relations with the given nature (if None rel2type)
|
||||
# @param return an array of dict with keys [ id_sup, id_sub, rank, depth, nature ]
|
||||
def get_relations(self, lodel_id, superior=True, nature=None):
|
||||
def get_relations(self, leo, superior=True, nature=None):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue