Coverage for heritrace / utils / virtuoso_utils.py: 100%
7 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-21 12:56 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-21 12:56 +0000
1# SPDX-FileCopyrightText: 2024-2025 Arcangelo Massari <arcangelo.massari@unibo.it>
2#
3# SPDX-License-Identifier: ISC
5from flask import current_app
8VIRTUOSO_EXCLUDED_GRAPHS = [
9 "http://localhost:8890/DAV/",
10 "http://www.openlinksw.com/schemas/virtrdf#",
11 "http://www.w3.org/2002/07/owl#",
12 "http://www.w3.org/ns/ldp#",
13 "urn:activitystreams-owl:map",
14 "urn:core:services:sparql",
15]
18def is_virtuoso(app=None):
19 """
20 Check if the triplestore is Virtuoso.
22 Args:
23 app: Flask application object (optional)
25 Returns:
26 bool: True if triplestore is Virtuoso, False otherwise
27 """
28 if app is None:
29 from flask import current_app
31 app = current_app
32 return app.config["DATASET_DB_TRIPLESTORE"].lower() == "virtuoso"