Skip to content

Commit

Permalink
Drug category construction fix. Custom Fuseki dockerfile to allow set…
Browse files Browse the repository at this point in the history
…up.sh.
  • Loading branch information
martinchapman committed Apr 12, 2019
1 parent d79b8b9 commit 7bccc41
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
9 changes: 6 additions & 3 deletions api/routes/drug.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function postDrugs(drugData, res, insertOrDelete, callback) {
function type(drugOrCategory, id) {

return drug = `:Drug` + drugOrCategory + id + ` rdf:type vocab:DrugType, owl:NamedIndividual ;
rdfs:label "` + id + `"@en .`
rdfs:label "` + id + `"@en `

}

Expand All @@ -45,7 +45,7 @@ function administrationSubsumption(id) {
function individualAction(req, res, insertOrDelete, callback) {

// Individual drug format:
const drug = type("T", req.body.drug_id)
const drug = type("T", req.body.drug_id) + ` .`

var drugAdministration = administration("T", req.body.drug_id);

Expand Down Expand Up @@ -150,7 +150,10 @@ function categoryAction(req, res, insertOrDelete, callback) {

}

const drugCategoryAdministration = administration("Cat", req.body.drug_category_id);
const drugCategoryAdministration = administration("Cat", req.body.drug_category_id) + ` .`;

console.log(drugCategory);
console.log(drugCategoryAdministration);

postDrugs(drugCategory + " " + drugCategoryAdministration, res, insertOrDelete, callback);

Expand Down
3 changes: 2 additions & 1 deletion docker-compose.demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ services:
- 1234:1234

fuseki:
image: stain/jena-fuseki
build:
context: fuseki
volumes:
- drug_volume:/fuskei
environment:
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ services:
- fuseki

fuseki:
image: stain/jena-fuseki
build:
context: fuseki
volumes:
- drug_volume:/fuskei
environment:
Expand Down
3 changes: 3 additions & 0 deletions fuseki/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM stain/jena-fuseki
# Adds curl
RUN apk add --update curl && rm -rf /var/cache/apk/*

0 comments on commit 7bccc41

Please sign in to comment.