-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
121 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
###################################################### | ||
# Import the data inside the Relational Database (through quads-loader import endpoint) | ||
###################################################### | ||
|
||
cd ../dataset/quads/alt/relational || exit | ||
|
||
echo "------------------------------------------------------------ [BEGIN IMPORT RELATIONAL] ------------------------------------------------------------" | ||
printf "\n%s$(date +%FT%T) - [quads-loader] Dataset import started." | ||
|
||
## BSBM tagged data | ||
### Import the versions of BSBM | ||
printf "\n%s$(date +%FT%T) - [quads-loader] Versions import started." | ||
|
||
number_of_versions=$1 | ||
|
||
find . -type f -name "*.ttl.trig" -print0 | while IFS= read -r -d '' file | ||
do | ||
# Extract version number from the file name (assuming the format dataset-{version}.ttl.trig) | ||
version=$(echo "$file" | grep -oP '(?<=-)\d+(?=.ttl\.trig)') | ||
|
||
# Check if the version is less than or equal to the specified number_of_versions | ||
if [ "$version" -le "$number_of_versions" ]; then | ||
printf "\n%s$(date +%FT%T) - [quads-loader] Version $file" | ||
start=$(date +%s%3N) | ||
curl --location 'http://localhost:8080/import/version' \ | ||
--header 'Content-Type: multipart/form-data' \ | ||
--connect-timeout 60 \ | ||
--form file=@"$file" | ||
end=$(date +%s%3N) | ||
printf "\n%s$(date +%FT%T) - [Measure] (Import STS $file):$((end-start))ms;" | ||
fi | ||
done | ||
|
||
printf "\n%s$(date +%FT%T) - [quads-loader] Versions import completed." | ||
|
||
### Import the version transitions | ||
|
||
#printf "\n%s$(date +%FT%T) - [quads-loader] Version transitions import started." | ||
# | ||
#printf "\n%s$(date +%FT%T) - [quads-loader] Version transitions import completed." | ||
printf "\n%s$(date +%FT%T) - [quads-loader] Dataset import completed." | ||
|
||
echo "------------------------------------------------------------- [END IMPORT RELATIONAL] -------------------------------------------------------------" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
###################################################### | ||
# Import the data inside the Triple Store | ||
###################################################### | ||
|
||
cd ../dataset/quads/alt/theoretical || exit | ||
|
||
echo "-------------------------------------------------------------- [BEGIN IMPORT TRIPLE] --------------------------------------------------------------" | ||
printf "\n%s$(date +%FT%T) - [Triple Store] Dataset import started." | ||
|
||
number_of_versions=$1 | ||
|
||
## BSBM tagged data | ||
find . -type f -name "*.trig" -print0 | while IFS= read -r -d '' file | ||
do | ||
# Extract version number from the file name (assuming the format dataset-{version}.ttl.trig) | ||
version=$(echo "$file" | grep -oP '(?<=-)\d+(?=.ttl\.trig)') | ||
|
||
# Check if the version is less than or equal to the specified number_of_versions | ||
if [ "$version" -le "$number_of_versions" ]; then | ||
printf "%s\n$(date +%FT%T) - [Triple Store] $file." | ||
start=$(date +%s%3N) | ||
curl -X POST --location 'http://localhost:9999/blazegraph/sparql' \ | ||
--header 'Content-Type:application/x-trig' \ | ||
--connect-timeout 60 \ | ||
--data-binary @"$file" | ||
end=$(date +%s%3N) | ||
printf "\n%s$(date +%FT%T) - [Measure] (Import BG $file):$((end-start))ms;" | ||
fi | ||
done | ||
|
||
start=$(date +%s%3N) | ||
curl -X POST --location 'http://localhost:9999/blazegraph/sparql' \ | ||
--header 'Content-Type:application/x-trig' \ | ||
--connect-timeout 60 \ | ||
--data-binary @"theoretical_annotations.trig" | ||
end=$(date +%s%3N) | ||
printf "\n%s$(date +%FT%T) - [Measure] (Import BG theoretical_annotations.trig):$((end-start))ms;" | ||
|
||
printf "\n%s$(date +%FT%T) - [Triple Store] Dataset import completed." | ||
echo "--------------------------------------------------------------- [END IMPORT TRIPLE] ---------------------------------------------------------------" |
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
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
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