diff --git a/.gitignore b/.gitignore index 5679f5c8..830cbe2f 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,7 @@ lintPush.sh test/cypress/screenshots test/cypress/downloads test/serve-this + +# Next files and dirs are now a copy, see main/package.json scripts +/main/src/config.json +/main/public \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 25254009..a216dc2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Support for multiple configurations (#69, #49). +- Collections of known configurations are gathered in subdirectories of main/configs (#175). + ## [1.5.0] - 2025-01-02 ### Added diff --git a/README.md b/README.md index 38a63593..a4135f65 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ inspect the corresponding results. Table of contents: * [Preface](#preface) +* [Prerequistes](#prerequistes) * [Getting started](#getting-started) * [The supporting resources](#the-supporting-resources) * [Static, production build](#static-production-build) @@ -19,29 +20,48 @@ Table of contents: * [Query icons](#query-icons) * [Custom queries](#custom-queries) * [Representation Mapper](#representation-mapper) -* [Using the local pods](#using-the-local-pods) * [Advanced topics](#advanced-topics) - * [Adapting this project to your needs](#adapting-this-project-to-your-needs) * [Converting custom queries into common queries](#converting-custom-queries-into-common-queries) -* [Testing](#testing) - * [Testing the production version](#testing-the-production-version) - * [Testing the development version](#testing-the-development-version) +* [For developers](#for-developers) + * [Adding your own configuration](#adding-your-own-configuration) + * [Testing](#testing) + * [Testing the production version](#testing-the-production-version) + * [Testing the development version](#testing-the-development-version) ## Preface -This repository defines a Web application in the directory `main` and some auxiliary tools for testing and supporting a demo in the directory `test`. +This repository defines a Web application in the directory `main` and some supporting resources in the directory `test`. + +The Web application is configured by the following configuration resources: + +* file `main/src/config.json`; +* directory `main/public`. + +In order to be able to maintain several different configurations (or *flavours*) in this repository, these configuration resources are *git-ignored*. +Before launching or building the application, their contents need to be copied from the appropriate subdirectory of `main/configs`. +The instructions below explain when and how to use the `select-config.cjs` script for this purpose. + +## Prerequistes + +* Node >= 18 with npm ## Getting started -The application is located in directory `main`. +The Web application is located in directory `main`. Go to that directory. -To install the application: +To install: ```bash npm install ``` +To select the appropriate configuration (here shown for `demo`): + +```bash +node scripts/select-config.cjs demo +``` + To run the Web application in development mode: ```bash @@ -50,12 +70,20 @@ npm run dev Now you can browse the displayed URL. -If you want to test the queries provided in the default configuration `main/src/config.json`, -continue in section [The supporting resources](#the-supporting-resources). +In case of the `demo` configuration: + +* you'll need to spin up the supporting resources as explained in section [The supporting resources](#the-supporting-resources); +* some queries require you to be logged in; log in at IDP `http://localhost:8080` as user `hello@example.com` with password `abc123`. ## The supporting resources -The supporting resources, including a local pod containing example data, are located in directory `test`. +The supporting resources are located in directory `test`. + +These include: + +* a local pod containing data used in the `demo` and `test` configurations; +* proxies used int the `demo` and `test` configurations; +* scripts to support automated testing. To install, go to directory `test` and execute: @@ -84,14 +112,19 @@ in a new terminal window, also in directory `test`: npm run start:badCors ``` -Some queries require a log in. -Log in with the IDP `http://localhost:8080` and the credentials for the user owning the pod named `example` in the file `test/seeded-pod-config.json`. - ## Static, production build To make a standalone version of the result of this project, you can make a static build and serve it using any webserver. -In directory `main`, execute: +Go to directory `main`. + +To select the appropriate configuration (here shown for `demo`): + +```bash +node scripts/select-config.cjs demo +``` + +To build: ```bash npm run build @@ -110,7 +143,7 @@ If you provide a WebID, the first Identity Provider found in the given WebID is ## Configuration file -The configuration file `main/src/config.json` follows a simple structure. +The configuration file must follow the structure shown below. ```json { @@ -314,36 +347,17 @@ They've already got styling matching that of `react-admin` and are easy to use. `Warning` if you change the record object, the changed will still be present in the next render. -## Using the local pods - -To support the provided example configuration `main/src/config.json` and the tests, this repo integrates some local pods. -You can make use of these for your own tests. Follow these steps: - -* Add your data and `.acl` files in the `test/initial-pod-data` folder. - These files will be available in the pod relative to `http://localhost:8080/example/`. -* Prepare the pods by executing `npm run reset:pods` in directory `test`. - ## Advanced topics -### Adapting this project to your needs - -The easiest way to adapt this project to your needs is: - -1. Make your own fork on github. -2. Concentrate on the files in the `main` subdirectory. -3. Add your own queries in the `main/public/queries` directory and in general, your own resources in the `main/public` directory. -4. Write your own `main/src/config.json` file, following the [configuration file documentation above](#configuration-file). -5. Run or build as documented above. - ### Converting custom queries into common queries Once you have your basic configuration working, you may extend it with custom queries interactively with the query editor and save these to a file in a pod. -You can convert such custom queries into common queries, by adding them to `main/src/config.json`. +You can convert such custom queries into common queries, by adding them to `main/configs//config.json`. Follow these steps to get started: 1. **Open and view the file with custom queries** using a tool, such as [Penny](https://penny.vincenttunru.com/). The file has JSON syntax and contains an array of query objects. -2. **Copy the query objects of interest** to the `"queries"` array in `main/src/config.json`. +2. **Copy the query objects of interest** to the `"queries"` array in `main/configs//config.json`. Note that the various queries that were documented in the [configuration file documentation above](#configuration-file) in `"queryLocation"` properties, appear here as `"queryString"` variants, with inline contents rather than references to query files (`*.rq`). Leave as is or convert to query files as you like. @@ -351,9 +365,22 @@ Follow these steps to get started: 3. **Update the `"queryGroupId"` property** in all these queries, to separate them from the custom queries. Ensure the group exists in the `"queryGroups"` array, or create a new group if you prefer. 4. **Update the `"id"` property**, to avoid conflicts with remaining custom queries: the id must be unique and it also defines the position in the query group. 5. **Adapt any other properties** according to your preferences. -6. **Save `main/src/config.json`**, rerun or rebuild and refresh your browser to test. +6. **Save `main/configs//config.json`**, rerun or rebuild and refresh your browser to test. + +## For developers + +### Adding your own configuration + +The easiest way to add your own configuration is: + +1. Get inspired by the configuration in `main/configs/demo`. +2. Choose your ``: a string obeying regex `[a-z0-9-]+`; directory `main/configs/` should not yet be in use. +3. Add your own queries in the `main/configs//public/queries` directory and in general, your own resources in the `main/configs//public` directory. +4. Write your own `main/configs//config.json` file, following the [configuration file documentation above](#configuration-file). +5. Run or build as documented above for the `demo` configuration, of course now using ``. +6. Consider a pull request to add your configuration to this repo. -## Testing +### Testing For testing with the provided configuration file, we use [Cypress](https://www.cypress.io/). @@ -363,7 +390,7 @@ The development version might be tested repeatedly during development. Both the production version and the development version are tested from a non-empty path in the base URL. -### Testing the production version +#### Testing the production version 1. Build the production version of the Web application and serve it: @@ -374,6 +401,8 @@ Both the production version and the development version are tested from a non-em rm -rf node_modules/ rm -rf dist/ npm install + # select the test configuration + node scripts/select-config.cjs test # build npm run build ``` @@ -400,7 +429,7 @@ Both the production version and the development version are tested from a non-em npm run test:interactive ``` -### Testing the development version +#### Testing the development version The procedure is the same as for testing the production version, except for step 1, which is now: diff --git a/main/configs/demo/config.json b/main/configs/demo/config.json new file mode 100644 index 00000000..4911f722 --- /dev/null +++ b/main/configs/demo/config.json @@ -0,0 +1,382 @@ +{ + "title": "Generic Data Viewer", + "logoLocation": "images/IDLab-logo.png", + "logoRedirectURL": "https://idlab.technology/", + "mainAppColor": "lightgray", + "backgroundColor": "#fff", + "titleColor": "black", + "textColor": "#1976D2", + "queryFolder": "queries", + "httpProxy": "http://localhost:8000/", + "showMilliseconds": false, + "defaultIDP": "http://localhost:8080", + "footer": "

IDLab - imec - UGent

", + "introductionText": "Please log in as the appropriate actor and make your choice in the menu on the left.", + "queryGroups": [ + { + "id": "gr-xmpl", + "name": "Example queries" + }, + { + "id": "gr-gnrc", + "name": "Generic queries", + "icon": "InfoIcon" + } + ], + "queries": [ + { + "id": "1000", + "queryGroupId": "gr-xmpl", + "queryLocation": "idols.rq", + "name": "My idols", + "description": "Demonstrates a simple query, using a proxy.", + "comunicaContext": { + "sources": [ + "http://localhost:8001/example/idols" + ], + "useProxy": true + } + }, + { + "id": "1010", + "queryGroupId": "gr-xmpl", + "queryLocation": "images_test.rq", + "name": "Some images", + "description": "Demonstrates how to show images in a query result.", + "icon": "PhotoIcon", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/cute-cats" + ] + } + }, + { + "id": "1020", + "queryGroupId": "gr-xmpl", + "queryLocation": "ask_picasso.rq", + "name": "Is there an artist influenced by Picasso?", + "description": "Demonstrates an ASK query.", + "icon": "BrushIcon", + "comunicaContext": { + "sources": [ + "https://fragments.dbpedia.org/2016-04/en" + ] + }, + "askQuery": { + "trueText": "There is an artist who is inspired by Picasso!", + "falseText": "There is no artist who is inspired by Picasso." + } + }, + { + "id": "1030", + "queryGroupId": "gr-xmpl", + "queryLocation": "construct_picasso.rq", + "name": "A graph of artists influenced by Picasso", + "description": "Demonstrates a CONSTRUCT query.", + "icon": "BrushIcon", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/artists" + ] + } + }, + { + "id": "1040", + "queryGroupId": "gr-xmpl", + "queryLocation": "average.rq", + "name": "Average value", + "description": "Demonstrates a query calculating some average.", + "icon": "FunctionsIcon", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/values" + ] + } + }, + { + "id": "1050", + "queryGroupId": "gr-xmpl", + "queryLocation": "books.rq", + "name": "A secret list of my favorite books", + "description": "Demonstrates a query whose source requires authentication.", + "icon": "MenuBookIcon", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/favourite-books" + ] + } + }, + { + "id": "1060", + "queryGroupId": "gr-xmpl", + "queryLocation": "books.rq", + "name": "A public list of books I'd love to own", + "description": "Demonstrates a query whose source does not require authentication.", + "icon": "MenuBookIcon", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/wish-list" + ] + } + }, + { + "id": "1070", + "queryGroupId": "gr-xmpl", + "queryLocation": "musicians.rq", + "name": "A query about musicians", + "description": "Demonstrates what happens if one of the sources is not available (fetch failure).", + "icon": "MusicNoteIcon", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/favourite-musicians", + "http://www.example.com/fetch-failure-but-query-success" + ], + "lenient": true + } + }, + { + "id": "1080", + "queryGroupId": "gr-xmpl", + "queryLocation": "musicians_variables.rq", + "name": "A templated query about musicians", + "description": "Demonstrates the usage of templated queries.", + "icon": "MusicNoteIcon", + "variables": { + "genre": [ + "\"Romantic\"", + "\"Baroque\"", + "\"Classical\"" + ] + }, + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/favourite-musicians" + ] + } + }, + { + "id": "1090", + "queryGroupId": "gr-xmpl", + "queryLocation": "musicians_variables.rq", + "name": "A templated query about musicians (indirect variables)", + "description": "Demonstrates the usage of templated queries, here with indirectly loaded variable values.", + "icon": "MusicNoteIcon", + "indirectVariables": { + "queryLocations": [ + "variableQueries/musicians_genre_variable.rq" + ] + }, + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/favourite-musicians" + ] + } + }, + { + "id": "1100", + "queryGroupId": "gr-xmpl", + "queryLocation": "musicians_variables2.rq", + "name": "A templated query about musicians (two variables)", + "description": "Demonstrates the usage of templated queries, here with two variables.", + "icon": "MusicNoteIcon", + "variables": { + "genre": [ + "\"Romantic\"", + "\"Baroque\"", + "\"Classical\"" + ], + "sameAsUrl": [ + "", + "", + "", + "" + ] + }, + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/favourite-musicians" + ] + } + }, + { + "id": "1110", + "queryGroupId": "gr-xmpl", + "queryLocation": "components.rq", + "name": "Source verification", + "description": "Demonstrates source verification. Query components from three kinds of sources: a non-verifiable source, a successfully verifiable source, and a verifiable source with an incorrect proof.", + "comunicaContext": { + "sources": [ + "http://localhost:8080/verifiable-example/components-vc", + "http://localhost:8080/verifiable-example/components-vc-incorrect-proof", + "http://localhost:8080/example/components" + ] + } + }, + { + "id": "1120", + "queryGroupId": "gr-xmpl", + "queryLocation": "components_materials.rq", + "name": "Sources from an index file", + "description": "Query components (including details about materials) with the sources obtained from index files.", + "sourcesIndex": { + "url": "http://localhost:8080/example/index-example-texon-only-lt", + "queryLocation": "/sourceQueries/index_example_common_lt.rq" + } + }, + { + "id": "2000", + "queryGroupId": "gr-gnrc", + "queryLocation": "example_count_spo.rq", + "name": "Count", + "description": "Gives the count of triples in the indicated datasources.", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + }, + { + "id": "2010", + "queryGroupId": "gr-gnrc", + "queryLocation": "example_spo.rq", + "name": "Triples", + "description": "Gives at most 50 triples in the indicated datasources.", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + }, + { + "id": "2020", + "queryGroupId": "gr-gnrc", + "queryLocation": "variableQueries/example_s.rq", + "name": "Subjects", + "description": "Gives at most 50 subjects in the indicated datasources.", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + }, + { + "id": "2030", + "queryGroupId": "gr-gnrc", + "queryLocation": "variableQueries/example_p.rq", + "name": "Predicates", + "description": "Gives at most 50 predicates in the indicated datasources.", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + }, + { + "id": "2040", + "queryGroupId": "gr-gnrc", + "queryLocation": "variableQueries/example_o.rq", + "name": "Objects", + "description": "Gives at most 50 objects in the indicated datasources.", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + }, + { + "id": "2050", + "queryGroupId": "gr-gnrc", + "queryLocation": "example_sxpo.rq", + "name": "Triples with subject", + "description": "Gives at most 50 triples with a given subject in the indicated datasources.", + "indirectVariables": { + "queryLocations": [ + "variableQueries/example_s.rq" + ] + }, + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + }, + { + "id": "2060", + "queryGroupId": "gr-gnrc", + "queryLocation": "example_spxo.rq", + "name": "Triples with predicate", + "description": "Gives at most 50 triples with a given predicate in the indicated datasources.", + "indirectVariables": { + "queryLocations": [ + "variableQueries/example_p.rq" + ] + }, + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + }, + { + "id": "2070", + "queryGroupId": "gr-gnrc", + "queryLocation": "example_spox.rq", + "name": "Triples with object", + "description": "Gives at most 50 triples with a given object in the indicated datasources.", + "indirectVariables": { + "queryLocations": [ + "variableQueries/example_o.rq" + ] + }, + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + }, + { + "id": "2080", + "queryGroupId": "gr-gnrc", + "queryLocation": "example_terms_of_type.rq", + "name": "Terms of type", + "description": "Gives at most 50 terms of a given rdf:type in the indicated datasources.", + "indirectVariables": { + "queryLocations": [ + "variableQueries/example_types.rq" + ] + }, + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/components", + "http://localhost:8080/example/boms", + "http://localhost:8080/example/materials" + ], + "lenient": true + } + } + ] +} \ No newline at end of file diff --git a/main/public/images/IDLab-logo.png b/main/configs/demo/public/images/IDLab-logo.png similarity index 100% rename from main/public/images/IDLab-logo.png rename to main/configs/demo/public/images/IDLab-logo.png diff --git a/main/public/queries/ask_picasso.rq b/main/configs/demo/public/queries/ask_picasso.rq similarity index 100% rename from main/public/queries/ask_picasso.rq rename to main/configs/demo/public/queries/ask_picasso.rq diff --git a/main/public/queries/average.rq b/main/configs/demo/public/queries/average.rq similarity index 100% rename from main/public/queries/average.rq rename to main/configs/demo/public/queries/average.rq diff --git a/main/public/queries/books.rq b/main/configs/demo/public/queries/books.rq similarity index 100% rename from main/public/queries/books.rq rename to main/configs/demo/public/queries/books.rq diff --git a/main/public/queries/components.rq b/main/configs/demo/public/queries/components.rq similarity index 100% rename from main/public/queries/components.rq rename to main/configs/demo/public/queries/components.rq diff --git a/main/public/queries/components_materials.rq b/main/configs/demo/public/queries/components_materials.rq similarity index 100% rename from main/public/queries/components_materials.rq rename to main/configs/demo/public/queries/components_materials.rq diff --git a/main/public/queries/construct_picasso.rq b/main/configs/demo/public/queries/construct_picasso.rq similarity index 100% rename from main/public/queries/construct_picasso.rq rename to main/configs/demo/public/queries/construct_picasso.rq diff --git a/main/public/queries/example_count_spo.rq b/main/configs/demo/public/queries/example_count_spo.rq similarity index 100% rename from main/public/queries/example_count_spo.rq rename to main/configs/demo/public/queries/example_count_spo.rq diff --git a/main/public/queries/example_spo.rq b/main/configs/demo/public/queries/example_spo.rq similarity index 100% rename from main/public/queries/example_spo.rq rename to main/configs/demo/public/queries/example_spo.rq diff --git a/main/public/queries/example_spox.rq b/main/configs/demo/public/queries/example_spox.rq similarity index 100% rename from main/public/queries/example_spox.rq rename to main/configs/demo/public/queries/example_spox.rq diff --git a/main/public/queries/example_spxo.rq b/main/configs/demo/public/queries/example_spxo.rq similarity index 100% rename from main/public/queries/example_spxo.rq rename to main/configs/demo/public/queries/example_spxo.rq diff --git a/main/public/queries/example_sxpo.rq b/main/configs/demo/public/queries/example_sxpo.rq similarity index 100% rename from main/public/queries/example_sxpo.rq rename to main/configs/demo/public/queries/example_sxpo.rq diff --git a/main/public/queries/example_terms_of_type.rq b/main/configs/demo/public/queries/example_terms_of_type.rq similarity index 100% rename from main/public/queries/example_terms_of_type.rq rename to main/configs/demo/public/queries/example_terms_of_type.rq diff --git a/main/public/queries/idols.rq b/main/configs/demo/public/queries/idols.rq similarity index 100% rename from main/public/queries/idols.rq rename to main/configs/demo/public/queries/idols.rq diff --git a/main/public/queries/images_test.rq b/main/configs/demo/public/queries/images_test.rq similarity index 100% rename from main/public/queries/images_test.rq rename to main/configs/demo/public/queries/images_test.rq diff --git a/main/public/queries/musicians.rq b/main/configs/demo/public/queries/musicians.rq similarity index 100% rename from main/public/queries/musicians.rq rename to main/configs/demo/public/queries/musicians.rq diff --git a/main/public/queries/musicians_variables.rq b/main/configs/demo/public/queries/musicians_variables.rq similarity index 100% rename from main/public/queries/musicians_variables.rq rename to main/configs/demo/public/queries/musicians_variables.rq diff --git a/main/public/queries/musicians_variables2.rq b/main/configs/demo/public/queries/musicians_variables2.rq similarity index 100% rename from main/public/queries/musicians_variables2.rq rename to main/configs/demo/public/queries/musicians_variables2.rq diff --git a/main/public/queries/sourceQueries/index_example_common_lt.rq b/main/configs/demo/public/queries/sourceQueries/index_example_common_lt.rq similarity index 100% rename from main/public/queries/sourceQueries/index_example_common_lt.rq rename to main/configs/demo/public/queries/sourceQueries/index_example_common_lt.rq diff --git a/main/public/queries/variableQueries/example_o.rq b/main/configs/demo/public/queries/variableQueries/example_o.rq similarity index 100% rename from main/public/queries/variableQueries/example_o.rq rename to main/configs/demo/public/queries/variableQueries/example_o.rq diff --git a/main/public/queries/variableQueries/example_p.rq b/main/configs/demo/public/queries/variableQueries/example_p.rq similarity index 100% rename from main/public/queries/variableQueries/example_p.rq rename to main/configs/demo/public/queries/variableQueries/example_p.rq diff --git a/main/public/queries/variableQueries/example_s.rq b/main/configs/demo/public/queries/variableQueries/example_s.rq similarity index 100% rename from main/public/queries/variableQueries/example_s.rq rename to main/configs/demo/public/queries/variableQueries/example_s.rq diff --git a/main/public/queries/variableQueries/example_types.rq b/main/configs/demo/public/queries/variableQueries/example_types.rq similarity index 100% rename from main/public/queries/variableQueries/example_types.rq rename to main/configs/demo/public/queries/variableQueries/example_types.rq diff --git a/main/public/queries/variableQueries/musicians_genre_variable.rq b/main/configs/demo/public/queries/variableQueries/musicians_genre_variable.rq similarity index 100% rename from main/public/queries/variableQueries/musicians_genre_variable.rq rename to main/configs/demo/public/queries/variableQueries/musicians_genre_variable.rq diff --git a/main/configs/onto-deside/config.json b/main/configs/onto-deside/config.json new file mode 100644 index 00000000..ace1ff6f --- /dev/null +++ b/main/configs/onto-deside/config.json @@ -0,0 +1,731 @@ +{ + "title": "Query the Open Circularity Platform", + "logoLocation": "images/IDLab-logo.png", + "logoRedirectURL": "https://idlab.technology/", + "mainAppColor": "lightgray", + "backgroundColor": "#fff", + "titleColor": "black", + "textColor": "#1976D2", + "queryFolder": "queries", + "showMilliseconds": false, + "defaultIDP": "https://onto-deside.ilabt.imec.be/css11/", + "footer": "

IDLab - imec - UGent

", + "introductionText": "Please log in as the appropriate actor and select a query from the menu on the left.", + "queryGroups": [ + { + "id": "gqx", + "name": "Generic query examples", + "icon": "InfoIcon" + }, + { + "id": "constr", + "name": "Construction use case", + "icon": "ConstructionIcon" + }, + { + "id": "txtl", + "name": "Textile use case", + "icon": "CheckroomIcon" + }, + { + "id": "txtlext", + "name": "Extended textile use case", + "icon": "CheckroomIcon" + }, + { + "id": "evaluation-construction", + "name": "Evaluation June 2024 - Construction", + "icon": "ConstructionIcon" + }, + { + "id": "evaluation-electronics", + "name": "Evaluation June 2024 - Electronics", + "icon": "ElectricBoltIcon" + }, + { + "id": "evaluation-textile", + "name": "Evaluation June 2024 - Textile", + "icon": "CheckroomIcon" + } + ], + "queries": [ + { + "id": "101", + "queryGroupId": "constr", + "queryLocation": "c-lindner-group-products.rq", + "name": "Query Lindner Group's products", + "comunicaContext": { + "sources": ["https://onto-deside.ilabt.imec.be/css1/lindner-group/data/dt/out/products.ttl"], + "lenient": true + } + }, + { + "id": "102", + "queryGroupId": "constr", + "queryLocation": "c-lindner-group-products-details.rq", + "name": "Query Lindner Group's products details", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css1/lindner-group/data/dt/out/products.ttl", + "https://onto-deside.ilabt.imec.be/css1/lindner-group/data/dt/out/materials.ttl", + "https://onto-deside.ilabt.imec.be/css1/lindner-group/data/dt/out/boms.ttl" + ], + "lenient": true + } + }, + { + "id": "103", + "queryGroupId": "constr", + "queryLocation": "c-materials-of-product.rq", + "name": "What are the materials of a given product?", + "variables": { + "product": [ + "", + "", + "", + "", + "" + ] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css1/lindner-group/data/dt/out/products.ttl", + "https://onto-deside.ilabt.imec.be/css1/lindner-group/data/dt/out/materials.ttl", + "https://onto-deside.ilabt.imec.be/css1/lindner-group/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css2/building-owner/data/dt/out/buildings.ttl", + "https://onto-deside.ilabt.imec.be/css3/building-owner2/data/dt/out/buildings.ttl" + ], + "lenient": true + } + }, + { + "id": "104", + "queryGroupId": "constr", + "queryLocation": "c-tiles-of-buildings.rq", + "name": "Which tiles are present in buildings?", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css2/building-owner/data/dt/out/buildings.ttl", + "https://onto-deside.ilabt.imec.be/css3/building-owner2/data/dt/out/buildings.ttl" + ], + "lenient": true + } + }, + { + "id": "105", + "queryGroupId": "constr", + "queryLocation": "c-tiles-of-building.rq", + "name": "What are the tiles of a given building?", + "variables": { + "building": [ + "", + "" + ] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css2/building-owner/data/dt/out/buildings.ttl", + "https://onto-deside.ilabt.imec.be/css3/building-owner2/data/dt/out/buildings.ttl" + ], + "lenient": true + } + }, + { + "id": "106", + "queryGroupId": "constr", + "queryLocation": "c-tiles-of-building-with-address.rq", + "name": "What are the tiles of a building with a given address?", + "variables": { + "address": ["\"88 Fairview Street Mount Laurel, NJ 08054\""] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css2/building-owner/data/dt/out/buildings.ttl", + "https://onto-deside.ilabt.imec.be/css3/building-owner2/data/dt/out/buildings.ttl" + ], + "lenient": true + } + }, + { + "id": "107", + "queryGroupId": "constr", + "queryLocation": "c-ragn-sells-services.rq", + "name": "Which services does Ragn-Sells provide?", + "comunicaContext": { + "sources": ["https://onto-deside.ilabt.imec.be/css4/ragn-sells/data/dt/out/services.ttl"], + "lenient": true + } + }, + { + "id": "108", + "queryGroupId": "constr", + "queryLocation": "c-ragn-sells-wastestreams.rq", + "name": "Which waste streams does Ragn-Sells accept?", + "comunicaContext": { + "sources": ["https://onto-deside.ilabt.imec.be/css4/ragn-sells/data/dt/out/services.ttl"], + "lenient": true + } + }, + { + "id": "201", + "queryGroupId": "txtl", + "queryLocation": "tx1-texon-components.rq", + "name": "Query Texon's components", + "comunicaContext": { + "sources": ["https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl"], + "lenient": true + } + }, + { + "id": "202", + "queryGroupId": "txtl", + "queryLocation": "tx1-texon-component-materials.rq", + "name": "Query Texon's components and their materials", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "203", + "queryGroupId": "txtl", + "queryLocation": "tx1-texon-average-recycled-content-of-components.rq", + "name": "What is the average recycled content (weight percentage) of Texon's components?", + "comunicaContext": { + "sources": ["https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl"], + "lenient": true + } + }, + { + "id": "204", + "queryGroupId": "txtl", + "queryLocation": "tx1-manufacturer-products.rq", + "name": "Query Manufacturer's products", + "comunicaContext": { + "sources": ["https://onto-deside.ilabt.imec.be/css6/manufacturer/data/dt/out/products.ttl"], + "lenient": true + } + }, + { + "id": "205", + "queryGroupId": "txtl", + "queryLocation": "tx1-manufacturer-product-components.rq", + "name": "Query Manufacturer's products and their components", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css6/manufacturer/data/dt/out/products.ttl", + "https://onto-deside.ilabt.imec.be/css6/manufacturer/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl" + ], + "lenient": true + } + }, + { + "id": "206", + "queryGroupId": "txtl", + "queryLocation": "tx1-manufacturer-average-recycled-content-of-products.rq", + "name": "What is the average recycled content (weight percentage) of Manufacturer's products?", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css6/manufacturer/data/dt/out/products.ttl", + "https://onto-deside.ilabt.imec.be/css6/manufacturer/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl" + ], + "lenient": true + } + }, + { + "id": "207", + "queryGroupId": "txtl", + "queryLocation": "tx1-brand-recycled-content-of-product.rq", + "name": "What is the recycled content (weight percentage) of a given product?", + "variables": { + "product": [ + "", + "" + ] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css6/manufacturer/data/dt/out/products.ttl", + "https://onto-deside.ilabt.imec.be/css6/manufacturer/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl" + ], + "lenient": true + } + }, + { + "id": "301", + "queryGroupId": "txtlext", + "queryLocation": "tx2-products.rq", + "name": "Products", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_1", + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_2", + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_3" + ], + "lenient": true + } + }, + { + "id": "302", + "queryGroupId": "txtlext", + "queryLocation": "tx2-product-datasheet-variables.rq", + "name": "Product datasheets", + "variables": { + "product": [ + "", + "", + "", + "" + ] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_1", + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_2", + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_3" + ], + "lenient": true + } + }, + { + "id": "303", + "queryGroupId": "txtlext", + "queryLocation": "tx2-water-property.rq", + "name": "Water properties", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_1", + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_2", + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_3" + ], + "lenient": true + } + }, + { + "id": "304", + "queryGroupId": "txtlext", + "queryLocation": "tx2-design-for-reuse.rq", + "name": "Design for reuse", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_1", + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_2", + "https://onto-deside.ilabt.imec.be/css5/texon/ceon/manuf1_3" + ], + "lenient": true + } + }, + { + "id": "420", + "queryGroupId": "evaluation-electronics", + "queryLocation": "electronics_products.rq", + "name": "Overview", + "description": "All products with the data points selected for this evaluation", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/electronics_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "421", + "queryGroupId": "evaluation-electronics", + "queryLocation": "electronics_resilience.rq", + "name": "Resilience of the supply chain of a product", + "description": "How resilient is the supply chain of a product, based on the origin of the materials?", + "indirectVariables": { + "queryLocations": ["variableQueries/electronics_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/electronics_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "422", + "queryGroupId": "evaluation-electronics", + "queryLocation": "electronics_REACH.rq", + "name": "REACH compliance of product components", + "description": "Is my product REACH compliant?", + "indirectVariables": { + "queryLocations": ["variableQueries/electronics_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/electronics_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "423", + "queryGroupId": "evaluation-electronics", + "queryLocation": "electronics_rare_earth.rq", + "name": "Rare Earth content on product components", + "description": "Does my product contain rare earth materials?", + "indirectVariables": { + "queryLocations": ["variableQueries/electronics_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/electronics_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "424", + "queryGroupId": "evaluation-electronics", + "queryLocation": "electronics_recycled.rq", + "name": "Recycled content of product components", + "description": "Does my product contain recycled materials?", + "indirectVariables": { + "queryLocations": ["variableQueries/electronics_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/electronics_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "426", + "queryGroupId": "evaluation-electronics", + "queryLocation": "spo.rq", + "name": "All accessible data", + "description": "All data accessible for the logged in user", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/electronics_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "427", + "queryGroupId": "evaluation-electronics", + "queryLocation": "sourceQueries/seeAlso.rq", + "name": "Sources in electronics network", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/electronics_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "430", + "queryGroupId": "evaluation-textile", + "queryLocation": "spo.rq", + "name": "All accessible data", + "description": "All data accessible for the logged in user", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/textile_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "431", + "queryGroupId": "evaluation-textile", + "queryLocation": "textile_products.rq", + "name": "Product overview", + "description": "Selected data per product", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/textile_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "432", + "queryGroupId": "evaluation-textile", + "queryLocation": "textile_product_composition.rq", + "name": "Product components data", + "description": "Selected data of the components of product", + "indirectVariables": { + "queryLocations": ["variableQueries/textile_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/textile_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "433", + "queryGroupId": "evaluation-textile", + "queryLocation": "textile_matter_composition.rq", + "name": "Product matter composition", + "description": "Matter composition of a product", + "indirectVariables": { + "queryLocations": ["variableQueries/textile_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/textile_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "434", + "queryGroupId": "evaluation-textile", + "queryLocation": "textile_disassembly.rq", + "name": "Product disassembly", + "description": "Disassembly method of a product and the original input products", + "indirectVariables": { + "queryLocations": ["variableQueries/textile_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/textile_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "436", + "queryGroupId": "evaluation-textile", + "queryLocation": "sourceQueries/seeAlso.rq", + "name": "Sources in textile network", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/textile_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "440", + "queryGroupId": "evaluation-construction", + "queryLocation": "spo.rq", + "name": "All accessible data", + "description": "All data accessible for the logged in user", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/construction_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "441", + "queryGroupId": "evaluation-construction", + "queryLocation": "construction_products.rq", + "name": "Products", + "description": "Products with selected details", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/construction_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "442", + "queryGroupId": "evaluation-construction", + "queryLocation": "construction_product_composition.rq", + "name": "Product components data", + "description": "Selected data of the components of a product", + "indirectVariables": { + "queryLocations": ["variableQueries/construction_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/construction_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "443", + "queryGroupId": "evaluation-construction", + "queryLocation": "construction_matter_composition.rq", + "name": "Product matter composition", + "description": "Matter composition of a product", + "indirectVariables": { + "queryLocations": ["variableQueries/construction_product_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/construction_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "444", + "queryGroupId": "evaluation-construction", + "queryLocation": "construction_buildings.rq", + "name": "Buildings", + "description": "Overview of buildings", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/construction_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "445", + "queryGroupId": "evaluation-construction", + "queryLocation": "construction_end_of_life.rq", + "name": "End of life scenarios", + "description": "End of life scenarios for products in buildings", + "indirectVariables": { + "queryLocations": ["variableQueries/construction_building_labels.rq"] + }, + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/construction_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "446", + "queryGroupId": "evaluation-construction", + "queryLocation": "construction_marketplace.rq", + "name": "Marketplace", + "description": "Batches for sale in the Marketplace", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/construction_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "447", + "queryGroupId": "evaluation-construction", + "queryLocation": "sourceQueries/seeAlso.rq", + "name": "Sources in construction network", + "sourcesIndex": { + "url": "https://onto-deside.ilabt.imec.be/css11/construction_user9/ceon/index", + "queryLocation": "sourceQueries/seeAlso.rq" + } + }, + { + "id": "10000", + "queryGroupId": "gqx", + "queryLocation": "example_count_spo.rq", + "name": "Count", + "description": "Gives the count of triples in the indicated datasources - login as texon to explore", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "10001", + "queryGroupId": "gqx", + "queryLocation": "example_spo.rq", + "name": "Triples", + "description": "Gives at most 50 triples in the indicated datasources - login as texon to explore", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "10002", + "queryGroupId": "gqx", + "queryLocation": "variableQueries/example_s.rq", + "name": "Subjects", + "description": "Gives at most 50 subjects in the indicated datasources - login as texon to explore", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "10003", + "queryGroupId": "gqx", + "queryLocation": "variableQueries/example_p.rq", + "name": "Predicates", + "description": "Gives at most 50 predicates in the indicated datasources - login as texon to explore", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "10004", + "queryGroupId": "gqx", + "queryLocation": "variableQueries/example_o.rq", + "name": "Objects", + "description": "Gives at most 50 objects in the indicated datasources - login as texon to explore", + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "10005", + "queryGroupId": "gqx", + "queryLocation": "example_sxpo.rq", + "name": "Triples with subject", + "description": "Gives at most 50 triples with a given subject in the indicated datasources - login as texon to explore", + "indirectVariables": { + "queryLocations": ["variableQueries/example_s.rq"] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "10006", + "queryGroupId": "gqx", + "queryLocation": "example_spxo.rq", + "name": "Triples with predicate", + "description": "Gives at most 50 triples with a given predicate in the indicated datasources - login as texon to explore", + "indirectVariables": { + "queryLocations": ["variableQueries/example_p.rq"] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "10007", + "queryGroupId": "gqx", + "queryLocation": "example_spox.rq", + "name": "Triples with object", + "description": "Gives at most 50 triples with a given object in the indicated datasources - login as texon to explore", + "indirectVariables": { + "queryLocations": ["variableQueries/example_o.rq"] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + }, + { + "id": "10008", + "queryGroupId": "gqx", + "queryLocation": "example_terms_of_type.rq", + "name": "Terms of type", + "description": "Gives at most 50 terms of a given rdf:type in the indicated datasources - login as texon to explore", + "indirectVariables": { + "queryLocations": ["variableQueries/example_types.rq"] + }, + "comunicaContext": { + "sources": [ + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/components.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/boms.ttl", + "https://onto-deside.ilabt.imec.be/css5/texon/data/dt/out/materials.ttl" + ], + "lenient": true + } + } + ] +} diff --git a/main/configs/onto-deside/public/images/IDLab-logo.png b/main/configs/onto-deside/public/images/IDLab-logo.png new file mode 100644 index 00000000..bc830196 Binary files /dev/null and b/main/configs/onto-deside/public/images/IDLab-logo.png differ diff --git a/main/configs/onto-deside/public/queries/c-lindner-group-products-details.rq b/main/configs/onto-deside/public/queries/c-lindner-group-products-details.rq new file mode 100644 index 00000000..b6127218 --- /dev/null +++ b/main/configs/onto-deside/public/queries/c-lindner-group-products-details.rq @@ -0,0 +1,22 @@ +# Query Lindner Group's products details + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT ?product ?bom ?materialName ?quantity +WHERE { + ?product + a o:Product ; + o:has-bom ?bom ; + . + ?bom + o:has-bom-material-assoc [ + o:quantity ?quantity; + o:has-material [ o:name ?materialName ; ]; + ]; + . +} diff --git a/main/configs/onto-deside/public/queries/c-lindner-group-products.rq b/main/configs/onto-deside/public/queries/c-lindner-group-products.rq new file mode 100644 index 00000000..0b004ef1 --- /dev/null +++ b/main/configs/onto-deside/public/queries/c-lindner-group-products.rq @@ -0,0 +1,16 @@ +# Query Lindner Group's products + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT * +WHERE { + ?product + a o:Product ; + o:prod-date ?productionDate ; + . +} diff --git a/main/configs/onto-deside/public/queries/c-materials-of-product.rq b/main/configs/onto-deside/public/queries/c-materials-of-product.rq new file mode 100644 index 00000000..eb2cda75 --- /dev/null +++ b/main/configs/onto-deside/public/queries/c-materials-of-product.rq @@ -0,0 +1,16 @@ +# What are the materials of a given product? + +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT ?material ?name +WHERE { + $product o:has-bom ?bom . + ?bom o:has-bom-material-assoc ?assoc . + ?assoc o:has-material ?material . + OPTIONAL { + ?material o:name ?name + } +} diff --git a/main/configs/onto-deside/public/queries/c-ragn-sells-services.rq b/main/configs/onto-deside/public/queries/c-ragn-sells-services.rq new file mode 100644 index 00000000..c7302e4d --- /dev/null +++ b/main/configs/onto-deside/public/queries/c-ragn-sells-services.rq @@ -0,0 +1,13 @@ +# Which services does Ragn-Sells provide? + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT * +WHERE { + ?service a o:Service . +} diff --git a/main/configs/onto-deside/public/queries/c-ragn-sells-wastestreams.rq b/main/configs/onto-deside/public/queries/c-ragn-sells-wastestreams.rq new file mode 100644 index 00000000..ce0b2c84 --- /dev/null +++ b/main/configs/onto-deside/public/queries/c-ragn-sells-wastestreams.rq @@ -0,0 +1,16 @@ +# Which waste streams does Ragn-Sells accept? + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT * +WHERE { + ?service + a o:Service ; + o:accepts ?wasteStream ; + . +} diff --git a/main/configs/onto-deside/public/queries/c-tiles-of-building-with-address.rq b/main/configs/onto-deside/public/queries/c-tiles-of-building-with-address.rq new file mode 100644 index 00000000..5ca75650 --- /dev/null +++ b/main/configs/onto-deside/public/queries/c-tiles-of-building-with-address.rq @@ -0,0 +1,17 @@ +# What are the tiles of a building with a given address? + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT + ?tile +WHERE { + ?b a o:Building ; + o:address $address; + o:has-floor-tile ?tile . +} +ORDER BY ?tile diff --git a/main/configs/onto-deside/public/queries/c-tiles-of-building.rq b/main/configs/onto-deside/public/queries/c-tiles-of-building.rq new file mode 100644 index 00000000..15967dc2 --- /dev/null +++ b/main/configs/onto-deside/public/queries/c-tiles-of-building.rq @@ -0,0 +1,15 @@ +# What are the tiles of a given building? + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT + ?tile +WHERE { + $building o:has-floor-tile ?tile . +} +ORDER BY ?tile diff --git a/main/configs/onto-deside/public/queries/c-tiles-of-buildings.rq b/main/configs/onto-deside/public/queries/c-tiles-of-buildings.rq new file mode 100644 index 00000000..cc4ef3b9 --- /dev/null +++ b/main/configs/onto-deside/public/queries/c-tiles-of-buildings.rq @@ -0,0 +1,18 @@ +# Which tiles are present in buildings? + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT + ?tile +WHERE { + ?b + a o:Building; + o:has-floor-tile ?tile + . +} +ORDER BY ?tile diff --git a/main/configs/onto-deside/public/queries/construction_buildings.rq b/main/configs/onto-deside/public/queries/construction_buildings.rq new file mode 100644 index 00000000..3b3e0c67 --- /dev/null +++ b/main/configs/onto-deside/public/queries/construction_buildings.rq @@ -0,0 +1,29 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: +PREFIX qudt-unit: +PREFIX ceon-quantity: +PREFIX ceon-actor: +PREFIX qudt-quantitykind: +PREFIX construction: +PREFIX geo: +PREFIX bot: + +SELECT DISTINCT ?BuildingLabel ?Latitude ?Longitude ?ConstructionYear +WHERE { + ?Building a bot:Building; + rdfs:label ?BuildingLabel. + OPTIONAL {?Building geo:lat ?Latitude } + OPTIONAL {?Building geo:long ?Longitude } + OPTIONAL {?Buidling construction:constructionYear ?ConstructionYear } +} diff --git a/main/configs/onto-deside/public/queries/construction_end_of_life.rq b/main/configs/onto-deside/public/queries/construction_end_of_life.rq new file mode 100644 index 00000000..00b2a5d8 --- /dev/null +++ b/main/configs/onto-deside/public/queries/construction_end_of_life.rq @@ -0,0 +1,81 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: +PREFIX qudt-unit: +PREFIX ceon-quantity: +PREFIX ceon-actor: +PREFIX qudt-quantitykind: +PREFIX construction: +PREFIX geo: +PREFIX bot: + +SELECT DISTINCT ?ElementLabel ?ParentElementLabel ?SpaceLabel ?StoreyLabel ?AreaM2 ?InstallationDate ?ReusePotential ?DismantlingInstruction_url ?C2CMHSilverCertificate_url ?TakeBackProgramFromOriginalManufacturer + ?DismantlerLabel ?DismantlingCostEuro ?TransporterLabel ?TransportCostEuro ?RecyclerLabel ?RecyclingCostEuro +WHERE { + ?Building a bot:Building; + rdfs:label $BuildingLabel. + OPTIONAL { + ?Building bot:hasStorey ?Storey . + ?Storey rdfs:label ?StoreyLabel . + OPTIONAL{ + ?Storey bot:hasSpace ?Space . + ?Space rdfs:label ?SpaceLabel . + OPTIONAL { + ?Space bot:containsElement ?Element. + ?Element rdfs:label ?ElementLabel. + ?Element ceon-product:modelledBy ?ProductModelId . + ?ProductModelId rdfs:label ?ProductModelLabel. + OPTIONAL { ?ProductModelId construction:hasTakeBackProgramFromOriginalManufacturer ?TakeBackProgramFromOriginalManufacturer } + OPTIONAL { ?ProductModelId ex:hasReusePotential ?ReusePotential } + OPTIONAL { ?ProductModelId construction:hasDismantlingInstruction ?DismantlingInstruction_url } + OPTIONAL { + ?ProductModelId construction:hasCompliance ?Compliance. + ?Compliance ceon-product:Compliance construction:C2C_MH_Silver ; + ceon-product:hasCertificate ?C2CMHSilverCertificate_url . + } + ?Installation construction:hasInstallationDate ?InstallationDate; + construction:hasDimension ?AreaDimension ; + ceon-actorODP:participatingResource ?Element ; + construction:installationLocation ?Space . + ?AreaDimension a qudt-quantitykind:Area; + qudt:numericValue ?AreaM2 + OPTIONAL { + ?ParentElement ceon-product:hasProductComponent ?Element; + rdfs:label ?ParentElementLabel. + } + OPTIONAL { + ?DismantlingProcess ceon-actorODP:participatingResource ?Element . + ?DismantlingProcess ceon-actorODP:participatingActor ?Dismantler . + ?DismantlingProcess ceon-quantity:hasDismantlingCost ?DismantlingCost . + ?DismantlingCost qudt:numericValue ?DismantlingCostEuro . + ?Dismantler rdfs:label ?DismantlerLabel. + } + OPTIONAL { + ?TransportProcess ceon-actorODP:participatingResource ?Element . + ?TransportProcess ceon-actorODP:participatingActor ?Transporter . + ?TransportProcess ceon-quantity:hasTransportCost ?TransportCost . + ?TransportCost qudt:numericValue ?TransportCostEuro . + ?Transporter rdfs:label ?TransporterLabel. + } + OPTIONAL { + ?RecyclingProcess ceon-actorODP:participatingResource ?Element . + ?RecyclingProcess ceon-actorODP:participatingActor ?Recycler . + ?RecyclingProcess ceon-quantity:hasRecyclingCost ?RecyclingCost . + ?RecyclingCost qudt:numericValue ?RecyclingCostEuro . + ?Recycler rdfs:label ?RecyclerLabel. + } + } + } + } +} + diff --git a/main/configs/onto-deside/public/queries/construction_marketplace.rq b/main/configs/onto-deside/public/queries/construction_marketplace.rq new file mode 100644 index 00000000..d439800b --- /dev/null +++ b/main/configs/onto-deside/public/queries/construction_marketplace.rq @@ -0,0 +1,59 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: +PREFIX qudt-unit: +PREFIX ceon-quantity: +PREFIX ceon-actor: +PREFIX qudt-quantitykind: +PREFIX construction: +PREFIX geo: +PREFIX bot: + +SELECT DISTINCT ?BatchLabel ?BatchSize ?Condition ?ProductModelLabel ?C2CMHSilverCertificate_url ?OwnerLabel +?Thickness ?Length ?Width ?SellingPriceEuro +WHERE { + ?Batch rdfs:label ?BatchLabel. + ?Batch ceon-product:modelledBy ?ProductModelId . + ?ProductModelId rdfs:label ?ProductModelLabel. + ?Batch ceon-resourceODP:batchSize ?BatchSize. + ?Batch construction:hasCondition ?Condition_url. + BIND (REPLACE(STR(?Condition_url), "^.*/([^/]*)$", "$1") as ?Condition) + OPTIONAL { + ?ProductModelId construction:hasCompliance ?Compliance. + ?Compliance ceon-product:Compliance construction:C2C_MH_Silver ; + ceon-product:hasCertificate ?C2CMHSilverCertificate_url . + } + OPTIONAL { + ?Batch construction:dimension ?LengthDimension. + ?LengthDimension a qudt-quantitykind:Length; + qudt:numericValue ?Length. + } + OPTIONAL { + ?Batch construction:dimension ?WidthDimension. + ?WidthDimension a qudt-quantitykind:Width; + qudt:numericValue ?Width. + } + OPTIONAL { + ?Batch construction:hasThickness ?ThicknessDimension. + ?ThicknessDimension qudt:numericValue ?Thickness. + } + OPTIONAL { + ?Batch ceon-quantity:hasMarketValue ?MarketValue. + ?MarketValue qudt:numericValue ?SellingPriceEuro. + } + ?OwningResource a ceon-actor:OwningResource ; + ceon-actorODP:participantRole ceon-actor:owner ; + ceon-actorODP:participatingActor ?Owner ; + ceon-actorODP:participatingResource ?Batch. + ?Owner rdfs:label ?OwnerLabel . +} diff --git a/main/configs/onto-deside/public/queries/construction_matter_composition.rq b/main/configs/onto-deside/public/queries/construction_matter_composition.rq new file mode 100644 index 00000000..f8b3dc6b --- /dev/null +++ b/main/configs/onto-deside/public/queries/construction_matter_composition.rq @@ -0,0 +1,28 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: +PREFIX qudt-unit: +PREFIX ceon-quantity: +PREFIX ceon-actor: +PREFIX qudt-quantitykind: +PREFIX construction: + +SELECT DISTINCT ?Matter +WHERE { + ?Product rdfs:label $ProductLabel . + ?Composition a ceon-product:MatterComposition; + ceon-product:compositionOf ?Product; + ceon-product:associatedWithMatter ?Matter_url; + # qudt:numericValue ?MassFraction. + BIND (REPLACE(STR(?Matter_url), "^.*/([^/]*)$", "$1") as ?Matter) +} diff --git a/main/configs/onto-deside/public/queries/construction_product_composition.rq b/main/configs/onto-deside/public/queries/construction_product_composition.rq new file mode 100644 index 00000000..064c45af --- /dev/null +++ b/main/configs/onto-deside/public/queries/construction_product_composition.rq @@ -0,0 +1,28 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: +PREFIX qudt-unit: +PREFIX ceon-quantity: +PREFIX ceon-actor: +PREFIX qudt-quantitykind: +PREFIX construction: + +SELECT DISTINCT ?ComponentLabel ?MassFraction +WHERE { + ?Product rdfs:label $ProductLabel . + ?Composition a ceon-product:ProductComposition; + ceon-product:compositionOf ?Product; + ceon-product:associatedWithProductModel ?Component. + ?Component rdfs:label ?ComponentLabel. + OPTIONAL { ?Composition qudt:numericValue ?MassFraction } +} diff --git a/main/configs/onto-deside/public/queries/construction_products.rq b/main/configs/onto-deside/public/queries/construction_products.rq new file mode 100644 index 00000000..060d9ee5 --- /dev/null +++ b/main/configs/onto-deside/public/queries/construction_products.rq @@ -0,0 +1,54 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: +PREFIX qudt-unit: +PREFIX ceon-quantity: +PREFIX ceon-actor: +PREFIX qudt-quantitykind: +PREFIX construction: + +SELECT DISTINCT ?ProductLabel ?ProductQuality ?TakeBackProgramFromOriginalManufacturer ?ReusePotential ?Accessories +?DimensionalDeviationEN12825 ?SystemWeightMax ?SystemWeightMin ?DismantlingInstruction_url ?C2CMHSilverCertificate_url +WHERE { + ?Product a ceon-product:Product ; + rdfs:label ?ProductLabel . + OPTIONAL { ?Product construction:hasProductDescription ?ProductDescription } + OPTIONAL { + ?Product construction:hasProductQuality ?ProductQuality_url. + BIND (REPLACE(STR(?ProductQuality_url), "^.*/([^/]*)$", "$1") as ?ProductQuality) + } + OPTIONAL { + ?Product construction:hasDimensionalDeviation ?DimensionalDeviation. + ?DimensionalDeviation ceon-quantity:hasObjectValue ?DimensionalDeviationEN12825_url. + BIND (REPLACE(STR(?DimensionalDeviationEN12825_url), "^.*/([^/]*)$", "$1") as ?DimensionalDeviationEN12825) + } + OPTIONAL { + ?Product construction:hasSystemWeight ?SystemWeight . + ?SystemWeight ceon-quantity:numericalMaxValue ?SystemWeightMax; + ceon-quantity:numericalMinValue ?SystemWeightMin. + } + OPTIONAL { + ?Product construction:hasThickness ?thickness. + + } + OPTIONAL { ?Product construction:hasResistanceToEarth ?ResistanceToEarth } + OPTIONAL { ?Product construction:hasTakeBackProgramFromOriginalManufacturer ?TakeBackProgramFromOriginalManufacturer } + OPTIONAL { ?Product ex:hasReusePotential ?ReusePotential } + OPTIONAL { ?Product construction:hasAccessories ?Accessories } + OPTIONAL { ?Product construction:hasDismantlingInstruction ?DismantlingInstruction_url } + OPTIONAL { + ?Product construction:hasCompliance ?Compliance. + ?Compliance ceon-product:Compliance construction:C2C_MH_Silver ; + ceon-product:hasCertificate ?C2CMHSilverCertificate_url . + } + } diff --git a/main/configs/onto-deside/public/queries/electronics_REACH.rq b/main/configs/onto-deside/public/queries/electronics_REACH.rq new file mode 100644 index 00000000..af82e432 --- /dev/null +++ b/main/configs/onto-deside/public/queries/electronics_REACH.rq @@ -0,0 +1,21 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX elec: +PREFIX ns1: +PREFIX ns2: +PREFIX ns3: +PREFIX ns4: +PREFIX ns5: + +SELECT DISTINCT ?ComponentLabel ?REACHCertificate_url +WHERE { + ?product rdfs:label $ProductLabel ; + ns5:hasProductComponent ?component . + ?component rdfs:label ?ComponentLabel . + OPTIONAL { + ?s_reach ns4:statementAbout ?component; + ns5:complianceWith elec:REACH; + ns5:hasCertificate ?REACHCertificate_url. + } +} diff --git a/main/configs/onto-deside/public/queries/electronics_products.rq b/main/configs/onto-deside/public/queries/electronics_products.rq new file mode 100644 index 00000000..8ea92dc4 --- /dev/null +++ b/main/configs/onto-deside/public/queries/electronics_products.rq @@ -0,0 +1,55 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX elec: +PREFIX ns1: +PREFIX ns2: +PREFIX ns3: +PREFIX ns4: +PREFIX ns5: + +SELECT DISTINCT ?product ?ProductLabel ?SiteCountry ?REACHCertificate_url (BOUND(?RareEarthMaterial) as ?containsRareEarthMaterial) ?NeodymiumPercentage ?DysprosiumPercentage +?PreConsumerRecycledMaterialPercentage ?PostConsumerRecycledMaterialPercentage +WHERE { + ?product a elec:ElectronicsProduct ; + rdfs:label ?ProductLabel ; + OPTIONAL { + ?s1 ns1:participantRole ; + ns1:participatingActor ?company ; + ns1:participatingResource ?product . + ?company elec:siteCountry ?SiteCountry. + } + OPTIONAL { + ?s_reach ns4:statementAbout ?product; + ns5:complianceWith elec:REACH; + ns5:hasCertificate ?REACHCertificate_url. + } + OPTIONAL { + ?product ns3:hasMatter elec:RareEarthMaterial. + BIND(elec:RareEarthMaterial AS ?RareEarthMaterial). + } + OPTIONAL { + ?s2 ns5:associatedWithMatter ex:Nd; + ns2:hasUnit ; + ns2:numericValue ?NeodymiumPercentage; + ns5:compositionOf ?product. + } + OPTIONAL { + ?s3 ns5:associatedWithMatter ex:Dy; + ns2:hasUnit ; + ns2:numericValue ?DysprosiumPercentage; + ns5:compositionOf ?product. + } + OPTIONAL { + ?s4 a elec:PreCustomerRecycledContent ; + ns2:hasUnit ; + ns2:numericValue ?PreConsumerRecycledMaterialPercentage; + ns4:statementAbout ?product . + } + OPTIONAL { + ?s4 a elec:PostCustomerRecycledContent ; + ns2:hasUnit ; + ns2:numericValue ?PostConsumerRecycledMaterialPercentage; + ns4:statementAbout ?product . + } +} diff --git a/main/configs/onto-deside/public/queries/electronics_rare_earth.rq b/main/configs/onto-deside/public/queries/electronics_rare_earth.rq new file mode 100644 index 00000000..74c3e7f8 --- /dev/null +++ b/main/configs/onto-deside/public/queries/electronics_rare_earth.rq @@ -0,0 +1,37 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX elec: +PREFIX ns1: +PREFIX ns2: +PREFIX ns3: +PREFIX ns4: +PREFIX ns5: + +SELECT DISTINCT ?ComponentLabel (BOUND(?RareEarthMaterial) AS ?containsRareEarthMaterial) ?NeodymiumPercentage ?DysprosiumPercentage +WHERE { + ?product rdfs:label $ProductLabel ; + ns5:hasProductComponent ?component . + ?component rdfs:label ?ComponentLabel . + OPTIONAL { + ?s1 ns1:participantRole ; + ns1:participatingActor ?company ; + ns1:participatingResource ?component . + OPTIONAL { + ?component ns3:hasMatter elec:RareEarthMaterial. + BIND ( elec:RareEarthMaterial AS ?RareEarthMaterial). + } + OPTIONAL { + ?s2 ns5:associatedWithMatter ex:Nd; + ns2:hasUnit ; + ns2:numericValue ?NeodymiumPercentage; + ns5:compositionOf ?component. + } + OPTIONAL { + ?s3 ns5:associatedWithMatter ex:Dy; + ns2:hasUnit ; + ns2:numericValue ?DysprosiumPercentage; + ns5:compositionOf ?component. + } + } +} diff --git a/main/configs/onto-deside/public/queries/electronics_recycled.rq b/main/configs/onto-deside/public/queries/electronics_recycled.rq new file mode 100644 index 00000000..018a077a --- /dev/null +++ b/main/configs/onto-deside/public/queries/electronics_recycled.rq @@ -0,0 +1,33 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX elec: +PREFIX ns1: +PREFIX ns2: +PREFIX ns3: +PREFIX ns4: +PREFIX ns5: + +SELECT DISTINCT ?ComponentLabel ?PreConsumerRecycledMaterialPercentage ?PostConsumerRecycledMaterialPercentage +WHERE { + ?product rdfs:label $ProductLabel ; + ns5:hasProductComponent ?component . + ?component rdfs:label ?ComponentLabel . + OPTIONAL { + ?s1 ns1:participantRole ; + ns1:participatingActor ?company ; + ns1:participatingResource ?component . + OPTIONAL { + ?s4 a elec:PreCustomerRecycledContent ; + ns2:hasUnit ; + ns2:numericValue ?PreConsumerRecycledMaterialPercentage; + ns4:statementAbout ?component . + } + OPTIONAL { + ?s4 a elec:PostCustomerRecycledContent ; + ns2:hasUnit ; + ns2:numericValue ?PostConsumerRecycledMaterialPercentage; + ns4:statementAbout ?component . + } + } +} diff --git a/main/configs/onto-deside/public/queries/electronics_resilience.rq b/main/configs/onto-deside/public/queries/electronics_resilience.rq new file mode 100644 index 00000000..39391137 --- /dev/null +++ b/main/configs/onto-deside/public/queries/electronics_resilience.rq @@ -0,0 +1,22 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX elec: +PREFIX ns1: +PREFIX ns2: +PREFIX ns3: +PREFIX ns4: +PREFIX ns5: + +SELECT DISTINCT ?ComponentLabel ?siteCountry +WHERE { + ?product rdfs:label $ProductLabel ; + ns5:hasProductComponent ?component . + ?component rdfs:label ?ComponentLabel . + OPTIONAL { + ?s1 ns1:participantRole ; + ns1:participatingActor ?company ; + ns1:participatingResource ?component . + ?company elec:siteCountry ?siteCountry. + } +} diff --git a/main/configs/onto-deside/public/queries/example_count_spo.rq b/main/configs/onto-deside/public/queries/example_count_spo.rq new file mode 100644 index 00000000..f5de10a8 --- /dev/null +++ b/main/configs/onto-deside/public/queries/example_count_spo.rq @@ -0,0 +1,3 @@ +SELECT (COUNT (*) AS ?count) WHERE { + ?subject ?predicate ?object +} diff --git a/main/configs/onto-deside/public/queries/example_spo.rq b/main/configs/onto-deside/public/queries/example_spo.rq new file mode 100644 index 00000000..103678ea --- /dev/null +++ b/main/configs/onto-deside/public/queries/example_spo.rq @@ -0,0 +1,5 @@ +SELECT DISTINCT ?subject ?predicate ?object WHERE { + ?subject ?predicate ?object +} +ORDER BY ?subject ?predicate ?object +LIMIT 50 diff --git a/main/configs/onto-deside/public/queries/example_spox.rq b/main/configs/onto-deside/public/queries/example_spox.rq new file mode 100644 index 00000000..8eed0cc7 --- /dev/null +++ b/main/configs/onto-deside/public/queries/example_spox.rq @@ -0,0 +1,6 @@ +SELECT DISTINCT ?subject ?predicate ?object WHERE { + ?subject ?predicate ?object + FILTER(?object = $object) +} +ORDER BY ?subject ?predicate +LIMIT 50 \ No newline at end of file diff --git a/main/configs/onto-deside/public/queries/example_spxo.rq b/main/configs/onto-deside/public/queries/example_spxo.rq new file mode 100644 index 00000000..88bae375 --- /dev/null +++ b/main/configs/onto-deside/public/queries/example_spxo.rq @@ -0,0 +1,6 @@ +SELECT DISTINCT ?subject ?predicate ?object WHERE { + ?subject ?predicate ?object + FILTER(?predicate = $predicate) +} +ORDER BY ?subject ?object +LIMIT 50 \ No newline at end of file diff --git a/main/configs/onto-deside/public/queries/example_sxpo.rq b/main/configs/onto-deside/public/queries/example_sxpo.rq new file mode 100644 index 00000000..8f7127e1 --- /dev/null +++ b/main/configs/onto-deside/public/queries/example_sxpo.rq @@ -0,0 +1,6 @@ +SELECT DISTINCT ?subject ?predicate ?object WHERE { + ?subject ?predicate ?object + FILTER(?subject = $subject) +} +ORDER BY ?predicate ?object +LIMIT 50 \ No newline at end of file diff --git a/main/configs/onto-deside/public/queries/example_terms_of_type.rq b/main/configs/onto-deside/public/queries/example_terms_of_type.rq new file mode 100644 index 00000000..df4341f7 --- /dev/null +++ b/main/configs/onto-deside/public/queries/example_terms_of_type.rq @@ -0,0 +1,5 @@ +SELECT DISTINCT ?term WHERE { + ?term a $type +} +ORDER BY ?term +LIMIT 50 diff --git a/main/public/queries/gspo.rq b/main/configs/onto-deside/public/queries/gspo.rq similarity index 100% rename from main/public/queries/gspo.rq rename to main/configs/onto-deside/public/queries/gspo.rq diff --git a/main/configs/onto-deside/public/queries/sourceQueries/seeAlso.rq b/main/configs/onto-deside/public/queries/sourceQueries/seeAlso.rq new file mode 100644 index 00000000..6271696a --- /dev/null +++ b/main/configs/onto-deside/public/queries/sourceQueries/seeAlso.rq @@ -0,0 +1,6 @@ +PREFIX rdfs: + +SELECT ?object +WHERE { + ?s rdfs:seeAlso ?object . +} diff --git a/main/configs/onto-deside/public/queries/spo.rq b/main/configs/onto-deside/public/queries/spo.rq new file mode 100644 index 00000000..45434ac9 --- /dev/null +++ b/main/configs/onto-deside/public/queries/spo.rq @@ -0,0 +1,3 @@ +SELECT DISTINCT ?s ?p ?o WHERE { + ?s ?p ?o +} diff --git a/main/configs/onto-deside/public/queries/textile_disassembly.rq b/main/configs/onto-deside/public/queries/textile_disassembly.rq new file mode 100644 index 00000000..fc784126 --- /dev/null +++ b/main/configs/onto-deside/public/queries/textile_disassembly.rq @@ -0,0 +1,25 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: + +SELECT DISTINCT ?DisassemblyMethod_url ?OriginalInputProductLabel (BOUND(?DisassemblyMethod2_url) AS ?hasDisassemblyMethod) +WHERE { + ?Product rdfs:label $ProductLabel. + ?AssemblingProcess ceon-processODP:hasOutput ?Product. + OPTIONAL { ?AssemblingProcess ex:hasReverseProcessType ?DisassemblyMethod_url } + OPTIONAL { ?AssemblingProcess ceon-processODP:hasInput ?OriginalInputProduct. + OPTIONAL { ?OriginalInputProduct rdfs:label ?OriginalInputProductLabel } + OPTIONAL { ?AssemblingProcess2 ceon-processODP:hasOutput ?OriginalInputProduct; + ex:hasReverseProcessType ?DisassemblyMethod2_url } + } +} diff --git a/main/configs/onto-deside/public/queries/textile_matter_composition.rq b/main/configs/onto-deside/public/queries/textile_matter_composition.rq new file mode 100644 index 00000000..febf7311 --- /dev/null +++ b/main/configs/onto-deside/public/queries/textile_matter_composition.rq @@ -0,0 +1,23 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: + +SELECT DISTINCT ?Matter ?MassFraction +WHERE { + ?Product rdfs:label $ProductLabel . + ?Product rdfs:label ?ProductLabel . + ?Composition a ceon-product:MatterComposition; + ceon-product:compositionOf ?Product; + ceon-product:associatedWithMatter ?Matter_url; + qudt:numericValue ?MassFraction. + BIND (REPLACE(STR(?Matter_url), "^.*/([^/]*)$", "$1") as ?Matter) +} diff --git a/main/configs/onto-deside/public/queries/textile_product_composition.rq b/main/configs/onto-deside/public/queries/textile_product_composition.rq new file mode 100644 index 00000000..d4b1cd75 --- /dev/null +++ b/main/configs/onto-deside/public/queries/textile_product_composition.rq @@ -0,0 +1,55 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: + +SELECT DISTINCT ?ComponentLabel ?MassFraction ?Origin ?Color ?DyeMethod ?DyeStuff ?FinishingStep ?WaterProperty ?ChemicalCompliance +?IncludesTrims ?ContainsMetal ?ProductDesignForRecycling ?REACHCertificate_url ?MSDSCertificate_url ?BiodegradabilityTest_url +WHERE { + ?Product rdfs:label $ProductLabel . + ?Composition a ceon-product:ProductComposition; + ceon-product:compositionOf ?Product; + qudt:numericValue ?MassFraction; + ceon-product:associatedWithProductModel ?Component. + ?Component rdfs:label ?ComponentLabel. + OPTIONAL {?Component textile:hasOrigin ?Origin} + OPTIONAL {?Component textile:hasColor ?Color_url} + BIND (REPLACE(STR(?Color_url), "^.*/([^/]*)$", "$1") as ?Color) + OPTIONAL {?Component textile:hasDyeMethod ?DyeMethod_url} + BIND (REPLACE(STR(?DyeMethod_url), "^.*/([^/]*)$", "$1") as ?DyeMethod) + OPTIONAL {?Component textile:hasDyeStuff ?DyeStuff_url} + BIND (REPLACE(STR(?DyeStuff_url), "^.*/([^/]*)$", "$1") as ?DyeStuff) + OPTIONAL {?Component textile:hasFinishingStep ?FinishingStep_url} + BIND (REPLACE(STR(?FinishingStep_url), "^.*/([^/]*)$", "$1") as ?FinishingStep) + OPTIONAL {?Component textile:hasWaterProperty ?WaterProperty_url} + BIND (REPLACE(STR(?WaterProperty_url), "^.*/([^/]*)$", "$1") as ?WaterProperty) + OPTIONAL {?Component textile:chemicalCompliance ?ChemicalCompliance} + OPTIONAL {?Component textile:includesTrims ?IncludesTrims} + OPTIONAL {?Component textile:containsMetal ?ContainsMetal} + OPTIONAL {?Component textile:textileProductDesignForRecycling ?ProductDesignForRecycling_url} + BIND (REPLACE(STR(?ProductDesignForRecycling_url), "^.*/([^/]*)$", "$1") as ?ProductDesignForRecycling) + OPTIONAL { + ?s_reach ceon-provenance:statementAbout ?Component; + ceon-product:complianceWith textile:REACH; + ceon-product:hasCertificate ?REACHCertificate_url. + } + OPTIONAL { + ?s_msds ceon-provenance:statementAbout ?Component; + ceon-product:complianceWith textile:MSDS; + ceon-product:hasCertificate ?MSDSCertificate_url. + } + OPTIONAL { + ?s_msds ceon-provenance:statementAbout ?Component; + textile:biodegradabilityTestAvailable "true"^^xsd:boolean; + ceon-product:hasCertificate ?BiodegradabilityTest_url. + } +} diff --git a/main/configs/onto-deside/public/queries/textile_products.rq b/main/configs/onto-deside/public/queries/textile_products.rq new file mode 100644 index 00000000..2c1939d0 --- /dev/null +++ b/main/configs/onto-deside/public/queries/textile_products.rq @@ -0,0 +1,57 @@ +PREFIX schema: +PREFIX rdfs: +PREFIX ex: +PREFIX qudt: +PREFIX ceon-actorODP: +PREFIX ceon-resourceODP: +PREFIX ceon-product: +PREFIX ceon-provenance: +PREFIX ceon-material: +PREFIX ceon-processODP: +PREFIX ceon-process: +PREFIX textile: +PREFIX xsd: + +SELECT DISTINCT ?ProductLabel ?Type ?Origin ?Color ?DyeMethod ?DyeStuff ?FinishingStep + ?WaterProperty ?ChemicalCompliance ?IncludesTrims ?ContainsMetal ?ProductDesignForRecycling + ?REACHCertificate_url ?MSDSCertificate_url ?BiodegradabilityTest_url +WHERE { + ?Product a textile:TextileProduct ; + rdfs:label ?ProductLabel ; + OPTIONAL {?Product textile:hasType ?Type} + +OPTIONAL {?Product textile:hasOrigin ?Origin} + OPTIONAL {?Product textile:hasColor ?Color_url} + BIND (REPLACE(STR(?Color_url), "^.*/([^/]*)$", "$1") as ?Color) + OPTIONAL {?Product textile:hasDyeMethod ?DyeMethod_url} + BIND (REPLACE(STR(?DyeMethod_url), "^.*/([^/]*)$", "$1") as ?DyeMethod) + OPTIONAL {?Product textile:hasDyeStuff ?DyeStuff_url} + BIND (REPLACE(STR(?DyeStuff_url), "^.*/([^/]*)$", "$1") as ?DyeStuff) + OPTIONAL {?Product textile:hasFinishingStep ?FinishingStep_url} + BIND (REPLACE(STR(?FinishingStep_url), "^.*/([^/]*)$", "$1") as ?FinishingStep) + OPTIONAL {?Product textile:hasWaterProperty ?WaterProperty_url} + BIND (REPLACE(STR(?WaterProperty_url), "^.*/([^/]*)$", "$1") as ?WaterProperty) + OPTIONAL {?Product textile:chemicalCompliance ?ChemicalCompliance} + OPTIONAL {?Product textile:includesTrims ?IncludesTrims} + OPTIONAL {?Product textile:containsMetal ?ContainsMetal} + OPTIONAL {?Product textile:textileProductDesignForRecycling ?ProductDesignForRecycling_url} + BIND (REPLACE(STR(?ProductDesignForRecycling_url), "^.*/([^/]*)$", "$1") as ?ProductDesignForRecycling) + OPTIONAL { + ?s_reach ceon-provenance:statementAbout ?Product; + ceon-product:complianceWith textile:REACH; + ceon-product:hasCertificate ?REACHCertificate_url. + } + OPTIONAL { + ?s_msds ceon-provenance:statementAbout ?Product; + ceon-product:complianceWith textile:MSDS; + ceon-product:hasCertificate ?MSDSCertificate_url. + } + OPTIONAL { + ?s_msds ceon-provenance:statementAbout ?Product; + textile:biodegradabilityTestAvailable "true"^^xsd:boolean; + ceon-product:hasCertificate ?BiodegradabilityTest_url. + } + + + +} diff --git a/main/configs/onto-deside/public/queries/tx1-brand-recycled-content-of-product.rq b/main/configs/onto-deside/public/queries/tx1-brand-recycled-content-of-product.rq new file mode 100644 index 00000000..4ccebc34 --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx1-brand-recycled-content-of-product.rq @@ -0,0 +1,28 @@ +# What is the recycled content (weight percentage) of product p01? + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT ?product ?productName (SUM(?partialRecycledContentPercentage) as ?productRecycledContentPercentage) +WHERE { + VALUES ?product { + $product + } + ?product + a o:Product; + o:name ?productName; + o:has-product-bom [ + o:has-product-component-assoc [ + o:percentage ?percentage ; + o:has-component [ + o:recycled-content-percentage ?recycledContentPercentage ; + ]; + ]; + ]; + BIND (?percentage * ?recycledContentPercentage / 100 AS ?partialRecycledContentPercentage) +} +GROUP BY ?product ?productName diff --git a/main/configs/onto-deside/public/queries/tx1-manufacturer-average-recycled-content-of-products.rq b/main/configs/onto-deside/public/queries/tx1-manufacturer-average-recycled-content-of-products.rq new file mode 100644 index 00000000..976bc22c --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx1-manufacturer-average-recycled-content-of-products.rq @@ -0,0 +1,28 @@ +# What is the average recycled content (weight percentage) of Manufacturer's products? + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT (AVG(?productRecycledContentPercentage) as ?averageProductRecycledContentPercentage) +WHERE +{ + SELECT (SUM(?partialRecycledContentPercentage) as ?productRecycledContentPercentage) + WHERE { + ?product + a o:Product; + o:has-product-bom [ + o:has-product-component-assoc [ + o:percentage ?percentage ; + o:has-component [ + o:recycled-content-percentage ?recycledContentPercentage ; + ]; + ]; + ]; + BIND (?percentage * ?recycledContentPercentage / 100 AS ?partialRecycledContentPercentage) + } + GROUP BY ?product +} diff --git a/main/configs/onto-deside/public/queries/tx1-manufacturer-product-components.rq b/main/configs/onto-deside/public/queries/tx1-manufacturer-product-components.rq new file mode 100644 index 00000000..e803a2bf --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx1-manufacturer-product-components.rq @@ -0,0 +1,26 @@ +# Query Manufacturer's products and their components + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT ?product ?productName ?component ?componentName ?percentage ?recycledContentPercentage +WHERE { + ?product + a o:Product ; + o:name ?productName; + o:has-product-bom [ + o:has-product-component-assoc [ + o:percentage ?percentage ; + o:has-component ?component ; + ]; + ]; + . + ?component + o:name ?componentName ; + o:recycled-content-percentage ?recycledContentPercentage ; +} +ORDER BY ?productName diff --git a/main/configs/onto-deside/public/queries/tx1-manufacturer-products.rq b/main/configs/onto-deside/public/queries/tx1-manufacturer-products.rq new file mode 100644 index 00000000..724a4ad8 --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx1-manufacturer-products.rq @@ -0,0 +1,17 @@ +# Query Manufacturer's products + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT ?product ?productName +WHERE { + ?product + a o:Product ; + o:name ?productName ; + . +} +ORDER BY ?productName diff --git a/main/configs/onto-deside/public/queries/tx1-texon-average-recycled-content-of-components.rq b/main/configs/onto-deside/public/queries/tx1-texon-average-recycled-content-of-components.rq new file mode 100644 index 00000000..2dc225ae --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx1-texon-average-recycled-content-of-components.rq @@ -0,0 +1,15 @@ +# What is the average recycled content (weight percentage) of Texon's components? + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT (AVG(?recycledContentPercentage) as ?averageComponentRecycledContentPercentage) +WHERE { + ?component + a o:Component; + o:recycled-content-percentage ?recycledContentPercentage ; +} diff --git a/main/configs/onto-deside/public/queries/tx1-texon-component-materials.rq b/main/configs/onto-deside/public/queries/tx1-texon-component-materials.rq new file mode 100644 index 00000000..e1600cbb --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx1-texon-component-materials.rq @@ -0,0 +1,24 @@ +# Query Texon's components and their materials + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT ?component ?componentName ?material ?materialName ?percentage +WHERE { + ?component + a o:Component ; + o:name ?componentName ; + o:has-component-bom [ + o:has-component-material-assoc [ + o:percentage ?percentage ; + o:has-material ?material ; + ]; + ]; + . + ?material o:name ?materialName ; +} +ORDER BY ?componentName diff --git a/main/configs/onto-deside/public/queries/tx1-texon-components.rq b/main/configs/onto-deside/public/queries/tx1-texon-components.rq new file mode 100644 index 00000000..895fa07f --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx1-texon-components.rq @@ -0,0 +1,18 @@ +# Query Texon's components + +PREFIX oo: +PREFIX ao: +PREFIX rdf: +PREFIX rdfs: +PREFIX d: +PREFIX o: + +SELECT ?component ?componentName ?recycledContentPercentage +WHERE { + ?component + a o:Component ; + o:name ?componentName ; + o:recycled-content-percentage ?recycledContentPercentage ; + . +} +ORDER BY ?componentName diff --git a/main/configs/onto-deside/public/queries/tx2-design-for-reuse.rq b/main/configs/onto-deside/public/queries/tx2-design-for-reuse.rq new file mode 100644 index 00000000..0fe4a6f7 --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx2-design-for-reuse.rq @@ -0,0 +1,15 @@ +PREFIX textile: +PREFIX voc: + +SELECT DISTINCT ?Product_url ?Property_url ?Value WHERE { + VALUES ?Property_url { + textile:designedForReuseWMinimalMod + textile:CEmark + textile:designedForRefurbishment + textile:designedForRemanufacturing + } + ?ProductDataSheet_url a textile:TextileDataSheet; + ?Product_url; + ?Property_url ?Value. +} +ORDER BY ASC(str(?Product_url)) diff --git a/main/configs/onto-deside/public/queries/tx2-product-datasheet-variables.rq b/main/configs/onto-deside/public/queries/tx2-product-datasheet-variables.rq new file mode 100644 index 00000000..3c9f965a --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx2-product-datasheet-variables.rq @@ -0,0 +1,9 @@ +PREFIX textile: +PREFIX voc: + +SELECT ?ProductDataSheet_url ?Property_url ?Value WHERE { + ?ProductDataSheet_url a textile:TextileDataSheet; + $product; + ?Property_url ?Value . +} +ORDER BY DESC(str(?Property_url)) diff --git a/main/configs/onto-deside/public/queries/tx2-products.rq b/main/configs/onto-deside/public/queries/tx2-products.rq new file mode 100644 index 00000000..23c64dc4 --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx2-products.rq @@ -0,0 +1,8 @@ +PREFIX textile: +PREFIX voc: + +SELECT ?product_url ?name ?brand WHERE { + ?product_url a textile:TextileProduct . + ?product_url voc:1100 ?name . + ?product_url voc:1101 ?brand . +} diff --git a/main/configs/onto-deside/public/queries/tx2-water-property.rq b/main/configs/onto-deside/public/queries/tx2-water-property.rq new file mode 100644 index 00000000..ba40803d --- /dev/null +++ b/main/configs/onto-deside/public/queries/tx2-water-property.rq @@ -0,0 +1,8 @@ +PREFIX textile: +PREFIX voc: + +SELECT ?Product_url ?WaterProperty_url WHERE { + ?ProductDataSheet a textile:TextileDataSheet; + ?Product_url; + textile:hasWaterProperty ?WaterProperty_url . +} diff --git a/main/configs/onto-deside/public/queries/variableQueries/construction_building_labels.rq b/main/configs/onto-deside/public/queries/variableQueries/construction_building_labels.rq new file mode 100644 index 00000000..8520b514 --- /dev/null +++ b/main/configs/onto-deside/public/queries/variableQueries/construction_building_labels.rq @@ -0,0 +1,9 @@ +PREFIX rdfs: +PREFIX bot: + +SELECT DISTINCT ?BuildingLabel +WHERE { + ?Building a bot:Building ; + rdfs:label ?BuildingLabel +} +ORDER BY ?BuildingLabel diff --git a/main/configs/onto-deside/public/queries/variableQueries/construction_product_labels.rq b/main/configs/onto-deside/public/queries/variableQueries/construction_product_labels.rq new file mode 100644 index 00000000..4b9bfd5d --- /dev/null +++ b/main/configs/onto-deside/public/queries/variableQueries/construction_product_labels.rq @@ -0,0 +1,9 @@ +PREFIX rdfs: +PREFIX ceon-product: + +SELECT DISTINCT ?ProductLabel +WHERE { + ?Product a ceon-product:Product ; + rdfs:label ?ProductLabel +} +ORDER BY ?ProductLabel diff --git a/main/configs/onto-deside/public/queries/variableQueries/electronics_product_labels.rq b/main/configs/onto-deside/public/queries/variableQueries/electronics_product_labels.rq new file mode 100644 index 00000000..c4f659f3 --- /dev/null +++ b/main/configs/onto-deside/public/queries/variableQueries/electronics_product_labels.rq @@ -0,0 +1,9 @@ +PREFIX rdfs: +PREFIX elec: + +SELECT DISTINCT ?ProductLabel +WHERE { + ?Product a elec:ElectronicsProduct ; + rdfs:label ?ProductLabel +} +ORDER BY ?ProductLabel diff --git a/main/configs/onto-deside/public/queries/variableQueries/example_o.rq b/main/configs/onto-deside/public/queries/variableQueries/example_o.rq new file mode 100644 index 00000000..5f9d2e6c --- /dev/null +++ b/main/configs/onto-deside/public/queries/variableQueries/example_o.rq @@ -0,0 +1,5 @@ +SELECT DISTINCT ?object WHERE { + ?subject ?predicate ?object +} +ORDER BY ?object +LIMIT 50 \ No newline at end of file diff --git a/main/configs/onto-deside/public/queries/variableQueries/example_p.rq b/main/configs/onto-deside/public/queries/variableQueries/example_p.rq new file mode 100644 index 00000000..54a4fa4e --- /dev/null +++ b/main/configs/onto-deside/public/queries/variableQueries/example_p.rq @@ -0,0 +1,5 @@ +SELECT DISTINCT ?predicate WHERE { + ?subject ?predicate ?object +} +ORDER BY ?predicate +LIMIT 50 \ No newline at end of file diff --git a/main/configs/onto-deside/public/queries/variableQueries/example_s.rq b/main/configs/onto-deside/public/queries/variableQueries/example_s.rq new file mode 100644 index 00000000..93f80ceb --- /dev/null +++ b/main/configs/onto-deside/public/queries/variableQueries/example_s.rq @@ -0,0 +1,5 @@ +SELECT DISTINCT ?subject WHERE { + ?subject ?predicate ?object +} +ORDER BY ?subject +LIMIT 50 \ No newline at end of file diff --git a/main/configs/onto-deside/public/queries/variableQueries/example_types.rq b/main/configs/onto-deside/public/queries/variableQueries/example_types.rq new file mode 100644 index 00000000..477ab65d --- /dev/null +++ b/main/configs/onto-deside/public/queries/variableQueries/example_types.rq @@ -0,0 +1,5 @@ +SELECT DISTINCT ?type WHERE { + ?term a ?type +} +ORDER BY ?type +LIMIT 50 diff --git a/main/configs/onto-deside/public/queries/variableQueries/textile_product_labels.rq b/main/configs/onto-deside/public/queries/variableQueries/textile_product_labels.rq new file mode 100644 index 00000000..2bb268a5 --- /dev/null +++ b/main/configs/onto-deside/public/queries/variableQueries/textile_product_labels.rq @@ -0,0 +1,9 @@ +PREFIX rdfs: +PREFIX textile: + +SELECT DISTINCT ?ProductLabel +WHERE { + ?Product a textile:TextileProduct ; + rdfs:label ?ProductLabel +} +ORDER BY ?ProductLabel diff --git a/main/configs/oslo-kg/config.json b/main/configs/oslo-kg/config.json new file mode 100644 index 00000000..0cf3f0b3 --- /dev/null +++ b/main/configs/oslo-kg/config.json @@ -0,0 +1,88 @@ +{ + "title": "Search the OSLO vocabularia and application profiles", + "logoLocation": "images/IDLab-logo.png", + "logoRedirectURL": "https://idlab.technology/", + "mainAppColor": "lightgray", + "backgroundColor": "#fff", + "titleColor": "black", + "textColor": "#1976D2", + "queryFolder": "queries", + "showMilliseconds": false, + "defaultIDP": "", + "footer": "

IDLab - imec - UGent

", + "introductionText": "Please select a query from the menu on the left.", + "queries": [ + { + "id": "100", + "queryLocation": "get-all-used-classes.rq", + "name": "All used classes", + "comunicaContext": { + "sources": [ + "https://raw.githubusercontent.com/KNowledgeOnWebScale/data-vlaanderen-bundled-rdf/refs/heads/main/bundle.ttl" + ] + } + }, + { + "id": "101", + "queryLocation": "get-all-used-properties.rq", + "name": "All used properties", + "comunicaContext": { + "sources": [ + "https://raw.githubusercontent.com/KNowledgeOnWebScale/data-vlaanderen-bundled-rdf/refs/heads/main/bundle.ttl" + ] + } + }, + { + "id": "102", + "queryLocation": "outgoing-triples-per-superclass.rq", + "name": "Outgoing triples per (super)class", + "comunicaContext": { + "sources": [ + "https://raw.githubusercontent.com/KNowledgeOnWebScale/data-vlaanderen-bundled-rdf/refs/heads/main/bundle.ttl" + ] + }, + "indirectVariables": { + "queryLocations": ["variableQueries/class.rq"] + } + }, + { + "id": "103", + "queryLocation": "outgoing-triples-per-property.rq", + "name": "Outgoing triples per property", + "comunicaContext": { + "sources": [ + "https://raw.githubusercontent.com/KNowledgeOnWebScale/data-vlaanderen-bundled-rdf/refs/heads/main/bundle.ttl" + ] + }, + "indirectVariables": { + "queryLocations": ["variableQueries/property.rq"] + } + }, + { + "id": "104", + "queryLocation": "all-aps-that-use-a-specific-property.rq", + "name": "All application profiles that use a specific-property", + "comunicaContext": { + "sources": [ + "https://raw.githubusercontent.com/KNowledgeOnWebScale/data-vlaanderen-bundled-rdf/refs/heads/main/bundle.ttl" + ] + }, + "indirectVariables": { + "queryLocations": ["variableQueries/property-in-ap.rq"] + } + }, + { + "id": "105", + "queryLocation": "all-properties-used-by-a-specific-ap.rq", + "name": "All properties used by a specific application profile", + "comunicaContext": { + "sources": [ + "https://raw.githubusercontent.com/KNowledgeOnWebScale/data-vlaanderen-bundled-rdf/refs/heads/main/bundle.ttl" + ] + }, + "indirectVariables": { + "queryLocations": ["variableQueries/ap.rq"] + } + } + ] +} diff --git a/main/configs/oslo-kg/public/images/IDLab-logo.png b/main/configs/oslo-kg/public/images/IDLab-logo.png new file mode 100644 index 00000000..bc830196 Binary files /dev/null and b/main/configs/oslo-kg/public/images/IDLab-logo.png differ diff --git a/main/configs/oslo-kg/public/queries/all-aps-that-use-a-specific-property.rq b/main/configs/oslo-kg/public/queries/all-aps-that-use-a-specific-property.rq new file mode 100644 index 00000000..730c3935 --- /dev/null +++ b/main/configs/oslo-kg/public/queries/all-aps-that-use-a-specific-property.rq @@ -0,0 +1,13 @@ +PREFIX shacl: +PREFIX rdfs: + +SELECT DISTINCT ?ap WHERE { + ?shape a shacl:NodeShape; + shacl:property [ + shacl:path $property + ]. + + ?ap rdfs:member ?shape. + + rdfs:member ?ap. +} diff --git a/main/configs/oslo-kg/public/queries/all-aps-that-use-dcterms-title.rq b/main/configs/oslo-kg/public/queries/all-aps-that-use-dcterms-title.rq new file mode 100644 index 00000000..5a8c48db --- /dev/null +++ b/main/configs/oslo-kg/public/queries/all-aps-that-use-dcterms-title.rq @@ -0,0 +1,13 @@ +PREFIX shacl: +PREFIX rdfs: + +SELECT DISTINCT ?ap WHERE { + ?shape a shacl:NodeShape; + shacl:property [ + shacl:path + ]. + + ?ap rdfs:member ?shape. + + rdfs:member ?ap. +} diff --git a/main/configs/oslo-kg/public/queries/all-properties-used-by-a-specific-ap.rq b/main/configs/oslo-kg/public/queries/all-properties-used-by-a-specific-ap.rq new file mode 100644 index 00000000..2c2aa7d6 --- /dev/null +++ b/main/configs/oslo-kg/public/queries/all-properties-used-by-a-specific-ap.rq @@ -0,0 +1,11 @@ +PREFIX shacl: +PREFIX rdfs: + +SELECT DISTINCT ?property WHERE { + ?shape a shacl:NodeShape; + shacl:property [ + shacl:path ?property + ]. + + $ap rdfs:member ?shape. +} diff --git a/main/configs/oslo-kg/public/queries/get-all-used-classes.rq b/main/configs/oslo-kg/public/queries/get-all-used-classes.rq new file mode 100644 index 00000000..6a51aa8f --- /dev/null +++ b/main/configs/oslo-kg/public/queries/get-all-used-classes.rq @@ -0,0 +1,11 @@ +PREFIX shacl: +PREFIX rdfs: + +SELECT DISTINCT ?c WHERE { + ?shape a shacl:NodeShape; + shacl:targetClass ?c. + + ?ap rdfs:member ?shape. + + rdfs:member ?ap. +} diff --git a/main/configs/oslo-kg/public/queries/get-all-used-properties.rq b/main/configs/oslo-kg/public/queries/get-all-used-properties.rq new file mode 100644 index 00000000..0219d2f1 --- /dev/null +++ b/main/configs/oslo-kg/public/queries/get-all-used-properties.rq @@ -0,0 +1,13 @@ +PREFIX shacl: +PREFIX rdfs: + +SELECT DISTINCT ?p WHERE { + ?shape a shacl:NodeShape; + shacl:property [ + shacl:path ?p + ]. + + ?ap rdfs:member ?shape. + + rdfs:member ?ap. +} diff --git a/main/configs/oslo-kg/public/queries/outgoing-triples-per-property.rq b/main/configs/oslo-kg/public/queries/outgoing-triples-per-property.rq new file mode 100644 index 00000000..2b213e82 --- /dev/null +++ b/main/configs/oslo-kg/public/queries/outgoing-triples-per-property.rq @@ -0,0 +1,8 @@ +PREFIX rdfs: + +SELECT ?property ?p ?o + +WHERE { + $property ?p ?o . + BIND ($property AS ?property) +} diff --git a/main/configs/oslo-kg/public/queries/outgoing-triples-per-superclass.rq b/main/configs/oslo-kg/public/queries/outgoing-triples-per-superclass.rq new file mode 100644 index 00000000..54110b5d --- /dev/null +++ b/main/configs/oslo-kg/public/queries/outgoing-triples-per-superclass.rq @@ -0,0 +1,10 @@ +SELECT ?pto ?oto +WHERE { + { + $class ?pto ?oto . + } UNION { + $class ?class . + ?pto ?class . + ?pto ?p ?oto . + } +} diff --git a/main/configs/oslo-kg/public/queries/properties-used-by-ap-vrachtwagenparkeren.rq b/main/configs/oslo-kg/public/queries/properties-used-by-ap-vrachtwagenparkeren.rq new file mode 100644 index 00000000..72372862 --- /dev/null +++ b/main/configs/oslo-kg/public/queries/properties-used-by-ap-vrachtwagenparkeren.rq @@ -0,0 +1,11 @@ +PREFIX shacl: +PREFIX rdfs: + +SELECT DISTINCT ?property WHERE { + ?shape a shacl:NodeShape; + shacl:property [ + shacl:path ?property + ]. + + rdfs:member ?shape. +} diff --git a/main/configs/oslo-kg/public/queries/variableQueries/ap.rq b/main/configs/oslo-kg/public/queries/variableQueries/ap.rq new file mode 100644 index 00000000..2604da9c --- /dev/null +++ b/main/configs/oslo-kg/public/queries/variableQueries/ap.rq @@ -0,0 +1,7 @@ +PREFIX shacl: +PREFIX rdfs: + +SELECT DISTINCT ?ap WHERE { + ?shape a shacl:NodeShape. + ?ap rdfs:member ?shape. +} diff --git a/main/configs/oslo-kg/public/queries/variableQueries/class.rq b/main/configs/oslo-kg/public/queries/variableQueries/class.rq new file mode 100644 index 00000000..d2feaa5d --- /dev/null +++ b/main/configs/oslo-kg/public/queries/variableQueries/class.rq @@ -0,0 +1,4 @@ +SELECT DISTINCT ?class +WHERE { + ?class . +} diff --git a/main/configs/oslo-kg/public/queries/variableQueries/property-in-ap.rq b/main/configs/oslo-kg/public/queries/variableQueries/property-in-ap.rq new file mode 100644 index 00000000..51014b0e --- /dev/null +++ b/main/configs/oslo-kg/public/queries/variableQueries/property-in-ap.rq @@ -0,0 +1,14 @@ +PREFIX shacl: +PREFIX rdfs: + +SELECT DISTINCT ?property +WHERE { + ?shape1 a shacl:NodeShape; + shacl:property [ + shacl:path ?property + ]. + + ?ap1 rdfs:member ?shape1. + + rdfs:member ?ap1. +} diff --git a/main/configs/oslo-kg/public/queries/variableQueries/property.rq b/main/configs/oslo-kg/public/queries/variableQueries/property.rq new file mode 100644 index 00000000..b0a26288 --- /dev/null +++ b/main/configs/oslo-kg/public/queries/variableQueries/property.rq @@ -0,0 +1,6 @@ +SELECT DISTINCT ?property +WHERE { + {?property } + UNION + {?property } +} diff --git a/main/src/config.json b/main/configs/test/config.json similarity index 71% rename from main/src/config.json rename to main/configs/test/config.json index 55e90ba5..09b2bd6d 100644 --- a/main/src/config.json +++ b/main/configs/test/config.json @@ -14,29 +14,24 @@ "introductionText": "Please log in as the appropriate actor and make your choice in the menu on the left.", "queryGroups": [ { - "id": "a-ex", - "name": "General examples" + "id": "gr-xmpl", + "name": "Example queries" }, { - "id": "b-prj", + "id": "gr-proj", "name": "Project related examples", "icon": "FactoryIcon" }, { - "id": "c-tst", + "id": "gr-test", "name": "For testing only", "icon": "BugReportIcon" - }, - { - "id": "d-gqx", - "name": "Generic query examples", - "icon": "InfoIcon" } ], "queries": [ { "id": "1000", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "idols.rq", "name": "My idols", "description": "Demonstrates a simple query, using a proxy.", @@ -49,7 +44,7 @@ }, { "id": "1010", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "images_test.rq", "name": "Some images", "description": "Demonstrates how to show images in a query result.", @@ -62,7 +57,7 @@ }, { "id": "1020", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "ask_picasso.rq", "name": "Is there an artist influenced by Picasso?", "description": "Demonstrates an ASK query.", @@ -79,7 +74,7 @@ }, { "id": "1030", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "construct_picasso.rq", "name": "A graph of artists influenced by Picasso", "description": "Demonstrates a CONSTRUCT query.", @@ -92,7 +87,7 @@ }, { "id": "1040", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "average.rq", "name": "Average value", "description": "Demonstrates a query calculating some average.", @@ -103,35 +98,9 @@ ] } }, - { - "id": "1045", - "queryGroupId": "c-tst", - "queryLocation": "average", - "name": "Average value - queryLocation without rq", - "description": "Should demonstrates a query calculating some average, but the queryLocation is faultive.", - "icon": "FunctionsIcon", - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/values" - ] - } - }, - { - "id": "1046", - "queryGroupId": "c-tst", - "queryLocation": "averagefefefefe.rq", - "name": "Average value - unexisting queryLocation (ends in .rq)", - "description": "Should demonstrates a query calculating some average, but the queryLocation is faultive.", - "icon": "FunctionsIcon", - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/values" - ] - } - }, { "id": "1050", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "books.rq", "name": "A secret list of my favorite books", "description": "Demonstrates a query whose source requires authentication.", @@ -144,7 +113,7 @@ }, { "id": "1060", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "books.rq", "name": "A public list of books I'd love to own", "description": "Demonstrates a query whose source does not require authentication.", @@ -157,7 +126,7 @@ }, { "id": "1070", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "musicians.rq", "name": "A query about musicians", "description": "Demonstrates what happens if one of the sources is not available (fetch failure).", @@ -172,7 +141,7 @@ }, { "id": "1080", - "queryGroupId": "a-ex", + "queryGroupId": "gr-xmpl", "queryLocation": "musicians_variables.rq", "name": "A templated query about musicians", "description": "Demonstrates the usage of templated queries.", @@ -191,8 +160,8 @@ } }, { - "id": "1085", - "queryGroupId": "a-ex", + "id": "1090", + "queryGroupId": "gr-xmpl", "queryLocation": "musicians_variables.rq", "name": "A templated query about musicians (indirect variables)", "description": "Demonstrates the usage of templated queries, here with indirectly loaded variable values.", @@ -209,8 +178,34 @@ } }, { - "id": "1090", - "queryGroupId": "a-ex", + "id": "1100", + "queryGroupId": "gr-xmpl", + "queryLocation": "musicians_variables2.rq", + "name": "A templated query about musicians (two variables)", + "description": "Demonstrates the usage of templated queries, here with two variables.", + "icon": "MusicNoteIcon", + "variables": { + "genre": [ + "\"Romantic\"", + "\"Baroque\"", + "\"Classical\"" + ], + "sameAsUrl": [ + "", + "", + "", + "" + ] + }, + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/favourite-musicians" + ] + } + }, + { + "id": "1110", + "queryGroupId": "gr-xmpl", "queryLocation": "components.rq", "name": "Source verification", "description": "Demonstrates source verification. Query components from three kinds of sources: a non-verifiable source, a successfully verifiable source, and a verifiable source with an incorrect proof.", @@ -223,8 +218,8 @@ } }, { - "id": "1100", - "queryGroupId": "a-ex", + "id": "1120", + "queryGroupId": "gr-xmpl", "queryLocation": "components_materials.rq", "name": "Sources from an index file", "description": "Query components (including details about materials) with the sources obtained from index files.", @@ -234,19 +229,8 @@ } }, { - "id": "1500", - "queryGroupId": "c-tst", - "queryLocation": "components_materials.rq", - "name": "Sources from an index file (requiring authentication)", - "description": "Query components (including details about materials) with the sources obtained from index files that require authentication to retrieve said sources.", - "sourcesIndex": { - "url": "http://localhost:8080/example/index-example-texon-only-lt-AUTH", - "queryLocation": "/sourceQueries/index_example_common_lt.rq" - } - }, - { - "id": "2000", - "queryGroupId": "b-prj", + "id": "3000", + "queryGroupId": "gr-proj", "queryLocation": "components.rq", "name": "Components", "description": "Query components.", @@ -257,8 +241,8 @@ } }, { - "id": "2001", - "queryGroupId": "b-prj", + "id": "3010", + "queryGroupId": "gr-proj", "queryLocation": "components_variable.rq", "name": "Components (select one)", "description": "Query one component; select it by name.", @@ -274,8 +258,8 @@ } }, { - "id": "2010", - "queryGroupId": "b-prj", + "id": "3020", + "queryGroupId": "gr-proj", "queryLocation": "components_materials.rq", "name": "Components and their materials", "description": "Query components (including details about materials).", @@ -289,8 +273,8 @@ } }, { - "id": "2011", - "queryGroupId": "b-prj", + "id": "3030", + "queryGroupId": "gr-proj", "queryLocation": "component_material_variables.rq", "name": "Component (select one) and percentage of a material (select one)", "description": "Select a component by its name and a material by its name to see by what percentage the material is used in that component (empty result of not used).", @@ -310,7 +294,44 @@ }, { "id": "9000", - "queryGroupId": "c-tst", + "queryGroupId": "gr-test", + "queryLocation": "average", + "name": "Average value - queryLocation without rq", + "description": "Should demonstrates a query calculating some average, but the queryLocation is faultive.", + "icon": "FunctionsIcon", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/values" + ] + } + }, + { + "id": "9010", + "queryGroupId": "gr-test", + "queryLocation": "averagefefefefe.rq", + "name": "Average value - unexisting queryLocation (ends in .rq)", + "description": "Should demonstrates a query calculating some average, but the queryLocation is faultive.", + "icon": "FunctionsIcon", + "comunicaContext": { + "sources": [ + "http://localhost:8080/example/values" + ] + } + }, + { + "id": "9020", + "queryGroupId": "gr-test", + "queryLocation": "components_materials.rq", + "name": "Sources from an index file (requiring authentication)", + "description": "Query components (including details about materials) with the sources obtained from index files that require authentication to retrieve said sources.", + "sourcesIndex": { + "url": "http://localhost:8080/example/index-example-texon-only-lt-AUTH", + "queryLocation": "/sourceQueries/index_example_common_lt.rq" + } + }, + { + "id": "9030", + "queryGroupId": "gr-test", "queryLocation": "books.rq", "name": "A query on a secret and a public list of books", "description": "Demonstrates a query on a source requiring authentication and a source not requiring authentication.", @@ -324,34 +345,8 @@ } }, { - "id": "9010", - "queryGroupId": "c-tst", - "queryLocation": "musicians_variables2.rq", - "name": "A templated query about musicians, two variables", - "description": "Demonstrates the usage of templated queries, here with two variables.", - "icon": "MusicNoteIcon", - "variables": { - "genre": [ - "\"Romantic\"", - "\"Baroque\"", - "\"Classical\"" - ], - "sameAsUrl": [ - "", - "", - "", - "" - ] - }, - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/favourite-musicians" - ] - } - }, - { - "id": "9011", - "queryGroupId": "c-tst", + "id": "9040", + "queryGroupId": "gr-test", "queryLocation": "musicians_variables2.rq", "name": "A templated query about musicians, two variables (indirect variables)", "description": "Demonstrates the usage of templated queries, here with indirectly loaded variable values and with two variables.", @@ -369,8 +364,8 @@ } }, { - "id": "9012", - "queryGroupId": "c-tst", + "id": "9050", + "queryGroupId": "gr-test", "queryLocation": "musicians_variables_double.rq", "name": "A templated query about musicians (double results)", "description": "This query tests whether a template variable is expanded more than once. If it works, this query will return all results twice.", @@ -389,8 +384,8 @@ } }, { - "id": "9020", - "queryGroupId": "c-tst", + "id": "9060", + "queryGroupId": "gr-test", "queryLocation": "components_materials.rq", "name": "Components and their materials, with sources from index file also containing an unauthorized source", "description": "Query components (including details about materials) with the sources obtained from index files, including an unauthorized source of favourite books, to check lenient.", @@ -400,8 +395,8 @@ } }, { - "id": "9030", - "queryGroupId": "c-tst", + "id": "9070", + "queryGroupId": "gr-test", "queryLocation": "components_materials.rq", "name": "Components and their materials, with mixed sources from comunicaContext and index file", "description": "Query components (including details about materials) with sources obtained from both comunicaContext.sources and index files.", @@ -418,8 +413,8 @@ } }, { - "id": "9031", - "queryGroupId": "c-tst", + "id": "9080", + "queryGroupId": "gr-test", "queryLocation": "component_material_one_variable.rq", "name": "Component and materials - 1 variable (indirect source & indirect variables)", "description": "Query components (including details about materials) with the sources obtained from index files and variables from the sources.", @@ -434,8 +429,8 @@ } }, { - "id": "9032", - "queryGroupId": "c-tst", + "id": "9090", + "queryGroupId": "gr-test", "queryLocation": "component_material_variables.rq", "name": "Component and materials - 2 variables (indirect source & indirect variables)", "description": "Query components (including details about materials) with the sources obtained from index files and variables from the sources.", @@ -451,8 +446,8 @@ } }, { - "id": "9040", - "queryGroupId": "c-tst", + "id": "9100", + "queryGroupId": "gr-test", "queryLocation": "spo_distinct_offset_limit.rq", "name": "A test on DISTINCT LIMIT OFFSET", "description": "Query two sources containing duplicated triples. The query uses DISTINCT, LIMIT and OFFSET.", @@ -464,8 +459,8 @@ } }, { - "id": "9050", - "queryGroupId": "c-tst", + "id": "9110", + "queryGroupId": "gr-test", "queryLocation": "so_distinct.rq", "name": "A test on counting the total number results", "description": "Query a source containing ?s ?p1 ?o and ?s ?p2 ?o with p1 != p2 and request only ?s ?o.", @@ -476,8 +471,8 @@ } }, { - "id": "9070", - "queryGroupId": "c-tst", + "id": "9120", + "queryGroupId": "gr-test", "queryLocation": "example_spox.rq", "name": "Triples with object, objects of different types", "description": "Gives at most 50 triples with a given object in the indicated datasources.", @@ -492,161 +487,6 @@ ], "lenient": true } - }, - { - "id": "10000", - "queryGroupId": "d-gqx", - "queryLocation": "example_count_spo.rq", - "name": "Count", - "description": "Gives the count of triples in the indicated datasources.", - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } - }, - { - "id": "10001", - "queryGroupId": "d-gqx", - "queryLocation": "example_spo.rq", - "name": "Triples", - "description": "Gives at most 50 triples in the indicated datasources.", - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } - }, - { - "id": "10002", - "queryGroupId": "d-gqx", - "queryLocation": "variableQueries/example_s.rq", - "name": "Subjects", - "description": "Gives at most 50 subjects in the indicated datasources.", - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } - }, - { - "id": "10003", - "queryGroupId": "d-gqx", - "queryLocation": "variableQueries/example_p.rq", - "name": "Predicates", - "description": "Gives at most 50 predicates in the indicated datasources.", - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } - }, - { - "id": "10004", - "queryGroupId": "d-gqx", - "queryLocation": "variableQueries/example_o.rq", - "name": "Objects", - "description": "Gives at most 50 objects in the indicated datasources.", - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } - }, - { - "id": "10005", - "queryGroupId": "d-gqx", - "queryLocation": "example_sxpo.rq", - "name": "Triples with subject", - "description": "Gives at most 50 triples with a given subject in the indicated datasources.", - "indirectVariables": { - "queryLocations": [ - "variableQueries/example_s.rq" - ] - }, - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } - }, - { - "id": "10006", - "queryGroupId": "d-gqx", - "queryLocation": "example_spxo.rq", - "name": "Triples with predicate", - "description": "Gives at most 50 triples with a given predicate in the indicated datasources.", - "indirectVariables": { - "queryLocations": [ - "variableQueries/example_p.rq" - ] - }, - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } - }, - { - "id": "10007", - "queryGroupId": "d-gqx", - "queryLocation": "example_spox.rq", - "name": "Triples with object", - "description": "Gives at most 50 triples with a given object in the indicated datasources.", - "indirectVariables": { - "queryLocations": [ - "variableQueries/example_o.rq" - ] - }, - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } - }, - { - "id": "10008", - "queryGroupId": "d-gqx", - "queryLocation": "example_terms_of_type.rq", - "name": "Terms of type", - "description": "Gives at most 50 terms of a given rdf:type in the indicated datasources.", - "indirectVariables": { - "queryLocations": [ - "variableQueries/example_types.rq" - ] - }, - "comunicaContext": { - "sources": [ - "http://localhost:8080/example/components", - "http://localhost:8080/example/boms", - "http://localhost:8080/example/materials" - ], - "lenient": true - } } ] } \ No newline at end of file diff --git a/main/configs/test/public/images/IDLab-logo.png b/main/configs/test/public/images/IDLab-logo.png new file mode 100644 index 00000000..bc830196 Binary files /dev/null and b/main/configs/test/public/images/IDLab-logo.png differ diff --git a/main/configs/test/public/queries/ask_picasso.rq b/main/configs/test/public/queries/ask_picasso.rq new file mode 100644 index 00000000..6618c39f --- /dev/null +++ b/main/configs/test/public/queries/ask_picasso.rq @@ -0,0 +1,8 @@ +PREFIX foaf: +PREFIX dbo: +PREFIX dbp: +ASK WHERE { + ?person a dbo:Artist. + ?person foaf:name ?name. + ?person dbo:influencedBy dbp:Pablo_Picasso. +} \ No newline at end of file diff --git a/main/configs/test/public/queries/average.rq b/main/configs/test/public/queries/average.rq new file mode 100644 index 00000000..fe1973e6 --- /dev/null +++ b/main/configs/test/public/queries/average.rq @@ -0,0 +1,6 @@ +PREFIX schema: + +SELECT (AVG(?value) AS ?average) +WHERE { + ?v schema:value ?value; +} diff --git a/main/configs/test/public/queries/books.rq b/main/configs/test/public/queries/books.rq new file mode 100644 index 00000000..ab94ecbe --- /dev/null +++ b/main/configs/test/public/queries/books.rq @@ -0,0 +1,11 @@ +PREFIX schema: + +SELECT * WHERE { + ?list schema:name ?listTitle; + schema:itemListElement [ + schema:name ?bookTitle; + schema:creator [ + schema:name ?authorName + ] + ]. +} \ No newline at end of file diff --git a/main/public/queries/component_material_one_variable.rq b/main/configs/test/public/queries/component_material_one_variable.rq similarity index 100% rename from main/public/queries/component_material_one_variable.rq rename to main/configs/test/public/queries/component_material_one_variable.rq diff --git a/main/public/queries/component_material_variables.rq b/main/configs/test/public/queries/component_material_variables.rq similarity index 100% rename from main/public/queries/component_material_variables.rq rename to main/configs/test/public/queries/component_material_variables.rq diff --git a/main/configs/test/public/queries/components.rq b/main/configs/test/public/queries/components.rq new file mode 100644 index 00000000..b33d8054 --- /dev/null +++ b/main/configs/test/public/queries/components.rq @@ -0,0 +1,13 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX o: + +SELECT DISTINCT ?component ?componentName ?recycledContentPercentage +WHERE { + ?component + a o:Component ; + o:name ?componentName ; + o:recycled-content-percentage ?recycledContentPercentage ; + . +} +ORDER BY ?componentName diff --git a/main/configs/test/public/queries/components_materials.rq b/main/configs/test/public/queries/components_materials.rq new file mode 100644 index 00000000..606a2004 --- /dev/null +++ b/main/configs/test/public/queries/components_materials.rq @@ -0,0 +1,18 @@ +PREFIX rdfs: +PREFIX o: + +SELECT ?component ?componentName ?material ?materialName ?percentage +WHERE { + ?component + a o:Component ; + o:name ?componentName ; + o:has-component-bom [ + o:has-component-material-assoc [ + o:percentage ?percentage ; + o:has-material ?material ; + ]; + ]; + . + ?material o:name ?materialName ; +} +ORDER BY ?componentName diff --git a/main/public/queries/components_variable.rq b/main/configs/test/public/queries/components_variable.rq similarity index 100% rename from main/public/queries/components_variable.rq rename to main/configs/test/public/queries/components_variable.rq diff --git a/main/configs/test/public/queries/construct_picasso.rq b/main/configs/test/public/queries/construct_picasso.rq new file mode 100644 index 00000000..9a0b178d --- /dev/null +++ b/main/configs/test/public/queries/construct_picasso.rq @@ -0,0 +1,8 @@ +PREFIX foaf: +PREFIX dbo: +PREFIX dbp: +CONSTRUCT WHERE { + ?person a dbo:Artist. + ?person foaf:name ?name. + ?person dbo:influencedBy dbp:Pablo_Picasso. +} \ No newline at end of file diff --git a/main/configs/test/public/queries/example_spox.rq b/main/configs/test/public/queries/example_spox.rq new file mode 100644 index 00000000..8eed0cc7 --- /dev/null +++ b/main/configs/test/public/queries/example_spox.rq @@ -0,0 +1,6 @@ +SELECT DISTINCT ?subject ?predicate ?object WHERE { + ?subject ?predicate ?object + FILTER(?object = $object) +} +ORDER BY ?subject ?predicate +LIMIT 50 \ No newline at end of file diff --git a/main/configs/test/public/queries/idols.rq b/main/configs/test/public/queries/idols.rq new file mode 100644 index 00000000..30b5ae8c --- /dev/null +++ b/main/configs/test/public/queries/idols.rq @@ -0,0 +1,9 @@ +PREFIX schema: + +SELECT ?name ?birthDate_int WHERE { + ?list schema:name ?listTitle; + schema:itemListElement [ + schema:name ?name; + schema:birthDate ?birthDate_int; + ]. +} \ No newline at end of file diff --git a/main/configs/test/public/queries/images_test.rq b/main/configs/test/public/queries/images_test.rq new file mode 100644 index 00000000..42fa1be0 --- /dev/null +++ b/main/configs/test/public/queries/images_test.rq @@ -0,0 +1,9 @@ +PREFIX schema: +SELECT ?name ?image_img +WHERE { + ?list schema:name ?listTitle; + schema:itemListElement [ + schema:image ?image_img; + schema:name ?name + ]. +} \ No newline at end of file diff --git a/main/configs/test/public/queries/musicians.rq b/main/configs/test/public/queries/musicians.rq new file mode 100644 index 00000000..807ad7ac --- /dev/null +++ b/main/configs/test/public/queries/musicians.rq @@ -0,0 +1,8 @@ +PREFIX schema: + +SELECT ?name ?genre ?sameAs_url WHERE { + ?list schema:name ?listTitle; + schema:name ?name; + schema:genre ?genre; + schema:sameAs ?sameAs_url; +} \ No newline at end of file diff --git a/main/configs/test/public/queries/musicians_variables.rq b/main/configs/test/public/queries/musicians_variables.rq new file mode 100644 index 00000000..1887a1ad --- /dev/null +++ b/main/configs/test/public/queries/musicians_variables.rq @@ -0,0 +1,8 @@ +PREFIX schema: + +SELECT ?name ?sameAs_url WHERE { + ?list schema:name ?listTitle; + schema:name ?name; + schema:genre $genre; + schema:sameAs ?sameAs_url; +} \ No newline at end of file diff --git a/main/configs/test/public/queries/musicians_variables2.rq b/main/configs/test/public/queries/musicians_variables2.rq new file mode 100644 index 00000000..278c6499 --- /dev/null +++ b/main/configs/test/public/queries/musicians_variables2.rq @@ -0,0 +1,8 @@ +PREFIX schema: + +SELECT ?name WHERE { + ?list schema:name ?listTitle; + schema:name ?name; + schema:genre $genre; + schema:sameAs $sameAsUrl; +} diff --git a/main/public/queries/musicians_variables_double.rq b/main/configs/test/public/queries/musicians_variables_double.rq similarity index 100% rename from main/public/queries/musicians_variables_double.rq rename to main/configs/test/public/queries/musicians_variables_double.rq diff --git a/main/public/queries/so_distinct.rq b/main/configs/test/public/queries/so_distinct.rq similarity index 100% rename from main/public/queries/so_distinct.rq rename to main/configs/test/public/queries/so_distinct.rq diff --git a/main/configs/test/public/queries/sourceQueries/index_example_common_lt.rq b/main/configs/test/public/queries/sourceQueries/index_example_common_lt.rq new file mode 100644 index 00000000..5964e19d --- /dev/null +++ b/main/configs/test/public/queries/sourceQueries/index_example_common_lt.rq @@ -0,0 +1,5 @@ +PREFIX rdfs: + +SELECT DISTINCT ?source WHERE { + ?s rdfs:seeAlso ?source. +} diff --git a/main/public/queries/spo.rq b/main/configs/test/public/queries/spo.rq similarity index 100% rename from main/public/queries/spo.rq rename to main/configs/test/public/queries/spo.rq diff --git a/main/public/queries/spo_distinct_offset_limit.rq b/main/configs/test/public/queries/spo_distinct_offset_limit.rq similarity index 100% rename from main/public/queries/spo_distinct_offset_limit.rq rename to main/configs/test/public/queries/spo_distinct_offset_limit.rq diff --git a/main/public/queries/variableQueries/components_name_variable.rq b/main/configs/test/public/queries/variableQueries/components_name_variable.rq similarity index 100% rename from main/public/queries/variableQueries/components_name_variable.rq rename to main/configs/test/public/queries/variableQueries/components_name_variable.rq diff --git a/main/configs/test/public/queries/variableQueries/example_o.rq b/main/configs/test/public/queries/variableQueries/example_o.rq new file mode 100644 index 00000000..5f9d2e6c --- /dev/null +++ b/main/configs/test/public/queries/variableQueries/example_o.rq @@ -0,0 +1,5 @@ +SELECT DISTINCT ?object WHERE { + ?subject ?predicate ?object +} +ORDER BY ?object +LIMIT 50 \ No newline at end of file diff --git a/main/public/queries/variableQueries/materials_name_variable.rq b/main/configs/test/public/queries/variableQueries/materials_name_variable.rq similarity index 100% rename from main/public/queries/variableQueries/materials_name_variable.rq rename to main/configs/test/public/queries/variableQueries/materials_name_variable.rq diff --git a/main/configs/test/public/queries/variableQueries/musicians_genre_variable.rq b/main/configs/test/public/queries/variableQueries/musicians_genre_variable.rq new file mode 100644 index 00000000..2c483954 --- /dev/null +++ b/main/configs/test/public/queries/variableQueries/musicians_genre_variable.rq @@ -0,0 +1,7 @@ +PREFIX schema: + +SELECT DISTINCT ?genre +WHERE { + ?list schema:genre ?genre +} +ORDER BY ?genre diff --git a/main/public/queries/variableQueries/musicians_sameAs_variable.rq b/main/configs/test/public/queries/variableQueries/musicians_sameAs_variable.rq similarity index 100% rename from main/public/queries/variableQueries/musicians_sameAs_variable.rq rename to main/configs/test/public/queries/variableQueries/musicians_sameAs_variable.rq diff --git a/main/package-lock.json b/main/package-lock.json index 6d7060cc..fc2d6e13 100644 --- a/main/package-lock.json +++ b/main/package-lock.json @@ -35,6 +35,7 @@ "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", + "fs-extra": "^11.3.0", "markdownlint-cli2": "^0.9.2", "vite": "^4.4.5" } @@ -5243,6 +5244,22 @@ "unload": "2.2.0" } }, + "node_modules/broadcast-channel/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/browserslist": { "version": "4.23.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", @@ -5612,10 +5629,11 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -6706,6 +6724,23 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/flatted": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", @@ -6739,6 +6774,21 @@ "node": ">= 0.12" } }, + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -6938,6 +6988,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -7761,6 +7818,19 @@ "jsonexport": "bin/jsonexport.js" } }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/jsonld-context-parser": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/jsonld-context-parser/-/jsonld-context-parser-2.4.0.tgz", @@ -9626,21 +9696,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rollup": { "version": "3.29.4", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", @@ -10439,6 +10494,16 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/unload": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/unload/-/unload-2.2.0.tgz", diff --git a/main/package.json b/main/package.json index beca4cec..476ba69b 100644 --- a/main/package.json +++ b/main/package.json @@ -10,12 +10,10 @@ "lint:fix": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0 --fix", "lint:markdown": "markdownlint-cli2", "lint:markdown:fix": "markdownlint-cli2-fix", - "preview": "vite preview", "dev-with-path": "vite --base /random/path/" }, "dependencies": { "@comunica/query-sparql": "^3.2.3", - "query-sparql-link-traversal-solid-no-default-predicates": "^0.1.1", "@inrupt/solid-client": "^1.30.0", "@inrupt/solid-client-authn-browser": "^1.17.1", "@inrupt/vocab-common-rdf": "^1.0.5", @@ -24,6 +22,7 @@ "@rdfjs/types": "^1.1.0", "events": "^3.3.0", "prop-types": "^15.8.1", + "query-sparql-link-traversal-solid-no-default-predicates": "^0.1.1", "rdf-string": "^1.6.3", "react": "^18.2.0", "react-admin": "^4.12.3", @@ -41,6 +40,7 @@ "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", + "fs-extra": "^11.3.0", "markdownlint-cli2": "^0.9.2", "vite": "^4.4.5" } diff --git a/main/public/queries/sourceQueries/index_example_texon_only_source.rq b/main/public/queries/sourceQueries/index_example_texon_only_source.rq deleted file mode 100644 index 3b31a702..00000000 --- a/main/public/queries/sourceQueries/index_example_texon_only_source.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX rdfs: -PREFIX example: - -SELECT ?object -WHERE { - example:index-example rdfs:seeAlso ?object . -} diff --git a/main/public/queries/sourceQueries/index_example_texon_only_source_AUTH.rq b/main/public/queries/sourceQueries/index_example_texon_only_source_AUTH.rq deleted file mode 100644 index 927c0659..00000000 --- a/main/public/queries/sourceQueries/index_example_texon_only_source_AUTH.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX rdfs: -PREFIX example: - -SELECT ?object -WHERE { - example:index-example rdfs:seeAlso ?object . -} diff --git a/main/public/queries/sourceQueries/index_example_with_unauthorized_source.rq b/main/public/queries/sourceQueries/index_example_with_unauthorized_source.rq deleted file mode 100644 index dd626997..00000000 --- a/main/public/queries/sourceQueries/index_example_with_unauthorized_source.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -PREFIX rdfs: -PREFIX example: - -SELECT ?object -WHERE { - example:index-example rdfs:seeAlso ?object . -} - diff --git a/main/public/queries/test.rq b/main/public/queries/test.rq deleted file mode 100644 index 2463b1a8..00000000 --- a/main/public/queries/test.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX dbpedia-owl: -PREFIX rdfs: -PREFIX dbpprop: -SELECT ?name ?deathDate_int WHERE { - ?person a dbpedia-owl:Artist; - rdfs:label ?name; - dbpedia-owl:birthPlace [ rdfs:label "York"@en ]. - FILTER LANGMATCHES(LANG(?name), "EN") - OPTIONAL { ?person dbpprop:dateOfDeath ?deathDate_int. } -} \ No newline at end of file diff --git a/main/scripts/select-config.cjs b/main/scripts/select-config.cjs new file mode 100644 index 00000000..a87fe4c3 --- /dev/null +++ b/main/scripts/select-config.cjs @@ -0,0 +1,20 @@ +const fse = require('fs-extra'); +const path = require('path'); + +function main(config) { + const from = path.join('.', 'configs', config); + const options = { overwrite: true, preserveTimestamps: true }; + console.log(`Activating configuration from ${from}.`); + + const configSrc = path.join(from, 'config.json'); + const configDest = path.join('.', 'src', 'config.json'); + fse.copySync(configSrc, configDest, options); + + const publicSrc = path.join(from, 'public'); + const publicDest = path.join('.', 'public'); + fse.emptyDirSync(publicDest); + fse.copySync(publicSrc, publicDest, options); + +} + +main(process.argv[2]); \ No newline at end of file diff --git a/test/cypress/e2e/aggregating-query.cy.js b/test/cypress/e2e/aggregating-query.cy.js index b419f311..266419c4 100644 --- a/test/cypress/e2e/aggregating-query.cy.js +++ b/test/cypress/e2e/aggregating-query.cy.js @@ -1,7 +1,7 @@ describe("Aggregating query", () => { it("AVG() function - see https://github.com/SolidLabResearch/generic-data-viewer-react-admin/issues/70", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("Average value").click(); cy.contains("Finished in:"); cy.get('.column-average').find('span').contains("75"); diff --git a/test/cypress/e2e/bad-cors.cy.js b/test/cypress/e2e/bad-cors.cy.js index 4e610e3d..36b89c1d 100644 --- a/test/cypress/e2e/bad-cors.cy.js +++ b/test/cypress/e2e/bad-cors.cy.js @@ -1,7 +1,7 @@ describe("Bad CORS", () => { it('Querying resource with "bad" cors header, though a proxy should work', () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("My idols").click(); cy.get(".MuiSnackbarContent-message").should("not.exist"); }); diff --git a/test/cypress/e2e/column-header.cy.js b/test/cypress/e2e/column-header.cy.js index bf479730..c1d41d91 100644 --- a/test/cypress/e2e/column-header.cy.js +++ b/test/cypress/e2e/column-header.cy.js @@ -1,7 +1,7 @@ describe("Column header", () => { it("Variables link to ontology", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A query about musicians").click(); cy.contains("Finished in:"); cy.get('a[href="http://schema.org/name"]'); diff --git a/test/cypress/e2e/customize-existing-query.cy.js b/test/cypress/e2e/customize-existing-query.cy.js index 99380606..e806d9b6 100644 --- a/test/cypress/e2e/customize-existing-query.cy.js +++ b/test/cypress/e2e/customize-existing-query.cy.js @@ -2,7 +2,7 @@ describe("Customize existing query", () => { it("simple query", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A public list of books I'd love to own").click(); cy.get('button').contains("Clone as custom query").click(); @@ -29,7 +29,7 @@ SELECT * WHERE { it("templated query - fixed variables", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A templated query about musicians").click(); cy.get('form').within(() => { @@ -119,7 +119,7 @@ ORDER BY ?sameAsUrl it("index file", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("Sources from an index file").click(); cy.get('button').contains("Clone as custom query").click({ force: true }); // Button is out of FoV so we gotta force the click @@ -166,7 +166,7 @@ describe("Clone and customize existing query, clone the custom after", () => { it("clone simple query", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A public list of books I'd love to own").click(); cy.get('button').contains("Clone as custom query").click(); diff --git a/test/cypress/e2e/dashboard.cy.js b/test/cypress/e2e/dashboard.cy.js index 05ac3248..26bb65ce 100644 --- a/test/cypress/e2e/dashboard.cy.js +++ b/test/cypress/e2e/dashboard.cy.js @@ -5,7 +5,7 @@ describe("Dashboard", () => { it("Custom icon per query is displayed", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.get('[data-testid="PhotoIcon"]').should("exist"); cy.get('[data-testid="BrushIcon"]').should("exist"); }) diff --git a/test/cypress/e2e/fetch-status.cy.js b/test/cypress/e2e/fetch-status.cy.js index 1970fb68..b30edeca 100644 --- a/test/cypress/e2e/fetch-status.cy.js +++ b/test/cypress/e2e/fetch-status.cy.js @@ -79,7 +79,7 @@ describe("Fetch Status", () => { cy.visit("/"); // Go immediately to query - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A query about musicians").click(); // Check if the good and bad sources appear diff --git a/test/cypress/e2e/indirect-variables.cy.js b/test/cypress/e2e/indirect-variables.cy.js index 58a8f259..f2267e5c 100644 --- a/test/cypress/e2e/indirect-variables.cy.js +++ b/test/cypress/e2e/indirect-variables.cy.js @@ -3,7 +3,7 @@ describe("Indirect variable query", () => { it("Indirect with 1 variable", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A templated query about musicians (indirect variables)").click(); // Fill in the form diff --git a/test/cypress/e2e/lenient.cy.js b/test/cypress/e2e/lenient.cy.js index 397dbd25..d7b8fd47 100644 --- a/test/cypress/e2e/lenient.cy.js +++ b/test/cypress/e2e/lenient.cy.js @@ -1,7 +1,7 @@ describe("Lenient mode", () => { it("When one source throws an error, the results of other sources are still shown", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A query about musicians").click(); cy.contains("Finished in:"); cy.contains("Ludwig van Beethoven"); diff --git a/test/cypress/e2e/log-in.cy.js b/test/cypress/e2e/log-in.cy.js index 8671fba9..def018dc 100644 --- a/test/cypress/e2e/log-in.cy.js +++ b/test/cypress/e2e/log-in.cy.js @@ -85,7 +85,7 @@ describe("Log in", () => { cy.url().should("eq", Cypress.config('baseUrl')); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A secret list of my favorite books").click(); cy.contains("It Ends With Us"); @@ -97,14 +97,14 @@ describe("Log in", () => { it("Do not log in and query on private data unauthenticated", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A secret list of my favorite books").click(); cy.contains("It Ends With Us").should("not.exist"); }); it("Do not log in and query public data", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A public list of books I'd love to own").click(); cy.contains("Too Late"); }); diff --git a/test/cypress/e2e/sources-from-indexfile.cy.js b/test/cypress/e2e/sources-from-indexfile.cy.js index 05ee03dc..87eea1be 100644 --- a/test/cypress/e2e/sources-from-indexfile.cy.js +++ b/test/cypress/e2e/sources-from-indexfile.cy.js @@ -4,7 +4,7 @@ describe("Sources from index file", () => { cy.visit("/"); // Navigate to correct query - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("Sources from an index file").click(); // Check that it finished diff --git a/test/cypress/e2e/sources-info.cy.js b/test/cypress/e2e/sources-info.cy.js index ec1caf85..1e6d3c4b 100644 --- a/test/cypress/e2e/sources-info.cy.js +++ b/test/cypress/e2e/sources-info.cy.js @@ -1,7 +1,7 @@ describe("Sources info", () => { it("Fetch status on fetch failure", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A query about musicians").click(); cy.contains("Finished in:"); cy.get('[aria-label="Sources info"]').click(); @@ -11,7 +11,7 @@ describe("Sources info", () => { it("Fetch status on fetch success", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A public list of books I'd love to own").click(); cy.contains("Finished in:"); cy.get('[aria-label="Sources info"]').click(); @@ -38,7 +38,7 @@ describe("Sources info", () => { it("Authentication not required for query on public data", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A public list of books I'd love to own").click(); cy.contains("Finished in:"); cy.get('[aria-label="Sources info"]').click(); @@ -65,7 +65,7 @@ describe("Sources info", () => { cy.url().should("eq", Cypress.config('baseUrl')); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A secret list of my favorite books").click(); cy.contains("Finished in:"); cy.get('[aria-label="Sources info"]').click(); @@ -75,7 +75,7 @@ describe("Sources info", () => { it("Authentication uncertain for query on not existing source", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A query about musicians").click(); cy.contains("Finished in:"); cy.get('[aria-label="Sources info"]').click(); diff --git a/test/cypress/e2e/templated-query.cy.js b/test/cypress/e2e/templated-query.cy.js index 86817276..9ac6c7b5 100644 --- a/test/cypress/e2e/templated-query.cy.js +++ b/test/cypress/e2e/templated-query.cy.js @@ -6,7 +6,7 @@ describe("Templated query", () => { it("With 1 variable", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A templated query about musicians").click(); // Fill in the query, select Baroque (7 existant artists -> perfect for this test) @@ -56,8 +56,8 @@ describe("Templated query", () => { it("With 2 variables", () => { cy.visit("/"); - cy.contains("For testing only").click(); - cy.contains("A templated query about musicians, two variables").click(); + cy.contains("Example queries").click(); + cy.contains("A templated query about musicians (two variables)").click(); cy.get('form').within(() => { cy.get('#genre').click(); @@ -75,7 +75,7 @@ describe("Templated query", () => { it("Able to change variables after making a templated query", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("A templated query about musicians").click(); // Fill in the query @@ -103,8 +103,8 @@ describe("Templated query", () => { it("Correct message displayed when no resulting data", () => { cy.visit("/"); - cy.contains("For testing only").click(); - cy.contains("A templated query about musicians, two variables").click(); + cy.contains("Example queries").click(); + cy.contains("A templated query about musicians (two variables)").click(); // Chose a genre cy.get('form').within(() => { @@ -127,8 +127,8 @@ describe("Templated query", () => { it("Able to change variables after having no results", () => { cy.visit("/"); - cy.contains("For testing only").click(); - cy.contains("A templated query about musicians, two variables").click(); + cy.contains("Example queries").click(); + cy.contains("A templated query about musicians (two variables)").click(); // Chose a genre cy.get('form').within(() => { diff --git a/test/cypress/e2e/type-representation.cy.js b/test/cypress/e2e/type-representation.cy.js index 71eedcb1..d602a032 100644 --- a/test/cypress/e2e/type-representation.cy.js +++ b/test/cypress/e2e/type-representation.cy.js @@ -2,7 +2,7 @@ describe("Type representation", () => { it("Querying variable ending on _img should return an image as result", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("Some images").click(); cy.contains("Finished in:"); cy.get("td").find("img"); diff --git a/test/cypress/e2e/verify-source.cy.js b/test/cypress/e2e/verify-source.cy.js index cfd389a0..0e7e52f2 100644 --- a/test/cypress/e2e/verify-source.cy.js +++ b/test/cypress/e2e/verify-source.cy.js @@ -2,7 +2,7 @@ describe("Verify source", () => { it("Verification button exists and returns correct result", () => { cy.visit("/"); - cy.contains("General examples").click(); + cy.contains("Example queries").click(); cy.contains("Source verification").click(); cy.get('[aria-label="Sources info"]').click();