-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathload_data
More file actions
executable file
·30 lines (24 loc) · 1004 Bytes
/
load_data
File metadata and controls
executable file
·30 lines (24 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $DIR/config
echo "Loading Subjects."
curl -s -X POST --data-binary '@data/subjects.rdf' \
-H "Content-type: application/rdf+xml" \
$AUTHMETHOD --user "$MLUSER:$MLPASS" \
"http://$MLHOST:$MLPORT/v1/graphs?graph=$GRAPHURI&database=$DB"
echo "Finished loading Subjects."
echo "Loading Childrens Subjects."
curl -s -X POST --data-binary '@data/childrensSubjects.rdf' \
-H "Content-type: application/rdf+xml" \
$AUTHMETHOD --user "$MLUSER:$MLPASS" \
"http://$MLHOST:$MLPORT/v1/graphs?graph=$GRAPHURI&database=$DB"
echo "Finished loading Children's Subjects."
echo "Loading external relationships."
curl -s -X POST --data-binary '@data/external_links.nt' \
-H "Content-type: application/n-triples" \
$AUTHMETHOD --user "$MLUSER:$MLPASS" \
"http://$MLHOST:$MLPORT/v1/graphs?graph=$GRAPHURI&database=$DB"
echo "Finished loading external relationships."
echo
echo "All data loaded."
echo