From 9e6faea5817844b975e6d2dae5707ac362ad6297 Mon Sep 17 00:00:00 2001
From: Nolwenn <28621493+NoB0@users.noreply.github.com>
Date: Wed, 3 Apr 2024 11:29:50 +0200
Subject: [PATCH 1/3] PKG connector documentation
---
docs/source/pkg_connector.rst | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 docs/source/pkg_connector.rst
diff --git a/docs/source/pkg_connector.rst b/docs/source/pkg_connector.rst
new file mode 100644
index 0000000..5819707
--- /dev/null
+++ b/docs/source/pkg_connector.rst
@@ -0,0 +1,28 @@
+PKG Connector
+=============
+
+This component is responsible for establishing a connection to the PKG and executing SPARQL queries against it.
+The SPARQL queries are generated based on the user's annotated statements using utility functions.
+
+Features
+--------
+
+The PKG Connector has the following features:
+
+- Loading the PKG
+- Binding the namespaces related to the PKG vocabulary (see complete list [here](https://iai-group.github.io/pkg-vocabulary/))
+- Executing SPARQL queries against the PKG
+- Saving the PKG
+
+The PKG Connector uses the [RDFLib](https://github.com/RDFLib/rdflib) library to handle the PKG and execute the SPARQL queries. For this reason, we differentiate between two types of SPARQL queries: (1) queries to update the PKG, such as adding and removing statements, and (2) queries to retrieve information from the PKG.
+
+SPARQL Queries
+--------------
+
+The SPARQL queries are automatically generated based on the user's annotated statements and templates.
+
+- **Insertion queries** for adding statements or preferences to the PKG, the templates are defined in :py:func:`pkg_api.utils.get_query_for_add_statement` and :py:func:`pkg_api.utils.get_query_for_add_preference` respectively.
+- **Deletion queries** for removing statements or preferences from the PKG, the templates are defined in :py:func:`pkg_api.utils.get_query_for_remove_statement` and :py:func:`pkg_api.utils.get_query_for_remove_preference` respectively. Additionally, a query to remove dangling objects is provided.
+- **Retrieval queries** for retrieving statements or preferences from the PKG, the templates are defined in :py:func:`pkg_api.utils.get_query_for_get_statements` and :py:func:`pkg_api.utils.get_query_for_get_preferences` respectively. For more flexibility, templates for retrieving statements and preferences based on specific criteria are also provided, see :py:func:`pkg_api.utils.get_query_for_conditional_get_statements` and :py:func:`pkg_api.utils.get_query_for_conditioned_get_preference`.
+
+All templates are defined in the `pkg_api.utils` module.
\ No newline at end of file
From b3a1fd1f5327c8d7ac6b35f875d49496c3870fae Mon Sep 17 00:00:00 2001
From: Nolwenn <28621493+NoB0@users.noreply.github.com>
Date: Mon, 6 May 2024 10:02:01 +0200
Subject: [PATCH 2/3] Address review comments
---
docs/source/pkg_connector.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/source/pkg_connector.rst b/docs/source/pkg_connector.rst
index 5819707..896240c 100644
--- a/docs/source/pkg_connector.rst
+++ b/docs/source/pkg_connector.rst
@@ -2,7 +2,7 @@ PKG Connector
=============
This component is responsible for establishing a connection to the PKG and executing SPARQL queries against it.
-The SPARQL queries are generated based on the user's annotated statements using utility functions.
+The SPARQL queries are generated based on the user's annotated statements using utility functions (see :py:mod:`pkg_api.utils`).
Features
--------
@@ -10,11 +10,11 @@ Features
The PKG Connector has the following features:
- Loading the PKG
-- Binding the namespaces related to the PKG vocabulary (see complete list [here](https://iai-group.github.io/pkg-vocabulary/))
+- Binding the namespaces related to the PKG vocabulary (see complete list `here `)
- Executing SPARQL queries against the PKG
- Saving the PKG
-The PKG Connector uses the [RDFLib](https://github.com/RDFLib/rdflib) library to handle the PKG and execute the SPARQL queries. For this reason, we differentiate between two types of SPARQL queries: (1) queries to update the PKG, such as adding and removing statements, and (2) queries to retrieve information from the PKG.
+The PKG Connector uses the `RDFLib ` library to handle the PKG and execute the SPARQL queries. For this reason, we differentiate between two types of SPARQL queries: (1) queries to update the PKG, such as adding and removing statements, and (2) queries to retrieve information from the PKG.
SPARQL Queries
--------------
From 61feff4840cfed063f65701f1ee45fe3cf695b43 Mon Sep 17 00:00:00 2001
From: Nolwenn <28621493+NoB0@users.noreply.github.com>
Date: Fri, 10 May 2024 15:23:01 +0200
Subject: [PATCH 3/3] Address review comments
---
docs/source/pkg_connector.rst | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/docs/source/pkg_connector.rst b/docs/source/pkg_connector.rst
index 896240c..74e3e6e 100644
--- a/docs/source/pkg_connector.rst
+++ b/docs/source/pkg_connector.rst
@@ -9,12 +9,11 @@ Features
The PKG Connector has the following features:
-- Loading the PKG
+- Loading and saving the PKG
- Binding the namespaces related to the PKG vocabulary (see complete list `here `)
- Executing SPARQL queries against the PKG
-- Saving the PKG
-The PKG Connector uses the `RDFLib ` library to handle the PKG and execute the SPARQL queries. For this reason, we differentiate between two types of SPARQL queries: (1) queries to update the PKG, such as adding and removing statements, and (2) queries to retrieve information from the PKG.
+The PKG Connector uses the `RDFLib ` library to handle the PKG and execute SPARQL queries. For this reason, we differentiate between two types of SPARQL queries: (1) queries to update the PKG, such as adding and removing statements, and (2) queries to retrieve information from the PKG.
SPARQL Queries
--------------
@@ -25,4 +24,4 @@ The SPARQL queries are automatically generated based on the user's annotated sta
- **Deletion queries** for removing statements or preferences from the PKG, the templates are defined in :py:func:`pkg_api.utils.get_query_for_remove_statement` and :py:func:`pkg_api.utils.get_query_for_remove_preference` respectively. Additionally, a query to remove dangling objects is provided.
- **Retrieval queries** for retrieving statements or preferences from the PKG, the templates are defined in :py:func:`pkg_api.utils.get_query_for_get_statements` and :py:func:`pkg_api.utils.get_query_for_get_preferences` respectively. For more flexibility, templates for retrieving statements and preferences based on specific criteria are also provided, see :py:func:`pkg_api.utils.get_query_for_conditional_get_statements` and :py:func:`pkg_api.utils.get_query_for_conditioned_get_preference`.
-All templates are defined in the `pkg_api.utils` module.
\ No newline at end of file
+All templates are defined in the `pkg_api.utils ` module.
\ No newline at end of file