-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Design of Client Library for Knora Resources #5
Comments
This comment has been minimized.
This comment has been minimized.
Depending on the operation, more or less information is required, see dasch-swiss/dsp-api#1256 (comment)
The client library should offer convenience methods to handle the subclasses of |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
note to myself: when making a get request for a resource, the timestamp should be an optional parameter. |
Where will I find the gui-order of properties? In @knora/core we added an array of type GuiOrder |
On a |
This issue is related to dasch-swiss/dsp-api#1256. Details about how to generate the necessary client code could should be discussed there.
Read, Update, Add, Delete
Support of different operations (read, update, add, delete) on generic resources (incl. label) and values (incl. comment): handle conversions from and to JSON-LD and communicate with the Knora API.
I think we could use inheritance to model this. There could be a general resource and value skeleton that can be extended for specific operations (like in Knora).
So there could be a
ReadResource
when reading from Knora. Or the client would instantiate aCreateResource
that would then have the method to serialise itself to JSON-LD. It think conceptually this is close to what we have in v2 in Knora.The necessary code has to be generated in Knora so it keeps in sync (system properties).
Encapsulate Complex Queries
Support of knora-base concepts like compound resources that involve more than one API call (full resource request and Gravsearch queries): handle multiple async calls and update result when more data is available. This should simplify the use of compound resources like books that have pages. Same applies to images that have regions or videos with sequences.
Specific media types could be subclasses of
ReadResource
with additional information that is specific to the media type.We have to make sure that this is in sync with knora-base.
Allow for User Provided Definitions
When the client submits a Gravsearch query, the type of the answer can be specified. The answer would be available directly as this type. In Gravsearch, not all properties of a resource have to be returned (see dasch-swiss/dsp-api#1256 (comment)) and the result could also contain nested resources or incoming properties.
I think in a first step, the conversion for the generic resource can be used. Then, there could be a check of all required properties (incl. those of nested resources).
The text was updated successfully, but these errors were encountered: