Skip to content

Instantly share code, notes, and snippets.

@laczoka
Created February 14, 2013 09:47
Show Gist options
  • Save laczoka/4951613 to your computer and use it in GitHub Desktop.
Save laczoka/4951613 to your computer and use it in GitHub Desktop.
Troubleshooting Dydra.com by using Stardog as reference. (Stardog 1.1 Community Edition) After loading the data into dydra, export doesn't work as expected. It results in 20+ triples whereas exporting from Stardog works just fine. There seems to be a difference in the total number of loaded triples as well: 5595 (Dydra) vs. 5572 (Stardog) See ht…
#!/bin/bash
DB=test2
# drop database
dydra drop test2
# seed data
array=(blurayplayer.n3 blurayplayer_example.n3 mobilephone.n3 mobilephone_example.n3 tablet.n3 tablet_example.n3 digitalcamera.owl digitalcamera_example.owl)
# create db and load seed data
dydra create test2
dydra import $DB http://purl.org/goodrelations/v1.owl
dydra count $DB
for i in "${array[@]}"
do
dydra import $DB http://purl.org/opdm/${i}
dydra count $DB
done
#!/bin/bash
# drop database
DB=test2
./stardog-admin drop -n $DB
# get seed data
array=(blurayplayer.n3 blurayplayer_example.n3 mobilephone.n3 mobilephone_example.n3 tablet.n3 tablet_example.n3 digitalcamera.owl digitalcamera_example.owl)
wget -nv http://purl.org/goodrelations/v1.owl
for i in "${array[@]}"
do
rm $i
wget -nv http://purl.org/opdm/${i}
done
# create db and load seed data
./stardog-admin create -i -e -n $DB
./stardog add -u admin -p admin -c "http://localhost:5822/"${DB} v1.owl
for i in "${array[@]}"
do
./stardog add -u admin -p admin -c "http://localhost:5822/"${DB} $i
done
echo "Total number of triples in ${DB}:"
./stardog export -u admin -p admin -c "http://localhost:5822/"${DB} -f N-TRIPLES | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment