FraunhoferIOSB / FROST-Python-Client

Python Client Library for FROST.
GNU Lesser General Public License v3.0
8 stars 8 forks source link

Fix relations #15

Closed tfeseker closed 1 year ago

tfeseker commented 1 year ago

All relations of entities in model.ext.entity_type.EntityTypes are given as singular, e.g. 'Thing' has the relation 'Location', which should really be 'Locations'.

As far as I can see, the lists of relations are not (yet?) used within this package. However, I am using these lists to construct the path between entities for filtering queries, e.g.

datastreams().query().filter('abc' eq Thing/Locations/id).list()

to get all datastreams at a given location or

locations().query().filter('xyz' eq Things/Datastreams/ObservedProperty/id).list()

to get all locations where a given ObservedProperty is observed.

This only works with the suggested corrections.

tfeseker commented 1 year ago

Sorry, I accidentally removed the branch. I apologize for the confusion...