-
Notifications
You must be signed in to change notification settings - Fork 0
Description
In the dataset manufacturing, some implementation using description logic have been made to simplify the instantiation of a dataset
This logic can simplify a lot the implementation of artifact specification, especially when we have many copies of the same artifact
At this point we are very close to be able to implement pre-made entire Resource Profiles using description logic
Implementing these kind of classes can be very useful from a developper point of view. The main points are:
- avoiding a lot of code repetition
- on an API change, allowing maintainers to update the description class without touching the instantiation itself
I see two scenarii where it could be useful to instantiate easily entire Resource Profiles:
- provide straightforward ways to implement many resource profiles directly related to our ontology that the users should not develop themselves (JaCaMo workspaces/Jade workspaces/HypermediaHMAS platforms/etc)
- allow manufacturers to implement their own Resource Profiles for product they sell and provide a URI for customers. These customers would just have to instantiate the provided class to implement their artifacts resource profiles easily
The only problem blocking the developpers to implement such classes are the URLs for the different signifiers that are deeply nested in the sh:NodeShape hierarchy
I would like to launch a discussion here about a property that would be welcome in this context.
It would be an optional parameter, so it would not break anything to what has been made before.
For the sake of the explanation, we will name it hmas:baseRoute but any better name would be appreciated
This property is meant to be attached to a ResourceProfile and would describe the base route to reach to API
Many API work with a base URL completed by specific suffixes to reach specific endpoints. When this property is set we would only have to specify the suffix in the NodeShape Hierarchy.
Then it becomes possible to define for example a robotic arm with different signifiers located on the same URI:
- /tcp GET (get the current position)
- /tcp/target GET (get the current target)
- /tcp/target POST (set the current target)
- ...
We can then define a emse:CherryBotResourceProfile using description logic and implement our instance of a Cherrybot in a straight-forward way:
robotic-arm-1: a emse:CherryBotResourceProfile ;
hmas:baseRoute <https://link.to.my.endpoint/robotic-arm-1/> .What are your thoughts about this?