Skip to content
Snippets Groups Projects
Commit 70890e7d authored by Rodrigo Goncalves's avatar Rodrigo Goncalves
Browse files

Documentation on how to extend/modify the TikiWiki import process

parent 4bdb660a
No related branches found
No related tags found
5 merge requests!26Resolve "Documentation to import new Trackers",!25Resolve "CI/CD for SmartDataContext",!24Resolve "Fixes and optimizations for SmartDataContext",!23Resolve "SI Units for Ingress data from TikiWiki",!22Resolve "Unstructured SmartDataContext storage"
This commit is part of merge request !25. Comments created here will be created in the context of that merge request.
......@@ -50,8 +50,26 @@ For each domain to be imported, an entry should be created in the ./config/tikiw
* The certificate to access the SmartData API should be stored in the config directory and described in the configuration.
* The tracker properties defines the name of the trackers (as stored in the TikiWiki) to retrieve the data.
* The api property defines the base url for the API (such as https://iot.lisha.ufsc.br)
* The Trackers element contains a mapping where the mapped value (right) is the name of the Tracker in TikiWiki from which to extract the data.
### Basic information
The import process from the TikiWiki currently assumes that a domain contains three Trackers:
Vehicles, VehicleMaintenancePlan, VehicleMaintenanceReport and VehicleMaintenanceReportErrorCodes.
The first three trackers are specific for each domain. The last one can be shared between different
domains since it a list of standard error codes.
### Extending/modifying the current import process
To modify/extend the current process the class app/command/tikiwiki/ImportCommand.php must be changed.
The process method is responsible for calling the required functions and execute the import process for each domain.
Thus, to add a new Tracker or edit the process of current ones, the necessary methods in this class should be modified.
The class contains several helpers methods to facilitate the conversion process - such as unit conversions and
dynamic TikiWiki Tracker field mappings. The existing methods serve as good guideline on how to implement/extend the
existing code.
# Pipeline development
* Create a new Command (./app/command) following the syntax of existing commands (such as tikiwiki/ImportCommand.php)
* Register the new Command at ./setup.php
\ No newline at end of file
* Register the new Command at ./setup.php
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment