Closed danaivach closed 10 months ago
Update: The 2nd option has been already addressed in https://github.com/danaivach/hmas-interaction/pull/4.
The transition from the 2nd option to the 1st one remains.
I am closing this as the issue is addressed through the implementation of the 2nd discussed option. This option aligns with the use of SHACL in the remaining parts of the library.
A signifier should optionally have a recommended context, that is de-serialized in, or serialized from a
Context
instance.A
Context
instance is of typeSHACL.TERM.NODE_SHAPE
, but its structure is less contained than the structure ofActionSpecification
(e.g., there is no defaultsh:class
likehmas:ActionExecution
). Therefore, it can be used to specify any shape that adheres to the SHACL specification. For modelling it, there are (at least) 2 options:model
of typeorg.eclipse.rdf4j.model.Model
that subsumes all the triples related to the SHACL Node Shape. This option has been already applied in PR https://github.com/danaivach/hmas-interaction/pull/4Eventually, no. 1 may be needed for the more principled modelling of
Context
and its SHACL-based validation. No. 2 can work adequately for an initial implementation if time needs to be saved.The following test is suggested based on option no. 2 (for the reader; but the same example can be used for the writer too). The unit testing part over the model could be more detailed, but similar: