diff --git a/README.md b/README.md
index 9b729bbe624bed01f84023bfe0a1b3bc5018eade..57fc2babcc92737c07a4d3ff30e645f6dccf083d 100644
--- a/README.md
+++ b/README.md
@@ -1,25 +1,16 @@
-*This repository is part of the outcomes of the Specialist Task Force 620 focusing on the authoring of a World Representation as part of the ETSI ISG Augmented Reality Framework architecture (https://www.etsi.org/deliver/etsi_gs/ARF/001_099/003/01.01.01_60/gs_ARF003v010101p.pdf).*
-*The set of the World Representation authoring components includes:*
-
-*• The C++ and C# source code for servers and clients generated from OpenAPI available here (https://forge.etsi.org/rep/arf/arf005)*
-
-*• A Unity plugin and a Unity editor for authoring and accessing a World Representation hosted on a World Storage server.*
-
-*All these components are available under the ETSI Labs group “World Storage API Helpers”: https://labs.etsi.org/rep/arf/world-storage-api-helpers*
-
-*If you wish to contribute to this project or any other projects in the context of the [ETSI ISG Augmented Reality Framework architecture](https://www.etsi.org/committee/1420-arf), please refer to the ["How to get involved in an ISG" section on the ETSI website](https://www.etsi.org/how-to-get-involved-in-an-isg)*
+*This repository is part of the outcomes of the Specialist Task Force 620 and 669 focusing on the authoring and use of a World Representation as part of the ETSI ISG Augmented Reality Framework architecture (https://www.etsi.org/deliver/etsi_gs/ARF/001_099/003/01.01.01_60/gs_ARF003v010101p.pdf).*
---
-
# SolARWorldStorage
-## Server implementation using the SolAR world storage module
+## SolAR module wrapping the C++ RestBed World Storage server and the C libcurl World Storage client
[![License](https://img.shields.io/github/license/SolARFramework/SolARModuleOpencv?style=flat-square&label=License)](https://www.apache.org/licenses/LICENSE-2.0)
-The goal of the world storage server is to be able to store and fetch online all the elements needed to design and execute AR apps.
-This server implements a [server partially generated by OpenAPI generator](https://labs.etsi.org/rep/arf/world-storage-api-helpers/world-storage-cpp-server.git), based on the ETSI specification and handles REST requests designed in the same ETSI specification file, [available on the ETSI forge](https://forge.etsi.org/rep/arf/arf005/-/blob/develop/API/openapi.yaml).
-It uses the ETSIWorldStorage component of the Solar world storage module ([SolARModuleWorldStorage]((https://github.com/SolarFramework/SolARModuleWorldStorage/tree/develop))) as an implementation for SolAR framework's [IWorldGraphManager](https://github.com/SolarFramework/SolARFramework/blob/feature/WorldGraph/interfaces/api/storage/IWorldGraphManager.h).
+The SolARModuleWorldGraph includes :
+- The SolAR framework wrapping from the World Storage Server based on a C++ RestBed implementation [available on the ETSI labs](https://labs.etsi.org/rep/arf/world-storage-api-helpers/world-storage-cpp-server);
+- The SolAR framework wrapping from the World Storage Client based on the C libcurl implementation [available on the ETSI labs](https://labs.etsi.org/rep/arf/world-storage-api-helpers/world-storage-c-client)
+Both server and client are generated with OpenAPI generator from the World Graph OpenAPI specification verison 2.0.0 [available on the ETSI forge](https://forge.etsi.org/rep/arf/openapi)
![All the project's architecture](images/SchemaWrapper.png)
@@ -31,12 +22,31 @@ All the classes in this project (except for the main and UnitSysConversion) are
Except for the `DefaultSolARImpl` class, that only has usages for when you want to check if the server is up and check the version, all of the request handling classes have the world storage singleton as an attribute. On which they will be able to call methods in response to requests.
The module is passsed down through the constructor to ensure the uniqueness of it.
+## Server implementation using the SolAR world storage module
+
+[![License](https://img.shields.io/github/license/SolARFramework/SolARModuleOpencv?style=flat-square&label=License)](https://www.apache.org/licenses/LICENSE-2.0)
+
+The server is available in the *Service-WorldStorage* folder. It consists of a executable which is able to load and instantiate at runtime the World Storage Server component available in the SolAR World Graph Module, to start the server waiting for client requests, and answering these requests.
+
+## Client implementation using the SolAR world storage module
+
+[![License](https://img.shields.io/github/license/SolARFramework/SolARModuleOpencv?style=flat-square&label=License)](https://www.apache.org/licenses/LICENSE-2.0)
+
+The server is available in the *Service-WorldStorage/tests* folder. It consists of a executable which is able to load and instantiate at runtime the World Storage Client component available in the SolAR World Graph Module, to to send requests to a World Storage server, and to display the result message.
+
## How to
To be able to compile and run this server, you need to:
-- clone [the OpenAPI world storage](https://labs.etsi.org/rep/arf/world-storage-api-helpers/world-storage-cpp-server.git) project and then generate the code and export it as a library (follow the git's instructions)
- have [remaken](https://github.com/b-com-software-basis/remaken) installed
-- clone [SolAR framework](https://github.com/SolarFramework/SolARFramework) (for now, as the work is not released yet, you will have to clone the [feature/WorldGraph](https://github.com/SolarFramework/SolARFramework/tree/feature/WorldGraph) branch), perform a `remaken install` in the source directory and finally build the project
-- clone [the world storage module](https://github.com/SolarFramework/SolARModuleWorldStorage) (for now, as the work is not released yet, you will have to clone the [develop](https://github.com/SolarFramework/SolARModuleWorldStorage/tree/develop) branch) and build it
-
-Once all those requirements are met, you should be able to compile your server and run it, you can try and send requests to http://localhost:8080 to try and see if it's working (e.g. POST request to see if the server is up : http://localhost:8080/ping)
+- build the world storage module using qtCreator. Before opening the projet, run the following commands to install dependencies:
+```
+Remaken install
+```
+and
+```
+Remaken install -c debug
+```
+- then build the World Storage server as well as the client test.
+- FInally, launch the server and the client binaries available in the folder *Service-WorldStorage\deploy\bin\x86_64\static\release*
+
+You can also test the server by sending requests to http://localhost:8080.
diff --git a/Service-WorldStorage/.gitignore b/Service-WorldStorage/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..8097bd2224131adc8a3e12e096bb3a83e3667e64
--- /dev/null
+++ b/Service-WorldStorage/.gitignore
@@ -0,0 +1,92 @@
+# Prerequisites
+*.d
+
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+build/
+.build-rules/
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+*.smod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Visual Studio files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.vcxproj*
+*.user
+*.user.*
+*.ncb
+*.sdf
+*.opensdf
+*.vcxproj
+*vcxproj.*
+x64/
+.vs/
+*.bat
+*remakeninfo.txt
+Debug/
+Release/
+*-packagedependencies.*
+*-packagedependencies-win.*
+*-packagedependencies-linux.*
+*-packagedependencies-unix.*
+*-packagedependencies-android.*
+*.pc
+*-Debug
+*-Release
+
+# Executables
+deploy/
+*.exe
+*.out
+*.app
+
+# Generated documentation
+doc/
+doxygen/
+
+# Tests builds
+tests/bin
+
+# Others
+*.*pre1
+*.rej
+*.stash
+*.rc
+*.res
+*.exp
+*.ilk
+*.pdb
+*.autosave
+*.project
+*.props
+*.log
+*.tlog
+*.TMP
+*.tmp
+.git Merge
\ No newline at end of file
diff --git a/Service-WorldStorage/LICENSE b/Service-WorldStorage/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64
--- /dev/null
+++ b/Service-WorldStorage/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/Service-WorldStorage/SolARService_WorldStorage.pro b/Service-WorldStorage/SolARService_WorldStorage.pro
new file mode 100644
index 0000000000000000000000000000000000000000..2ae2965bf39a05f22c3c38d009fc4a8cb5edd671
--- /dev/null
+++ b/Service-WorldStorage/SolARService_WorldStorage.pro
@@ -0,0 +1,75 @@
+###############################################################################
+# SolAR ARCloud
+# (C) Copyright 2024 b<>com. All rights reserved.
+#
+# IDDN: FR.XXX.XXXXXX.XXX.X.X.XXXX.XXX.XXXXX
+# This software is the confidential intellectual property of b<>com.
+# You shall not disclose it and shall use it only in accordance with
+# the terms of the license agreement you entered into with b<>com.
+#
+################################################################################
+
+## remove Qt dependencies
+QT -= core gui
+CONFIG -= qt
+
+QMAKE_PROJECT_DEPTH = 0
+
+## global defintions : target lib name, version
+TARGET = SolARService_WorldStorage
+VERSION = 1.2.0
+PROJECTDEPLOYDIR = $${PWD}/deploy
+
+CONFIG += c++1z
+CONFIG += console
+
+DEFINES += MYVERSION=\"\\\"$${VERSION}\\\"\"
+
+include(findremakenrules.pri)
+
+win32:CONFIG -= static
+win32:CONFIG += shared
+
+QMAKE_TARGET.arch = x86_64 #must be defined prior to include
+
+# Default rules for deployment.
+#qnx: target.path = $${PWD}/bin/Debug# /tmp/$${TARGET}/bin
+#else: unix:!android: target.path = /opt/$${TARGET}/bin
+#!isEmpty(target.path): INSTALLS += target
+
+DEPENDENCIESCONFIG = shared install_recurse
+
+## Configuration for Visual Studio to install binaries and dependencies. Work also for QT Creator by replacing QMAKE_INSTALL
+PROJECTCONFIG = QTVS
+
+#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion
+include ($$shell_quote($$shell_path($${QMAKE_REMAKEN_RULES_ROOT}/templateappconfig.pri))) # Shell_quote & shell_path required for visual on windows
+
+SOURCES += main.cpp
+
+unix {
+ LIBS += -ldl
+ # Avoids adding install steps manually. To be commented to have a better control over them.
+ QMAKE_POST_LINK += "make install install_deps"
+}
+
+win32 {
+ QMAKE_LFLAGS += /MACHINE:X64
+ DEFINES += WIN64 UNICODE _UNICODE
+ QMAKE_COMPILER_DEFINES += _WIN64
+ QMAKE_CXXFLAGS += -wd4250 -wd4251 -wd4244 -wd4275
+
+ # Windows Kit (msvc2013 64)
+ LIBS += -L$$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -lshell32 -lgdi32 -lComdlg32
+ INCLUDEPATH += $$(WINDOWSSDKDIR)lib/winv6.3/um/x64
+}
+
+config_files.path = $${TARGETDEPLOYDIR}
+config_files.files= $$files($${PWD}/SolARService_World_Storage_conf.xml)
+INSTALLS += config_files
+
+DISTFILES += \
+ packagedependencies.txt
+
+#NOTE : Must be placed at the end of the .pro
+include ($$shell_quote($$shell_path($${QMAKE_REMAKEN_RULES_ROOT}/remaken_install_target.pri)))) # Shell_quote & shell_path required for visual on windows
diff --git a/Service-WorldStorage/SolARService_World_Storage_conf.xml b/Service-WorldStorage/SolARService_World_Storage_conf.xml
new file mode 100644
index 0000000000000000000000000000000000000000..06d08c00d95eb5c4c0a147a47be7af59e2fa6dd9
--- /dev/null
+++ b/Service-WorldStorage/SolARService_World_Storage_conf.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/findremakenrules.pri b/Service-WorldStorage/findremakenrules.pri
similarity index 100%
rename from findremakenrules.pri
rename to Service-WorldStorage/findremakenrules.pri
diff --git a/Service-WorldStorage/images/AnchorMethods.png b/Service-WorldStorage/images/AnchorMethods.png
new file mode 100644
index 0000000000000000000000000000000000000000..14c16be461e2daeb321fc8ad972c34c54d98a62d
Binary files /dev/null and b/Service-WorldStorage/images/AnchorMethods.png differ
diff --git a/Service-WorldStorage/images/DefaultMethods.png b/Service-WorldStorage/images/DefaultMethods.png
new file mode 100644
index 0000000000000000000000000000000000000000..97316f382bd351bbe197de2bec56bc9c13ce06f1
Binary files /dev/null and b/Service-WorldStorage/images/DefaultMethods.png differ
diff --git a/Service-WorldStorage/images/HandleSetUp.png b/Service-WorldStorage/images/HandleSetUp.png
new file mode 100644
index 0000000000000000000000000000000000000000..e431f5d8642543baa6fa499c27bb8f92cb649ad4
Binary files /dev/null and b/Service-WorldStorage/images/HandleSetUp.png differ
diff --git a/Service-WorldStorage/images/LinkMethods.png b/Service-WorldStorage/images/LinkMethods.png
new file mode 100644
index 0000000000000000000000000000000000000000..1d064d7b0ac55ff760ef0a7eb71dc6a5228fab0d
Binary files /dev/null and b/Service-WorldStorage/images/LinkMethods.png differ
diff --git a/Service-WorldStorage/images/SchemaWrapper.png b/Service-WorldStorage/images/SchemaWrapper.png
new file mode 100644
index 0000000000000000000000000000000000000000..b562c46c54fbb09ffa22f4eb334c9290f6b918f4
Binary files /dev/null and b/Service-WorldStorage/images/SchemaWrapper.png differ
diff --git a/Service-WorldStorage/images/ToUUID.png b/Service-WorldStorage/images/ToUUID.png
new file mode 100644
index 0000000000000000000000000000000000000000..b4bd982790dc02e075e479f7ea368d769b36d947
Binary files /dev/null and b/Service-WorldStorage/images/ToUUID.png differ
diff --git a/Service-WorldStorage/images/TrackableMethods.png b/Service-WorldStorage/images/TrackableMethods.png
new file mode 100644
index 0000000000000000000000000000000000000000..1ad5285add7dab5018dd6872933587f32a280c18
Binary files /dev/null and b/Service-WorldStorage/images/TrackableMethods.png differ
diff --git a/Service-WorldStorage/images/WorldStorageServer.png b/Service-WorldStorage/images/WorldStorageServer.png
new file mode 100644
index 0000000000000000000000000000000000000000..904b8767ee6e29fdc7c3274f6edd5f7046936b1b
Binary files /dev/null and b/Service-WorldStorage/images/WorldStorageServer.png differ
diff --git a/Service-WorldStorage/images/XPCFComponentManager.png b/Service-WorldStorage/images/XPCFComponentManager.png
new file mode 100644
index 0000000000000000000000000000000000000000..b290307312a1c9db1e56370184e5f6613881ac90
Binary files /dev/null and b/Service-WorldStorage/images/XPCFComponentManager.png differ
diff --git a/Service-WorldStorage/images/serverClasses.png b/Service-WorldStorage/images/serverClasses.png
new file mode 100644
index 0000000000000000000000000000000000000000..73c0e3c45134f46052f41d78921f7d3eb6df2586
Binary files /dev/null and b/Service-WorldStorage/images/serverClasses.png differ
diff --git a/Service-WorldStorage/main.cpp b/Service-WorldStorage/main.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..902881688cfbdfd6a78f89b7725b212e79085139
--- /dev/null
+++ b/Service-WorldStorage/main.cpp
@@ -0,0 +1,101 @@
+/**
+ * @copyright Copyright (c) 2021-2022 B-com http://www.b-com.com/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+* World Storage API
+* API ensuring interoperability between an authoring tool and a World Storage service
+*
+* The version of the OpenAPI document: 0.0.1
+*
+*
+* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+* https://openapi-generator.tech
+* Do not edit the class manually.
+*/
+
+#include
+#include
+#include
+#include
+#include
+
+namespace xpcf = org::bcom::xpcf;
+
+using namespace SolAR;
+using namespace SolAR::api;
+
+// Global service instance
+SRef worldGraphService = 0;
+
+// Function called when interruption signal is triggered to close the service.
+static void SigInt(int /* signo */) {
+
+ LOG_INFO("\n\n===> Program interruption\n");
+
+ LOG_INFO("Stop World Graph Service");
+
+ if (worldGraphService != 0) {
+ worldGraphService->stop();
+ }
+
+ LOG_INFO("World Graph Service stopped");
+
+ exit(0);
+}
+
+int main() {
+
+ try {
+
+#if NDEBUG
+ boost::log::core::get()->set_logging_enabled(false);
+#endif
+
+ //init the logger
+ LOG_ADD_LOG_TO_CONSOLE();
+ LOG_INFO("program is running");
+
+ // Signal interruption function (Ctrl + C)
+ signal(SIGINT, SigInt);
+
+ /* instantiate component manager*/
+ /* this is needed in dynamic mode */
+ SRef xpcfComponentManager = xpcf::getComponentManagerInstance();
+
+ if(xpcfComponentManager->load("SolARService_World_Storage_conf.xml")!=org::bcom::xpcf::_SUCCESS)
+ {
+ LOG_ERROR("Failed to load the configuration file SolARService_World_Storage_conf.xml");
+ return -1;
+ }
+ worldGraphService = xpcfComponentManager->resolve();
+
+ // init and start the World Graph Service
+ worldGraphService->init();
+ worldGraphService->start();
+
+ return EXIT_SUCCESS;
+ }
+
+ catch (xpcf::Exception e)
+ {
+ LOG_ERROR("Exception raised : \n {}", e.what())
+ return -1;
+ }
+ return 0;
+
+}
+
+
diff --git a/Service-WorldStorage/packagedependencies.txt b/Service-WorldStorage/packagedependencies.txt
new file mode 100644
index 0000000000000000000000000000000000000000..40098e7c69177479e806f98c9e7b80908acf461c
--- /dev/null
+++ b/Service-WorldStorage/packagedependencies.txt
@@ -0,0 +1 @@
+SolARFramework|1.3.0|SolARFramework|SolARBuild@github|https://github.com/SolarFramework/SolarFramework/releases/download
diff --git a/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/.gitignore b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..fab7372d796ea95c80d02df6caa7eb2b411a7ac1
--- /dev/null
+++ b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/.gitignore
@@ -0,0 +1,73 @@
+# This file is used to ignore files which are generated
+# ----------------------------------------------------------------------------
+
+*~
+*.autosave
+*.a
+*.core
+*.moc
+*.o
+*.obj
+*.orig
+*.rej
+*.so
+*.so.*
+*_pch.h.cpp
+*_resource.rc
+*.qm
+.#*
+*.*#
+core
+!core/
+tags
+.DS_Store
+.directory
+*.debug
+Makefile*
+*.prl
+*.app
+moc_*.cpp
+ui_*.h
+qrc_*.cpp
+Thumbs.db
+*.res
+*.rc
+/.qmake.cache
+/.qmake.stash
+
+# qtcreator generated files
+*.pro.user*
+
+# xemacs temporary files
+*.flc
+
+# Vim temporary files
+.*.swp
+
+# Visual Studio generated files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.ncb
+*.sdf
+*.opensdf
+*.vcxproj
+*vcxproj.*
+
+# MinGW generated files
+*.Debug
+*.Release
+
+# Python byte code
+*.pyc
+
+# Binaries
+# --------
+*.dll
+*.exe
+
diff --git a/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage.pro b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage.pro
new file mode 100644
index 0000000000000000000000000000000000000000..0aaa8dce2c5daaf9f7278ed39b0f2e49f44fd6d4
--- /dev/null
+++ b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage.pro
@@ -0,0 +1,91 @@
+###############################################################################
+# SolAR ARCloud
+# (C) Copyright 2024 b<>com. All rights reserved.
+#
+# IDDN: FR.001.020021.000.S.C.2024.000.00000
+# This software is the confidential intellectual property of b<>com.
+# You shall not disclose it and shall use it only in accordance with
+# the terms of the license agreement you entered into with b<>com.
+#
+################################################################################
+
+## remove Qt dependencies
+QT -= core gui
+CONFIG -= qt
+
+QMAKE_PROJECT_DEPTH = 0
+
+## global defintions : target lib name, version
+TARGET = SolARServiceTest_WorldStorage
+VERSION=1.2.0
+PROJECTDEPLOYDIR = $${PWD}/../../deploy
+
+DEFINES += MYVERSION=$${VERSION}
+CONFIG += c++1z
+CONFIG += console
+
+CONFIG += externaldeps
+
+include(findremakenrules.pri)
+
+CONFIG(debug,debug|release) {
+ DEFINES += _DEBUG=1
+ DEFINES += DEBUG=1
+}
+
+CONFIG(release,debug|release) {
+ DEFINES += _NDEBUG=1
+ DEFINES += NDEBUG=1
+}
+
+win32:CONFIG -= static
+win32:CONFIG += shared
+
+QMAKE_TARGET.arch = x86_64 #must be defined prior to include
+
+DEPENDENCIESCONFIG = sharedlib install_recurse
+
+PROJECTCONFIG = QTVS
+
+#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion
+include ($$shell_quote($$shell_path($${QMAKE_REMAKEN_RULES_ROOT}/templateappconfig.pri))) # Shell_quote & shell_path required for visual on windows
+
+HEADERS += \
+
+SOURCES += \
+ SolARServiceTest_WorldStorage_main.cpp
+
+unix {
+ LIBS += -ldl
+ QMAKE_CXXFLAGS += -Wno-attributes
+
+ # Avoids adding install steps manually. To be commented to have a better control over them.
+ QMAKE_POST_LINK += "$(MAKE) install install_deps"
+}
+
+linux {
+ QMAKE_LFLAGS += -ldl
+# LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc
+}
+
+win32 {
+
+ DEFINES += WIN64 UNICODE _UNICODE
+ QMAKE_COMPILER_DEFINES += _WIN64
+ QMAKE_CXXFLAGS += -wd4250 -wd4251 -wd4244 -wd4275
+}
+
+config_files.path = $${TARGETDEPLOYDIR}
+config_files.files= $$files($${PWD}/SolARServiceTest_WorldStorage_conf.xml)
+INSTALLS += config_files
+
+OTHER_FILES += \
+ packagedependencies.txt
+
+DISTFILES += \
+ .gitignore \
+ SolARServiceTest_WorldStorage_conf.xml
+
+#NOTE : Must be placed at the end of the .pro
+include ($$shell_quote($$shell_path($${QMAKE_REMAKEN_RULES_ROOT}/remaken_install_target.pri)))) # Shell_quote & shell_path required for visual on windows
+
diff --git a/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage_conf.xml b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage_conf.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ce3e5c24c96c2034c453b4ef65b47eab0a3c8658
--- /dev/null
+++ b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage_conf.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage_main.cpp b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage_main.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cc72a0d1059310f6fbc15e1e06a2d9b37eba24fe
--- /dev/null
+++ b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/SolARServiceTest_WorldStorage_main.cpp
@@ -0,0 +1,329 @@
+/*******************************************************************************
+ * SolAR ARCloud
+ * (C) Copyright 2022 b<>com. All rights reserved.
+ *
+ * IDDN: FR.001.020021.000.S.C.2024.000.00000
+ * This software is the confidential intellectual property of b<>com.
+ * You shall not disclose it and shall use it only in accordance with
+ * the terms of the license agreement you entered into with b<>com.
+ *
+ ********************************************************************************/
+
+#include
+#include
+#include
+
+#include "core/Log.h"
+#include "api/storage/IWorldGraphManager.h"
+
+using namespace std;
+using namespace SolAR;
+using namespace SolAR::datastructure;
+using namespace SolAR::api::storage;
+
+namespace xpcf=org::bcom::xpcf;
+
+///
+/// \brief Test application for SolARService_WorldStroage
+///
+
+int main(int argc, char ** argv)
+{
+#if NDEBUG
+ boost::log::core::get()->set_logging_enabled(false);
+#endif
+
+ LOG_ADD_LOG_TO_CONSOLE();
+
+// LOG_SET_DEBUG_LEVEL();
+
+ // XPCF Component Manager
+ SRef xpcfComponentManager = 0;
+
+ // Components used for the test
+ SRef worldGraphClient = 0;
+
+ // Default configuration file
+ char * config_file = (char *)"SolARServiceTest_WorldStorage_conf.xml";
+
+ if (argc > 1) {
+ // Get service configuration file path and name from main args
+ config_file = argv[1];
+ }
+
+ try {
+ LOG_INFO("Get Component Manager instance");
+
+ xpcfComponentManager = xpcf::getComponentManagerInstance();
+
+ LOG_INFO("Load Service impl configuration file");
+
+ if (xpcfComponentManager->load(config_file) == org::bcom::xpcf::_SUCCESS)
+ {
+ // Create service impl component
+ worldGraphClient = xpcfComponentManager->resolve();
+
+ LOG_INFO("Service Manager impl component created");
+ }
+ else {
+ LOG_ERROR("Failed to load the configuration file {}", config_file);
+ return -1;
+ }
+
+ org::bcom::xpcf::uuids::random_generator generator;
+ org::bcom::xpcf::uuids::uuid creatorUuid = generator();
+ EncodingInfo encodingInfo("OTHER","1.2.0");
+ UnitSystem unitSystem = UnitSystem::M;
+
+ org::bcom::xpcf::uuids::uuid uuidWA;
+ org::bcom::xpcf::uuids::uuid uuidWA2;
+ org::bcom::xpcf::uuids::uuid uuidFiducial1;
+ org::bcom::xpcf::uuids::uuid uuidFiducial2;
+ org::bcom::xpcf::uuids::uuid uuidFiducial3;
+ org::bcom::xpcf::uuids::uuid uuidLinkWAtoF1;
+ org::bcom::xpcf::uuids::uuid uuidLinkWAtoWA2;
+ org::bcom::xpcf::uuids::uuid uuidLinkWA2toF2;
+ org::bcom::xpcf::uuids::uuid uuidLinkWA2toF3;
+
+
+
+
+
+
+
+ SRef fiducial1 = xpcf::utils::make_shared
+ (creatorUuid,
+ Transform3Df::Identity(),
+ unitSystem,
+ datastructure::Vector3d{1.0f, 1.0f, 1.0f},
+ std::multimap {{"place","bcom4A"}},
+ StorageTrackableType::FIDUCIAL_MARKER,
+ encodingInfo,
+ std::vector{std::byte{0x01}, std::byte{0x01}, std::byte{0x00}},
+ "FIDUCIAL MARKER door");
+
+ SRef fiducial2 = xpcf::utils::make_shared
+ (creatorUuid,
+ Transform3Df::Identity(),
+ unitSystem,
+ datastructure::Vector3d{1.0f, 1.0f, 1.0f},
+ std::multimap {{"place","bcom4A"}},
+ StorageTrackableType::MAP,
+ encodingInfo,
+ std::vector{std::byte{0x01}, std::byte{0x01}, std::byte{0x00}},
+ "MAP room");
+
+ SRef fiducial3 = xpcf::utils::make_shared
+ (creatorUuid,
+ Transform3Df::Identity(),
+ unitSystem,
+ datastructure::Vector3d{1.0f, 1.0f, 1.0f},
+ std::multimap {{"place","bcom4A"}},
+ StorageTrackableType::FIDUCIAL_MARKER,
+ encodingInfo,
+ std::vector{std::byte{0x01}, std::byte{0x01}, std::byte{0x00}},
+ "FIDUCIAL MARKER room");
+
+ SRef wa1 = xpcf::utils::make_shared
+ (creatorUuid,
+ Transform3Df::Identity(),
+ unitSystem,
+ datastructure::Vector3d{1.0f, 1.0f, 1.0f},
+ std::multimap {{"place","bcom4A"},{"room","2a"}},
+ "WORLD ANCHOR door"
+ );
+
+
+ SRef wa2 = xpcf::utils::make_shared
+ (creatorUuid,
+ Transform3Df::Identity(),
+ unitSystem,
+ datastructure::Vector3d{1.0f, 1.0f, 1.0f},
+ std::multimap {{"place","bcom4A"},{"room","2a"}},
+ "WORLD ANCHOR room"
+ );
+
+
+ //WA1 POST
+ if (worldGraphClient->addWorldAnchor(uuidWA, wa1) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("World Anchor has been added. uuid returned: {}\n", uuidWA);
+ }
+ else
+ {
+ LOG_ERROR("World Anchor has not been added.\n");
+ }
+
+
+ //WA2 POST
+ if (worldGraphClient->addWorldAnchor(uuidWA2, wa2) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("World Anchor has been added. uuid returned: {}\n", uuidWA2);
+ }
+ else
+ {
+ LOG_ERROR("World Anchor has not been added.\n");
+ }
+
+
+
+ //TRACKABLE1
+ if (worldGraphClient->addTrackable(uuidFiducial1, fiducial1) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("Trackable has been added. uuid returned: {}\n", uuidFiducial1);
+ }
+ else
+ {
+ LOG_ERROR("Trackable has not been added.\n");
+ }
+
+
+
+ //TRACKABLE2
+ if (worldGraphClient->addTrackable(uuidFiducial2, fiducial2) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("Trackable has been added. uuid returned: {}\n", uuidFiducial2);
+ }
+ else
+ {
+ LOG_ERROR("Trackable has not been added.\n");
+ }
+
+
+
+
+ //TRACKABLE3
+ if (worldGraphClient->addTrackable(uuidFiducial3, fiducial3) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("Trackable has been added. uuid returned: {}\n", uuidFiducial3);
+ }
+ else
+ {
+ LOG_ERROR("Trackable has not been added.\n");
+ }
+
+
+
+ Eigen::Vector3f translate(0.0f, 2.0f, 0.0f);
+ Transform3Df t = Transform3Df::Identity();
+
+
+ SRef linkWatoF1 = xpcf::utils::make_shared(creatorUuid,
+ uuidWA,
+ uuidFiducial1,
+ ElementKind::ANCHOR,
+ ElementKind::TRACKABLE,
+ t.translate(translate),
+ unitSystem,
+ std::multimap {{"place","bcom4A"},{"room","2a"}}
+ );
+ SRef linkWAtoWA2 = xpcf::utils::make_shared(creatorUuid,
+ uuidWA,
+ uuidWA2,
+ ElementKind::ANCHOR,
+ ElementKind::ANCHOR,
+ t.translate(translate),
+ unitSystem,
+ std::multimap {{"place","bcom4A"},{"room","2a"}}
+ );
+ SRef linkWA2toF2 = xpcf::utils::make_shared(creatorUuid,
+ uuidWA2,
+ uuidFiducial2,
+ ElementKind::ANCHOR,
+ ElementKind::TRACKABLE,
+ t.translate(translate),
+ unitSystem,
+ std::multimap {{"place","bcom4A"},{"room","2a"}}
+ );
+ SRef linkWA2toF3 = xpcf::utils::make_shared(creatorUuid,
+ uuidWA2,
+ uuidFiducial3,
+ ElementKind::ANCHOR,
+ ElementKind::TRACKABLE,
+ t.translate(translate),
+ unitSystem,
+ std::multimap {{"place","bcom4A"},{"room","2a"}}
+ );
+
+
+ //LINK1
+ if (worldGraphClient->addWorldLink(uuidLinkWAtoF1, linkWatoF1) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("Link has been added. uuid returned: {}\n", uuidLinkWAtoF1);
+ }
+ else
+ {
+ LOG_ERROR("Link has not been added.\n");
+ }
+
+
+
+
+ if (worldGraphClient->addWorldLink(uuidLinkWAtoWA2, linkWAtoWA2) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("Link has been added. uuid returned: {}\n", uuidLinkWAtoWA2);
+ }
+ else
+ {
+ LOG_ERROR("Link has not been added.\n");
+ }
+
+
+
+ if (worldGraphClient->addWorldLink(uuidLinkWA2toF2, linkWA2toF2) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("Link has been added. uuid returned: {}\n", uuidLinkWA2toF2);
+ }
+ else
+ {
+ LOG_ERROR("Link has not been added.\n");
+ }
+
+
+
+ if (worldGraphClient->addWorldLink(uuidLinkWA2toF3, linkWA2toF3) == FrameworkReturnCode::_SUCCESS)
+ {
+ LOG_INFO("Link has been added. uuid returned: {}\n", uuidLinkWA2toF2);
+ }
+ else
+ {
+ LOG_ERROR("Link has not been added.\n");
+ }
+
+
+
+
+
+
+
+
+ std::vector capabilities;
+ datastructure::StorageCapabilities capabilityMarker(StorageTrackableType::FIDUCIAL_MARKER,encodingInfo);
+ datastructure::StorageCapabilities capabilityMap(StorageTrackableType::MAP,encodingInfo);
+ capabilities.push_back(capabilityMarker);
+ capabilities.push_back(capabilityMap);
+ std::vector> uuids;
+ std::tuple element1 = std::make_tuple(uuidWA,true);
+ uuids.push_back(element1);
+ std::vector relocalizationInformation;
+ if (worldGraphClient->getRelocalizationInformation(uuids,"NULL",capabilities,relocalizationInformation) == FrameworkReturnCode::_SUCCESS)
+ {
+
+ for(datastructure::RelocalizationInformation relocObj : relocalizationInformation){
+ LOG_INFO("Reloc has been effectued. returned: {}", relocObj.getRootUUID());
+ }
+ }
+ else
+ {
+ LOG_ERROR("Reloc has failed.");
+ }
+
+ LOG_INFO("End of test");
+ }
+ catch (xpcf::Exception & e) {
+ LOG_ERROR("The following exception has been caught {}", e.what());
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/findremakenrules.pri b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/findremakenrules.pri
new file mode 100644
index 0000000000000000000000000000000000000000..044728821fd63680bb80383c30f834d3b46dd9cf
--- /dev/null
+++ b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/findremakenrules.pri
@@ -0,0 +1,43 @@
+# Author(s) : Loic Touraine, Stephane Leduc
+
+android {
+ # unix path
+ USERHOMEFOLDER = $$clean_path($$(HOME))
+ isEmpty(USERHOMEFOLDER) {
+ # windows path
+ USERHOMEFOLDER = $$clean_path($$(USERPROFILE))
+ isEmpty(USERHOMEFOLDER) {
+ USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH))
+ }
+ }
+}
+
+unix:!android {
+ USERHOMEFOLDER = $$clean_path($$(HOME))
+}
+
+win32 {
+ USERHOMEFOLDER = $$clean_path($$(USERPROFILE))
+ isEmpty(USERHOMEFOLDER) {
+ USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH))
+ }
+}
+
+exists(builddefs/qmake) {
+ QMAKE_REMAKEN_RULES_ROOT=builddefs/qmake
+}
+else {
+ QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT))
+ !isEmpty(QMAKE_REMAKEN_RULES_ROOT) {
+ QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)/qmake)
+ }
+ else {
+ QMAKE_REMAKEN_RULES_ROOT = $${USERHOMEFOLDER}/.remaken/rules/qmake
+ }
+}
+
+!exists($${QMAKE_REMAKEN_RULES_ROOT}) {
+ error("Unable to locate remaken rules in " $${QMAKE_REMAKEN_RULES_ROOT} ". Either check your remaken installation, or provide the path to your remaken qmake root folder rules in REMAKEN_RULES_ROOT environment variable.")
+}
+
+message("Remaken qmake build rules used : " $$QMAKE_REMAKEN_RULES_ROOT)
\ No newline at end of file
diff --git a/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/packagedependencies.txt b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/packagedependencies.txt
new file mode 100644
index 0000000000000000000000000000000000000000..40098e7c69177479e806f98c9e7b80908acf461c
--- /dev/null
+++ b/Service-WorldStorage/tests/SolARServiceTest_WorldStorage/packagedependencies.txt
@@ -0,0 +1 @@
+SolARFramework|1.3.0|SolARFramework|SolARBuild@github|https://github.com/SolarFramework/SolarFramework/releases/download
diff --git a/SolARModuleWorldGraph/.gitignore b/SolARModuleWorldGraph/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..19abf714c09ec19c4ce39ed8cea9b31dc400ed06
--- /dev/null
+++ b/SolARModuleWorldGraph/.gitignore
@@ -0,0 +1,91 @@
+# Prerequisites
+*.d
+
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+build/
+.build-rules/
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+*.smod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Visual Studio files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.vcxproj*
+*.user
+*.user.*
+*.ncb
+*.sdf
+*.opensdf
+*.vcxproj
+*vcxproj.*
+x64/
+.vs/
+*.bat
+*remakeninfo.txt
+Debug/
+Release/
+*-packagedependencies.*
+*-packagedependencies-win.*
+*-packagedependencies-linux.*
+*-packagedependencies-unix.*
+*-packagedependencies-android.*
+*.pc
+*-Debug
+*-Release
+
+# Executables
+*.exe
+*.out
+*.app
+
+# Generated documentation
+doc/
+doxygen/
+
+# Tests builds
+tests/bin
+
+# Others
+*.*pre1
+*.rej
+*.stash
+*.rc
+*.res
+*.exp
+*.ilk
+*.pdb
+*.autosave
+*.project
+*.props
+*.log
+*.tlog
+*.TMP
+*.tmp
+.git Merge
\ No newline at end of file
diff --git a/SolARModuleWorldGraph/LICENSE b/SolARModuleWorldGraph/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..89032c6df05d7377965b4586a708eca664611b9a
--- /dev/null
+++ b/SolARModuleWorldGraph/LICENSE
@@ -0,0 +1,4 @@
+(C) Copyright b<>com. All rights reserved.
+IDDN: FR.XXX.XXXXXX.XXX.X.X.XXXX.XXX.XXXXX
+
+This software is the confidential intellectual property of b<>com. You shall not disclose it and shall use it only in accordance with the terms of the license agreement you entered into with b<>com.
diff --git a/SolARModuleWorldGraph/README.md b/SolARModuleWorldGraph/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..06a1f20c4be87c81a7409874e7f7012313d7314f
--- /dev/null
+++ b/SolARModuleWorldGraph/README.md
@@ -0,0 +1,117 @@
+# SolARModuleWorldStorage
+
+**SolARModuleWorldStorage** is a module used to store the elements needed to represent the world in an Augmented Reality application. These elements are called world elements and are represented by the abstract class ``StorageWorldElement``.
+
+To handle the elements, the module will deal with two of its attributes :
+- ``m_id`` : An ID, it is a UUID randomly generated when the instance of the element is created
+- ``m_tags`` : a ``MultiMap`` of `Pair`, which stores text attributes that we want to add by name ( e.g. : `"Floor":"4", "Aisle":"A"`)
+
+They are currently two types of WorldElements and both of them inherit from the class ``StorageWorldElement`` :
+ - ``StorageTrackable``
+ - ``StorageWorldAnchor``
+
+Each of those have corresponding attributes that are useful if you want to develop an Augmented Reality application.
+
+Furthermore, to be compliant with the latest ETSI API Specification, the module also handle ``StorageWorldLink``, a SolAR datastructure that holds the information of the relationship between two elements (i.e. the id of both elements and the transfrom between them).
+
+---
+
+## Module
+
+The module has itself three attributes to store the information:
+
+- **m_nodes** : `map>`
+ - The map that holds all of the elements in the world storage, it stores their id as keys for performance purposes.
+- **m_links** : `map>`
+ - The map that holds all of the information regarding relations between each element.
+- **m_tags** : `multimap, shared_ptr>`
+ - A multimap that allows for research by the `tag`.
+
+All the methods implemented in the module return a `FRAMEWORK_RETURN_CODE`, a SolAR enum to standardize and store responses from methods. most of them will return
+- `FRAMEWORK_RETURN_CODE::_SUCCESS` when the method executes succesfuly
+- `FRAMEWORK_RETURN_CODE::_ERROR__` when an error is raised
+- `FRAMEWORK_RETURN_CODE::_NOT_FOUND_` when ressources that need to be fetched are not available.
+
+---
+
+## World Elements nodes
+
+The world storage module has a map that stores the world elements and offer several methods you can use to perform operations on it :
+
+#### *getting a single element*
+
+> `getWorldElement`( in UUID id, out StorageWorldElement worldElement)
+> - Gets any element given its ID
+
+> `getTrackable`( in UUID id, out StorageTrackable trackable)
+> - Gets a trackable given its ID
+
+> `getWorldAnchor`( in UUID id, out StorageWorldAnchor worldAnchor)
+> - Gets an anchor given its ID
+
+#### *getting all elements of a given type*
+
+> `getWorldElements`( out vector vector)
+> - Gets all the elements of the world storage
+
+> `getTrackables`( out vector vector)
+> - Gets all the trackables of the world storage
+
+> `getWorldAnchors`( out vector vector)
+> - Gets all the anchors of the world storage
+
+#### *adding elements to the world storage*
+
+> `addTrackable`( out UUID id, in StorageTrackable trackable)
+> - Adds a trackable to the world storage
+
+> `addWorldAnchor`( out UUID id, in StorageWorldAnchor worldAnchor)
+> - Adds an anchor to the world storage
+
+#### *removing elements from the world storage*
+
+> `removeTrackable`( in UUID id)
+> - Removes a Trackable from the world storage given its id
+
+> `removeWorldAnchor`( in UUID id)
+> - Removes an anchor from the world storage given its id
+
+---
+
+## Links nodes
+
+Furthermore the world storage also needs to store the edges between two worldElements, for this purpose it also manipulates a data structure called StorageWorldLink. It stores the information ceoncerning the two world elements that it links and the 3D transform between them. Like the world elements it needs to be stored in a map with its UUID as a key.
+
+#### *getting a single link*
+
+> `getWorldLink`( in UUID id, out StorageWorldLink worldLink)
+> - Gets any link given its ID
+
+> `getWorldLink`( in UUID parentId, in UUID childId, out StorageWorldLink worldLink)
+> - Gets any link given the ids of the two elements it links
+
+#### *getting all links*
+
+> `getWorldLinks`( out vector vector)
+> - Gets all the links connecting the world elements
+
+#### *adding links*
+
+> `addWorldLink`( in StorageWorldLink worldLink, out UUID id)
+> - Adds a new link
+
+#### *removing links*
+
+> `removeWorldLink`( in UUID id)
+> - Removes a link given its id
+
+> `removeWorldLink`( in UUID parentId, in UUID childId)
+> - Removes a link given the ids of the two elements it links
+
+---
+
+## Tags
+As mentioned earlier, all of our dataStructures hold a multi map attribute m_tags that holds pairs of String attributes and values.
+
+We store all of these pairs in a multimap as a key to which are mapped as values, the elements that are holding them. This way we can perform operations on Elements given a pair of String key/value (e.g. : We want to delete all the elements that have the attribute `"shape":"triangle"`).
+However those operations have yet to be implemented
diff --git a/SolARModuleWorldGraph/SolARModuleWorldStorage.pri b/SolARModuleWorldGraph/SolARModuleWorldStorage.pri
new file mode 100644
index 0000000000000000000000000000000000000000..08b6571badf3a58bae6883c667f5e8e31d45d951
--- /dev/null
+++ b/SolARModuleWorldGraph/SolARModuleWorldStorage.pri
@@ -0,0 +1,23 @@
+HEADERS += \
+ interfaces/SolARWorldStorageAPI.h \
+ interfaces/ETSIWorldGraphClient.h \
+ interfaces/ETSIWorldGraphManager.h \
+ interfaces/ETSIWorldGraphService.h \
+ interfaces/RestBedImpl/DefaultSolARImpl.h \
+ interfaces/RestBedImpl/RelocalizationInformationSolARImpl.h \
+ interfaces/RestBedImpl/TrackablesSolARImpl.h \
+ interfaces/RestBedImpl/UnitSysConversion.h \
+ interfaces/RestBedImpl/WorldAnchorsSolARImpl.h \
+ interfaces/RestBedImpl/WorldLinksSolARImpl.h
+
+SOURCES += \
+ src/ETSIWorldGraphClient.cpp \
+ src/ETSIWorldGraphManager.cpp \
+ src/ETSIWorldGraphService.cpp \
+ src/SolARModuleWorldStorage_main.cpp \
+ src/RestBedImpl/DefaultSolARImpl.cpp \
+ src/RestBedImpl/RelocalizationInformationSolARImpl.cpp \
+ src/RestBedImpl/TrackablesSolARImpl.cpp \
+ src/RestBedImpl/WorldAnchorsSolARImpl.cpp \
+ src/RestBedImpl/WorldLinksSolARImpl.cpp
+
diff --git a/SolARModuleWorldGraph/SolARModuleWorldStorage.pro b/SolARModuleWorldGraph/SolARModuleWorldStorage.pro
new file mode 100644
index 0000000000000000000000000000000000000000..05fedaaf8306d450f2643c0727badd8b0971bb7a
--- /dev/null
+++ b/SolARModuleWorldGraph/SolARModuleWorldStorage.pro
@@ -0,0 +1,107 @@
+###############################################################################
+# SolAR ARCloud
+# (C) Copyright 2024 b<>com. All rights reserved.
+#
+# IDDN: FR.XXX.XXXXXX.XXX.X.X.XXXX.XXX.XXXXX
+# This software is the confidential intellectual property of b<>com.
+# You shall not disclose it and shall use it only in accordance with
+# the terms of the license agreement you entered into with b<>com.
+#
+################################################################################
+
+## remove Qt dependencies
+QT -= core gui
+CONFIG -= qt
+
+QMAKE_PROJECT_DEPTH = 0
+
+## global defintions : target lib name, version
+INSTALLSUBDIR = SolARBuild
+TARGET = SolARModuleWorldStorage
+FRAMEWORK = $$TARGET
+VERSION=1.3.0
+
+DEFINES += MYVERSION=$${VERSION}
+DEFINES += TEMPLATE_LIBRARY
+CONFIG += c++1z
+
+include(findremakenrules.pri)
+
+CONFIG(debug,debug|release) {
+ DEFINES += _DEBUG=1
+ DEFINES += DEBUG=1
+}
+
+CONFIG(release,debug|release) {
+ DEFINES += _NDEBUG=1
+ DEFINES += NDEBUG=1
+}
+
+DEPENDENCIESCONFIG = shared install_recurse
+
+## Configuration for Visual Studio to install binaries and dependencies. Work also for QT Creator by replacing QMAKE_INSTALL
+PROJECTCONFIG = QTVS
+
+#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion
+include ($$shell_quote($$shell_path($${QMAKE_REMAKEN_RULES_ROOT}/templatelibconfig.pri)))
+
+## DEFINES FOR MSVC/INTEL C++ compilers
+msvc {
+DEFINES += "_BCOM_SHARED=__declspec(dllexport)"
+}
+
+INCLUDEPATH += interfaces/
+
+include (SolARModuleWorldStorage.pri)
+
+
+unix {
+ # Avoids adding install steps manually. To be commented to have a better control over them.
+ QMAKE_POST_LINK += "make install install_deps"
+ QMAKE_CXXFLAGS += -Wignored-qualifiers -DCURL_STATICLIB
+}
+
+linux {
+ QMAKE_LFLAGS += -ldl
+}
+
+macx {
+ DEFINES += _MACOS_TARGET_
+ QMAKE_MAC_SDK= macosx
+ QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++
+ QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++
+ QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++
+ LIBS += -lstdc++ -lc -lpthread
+}
+
+win32 {
+ DEFINES += _X86_VC12_TARGET_
+ QMAKE_CXXFLAGS += -wd4250 -wd4251 -wd4244 -wd4275 -wd5030
+ QMAKE_CXXFLAGS_DEBUG += /Od
+ QMAKE_CXXFLAGS_RELEASE += /O2
+ DEFINES += MBCS _MBCS
+ }
+
+INCLUDEPATH += $${PWD}
+
+header_files.path = $${PROJECTDEPLOYDIR}/interfaces/
+header_files.files = $$files($${PWD}/interfaces/*.h*)
+
+headerRestBed_files.path = $${PROJECTDEPLOYDIR}/interfaces/RestBedImpl
+headerRestBed_files.files = $$files($${PWD}/interfaces/RestBedImpl/*.h*)
+
+xpcf_xml_files.path = $${USERHOMEFOLDER}/.xpcf/SolAR
+xpcf_xml_files.files=$$files($${PWD}/xpcf*.xml)
+
+INSTALLS += header_files
+INSTALLS += headerRestBed_files
+INSTALLS += xpcf_xml_files
+
+DISTFILES += Makefile \
+ xpcf_SolARModuleWorldStorage_registry.xml
+
+OTHER_FILES += packagedependencies.txt \
+ packageignoreinstall.txt
+
+#NOTE : Must be placed at the end of the .pro
+include ($$shell_quote($$shell_path($${QMAKE_REMAKEN_RULES_ROOT}/remaken_install_target.pri)))) # Shell_quote & shell_path required for visual on windows
diff --git a/SolARModuleWorldGraph/bcom-SolARModuleWorldStorage.pc.in b/SolARModuleWorldGraph/bcom-SolARModuleWorldStorage.pc.in
new file mode 100644
index 0000000000000000000000000000000000000000..fb83394020ceff918888697865e718ebcb151949
--- /dev/null
+++ b/SolARModuleWorldGraph/bcom-SolARModuleWorldStorage.pc.in
@@ -0,0 +1,9 @@
+libname=@TARGET@
+prefix=/usr/local
+includedir=${prefix}/interfaces
+
+Name: @TARGET@
+Description:
+Version: @VERSION@
+Requires:
+Cflags: -I${includedir}
diff --git a/SolARModuleWorldGraph/findremakenrules.pri b/SolARModuleWorldGraph/findremakenrules.pri
new file mode 100644
index 0000000000000000000000000000000000000000..413e33a16e9703c012ffe3cf9c4afc294c3dd6e7
--- /dev/null
+++ b/SolARModuleWorldGraph/findremakenrules.pri
@@ -0,0 +1,43 @@
+# Author(s) : Loic Touraine, Stephane Leduc
+
+android {
+ # unix path
+ USERHOMEFOLDER = $$clean_path($$(HOME))
+ isEmpty(USERHOMEFOLDER) {
+ # windows path
+ USERHOMEFOLDER = $$clean_path($$(USERPROFILE))
+ isEmpty(USERHOMEFOLDER) {
+ USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH))
+ }
+ }
+}
+
+unix:!android {
+ USERHOMEFOLDER = $$clean_path($$(HOME))
+}
+
+win32 {
+ USERHOMEFOLDER = $$clean_path($$(USERPROFILE))
+ isEmpty(USERHOMEFOLDER) {
+ USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH))
+ }
+}
+
+exists(builddefs/qmake) {
+ QMAKE_REMAKEN_RULES_ROOT=builddefs/qmake
+}
+else {
+ QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT))
+ !isEmpty(QMAKE_REMAKEN_RULES_ROOT) {
+ QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)/qmake)
+ }
+ else {
+ QMAKE_REMAKEN_RULES_ROOT=$${USERHOMEFOLDER}/.remaken/rules/qmake
+ }
+}
+
+!exists($${QMAKE_REMAKEN_RULES_ROOT}) {
+ error("Unable to locate remaken rules in " $${QMAKE_REMAKEN_RULES_ROOT} ". Either check your remaken installation, or provide the path to your remaken qmake root folder rules in REMAKEN_RULES_ROOT environment variable.")
+}
+
+message("Remaken qmake build rules used : " $$QMAKE_REMAKEN_RULES_ROOT)
\ No newline at end of file
diff --git a/SolARModuleWorldGraph/interfaces/ETSIWorldGraphClient.h b/SolARModuleWorldGraph/interfaces/ETSIWorldGraphClient.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d5fa15f62408d4ed058131dfc863a2be23c12c2
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/ETSIWorldGraphClient.h
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * SolAR ARCloud
+ * (C) Copyright 2021-2022 b<>com. All rights reserved.
+ *
+ * IDDN: FR.XXX.XXXXXX.XXX.X.X.XXXX.XXX.XXXXX
+ * This software is the confidential intellectual property of b<>com.
+ * You shall not disclose it and shall use it only in accordance with
+ * the terms of the license agreement you entered into with b<>com.
+ *
+ ********************************************************************************/
+
+#ifndef ETSIWORLDGRAPHCLIENT_H
+#define ETSIWORLDGRAPHCLIENT_H
+
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+extern "C"{
+ #include
+}
+
+#include
+
+
+namespace SolAR {
+namespace MODULES {
+namespace SolARModuleWorldStorage {
+
+/**
+ * @class ETSIWorldGraphClient
+ * @brief Implements a client to connect to a server managing a world graph. The client is based on cppRestSDK
+ * UUID: 89f083a4-75c8-4c44-928f-ae183d8e877b
+ *
+ */
+
+class SOLARWORLDSTORAGE_EXPORT_API ETSIWorldGraphClient : public org::bcom::xpcf::ConfigurableBase,
+ public SolAR::api::storage::IWorldGraphManager
+{
+ public:
+
+ ETSIWorldGraphClient();
+
+ ~ETSIWorldGraphClient() override;
+
+ void unloadComponent () override final;
+
+ org::bcom::xpcf::XPCFErrorCode onConfigured() override final;
+
+ /////////////////////////////////
+ /// GRAPH INFORMATION METHODS ///
+ /////////////////////////////////
+
+ virtual FrameworkReturnCode getRelocalizationInformation(const std::vector> &uuids, const std::string &token,const std::vector &capabilities,std::vector &relocalizationInformation ) override;
+
+ ////////////////////////////
+ /// WORLDELEMENT METHODS ///
+ ////////////////////////////
+
+ virtual FrameworkReturnCode getWorldElement(const org::bcom::xpcf::uuids::uuid& worldElementId, SRef& worldElement) override;
+
+ virtual FrameworkReturnCode getWorldElements(std::vector> &vector) override;
+
+ virtual FrameworkReturnCode getWorldElementByKeyValue(const std::string &key, const std::string &value, std::vector> &vector) override;
+
+ virtual FrameworkReturnCode getWorldElementByKey(const std::string &key, std::vector> &vector) override;
+
+ /////////////////////////
+ /// TRACKABLE METHODS ///
+ /////////////////////////
+
+ virtual FrameworkReturnCode addTrackable(org::bcom::xpcf::uuids::uuid& id, SRef trackable) override;
+
+ virtual FrameworkReturnCode getTrackable(const org::bcom::xpcf::uuids::uuid &trackableId, SRef &trackable) override;
+
+ virtual FrameworkReturnCode removeTrackable(const org::bcom::xpcf::uuids::uuid &trackableId) override;
+
+ virtual FrameworkReturnCode getTrackables(std::vector> &vector) override;
+
+ virtual FrameworkReturnCode modifyTrackable(org::bcom::xpcf::uuids::uuid& id, SRef trackable) override;
+
+ ///////////////////////////
+ /// WORLDANCHOR METHODS ///
+ ///////////////////////////
+
+ virtual FrameworkReturnCode addWorldAnchor(org::bcom::xpcf::uuids::uuid& id, SRef worldAnchor) override;
+
+ virtual FrameworkReturnCode getWorldAnchor(const org::bcom::xpcf::uuids::uuid &worldAnchorId, SRef& worldAnchor) override;
+
+ virtual FrameworkReturnCode removeWorldAnchor(const org::bcom::xpcf::uuids::uuid &worldAnchorId) override;
+
+ virtual FrameworkReturnCode getWorldAnchors(std::vector>& vector) override;
+
+ virtual FrameworkReturnCode modifyWorldAnchor(org::bcom::xpcf::uuids::uuid& id, SRef worldAnchor) override;
+
+ /////////////////////////
+ /// WORLDLINK METHODS ///
+ /////////////////////////
+
+ virtual FrameworkReturnCode addWorldLink(org::bcom::xpcf::uuids::uuid& id, SRef worldLink) override;
+
+ virtual FrameworkReturnCode getWorldLink(const org::bcom::xpcf::uuids::uuid &parentId, const org::bcom::xpcf::uuids::uuid &childId, SRef &worldLink) override;
+
+ virtual FrameworkReturnCode getWorldLink(const org::bcom::xpcf::uuids::uuid &linkId, SRef &worldLink) override;
+
+ virtual FrameworkReturnCode removeWorldLink(const org::bcom::xpcf::uuids::uuid &parentId, const org::bcom::xpcf::uuids::uuid &childId) override;
+
+ virtual FrameworkReturnCode removeWorldLink(const org::bcom::xpcf::uuids::uuid &linkId) override;
+
+ virtual FrameworkReturnCode getWorldLinks(std::vector> &vector) override;
+
+ virtual FrameworkReturnCode modifyWorldLink(org::bcom::xpcf::uuids::uuid& id, SRef worldLink) override;
+
+ /////////////////////////////////////////
+ /// WORLD GRAPH SAVE AND LOAD METHODS ///
+ /////////////////////////////////////////
+
+ /// @brief load a world graph
+ /// @param[in] path: Path of the file where from which to load the World Graph
+ /// @return a FrameworkReturnCode succesfull if the world graph has been loaded
+ virtual FrameworkReturnCode load(std::string path) override;
+
+ /// @brief save the world graph
+ /// @param[in] path: Path of the file where to save the World Graph
+ /// @return a FrameworkReturnCode succesfull if the world graph has been saved
+ virtual FrameworkReturnCode save(std::string path) override;
+
+ private:
+
+ apiClient_t* m_apiClient = NULL;
+ std::string m_url = "http://127.0.0.1:8080";
+
+};
+
+} // namespace SolARModuleWorldStorage
+} // namespace MODULES
+} // namespace SolAR
+
+
+template <> struct org::bcom::xpcf::ComponentTraits
+{
+ static constexpr const char * UUID = "89f083a4-75c8-4c44-928f-ae183d8e877b";
+ static constexpr const char * NAME = "ETSIWorldGraphClient";
+ static constexpr const char * DESCRIPTION = "ETSIWorldGraphClient implements SolAR::api::storage::IWorldGraphManager interface";
+};
+
+#endif // ETSIWORLDGRAPHCLIENT_H
diff --git a/SolARModuleWorldGraph/interfaces/ETSIWorldGraphManager.h b/SolARModuleWorldGraph/interfaces/ETSIWorldGraphManager.h
new file mode 100644
index 0000000000000000000000000000000000000000..62972a4a15d60193424dbea381e10f6d8b3f1513
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/ETSIWorldGraphManager.h
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * SolAR ARCloud
+ * (C) Copyright 2021-2022 b<>com. All rights reserved.
+ *
+ * IDDN: FR.XXX.XXXXXX.XXX.X.X.XXXX.XXX.XXXXX
+ * This software is the confidential intellectual property of b<>com.
+ * You shall not disclose it and shall use it only in accordance with
+ * the terms of the license agreement you entered into with b<>com.
+ *
+ ********************************************************************************/
+
+#ifndef ETSIWORLDGRAPHMANAGER_H
+#define ETSIWORLDGRAPHMANAGER_H
+
+
+#include
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+
+namespace SolAR {
+namespace MODULES {
+namespace SolARModuleWorldStorage {
+
+
+
+/**
+ * @class ETSIWorldGraphManager
+ * @brief manages a world graph represented by trackables and world anchors.
+ * UUID: 58826213-806b-4569-9996-f18552acc2d7
+ *
+ */
+
+class SOLARWORLDSTORAGE_EXPORT_API ETSIWorldGraphManager : public org::bcom::xpcf::ConfigurableBase,
+ public SolAR::api::storage::IWorldGraphManager
+{
+ public:
+
+ ETSIWorldGraphManager();
+
+ ~ETSIWorldGraphManager() = default;
+
+ org::bcom::xpcf::XPCFErrorCode onConfigured() override final;
+
+ void unloadComponent() override final;
+
+ /////////////////////////////////
+ /// GRAPH INFORMATION METHODS ///
+ /////////////////////////////////
+
+ virtual FrameworkReturnCode getRelocalizationInformation(const std::vector> &uuids, const std::string &token,const std::vector &capabilities,std::vector &relocalizationInformation ) override;
+
+ ////////////////////////////
+ /// WORLDELEMENT METHODS ///
+ ////////////////////////////
+
+ virtual FrameworkReturnCode getWorldElement(const org::bcom::xpcf::uuids::uuid& worldElementId, SRef& worldElement) override;
+
+ virtual FrameworkReturnCode getWorldElements(std::vector> &vector) override;
+
+ virtual FrameworkReturnCode getWorldElementByKeyValue(const std::string &key, const std::string &value, std::vector> &vector) override;
+
+ virtual FrameworkReturnCode getWorldElementByKey(const std::string &key, std::vector> &vector) override;
+
+ /////////////////////////
+ /// TRACKABLE METHODS ///
+ /////////////////////////
+
+ virtual FrameworkReturnCode addTrackable(org::bcom::xpcf::uuids::uuid& id, SRef trackable) override;
+
+ virtual FrameworkReturnCode getTrackable(const org::bcom::xpcf::uuids::uuid &trackableId, SRef &trackable) override;
+
+ virtual FrameworkReturnCode removeTrackable(const org::bcom::xpcf::uuids::uuid &trackableId) override;
+
+ virtual FrameworkReturnCode getTrackables(std::vector> &vector) override;
+
+ virtual FrameworkReturnCode modifyTrackable(org::bcom::xpcf::uuids::uuid& id, SRef trackable) override;
+
+ ///////////////////////////
+ /// WORLDANCHOR METHODS ///
+ ///////////////////////////
+
+ virtual FrameworkReturnCode addWorldAnchor(org::bcom::xpcf::uuids::uuid& id, SRef worldAnchor) override;
+
+ virtual FrameworkReturnCode getWorldAnchor(const org::bcom::xpcf::uuids::uuid &worldAnchorId, SRef& worldAnchor) override;
+
+ virtual FrameworkReturnCode removeWorldAnchor(const org::bcom::xpcf::uuids::uuid &worldAnchorId) override;
+
+ virtual FrameworkReturnCode getWorldAnchors(std::vector>& vector) override;
+
+ virtual FrameworkReturnCode modifyWorldAnchor(org::bcom::xpcf::uuids::uuid& id, SRef worldAnchor) override;
+
+ /////////////////////////
+ /// WORLDLINK METHODS ///
+ /////////////////////////
+
+ virtual FrameworkReturnCode addWorldLink(org::bcom::xpcf::uuids::uuid& id, SRef worldLink) override;
+
+ virtual FrameworkReturnCode getWorldLink(const org::bcom::xpcf::uuids::uuid &parentId, const org::bcom::xpcf::uuids::uuid &childId, SRef &worldLink) override;
+
+ virtual FrameworkReturnCode getWorldLink(const org::bcom::xpcf::uuids::uuid &linkId, SRef &worldLink) override;
+
+ virtual FrameworkReturnCode removeWorldLink(const org::bcom::xpcf::uuids::uuid &parentId, const org::bcom::xpcf::uuids::uuid &childId) override;
+
+ virtual FrameworkReturnCode removeWorldLink(const org::bcom::xpcf::uuids::uuid &linkId) override;
+
+ virtual FrameworkReturnCode getWorldLinks(std::vector> &vector) override;
+
+ virtual FrameworkReturnCode modifyWorldLink(org::bcom::xpcf::uuids::uuid& id, SRef worldLink) override;
+
+ /////////////////////////////////////////
+ /// WORLD GRAPH SAVE AND LOAD METHODS ///
+ /////////////////////////////////////////
+
+ /// @brief load a world graph
+ /// @param[in] path: Path of the file where from which to load the World Graph
+ /// @return a FrameworkReturnCode succesfull if the world graph has been loaded
+ virtual FrameworkReturnCode load(std::string path) override;
+
+ /// @brief save the world graph
+ /// @param[in] path: Path of the file where to save the World Graph
+ /// @return a FrameworkReturnCode succesfull if the world graph has been saved
+ virtual FrameworkReturnCode save(std::string path) override;
+
+ private:
+
+ virtual void getAllTrackableChild(const org::bcom::xpcf::uuids::uuid root,std::vector& obj,const org::bcom::xpcf::uuids::uuid OriginalRootUUID,const std::vector capabilities,bool isDeviceToWorldAnchor);
+
+ virtual std::vector> getChildren(const org::bcom::xpcf::uuids::uuid root);
+
+ virtual SRef getParent(const org::bcom::xpcf::uuids::uuid root);
+
+ virtual datastructure::Transform3Df getTransformToRoot(const SRef firstLink,const org::bcom::xpcf::uuids::uuid root,datastructure::Transform3Df& res,bool isDeviceToWorldAnchor);
+
+ virtual bool isSupported(const std::vector capabilities,const datastructure::StorageTrackable track);
+
+ boost::adjacency_list,SRef> graph;
+
+ std::multimap, SRef> m_tags;
+
+ std::string m_worldGraphPath = "";
+ int m_automaticSave = 1; // 0 automatic save disable, else enable
+};
+
+} // namespace SolARModuleWorldStorage
+} // namespace MODULES
+} // namespace SolAR
+
+
+template <> struct org::bcom::xpcf::ComponentTraits
+{
+ static constexpr const char * UUID = "58826213-806b-4569-9996-f18552acc2d7";
+ static constexpr const char * NAME = "ETSIWorldGraphManager";
+ static constexpr const char * DESCRIPTION = "ETSIWorldGraphManager implements SolAR::api::storage::IWorldGraphManager interface";
+};
+
+#endif // ETSIWORLDGRAPHMANAGER_H
diff --git a/SolARModuleWorldGraph/interfaces/ETSIWorldGraphService.h b/SolARModuleWorldGraph/interfaces/ETSIWorldGraphService.h
new file mode 100644
index 0000000000000000000000000000000000000000..097a4cd4cd6b67ae3963b0e0a53626f737eed282
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/ETSIWorldGraphService.h
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * SolAR ARCloud
+ * (C) Copyright 2021-2022 b<>com. All rights reserved.
+ *
+ * IDDN: FR.XXX.XXXXXX.XXX.X.X.XXXX.XXX.XXXXX
+ * This software is the confidential intellectual property of b<>com.
+ * You shall not disclose it and shall use it only in accordance with
+ * the terms of the license agreement you entered into with b<>com.
+ *
+ ********************************************************************************/
+
+#ifndef ETSIWorldGraphService_H
+#define ETSIWorldGraphService_H
+
+
+#include
+
+#include
+
+#include
+#include
+
+#include
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+namespace SolAR {
+namespace MODULES {
+namespace SolARModuleWorldStorage {
+
+using namespace org::openapitools::server::implem;
+
+/**
+ * @class ETSIWorldGraphService
+ * @brief Service for managing a world graph based on ETSI specification with a RestBed server.
+ * UUID: b603990c-6596-4225-a5df-c0ac68ff8d16
+ *
+ */
+
+class SOLARWORLDSTORAGE_EXPORT_API ETSIWorldGraphService : public org::bcom::xpcf::ConfigurableBase, public SolAR::api::service::IServiceWorldGraph
+{
+ public:
+
+ ETSIWorldGraphService();
+
+ ~ETSIWorldGraphService() override;
+
+ void unloadComponent () override final;
+
+ org::bcom::xpcf::XPCFErrorCode onConfigured() override;
+
+
+ /// @brief Initialization of the service
+ /// @return FrameworkReturnCode::_SUCCESS if the init succeed, else FrameworkReturnCode::_ERROR_
+ FrameworkReturnCode init() override;
+
+ /// @brief start the Service managing a world graph
+ /// @return FrameworkReturnCode::_SUCCESS if the service is started, else FrameworkReturnCode::_ERROR_
+ FrameworkReturnCode start() override;
+
+ /// @brief stop the Service managing a world graph
+ /// @return FrameworkReturnCode::_SUCCESS if the service is stopped, else FrameworkReturnCode::_ERROR_
+ FrameworkReturnCode stop() override;
+
+ private:
+
+ SRef m_worldGraphManager;
+
+ uint32_t m_serverNbThread = 2;
+ uint32_t m_maxRequestSize = 32768;
+ uint32_t m_maxResponseSize = 32768;
+ uint32_t m_port = 8080;
+
+ SRef m_solarImpl;
+ SRef m_relocImpl;
+ SRef m_trackablesImpl;
+ SRef m_worldAnchorImpl;
+ SRef m_worldLinkImpl;
+
+ std::shared_ptr m_restbedService;
+ std::shared_ptr m_restbedSettings;
+
+
+};
+
+} // namespace SolARModuleWorldStorage
+} // namespace MODULES
+} // namespace SolAR
+
+
+template <> struct org::bcom::xpcf::ComponentTraits
+{
+ static constexpr const char * UUID = "b603990c-6596-4225-a5df-c0ac68ff8d16";
+ static constexpr const char * NAME = "ETSIWorldGraphService";
+ static constexpr const char * DESCRIPTION = "ETSIWorldGraphService implements SolAR::api::storage::IWorldGraphManager interface";
+};
+
+#endif // ETSIWorldGraphService_H
diff --git a/SolARModuleWorldGraph/interfaces/RestBedImpl/DefaultSolARImpl.h b/SolARModuleWorldGraph/interfaces/RestBedImpl/DefaultSolARImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..36fa22a202e10c7b4c537d12d9677597f04f8935
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/RestBedImpl/DefaultSolARImpl.h
@@ -0,0 +1,81 @@
+/**
+ * @copyright Copyright (c) 2021-2022 B-com http://www.b-com.com/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DEFAULTSOLARIMPL_H
+#define DEFAULTSOLARIMPL_H
+
+#include
+#include
+#include
+
+#include
+#include
+
+namespace org::openapitools::server::implem
+{
+
+ using namespace org::openapitools::server::model;
+ using namespace org::openapitools::server::api;
+
+ class SolARPingResource : public DefaultApiResources::PingResource {
+ public:
+ SolARPingResource(const std::string& context = "");
+
+ std::pair handler_GET() override;
+ };
+
+ class SolARVersionResource : public DefaultApiResources::VersionResource {
+ public:
+ SolARVersionResource(const std::string& context = "");
+
+ std::pair handler_GET() override;
+ };
+
+ class SolARAdminResource : public DefaultApiResources::AdminResource {
+ public:
+ SolARAdminResource(const std::string& context = "");
+
+ std::pair handler_GET() override;
+ };
+ /**
+ * @class
+ * @brief implementation of (class generated by OpenAPI-Generator), implements all the method defined with no tags in the API specification
+ *
+ */
+
+ class DefaultSolARImpl : public org::openapitools::server::api::DefaultApi {
+
+ public:
+ explicit DefaultSolARImpl(std::shared_ptrconst& restbedService);
+ ~DefaultSolARImpl() override = default;
+
+
+
+
+ virtual void publishDefaultResources() override;
+
+ // DefaultApi interface
+ private:
+ std::shared_ptr m_SolARPingResource;
+ std::shared_ptr m_SolARVersionResource;
+ std::shared_ptr m_SolARAdminResource;
+ std::shared_ptr m_service;
+
+ };
+
+}
+
+#endif // DEFAULTSOLARIMPL_H
diff --git a/SolARModuleWorldGraph/interfaces/RestBedImpl/RelocalizationInformationSolARImpl.h b/SolARModuleWorldGraph/interfaces/RestBedImpl/RelocalizationInformationSolARImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..b402669f7d8d14e1311e99500ab7e14a77a454b7
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/RestBedImpl/RelocalizationInformationSolARImpl.h
@@ -0,0 +1,93 @@
+/**
+ * @copyright Copyright (c) 2021-2022 B-com http://www.b-com.com/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RELOCALIZATIONINFORMATIONSOLARIMPL_H
+#define RELOCALIZATIONINFORMATIONSOLARIMPL_H
+
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+
+namespace org::openapitools::server::implem
+{
+ using namespace org::openapitools::server::api;
+
+
+
+ class SolARRelocalizationInformationResource: public RelocalizationInformationApiResources::RelocalizationInformationResource
+ {
+ public:
+ SolARRelocalizationInformationResource(const std::string& context = "",const SRef worldStorage = NULL);
+
+ std::pair handler_GET(
+ std::vector & uuids, std::vector & capabilities, std::string & token) override;
+
+
+
+ private:
+ SRef m_worldStorage;
+ };
+
+
+
+/**
+ * @class RelocalizationInformationSolARImpl
+ * @brief implementation of RelocalizationInformationApi (class generated by OpenAPI-Generator), implements all the methods defined with the tag 'RelocalizationInformationApi' in the API specification
+ *
+ */
+
+class RelocalizationInformationSolARImpl : public org::openapitools::server::api::RelocalizationInformationApi {
+
+ public:
+ explicit RelocalizationInformationSolARImpl(std::shared_ptr const& restbedService, SRef worldStorage);
+ ~RelocalizationInformationSolARImpl() override = default;
+
+ virtual void publishDefaultResources() override;
+
+ /// @brief static method to convert RelocalizationInformation defined by the SolAR framework to a RelocalizationInformation defined by OpenAPI generator
+ /// @param relocObject: the RelocalizationInformation to be converted
+ /// @return the converted RelocalizationInformationObject
+ static org::openapitools::server::model::RelocalizationInformation from_storage(const SolAR::datastructure::RelocalizationInformation &relocObject);
+
+ /// @brief static method to convert RelocalizationObject (defined by the SolAR framework) to a RelocalizationObject (defined by OpenAPI generator)
+ /// @param relocObject: the RelocalizationInformation to be converted
+ /// @return the converted RelocalizationInformationObject
+ static org::openapitools::server::model::RelocObject from_storage(const SolAR::datastructure::RelocObject Obj);
+
+
+ /// @brief initialize the API handler, creates the singleton m_worldStorage if it is not already done
+ void init();
+
+ private:
+ /// @brief the instance of the world storage manager that will be used to handle the queries
+ SRef m_worldStorage;
+
+ std::shared_ptr m_spRelocalizationInformationResource;
+
+ std::shared_ptr m_service;
+
+};
+
+} // namespace org::openapitools::server::api
+
+
+#endif // RELOCALIZATIONINFORMATIONSOLARIMPL_H
diff --git a/SolARModuleWorldGraph/interfaces/RestBedImpl/TrackablesSolARImpl.h b/SolARModuleWorldGraph/interfaces/RestBedImpl/TrackablesSolARImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..49661f1922eb0b909f165bf63d5e74ec7f579ea9
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/RestBedImpl/TrackablesSolARImpl.h
@@ -0,0 +1,134 @@
+/**
+ * @copyright Copyright (c) 2021-2022 B-com http://www.b-com.com/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TRACKABLES_SOLAR_IMPL_H_
+#define TRACKABLES_SOLAR_IMPL_H_
+
+#include
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+
+
+namespace org::openapitools::server::implem
+{
+using namespace org::openapitools::server::api;
+
+class SolARTrackablesResourceUUID: public TrackablesApiResources::TrackablesTrackableUUIDResource
+{
+public:
+ SolARTrackablesResourceUUID(const std::string& context = "",const SRef worldStorage = NULL);
+
+ std::pair handler_GET(std::string & trackableUUID, std::string & token) override;
+
+ std::pair handler_DELETE(std::string & trackableUUID, std::string & token) override;
+
+private:
+ SRef m_worldStorage;
+};
+
+class SolARTrackablesResource: public TrackablesApiResources::TrackablesResource
+{
+public:
+ SolARTrackablesResource(const std::string& context = "",const SRef worldStorage = NULL);
+
+ std::pair handler_GET(std::string & token) override;
+
+ std::pair handler_PUT(Trackable & trackable,std::string & token) override;
+
+ std::pairhandler_POST(Trackable & trackable,std::string & token) override;
+
+
+
+
+private:
+ SRef m_worldStorage;
+};
+/**
+ * @class TrackablesSolARImpl
+ * @brief implementation of TrackableAPI (class generated by OpenAPI-Generator), implements all the methods defined with the tag 'trackable' in the API specification
+ *
+ */
+
+class TrackablesSolARImpl : public org::openapitools::server::api::TrackablesApi {
+
+public:
+ explicit TrackablesSolARImpl(std::shared_ptr const& restbedService, SRef worldStorage);
+ ~TrackablesSolARImpl() override = default;
+
+ virtual void publishDefaultResources() override;
+ /// @brief static method to convert StorageTrackable (defined by the SolAR framework) to a Trackable (defined by OpenAPI generator)
+ /// @param trackable: the StorageTrackable to be converted
+ /// @return the converted trackable
+ static org::openapitools::server::model::Trackable from_storage(const SolAR::datastructure::StorageTrackable &trackable);
+
+
+ /// @brief static method to transform a string into a vector of bytes. Used to transform a Trackable into a StorageTrackable (attribute payload)
+ /// @return a vector of byte
+ static std::vector to_bytes(const std::string &s);
+
+ // /// @brief API method to add a trackable to the world storage. It converts the Trackable into a StorageTrackable and stores it in the worldGraph manager
+ // /// @param trackable: trackable to be added
+ // /// @param response: the response to be sent: if it succeeds, the UUID of the newly created StorageTrackable
+ // void add_trackable(const org::openapitools::server::model::Trackable &trackable, const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+ // /// @brief API method to delete a trackable, it fetches the StorageTrackable in the world storage Manager and removes it
+ // /// @param trackableUUID: the ID of the StorageTrackable to be removed
+ // /// @param response: the response to be sent: if it succeeds, a confirmation of the deletion of the StorageTrackable
+ // void delete_trackable(const std::string &trackableUUID,const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+ // /// @brief API method to get a single StorageTrackable from the world storage
+ // /// @param trackableUUID: the ID of the trackable to be fetched
+ // /// @param response: the response to be sent: if it succeeds, a JSON containing all the informations from the StorageTrackable
+ // void get_trackable_by_id(const std::string &trackableUUID, const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+ // /// @brief API method to get all the trackables currently stored in the world storage
+ // /// @param response: the response to be sent: if it succeeds, a JSON containing all the informations from all the StorageTrackables
+ // void get_trackables(const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+ // /// @brief API method to modify an existing trackable in the world storage.
+ // /// @param trackable: trackable to be modified
+ // /// @param response: the response to be sent: if it succeeds, the UUID of the modified StorageTrackable
+ // void modify_trackable(const org::openapitools::server::model::Trackable &trackable, const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+
+ /// @brief initialize the API handler, creates the singleton m_worldStorage if it is not already done
+ void init();
+
+private:
+ /// @brief the instance of the world storage manager that will be used to handle the queries
+ SRef m_worldStorage;
+
+ std::shared_ptr m_spTrackablesResource;
+ //std::shared_ptr m_TrackablesResource;
+
+ std::shared_ptr m_spTrackablesResourceUUID;
+
+ std::shared_ptr m_restbedService;
+
+
+};
+
+} // namespace org::openapitools::server::api
+
+
+
+#endif
diff --git a/SolARModuleWorldGraph/interfaces/RestBedImpl/UnitSysConversion.h b/SolARModuleWorldGraph/interfaces/RestBedImpl/UnitSysConversion.h
new file mode 100644
index 0000000000000000000000000000000000000000..75c19ebb2b2898a37eb0bb740d4cf23d3ddb780c
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/RestBedImpl/UnitSysConversion.h
@@ -0,0 +1,148 @@
+/**
+ * @copyright Copyright (c) 2021-2022 B-com http://www.b-com.com/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UNITSYSCONVERSION_H
+#define UNITSYSCONVERSION_H
+
+#include
+
+#include
+
+#include
+#include
+
+namespace xpcf = org::bcom::xpcf;
+namespace org::openapitools::server::implem
+{
+
+ /// @brief method to swap between UnitSystem enums (SolAR & OPenAPI)
+ /// @param the UnitSystem in openAPI format
+ /// @return the UnitSystem in SolAR format
+ static SolAR::datastructure::UnitSystem resolve_unitSystem(org::openapitools::server::model::UnitSystem input){
+ SolAR::datastructure::UnitSystem ret;
+ std::string enumValue = input.getEnumValue();
+
+ if (enumValue == "MM") {
+ ret = SolAR::datastructure::UnitSystem::MM;
+ }
+ else if (enumValue == "CM") {
+ ret = SolAR::datastructure::UnitSystem::CM;
+ }
+ else if (enumValue == "DM") {
+ ret = SolAR::datastructure::UnitSystem::DM;
+ }
+ else if (enumValue == "M") {
+ ret = SolAR::datastructure::UnitSystem::M;
+ }
+ else if (enumValue == "DAM") {
+ ret = SolAR::datastructure::UnitSystem::DAM;
+ }
+ else if (enumValue == "HM") {
+ ret = SolAR::datastructure::UnitSystem::HM;
+ }
+ else if (enumValue == "KM") {
+ return SolAR::datastructure::UnitSystem::KM;
+ }
+ else if (enumValue == "INCH") {
+ ret = SolAR::datastructure::UnitSystem::INCH;
+ }
+ else if (enumValue == "FOOT") {
+ ret = SolAR::datastructure::UnitSystem::FOOT;
+ }
+ else if (enumValue == "YARD") {
+ ret = SolAR::datastructure::UnitSystem::YARD;
+ }
+ else if (enumValue == "MILE") {
+ ret = SolAR::datastructure::UnitSystem::MILE;
+ }
+ else {
+ ret = SolAR::datastructure::UnitSystem::INVALID;
+ }
+ return ret;
+ }
+
+ /// @brief method to swap between UnitSystem enums (OPenAPI & SolAR)
+ /// @param the UnitSystem in SolAR format
+ /// @return the UnitSystem in openAPI format
+ static org::openapitools::server::model::UnitSystem resolve_unitSystem(SolAR::datastructure::UnitSystem input){
+
+ org::openapitools::server::model::UnitSystem ret;
+ switch(input){
+ case SolAR::datastructure::UnitSystem::MM:
+ {
+ ret.setEnumValue("MM");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::CM:
+ {
+ ret.setEnumValue("CM");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::DM:
+ {
+ ret.setEnumValue("DM");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::M:
+ {
+ ret.setEnumValue("M");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::DAM:
+ {
+ ret.setEnumValue("DAM");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::HM:
+ {
+ ret.setEnumValue("HM");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::KM:
+ {
+ ret.setEnumValue("KM");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::INCH:
+ {
+ ret.setEnumValue("INCH");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::FOOT:
+ {
+ ret.setEnumValue("FOOT");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::YARD:
+ {
+ ret.setEnumValue("YARD");
+ break;
+ }
+ case SolAR::datastructure::UnitSystem::MILE:
+ {
+ ret.setEnumValue("MILE");
+ break;
+ }
+ default:
+ {
+ ret.setEnumValue("INVALID_VALUE_OPENAPI_GENERATED");
+ }
+ }
+ return ret;
+ }
+
+}
+#endif // UNITSYSCONVERSION_H
diff --git a/SolARModuleWorldGraph/interfaces/RestBedImpl/WorldAnchorsSolARImpl.h b/SolARModuleWorldGraph/interfaces/RestBedImpl/WorldAnchorsSolARImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..4082349b6cf051f34005f8449046bc29d8d83888
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/RestBedImpl/WorldAnchorsSolARImpl.h
@@ -0,0 +1,123 @@
+/**
+ * @copyright Copyright (c) 2021-2022 B-com http://www.b-com.com/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WORLDANCHORSSOLARIMPL_H
+#define WORLDANCHORSSOLARIMPL_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace org::openapitools::server::implem
+{
+
+using namespace org::openapitools::server::api;
+
+ class SolARWorldAnchorsResource: public WorldAnchorsApiResources::WorldAnchorsResource
+ {
+ public:
+ SolARWorldAnchorsResource(const std::string& context = "",const SRef worldStorage = NULL);
+
+ std::pair handler_GET(std::string & token) override;
+
+ std::pair handler_PUT(WorldAnchor & worldAnchor,std::string & token) override;
+
+ std::pair handler_POST(WorldAnchor & worldAnchor,std::string & token) override;
+
+
+
+ private:
+ SRef m_worldStorage;
+ };
+
+
+ class SolARWorldAnchorsResourceUUID: public WorldAnchorsApiResources::WorldAnchorsWorldAnchorUUIDResource
+ {
+ public:
+ SolARWorldAnchorsResourceUUID(const std::string& context = "",const SRef worldStorage = NULL);
+
+ std::pair handler_GET(std::string & worldAnchorUUID, std::string & token) override;
+
+ std::pair handler_DELETE(std::string & worldAnchorUUID, std::string & token) override;
+
+ private:
+ SRef m_worldStorage;
+ };
+
+/**
+ * @class WorldAnchorsSolARImpl
+ * @brief implementation of WorldAnchorsAPI (class generated by OpenAPI-Generator), implements all the method defined with the tag 'world anchors' in the API specification
+ *
+ */
+
+class WorldAnchorsSolARImpl : public org::openapitools::server::api::WorldAnchorsApi {
+ public:
+ explicit WorldAnchorsSolARImpl(std::shared_ptr const& restbedService, SRef worldStorage);
+ ~WorldAnchorsSolARImpl() override = default;
+
+ virtual void publishDefaultResources() override;
+// /// @brief API method to add a world anchor to the world storage. It converts the World anchor into a StorageWorldAnchor and stores it in the worldGraph manager
+// /// @param worldAnchor: worldAnchor to be added
+// /// @param response: the response to be sent: if it succeeds, the UUID of the newly created StorageWorldAnchor
+// void add_world_anchor(const org::openapitools::server::model::WorldAnchor &worldAnchor, const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+// /// @brief API method to delete a world anchor, it fetches the StorageWorldAnchor in the world storage Manager and removes it
+// /// @param worldAnchorUUID: the ID of the StorageWorldAnchor to be removed
+// /// @param response: the response to be sent: if it succeeds, a confirmation of the deletion of the StorageWorldAnchor
+// void delete_world_anchor(const std::string &worldAnchorUUID, const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+// /// @brief API method to get a single StorageWorldAnchor from the world storage
+// /// @param worldAnchorUUID: the ID of the world anchor to be fetched
+// /// @param response: the response to be sent: if it succeeds, a JSON containing all the informations from the StorageWorldAnchor
+// void get_world_anchor_by_id(const std::string &worldAnchorUUID, const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+// /// @brief API method to get all the world anchors currently stored in the world storage
+// /// @param response: the response to be sent: if it succeeds, a JSON containing all the informations from all the StorageWorldAnchor
+// void get_world_anchors(const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+// /// @brief API method to modify an existing world anchor in the world storage.
+// /// @param worldAnchor: worldAnchor to be modified
+// /// @param response: the response to be sent: if it succeeds, the UUID of the modified worldAnchor
+// void modify_world_anchor(const org::openapitools::server::model::WorldAnchor &worldAnchor, const std::optional &token, Pistache::Http::ResponseWriter &response) override;
+
+ /// @brief static method to convert StorageWorldAnchor (defined by the SolAR framework) to a world anchors (defined by OpenAPI generator)
+ /// @param worldAnchor: the StorageWorldAnchor to be converted
+ /// @return the converted world anchor
+ static org::openapitools::server::model::WorldAnchor from_storage(const SolAR::datastructure::StorageWorldAnchor &worldAnchor);
+
+ /// @brief initialize the API handler, creates the singleton m_worldStorage if it is not already done
+ void init();
+
+ private:
+ /// @brief the instance of the world storage manager that will be used to handle the queries
+ SRef m_worldStorage;
+
+ std::shared_ptr m_spWorldAnchorsResource;
+
+ std::shared_ptr m_spWorldAnchorsResourceUUID;
+
+ std::shared_ptr m_restbedService;
+
+
+};
+
+} // namespace org::openapitools::server::api
+
+
+#endif // WORLDANCHORSSOLARIMPL_H
diff --git a/SolARModuleWorldGraph/interfaces/RestBedImpl/WorldLinksSolARImpl.h b/SolARModuleWorldGraph/interfaces/RestBedImpl/WorldLinksSolARImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..00c04375ed67e8dffafffea65d01d821c849b510
--- /dev/null
+++ b/SolARModuleWorldGraph/interfaces/RestBedImpl/WorldLinksSolARImpl.h
@@ -0,0 +1,127 @@
+#ifndef WORLDLINKSSOLARIMPL_H
+/**
+ * @copyright Copyright (c) 2021-2022 B-com http://www.b-com.com/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define WORLDLINKSSOLARIMPL_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace org::openapitools::server::implem
+{
+
+using namespace org::openapitools::server::api;
+
+
+ class SolARWorldLinksResource: public WorldLinksApiResources::WorldLinksResource
+ {
+ public:
+ SolARWorldLinksResource(const std::string& context = "",const SRef worldStorage = NULL);
+
+ std::pair handler_GET(std::string & token) override;
+
+ std::pair handler_PUT(WorldLink & worldLink,std::string & token) override;
+
+ std::pairhandler_POST(WorldLink & worldLink,std::string & token) override;
+
+ private:
+ SRef m_worldStorage;
+ };
+
+ class SolARWorldLinksResourceUUID: public WorldLinksApiResources::WorldLinksWorldLinkUUIDResource
+ {
+ public:
+ SolARWorldLinksResourceUUID(const std::string& context = "",const SRef worldStorage = NULL);
+
+ std::pair handler_GET(std::string & worldLinkUUID, std::string & token) override;
+
+ std::pair handler_DELETE(std::string & worldLinkUUID, std::string & token) override;
+
+ private:
+ SRef m_worldStorage;
+ };
+
+
+/**
+ * @class WorldLinksSolARImpl
+ * @brief implementation of WorldLinksAPI (class generated by OpenAPI-Generator), implements all the method defined with the tag 'world links' in the API specification
+ *
+ */
+
+class WorldLinksSolARImpl : public org::openapitools::server::api::WorldLinksApi {
+ public:
+ explicit WorldLinksSolARImpl(std::shared_ptr