Last active
July 20, 2018 11:26
-
-
Save peacememories/27a2bcaad0817fdc627678527dcc760e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/webofneeds/won-owner-webapp/src/main/webapp/config/usecase-definitions.js b/webofneeds/won-owner-webapp/src/main/webapp/config/usecase-definitions.js | |
index e569c243d..f23d7bb8a 100644 | |
--- a/webofneeds/won-owner-webapp/src/main/webapp/config/usecase-definitions.js | |
+++ b/webofneeds/won-owner-webapp/src/main/webapp/config/usecase-definitions.js | |
@@ -1,6 +1,7 @@ | |
import { is } from "../app/utils.js"; | |
import Immutable from "immutable"; | |
import { details, abstractDetails } from "detailDefinitions"; | |
+import { Parser } from "sparqljs"; | |
export const emptyDraft = { | |
is: {}, | |
@@ -145,6 +146,16 @@ const socialUseCases = { | |
interests: { ...interestsDetail }, | |
}, | |
seeksDetails: undefined, | |
+ generateQuery: () => { | |
+ return new Parser().parse(` | |
+ PREFIX won: <http://purl.org/webofneeds/model#> | |
+ | |
+ SELECT ?result where { | |
+ ?result a won:Need . | |
+ ?result won:is/won:foodAllergies "nuts" . | |
+ } | |
+ `); | |
+ }, | |
}, | |
lunch: { | |
identifier: "lunch", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment