Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Switch to sozialplattform prototype data
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminaaron committed Aug 12, 2024
1 parent ba7873e commit 5db06ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions buildShaclList.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const fs = require("fs")
const path = require("path")

const shaclDir = path.join(__dirname, "public/assets/requirement-profiles/shacl")
const shaclDir = path.join(__dirname, "public/assets/requirement-profiles/sozialplattform/shacl")
const outputFilePath = path.join(__dirname, "public/assets/shacl-list.csv")
const pattern = /\s*(ff:[a-zA-Z0-9]+)\s*a\s*ff:RequirementProfile\s*/
const pattern = /(.*?)\s+a ff:RequirementProfile/

fs.readdir(shaclDir, (err, shaclFiles) => {
const lines = []
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "FörderFunke as a web app, the data only lives within the browser session locally",
"dependencies": {
"@foerderfunke/matching-engine": "^0.5.5",
"@foerderfunke/matching-engine": "^0.5.8",
"choices.js": "^10.2.0"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions public/parser.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

async function parseTurtleFiles() {
turtleMap = {
"datafields": await fetchAsset("requirement-profiles/datafields.ttl"),
"materialization": await fetchAsset("requirement-profiles/materialization.ttl"),
"datafields": await fetchAsset("requirement-profiles/sozialplattform/datafields.ttl"),
"materialization": await fetchAsset("requirement-profiles/sozialplattform/materialization.ttl"),
"shacl": {}
}
const shaclListCsv = await fetchAsset("shacl-list.csv")
for (let line of shaclListCsv.split("\n")) {
let [filename, rpUri] = line.split(",")
rpUri = expandShortUri(rpUri)
turtleMap.shacl[rpUri] = await fetchAsset("requirement-profiles/shacl/" + filename)
turtleMap.shacl[rpUri] = await fetchAsset("requirement-profiles/sozialplattform/shacl/" + filename)
}
metadata = {
df: await MatchingEngine.extractDatafieldsMetadata(turtleMap.datafields),
Expand Down

0 comments on commit 5db06ba

Please sign in to comment.