# SOyA Open Items & Actions ## Tasks - [x] support using system attributes in OverlayDataBudRendering - [x] support larger content - [x] [Repo List Filtering](#Repo-List-Filtering) - [ ] [User Management](https://hackmd.io/juQ45ULqR7eamLVRIxVwpQ) - [ ] finish SOyA Tutorial - [ ] validation for sets: https://hackmd.io/VMr7hEn2T3aUCyRc9v3uqA - [ ] create a new `soya` command to extract the SHACL part of a SOyA structure - [ ] allow to delete SOyA structures `soya delete name` (requires user management) - [ ] support all data types (example: `positiveInteger`) in JSON Form allow to fall-back to available data types in JSON Form - [ ] ODRL representation of Data Agreements - [ ] support multiple data types `set<itemlist|string>` in forms (use first element) ## Feature Requests ### Repo List Filtering *Status:* - [x] CFA: describe Repo List Filtering - [x] discuss concept with Gabriel (Feb 10) *Description:* Since the number of SOyA Structures in a Repo is ever growing introduce a filter mechanism. *Proposal:* * client-side filtering in the left list of soya structures as-you-type; * the refresh-button on the right requeries the complete list of the soya structures from the server *Mockup:* ![image](https://hackmd.io/_uploads/r18WIzLtkg.png) ### Other - [ ] SOyA Form (https://soya-form.ownyourdata.eu) shall support an URL parameter to choose the SOyA Repo (was identified during the time when the SOyA Repo was updated and the new repo was available at soya-beta.ownyourdata.eu) - [x] Auto-complete in SOyA Form have the same auto-complete functionality in [SOyA Form](https://soya-form.ownyourdata.eu/) as in DataBud (shows available SOyA structures after the first 3 characters) - [ ] drop-downs with list from API endpoint * problem to solve: enter DIDs and other non human-readable entries from a list of available options with human-readable labels * question: is it possible in the SOyA-Form rendering component to generate the list of options "on-the-fly" and in the SOyA structure only the API endpoint is provided? * <details><summary>example: </summary> ```yaml= meta: name: DynamicEnum content: bases: - name: DynamicEnum attributes: did: String overlays: - type: OverlayForm base: DynamicEnum name: DynamicEnumOverlay schema: type: object properties: did: type: string enumApi: https://playground2.data-container.net/api/data?id=107&f=plain ui: type: VerticalLayout elements: - type: Control scope: "#/properties/did" ``` response `enumApi` is an array with const/title: https://playground2.data-container.net/api/data?id=107&f=plain evaluates "on-the-fly" to: ```json-ld= { "@context": { "@version": 1.1, "@import": "https://ns.ownyourdata.eu/ns/soya-context.json", "@base": "https://soya.ownyourdata.eu/DynamicEnum/", "xsd": "http://www.w3.org/2001/XMLSchema#" }, "@graph": [ { "@id": "DynamicEnum", "@type": "owl:Class", "subClassOf": "soya:Base" }, { "@id": "did", "@type": "owl:DatatypeProperty", "domain": "DynamicEnum", "range": "xsd:string" }, { "@id": "DynamicEnumForm", "schema": { "type": "object", "properties": { "did": { "type": "string", "oneOf": [ { "const": "did:oyd:123", "title": "asdf" }, { "const": "did:oyd:456", "title": "qwer" } ] } } }, "ui": { "type": "VerticalLayout", "elements": [ { "type": "Control", "scope": "#/properties/did" } ] }, "@type": "OverlayForm", "onBase": "DynamicEnum", "name": "DynamicEnumOverlay" } ] } ``` </details> * an example sparql extension implemented as part of GraphDB: https://graphdb.ontotext.com/documentation/10.7/sparql-ext-functions-reference.html ## Feature Requests DataBud *note: DataBud for Semantic Containers is not a SOyA feature but since there is no other place I put my thooghts here* - [ ] Bug: Action button should not overwrite meta-data * clicking on an Action Button performs a `PUT` that sends the JSON from the form as `data` and the current schema in `meta` -> if there are other elements in `meta` those are lost * probably perform first an `GET ?f=meta` and then use this response for `meta` in the `PUT` request - [ ] configurable text for action buttons * there are only 2 pre-configured messages (either "action is successful" if HTTP response is 200, or "action failed" otherwise) * using the buttons now for asynchronous requests it would be great to show a custom response to tell the user abou the state of the request when clicking the button ("request started", "request in progress", "request completed", "request failed with...") * is it possible to check not only the HTTP response code but also if there is in the response a "message" attribute -> and if yes: shows in the alert this text? - [ ] show navigation controls (upper half of DataBud) when deep-linking items currently, only the item itself is displayed with no possibility to switch to other items (and I have now dozens of tabs open) - [ ] is it possible to install the following Handlebars Helper in DataBud: https://github.com/jmurphyau/ember-truth-helpers (allows extended logical expressions in OverlayDataBudRendering) - [ ] is it possible to specify the default view when deep-linking an item, i.e., specify to show the SOyA Form (form view) instead of the raw data (something like: https://cp-private.data-container.net/?itemId=176&view=form) ## Epics - [ ] auto-generate SHACL for `set` handling (as discused in the 1.1 Bugfix) - [x] Tag management for SOyA structures - [x] implement Visual Editor for SOyA management (full functionality without command line) ### Task Details #### ODRL representation of Data Agreements * Example Data Agreements: https://hackmd.io/3GhuO47oRXu3_mpGO_pXvw?view#Data-Agreements #### OverlayDataBudRendering * system attributes: id, createdAt, updatedAt; maybe also attributes from meta? * proposal: use the notation `$` to access system attributes (e.g., `$id`, `$createdAt`) * example SOyA structure: https://soya.ownyourdata.eu/ConcreteMixture/yaml ## Conceptualisation ### Key Elements of SOyA * text based using YAML * simple building blocks with good examples example: PlantUML ### Functions * describe data structure (sit together in a meeting or workshop and write down data structures) - forms: data collection & rendering - possibility to use data-container backend to store data - validations - transformations - bridge flat vs graph: `init`, `acquire`, `canonical`, `map` - meta functions for collaboration & management: `push`, `pull`, `info`, `similar` ### Principles - automate simple tasks (80%) by providing scaffold for specialised tools - use specialised tools for the details (but store information in SOyA structure) - SHACL for validation - JSON Forms for form rendering - jq, jolt for transformations ## Bugfixes <details><summary>Closed Bug Reports</summary> - [x] extended tag handling for OverlayForm * incorrect behaviour when using tag in OverlayForm (here: [`ConcreteDelivery`](https://soya.ownyourdata.eu/ConcreteDelivery/yaml) * wrong rendering: [link](https://soya-form.ownyourdata.eu/?schemaDri=ConcreteDelivery&data=%7B%22timestamp%22%3A%222024-08-20T18%3A50%3A00%2B02%3A00%22%2C%22batch%22%3A%22did%3Aoyd%3AzQmQht8RJD6vx7nDvqjL8fdYPrTBJvDJui5oQVbW6cYJTw3%22%2C%22volume%22%3A3%2C%22transport%22%3A24.7%7D&tag=full) (just shows all fields but not JSON Form) * correct rendering without specifying tag: [link](https://soya-form.ownyourdata.eu/?schemaDri=ConcreteDelivery&data=%7B%22timestamp%22%3A%222024-08-20T18%3A50%3A00%2B02%3A00%22%2C%22batch%22%3A%22did%3Aoyd%3AzQmQht8RJD6vx7nDvqjL8fdYPrTBJvDJui5oQVbW6cYJTw3%22%2C%22volume%22%3A3%2C%22transport%22%3A24.7%7D) - [x] tag handling for OverlayForm * strange behaviour when using `tag` in OverlayForm * does not switch between tags * does not show custom OverlayForm but only default as soon as `tag: xyz` is present in YAML * example SOyA structure: https://soya.ownyourdata.eu/zkEPD1/yaml ("simple" should not show field zkp: [SOyA-Form](https://soya-form.ownyourdata.eu/?schemaDri=zkEPD1&tag=extended&data=%7B%7D)) - [x] 1.1 regression: lists in forms depend on `soya_container: set` (now replaced with `range: "rdf:list"`) <details><summary>Details</summary> example: SOyA structure [`FlightList`](https://soya.ownyourdata.eu/FlightList/yaml) <- uses custom FormOverlay but should be possible to auto-generate simple FormOverlay minimal example to reproduce: ```bash= echo 'meta: name: ListDemo content: bases: - name: ListDemo attributes: id: String listItems: list<setItem | string> - name: listItem attributes: number: String priority: Integer' | soya init | soya form ``` ```bash= echo 'meta: name: ListDemo content: bases: - name: ListDemo attributes: id: String listItems: list<setItem | string> - name: listItem attributes: number: String priority: Integer listDemoId: String nullable foreignKey: ListDemo:id ' ``` introduce new "element": ``` { "@id": "listItems", "@type": "owl:ObjectProperty", "domain": "ListDemo", "range": "http://www.w3.org/1999/02/22-rdf-syntax-ns#List", "soya:containerType": "set", "soya:containerElementTypes": [ "https://example.com/listItem", "xsd:string" ] }, ``` should produce: ```json= { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "listItems": { "type": "array", "items": { "type": "object", "properties": { "number": { "type": "string" }, "priority": { "type": "integer" } } } } } }, "ui": { "type": "Group", "label": "ListDemo", "elements": [ { "type": "VerticalLayout", "elements": [ { "type": "Control", "scope": "#/properties/id" }, { "type": "Control", "scope": "#/properties/listItems", "options": { "elementLabelProp": "number", "detail": { "type": "HorizontalLayout", "elements": [ { "type": "Control", "scope": "#/properties/number" }, { "type": "Control", "scope": "#/properties/priority" } ] } } } ] } ] } } ``` </details> - [x] data type `xsd:double` requires string input example & reproduce: [link](https://soya-form.ownyourdata.eu/?schemaDri=ConcreteMixture&data=%7B%22cement%22%3A30.1%7D) * list of data types and mapping to XSD data types & [JSON Form Controls](https://jsonforms.io/examples/control) - Boolean -> `xsd:boolean`, `"type": "boolean"` - Integer -> `xsd:integer`, `"type": "integer"` - Float, Decimal, Double -> `xsd:double`, `"type": "number"` - String -> `xsd:string`, `"type": "string"` - Date -> `xsd:date`, `"type": "string", "format": "date"` - Time -> `xsd:time`, `"type": "string", "format": "time"` - DateTime -> `xsd:dateTime`, `"type": "string", "format": "date-time"` </details>