Open
Description
Currently the ProvDb
class expose methods like get_element(identifier)
this method returns 3 possible types:
- ProvAgent
- ProvEntity
- ProvActivity
In order to provide a consistent we should discuss the advantage of a method like get_relation()
For example:
matching_attributes = dict()
matching_attributes.update({'prov:type': 'prov:Mention'})
pro_relation = prov_api.get_relation(matching_attributes)
The problem is that this kind of filter mechanism could return a list instead of a single entry. According to the PROV spec the uniques of a relation is defined by all formal attributes (eg form / to node). Maybe we can set a filter by this formal attributes.
This seems the best solution but also require to alter the BaseAdapter
and all adapter implementations.
Also I really don't know if it is necessary to get only a single relation between to ProvElements
. Is there any good use case for this?