diff --git a/CMakeLists.txt b/CMakeLists.txt index 9652c5a4..b519e8aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,7 @@ if($ENV{ROS_VERSION} STREQUAL "1") OntologeniusSparqlResponse.msg OntologeniusSparqlIndexResponse.msg OntologeniusExplanation.msg + OntologeniusSubscriptionAnswer.msg ) # # Generate services in the 'srv' folder @@ -89,6 +90,8 @@ if($ENV{ROS_VERSION} STREQUAL "1") OntologeniusIndexService.srv OntologeniusSparqlService.srv OntologeniusSparqlIndexService.srv + OntologeniusSubscription.srv + OntologeniusUnsubscription.srv ) # # Generate added messages and services with any dependencies listed here @@ -103,11 +106,14 @@ elseif($ENV{ROS_VERSION} STREQUAL "2") "msg/OntologeniusSparqlIndexResponse.msg" "msg/OntologeniusSparqlResponse.msg" "msg/OntologeniusStampedString.msg" + "msg/OntologeniusSubscriptionAnswer.msg" "srv/OntologeniusConversion.srv" "srv/OntologeniusIndexService.srv" "srv/OntologeniusService.srv" "srv/OntologeniusSparqlIndexService.srv" "srv/OntologeniusSparqlService.srv" + "srv/OntologeniusSubscription.srv" + "srv/OntologeniusUnsubscription.srv" DEPENDENCIES builtin_interfaces std_msgs) endif() @@ -231,7 +237,7 @@ function(add_ros_library TARGET) if($ENV{ROS_VERSION} STREQUAL "1") add_dependencies(${TARGET} ontologenius_gencpp ${catkin_EXPORTED_TARGETS}) - target_include_directories(${TARGET} PUBLIC + target_include_directories(${TARGET} PUBLIC $ $ ${catkin_INCLUDE_DIRS}) @@ -319,6 +325,7 @@ add_ros_library(ontologenius_lib src/API/ontologenius/OntologyManipulator.cpp src/API/ontologenius/OntologyManipulatorIndex.cpp src/API/ontologenius/OntologiesManipulator.cpp + src/API/ontologenius/PatternsSubscriber.cpp ) target_include_directories(ontologenius_lib PUBLIC $ $) @@ -328,6 +335,18 @@ target_link_libraries(ontologenius_lib ontologenius_plugin_lib ) # ontologenius_interface +# # SUBSCRIPTION +add_ros_library(ontologenius_subscription_lib + src/core/subscription/Subscription.cpp + src/core/subscription/SubscriptionManager.cpp + src/core/subscription/SubscriptionPattern.cpp +) +target_link_libraries(ontologenius_subscription_lib + PUBLIC + ontologenius_compat + ontologenius_ontoGraphs_lib +) + # # INTERFACE add_ros_library(ontologenius_interface src/interface/RosInterface.cpp @@ -340,6 +359,7 @@ target_link_libraries(ontologenius_interface ontologenius_feeder_lib ontologenius_plugin_lib ontologenius_operators + ontologenius_subscription_lib ) # ################################## @@ -407,9 +427,6 @@ if($ENV{ROS_VERSION} STREQUAL "1") target_link_libraries(ontologenius_container_tester PRIVATE ontologenius_interface) # # FEATURES TESTS - add_ros_executable(ontologenius_config_tester src/tests/config_reader_test.cpp) - target_link_libraries(ontologenius_config_tester PRIVATE ontologenius_interface) - add_ros_executable(ontologenius_versioning src/tests/versioning.cpp) target_link_libraries(ontologenius_versioning PRIVATE ontologenius_lib) @@ -470,13 +487,13 @@ if($ENV{ROS_VERSION} STREQUAL "1") # Generate CMake package config file include(CMakePackageConfigHelpers) configure_package_config_file( - cmake/ontologenius_compatConfigIntermediate.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/ontologenius_compatConfigIntermediate.cmake - INSTALL_DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake + cmake/ontologenius_compatConfigIntermediate.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/ontologenius_compatConfigIntermediate.cmake + INSTALL_DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake ) install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/ontologenius_compatConfigIntermediate.cmake - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake + FILES ${CMAKE_CURRENT_BINARY_DIR}/ontologenius_compatConfigIntermediate.cmake + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake ) install( @@ -491,7 +508,7 @@ if($ENV{ROS_VERSION} STREQUAL "1") EXPORT ontologenius_compatTargets FILE ontologenius_compatTargets.cmake NAMESPACE ontologenius:: - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake ) install(TARGETS @@ -510,6 +527,7 @@ if($ENV{ROS_VERSION} STREQUAL "1") ontologenius_plugin_lib ontologenius_ontoGraphs_lib ontologenius_reasoner_plugin + ontologenius_subscription_lib ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} @@ -553,6 +571,7 @@ elseif($ENV{ROS_VERSION} STREQUAL "2") ontologenius_feeder_lib ontologenius_plugin_lib ontologenius_ontoGraphs_lib + ontologenius_subscription_lib ontologenius_reasoner_plugin EXPORT ontologenius ARCHIVE DESTINATION lib @@ -584,49 +603,58 @@ if($ENV{ROS_VERSION} STREQUAL "1") if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) - add_rostest_gtest(ontologenius_library_tester test/library.test src/tests/CI/library.cpp) - target_include_directories(ontologenius_library_tester PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(ontologenius_library_tester ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(ontologenius_requests_tester test/requests.test src/tests/CI/requests.cpp) - target_include_directories(ontologenius_requests_tester PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(ontologenius_requests_tester ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(ontologenius_global_tester test/globalFeatures.test src/tests/CI/globalFeatures.cpp) - target_include_directories(ontologenius_global_tester PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(ontologenius_global_tester ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(ontologenius_propertiesInheritage_tester test/propertiesInheritage.test src/tests/CI/propertiesInheritage.cpp) - target_include_directories(ontologenius_propertiesInheritage_tester PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(ontologenius_propertiesInheritage_tester ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(ontologenius_propertiesInheritageIndex_tester test/propertiesInheritageIndex.test src/tests/CI/propertiesInheritageIndex.cpp) - target_include_directories(ontologenius_propertiesInheritageIndex_tester PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(ontologenius_propertiesInheritageIndex_tester ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(ontologenius_multi_tester test/multi.test src/tests/CI/multi.cpp) - target_include_directories(ontologenius_multi_tester PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(ontologenius_multi_tester ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(ontologenius_cpy_test test/cpy.test src/tests/CI/copy_test.cpp) - set_target_properties(ontologenius_cpy_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) - target_include_directories(ontologenius_cpy_test PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(ontologenius_cpy_test ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(anonymous_class_test test/anonymous_class.test src/tests/CI/anonymous_class_test.cpp) - set_target_properties(anonymous_class_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) - target_include_directories(anonymous_class_test PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(anonymous_class_test ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(chain_test test/chain.test src/tests/CI/chain_test.cpp) - set_target_properties(chain_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) - target_include_directories(chain_test PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(chain_test ontologenius_lib ${catkin_LIBRARIES}) - - add_rostest_gtest(transitivity_test test/transitivity.test src/tests/CI/transitivity_test.cpp) - set_target_properties(transitivity_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) - target_include_directories(transitivity_test PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(transitivity_test ontologenius_lib ${catkin_LIBRARIES}) + add_rostest_gtest(onto_api_connection_test test/api_connection.test src/tests/CI/api_connection_test.cpp) + target_include_directories(onto_api_connection_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_api_connection_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_api_inheritage_test test/api_inheritage.test src/tests/CI/api_inheritage_test.cpp) + target_include_directories(onto_api_inheritage_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_api_inheritage_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_api_relations_index_test test/api_relations_index.test src/tests/CI/api_relations_index_test.cpp) + target_include_directories(onto_api_relations_index_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_api_relations_index_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_api_relations_test test/api_relations.test src/tests/CI/api_relations_test.cpp) + target_include_directories(onto_api_relations_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_api_relations_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_feature_deep_copy_test test/feature_deep_copy.test src/tests/CI/feature_deep_copy_test.cpp) + set_target_properties(onto_feature_deep_copy_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) + target_include_directories(onto_feature_deep_copy_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_feature_deep_copy_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_feature_loading_test test/feature_loading.test src/tests/CI/feature_loading_test.cpp) + target_include_directories(onto_feature_loading_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_feature_loading_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_feature_multi_test test/feature_multi.test src/tests/CI/feature_multi_test.cpp) + target_include_directories(onto_feature_multi_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_feature_multi_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_feature_subscription_test test/feature_subscription.test src/tests/CI/feature_subscription_test.cpp) + target_include_directories(onto_feature_subscription_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_feature_subscription_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_reasoning_anonymous_class_test test/reasoning_anonymous_class.test src/tests/CI/reasoning_anonymous_class_test.cpp) + set_target_properties(onto_reasoning_anonymous_class_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) + target_include_directories(onto_reasoning_anonymous_class_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_reasoning_anonymous_class_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_reasoning_chain_test test/reasoning_chain.test src/tests/CI/reasoning_chain_test.cpp) + set_target_properties(onto_reasoning_chain_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) + target_include_directories(onto_reasoning_chain_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_reasoning_chain_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_reasoning_mechanism_test test/reasoning_mechanism.test src/tests/CI/reasoning_mechanism_test.cpp) + set_target_properties(onto_reasoning_mechanism_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) + target_include_directories(onto_reasoning_mechanism_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_reasoning_mechanism_test ontologenius_lib ${catkin_LIBRARIES}) + + add_rostest_gtest(onto_reasoning_transitivity_test test/reasoning_transitivity.test src/tests/CI/reasoning_transitivity_test.cpp) + set_target_properties(onto_reasoning_transitivity_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) + target_include_directories(onto_reasoning_transitivity_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(onto_reasoning_transitivity_test ontologenius_lib ${catkin_LIBRARIES}) endif() elseif($ENV{ROS_VERSION} STREQUAL "2") @@ -634,10 +662,10 @@ elseif($ENV{ROS_VERSION} STREQUAL "2") find_package(ament_lint_auto REQUIRED) find_package(ament_cmake_gtest REQUIRED) - ament_add_gtest(ontologenius_cpy_test src/tests/CI/copy_test.cpp TIMEOUT 10) - set_target_properties(ontologenius_cpy_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) - target_include_directories(ontologenius_cpy_test PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(ontologenius_cpy_test ontologenius_lib ${catkin_LIBRARIES}) + ament_add_gtest(feature_deep_copy_test src/tests/CI/feature_deep_copy_test.cpp TIMEOUT 10) + set_target_properties(feature_deep_copy_test PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON) + target_include_directories(feature_deep_copy_test PRIVATE ${catkin_INCLUDE_DIRS}) + target_link_libraries(feature_deep_copy_test ontologenius_lib ${catkin_LIBRARIES}) endif() endif() diff --git a/README.md b/README.md index f54e3dd5..0ed2350d 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,4 @@ On this launcher file, you will find an argument indicating the path to the onto You can add your own ontology files in the argument if you want them to be loaded at the beginning of the program. [Release-Url]: https://sarthou.github.io/ontologenius/ -[Release-image]: http://img.shields.io/badge/release-v0.4.2-1eb0fc.svg +[Release-image]: http://img.shields.io/badge/release-v3-1eb0fc.svg diff --git a/docs/Download.html b/docs/Download.html index a0b86407..c9b0b8bc 100644 --- a/docs/Download.html +++ b/docs/Download.html @@ -1,7 +1,7 @@ - Download | Ontologenius 0.4.2 + Download | Ontologenius 0.4.3 @@ -92,6 +92,31 @@

Download

You have below the archives of the major versions of Ontologenius:

+

V0.4.3

+

8 / 11 / 2024

+ + +

V0.4.2

14 / 06 / 2024

diff --git a/docs/InstallOntologeniusROS1.html b/docs/InstallOntologeniusROS1.html index 59f915be..6dacd993 100644 --- a/docs/InstallOntologeniusROS1.html +++ b/docs/InstallOntologeniusROS1.html @@ -1,7 +1,7 @@ - Install ROS1 | Ontologenius 0.4.2 + Install ROS1 | Ontologenius 0.4.3 diff --git a/docs/InstallOntologeniusROS2.html b/docs/InstallOntologeniusROS2.html index ae9a64d8..76cf4c94 100644 --- a/docs/InstallOntologeniusROS2.html +++ b/docs/InstallOntologeniusROS2.html @@ -1,7 +1,7 @@ - Install ROS2 | Ontologenius 0.4.2 + Install ROS2 | Ontologenius 0.4.3 diff --git a/docs/Publications.html b/docs/Publications.html index ecd7429c..e8f22b22 100644 --- a/docs/Publications.html +++ b/docs/Publications.html @@ -1,7 +1,7 @@ - Publications | Ontologenius 0.4.2 + Publications | Ontologenius 0.4.3 diff --git a/docs/SetUp.html b/docs/SetUp.html index 892b2089..53bd20d6 100644 --- a/docs/SetUp.html +++ b/docs/SetUp.html @@ -1,7 +1,7 @@ - Set up | Ontologenius 0.4.2 + Set up | Ontologenius 0.4.3 @@ -224,7 +224,7 @@

Set Up Your Environnement

We will require a minimal version of Ontologenius (optional) and include the ontologenius API.

-
find_package(ontologenius 0.4.2 REQUIRED)
+
find_package(ontologenius 0.4.3 REQUIRED)
...
catkin_package(
# INCLUDE_DIRS include
@@ -258,7 +258,7 @@

Set Up Your Environnement

...
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
-
find_package(ontologenius 0.4.2 REQUIRED)
+
find_package(ontologenius 0.4.3 REQUIRED)
include_directories(
${rclcpp_INCLUDE_DIRS}
diff --git a/docs/cpp_API/ActionClient.html b/docs/cpp_API/ActionClient.html index 185a7e6d..b0e11dad 100644 --- a/docs/cpp_API/ActionClient.html +++ b/docs/cpp_API/ActionClient.html @@ -1,7 +1,7 @@ - ActionClient Class (cpp) | Ontologenius 0.4.2 + ActionClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/ClassClient.html b/docs/cpp_API/ClassClient.html index e959301b..bafaf510 100644 --- a/docs/cpp_API/ClassClient.html +++ b/docs/cpp_API/ClassClient.html @@ -1,7 +1,7 @@ - ClassClient Class (cpp) | Ontologenius 0.4.2 + ClassClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/ClassIndexClient.html b/docs/cpp_API/ClassIndexClient.html index 0b185d2a..dae0335d 100644 --- a/docs/cpp_API/ClassIndexClient.html +++ b/docs/cpp_API/ClassIndexClient.html @@ -1,7 +1,7 @@ - ClassIndexClient Class (cpp) | Ontologenius 0.4.2 + ClassIndexClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ @@ -248,10 +300,10 @@

std::

Brought to you by:

- + \ No newline at end of file diff --git a/docs/cpp_API/ClientBase.html b/docs/cpp_API/ClientBase.html index 958999af..fa99b2cc 100644 --- a/docs/cpp_API/ClientBase.html +++ b/docs/cpp_API/ClientBase.html @@ -1,7 +1,7 @@ - ClientBase Class (cpp) | Ontologenius 0.4.2 + ClientBase Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/ClientBaseIndex.html b/docs/cpp_API/ClientBaseIndex.html index e4123a36..3c671373 100644 --- a/docs/cpp_API/ClientBaseIndex.html +++ b/docs/cpp_API/ClientBaseIndex.html @@ -1,7 +1,7 @@ - ClientBaseIndex Class (cpp) | Ontologenius 0.4.2 + ClientBaseIndex Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/ConversionClient.html b/docs/cpp_API/ConversionClient.html index c8d0ab4f..6e20e459 100644 --- a/docs/cpp_API/ConversionClient.html +++ b/docs/cpp_API/ConversionClient.html @@ -1,7 +1,7 @@ - ConversionClient Class (cpp) | Ontologenius 0.4.2 + ConversionClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@
@@ -272,10 +345,10 @@

Brought to you by:

- + \ No newline at end of file diff --git a/docs/cpp_API/CppAPI.html b/docs/cpp_API/CppAPI.html index 3894e800..c34c5df0 100644 --- a/docs/cpp_API/CppAPI.html +++ b/docs/cpp_API/CppAPI.html @@ -1,7 +1,7 @@ - C++ API (cpp) | Ontologenius 0.4.2 + C++ API (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/DataPropertyClient.html b/docs/cpp_API/DataPropertyClient.html index 55cd2f20..2e61f8a6 100644 --- a/docs/cpp_API/DataPropertyClient.html +++ b/docs/cpp_API/DataPropertyClient.html @@ -1,7 +1,7 @@ - DataPropertyClient Class (cpp) | Ontologenius 0.4.2 + DataPropertyClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/DataPropertyIndexClient.html b/docs/cpp_API/DataPropertyIndexClient.html index 5bf6d1df..23f8bdef 100644 --- a/docs/cpp_API/DataPropertyIndexClient.html +++ b/docs/cpp_API/DataPropertyIndexClient.html @@ -1,7 +1,7 @@ - DataPropertyIndexClient Class (cpp) | Ontologenius 0.4.2 + DataPropertyIndexClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ @@ -184,7 +211,7 @@

std

std::vector<int64_t> DataPropertyIndexClient::getDomain(int64_t index, int depth = -1)

Gives all the domain classes of the property index.

The optional depth parameter can be set to limit tree propagation to a specific value. - The default value -1 represents no propagation limitation while the value 0 corresponds to the direct domains.

+ The default value -1 represents no propagation limitation while the value 0 corresponds to the direct domains.

std::vector<int64_t> DataPropertyIndexClient::getRange(int64_t index)

Gives all the ranges types of the property index.

@@ -201,10 +228,10 @@

std::vect

Brought to you by:

- + \ No newline at end of file diff --git a/docs/cpp_API/FeederPublisher.html b/docs/cpp_API/FeederPublisher.html index f70c9cb7..daf1322e 100644 --- a/docs/cpp_API/FeederPublisher.html +++ b/docs/cpp_API/FeederPublisher.html @@ -1,14 +1,14 @@ - FeederPublisher Class (cpp) | Ontologenius 0.4.2 + FeederPublisher Class (cpp) | Ontologenius 0.4.3 + integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> @@ -18,7 +18,7 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/ManagerClient.html b/docs/cpp_API/ManagerClient.html index f91bf196..628b6ba2 100644 --- a/docs/cpp_API/ManagerClient.html +++ b/docs/cpp_API/ManagerClient.html @@ -1,7 +1,7 @@ - ManagerClient Class (cpp) | Ontologenius 0.4.2 + ManagerClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/ObjectPropertyClient.html b/docs/cpp_API/ObjectPropertyClient.html index 54360095..f7c5727f 100644 --- a/docs/cpp_API/ObjectPropertyClient.html +++ b/docs/cpp_API/ObjectPropertyClient.html @@ -1,7 +1,7 @@ - ObjectPropertyClient Class (cpp) | Ontologenius 0.4.2 + ObjectPropertyClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/ObjectPropertyIndexClient.html b/docs/cpp_API/ObjectPropertyIndexClient.html index 7244f685..123b5972 100644 --- a/docs/cpp_API/ObjectPropertyIndexClient.html +++ b/docs/cpp_API/ObjectPropertyIndexClient.html @@ -1,7 +1,7 @@ - ObjectPropertyIndexClient Class (cpp) | Ontologenius 0.4.2 + ObjectPropertyIndexClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ @@ -186,12 +214,12 @@

std

std::vector<int64_t> ObjectPropertyIndexClient::getDomain(int64_t index, int depth = -1)

Gives all the domain classes of the property index.

The optional depth parameter can be set to limit tree propagation to a specific value. - The default value -1 represents no propagation limitation while the value 0 corresponds to the direct domains.

+ The default value -1 represents no propagation limitation while the value 0 corresponds to the direct domains.

std::vector<int64_t> ObjectPropertyIndexClient::getRange(int64_t index, int depth = -1)

Gives all the ranges classes of the property index.

The optional depth parameter can be set to limit tree propagation to a specific value. - The default value -1 represents no propagation limitation while the value 0 corresponds to the direct ranges.

+ The default value -1 represents no propagation limitation while the value 0 corresponds to the direct ranges.

std::vector<int64_t> ObjectPropertyIndexClient::getInverse(int64_t index)

Gives all the inverses properties of the property index.

@@ -208,10 +236,10 @@

std::

Brought to you by:

- + \ No newline at end of file diff --git a/docs/cpp_API/OntologiesManipulator.html b/docs/cpp_API/OntologiesManipulator.html index 65361782..1ac09c92 100644 --- a/docs/cpp_API/OntologiesManipulator.html +++ b/docs/cpp_API/OntologiesManipulator.html @@ -1,7 +1,7 @@ - OntologiesManipulator Class (cpp) | Ontologenius 0.4.2 + OntologiesManipulator Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/OntologyClient.html b/docs/cpp_API/OntologyClient.html index 71580ca7..595242ef 100644 --- a/docs/cpp_API/OntologyClient.html +++ b/docs/cpp_API/OntologyClient.html @@ -1,7 +1,7 @@ - OntologyClient Class (cpp) | Ontologenius 0.4.2 + OntologyClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/OntologyIndexClient.html b/docs/cpp_API/OntologyIndexClient.html index e271c183..ab64e427 100644 --- a/docs/cpp_API/OntologyIndexClient.html +++ b/docs/cpp_API/OntologyIndexClient.html @@ -1,7 +1,7 @@ - OntologyIndexClient Class (cpp) | Ontologenius 0.4.2 + OntologyIndexClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ @@ -247,10 +295,10 @@

Muted labels

Brought to you by:

- + \ No newline at end of file diff --git a/docs/cpp_API/OntologyManipulator.html b/docs/cpp_API/OntologyManipulator.html index 9358f5b5..76fde50c 100644 --- a/docs/cpp_API/OntologyManipulator.html +++ b/docs/cpp_API/OntologyManipulator.html @@ -1,7 +1,7 @@ - OntologyManipulator Class (cpp) | Ontologenius 0.4.2 + OntologyManipulator Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/OntologyManipulatorIndex.html b/docs/cpp_API/OntologyManipulatorIndex.html index 3c8b6f72..fdce07ea 100644 --- a/docs/cpp_API/OntologyManipulatorIndex.html +++ b/docs/cpp_API/OntologyManipulatorIndex.html @@ -1,7 +1,7 @@ - OntologyManipulatorIndex Class (cpp) | Ontologenius 0.4.2 + OntologyManipulatorIndex Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/PatternsSubscriber.html b/docs/cpp_API/PatternsSubscriber.html new file mode 100644 index 00000000..8a443908 --- /dev/null +++ b/docs/cpp_API/PatternsSubscriber.html @@ -0,0 +1,246 @@ + + + + PatternsSubscriber Class (cpp) | Ontologenius 0.4.3 + + + + + + + + + + + +
+ + + +
+ + +
+

PatternsSubscriber Class

+

The PatternsSubscriber class provides an abstraction ontologenius subscription mechanism.More...

+
+ + + + + + + + + + + +
Header: #include + "ontologenius/PatternsSubscriber.h"
Namespace: onto
+
+ + +

Public Functions

+
+ + + + + + + + + + + + + + + + + + + +
PatternsSubscriber(const + std::string& name)
int subscribe + (const std::string& pattern, + const std::function<void(const std::string&)>& callback, + int count = -1)
boolcancel(size_t id) +
bool end() +
+
+ + +
+

Detailed Description

+

The PatternsSubscriber class provides an abstraction ontologenius subscription mechanism.

+

Querying a knowledge base is interesting but when one is waiting a given fact, pulling + the knowledge base can be an issue. To solve that, Ontologenius provide a subscription + mechanism allowing to subscribe not one only to given facts but also to patterns.

+
+ +
+

Public Function Documentation

+ +

PatternsSubscriber::PatternsSubscriber(const std::string& name) +

+

Constructs a pattern subscriber.

+

Can be used in a multi-ontology mode by specifying the name of the ontology name. For classic use, + name should be defined as "". +

+ +

int + PatternsSubscriber::subscribe(const std::string& + pattern, const std::function<void(const std::string&)>& callback, int count = -1) +

+

Subscribes to a given pattern linked to a callback. Patterns are in the form "[add]subject|property|object". + Subject and object can be set as classes such as "[add]Cube|isOnTopOf|Table" to subscibe to any fact representing a cube being on a table. + In addition, any of the four elements can be setted with question mark which can be read as "any". For example, + "[?]?isOnTopOf|Table" to subscribe to any deletion or addition of any thing being on a entity of type Table.

+

The parameter count can be set to limit the subscription. + Default parameter -1 corresponds to an unlimited subscription.

+

This function returns the subscription id. This later is only used to manually unsubscribe.

+ + +

bool PatternsSubscriber::cancel(size_t id)

+

Manualy unsubscribe from a pattern using the corresponding subscription id.

+

Return True if the unsubscription suceeded.

+ +

bool + PatternsSubscriber::end() +

+

Tests if any subscription is still ongoing.

+ +
+
+
+ +
+ + +
+
+

+ Brought to you by: + +

+
+
+ + \ No newline at end of file diff --git a/docs/cpp_API/ReasonerClient.html b/docs/cpp_API/ReasonerClient.html index 6ecdb2b9..0223bf07 100644 --- a/docs/cpp_API/ReasonerClient.html +++ b/docs/cpp_API/ReasonerClient.html @@ -1,7 +1,7 @@ - ReasonerClient Class (cpp) | Ontologenius 0.4.2 + ReasonerClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ - + \ No newline at end of file diff --git a/docs/cpp_API/SparqlClient.html b/docs/cpp_API/SparqlClient.html index 23335cef..f536876e 100644 --- a/docs/cpp_API/SparqlClient.html +++ b/docs/cpp_API/SparqlClient.html @@ -1,7 +1,7 @@ - SparqlClient Class (cpp) | Ontologenius 0.4.2 + SparqlClient Class (cpp) | Ontologenius 0.4.3 @@ -14,15 +14,15 @@ @@ -185,10 +198,10 @@

Basic query Examples

Brought to you by:

- + \ No newline at end of file diff --git a/docs/cpp_Tutorials/Tutorials.html b/docs/cpp_Tutorials/Tutorials.html index 9629184d..1a33d7c4 100644 --- a/docs/cpp_Tutorials/Tutorials.html +++ b/docs/cpp_Tutorials/Tutorials.html @@ -1,7 +1,7 @@ - Cpp Tutorials | Ontologenius 0.4.2 + Cpp Tutorials | Ontologenius 0.4.3 @@ -16,15 +16,15 @@