Skip to content

Commit

Permalink
[Upd] Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Jan 3, 2024
1 parent 280b171 commit 79b21c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions db-server/bin/get-value-of-rdf-property.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python3

import sys
import sys
from rdflib import Graph, URIRef

def log(message):
Expand Down Expand Up @@ -50,16 +50,16 @@ def main():

file_path = sys.argv[1]
rdf_property = URIRef(sys.argv[2])

g = load_rdf_graph(file_path)

# Query for subjects with the specified property
query = f"""
SELECT ?subject ?value
SELECT ?subject ?value
WHERE {{
?subject <{rdf_property}> ?value.
}}
"""
}}
"""
results = g.query(query)

check_property_has_single_value(results, rdf_property)
Expand All @@ -68,6 +68,6 @@ def main():
subject, value = row
print(f"{value}")

if __name__ == "__main__":
if __name__ == "__main__":
main()

6 changes: 3 additions & 3 deletions db-server/bin/repo-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ echo "INFO: Running initializer for Record Manager repositories ..."
echo "INFO: Waiting for GraphDB to start up..."
sleep 15s

ls ${SOURCE_DIR}/*-config.ttl | while read REPO_CONFIG_FILE; do
ls ${SOURCE_DIR}/*-config.ttl | while read REPO_CONFIG_FILE; do

REPO_NAME=`$SCRIPT_DIR/get-value-of-rdf-property.py $REPO_CONFIG_FILE 'http://www.openrdf.org/config/repository#repositoryID'`

if [ -z "$REPO_NAME" ]; then
echo "ERROR: Could not parse repository name from file $REPO_CONFIG_FILE"
echo "ERROR: Could not parse repository name from file $REPO_CONFIG_FILE"
exit 1
fi

Expand Down

0 comments on commit 79b21c4

Please sign in to comment.