diff --git a/CMakeLists.txt b/CMakeLists.txt index 56c6d4f1..a9449086 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,7 @@ catkin_python_setup() HTTP_headers.msg StampedString.msg OntologeniusSparqlResponse.msg + OntologeniusSparqlIndexResponse.msg OntologeniusExplanation.msg ) @@ -82,9 +83,11 @@ catkin_python_setup() add_service_files( FILES REST.srv - standard_service.srv + OntologeniusConversion.srv OntologeniusService.srv + OntologeniusIndexService.srv OntologeniusSparqlService.srv + OntologeniusSparqlIndexService.srv ) ## Generate added messages and services with any dependencies listed here @@ -166,7 +169,6 @@ add_onto_library(ontologenius_core_lib src/core/reasoner/plugins/ReasonerInterface.cpp src/core/reasoner/Reasoners.cpp src/core/reasoner/ConfigReader.cpp -# src/core/Computer.cpp ) target_link_libraries(ontologenius_core_lib PUBLIC @@ -178,11 +180,6 @@ target_link_libraries(ontologenius_core_lib ############################## add_onto_library(ontologenius_drawer_lib - src/graphical/Drawers/GraphDrawer.cpp - src/graphical/Drawers/ClassDrawer.cpp - src/graphical/Drawers/ObjectPropertyDrawer.cpp - src/graphical/Drawers/DataPropertyDrawer.cpp - src/graphical/Drawers/OntologyDrawer.cpp src/graphical/versioning/TreeReader.cpp src/graphical/versioning/TreeDrawer.cpp ) @@ -197,36 +194,9 @@ target_link_libraries(ontologenius_drawer_lib ) ############################## -## INTERPRETER +## API ############################## -#add_onto_library(ontologenius_codeDescription_lib -# src/interpreter/codeDescription/Types/VariablesType.cpp -# src/interpreter/codeDescription/Types/StringType.cpp -# src/interpreter/codeDescription/Functions/FunctionDescriptor.cpp -# src/interpreter/codeDescription/Functions/FunctionContainer.cpp -# src/interpreter/codeDescription/Functions/OntoFunctions.cpp -# src/interpreter/codeDescription/Functions/PropertyFunctions.cpp -# src/interpreter/codeDescription/TextManipulator.cpp -# src/interpreter/codeDescription/Code.cpp -# src/interpreter/codeDescription/Namespace.cpp -# src/interpreter/codeDescription/Syntax/Operators.cpp -# src/interpreter/codeDescription/Syntax/IfelseCF.cpp -# src/interpreter/fileManagers/FileManager.cpp -# src/interpreter/fileManagers/FileWriter.cpp -#) - -#add_onto_library(ontologenius_interpreter_lib -# src/interpreter/Parser.cpp -# src/interpreter/Error.cpp -# src/interpreter/Compiler.cpp -#) -#target_link_libraries(ontologenius_interpreter_lib -# PUBLIC -# ontologenius_codeDescription_lib -# ontologenius_ontoGraphs_lib -#) - add_onto_library(ontologenius_lib src/API/ontologenius/clients/ontologyClients/IndividualClient.cpp src/API/ontologenius/clients/ontologyClients/ObjectPropertyClient.cpp @@ -238,13 +208,21 @@ add_onto_library(ontologenius_lib src/API/ontologenius/clients/ManagerClient.cpp src/API/ontologenius/clients/ClientBase.cpp src/API/ontologenius/clients/SparqlClient.cpp + src/API/ontologenius/clientsIndex/ontologyClients/IndividualIndexClient.cpp + src/API/ontologenius/clientsIndex/ontologyClients/ObjectPropertyIndexClient.cpp + src/API/ontologenius/clientsIndex/ontologyClients/DataPropertyIndexClient.cpp + src/API/ontologenius/clientsIndex/ontologyClients/ClassIndexClient.cpp + src/API/ontologenius/clientsIndex/ontologyClients/OntologyIndexClient.cpp + src/API/ontologenius/clientsIndex/ClientBaseIndex.cpp + src/API/ontologenius/clientsIndex/SparqlIndexClient.cpp src/API/ontologenius/FeederPublisher.cpp + src/API/ontologenius/ConversionClient.cpp src/API/ontologenius/OntologyManipulator.cpp + src/API/ontologenius/OntologyManipulatorIndex.cpp src/API/ontologenius/OntologiesManipulator.cpp ) target_link_libraries(ontologenius_lib PUBLIC -# ontologenius_interpreter_lib ontologenius_core_lib ) @@ -270,7 +248,9 @@ target_link_libraries(ontologenius_reasoner_plugin ############################## add_onto_library(ontologenius_interface - src/RosInterface.cpp + src/interface/RosInterface.cpp + src/interface/RosInterfaceStringHandlers.cpp + src/interface/RosInterfaceIndexHandlers.cpp src/core/ontologyOperators/differenceFinder.cpp src/core/ontologyOperators/Sparql.cpp src/core/ontologyOperators/SparqlSolver.cpp @@ -333,9 +313,6 @@ target_link_libraries(ontologenius_container_tester PRIVATE ontologenius_core_li ## FEATURES TESTS ############################## -add_onto_executable(ontologenius_exemple src/exemple.cpp ) -target_link_libraries(ontologenius_exemple PRIVATE ontologenius_drawer_lib ontologenius_core_lib) - add_onto_executable(ontologenius_config_tester src/tests/config_reader_test.cpp) target_link_libraries(ontologenius_config_tester PRIVATE ontologenius_core_lib) @@ -452,6 +429,10 @@ if(CATKIN_ENABLE_TESTING) 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_dynamic_tester test/dynamic.test src/tests/CI/dynamic.cpp) target_include_directories(ontologenius_dynamic_tester PRIVATE ${catkin_INCLUDE_DIRS}) target_link_libraries(ontologenius_dynamic_tester ontologenius_lib ${catkin_LIBRARIES}) diff --git a/README.md b/README.md index ab3625e2..f441966b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ontologenius +# ontologenius [![Release][Release-Image]][Release-Url] Master : [![Build Status](https://gitlab.com/sarthou/ontologenius/badges/master/pipeline.svg)](https://gitlab.com/sarthou/ontologenius/commits/master) Dev : [![Build Status](https://gitlab.com/sarthou/ontologenius/badges/dev/pipeline.svg)](https://gitlab.com/sarthou/ontologenius/commits/dev) @@ -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.2.12-1eb0fc.svg +[Release-image]: http://img.shields.io/badge/release-v0.3.0-1eb0fc.svg diff --git a/docs/Download.html b/docs/Download.html index 8e718ac9..57b731d4 100644 --- a/docs/Download.html +++ b/docs/Download.html @@ -1,7 +1,7 @@ - Download | Ontologenius 0.2.12 + Download | Ontologenius 0.3.0 @@ -90,6 +90,31 @@

Download

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

+

V0.3.0

+

01 / 08 / 2023

+ + +

V0.2.12

24 / 05 / 2023

diff --git a/docs/InstallOntologenius.html b/docs/InstallOntologenius.html index ac892aff..84b5c569 100644 --- a/docs/InstallOntologenius.html +++ b/docs/InstallOntologenius.html @@ -1,7 +1,7 @@ - Install | Ontologenius 0.2.12 + Install | Ontologenius 0.3.0 diff --git a/docs/Publications.html b/docs/Publications.html index 76eed1a7..2caa21c3 100644 --- a/docs/Publications.html +++ b/docs/Publications.html @@ -1,7 +1,7 @@ - Publications | Ontologenius 0.2.12 + Publications | Ontologenius 0.3.0 @@ -89,12 +89,20 @@

Publications

2021

-

Guillaume Sarthou : Knowledge representation and exploitation for interactive and cognitive robots. +

+ + [pdf] + + Guillaume Sarthou : Knowledge representation and exploitation for interactive and cognitive robots. Diss. Université Paul Sabatier, France, 2021.

2019

-

Guillaume Sarthou, Aurélie Clodic and Rachid Alami. Ontologenius : A long-term semantic memory for robotic agents. +

+ + [pdf] + + Guillaume Sarthou, Aurélie Clodic and Rachid Alami. Ontologenius : A long-term semantic memory for robotic agents. In International Conference on Robot & Human Interactive Communication (RO-MAN). New Delhi, India, 2019.

Related Publications

@@ -103,18 +111,34 @@

Related Publications

2021

-

Guillaume Sarthou, Guilhem Buisan, CLODIC, Aurélie Clodic, Rachid Alami : Extending Referring Expression Generation through shared knowledge about +

+ + [pdf] + + Guillaume Sarthou, Guilhem Buisan, CLODIC, Aurélie Clodic, Rachid Alami : Extending Referring Expression Generation through shared knowledge about past Human-Robot collaborative activity. In : IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). 2021.

-

Guillaume Sarthou, Amandine Mayima, Guilhem Buisan, Kathleen Belhassein, Aurélie Clodic : The Director Task: a Psychology-Inspired Task to Assess Cognitive and Interactive Robot Architectures. +

+ + [pdf] + + Guillaume Sarthou, Amandine Mayima, Guilhem Buisan, Kathleen Belhassein, Aurélie Clodic : The Director Task: a Psychology-Inspired Task to Assess Cognitive and Interactive Robot Architectures. In International Conference on Robot & Human Interactive Communication (RO-MAN). 2021.

2020

-

Guilhem Buisan, Guillaume Sarthou, Arthur Bit-Monnot, Aurélie Clodic, Rachid Alami : Efficient, Situated and Ontology based Referring Expression Generation for Human-Robot collaboration. +

+ + [pdf] + + Guilhem Buisan, Guillaume Sarthou, Arthur Bit-Monnot, Aurélie Clodic, Rachid Alami : Efficient, Situated and Ontology based Referring Expression Generation for Human-Robot collaboration. In International Conference on Robot & Human Interactive Communication (RO-MAN). Naples, Italy, 2020.

-

Guilhem Buisan, Guillaume Sarthou, Rachid Alami : Human Aware Task Planning Using Verbal Communication Feasibility and Costs +

+ + [pdf] + + Guilhem Buisan, Guillaume Sarthou, Rachid Alami : Human Aware Task Planning Using Verbal Communication Feasibility and Costs In International Conference on Social Robotics (ICSR). Golden, Colorado, 2020.

diff --git a/docs/SetUp.html b/docs/SetUp.html index 679ffd56..001f0990 100644 --- a/docs/SetUp.html +++ b/docs/SetUp.html @@ -1,7 +1,7 @@ - Set up | Ontologenius 0.2.12 + Set up | Ontologenius 0.3.0 @@ -93,20 +93,20 @@

Set Up Your Environnement

The package.xml in format 2 should look like this:

-
<package>
+
<package>
...
-
<buildtool_depend>catkin</buildtool_depend>
-
<build_depend>ontologenius</build_depend>
-
<build_depend>rospy</build_depend>
-
<build_depend>roscpp</build_depend>
-
<build_export_depend>ontologenius</build_export_depend>
-
<build_export_depend>rospy</build_export_depend>
-
<build_export_depend>roscpp</build_export_depend>
-
<exec_depend>ontologenius</exec_depend>
-
<exec_depend>rospy</exec_depend>
-
<exec_depend>roscpp</exec_depend>
+
<buildtool_depend>catkin</buildtool_depend>
+
<build_depend>ontologenius</build_depend>
+
<build_depend>rospy</build_depend>
+
<build_depend>roscpp</build_depend>
+
<build_export_depend>ontologenius</build_export_depend>
+
<build_export_depend>rospy</build_export_depend>
+
<build_export_depend>roscpp</build_export_depend>
+
<exec_depend>ontologenius</exec_depend>
+
<exec_depend>rospy</exec_depend>
+
<exec_depend>roscpp</exec_depend>
...
-
</package>
+
</package>

The CMakeLists.txt should look like this:

@@ -132,7 +132,7 @@

Set Up Your Environnement

The package.xml does not need to be modified. For the CMakeLists.txt, we will require a minimal version (optional) and include ontologenius API.

-
find_package(ontologenius 0.2.12 REQUIRED)
+
find_package(ontologenius 0.3.0 REQUIRED)
...
catkin_package(
# INCLUDE_DIRS include
diff --git a/docs/construction.html b/docs/construction.html index f9f6ac89..0459a479 100644 --- a/docs/construction.html +++ b/docs/construction.html @@ -8,7 +8,7 @@ - + diff --git a/docs/cpp_API/ActionClient.html b/docs/cpp_API/ActionClient.html index ca669e4f..452d1a1e 100644 --- a/docs/cpp_API/ActionClient.html +++ b/docs/cpp_API/ActionClient.html @@ -1,7 +1,7 @@ - ActionClient Class (cpp) | Ontologenius 0.2.12 + ActionClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -114,8 +124,9 @@

    ActionClient Class

    - + + +
    Header: #include "ontologenius/clients/ActionClient.h" -
    Inherits: ClientBase
    Header: #include "ontologenius/clients/ActionClient.h"
    Inherits: ClientBase
    Namespace: onto
    diff --git a/docs/cpp_API/ClassClient.html b/docs/cpp_API/ClassClient.html index b9cb768f..0cbb7c3d 100644 --- a/docs/cpp_API/ClassClient.html +++ b/docs/cpp_API/ClassClient.html @@ -1,7 +1,7 @@ - ClassClient Class (cpp) | Ontologenius 0.2.12 + ClassClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -113,8 +123,12 @@

    ClassClient Class

    The ClassClient class provides a ROS service abstraction for classes exploration. More...

    -
    Header: #include "ontologenius/clients/ontologyClients/ClassClient.h" -
    Inherits: OntologyClient
    + + Header: #include "ontologenius/clients/ontologyClients/ClassClient.h" + Inherits: OntologyClient + Namespace: onto + +
    diff --git a/docs/cpp_API/ClassIndexClient.html b/docs/cpp_API/ClassIndexClient.html new file mode 100644 index 00000000..8d1cc03a --- /dev/null +++ b/docs/cpp_API/ClassIndexClient.html @@ -0,0 +1,255 @@ + + + + ClassIndexClient Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    ClassIndexClient Class

    +

    The ClassIndexClient class provides a ROS service abstraction for classes exploration based on indexes. More...

    +
    + + + + + + +
    Header: #include "ontologenius/clientsIndex/ontologyClients/ClassIndexClient.h"
    Inherits: OntologyIndexClient
    Namespace: onto
    +
    + + +

    Public Functions

    +
    + + + + + + + + + + + + + + + + + +
    ClassIndexClient(ros::NodeHandle* n, const std::string& name)
    std::vector<int64_t> getDown(int64_t index, int depth = -1, int64_t selector = 0)
    std::vector<int64_t> getDisjoint(int64_t index)
    std::vector<int64_t> getOn(int64_t index, int64_t property, int64_t selector = 0)
    std::vector<int64_t> getFrom(int64_t property, int64_t index, int64_t selector = 0)
    std::vector<int64_t> getWith(int64_t class_from, int64_t class_to, int64_t selector = 0, int depth = -1)
    std::vector<int64_t> getRelatedFrom(int64_t property)
    std::vector<int64_t> getRelatedOn(int64_t property)
    std::vector<int64_t> getRelatedWith(int64_t index)
    std::vector<int64_t> getRelationFrom(int64_t index, int depth = -1)
    std::vector<int64_t> getRelationOn(int64_t index, int depth = -1)
    std::vector<int64_t> getRelationWith(int64_t index)
    std::vector<int64_t> getDomainOf(int64_t index, int64_t selector = 0, int depth = -1)
    std::vector<int64_t> getRangeOf(int64_t index, int64_t selector = 0, int depth = -1)
    +
    + + +

    Reimplemented Public Functions

    + + + +
    +

    Detailed Description

    +

    The ClassIndexClient class provides an abstraction of ontologenius classes ROS service.

    +

    The ontologenius classes service allows the exploration of classes contained by ontologenius core using indexes.

    +

    This class is based on ClientBaseIndex and so ensure a persistent connection with ontologenius/class_index service. + The persistent connection ensures a minimal response time. + A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual ClassClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also ClassClient.

    + +

    See also IndividualIndexClient, DataPropertyIndexClient and ObjectPropertyIndexClient.

    + +
    +

    Public Function Documentation

    + +

    ClassIndexClient::ClassIndexClient(ros::NodeHandle* n, const string& name)

    +

    Constructs a class client with a pointer to a NodeHandle n.

    +

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

    + +

    std::vector<int64_t> ClassIndexClient::getDown(int64_t index, int depth = -1, int64_t selector = 0)

    +

    Gives all classes below the one given in the parameter: index.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    +

    The optional selector parameter can be set to only get results inheriting from the selector class. The default value 0 represents no restriction on the result.

    + +

    std::vector<int64_t> ClassIndexClient::getDisjoint(int64_t index)

    +

    Gives all the disjoint classes of the one given in the parameter: index.

    + +

    std::vector<int64_t> ClassIndexClient::getOn(int64_t index, int64_t property, int64_t selector = 0)

    +

    Gives all the classes pointed by the property property and applied to the class index.

    +

    The optional selector parameter can be set to only get results inheriting from the selector class. The default value 0 represents no restriction on the result.

    + +

    std::vector<int64_t> ClassIndexClient::getFrom(int64_t property, int64_t index, int64_t selector = 0)

    +

    Gives all the classes having the given property property and pointing to the class index.

    +

    The optional selector parameter can be set to only get results inheriting from the selector class. The default value 0 represents no restriction on the result.

    + +

    std::vector<int64_t> ClassIndexClient::getWith(int64_t class_from, int64_t class_to, int64_t selector = 0, int depth = -1)

    +

    Gives all the properties linking the two classes class_from and class_to.

    +

    The optional selector parameter can be set to only get results inheriting from the selector property. The default value 0 represents no restriction on the result.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    std::vector<int64_t> ClassIndexClient::getRelatedFrom(int64_t property)

    +

    Gives all the classes possessing the property property.

    + +

    std::vector<int64_t> ClassIndexClient::getRelatedOn(int64_t property)

    +

    Gives all the classes pointed to by the property property.

    + +

    std::vector<int64_t> ClassIndexClient::getRelatedWith(int64_t index)

    +

    Gives all the classes having a property pointing to the class index.

    + +

    std::vector<int64_t> ClassIndexClient::getRelationFrom(int64_t index, int depth = -1)

    +

    Gives all the properties applied to the class index.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    std::vector<int64_t> ClassIndexClient::getRelationOn(int64_t index, int depth = -1)

    +

    Gives all the properties going to the class index.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    std::vector<int64_t> ClassIndexClient::getRelationWith(int64_t index)

    +

    Gives all the classes pointed by a property applied to the class index.

    + +

    std::vector<int64_t> ClassIndexClient::getDomainOf(int64_t index, int64_t selector = 0, int depth = -1)

    +

    Gives all the properties for which the class index is part of the domain.

    +

    The optional selector parameter can be set to only get results inheriting from the selector property. The default value 0 represents no restriction on the result.

    +

    The optional depth parameter can be set to limit tree propagation of the class to a specific value. The default value -1 represents no propagation limitation.

    + +

    std::vector<int64_t> ClassIndexClient::getRangeOf(int64_t index, int64_t selector = 0, int depth = -1)

    +

    Gives all the properties for which the class index is part of the range.

    +

    The optional selector parameter can be set to only get results inheriting from the selector property. The default value 0 represents no restriction on the result.

    +

    The optional depth parameter can be set to limit tree propagation of the class to a specific value. The default value -1 represents no propagation limitation.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/cpp_API/ClientBase.html b/docs/cpp_API/ClientBase.html index 12b69836..7d2285f8 100644 --- a/docs/cpp_API/ClientBase.html +++ b/docs/cpp_API/ClientBase.html @@ -1,7 +1,7 @@ - ClientBase Class (cpp) | Ontologenius 0.2.12 + ClientBase Class (cpp) | Ontologenius 0.3.0 @@ -98,6 +98,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -113,9 +123,11 @@

    ClientBase Class

    The ClientBase class provides a common ROS service abstraction. More...

    - -
    Header: #include "ontologenius/clients/ClientBase.h" -
    Inherited By: OntologyClient, ActionClient, ManagerClient, ReasonerClient
    + + + + +
    Header: #include "ontologenius/clients/ClientBase.h"
    Inherited By: OntologyClient, ActionClient, ManagerClient, ReasonerClient
    Namespace: onto
    diff --git a/docs/cpp_API/ClientBaseIndex.html b/docs/cpp_API/ClientBaseIndex.html new file mode 100644 index 00000000..63537c49 --- /dev/null +++ b/docs/cpp_API/ClientBaseIndex.html @@ -0,0 +1,225 @@ + + + + ClientBaseIndex Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    ClientBaseIndex Class

    +

    The ClientBaseIndex class provides a common ROS service abstraction. More...

    +
    + + + + +
    Header: #include "ontologenius/clientsIndex/ClientBaseIndex.h"
    Inherited By: OntologyIndexClient
    Namespace: onto
    +
    + + +

    Public Functions

    +
    + + + + + + +
    ClientBaseIndex(ros::NodeHandle* n, std::string name)
    size_t nb()
    resetNb()
    +
    + + +

    Protected Functions

    +
    + + + + + + + + + +
    std::vector<std::string> call(ontologenius::OntologeniusIndexService& srv)
    std::vector<int64_t> callIndexes(ontologenius::OntologeniusIndexService& srv)
    std::string callStr(ontologenius::OntologeniusIndexService& srv)
    int64_t callIndex(ontologenius::OntologeniusIndexService& srv)
    bool callNR(ontologenius::OntologeniusIndexService& srv)
    bool callBool(ontologenius::OntologeniusIndexService& srv)
    +
    + + +
    +

    Detailed Description

    +

    The ClientBaseIndex class provides an abstraction for any ROS services based on indexes.

    +

    This class ensure a persistent connection with the service based on. The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +
    + +

    See also ClientBase.

    + +
    +

    Public Function Documentation

    + +

    ClientBaseIndex::ClientBaseIndex(ros::NodeHandle* n, const std::string& name)

    +

    Constructs a ROS client linked to the service name with a pointer to a NodeHandle n.

    + +

    size_t ClientBaseIndex::nb()

    +

    Gives the total number of service calls from all ClientBaseIndex instances since the last reset.

    + +

    ClientBaseIndex::resetNb()

    +

    Reset Call Counter for all instances of ClientBaseIndex.

    + +

    Protected Function Documentation

    + +

    inline std::vector<std::string> ClientBaseIndex::call(ontologenius::OntologeniusIndexService& srv)

    +

    Calls the service set up in the constructor of ClientBaseIndex with the request srv

    +

    If the service call fails, the first element of the returned vector is "ERR:SERVICE_FAIL".

    + +

    inline std::vector<int64_t> ClientBaseIndex::callIndexes(ontologenius::OntologeniusIndexService& srv)

    +

    Calls the service set up in the constructor of ClientBaseIndex with the request srv

    +

    If the service call fails, the first element of the returned vector is 0.

    + +

    inline std::string ClientBaseIndex::callStr(ontologenius::OntologeniusIndexService& srv)

    +

    Calls the service set up in the constructor of ClientBaseIndex with the request srv

    +

    If the service call fails, the returned value is "ERR:SERVICE_FAIL".

    + +

    inline int64_t ClientBaseIndex::callIndex(ontologenius::OntologeniusIndexService& srv)

    +

    Calls the service set up in the constructor of ClientBaseIndex with the request srv

    +

    If the service call fails or has no response, the returned value is 0.

    + +

    inline bool ClientBaseIndex::callNR(ontologenius::OntologeniusIndexService& srv)

    +

    Calls the service set up in the constructor of ClientBaseIndex with the request srv

    +

    Returns false if the service call fails.

    + +

    inline bool ClientBaseIndex::callBool(ontologenius::OntologeniusIndexService& srv)

    +

    Calls the service set up in the constructor of ClientBaseIndex with the request srv

    +

    Returns false if the service call fails or the result code of the service is different from SUCCESS.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/cpp_API/ConversionClient.html b/docs/cpp_API/ConversionClient.html new file mode 100644 index 00000000..4aac0c35 --- /dev/null +++ b/docs/cpp_API/ConversionClient.html @@ -0,0 +1,279 @@ + + + + ConversionClient Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    ConversionClient Class

    +

    The ConversionClient class provides an abstraction to the ontologenius conversion ROS services. More...

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

    Public Functions

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ConversionClient(ros::NodeHandle* n, const std::string& name)
    verbose(bool verbose)
    std::vector<std::string> individualsIndex2Id(const std::vector<int64_t>& indexes)
    std::vector<std::string> classesIndex2Id(const std::vector<int64_t>& indexes)
    std::vector<std::string> dataPropertiesIndex2Id(const std::vector<int64_t>& indexes)
    std::vector<std::string> objectPropertiesIndex2Id(const std::vector<int64_t>& indexes)
    std::vector<std::string> literalsIndex2Id(const std::vector<int64_t>& indexes)
    std::string individualsIndex2Id(int64_t index)
    std::string classesIndex2Id(int64_t index)
    std::string dataPropertiesIndex2Id(int64_t index)
    std::string objectPropertiesIndex2Id(int64_t index)
    std::string literalsIndex2Id(int64_t index)
    std::vector<int64_t> individualsId2Index(const std::vector<std::string>& ids)
    std::vector<int64_t> classesId2Index(const std::vector<std::string>& ids)
    std::vector<int64_t> dataPropertiesId2Index(const std::vector<std::string>& ids)
    std::vector<int64_t> objectPropertiesId2Index(const std::vector<std::string>& ids)
    std::vector<int64_t> literalsId2Index(const std::vector<std::string>& ids)
    int64_t individualsId2Index(const std::string& id)
    int64_t classesId2Index(const std::string& id)
    int64_t dataPropertiesId2Index(const std::string& id)
    int64_t objectPropertiesId2Index(const std::string& id)
    int64_t literalsId2Index(const std::string& id)
    +
    + + +
    +

    Detailed Description

    +

    The ConversionClient class provides an abstraction to the ontologenius conversion ROS services to pass from identifiers to indexes and inverse.

    +

    This class ensures a persistent connection with the service based on. The persistent connection ensures a minimal response time. + A reconnection logic is implemented in the event that the persistent connection fails.

    +
    + +
    +

    Public Function Documentation

    + +

    ConversionClient::ConversionClient(ros::NodeHandle* n, const std::string& name)

    +

    Constructs an conversion client with a pointer to a NodeHandle n.

    +

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

    + +

    void ConversionClient::verbose(bool verbose)

    +

    If verbose is set to true, the clients will post messages about the failure to call the services and about their restoration.

    + +

    std::vector<std::string> ConversionClient::individualsIndex2Id(const std::vector<int64_t>& indexes)

    +

    Converts a vector of indexes representing individuals to identifiers.

    +

    Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    std::vector<std::string> ConversionClient::classesIndex2Id(const std::vector<int64_t>& indexes)

    +

    Converts a vector of indexes representing classes to identifiers.

    +

    Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    std::vector<std::string> ConversionClient::dataPropertiesIndex2Id(const std::vector<int64_t>& indexes)

    +

    Converts a vector of indexes representing data properties to identifiers.

    +

    Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    std::vector<std::string> ConversionClient::objectPropertiesIndex2Id(const std::vector<int64_t>& indexes)

    +

    Converts a vector of indexes representing object properties to identifiers.

    +

    Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    std::vector<std::string> ConversionClient::literalsIndex2Id(const std::vector<int64_t>& indexes)

    +

    Converts a vector of indexes representing literals to identifiers.

    +

    Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    std::string ConversionClient::individualsIndex2Id(int64_t index)

    +

    Converts an index representing an individual to its identifier.

    +

    Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.

    + +

    std::string ConversionClient::classesIndex2Id(int64_t index)

    +

    Converts an index representing a class to its identifier.

    +

    Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.

    + +

    std::string ConversionClient::dataPropertiesIndex2Id(int64_t index)

    +

    Converts an index representing a data property to its identifier.

    +

    Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.

    + +

    std::string ConversionClient::objectPropertiesIndex2Id(int64_t index)

    +

    Converts an index representing an object to its identifier.

    +

    Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.

    + +

    std::string ConversionClient::literalsIndex2Id(int64_t index)

    +

    Converts an index representing a literal to its identifier.

    +

    Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.

    + +

    std::vector<int64_t> ConversionClient::individualsId2Index(const std::vector<std::string>& ids)

    +

    Converts a vector of identifiers representing individuals to indexes.

    +

    Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    std::vector<int64_t> ConversionClient::classesId2Index(const std::vector<std::string>& ids)

    +

    Converts a vector of identifiers representing classes to indexes.

    +

    Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    std::vector<int64_t> ConversionClient::dataPropertiesId2Index(const std::vector<std::string>& ids)

    +

    Converts a vector of identifiers representing data properties to indexes.

    +

    Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    std::vector<int64_t> ConversionClient::objectPropertiesId2Index(const std::vector<std::string>& ids)

    +

    Converts a vector of identifiers representing object properties to indexes.

    +

    Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    std::vector<int64_t> ConversionClient::literalsId2Index(const std::vector<std::string>& ids)

    +

    Converts a vector of identifiers representing literals to indexes.

    +

    Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    int64_t ConversionClient::individualsId2Index(const std::string& id)

    +

    Converts an identifier representing an individual to its index.

    +

    Returns a single index. Unknown concept (or from wrong types) will be return as index 0.

    + +

    int64_t ConversionClient::classesId2Index(const std::string& id)

    +

    Converts an identifier representing a class to its index.

    +

    Returns a single index. Unknown concept (or from wrong types) will be return as index 0.

    + +

    int64_t ConversionClient::dataPropertiesId2Index(const std::string& id)

    +

    Converts an identifier representing a data property to its index.

    +

    Returns a single index. Unknown concept (or from wrong types) will be return as index 0.

    + +

    int64_t ConversionClient::objectPropertiesId2Index(const std::string& id)

    +

    Converts an identifier representing an object property to its index.

    +

    Returns a single index. Unknown concept (or from wrong types) will be return as index 0.

    + +

    int64_t ConversionClient::literalsId2Index(const std::string& id)

    +

    Converts an identifier representing a literal to its index.

    +

    Returns a single index. Unknown concept (or from wrong types) will be return as index 0.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/cpp_API/CppAPI.html b/docs/cpp_API/CppAPI.html index 7011e99e..d6737ac1 100644 --- a/docs/cpp_API/CppAPI.html +++ b/docs/cpp_API/CppAPI.html @@ -1,7 +1,7 @@ - C++ API (cpp) | Ontologenius 0.2.12 + C++ API (cpp) | Ontologenius 0.3.0 @@ -88,6 +88,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -129,6 +139,27 @@

    ReasonerClient

    SparqlClient

    The SparqlClient class provides a ROS service to explore ontologenius with SPARQL-like queries.

    +

    Index based Classes

    + +

    ClassIndexClient

    +

    The ClassIndexClient class provides a ROS service abstraction for classes exploration, based on indexes.

    +

    ClientBaseIndex

    +

    The ClientBaseIndex class provides a common ROS service abstraction for services based on indexes.

    +

    ConversionClient

    +

    The ConversionClient class provides an abstraction to the ontologenius conversion ROS services to pass from identifiers to indexes and inverse.

    +

    DataPropertyIndexClient

    +

    The DataPropertyIndexClient class provides a ROS service abstraction for data properties exploration, based on indexes.

    +

    IndividualIndexClient

    +

    The IndividualIndexClient class provides a ROS service abstraction for individuals exploration, based on indexes.

    +

    ObjectPropertyIndexClient

    +

    The ObjectPropertyIndexClient class provides a ROS service abstraction for object properties exploration, based on indexes.

    +

    OntologyIndexClient

    +

    The OntologyIndexClient class provides a common ROS service abstraction for all exploration service based on indexes.

    +

    OntologyManipulatorIndex

    +

    The OntologyManipulatorIndex class is an object with instances of all classes needed to manipulate an ontology, based on indexes.

    +

    SparqlIndexClient

    +

    The SparqlIndexClient class provides a ROS service to explore ontologenius with SPARQL-like queries, based on indexes.

    +
    diff --git a/docs/cpp_API/DataPropertyClient.html b/docs/cpp_API/DataPropertyClient.html index 2b93dc4a..1de52307 100644 --- a/docs/cpp_API/DataPropertyClient.html +++ b/docs/cpp_API/DataPropertyClient.html @@ -1,7 +1,7 @@ - DataPropertyClient Class (cpp) | Ontologenius 0.2.12 + DataPropertyClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -112,9 +122,11 @@

    DataPropertyClient Class

    The DataPropertyClient class provides a ROS service abstraction for data properties exploration. More...

    - -
    Header: #include "ontologenius/clients/ontologyClients/DataPropertyClient.h" -
    Inherits: OntologyClient
    + + + + +
    Header: #include "ontologenius/clients/ontologyClients/DataPropertyClient.h"
    Inherits: OntologyClient
    Namespace: onto
    diff --git a/docs/cpp_API/DataPropertyIndexClient.html b/docs/cpp_API/DataPropertyIndexClient.html new file mode 100644 index 00000000..306f1bee --- /dev/null +++ b/docs/cpp_API/DataPropertyIndexClient.html @@ -0,0 +1,206 @@ + + + + DataPropertyIndexClient Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    DataPropertyIndexClient Class

    +

    The DataPropertyIndexClient class provides a ROS service abstraction for data properties exploration. More...

    +
    + + + + +
    Header: #include "ontologenius/clientsIndex/ontologyClients/DataPropertyIndexClient.h"
    Inherits: OntologyIndexClient
    Namespace: onto
    +
    + + +

    Public Functions

    +
    + + + + + + + + +
    DataPropertyIndexClient(ros::NodeHandle* n, const std::string& name)
    std::vector<int64_t> getDown(int64_t index, int depth = -1)
    std::vector<int64_t> getDisjoint(int64_t index)
    std::vector<int64_t> getDomain(int64_t index)
    std::vector<int64_t> getRange(int64_t index)
    +
    + + +

    Reimplemented Public Functions

    + + + +
    +

    Detailed Description

    +

    The DataPropertyIndexClient class provides an abstraction of ontologenius data properties ROS service.

    +

    The ontologenius data properties service allows the exploration of data properties contained by ontologenius core using indexes.

    +

    This class is based on ClientBaseIndex and so ensure a persistent connection with ontologenius/data_property_index service. + The persistent connection ensures a minimal response time. + A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual DataPropertyClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also DataPropertyClient.

    + +

    See also IndividualIndexClient, ClassIndexClient and ObjectPropertyIndexClient.

    + +
    +

    Public Function Documentation

    + +

    DataPropertyIndexClient::DataPropertyIndexClient(ros::NodeHandle* n, const std::string& name)

    +

    Constructs a data property client with a pointer to a NodeHandle n.

    +

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

    + +

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

    +

    Gives all properties below the one given in the parameter: index.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

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

    +

    Gives all the disjoint properties of the property index.

    + +

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

    +

    Gives all the domain classes of the property index.

    + +

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

    +

    Gives all the ranges types of the property index.

    + +
    +
    +
    + +
    + + + + + diff --git a/docs/cpp_API/FeederPublisher.html b/docs/cpp_API/FeederPublisher.html index 9818f8db..5c4f96a0 100644 --- a/docs/cpp_API/FeederPublisher.html +++ b/docs/cpp_API/FeederPublisher.html @@ -1,7 +1,7 @@ - FeederPublisher Class (cpp) | Ontologenius 0.2.12 + FeederPublisher Class (cpp) | Ontologenius 0.3.0 @@ -96,6 +96,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -114,6 +124,7 @@

    FeederPublisher Class

    Header: #include "ontologenius/FeederPublisher.h" +
    Namespace: onto
    diff --git a/docs/cpp_API/IndividualClient.html b/docs/cpp_API/IndividualClient.html index c5e04fff..f703945a 100644 --- a/docs/cpp_API/IndividualClient.html +++ b/docs/cpp_API/IndividualClient.html @@ -1,7 +1,7 @@ - IndividualClient Class (cpp) | Ontologenius 0.2.12 + IndividualClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -113,8 +123,11 @@

    IndividualClient Class

    The IndividualClient class provides a ROS service abstraction for individuals exploration. More...

    -
    Header: #include "ontologenius/clients/ontologyClients/IndividualClient.h" -
    Inherits: OntologyClient
    + + Header: #include "ontologenius/clients/ontologyClients/IndividualClient.h" + Inherits: OntologyClient + Namespace: onto +
    diff --git a/docs/cpp_API/IndividualIndexClient.html b/docs/cpp_API/IndividualIndexClient.html new file mode 100644 index 00000000..a21422d9 --- /dev/null +++ b/docs/cpp_API/IndividualIndexClient.html @@ -0,0 +1,255 @@ + + + + IndividualIndexClient Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    IndividualIndexClient Class

    +

    The IndividualIndexClient class provides a ROS service abstraction for individuals exploration. More...

    +
    + + + + + +
    Header: #include "ontologenius/clientsIndex/ontologyClients/IndividualIndexClient.h"
    Inherits: OntologyIndexClient
    Namespace: onto
    +
    + + +

    Public Functions

    +
    + + + + + + + + + + + + + + + + + + +
    IndividualIndexClient(ros::NodeHandle* n, const std::string& name)
    std::vector<int64_t> getType(int64_t index)
    std::vector<int64_t> getSame(int64_t index)
    std::vector<int64_t> getDistincts(int64_t index)
    std::vector<int64_t> getOn(int64_t index, int64_t property, int64_t selector = 0)
    std::vector<int64_t> getFrom(int64_t property, int64_t index, int64_t selector = 0)
    std::vector<int64_t> getWith(int64_t index_from, int64_t index_to, int64_t selector = 0, int depth = -1)
    std::vector<int64_t> getRelatedFrom(int64_t property)
    std::vector<int64_t> getRelatedOn(int64_t property)
    std::vector<int64_t> getRelatedWith(int64_t index)
    std::vector<int64_t> getRelationFrom(int64_t index, int depth = -1)
    std::vector<int64_t> getRelationOn(int64_t index, int depth = -1)
    std::vector<int64_t> getRelationWith(int64_t index)
    std::vector<int64_t> getDomainOf(int64_t index, int64_t selector = 0, int depth = -1)
    std::vector<int64_t> getRangeOf(int64_t index, int64_t selector = 0, int depth = -1)
    +
    + + +

    Reimplemented Public Functions

    + + + +
    +

    Detailed Description

    +

    The IndividualIndexClient class provides an abstraction of ontologenius individuals ROS service.

    +

    The ontologenius individuals' service allows the exploration of individuals contained by ontologenius core using indexes

    +

    This class is based on ClientBaseIndex and so ensure a persistent connection with ontologenius/individual service. + The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual IndividualClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also IndividualClient.

    + +

    See also ClassIndexClient, DataPropertyIndexClient and ObjectPropertyIndexClient.

    + +
    +

    Public Function Documentation

    + +

    IndividualIndexClient::IndividualIndexClient(ros::NodeHandle* n, const std::string& name)

    +

    Constructs an individual client with a pointer to a NodeHandle n.

    +

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

    + +

    std::vector<int64_t> IndividualIndexClient::getType(int64_t index)

    +

    Gives all the individuals of the type of the given class index.

    + +

    std::vector<int64_t> IndividualIndexClient::getSame(int64_t index)

    +

    Gives all the individuals that are defined as being identical to the individual index.

    + +

    std::vector<int64_t> IndividualIndexClient::getDistincts(int64_t index)

    +

    Gives all the defined individuals as being distinct from the individual index.

    + +

    std::vector<int64_t> IndividualIndexClient::getOn(int64_t index, int64_t property, int64_t selector = 0)

    +

    Gives all the individuals pointed by the property property and applied to the individual index.

    +

    The optional selector parameter can be set to only get results inheriting from the selector class. The default value "" represents no restriction on the result.

    + +

    std::vector<int64_t> IndividualIndexClient::getFrom(int64_t property, int64_t index, int64_t selector = 0)

    +

    Gives all the individuals having the given property property and pointing to the individual index.

    +

    The optional selector parameter can be set to only get results inheriting from the selector class. The default value "" represents no restriction on the result.

    + +

    std::vector<int64_t> IndividualIndexClient::getWith(int64_t index_from, int64_t index_to, int64_t selector = 0, int depth = -1)

    +

    Gives all the properties linking the individual index_from to the individual index_to.

    +

    The optional selector parameter can be set to only get results inheriting from the selector property. The default value "" represents no restriction on the result.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    std::vector<int64_t> IndividualIndexClient::getRelatedFrom(int64_t property)

    +

    Gives all the individuals possessing the property property.

    + +

    std::vector<int64_t> IndividualIndexClient::getRelatedOn(int64_t property)

    +

    Gives all the individuals pointed to by the property property.

    + +

    std::vector<int64_t> IndividualIndexClient::getRelatedWith(int64_t index)

    +

    Gives all the individuals having a property pointing to the individual index.

    + +

    std::vector<int64_t> IndividualIndexClient::getRelationFrom(int64_t index, int depth = -1)

    +

    Gives all the properties applied to the individual index.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    std::vector<int64_t> IndividualIndexClient::getRelationOn(int64_t index, int depth = -1)

    +

    Gives all the properties going to the individual index.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    std::vector<int64_t> IndividualIndexClient::getRelationWith(int64_t index)

    +

    Gives all the individuals pointed by a property applied to the individual name.

    + +

    std::vector<int64_t> IndividualIndexClient::getDomainOf(int64_t index, int64_t selector = 0, int depth = -1)

    +

    Gives all the properties for which the individual index is part of the domain.

    +

    The optional selector parameter can be set to only get results inheriting from the selector property. The default value "" represents no restriction on the result.

    +

    The optional depth parameter can be set to limit tree propagation of the individual to a specific value. The default value -1 represents no propagation limitation.

    + +

    std::vector<int64_t> IndividualIndexClient::getRangeOf(int64_tg index, int64_t selector = 0, int depth = -1)

    +

    Gives all the properties for which the individual index is part of the range.

    +

    The optional selector parameter can be set to only get results inheriting from the selector property. The default value "" represents no restriction on the result.

    +

    The optional depth parameter can be set to limit tree propagation of the individual to a specific value. The default value -1 represents no propagation limitation.

    + +
    +
    +
    + +
    + + + + + diff --git a/docs/cpp_API/ManagerClient.html b/docs/cpp_API/ManagerClient.html index b030738c..c75e7f22 100644 --- a/docs/cpp_API/ManagerClient.html +++ b/docs/cpp_API/ManagerClient.html @@ -1,7 +1,7 @@ - ManagerClient Class (cpp) | Ontologenius 0.2.12 + ManagerClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -114,9 +124,11 @@

    ManagerClient Class

    - -
    Header: #include "ontologenius/clients/ManagerClient.h" -
    Inherits: ClientBase
    Inherited By: OntologiesManipulator
    + Header: #include "ontologenius/clients/ManagerClient.h" + Inherits: ClientBase + Inherited By: OntologiesManipulator + Namespace: onto +
    diff --git a/docs/cpp_API/ObjectPropertyClient.html b/docs/cpp_API/ObjectPropertyClient.html index 7541a98f..59e8e9c2 100644 --- a/docs/cpp_API/ObjectPropertyClient.html +++ b/docs/cpp_API/ObjectPropertyClient.html @@ -1,7 +1,7 @@ - ObjectPropertyClient Class (cpp) | Ontologenius 0.2.12 + ObjectPropertyClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -113,8 +123,12 @@

    ObjectPropertyClient Class

    The ObjectPropertyClient class provides a ROS service abstraction for object properties exploration. More...

    -
    Header: #include "ontologenius/clients/ontologyClients/ObjectPropertyClient.h" -
    Inherits: OntologyClient
    + + Header: #include "ontologenius/clients/ontologyClients/ObjectPropertyClient.h" + Inherits: OntologyClient + Namespace: onto + +
    diff --git a/docs/cpp_API/ObjectPropertyIndexClient.html b/docs/cpp_API/ObjectPropertyIndexClient.html new file mode 100644 index 00000000..a430eab0 --- /dev/null +++ b/docs/cpp_API/ObjectPropertyIndexClient.html @@ -0,0 +1,211 @@ + + + + ObjectPropertyIndexClient Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    ObjectPropertyIndexClient Class

    +

    The ObjectPropertyIndexClient class provides a ROS service abstraction for object properties exploration. More...

    +
    + + + + + + +
    Header: #include "ontologenius/clientsIndex/ontologyClients/ObjectPropertyIndexClient.h"
    Inherits: OntologyIndexClient
    Namespace: onto
    +
    + + +

    Public Functions

    +
    + + + + + + + + + +
    ObjectPropertyIndexClient(ros::NodeHandle* n, const std::string& name)
    std::vector<int64_t> getDown(int64_t index, int depth = -1)
    std::vector<int64_t> getDisjoint(int64_t; index)
    std::vector<int64_t> getDomain(int64_t index)
    std::vector<int64_t> getRange(int64_t index)
    std::vector<int64_t> getInverse(int64_t index)
    +
    + + +

    Reimplemented Public Functions

    + + + +
    +

    Detailed Description

    +

    The ObjectPropertyIndexClient class provides an abstraction of ontologenius object properties ROS service.

    +

    The ontologenius object properties service allows the exploration of object properties contained by ontologenius core.

    +

    This class is based on ClientBaseIndex and so ensure a persistent connection with ontologenius/object_property service. + The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual ObjectPropertyClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also ObjectPropertyClient.

    + +

    See also ClassIndexClient, IndividualIndexClient and DataPropertyIndexClient.

    + +
    +

    Public Function Documentation

    + +

    ObjectPropertyIndexClient::ObjectPropertyIndexClient(ros::NodeHandle* n, const std::string& name)

    +

    Constructs am object property client with a pointer to a NodeHandle n.

    +

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

    + +

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

    +

    Gives all properties below the one given in the parameter: index.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

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

    +

    Gives all the disjoint properties of the property index.

    + +

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

    +

    Gives all the domain classes of the property index.

    + +

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

    +

    Gives all the ranges classes of the property index.

    + +

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

    +

    Gives all the inverses properties of the property index.

    + +
    +
    +
    + +
    + + + + + diff --git a/docs/cpp_API/OntologiesManipulator.html b/docs/cpp_API/OntologiesManipulator.html index 741204e9..16de1321 100644 --- a/docs/cpp_API/OntologiesManipulator.html +++ b/docs/cpp_API/OntologiesManipulator.html @@ -1,7 +1,7 @@ - OntologiesManipulator Class (cpp) | Ontologenius 0.2.12 + OntologiesManipulator Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -110,12 +120,13 @@

    OntologiesManipulator Class

    -

    The OntologiesManipulator class is an interface to manage several instance of OntologyManipulator in a multi-ontology usage. More...

    +

    The OntologiesManipulator class is an interface to manage several instance of OntologyManipulator and OntologyIndexManipulator in a multi-ontology usage. More...

    -
    Header: #include "ontologenius/OntologiesManipulator.h" -
    Inherits: ManagerClient
    + Header: #include "ontologenius/OntologiesManipulator.h" + Inherits: ManagerClient + Namespace: onto
    @@ -129,6 +140,7 @@

    Public Functions

    waitInit(int32_t timeout = -1) OntologyManipulator* operator[](const std::string& name) OntologyManipulator* get(const std::string& name) + OntologyIndexManipulator* getIndex(const std::string& name) verbose(bool verbose) @@ -175,19 +187,23 @@

    OntologyIndexManipulator* OntologiesManipulator::getIndex(const std::string& name)

    +

    Returns a pointer on the OntologyIndexManipulator instance named name.

    +

    Returns nullptr if no OntologyIndexManipulator instance is named name.

    +

    bool OntologiesManipulator::add(const std::string& name)

    -

    Creates a new instance of ontologyManipulator identified by the name name.

    +

    Creates a new instance of ontologyManipulator and OntologyIndexManipulator identified by the name name.

    Returns false if the creation fails. Returns true even if the instance already exists.

    bool OntologiesManipulator::copy(const std::string& dest_name, const std::string& src_name)

    -

    Creates a new instance of ontologyManipulator identified by the name dest_name that manipulates a copy of the ontology handled by the ontologyManipulator src_name.

    +

    Creates a new instance of ontologyManipulator and OntologyIndexManipulator identified by the name dest_name that manipulates a copy of the ontology handled by the ontologyManipulator src_name.

    Returns false if the copy fails. Returns true even if the instance already exists.

    bool OntologiesManipulator::del(const std::string& name)

    -

    Deletes the instance of ontologyManipulator identified by the name name.

    +

    Deletes the instance of ontologyManipulator and OntologyIndexManipulator identified by the name name.

    Returns false deletion fails. Returns true even if the instance does not exist.

    -

    OntologyManipulator::verbose(bool verbose)

    +

    OntologiesManipulator::verbose(bool verbose)

    If verbose is set to true, the clients will post messages about the failure to call the services and about their restoration.

    diff --git a/docs/cpp_API/OntologyClient.html b/docs/cpp_API/OntologyClient.html index 1cc07d64..70ad68f9 100644 --- a/docs/cpp_API/OntologyClient.html +++ b/docs/cpp_API/OntologyClient.html @@ -1,7 +1,7 @@ - OntologyClient Class (cpp) | Ontologenius 0.2.12 + OntologyClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -114,9 +124,10 @@

    OntologyClient Class

    - - + + + +
    Header: #include "ontologenius/clients/ontologyClients/OntologyClient.h" -
    Inherits: ClientBase
    Inherited By: IndividualClient, ClassClient, DataPropertyClient, ObjectPropertyClient
    Header: #include "ontologenius/clients/ontologyClients/OntologyClient.h"
    Inherits: ClientBase
    Inherited By: IndividualClient, ClassClient, DataPropertyClient, ObjectPropertyClient
    Namespace: onto
    diff --git a/docs/cpp_API/OntologyIndexClient.html b/docs/cpp_API/OntologyIndexClient.html new file mode 100644 index 00000000..3938ffc4 --- /dev/null +++ b/docs/cpp_API/OntologyIndexClient.html @@ -0,0 +1,254 @@ + + + + OntologyIndexClient Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    OntologyIndexClient Class

    +

    The OntologyIndexClient class provides a common ROS service abstraction for all exploration service. More...

    +
    + + + + + + + +
    Header: #include "ontologenius/clientsIndex/ontologyClients/OntologyIndexClient.h"
    Inherits: ClientBaseIndex
    Inherited By: IndividualIndexClient, ClassIndexClient, DataPropertyIndexClient, ObjectPropertyIndexClient
    Namespace: onto
    +
    + + +

    Public Functions

    +
    + + + + + + + + + + + + + + +
    OntologyIndexClient(ros::NodeHandle* n, const std::string& name)
    std::vector<int64_t> getUp(int64_t index, int depth = -1, int64_t selector = 0)
    bool isA(int64_t index, int64_t base_class)
    std::string getName(int64_t index, bool take_id = true)
    std::vector<std::string> getNames(int64_t index, bool take_id = true)
    std::vector<std::string> getEveryNames(int64_t index, bool take_id = true)
    std::vector<int64_t> find(const std::string& name, bool take_id = true, int64_t selector = 0)
    std::vector<int64_t> findSub(const std::string& name, bool take_id = true, int64_t selector = 0)
    std::vector<int64_t> findRegex(const std::string& regex, bool take_id = true, int64_t selector = 0)
    std::vector<std::string> findFuzzy(const std::string& name, double threshold = 0.5, bool take_id = true, int64_t selector = 0)
    bool exist(int64_t index)
    +
    + + +

    Reimplemented Public Functions

    + + + +
    +

    Detailed Description

    +

    The OntologyIndexClient class provides an abstraction common to all ontologenius exploration ROS services.

    +

    The OntologyIndexClient implements the functions common to every ontologenius exploration based on indexes.

    +

    This class is based on ClientBaseIndex and so ensure a persistent connection with the service based on. + The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual OntologyClient class, this one provides access to the interfaces based on indexes (integers) for better performances.

    +
    + +

    See also OntologyClient.

    + +

    See also IndividualIndexClient, ClassIndexClient, DataPropertyIndexClient and ObjectPropertyIndexClient.

    + +
    +

    Public Function Documentation

    + +

    OntologyIndexClient::OntologyIndexClient(ros::NodeHandle* n, const std::string& name)

    +

    Constructs an ontology client linked to the service ontologenius/name with a pointer to a NodeHandle n.

    + +

    std::vector<int64_t> OntologyIndexClient::getUp(int64_t index, int depth = -1, int64_t selector = 0)

    +

    Gives all concepts below the one given in the parameter: index.

    +

    The optional depth parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    +

    The optional selector parameter can be set to only get results inheriting from the selector concept. The default value "" represents no restriction on the result.

    + +

    bool OntologyIndexClient::isA(int64_t index, int64_t base_class)

    +

    Returns true if the concept index is or inherits of the concept base_class. This function corresponds to checking if class_base is part of the result of the function getUp applies to the concept index

    + +

    std::string OntologyIndexClient::getName(int64_t index, bool take_id = true)

    +

    Gives one of the label of the concept index that is not muted.

    +

    The default take_id argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The result of this function depends on the setting of the working language.

    + +

    std::vector<std::string> OntologyIndexClient::getNames(int64_t index, bool take_id = true)

    +

    Gives all the labels of the concept index excepted the muted ones.

    +

    The default take_id argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The result of this function depends on the setting of the working language.

    + +

    std::vector<std::string> OntologyIndexClient::getEveryNames(int64_t index, bool take_id = true)

    +

    Gives all the labels of the concept index even the muted ones.

    +

    The default take_id argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The result of this function depends on the setting of the working language.

    + +

    std::vector<int64_t> OntologyIndexClient::find(const std::string& name, bool take_id = true, int64_t selector = 0)

    +

    Gives all the concepts having for label name.

    +

    The default take_id argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The optional selector parameter can be set to only get results inheriting from the selector concept. The default value "" represents no restriction on the result.

    +

    The result of this function depends on the setting of the working language.

    + +

    std::vector<int64_t> OntologyIndexClient::findSub(const std::string& name, bool take_id = true, int64_t selector = 0)

    +

    Gives all the concepts having for label a subset of name.

    +

    The default take_id argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The optional selector parameter can be set to only get results inheriting from the selector concept. The default value "" represents no restriction on the result.

    +

    The result of this function depends on the setting of the working language.

    + +

    std::vector<int64_t> OntologyIndexClient::findRegex(const std::string& regex, bool take_id = true, int64_t selector = 0)

    +

    Gives all concepts with a label matching the regular expression regex.

    +

    The default take_id argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The optional selector parameter can be set to only get results inheriting from the selector concept. The default value "" represents no restriction on the result.

    +

    The result of this function depends on the setting of the working language.

    + +

    std::vector<std::string> OntologyIndexClient::findFuzzy(const std::string& name, double threshold = 0.5, bool take_id = true, int64_t selector = 0)

    +

    Gives all the names of concepts with the lowest edit distance with parameter name.

    +

    The default take_id argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The optional selector parameter can be set to only get results inheriting from the selector concept. The default value "" represents no restriction on the result.

    +

    The result of this function depends on the setting of the working language and does not correspond to the concept identifiers but to other labels known by ontologenius.

    +

    The minimum editing distance can be set with the threshold parameter. This value corresponds to the number of changes to be made to pass from one word to another divided by the length of the comparison word.

    + +

    bool OntologyIndexClient::exist(int64_t index)

    +

    Returns true if the concept name exists in the subpart of the ontology managed by the client (i.e. class, individuals, object properties, data properties).

    + + +

    Muted labels

    +

    Ontologenius introduces the concept of muted label. They are written <onto:label> in an OWL file.

    +

    A muted label will be useful for adding labels with errors. These labels will allow you to find a concept with an error but will make sure you never use it in output (using getName).

    +
    +
    +
    + +
    + + + + + diff --git a/docs/cpp_API/OntologyManipulator.html b/docs/cpp_API/OntologyManipulator.html index 3eb8f658..8098ed51 100644 --- a/docs/cpp_API/OntologyManipulator.html +++ b/docs/cpp_API/OntologyManipulator.html @@ -1,7 +1,7 @@ - OntologyManipulator Class (cpp) | Ontologenius 0.2.12 + OntologyManipulator Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -115,6 +125,7 @@

    OntologyManipulator Class

    Header: #include "ontologenius/OntologyManipulator.h" +
    Namespace: onto
    diff --git a/docs/cpp_API/OntologyManipulatorIndex.html b/docs/cpp_API/OntologyManipulatorIndex.html new file mode 100644 index 00000000..aa95f906 --- /dev/null +++ b/docs/cpp_API/OntologyManipulatorIndex.html @@ -0,0 +1,245 @@ + + + + OntologyManipulatorIndex Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    OntologyManipulatorIndex Class

    +

    The OntologyManipulatorIndex class is an object with instances of all classes needed to manipulate an ontology based on indexes.More...

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

    Public Attributes

    +
    + +
    + + +

    Public Functions

    +
    + + + + + + + + + +
    OntologyManipulatorIndex(const std::string& name = "")
    OntologyManipulatorIndex(const OntologyManipulatorIndex& other)
    bool close()
    size_t nb()
    resetNb()
    verbose(bool verbose)
    +
    + + +
    +

    Detailed Description

    +

    The OntologyManipulatorIndex class is just an object to access all API ROS abstraction classes so that you can query and manage ontologenius.

    +

    At the difference of the usual OntologyManipulator class, this one provides access to the interfaces based on indexes (integers) for better performances.

    +
    + +

    See also OntologiesManipulator and OntologyManipulator.

    + +
    +

    Public Attribute Documentation

    + +

    individuals : IndividualIndexClient

    +

    ROS service client to query ontologenius about individuals using indexes.

    + +

    objectProperties : ObjectPropertyIndexClient

    +

    ROS service client to query ontologenius about object properties using indexes.

    + +

    dataProperties : DataPropertyIndexClient

    +

    ROS service client to query ontologenius about data properties using indexes.

    + +

    classes : ClassIndexClient

    +

    ROS service client to query ontologenius about classes using indexes.

    + +

    actions : ActionClient

    +

    ROS service client to manage the ontology instance.

    + +

    reasoners : ReasonerClient

    +

    ROS service client to manage reasoners plugins.

    + +

    feeder : FeederPublisher

    +

    ROS Publisher to insert and delete knowledge dynamically.

    + +

    sparql : SparqlIndexClient

    +

    ROS service client to make SPARQL queries using indexes.

    + +

    conversion : ConversionClient

    +

    ROS service client to to convert indentifiers to indexes and inverse.

    +
    + +
    +

    Public Function Documentation

    + +

    OntologyManipulatorIndex::OntologyManipulatorIndex(const std::string& name = "")

    +

    Constructs an index based ontology manipulator.

    +

    Can be used in a multi-ontology mode by specifying the name of the ontology name. For classic use, do not specify the ontology name name.

    + +

    OntologyManipulatorIndex::OntologyManipulatorIndex(const OntologyManipulatorIndex& other)

    +

    OntologyManipulatorIndex copy constructor.

    + +

    size_t OntologyManipulatorIndex::nb()

    +

    Gives the total number of service calls from all ROS clients instances since the last reset.

    + +

    OntologyManipulatorIndex::resetNb()

    +

    Reset Call Counter for all instances of ROS clients.

    + +

    bool OntologyManipulatorIndex::close()

    +

    Same as the ActionClient closing function. Link all the concepts loaded from files and the Internet. Before closing an ontology, exploration requests are not allowed.

    +

    Returns false if the service call fails.

    + +

    OntologyManipulatorIndex::verbose(bool verbose)

    +

    If verbose is set to true, the clients will post messages about the failure to call the services and about their restoration.

    + +
    +
    +
    + +
    + + + + + diff --git a/docs/cpp_API/ReasonerClient.html b/docs/cpp_API/ReasonerClient.html index f554e3ab..94286e69 100644 --- a/docs/cpp_API/ReasonerClient.html +++ b/docs/cpp_API/ReasonerClient.html @@ -1,7 +1,7 @@ - ReasonerClient Class (cpp) | Ontologenius 0.2.12 + ReasonerClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -114,8 +124,9 @@

    ReasonerClient Class

    - + + +
    Header: #include "ontologenius/clients/ReasonerClient.h" -
    Inherits: ClientBase
    Header: #include "ontologenius/clients/ReasonerClient.h"
    Inherits: ClientBase
    Namespace: onto
    diff --git a/docs/cpp_API/SparqlClient.html b/docs/cpp_API/SparqlClient.html index f2eba63b..3520f473 100644 --- a/docs/cpp_API/SparqlClient.html +++ b/docs/cpp_API/SparqlClient.html @@ -1,7 +1,7 @@ - SparqlClient Class (cpp) | Ontologenius 0.2.12 + SparqlClient Class (cpp) | Ontologenius 0.3.0 @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • @@ -113,9 +123,8 @@

    SparqlClient Class

    - - - + +
    Header: #include "ontologenius/clients/SparqlClient.h"
    Header: #include "ontologenius/clients/SparqlClient.h"
    Namespace: onto
    diff --git a/docs/cpp_API/SparqlIndexClient.html b/docs/cpp_API/SparqlIndexClient.html new file mode 100644 index 00000000..874306cb --- /dev/null +++ b/docs/cpp_API/SparqlIndexClient.html @@ -0,0 +1,192 @@ + + + + SparqlIndexClient Class (cpp) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    SparqlIndexClient Class

    +

    The SparqlIndexClient class provides a ROS service to explore ontologenius with SPARQL-like queries. More...

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

    Methods

    +
    + + + + + +
    SparqlIndexClient(ros::NodeHandle* n, const std::string& name)
    std::vector<OntologeniusSparqlIndexResponse> call(const std::string& query)
    +
    + + +
    +

    Detailed Description

    +

    The SparqlIndexClient class provides a ROS service to explore ontologenius with SPARQL-like queries.

    +

    The variables start with the symbol ? (e.g. ?my_var) and each triplet is separated by a dot.

    +

    At the difference of the usual SparqlClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also SparqlClient.

    + +
    +

    Methods Documentation

    + +

    SparqlIndexClient(ros::NodeHandle* n, const std::string& name)

    +

    Constructs a sparql client.

    +

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

    + +

    std::vector<OntologeniusSparqlIndexResponse> call(const std::string& query)

    + +

    Basic query Examples

    + +

    The general structure is always the same:

    +
    +

    SELECT * // or ?x to get specific variables

    +

    WHERE {

    +

    // pattern

    +

    }

    +
    +

    You can also add the DISTINCT keyword just after the SELECT to ensure unique results. + The following blocks are examples of possible patterns.

    + +
    +
    +
    + +
    + + + + + diff --git a/docs/cpp_Tutorials/Tutorials.html b/docs/cpp_Tutorials/Tutorials.html index 9efab560..3c432090 100644 --- a/docs/cpp_Tutorials/Tutorials.html +++ b/docs/cpp_Tutorials/Tutorials.html @@ -1,14 +1,14 @@ - Cpp Tutorials | Ontologenius 0.2.12 + Cpp Tutorials | Ontologenius 0.3.0 - + @@ -90,6 +90,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -330,6 +340,38 @@

    +
    + +
    + +
    +
    +

    Speed up your algorithms

    +
    +
    + +
    +
    +
    +
      +

      Run Forrest! Run !

      +
    1. +

      + + 1. Overview + +

      +
    2. +
    3. +

      + + 2. Solution + +

      +
    4. +
    +
    + diff --git a/docs/cpp_Tutorials/tutorial1/FindTheIntruder.html b/docs/cpp_Tutorials/tutorial1/FindTheIntruder.html index b9a7acf8..81f6d61f 100644 --- a/docs/cpp_Tutorials/tutorial1/FindTheIntruder.html +++ b/docs/cpp_Tutorials/tutorial1/FindTheIntruder.html @@ -99,6 +99,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html b/docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html index 605fe902..7c19963c 100644 --- a/docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html +++ b/docs/cpp_Tutorials/tutorial1/LaunchTheProgram.html @@ -99,6 +99,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial1/ManageTheMultilingual.html b/docs/cpp_Tutorials/tutorial1/ManageTheMultilingual.html index 43498b79..280d52f2 100644 --- a/docs/cpp_Tutorials/tutorial1/ManageTheMultilingual.html +++ b/docs/cpp_Tutorials/tutorial1/ManageTheMultilingual.html @@ -99,6 +99,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial1/MostRelevantIntruder.html b/docs/cpp_Tutorials/tutorial1/MostRelevantIntruder.html index f71a697c..a12f9e21 100644 --- a/docs/cpp_Tutorials/tutorial1/MostRelevantIntruder.html +++ b/docs/cpp_Tutorials/tutorial1/MostRelevantIntruder.html @@ -99,6 +99,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial1/settingUpTheProgram.html b/docs/cpp_Tutorials/tutorial1/settingUpTheProgram.html index b27eeeeb..1f096f8a 100644 --- a/docs/cpp_Tutorials/tutorial1/settingUpTheProgram.html +++ b/docs/cpp_Tutorials/tutorial1/settingUpTheProgram.html @@ -99,6 +99,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -159,7 +169,7 @@

    Setting up the program

    #include "ontologenius/OntologyManipulator.h"

    -
    OntologyManipulator* onto_;
    +
    onto::OntologyManipulator* onto_;
    std::vector<std::string> names_;
    bool start_;

    @@ -213,7 +223,7 @@

    Setting up the program

    documentation for this object on the left panel.

    -
    OntologyManipulator* onto_;
    +
    onto::OntologyManipulator* onto_;

    As explained above, the ontology manipulator contains several objects to abstract ROS services. The set of services work in a connected mode which allows to greatly save in execution time but @@ -267,7 +277,7 @@

    Setting up the program

    ros::init(argc, argv, "intruder");

    ros::NodeHandle n;
    -
    OntologyManipulator onto;
    +
    onto::OntologyManipulator onto;
    onto_ = &onto;

    onto.close();
    @@ -310,7 +320,7 @@

    Setting up the program

    Initialize ROS and Create a handle to this process' node.

    -
    OntologyManipulator onto;
    +
    onto::OntologyManipulator onto;
    onto_ = &onto;

    We finally come back to using ontologenius! We create here our first manipulator ontology, diff --git a/docs/cpp_Tutorials/tutorial2/FindOurWay.html b/docs/cpp_Tutorials/tutorial2/FindOurWay.html index c9bb4d09..c60f8fd8 100644 --- a/docs/cpp_Tutorials/tutorial2/FindOurWay.html +++ b/docs/cpp_Tutorials/tutorial2/FindOurWay.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -134,7 +144,7 @@

    Find our way

    #include "ros/ros.h"
    #include "ontologenius/OntologyManipulator.h"

    -
    OntologyManipulator* onto_;
    +
    onto::OntologyManipulator* onto_;

    void displayRoute(std::vector<std::string> route)
    {
    @@ -148,7 +158,7 @@

    Find our way

    ros::init(argc, argv, "find_our_way");

    ros::NodeHandle n;
    -
    OntologyManipulator onto;
    +
    onto::OntologyManipulator onto;
    onto_ = &onto;

    onto.close();
    diff --git a/docs/cpp_Tutorials/tutorial2/Presentation.html b/docs/cpp_Tutorials/tutorial2/Presentation.html index 7b84e879..669f41a2 100644 --- a/docs/cpp_Tutorials/tutorial2/Presentation.html +++ b/docs/cpp_Tutorials/tutorial2/Presentation.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial2/UnderstandOurEnvironment.html b/docs/cpp_Tutorials/tutorial2/UnderstandOurEnvironment.html index b0fcdd69..21be6f01 100644 --- a/docs/cpp_Tutorials/tutorial2/UnderstandOurEnvironment.html +++ b/docs/cpp_Tutorials/tutorial2/UnderstandOurEnvironment.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial3/InsertNewKnowledge.html b/docs/cpp_Tutorials/tutorial3/InsertNewKnowledge.html index d8f6cf70..3c887fed 100644 --- a/docs/cpp_Tutorials/tutorial3/InsertNewKnowledge.html +++ b/docs/cpp_Tutorials/tutorial3/InsertNewKnowledge.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -138,7 +148,7 @@

    Insert new knowledge


    #include "ontologenius/OntologyManipulator.h"

    -
    OntologyManipulator* onto_;
    +
    onto::OntologyManipulator* onto_;

    std::regex is_a("(a\\s|the\\s)?(\\w+)\\s(is\\sa|is\\san|are)\\s(\\w+)");
    std::regex property("(a\\s)?(\\w+)\\scan\\s(not\\s)?(\\w+)");
    @@ -333,7 +343,7 @@

    Insert new knowledge

    ros::init(argc, argv, "feed_and_generalize");
    ros::NodeHandle n;

    -
    OntologyManipulator onto;
    +
    onto::OntologyManipulator onto;
    onto_ = &onto;

    onto.close();
    diff --git a/docs/cpp_Tutorials/tutorial3/MakeItProactive.html b/docs/cpp_Tutorials/tutorial3/MakeItProactive.html index 7c7605e3..d02d2083 100644 --- a/docs/cpp_Tutorials/tutorial3/MakeItProactive.html +++ b/docs/cpp_Tutorials/tutorial3/MakeItProactive.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial3/Presentation.html b/docs/cpp_Tutorials/tutorial3/Presentation.html index bf51b3d5..7039be0a 100644 --- a/docs/cpp_Tutorials/tutorial3/Presentation.html +++ b/docs/cpp_Tutorials/tutorial3/Presentation.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial4/BeliefDivergence.html b/docs/cpp_Tutorials/tutorial4/BeliefDivergence.html index 4a3b31e4..36155e38 100644 --- a/docs/cpp_Tutorials/tutorial4/BeliefDivergence.html +++ b/docs/cpp_Tutorials/tutorial4/BeliefDivergence.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -137,7 +147,7 @@

    Detect divergence of belief

    ros::init(argc, argv, "multiple_ontologies");
    ros::NodeHandle n;

    -
    OntologiesManipulator onto(&n);
    +
    onto::OntologiesManipulator onto(&n);

    onto.waitInit();

    diff --git a/docs/cpp_Tutorials/tutorial4/CreateMultipleOntologies.html b/docs/cpp_Tutorials/tutorial4/CreateMultipleOntologies.html index a0edd251..4d5f50ba 100644 --- a/docs/cpp_Tutorials/tutorial4/CreateMultipleOntologies.html +++ b/docs/cpp_Tutorials/tutorial4/CreateMultipleOntologies.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -138,7 +148,7 @@

    Create multiple ontologies

    ros::init(argc, argv, "multiple_ontologies");
    ros::NodeHandle n;

    -
    OntologiesManipulator onto(&n);
    +
    onto::OntologiesManipulator onto(&n);

    onto.waitInit();

    @@ -173,7 +183,7 @@

    Create multiple ontologies

    dynamically create an OntologyManipulator per agent.

    -
    OntologiesManipulator onto;
    +
    onto::OntologiesManipulator onto;

    onto.waitInit();
    diff --git a/docs/cpp_Tutorials/tutorial4/Presentation.html b/docs/cpp_Tutorials/tutorial4/Presentation.html index d24cddf0..be32e440 100644 --- a/docs/cpp_Tutorials/tutorial4/Presentation.html +++ b/docs/cpp_Tutorials/tutorial4/Presentation.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial5/MoveThroughTheAlternatives.html b/docs/cpp_Tutorials/tutorial5/MoveThroughTheAlternatives.html index 314011ed..f6330bfb 100644 --- a/docs/cpp_Tutorials/tutorial5/MoveThroughTheAlternatives.html +++ b/docs/cpp_Tutorials/tutorial5/MoveThroughTheAlternatives.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -137,7 +147,7 @@

    Move through the alternatives

    ros::init(argc, argv, "explore_futures");

    ros::NodeHandle n;
    -
    OntologiesManipulator onto(&n);
    +
    onto::OntologiesManipulator onto(&n);
    onto.waitInit();

    onto.add("bob");
    diff --git a/docs/cpp_Tutorials/tutorial5/Presentation.html b/docs/cpp_Tutorials/tutorial5/Presentation.html index 99443436..cce55ea1 100644 --- a/docs/cpp_Tutorials/tutorial5/Presentation.html +++ b/docs/cpp_Tutorials/tutorial5/Presentation.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • diff --git a/docs/cpp_Tutorials/tutorial5/ViewGraph.html b/docs/cpp_Tutorials/tutorial5/ViewGraph.html index b3c17672..53c93902 100644 --- a/docs/cpp_Tutorials/tutorial5/ViewGraph.html +++ b/docs/cpp_Tutorials/tutorial5/ViewGraph.html @@ -97,6 +97,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient

  • @@ -155,8 +165,8 @@

    View graph

    Move through the alternatives - - Tutorials + + Next tutorial : Speed up your algorithms diff --git a/docs/cpp_Tutorials/tutorial6/Overview.html b/docs/cpp_Tutorials/tutorial6/Overview.html new file mode 100644 index 00000000..6316f338 --- /dev/null +++ b/docs/cpp_Tutorials/tutorial6/Overview.html @@ -0,0 +1,257 @@ + + + + Speed up your algorithms (cpp) : Overview + + + + + + + + + + + +
    + + + +
    + + +
    +
    +

    Speed up your algorithms (cpp)

    + +
    + +
    +
    +

    Run Forrest! Run !

    +
    +
    +
    + +

    Overview

    + +

    This is the last tutorial! Implementing algorithms, we all know that scaling is important and that performances can become a bottleneck when trying to do so. + Furthermore, using an external knowledge base and thus passing by a communication layer, the amount of data to transfer can be an issue. + In such a way, the use of strings to interact with Ontologenius is not the more suitable one to have the best performances possible... + This is why Ontologenius proposes an interface based on indexes as integers! + More than reducing the amount of data to transfer, that provides a significative gain in Ontologenius internal algorithms and allows you to do the same on your side. +

    + +

    The mini-project that we will do will be the adaptation of the second tutorial algorithm, by using indexes..

    + + Run Forrest! Run! + +

    The ontology manipulator

    + +

    Until now, we have used an OntologyManipulator to access the different methods to explore the ontology, but using concept's identifiers (strings).

    + +

    To access the index version of the API, we will now use an OntologyManipulatorIndex. + If it seems to be the exact same one as the original one, this is normal. Indeed, the interface is the same (same members' name and same functions' name) but all the exploration queries use indexes instead of identifiers, meaning integers instead of strings. + All related classes, based on index use, can be found at the bottom of the left sidebar. +

    + +

    Working in multi instances mode, you steal have to use an OntologiesManipulator and insteed of using the get method to extract an OntologyManipulator, you can use the getIndex method to extract an OntologyManipulatorIndex.

    + +

    Passing from indentifiers to indexes

    + +

    Before moving ahead, one should ask itself "But how can I know the index of a concept?", and this is an excellent question...

    + +

    Indexes are attributed by Ontologenius to any concepts. It is a kind of internal identifier used by Ontologenius to ease the concepts manipulation. + In such a way, from one run to another, we cannot ensure that a given concept will have the same index... + It is thus important to first query Ontologenius for the indexes. +

    + +

    The actual only difference between an OntologiesManipulator and an OntologyManipulatorIndex, is the presence of a "conversion" member. + The conversion member is an instance of a ConversionClient which allows + you to pass from identifiers to indexes and inverse. +

    + +

    To better understand, let's take an easy example. Compile the folowing code and run in while launching Ontologenius with the launch file of the second tutorial.

    + +
    +
    #include "ontologenius/OntologyManipulatorIndex.h"
    +

    +
    template<typename T>
    +
    void printVector(const std::vector<T>& vector)
    +
    {
    +
    std::cout << "-------" << std::endl;
    +
    for(auto& elem : vector)
    +
    std::cout << "- " << elem << std::endl;
    +
    }
    +

    +
    int main(int argc, char** argv)
    +
    {
    +
    ros::init(argc, argv, "speed_up");
    +

    +
    ros::NodeHandle n;
    +
    onto::OntologyManipulatorIndex onto;
    +

    +
    onto.close();
    +

    +
    int64_t path_index = onto.conversion.classesId2Index("path");
    +
    std::vector<int64_t> path_indexes = onto.individuals.getType(path_index);
    +
    printVector(path_indexes);
    +
    std::vector<std::string> path_identifiers = onto.conversion.individualsIndex2Id(path_indexes);
    +
    printVector(path_identifiers);
    +

    +
    return 0;
    +
    }
    +
    + +

    In this example we have asked for the index of the "path" concept, then we have queried all the individuals of this type, but using the index, and finally, + we have converted the result into identifiers to display it to the user! Easy!

    + +

    Literals and names

    + +

    In index-based use, two special cases hold: the literals and the names in natural language.

    + +

    First of all, the names in natural language do not use indexes and should thus be used with strings as usual.

    + +

    At the difference, the literals used with data properties have indexes associated with them. + However, these indexes are negative! This specificity can be useful to easily discriminate literals to usual concepts. +

    + +

    Nevertheless, if concepts have positive indexes and literals have negative ones, what about zero? + It holds as an empty string as used in the identifier-based queries, meaning no answer. +

    + +

    Time to code!

    + +

    It is now your turn to code. Take the final version of tutorial 2 and modify it to use indexes. A solution is provided on the next page of the tutorial.

    + +

    While coding keep in mind that conversion between identifiers and indexes should be kept as the interface with your algorithm (initialisation and result display) and should be avoided in it.

    + +

    In cpp use, to gain in flexibility do not hesitate to use templates or typedef to easily pass from strings to indexes.

    + + + +
    +
    + +
    + + + + + diff --git a/docs/cpp_Tutorials/tutorial6/Solution.html b/docs/cpp_Tutorials/tutorial6/Solution.html new file mode 100644 index 00000000..342092be --- /dev/null +++ b/docs/cpp_Tutorials/tutorial6/Solution.html @@ -0,0 +1,291 @@ + + + + Speed up your algorithms (cpp) : Solution + + + + + + + + + + + +
    + + + +
    + + +
    +
    +

    Speed up your algorithms (cpp)

    + +
    + +
    +
    +

    Run Forrest! Run !

    +
    +
    +
    + +

    Solution

    + +

    Here is a possible solution with use of templates. + You can note that we have queried the index of the property "isAlong" only once at the initialisation to avoid to recompute static information. + In a more usual way using classes, you could create a map with all the "static" indexes.

    + +
    +
    #include <iostream>
    +
    #include <vector>
    +
    #include <string>
    +

    +
    #include "ros/ros.h"
    +
    #include "ontologenius/OntologyManipulatorIndex.h"
    +

    +
    onto::OntologyManipulatorIndex* onto_;
    +
    int64_t is_along_ = 0;
    +

    +
    void displayRoute(std::vector<int64_t> route)
    +
    {
    +
    std::vector<std::string> indentifier_route = onto_->conversion.individualsIndex2Id(route);
    +
    for(auto path : indentifier_route)
    +
    std::cout << path << " - ";
    +
    std::cout << std::endl;
    +
    }
    +

    +
    template<typename T>
    +
    std::vector<std::vector<T> > findRoutes(T path_from, T path_to, T selector)
    +
    {
    +
    std::vector<std::vector<T> > routes;
    +
    bool found = false;
    +

    +
    std::vector<T> tmp;
    +
    tmp.push_back(path_from);
    +
    routes.push_back(tmp);
    +

    +
    if(path_from == path_to)
    +
    found = true;
    +

    +
    while(found == false)
    +
    {
    +
    std::vector<std::vector<T> > tmp_routes;
    +
    for(auto& route : routes)
    +
    {
    +
    std::vector<T> intersections = onto_->individuals.getFrom(is_along_, route.back());
    +

    +
    for(auto intersection : intersections)
    +
    {
    +
    std::vector<T> paths = onto_->individuals.getOn(intersection, is_along_, selector);
    +

    +
    for(size_t i = 0; i < paths.size();)
    +
    if(std::find(route.begin(), route.end(), paths[i]) != route.end())
    +
    paths.erase(paths.begin() + i);
    +
    else
    +
    i++;
    +

    +
    for(auto path : paths)
    +
    {
    +
    tmp = route;
    +
    tmp.push_back(intersection);
    +
    tmp.push_back(path);
    +
    tmp_routes.push_back(tmp);
    +
    if(path == path_to)
    +
    found = true;
    +
    }
    +
    }
    +
    }
    +
    routes.swap(tmp_routes);
    +
    }
    +

    +
    return routes;
    +
    }
    +

    +
    template<typename T>
    +
    std::vector<T> find(T from, T to, T selector)
    +
    {
    +
    std::vector<T> solution_route;
    +
    size_t min_size = -1;
    +

    +
    std::vector<T> paths_from = onto_->individuals.getOn(from, is_along_, selector);
    +
    std::vector<T> paths_to = onto_->individuals.getOn(to, is_along_, selector);
    +

    +
    for(auto path_from : paths_from)
    +
    for(auto path_to : paths_to)
    +
    {
    +
    std::vector<std::vector<T> > routes = findRoutes(path_from, path_to, selector);
    +
    for(auto& route : routes)
    +
    if(route.back() == path_to)
    +
    if(route.size() < min_size)
    +
    {
    +
    min_size = route.size();
    +
    solution_route = route;
    +
    }
    +
    }
    +

    +
    return solution_route;
    +
    }
    +

    +
    int main(int argc, char** argv)
    +
    {
    +
    ros::init(argc, argv, "find_our_way");
    +

    +
    ros::NodeHandle n;
    +
    onto::OntologyManipulatorIndex onto;
    +
    onto_ = &onto;
    +

    +
    onto.close();
    +

    +
    is_along_ = onto.conversion.objectPropertiesId2Index("isAlong");
    +
    int64_t pub = onto.conversion.individualsId2Index("pub");
    +
    int64_t house = onto.conversion.individualsId2Index("house");
    +
    int64_t car = onto.conversion.individualsId2Index("car");
    +
    int64_t path = onto.conversion.classesId2Index("path");
    +
    int64_t road = onto.conversion.classesId2Index("road");
    +
    std::vector<int64_t> route;
    +

    +
    route = find(pub, house, path);
    +
    displayRoute(route);
    +

    +
    route = find(house, car, path);
    +
    displayRoute(route);
    +

    +
    route = find(car, house, road);
    +
    displayRoute(route);
    +

    +
    return 0;
    +
    }
    +

    +
    + + + +
    +
    + +
    + + + + + diff --git a/docs/images/ontologenius.ico b/docs/images/ontologenius.ico index 007c3924..d91aeea2 100644 Binary files a/docs/images/ontologenius.ico and b/docs/images/ontologenius.ico differ diff --git a/docs/images/ontologenius.png b/docs/images/ontologenius.png index cf460a70..0fa5ae83 100644 Binary files a/docs/images/ontologenius.png and b/docs/images/ontologenius.png differ diff --git a/docs/img/logo/ontologenius.svg b/docs/images/ontologenius.svg similarity index 99% rename from docs/img/logo/ontologenius.svg rename to docs/images/ontologenius.svg index 17d4c905..5abac3a0 100644 --- a/docs/img/logo/ontologenius.svg +++ b/docs/images/ontologenius.svg @@ -14,7 +14,7 @@ viewBox="0 0 210 297" version="1.1" id="svg8" - inkscape:version="0.92.3 (2405546, 2018-03-11)" + inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)" sodipodi:docname="ontologenius.svg"> @@ -25,16 +25,16 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.9899495" - inkscape:cx="-256.02781" - inkscape:cy="631.60755" + inkscape:zoom="0.49497475" + inkscape:cx="-154.81619" + inkscape:cy="619.48016" inkscape:document-units="mm" inkscape:current-layer="g890" showgrid="false" - inkscape:window-width="1853" - inkscape:window-height="1025" - inkscape:window-x="67" - inkscape:window-y="27" + inkscape:window-width="1848" + inkscape:window-height="1129" + inkscape:window-x="72" + inkscape:window-y="994" inkscape:window-maximized="1" showguides="false" /> image/svg+xml - + diff --git a/docs/images/pdf_icon.png b/docs/images/pdf_icon.png new file mode 100644 index 00000000..d5dc409b Binary files /dev/null and b/docs/images/pdf_icon.png differ diff --git a/docs/images/tutorial/forest.jpg b/docs/images/tutorial/forest.jpg new file mode 100644 index 00000000..402aa8cf Binary files /dev/null and b/docs/images/tutorial/forest.jpg differ diff --git a/docs/img/architecture/Graphs.png b/docs/img/architecture/Graphs.png deleted file mode 100644 index 19838659..00000000 Binary files a/docs/img/architecture/Graphs.png and /dev/null differ diff --git a/docs/img/architecture/architecture.md b/docs/img/architecture/architecture.md deleted file mode 100644 index b344ec22..00000000 --- a/docs/img/architecture/architecture.md +++ /dev/null @@ -1,9 +0,0 @@ -# ontologenius architecture - -In the source and include folder, you will find several folders each containing part of the project. This architecture file is intended to make you understand the overall architecture of the project by presenting the various sub-architecture. - -## ontoGraphs - -**ontoGraphs** aims to contain all ontology words (individuals, classes and properties) and to provide quick access to each data and the relationships between all data. In addition, it can analyze the validity of the global ontology and read the OWL files to fill the ontology data structure. - - diff --git a/docs/img/classes_accessors.png b/docs/img/classes_accessors.png deleted file mode 100644 index 83187a5f..00000000 Binary files a/docs/img/classes_accessors.png and /dev/null differ diff --git a/docs/img/individuals_accessors.png b/docs/img/individuals_accessors.png deleted file mode 100644 index f7b04090..00000000 Binary files a/docs/img/individuals_accessors.png and /dev/null differ diff --git a/docs/img/logo/ontologenius.ico b/docs/img/logo/ontologenius.ico deleted file mode 100644 index 007c3924..00000000 Binary files a/docs/img/logo/ontologenius.ico and /dev/null differ diff --git a/docs/img/logo/ontologenius.png b/docs/img/logo/ontologenius.png deleted file mode 100644 index 6c35f5f3..00000000 Binary files a/docs/img/logo/ontologenius.png and /dev/null differ diff --git a/docs/img/ontoloGUI.png b/docs/img/ontoloGUI.png deleted file mode 100644 index 554eb412..00000000 Binary files a/docs/img/ontoloGUI.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html index 011ec3a1..3911a4ef 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,7 +1,7 @@ - Ontologenius 0.2.12 + Ontologenius 0.3.0 @@ -101,7 +101,7 @@

    A long-term semantic memory for robotic agents

    @@ -113,7 +113,7 @@

    An easy way to use ontologies for artificial agent applications.


    A smart way to organize the knowledge of your agent.


    -

    A fast way to interrogate your agent knowledge.

    +

    A fast way to explore your agent knowledge.


    A natural way to evolve the knowledge of your agents.

    @@ -138,9 +138,9 @@

    A natural way to evolve the knowledge of your agents.

    -

    About ontologenius

    -

    Ontologenius is a research project aimed at providing that which can be seen as a semantic memory - for artificial agents. Focusing only on this task, ontologenius is currently a robust and efficient +

    About Ontologenius

    +

    Ontologenius is a research project aimed at providing what can be seen as a semantic memory + for artificial agents. Focusing only on this task, Ontologenius is currently a robust and efficient open-source software that can be deployed in many applications.

    Provided with some algorithms of first-order logic inference, it is still possible to make it evolve @@ -156,6 +156,23 @@

    About ontologenius

    What's New

    +
    + +

    Ontologenius 0.3.0 !

    +
    +

    + Here is a great step, Ontologenius comes in its third major release! +

    +

    + A lot of efforts have been done to enhance Ontologenius performances with a new interface based on indexes (integers), + allowing better internal performances but also letting you the opportunity to seep-up your own algorithms. + More than this new interface, a lot of engineering has been done to optimize all internal structures and algorithms + to improve ontologies loading, low-level queries, as well as SPARQL queries. +

    +
    + +
    +

    Automatic imports

    @@ -195,7 +212,7 @@

    Turtle ontology

    Ontologenius python API

    -

    After a long time, ontologenius now provides a full python API. Here you will find its +

    After a long time, Ontologenius now provides a full python API. Here you will find its documentation and five tutorials to learn how to use it.

    @@ -205,8 +222,8 @@

    Ontologenius python API

    Ontology copy and reasoners configuration

    -

    More than creating multiple instances ontologenius, you can now copy an instance that then becomes independent. - This new feature makes it easy to use ontologenius for planning applications.

    +

    More than creating multiple instances of Ontologenius, you can now copy an instance that then becomes independent. + This new feature makes it easy to use Ontologenius for planning applications.

    You can now configure the reasoners you want to use and change their parameters via a YAML file. Create your own configuration for your specific application in few minutes!

    @@ -218,11 +235,11 @@

    Ontology copy and reasoners configuration

    C++ API is now available

    -

    As part of a recent effort to facilitate the use of ontologenius, we are now developing a C ++ API +

    As part of a recent effort to facilitate the use of Ontologenius, we are now developing a C ++ API covering the majority of features. The complete documentation of this API is now available online.

    To take better control of this new API five tutorials have been developed. They make it possible to - discover the API as well as the basic ontologenius functionalities through min-projects.

    + discover the API as well as the basic Ontologenius functionalities through min-projects.

    diff --git a/docs/overview/launchers.html b/docs/overview/launchers.html index c2ce5e1f..a397ce2c 100644 --- a/docs/overview/launchers.html +++ b/docs/overview/launchers.html @@ -1,7 +1,7 @@ - Launchers | Ontologenius 0.2.12 + Launchers | Ontologenius 0.3.0 diff --git a/docs/overview/ontoloGUI.html b/docs/overview/ontoloGUI.html index eca093c9..62d00b07 100644 --- a/docs/overview/ontoloGUI.html +++ b/docs/overview/ontoloGUI.html @@ -1,7 +1,7 @@ - OntoloGUI | Ontologenius 0.2.12 + OntoloGUI | Ontologenius 0.3.0 diff --git a/docs/overview/reasonersConfiguration.html b/docs/overview/reasonersConfiguration.html index ab81a7b9..8d6169f5 100644 --- a/docs/overview/reasonersConfiguration.html +++ b/docs/overview/reasonersConfiguration.html @@ -1,7 +1,7 @@ - Reasoners configuration | Ontologenius 0.2.12 + Reasoners configuration | Ontologenius 0.3.0 diff --git a/docs/python_API/ActionClient.html b/docs/python_API/ActionClient.html index b8a854aa..afd47a79 100644 --- a/docs/python_API/ActionClient.html +++ b/docs/python_API/ActionClient.html @@ -1,7 +1,7 @@ - ActionClient Class (python) | Ontologenius 0.2.12 + ActionClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/ClassClient.html b/docs/python_API/ClassClient.html index d01618ca..81b072bc 100644 --- a/docs/python_API/ClassClient.html +++ b/docs/python_API/ClassClient.html @@ -1,7 +1,7 @@ - ClassClient Class (python) | Ontologenius 0.2.12 + ClassClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/ClassIndexClient.html b/docs/python_API/ClassIndexClient.html new file mode 100644 index 00000000..9fb63bc4 --- /dev/null +++ b/docs/python_API/ClassIndexClient.html @@ -0,0 +1,248 @@ + + + + ClassIndexClient Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    ClassIndexClient Class

    +

    The ClassIndexClient class provides a ROS service abstraction for classes exploration. More...

    +
    + +
    Package: ontologenius +
    Inherits: OntologyIndexClient
    +
    + + +

    Public Methods

    +
    + + + + + + + + + + + + + + + + + +
    __init__(self, name)
    integer[] getDown(self, index, depth = -1)
    integer[] getDisjoint(self, index)
    integer[] getOn(self, index, property, selector = 0)
    integer[] getFrom(self, property, index, selector = 0)
    integer[] getWith(self, class_from, class_to, selector = 0, depth = -1)
    integer[] getRelatedFrom(self, property)
    integer[] getRelatedOn(self, property)
    integer[] getRelatedWith(self, index)
    integer[] getRelationFrom(self, index, depth = -1)
    integer[] getRelationOn(self, index, depth = -1)
    integer[] getRelationWith(self, index)
    integer[] getDomainOf(self, index, selector = 0, depth = -1)
    integer[] getRangeOf(self, index, selector = 0, depth = -1)
    +
    + + +

    Reimplemented Methods

    + + + +
    +

    Detailed Description

    +

    The ClassIndexClient class provides an abstraction of ontologenius classes ROS service.

    +

    The ontologenius classes service allows the exploration of classes contained by ontologenius core based on integer.

    +

    This class is based on ClientIndexBase and so ensure a persistent connection with ontologenius/class_index service. + The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual ClassClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also ClassClient.

    + +

    See also IndividualIndexClient, DataPropertyIndexClient and ObjectPropertyIndexClient.

    + +
    +

    Methods Documentation

    + +

    __init__(self, name)

    +

    Constructs a class client..

    +

    Can be used in a multi-ontology mode by specifying the name of the ontology name(str). For classic use, name(str) should be defined as ''.

    + +

    getDown(self, index, depth = -1)

    +

    Gives all classes (integer[]) below the one given in the parameter: index(interger).

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getDisjoint(self, index)

    +

    Gives all the disjoint classes (integer[]) of the one given in the parameter: index(interger).

    + +

    getOn(self, index, property, selector = 0)

    +

    Gives all the classes (integer[]) pointed by the property property(interger) and applied to the class index(interger).

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) class. The default value 0 represents no restriction on the result.

    + +

    getFrom(self, property, index, selector = 0)

    +

    Gives all the classes (integer[]) having the given property property(interger) and pointing to the class index(interger).

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) class. The default value 0 represents no restriction on the result.

    + +

    getWith(self, class_from, class_to, selector = 0, depth = -1)

    +

    Gives all the properties (integer[]) linking the two classes class_from(interger) and class_to(interger).

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) property. The default value 0 represents no restriction on the result.

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getRelatedFrom(self, property)

    +

    Gives all the classes (integer[]) possessing the property property(interger).

    + +

    getRelatedOn(self, property)

    +

    Gives all the classes (integer[]) pointed to by the property property(interger).

    + +

    getRelatedWith(self, index)

    +

    Gives all the classes (integer[]) having a property pointing to the class index(interger).

    + +

    getRelationFrom(self, index, depth = -1)

    +

    Gives all the properties (integer[]) applied to the class index(interger).

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getRelationOn(self, index, depth = -1)

    +

    Gives all the properties (integer[]) going to the class index(interger).

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getRelationWith(self, index)

    +

    Gives all the classes (integer[]) pointed by a property applied to the class index(interger).

    + +

    getDomainOf(self, index, selector = 0, depth = -1)

    +

    Gives all the properties (integer[]) for which the class index(interger) is part of the domain.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) property. The default value 0 represents no restriction on the result.

    +

    The optional depth(int) parameter can be set to limit tree propagation of the class to a specific value. The default value -1 represents no propagation limitation.

    + +

    getRangeOf(self, index, selector = 0, depth = -1)

    +

    Gives all the properties (integer[]) for which the class index(interger) is part of the range.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) property. The default value 0 represents no restriction on the result.

    +

    The optional depth(int) parameter can be set to limit tree propagation of the class to a specific value. The default value -1 represents no propagation limitation.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_API/ClientBase.html b/docs/python_API/ClientBase.html index 4a799db0..1339348f 100644 --- a/docs/python_API/ClientBase.html +++ b/docs/python_API/ClientBase.html @@ -1,7 +1,7 @@ - ClientBase Class (python) | Ontologenius 0.2.12 + ClientBase Class (python) | Ontologenius 0.3.0 @@ -102,6 +102,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/ClientBaseIndex.html b/docs/python_API/ClientBaseIndex.html new file mode 100644 index 00000000..5d3a07d1 --- /dev/null +++ b/docs/python_API/ClientBaseIndex.html @@ -0,0 +1,214 @@ + + + + ClientBaseIndex Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    ClientBaseIndex Class

    +

    The ClientBaseIndex class provides a common ROS service abstraction. More...

    +
    + +
    Package: ontologenius +
    Inherited By: OntologyIndexClient
    +
    + + +

    Methods

    +
    + + + + + + + + + + + + + +
    __init__(self, name)
    integer nb(self)
    resetNb(self)
    setVerbose(self, verbose)
    str[] call(self, action, param)
    integer[] callIndexes(self, action, param)
    str callStr(self, action, param)
    integer callIndex(self, action, param)
    bool callNR(self, action, param)
    bool callBool(self, action, param)
    +
    + + +
    +

    Detailed Description

    +

    The ClientBaseIndex class provides an abstraction for any ROS services.

    +

    This class ensures a persistent connection with the service based on. The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual ClientBase class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also ClientBase.

    + +
    +

    Methods Documentation

    + +

    __init__(self, name)

    +

    Constructs a ROS client linked to the service name(str).

    + +

    nb(self)

    +

    Gives the total number (integer) of service calls from all ClientBaseIndex instances since the last reset.

    + +

    resetNb(self)

    +

    Reset Call Counter for all instances of ClientBaseIndex.

    + +

    setVerbose(self, verbose)

    +

    If verbose(bool) is set to True, the clients will post messages about the failure to call the services and about their restoration.

    + +

    call(self, action, param)

    +

    Call the service set up in the constructor of ClientBaseIndex with the request defined with action(str) and param(str) and returns all the results (str[]).

    +

    If the service call fails, the function returns None

    + +

    callIndexes(self, action, param)

    +

    Call the service set up in the constructor of ClientBaseIndex with the request defined with action(str) and param(str) and returns all the results (integer[]).

    +

    If the service call fails, the function returns None

    + +

    callStr(self, action, param)

    +

    Call the service set up in the constructor of ClientBaseIndex with the request defined with action(str) and param(str) and returns all the first result (str).

    +

    If the service call fails, the function returns None

    + +

    callIndex(self, action, param)

    +

    Call the service set up in the constructor of ClientBaseIndex with the request defined with action(str) and param(str) and returns all the first result (integer).

    +

    If the service call fails, the function returns None

    + +

    callNR(self, action, param)

    +

    Call the service set up in the constructor of ClientBaseIndex with the request defined with action(str) and param(str).

    +

    If the service call fails, the function returns False

    + +

    callBool(self, action, param)

    +

    Call the service set up in the constructor of ClientBaseIndex with the request defined with action(str) and param(str).

    +

    Returns False if the service call fails or the result code of the service is different from SUCCESS.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_API/ConversionClient.html b/docs/python_API/ConversionClient.html new file mode 100644 index 00000000..b5ab90ee --- /dev/null +++ b/docs/python_API/ConversionClient.html @@ -0,0 +1,277 @@ + + + + ConversionClient Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    ConversionClient Class

    +

    The ConversionClient class provides an abstraction to the ontologenius conversion ROS services. More...

    +
    + + + + +
    Package: ontologenius
    +
    + + +

    Methods

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    __init__(self, name)
    setVerbose(self, verbose)
    str[] individualsIndexes2Ids(self, indexes)
    str[] classesIndexes2Ids(self, indexes)
    str[] dataPropertiesIndexes2Ids(self, indexes)
    str[] objectPropertiesIndexes2Ids(self, indexes)
    str[] literalsIndexes2Ids(self, indexes)
    str individualsIndex2Id(self, index)
    str classesIndex2Id(self, index)
    str dataPropertiesIndex2Id(self, index)
    str objectPropertiesIndex2Id(self, index)
    str literalsIndex2Id(self, index)
    int[] individualsIds2Indexes(self, ids)
    int[] classesIds2Indexes(self, ids)
    int[] dataPropertiesIds2Indexes(self, ids)
    int[] objectPropertiesIds2Indexes(self, ids)
    int[] literalsIds2Indexes(self, ids)
    int individualsId2Index(self, id)
    int classesId2Index(self, id)
    int dataPropertiesId2Index(self, id)
    int objectPropertiesId2Index(self, id)
    int literalsId2Index(self, id)
    +
    + + +
    +

    Detailed Description

    +

    The ConversionClient class provides an abstraction to the ontologenius conversion ROS services to pass from identifiers to indexes and inverse.

    +

    This class ensures a persistent connection with the service based on. The persistent connection ensures a minimal response time. + A reconnection logic is implemented in the event that the persistent connection fails.

    +
    + +
    +

    Methods Documentation

    + +

    __init__(self, name)

    +

    Constructs a ROS client linked to the service /ontologenius/conversion.

    +

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

    + +

    setVerbose(self, verbose)

    +

    If verbose(bool) is set to True, the clients will post messages about the failure to call the services and about their restoration.

    + +

    individualsIndexes2Ids(self, indexes)

    +

    Converts an array of indexes(int[]) representing individuals to identifiers.

    +

    Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    classesIndexes2Ids(self, indexes)

    +

    Converts an array of indexes(int[]) representing classes to identifiers.

    +

    Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    dataPropertiesIndexes2Ids(self, indexes)

    +

    Converts an array of indexes(int[]) representing data properties to identifiers.

    +

    Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    objectPropertiesIndexes2Ids(self, indexes)

    +

    Converts an array of indexes(int[]) representing object properties to identifiers.

    +

    Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    literalsIndexes2Ids(self, indexes)

    +

    Converts an array of indexes(int[]) representing literals to identifiers.

    +

    Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

    + +

    individualsIndex2Id(self, index)

    +

    Converts an index(int) representing an individual to its identifier.

    +

    Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

    + +

    classesIndex2Id(self, index)

    +

    Converts an index(int) representing a class to its identifier.

    +

    Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

    + +

    dataPropertiesIndex2Id(self, index)

    +

    Converts an index(int) representing a data property to its identifier.

    +

    Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

    + +

    objectPropertiesIndex2Id(self, index)

    +

    Converts an index(int) representing an object property to its identifier.

    +

    Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

    + +

    literalsIndex2Id(self, index)

    +

    Converts an index(int) representing a literal to its identifier.

    +

    Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

    + +

    individualsIds2Indexes(self, ids)

    +

    Converts an array of ids(str[]) representing individuals to indexes.

    +

    Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    classesIds2Indexes(self, ids)

    +

    Converts an array of ids(str[]) representing classes to indexes.

    +

    Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    dataPropertiesIds2Indexes(self, ids)

    +

    Converts an array of ids(str[]) representing data properties to indexes.

    +

    Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    objectPropertiesIds2Indexes(self, ids)

    +

    Converts an array of ids(str[]) representing object properties to indexes.

    +

    Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    literalsIds2Indexes(self, ids)

    +

    Converts an array of ids(str[]) representing literals to indexes.

    +

    Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

    + +

    individualsId2Index(self, id)

    +

    Converts an id(str) representing an individual to its index.

    +

    Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

    + +

    classesId2Index(self, id)

    +

    Converts an id(str) representing a class to its index.

    +

    Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

    + +

    dataPropertiesId2Index(self, id)

    +

    Converts an id(str) representing a data property to its index.

    +

    Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

    + +

    objectPropertiesId2Index(self, id)

    +

    Converts an id(str) representing an object property to its index.

    +

    Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

    + +

    literalsId2Index(self, id)

    +

    Converts an id(str) representing a literal to its index.

    +

    Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_API/DataPropertyClient.html b/docs/python_API/DataPropertyClient.html index 94660387..3a93cf7c 100644 --- a/docs/python_API/DataPropertyClient.html +++ b/docs/python_API/DataPropertyClient.html @@ -1,7 +1,7 @@ - DataPropertyClient Class (python) | Ontologenius 0.2.12 + DataPropertyClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/DataPropertyIndexClient.html b/docs/python_API/DataPropertyIndexClient.html new file mode 100644 index 00000000..f1d16e7a --- /dev/null +++ b/docs/python_API/DataPropertyIndexClient.html @@ -0,0 +1,202 @@ + + + + DataPropertyIndexClient Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    DataPropertyIndexClient Class

    +

    The DataPropertyIndexClient class provides a ROS service abstraction for data properties exploration. More...

    +
    + +
    Package: ontologenius +
    Inherits: OntologyIndexClient
    +
    + + +

    Methods

    +
    + + + + + + + + +
    __init__(self, name)
    integer[] getDown(self, index, depth = -1)
    integer[] getDisjoint(self, index)
    integer[] getDomain(self, index)
    integer[] getRange(self, index)
    +
    + + +

    Reimplemented Methods

    + + + +
    +

    Detailed Description

    +

    The DataPropertyIndexClient class provides an abstraction of ontologenius data properties ROS service.

    +

    The ontologenius data properties service allows the exploration of data properties contained by ontologenius core.

    +

    This class is based on ClientBaseIndex and so ensure a persistent connection with ontologenius/data_property_index service. + The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual DataPropertyClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also DataPropertyClient.

    + +

    See also IndividualIndexClient, ClassIndexClient and ObjectPropertyIndexClient.

    + +
    +

    Methods Documentation

    + +

    __init__(self, name)

    +

    Constructs a class client.

    +

    Can be used in a multi-ontology mode by specifying the name of the ontology name(str). For classic use, name(str) should be defined as ''.

    + +

    getDown(self, index, depth = -1)

    +

    Gives all properties (integer[]) below the one given in the parameter: index(integer).

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getDisjoint(self, index)

    +

    Gives all the disjoint properties (integer[]) of the property index (integer).

    + +

    getDomain(self, index)

    +

    Gives all the domain classes (integer[]) of the property index(integer).

    + +

    getRange(self, index)

    +

    Gives all the ranges types (integer[]) of the property index(integer).

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_API/FeederPublisher.html b/docs/python_API/FeederPublisher.html index 3f509487..70966da3 100644 --- a/docs/python_API/FeederPublisher.html +++ b/docs/python_API/FeederPublisher.html @@ -1,7 +1,7 @@ - FeederPublisher Class (python) | Ontologenius 0.2.12 + FeederPublisher Class (python) | Ontologenius 0.3.0 @@ -102,6 +102,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/IndividualClient.html b/docs/python_API/IndividualClient.html index 819e7996..f2a8d0a6 100644 --- a/docs/python_API/IndividualClient.html +++ b/docs/python_API/IndividualClient.html @@ -1,7 +1,7 @@ - IndividualClient Class (python) | Ontologenius 0.2.12 + IndividualClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/IndividualIndexClient.html b/docs/python_API/IndividualIndexClient.html new file mode 100644 index 00000000..4df4e8f1 --- /dev/null +++ b/docs/python_API/IndividualIndexClient.html @@ -0,0 +1,251 @@ + + + + IndividualIndexClient Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    IndividualIndexClient Class

    +

    The IndividualIndexClient class provides a ROS service abstraction for individuals exploration. More...

    +
    + +
    Package: ontologenius +
    Inherits: OntologyIndexClient
    +
    + + +

    Methods

    +
    + + + + + + + + + + + + + + + + + + +
    __init__(self, name)
    integer[] getType(self, index)
    integer[] getSame(self, index)
    integer[] getDistincts(self, index)
    integer[] getOn(self, index, property, selector = 0)
    integer[] getFrom(self, property, index, selector = 0)
    integer[] getWith(self, indiv_from, indiv_to, selector = 0, depth = -1)
    integer[] getRelatedFrom(self, property)
    integer[] getRelatedOn(self, property)
    integer[] getRelatedWith(self, index)
    integer[] getRelationFrom(self, index, depth = -1)
    integer[] getRelationOn(self, index, depth = -1)
    integer[] getRelationWith(self, index)
    integer[] getDomainOf(self, index, selector = 0, depth = -1)
    integer[] getRangeOf(self, index, selector = 0, depth = -1)
    +
    + + +

    Reimplemented Methods

    + + + +
    +

    Detailed Description

    +

    The IndividualIndexClient class provides an abstraction of ontologenius individuals ROS service.

    +

    The ontologenius individuals' service allows the exploration of individuals contained by ontologenius core based on indexes.

    +

    This class is based on ClientBaseIndex and so ensure a persistent connection with ontologenius/individual_index service. + The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual IndividualClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also IndividualClient.

    + +

    See also ClassIndexClient, DataPropertyIndexClient and ObjectPropertyIndexClient.

    + +
    +

    Methods Documentation

    + +

    __init__(self, name)

    +

    Constructs a class client.

    +

    Can be used in a multi-ontology mode by specifying the name of the ontology name(str). For classic use, name should be defined as ''.

    + +

    getType(self, index)

    +

    Gives all the individuals (integer[]) of the type of the given class index(integer).

    + +

    getSame(self, index)

    +

    Gives all the individuals (integer[]) that are defined as being identical to the individual index(integer).

    + +

    getDistincts(self, index)

    +

    Gives all the defined individuals (integer[]) as being distinct from the individual index(integer).

    + +

    getOn(self, index, property, selector = 0)

    +

    Gives all the individuals (integer[]) pointed by the property property(integer) and applied to the individual index(integer).

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector class. The default value 0 represents no restriction on the result.

    + +

    getFrom(self, property, index, selector = 0)

    +

    Gives all the individuals (integer[]) having the given property property(integer) and pointing to the individual index(integer).

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector class. The default value 0 represents no restriction on the result.

    + +

    getWith(self, indiv_from, indiv_to, selector = 0, depth = -1)

    +

    Gives all the properties (integer[]) linking the individual indiv_from(integer) to the individual indiv_to(integer).

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector property. The default value 0 represents no restriction on the result.

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getRelatedFrom(self, property)

    +

    Gives all the individuals (integer[]) possessing the property property(integer).

    + +

    getRelatedOn(self, property)

    +

    Gives all the individuals (integer[]) pointed to by the property property(integer).

    + +

    getRelatedWith(self, index)

    +

    Gives all the individuals (integer[]) having a property pointing to the individual index(integer).

    + +

    getRelationFrom(self, index, depth = -1)

    +

    Gives all the properties (integer[]) applied to the individual index(integer).

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getRelationOn(self, index, depth = -1)

    +

    Gives all the properties (integer[]) going to the individual index(integer).

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getRelationWith(self, index)

    +

    Gives all the individuals (integer[]) pointed by a property applied to the individual index(integer).

    + +

    getDomainOf(self, index, selector = 0, depth = -1)

    +

    Gives all the properties (integer[]) for which the individual index(integer) is part of the domain.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector property. The default value 0 represents no restriction on the result.

    +

    The optional depth(int) parameter can be set to limit tree propagation of the individual to a specific value. The default value -1 represents no propagation limitation.

    + +

    getRangeOf(self, index, selector = 0, depth = -1)

    +

    Gives all the properties (integer[]) for which the individual index(integer) is part of the range.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector property. The default value 0 represents no restriction on the result.

    +

    The optional depth(int) parameter can be set to limit tree propagation of the individual to a specific value. The default value -1 represents no propagation limitation.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_API/ManagerClient.html b/docs/python_API/ManagerClient.html index 924f33e0..074b484a 100644 --- a/docs/python_API/ManagerClient.html +++ b/docs/python_API/ManagerClient.html @@ -1,7 +1,7 @@ - ManagerClient Class (python) | Ontologenius 0.2.12 + ManagerClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/ObjectPropertyClient.html b/docs/python_API/ObjectPropertyClient.html index 0ae342b4..a5524eb3 100644 --- a/docs/python_API/ObjectPropertyClient.html +++ b/docs/python_API/ObjectPropertyClient.html @@ -1,7 +1,7 @@ - ObjectPropertyClient Class (python) | Ontologenius 0.2.12 + ObjectPropertyClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/ObjectPropertyIndexClient.html b/docs/python_API/ObjectPropertyIndexClient.html new file mode 100644 index 00000000..65ace077 --- /dev/null +++ b/docs/python_API/ObjectPropertyIndexClient.html @@ -0,0 +1,206 @@ + + + + ObjectPropertyIndexClient Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    ObjectPropertyIndexClient Class

    +

    The ObjectPropertyIndexClient class provides a ROS service abstraction for object properties exploration. More...

    +
    + +
    Package: ontologenius +
    Inherits: OntologyIndexClient
    +
    + + +

    Methods

    +
    + + + + + + + + + +
    __init__(self, name)
    integer[] getDown(self, index, depth = -1)
    integer[] getDisjoint(self, index)
    integer[] getDomain(self, index)
    integer[] getRange(self, index)
    integer[] getInverse(self, index)
    +
    + + +

    Reimplemented Methods

    + + + +
    +

    Detailed Description

    +

    The ObjectPropertyIndexClient class provides an abstraction of ontologenius object properties ROS service.

    +

    The ontologenius object properties service allows the exploration of object properties contained by ontologenius core based on indexes.

    +

    This class is based on ClientIndexBase and so ensure a persistent connection with ontologenius/object_property_index service. + The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual ObjectPropertyClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also ObjectPropertyClient.

    + +

    See also ClassIndexClient, IndividualIndexClient and DataPropertyIndexClient.

    + +
    +

    Methods Documentation

    + +

    __init__(self, name)

    +

    Constructs a class client.

    +

    Can be used in a multi-ontology mode by specifying the name of the ontology name(str). For classic use, name should be defined as ''.

    + +

    getDown(self, index, depth = -1)

    +

    Gives all properties (integer[]) below the one given in the parameter: index(integer).

    +

    The optional depth(integer) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    + +

    getDisjoint(self, index)

    +

    Gives all the disjoint properties (integer[]) of the property index(integer).

    + +

    getDomain(self, index)

    +

    Gives all the domain classes (integer[]) of the property index(integer).

    + +

    getRange(self, index)

    +

    Gives all the ranges classes (integer[]) of the property index(integer).

    + +

    getInverse(self, index)

    +

    Gives all the inverses properties (integer[]) of the property index(integer).

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_API/OntologiesManipulator.html b/docs/python_API/OntologiesManipulator.html index d0de6c88..6b746ba6 100644 --- a/docs/python_API/OntologiesManipulator.html +++ b/docs/python_API/OntologiesManipulator.html @@ -1,7 +1,7 @@ - OntologiesManipulator Class (python) | Ontologenius 0.2.12 + OntologiesManipulator Class (python) | Ontologenius 0.3.0 @@ -103,13 +103,23 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • OntologiesManipulator Class

    -

    The OntologiesManipulator class is an interface to manage several instance of OntologyManipulator in a multi-ontology usage. More...

    +

    The OntologiesManipulator class is an interface to manage several instance of OntologyManipulator and OntologyManipulatorIndex in a multi-ontology usage. More...

    @@ -127,6 +137,7 @@

    Methods

    +
    __init__(self)
    waitInit(self, timeout = -1)
    OntologyManipulator get(self, name)
    OntologyManipulatorIndex getIndex(self, name)
    setVerbose(self, verbose)
    @@ -168,16 +179,20 @@

    get(self, na

    Returns an OntologyManipulator object instance named name(str).

    Returns None if no OntologyManipulator instance is named name.

    +

    getIndex(self, name)

    +

    Returns an OntologyManipulatorIndex object instance named name(str).

    +

    Returns None if no OntologyManipulatorIndex instance is named name.

    +

    add(self, name)

    -

    Creates a new instance of ontologyManipulator identified by the name name(str).

    +

    Creates a new instance of OntologyManipulator and OntologyManipulatorIndex identified by the name name(str).

    Returns False if the creation fails. Returns True even if the instance already exists.

    copy(self, dest_name, src_name)

    -

    Creates a new instance of ontologyManipulator identified by the name dest_name(str) that manipulates a copy of the ontology handled by the ontologyManipulator src_name(str).

    +

    Creates a new instance of OntologyManipulator and OntologyManipulatorIndex identified by the name dest_name(str) that manipulates a copy of the ontology handled by the OntologyManipulator and OntologyManipulatorIndex src_name(str).

    Returns False if the copy fails. Returns True even if the instance already exists.

    delete(self, name)

    -

    Deletes the instance of ontologyManipulator identified by the name name(str).

    +

    Deletes the instance of OntologyManipulator and OntologyManipulatorIndex identified by the name name(str).

    Returns False deletion fails. Returns True even if the instance does not exist.

    setVerbose(self, verbose)

    diff --git a/docs/python_API/OntologyClient.html b/docs/python_API/OntologyClient.html index ea263f0c..e7b8a824 100644 --- a/docs/python_API/OntologyClient.html +++ b/docs/python_API/OntologyClient.html @@ -1,7 +1,7 @@ - OntologyClient Class (python) | Ontologenius 0.2.12 + OntologyClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/OntologyIndexClient.html b/docs/python_API/OntologyIndexClient.html new file mode 100644 index 00000000..954ab1e6 --- /dev/null +++ b/docs/python_API/OntologyIndexClient.html @@ -0,0 +1,252 @@ + + + + OntologyIndexClient Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    OntologyIndexClient Class

    +

    The OntologyIndexClient class provides a common ROS service abstraction for all exploration service. More...

    +
    + + + + + +
    Package: ontologenius +
    Inherits: ClientBaseIndex
    Inherited By: IndividualIndexClient, ClassIndexClient, DataPropertyIndexClient, ObjectPropertyIndexClient
    +
    + + +

    Methods

    +
    + + + + + + + + + + + + + + +
    __init__(self, name)
    integer[] getUp(self, index, depth = -1, selector = 0)
    bool isA(self, index, base_class)
    str getName(self, index, take_id = True)
    str[] getNames(self, index, take_id = True)
    str[] getEveryNames(self, index, take_id = True)
    integer[] find(self, name, take_id = True, selector = 0)
    integer[] findSub(self, name, take_id = True, selector = 0)
    integer[] findRegex(self, regex, take_id = True, selector = 0)
    str[] findFuzzy(self, name, threshold = 0.5, take_id = True, selector = 0)
    bool exist(self, index)
    +
    + + +

    Reimplemented Methods

    + + + +
    +

    Detailed Description

    +

    The OntologyIndexClient class provides an abstraction common to all ontologenius exploration ROS services.

    +

    The OntologyIndexClient implements the functions common to every ontologenius exploration based on indexes.

    +

    This class is based on ClientBaseIndex and so ensure a persistent connection with the service based on. + The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

    +

    At the difference of the usual OntologyClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also OntologyClient.

    + +

    See also IndividualIndexClient, ClassIndexClient, DataPropertyIndexClient and ObjectPropertyIndexClient.

    + +
    +

    Methods Documentation

    + +

    __init__(self, name)

    +

    Constructs an ontology client linked to the service ontologenius/name(str).

    + +

    getUp(self, index, depth = -1, selector = 0)

    +

    Gives all concepts below the one given in the parameter: index(integer).

    +

    The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) concept. The default value 0 represents no restriction on the result.

    + +

    isA(self, index, base_class)

    +

    Returns true if the concept index(integer) is or inherits of the concept base_class(integer). This function corresponds to checking if class_base is part of the result of the function getUp applies to the concept index.

    + +

    getName(self, index, take_id = True)

    +

    Gives one of the label (str) of the concept index(integer) that is not muted.

    +

    The default take_id(bool) argument can be set to False if you do not want to consider the concept identifier as a possible default name.

    +

    The result of this function depends on the setting of the working language.

    + +

    getNames(self, index, take_id = True)

    +

    Gives all the labels (str[]) of the concept index(integer) excepted the muted ones.

    +

    The default take_id(bool) argument can be set to False if you do not want to consider the concept identifier as a possible default name.

    +

    The result of this function depends on the setting of the working language.

    + +

    getEveryNames(self, index, take_id = True)

    +

    Gives all the labels (str[]) of the concept index(integer) even the muted ones.

    +

    The default take_id(bool) argument can be set to False if you do not want to consider the concept identifier as a possible default name.

    +

    The result of this function depends on the setting of the working language.

    + +

    find(self, name, take_id = True, selector = 0)

    +

    Gives all the concepts (integer[]) having for label name(str).

    +

    The default take_id(bool) argument can be set to False if you do not want to consider the concept identifier as a possible default name.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) concept. The default value 0 represents no restriction on the result.

    +

    The result of this function depends on the setting of the working language.

    + +

    findSub(self, name, take_id = True, selector = 0)

    +

    Gives all the concepts (integer[]) having for label a subset of name(str).

    +

    The default take_id(bool) argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) concept. The default value 0 represents no restriction on the result.

    +

    The result of this function depends on the setting of the working language.

    + +

    findRegex(self, regex, take_id = True, selector = 0)

    +

    Give all concepts (integer[]) with a label matching the regular expression regex(str).

    +

    The default take_id(bool) argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) concept. The default value 0 represents no restriction on the result.

    +

    The result of this function depends on the setting of the working language.

    + +

    findFuzzy(self, name, threshold = 0.5, take_id = True, selector = 0)

    +

    Give all the names of concepts (str[]) with the lowest edit distance with parameter name(str).

    +

    The default take_id(bool) argument can be set to false if you do not want to consider the concept identifier as a possible default name.

    +

    The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) concept. The default value 0 represents no restriction on the result.

    +

    The result of this function depends on the setting of the working language and does not correspond to the concept identifiers but to other labels known by ontologenius.

    +

    The minimum editing distance can be set with the threshold(double) parameter. This value corresponds to the number of changes to be made to pass from one word to another divided by the length of the comparison word.

    + +

    exist(self, index)

    +

    Returns True if the concept index(integer) exists in the subpart of the ontology managed by the client (i.e. class, individuals, object properties, data properties).

    + + +

    Muted labels

    +

    Ontologenius introduces the concept of muted label. They are written <onto:label> in an OWL file.

    +

    A muted label will be useful for adding labels with errors. These labels will allow you to find a concept with an error but will make sure you never use it in output (using getName).

    +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_API/OntologyManipulator.html b/docs/python_API/OntologyManipulator.html index 4cc80434..7e1d0467 100644 --- a/docs/python_API/OntologyManipulator.html +++ b/docs/python_API/OntologyManipulator.html @@ -1,7 +1,7 @@ - OntologyManipulator Class (python) | Ontologenius 0.2.12 + OntologyManipulator Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • @@ -188,7 +198,7 @@

    sparql

    Methods Documentation

    __init__(self, name = '')

    -

    Constructs an ontology manipulator with.

    +

    Constructs an ontology manipulator.

    Can be used in a multi-ontology mode by specifying the name of the ontology name(str). For classic use, do not specify the ontology name name.

    nb(self)

    diff --git a/docs/python_API/OntologyManipulatorIndex.html b/docs/python_API/OntologyManipulatorIndex.html new file mode 100644 index 00000000..4c425ab7 --- /dev/null +++ b/docs/python_API/OntologyManipulatorIndex.html @@ -0,0 +1,240 @@ + + + + OntologyManipulatorIndex Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    OntologyManipulatorIndex Class

    +

    The OntologyManipulatorIndex class is an object with instances of all classes needed to manipulate an ontology based on indexes.More...

    +
    + + + +
    Package: ontologenius +
    +
    + + +

    Attributes

    +
    + +
    + + +

    Methods

    +
    + + + + + + + + +
    __init__(self, name = '')
    bool close(self)
    int nb(self)
    resetNb(self)
    setVerbose(self, verbose)
    +
    + + +
    +

    Detailed Description

    +

    The OntologyManipulatorIndex class is just an object to access all API ROS abstraction classes so that you can query and manage ontologenius.

    +

    At the difference of the usual OntologyManipulator class, this one provides access to the interfaces based on indexes (integers) for better performances.

    +
    + +

    See also OntologiesManipulator and OntologyManipulator.

    + +
    +

    Attributes Documentation

    + +

    individuals : IndividualIndexClient

    +

    ROS service client to query ontologenius about individuals using indexes.

    + +

    objectProperties : ObjectPropertyIndexClient

    +

    ROS service client to query ontologenius about object properties using indexes.

    + +

    dataProperties : DataPropertyIndexClient

    +

    ROS service client to query ontologenius about data properties using indexes.

    + +

    classes : ClassIndexClient

    +

    ROS service client to query ontologenius about classes using indexes.

    + +

    actions : ActionClient

    +

    ROS service client to manage the ontology instance.

    + +

    reasoners : ReasonerClient

    +

    ROS service client to manage reasoners plugins.

    + +

    feeder : FeederPublisher

    +

    ROS Publisher to insert and delete knowledge dynamically.

    + +

    sparql : SparqlIndexClient

    +

    ROS service client to make SPARQL queries using indexes.

    + +

    conversion : ConversionClient

    +

    ROS service client to to convert indentifiers to indexes and inverse.

    + +
    + +
    +

    Methods Documentation

    + +

    __init__(self, name = '')

    +

    Constructs an index based ontology manipulator.

    +

    Can be used in a multi-ontology mode by specifying the name of the ontology name(str). For classic use, do not specify the ontology name name.

    + +

    nb(self)

    +

    Gives the total number (int) of service calls from all ROS clients instances since the last reset.

    + +

    resetNb(self)

    +

    Reset Call Counter for all instances of ROS clients.

    + +

    close(self)

    +

    Same as the ActionClient closing function. Link all the concepts loaded from files and the Internet. Before closing an ontology, exploration requests are not allowed.

    +

    Returns False if the service call fails.

    + +

    setVerbose(self, verbose)

    +

    If verbose is set to True, the clients will post messages about the failure to call the services and about their restoration.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_API/PythonAPI.html b/docs/python_API/PythonAPI.html index be223528..5a1ffc67 100644 --- a/docs/python_API/PythonAPI.html +++ b/docs/python_API/PythonAPI.html @@ -1,7 +1,7 @@ - Python API (python) | Ontologenius 0.2.12 + Python API (python) | Ontologenius 0.3.0 @@ -94,6 +94,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • @@ -128,6 +138,27 @@

    ReasonerClient

    SparqlClient

    The SparqlClient class provides an interface to explore ontologenius with SPARQL-like queries.

    +

    Index based Classes

    + +

    ClassIndexClient

    +

    The ClassIndexClient class provides a ROS service abstraction for classes exploration, based on indexes.

    +

    ClientBaseIndex

    +

    The ClientBaseIndex class provides a common ROS service abstraction for services based on indexes.

    +

    ConversionClient

    +

    The ConversionClient class provides an abstraction to the ontologenius conversion ROS services to pass from identifiers to indexes and inverse.

    +

    DataPropertyIndexClient

    +

    The DataPropertyIndexClient class provides a ROS service abstraction for data properties exploration, based on indexes.

    +

    IndividualIndexClient

    +

    The IndividualIndexClient class provides a ROS service abstraction for individuals exploration, based on indexes.

    +

    ObjectPropertyIndexClient

    +

    The ObjectPropertyIndexClient class provides a ROS service abstraction for object properties exploration, based on indexes.

    +

    OntologyIndexClient

    +

    The OntologyIndexClient class provides a common ROS service abstraction for all exploration service based on indexes.

    +

    OntologyManipulatorIndex

    +

    The OntologyManipulatorIndex class is an object with instances of all classes needed to manipulate an ontology, based on indexes.

    +

    SparqlIndexClient

    +

    The SparqlIndexClient class provides a ROS service to explore ontologenius with SPARQL-like queries, based on indexes.

    + diff --git a/docs/python_API/ReasonerClient.html b/docs/python_API/ReasonerClient.html index cc80e558..c1364cec 100644 --- a/docs/python_API/ReasonerClient.html +++ b/docs/python_API/ReasonerClient.html @@ -1,7 +1,7 @@ - ReasonerClient Class (python) | Ontologenius 0.2.12 + ReasonerClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/SparqlClient.html b/docs/python_API/SparqlClient.html index 293805ce..cb2c0fed 100644 --- a/docs/python_API/SparqlClient.html +++ b/docs/python_API/SparqlClient.html @@ -1,7 +1,7 @@ - SparqlClient Class (python) | Ontologenius 0.2.12 + SparqlClient Class (python) | Ontologenius 0.3.0 @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_API/SparqlIndexClient.html b/docs/python_API/SparqlIndexClient.html new file mode 100644 index 00000000..482aed68 --- /dev/null +++ b/docs/python_API/SparqlIndexClient.html @@ -0,0 +1,191 @@ + + + + SparqlIndexClient Class (python) | Ontologenius 0.3.0 + + + + + + + + + + + +
    + + + +
    + + +
    +

    SparqlIndexClient Class

    +

    The SparqlIndexClient class provides a ROS service to explore ontologenius with SPARQL-like queries. More...

    +
    + + + +
    Package: ontologenius +
    +
    + + +

    Methods

    +
    + + + + + +
    __init__(self, name)
    OntologeniusSparqlIndexResponse[] call(self, query)
    +
    + + +
    +

    Detailed Description

    +

    The SparqlIndexClient class provides a ROS service to explore ontologenius with SPARQL-like queries.

    +

    The variables start with the symbol ? (e.g. ?my_var) and each triplet is separated by a dot.

    +

    At the difference of the usual SparqlClient class, this one provides access to the interface based on indexes (integers) for better performances.

    +
    + +

    See also SparqlClient.

    + +
    +

    Methods Documentation

    + +

    __init__(self, name)

    +

    Constructs a sparql client.

    +

    Can be used in a multi-ontology mode by specifying the name of the ontology name(str). For classic use, name should be defined as ''.

    + +

    call(self, query)

    + +

    Basic query Examples

    + +

    The general structure is always the same:

    +
    +

    SELECT * // or ?x to get specific variables

    +

    WHERE {

    +

    // pattern

    +

    }

    +
    +

    You can also add the DISTINCT keyword just after the SELECT to ensure unique results. + The following blocks are examples of possible patterns.

    + +
    +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_Tutorials/Tutorials.html b/docs/python_Tutorials/Tutorials.html index 9d0b03ee..fe6c78f3 100644 --- a/docs/python_Tutorials/Tutorials.html +++ b/docs/python_Tutorials/Tutorials.html @@ -1,14 +1,14 @@ - Python Tutorials | Ontologenius 0.2.12 + Python Tutorials | Ontologenius 0.3.0 - + @@ -96,6 +96,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • @@ -325,6 +335,38 @@

    +
    + +
    + +
    +
    +

    Speed up your algorithms

    +
    +
    + +
    +
    +
    +
      +

      Run Forrest! Run !

      +
    1. +

      + + 1. Overview + +

      +
    2. +
    3. +

      + + 2. Solution + +

      +
    4. +
    +
    + diff --git a/docs/python_Tutorials/tutorial1/FindTheIntruder.html b/docs/python_Tutorials/tutorial1/FindTheIntruder.html index 2dbbd066..2357b32c 100644 --- a/docs/python_Tutorials/tutorial1/FindTheIntruder.html +++ b/docs/python_Tutorials/tutorial1/FindTheIntruder.html @@ -105,6 +105,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial1/LaunchTheProgram.html b/docs/python_Tutorials/tutorial1/LaunchTheProgram.html index 13d008f0..9be16236 100644 --- a/docs/python_Tutorials/tutorial1/LaunchTheProgram.html +++ b/docs/python_Tutorials/tutorial1/LaunchTheProgram.html @@ -105,6 +105,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial1/ManageTheMultilingual.html b/docs/python_Tutorials/tutorial1/ManageTheMultilingual.html index 1f00112e..ac0a9bbe 100644 --- a/docs/python_Tutorials/tutorial1/ManageTheMultilingual.html +++ b/docs/python_Tutorials/tutorial1/ManageTheMultilingual.html @@ -105,6 +105,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial1/MostRelevantIntruder.html b/docs/python_Tutorials/tutorial1/MostRelevantIntruder.html index 58af7c4b..41a6f6b2 100644 --- a/docs/python_Tutorials/tutorial1/MostRelevantIntruder.html +++ b/docs/python_Tutorials/tutorial1/MostRelevantIntruder.html @@ -105,6 +105,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial1/settingUpTheProgram.html b/docs/python_Tutorials/tutorial1/settingUpTheProgram.html index 61447806..8e7096f7 100644 --- a/docs/python_Tutorials/tutorial1/settingUpTheProgram.html +++ b/docs/python_Tutorials/tutorial1/settingUpTheProgram.html @@ -105,6 +105,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial2/FindOurWay.html b/docs/python_Tutorials/tutorial2/FindOurWay.html index 84b1d53e..0af5453f 100644 --- a/docs/python_Tutorials/tutorial2/FindOurWay.html +++ b/docs/python_Tutorials/tutorial2/FindOurWay.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • @@ -135,13 +145,11 @@

    Find our way

    _onto = None

    def displayRoute(route):
    -
    print 'Route:'
    +
    print('Route:')
    for point in route:
    -
    print '- ' + point
    +
    print('- ' + point)

    if __name__ == '__main__':
    -
    global _onto
    -

    rospy.init_node('find_our_way')

    _onto = OntologyManipulator()
    diff --git a/docs/python_Tutorials/tutorial2/Presentation.html b/docs/python_Tutorials/tutorial2/Presentation.html index fac323c7..aac7ef05 100644 --- a/docs/python_Tutorials/tutorial2/Presentation.html +++ b/docs/python_Tutorials/tutorial2/Presentation.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial2/UnderstandOurEnvironment.html b/docs/python_Tutorials/tutorial2/UnderstandOurEnvironment.html index 52fa6d97..a310d41a 100644 --- a/docs/python_Tutorials/tutorial2/UnderstandOurEnvironment.html +++ b/docs/python_Tutorials/tutorial2/UnderstandOurEnvironment.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial3/InsertNewKnowledge.html b/docs/python_Tutorials/tutorial3/InsertNewKnowledge.html index b92a1a54..792f2b42 100644 --- a/docs/python_Tutorials/tutorial3/InsertNewKnowledge.html +++ b/docs/python_Tutorials/tutorial3/InsertNewKnowledge.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial3/MakeItProactive.html b/docs/python_Tutorials/tutorial3/MakeItProactive.html index d9875107..12683303 100644 --- a/docs/python_Tutorials/tutorial3/MakeItProactive.html +++ b/docs/python_Tutorials/tutorial3/MakeItProactive.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial3/Presentation.html b/docs/python_Tutorials/tutorial3/Presentation.html index 0a6d7be3..68b45735 100644 --- a/docs/python_Tutorials/tutorial3/Presentation.html +++ b/docs/python_Tutorials/tutorial3/Presentation.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial4/BeliefDivergence.html b/docs/python_Tutorials/tutorial4/BeliefDivergence.html index 19c655db..7d3232a1 100644 --- a/docs/python_Tutorials/tutorial4/BeliefDivergence.html +++ b/docs/python_Tutorials/tutorial4/BeliefDivergence.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial4/CreateMultipleOntologies.html b/docs/python_Tutorials/tutorial4/CreateMultipleOntologies.html index 64c713b3..c28ade39 100644 --- a/docs/python_Tutorials/tutorial4/CreateMultipleOntologies.html +++ b/docs/python_Tutorials/tutorial4/CreateMultipleOntologies.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial4/Presentation.html b/docs/python_Tutorials/tutorial4/Presentation.html index 940c7e11..866fc6a3 100644 --- a/docs/python_Tutorials/tutorial4/Presentation.html +++ b/docs/python_Tutorials/tutorial4/Presentation.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial5/MoveThroughTheAlternatives.html b/docs/python_Tutorials/tutorial5/MoveThroughTheAlternatives.html index 186b2565..b9163aff 100644 --- a/docs/python_Tutorials/tutorial5/MoveThroughTheAlternatives.html +++ b/docs/python_Tutorials/tutorial5/MoveThroughTheAlternatives.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial5/Presentation.html b/docs/python_Tutorials/tutorial5/Presentation.html index 523f5572..27e61ced 100644 --- a/docs/python_Tutorials/tutorial5/Presentation.html +++ b/docs/python_Tutorials/tutorial5/Presentation.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • diff --git a/docs/python_Tutorials/tutorial5/ViewGraph.html b/docs/python_Tutorials/tutorial5/ViewGraph.html index 3c640a55..210066d7 100644 --- a/docs/python_Tutorials/tutorial5/ViewGraph.html +++ b/docs/python_Tutorials/tutorial5/ViewGraph.html @@ -103,6 +103,16 @@

  • OntologyManipulator
  • ReasonerClient
  • SparqlClient
  • +
  • Index based classes
  • +
  • ClassIndexClient
  • +
  • ClientBaseIndex
  • +
  • ConversionClient
  • +
  • DataPropertyIndexClient
  • +
  • IndividualIndexClient
  • +
  • ObjectPropertyIndexClient
  • +
  • OntologyIndexClient
  • +
  • OntologyManipulatorIndex
  • +
  • SparqlIndexClient
  • @@ -154,8 +164,8 @@

    View graph

    Move through the alternatives - - Tutorials + + Next tutorial : Speed up your algorithms diff --git a/docs/python_Tutorials/tutorial6/Overview.html b/docs/python_Tutorials/tutorial6/Overview.html new file mode 100644 index 00000000..0431da34 --- /dev/null +++ b/docs/python_Tutorials/tutorial6/Overview.html @@ -0,0 +1,239 @@ + + + + Speed up your algorithms (python) : Overview + + + + + + + + + + + +
    + + + +
    + + +
    +
    +

    Speed up your algorithms (python)

    + +
    + +
    +
    +

    Run Forrest! Run !

    +
    +
    +
    + +

    Overview

    + +

    This is the last tutorial! Implementing algorithms, we all know that scaling is important and that performances can become a bottleneck when trying to do so. + Furthermore, using an external knowledge base and thus passing by a communication layer, the amount of data to transfer can be an issue. + In such a way, the use of strings to interact with Ontologenius is not the more suitable one to have the best performances possible... + This is why Ontologenius proposes an interface based on indexes as integers! + More than reducing the amount of data to transfer, that provides a significative gain in Ontologenius internal algorithms and allows you to do the same on your side. +

    + +

    The mini-project that we will do will be the adaptation of the second tutorial algorithm, by using indexes..

    + + Run Forrest! Run! + +

    The ontology manipulator

    + +

    Until now, we have used an OntologyManipulator to access the different methods to explore the ontology, but using concept's identifiers (strings).

    + +

    To access the index version of the API, we will now use an OntologyManipulatorIndex. + If it seems to be the exact same one as the original one, this is normal. Indeed, the interface is the same (same members' name and same functions' name) but all the exploration queries use indexes instead of identifiers, meaning integers instead of strings. + All related classes, based on index use, can be found at the bottom of the left sidebar. +

    + +

    Working in multi instances mode, you steal have to use an OntologiesManipulator and insteed of using the get method to extract an OntologyManipulator, you can use the getIndex method to extract an OntologyManipulatorIndex.

    + +

    Passing from indentifiers to indexes

    + +

    Before moving ahead, one should ask itself "But how can I know the index of a concept?", and this is an excellent question...

    + +

    Indexes are attributed by Ontologenius to any concepts. It is a kind of internal identifier used by Ontologenius to ease the concepts manipulation. + In such a way, from one run to another, we cannot ensure that a given concept will have the same index... + It is thus important to first query Ontologenius for the indexes. +

    + +

    The actual only difference between an OntologiesManipulator and an OntologyManipulatorIndex, is the presence of a "conversion" member. + The conversion member is an instance of a ConversionClient which allows + you to pass from identifiers to indexes and inverse. +

    + +

    To better understand, let's take an easy example. Launch ontologenius with the launch file of the second tutorial and in a Python terminal execute the following:

    + +
    +
    from ontologenius import OntologyManipulatorIndex
    +

    +
    onto = OntologyManipulatorIndex()
    +
    onto.close()
    +
    path_index = onto.conversion.classesId2Index('path')
    +
    print(path_index)
    +
    path_indexes = onto.individuals.getType(path_index)
    +
    print(path_indexes)
    +
    path_identifiers = onto.conversion.individualsIndexes2Ids(path_indexes)
    +
    print(path_identifiers)
    +
    + +

    In this example we have asked for the index of the "path" concept, then we have queried all the individuals of this type, but using the index, and finally, + we have converted the result into identifiers to display it to the user! Easy!

    + +

    Literals and names

    + +

    In index-based use, two special cases hold: the literals and the names in natural language.

    + +

    First of all, the names in natural language do not use indexes and should thus be used with strings as usual.

    + +

    At the difference, the literals used with data properties have indexes associated with them. + However, these indexes are negative! This specificity can be useful to easily discriminate literals to usual concepts. +

    + +

    Nevertheless, if concepts have positive indexes and literals have negative ones, what about zero? + It holds as an empty string as used in the identifier-based queries, meaning no answer. +

    + +

    Time to code!

    + +

    It is now your turn to code. Take the final version of tutorial 2 and modify it to use indexes. A solution is provided on the next page of the tutorial.

    + +

    While coding keep in mind that conversion between identifiers and indexes should be kept as the interface with your algorithm (initialisation and result display) and should be avoided in it.

    + +

    As python is not a typed language, the algorithms will not have to be modified...

    + + + +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/python_Tutorials/tutorial6/Solution.html b/docs/python_Tutorials/tutorial6/Solution.html new file mode 100644 index 00000000..7adca14b --- /dev/null +++ b/docs/python_Tutorials/tutorial6/Solution.html @@ -0,0 +1,264 @@ + + + + Speed up your algorithms (python) : Solution + + + + + + + + + + + +
    + + + +
    + + +
    +
    +

    Speed up your algorithms (python)

    + +
    + +
    +
    +

    Run Forrest! Run !

    +
    +
    +
    + +

    Solution

    + +

    Here is a possible solution. + You can note that we have queried the indexes of the properties "isAlong" and "hasAlong" only once at the initialisation to avoid to recompute static information. + In a more usual way using classes, you could create a map with all the "static" indexes. +

    + +
    +

    +
    #!/usr/bin/env python
    +

    +
    import rospy
    +

    +
    from ontologenius import OntologyManipulatorIndex
    +

    +
    _onto = None
    +
    isAlong_index = 0
    +
    hasAlong_index = 0
    +

    +
    def displayRoute(route):
    +
    print('Route:')
    +
    route_id = _onto.conversion.individualsIndexes2Ids(route)
    +
    for point in route_id:
    +
    print('- ' + point)
    +

    +
    def findRoutes(path_from, path_to, selector):
    +
    global _onto
    +
    routes = []
    +
    routes.insert(0, [path_from])
    +

    +
    found = False
    +
    if path_from == path_to:
    +
    found = True
    +

    +
    while not found:
    +
    tmp_routes = []
    +
    for route in routes:
    +
    size = len(route) - 1
    +
    intersections = _onto.individuals.getFrom(isAlong_index, route[size])
    +

    +
    for intersection in intersections:
    +
    paths = _onto.individuals.getOn(intersection, isAlong_index, selector)
    +

    +
    # erase paths already present in the current route
    +
    paths = [path for path in paths if not path in route]
    +

    +
    for path in paths:
    +
    tmp = list(route)
    +
    tmp.insert(len(tmp), intersection)
    +
    tmp.insert(len(tmp), path)
    +
    tmp_routes.insert(len(tmp_routes), tmp)
    +
    if path == path_to:
    +
    found = True
    +

    +
    routes = list(tmp_routes)
    +

    +
    return routes
    +

    +
    def find(place_from, place_to, selector):
    +
    global _onto
    +
    res_route = []
    +
    min_size = 100
    +

    +
    paths_from = _onto.individuals.getOn(place_from, isAlong_index, selector)
    +
    paths_to = _onto.individuals.getFrom(hasAlong_index, place_to, selector)
    +

    +
    for path_from in paths_from:
    +
    for path_to in paths_to:
    +
    routes = findRoutes(path_from, path_to, selector)
    +
    for route in routes:
    +
    if route[len(route) - 1] == path_to:
    +
    if len(route) < min_size:
    +
    min_size = len(route)
    +
    res_route = route
    +

    +
    return res_route
    +

    +
    if __name__ == '__main__':
    +
    rospy.init_node('find_our_way')
    +

    +
    _onto = OntologyManipulatorIndex()
    +
    _onto.close()
    +

    +
    isAlong_index = _onto.conversion.objectPropertiesId2Index('isAlong')
    +
    hasAlong_index = _onto.conversion.objectPropertiesId2Index('hasAlong')
    +

    +
    route = find(_onto.conversion.individualsId2Index('pub'),
    +
    _onto.conversion.individualsId2Index('house'),
    +
    _onto.conversion.classesId2Index('path'))
    +
    displayRoute(route)
    +

    +
    route = find(_onto.conversion.individualsId2Index('house'),
    +
    _onto.conversion.individualsId2Index('car'),
    +
    _onto.conversion.classesId2Index('path'))
    +
    displayRoute(route)
    +

    +
    route = find(_onto.conversion.individualsId2Index('car'),
    +
    _onto.conversion.individualsId2Index('house'),
    +
    _onto.conversion.classesId2Index('road'))
    +
    displayRoute(route)
    +

    +
    + + + +
    +
    + +
    + + +
    +
    +

    + Brought to you by: + +

    +
    +
    + + diff --git a/docs/scripts/jquery-3.3.1.min.js b/docs/scripts/jquery-3.3.1.min.js deleted file mode 100644 index 4d9b3a25..00000000 --- a/docs/scripts/jquery-3.3.1.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("