From e2ce28767ecf3b4a9ac763e5e9a3652ac575fe95 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Sun, 13 Mar 2016 21:45:29 +0530 Subject: [PATCH] added analytics scripts --- .../org_wso2_iot_devices_sensor.xml | 62 ------------------- .../org.wso2.iot.devices.sensor_1.0.0.json | 17 ----- .../EventReceiver_smartLock.xml} | 4 +- .../artifact.xml | 4 +- .../Eventstore_smartLock_1.0.0}/artifact.xml | 4 +- .../org_wso2_iot_devices_smartLock.xml | 62 +++++++++++++++++++ .../Eventstream_smartLock_1.0.0}/artifact.xml | 5 +- .../org.wso2.iot.devices.smartLock_1.0.0.json | 33 ++++++++++ .../Sparkscripts_1.0.0/artifact.xml | 2 +- .../Sparkscripts_1.0.0/smartLock_Script.xml} | 13 ++-- .../{Sensor => smartLock}/artifacts.xml | 9 ++- 11 files changed, 118 insertions(+), 97 deletions(-) delete mode 100644 modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstore_sensor_1.0.0/org_wso2_iot_devices_sensor.xml delete mode 100644 modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstream_sensor_1.0.0/org.wso2.iot.devices.sensor_1.0.0.json rename modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/{Sensor/Eventreceiver_sensor_1.0.0/EventReceiver_sensor.xml => smartLock/Eventreceiver_smartLock_1.0.0/EventReceiver_smartLock.xml} (86%) rename modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/{Sensor/Eventreceiver_sensor_1.0.0 => smartLock/Eventreceiver_smartLock_1.0.0}/artifact.xml (82%) rename modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/{Sensor/Eventstore_sensor_1.0.0 => smartLock/Eventstore_smartLock_1.0.0}/artifact.xml (81%) create mode 100644 modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstore_smartLock_1.0.0/org_wso2_iot_devices_smartLock.xml rename modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/{Sensor/Eventstream_sensor_1.0.0 => smartLock/Eventstream_smartLock_1.0.0}/artifact.xml (81%) create mode 100644 modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstream_smartLock_1.0.0/org.wso2.iot.devices.smartLock_1.0.0.json rename modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/{Sensor => smartLock}/Sparkscripts_1.0.0/artifact.xml (95%) rename modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/{Sensor/Sparkscripts_1.0.0/Sensor_Script.xml => smartLock/Sparkscripts_1.0.0/smartLock_Script.xml} (51%) rename modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/{Sensor => smartLock}/artifacts.xml (67%) diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstore_sensor_1.0.0/org_wso2_iot_devices_sensor.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstore_sensor_1.0.0/org_wso2_iot_devices_sensor.xml deleted file mode 100644 index 75f6153c..00000000 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstore_sensor_1.0.0/org_wso2_iot_devices_sensor.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - org.wso2.iot.devices.sensor:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - sensorValue - false - false - false - FLOAT - - - diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstream_sensor_1.0.0/org.wso2.iot.devices.sensor_1.0.0.json b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstream_sensor_1.0.0/org.wso2.iot.devices.sensor_1.0.0.json deleted file mode 100644 index 1ad0e99b..00000000 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstream_sensor_1.0.0/org.wso2.iot.devices.sensor_1.0.0.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "org.wso2.iot.devices.sensor", - "version": "1.0.0", - "nickName": "Flow Rate Data", - "description": "Sensor data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "sensorValue","type": "FLOAT" - } - ] -} diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventreceiver_sensor_1.0.0/EventReceiver_sensor.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventreceiver_smartLock_1.0.0/EventReceiver_smartLock.xml similarity index 86% rename from modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventreceiver_sensor_1.0.0/EventReceiver_sensor.xml rename to modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventreceiver_smartLock_1.0.0/EventReceiver_smartLock.xml index 846f3a26..1a53d098 100644 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventreceiver_sensor_1.0.0/EventReceiver_sensor.xml +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventreceiver_smartLock_1.0.0/EventReceiver_smartLock.xml @@ -17,11 +17,11 @@ ~ under the License. --> - false - + diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventreceiver_sensor_1.0.0/artifact.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventreceiver_smartLock_1.0.0/artifact.xml similarity index 82% rename from modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventreceiver_sensor_1.0.0/artifact.xml rename to modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventreceiver_smartLock_1.0.0/artifact.xml index 9a5ba578..8fb0293e 100644 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventreceiver_sensor_1.0.0/artifact.xml +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventreceiver_smartLock_1.0.0/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - - EventReceiver_sensor.xml + + EventReceiver_smartLock.xml diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstore_sensor_1.0.0/artifact.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstore_smartLock_1.0.0/artifact.xml similarity index 81% rename from modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstore_sensor_1.0.0/artifact.xml rename to modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstore_smartLock_1.0.0/artifact.xml index e6ff436f..c039213e 100644 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstore_sensor_1.0.0/artifact.xml +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstore_smartLock_1.0.0/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - - org_wso2_iot_devices_sensor.xml + + org_wso2_iot_devices_smartLock.xml diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstore_smartLock_1.0.0/org_wso2_iot_devices_smartLock.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstore_smartLock_1.0.0/org_wso2_iot_devices_smartLock.xml new file mode 100644 index 00000000..e177b155 --- /dev/null +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstore_smartLock_1.0.0/org_wso2_iot_devices_smartLock.xml @@ -0,0 +1,62 @@ + + + + + + org.wso2.iot.devices.smartLock:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + smartLock + false + false + false + FLOAT + + + \ No newline at end of file diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstream_sensor_1.0.0/artifact.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstream_smartLock_1.0.0/artifact.xml similarity index 81% rename from modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstream_sensor_1.0.0/artifact.xml rename to modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstream_smartLock_1.0.0/artifact.xml index b8afeda8..67da309f 100644 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Eventstream_sensor_1.0.0/artifact.xml +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstream_smartLock_1.0.0/artifact.xml @@ -17,6 +17,7 @@ ~ under the License. --> - - org.wso2.iot.devices.sensor_1.0.0.json + + org.wso2.iot.devices.smartLock_1.0.0.json + diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstream_smartLock_1.0.0/org.wso2.iot.devices.smartLock_1.0.0.json b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstream_smartLock_1.0.0/org.wso2.iot.devices.smartLock_1.0.0.json new file mode 100644 index 00000000..fa4e05d6 --- /dev/null +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Eventstream_smartLock_1.0.0/org.wso2.iot.devices.smartLock_1.0.0.json @@ -0,0 +1,33 @@ +{ + "name": "org.wso2.iot.devices.smartLock", + "version": "1.0.0", + "nickName": "smartLock", + "description": "smartLock data received from the Device", + "metaData": [ + { + "name": "owner", + "type": "STRING" + }, + { + "name": "deviceType", + "type": "STRING" + }, + { + "name": "deviceId", + "type": "STRING" + }, + { + "name": "time", + "type": "LONG" + } + ], + "payloadData": [ + { + "name": "smartLock", + "type": "FLOAT" + } + ] +} + + + diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Sparkscripts_1.0.0/artifact.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Sparkscripts_1.0.0/artifact.xml similarity index 95% rename from modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Sparkscripts_1.0.0/artifact.xml rename to modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Sparkscripts_1.0.0/artifact.xml index 85400ae3..f7da0d0c 100644 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Sparkscripts_1.0.0/artifact.xml +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Sparkscripts_1.0.0/artifact.xml @@ -18,5 +18,5 @@ --> - Sensor_Script.xml + smartLock_Script.xml diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Sparkscripts_1.0.0/Sensor_Script.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Sparkscripts_1.0.0/smartLock_Script.xml similarity index 51% rename from modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Sparkscripts_1.0.0/Sensor_Script.xml rename to modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Sparkscripts_1.0.0/smartLock_Script.xml index 77abc2a3..848ef9e7 100644 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/Sparkscripts_1.0.0/Sensor_Script.xml +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/Sparkscripts_1.0.0/smartLock_Script.xml @@ -18,13 +18,18 @@ --> - Sensor_Script + IoTServer_smartLock_Script 0 * * * * ? diff --git a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/artifacts.xml b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/artifacts.xml similarity index 67% rename from modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/artifacts.xml rename to modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/artifacts.xml index eab2a8d1..4385705f 100644 --- a/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/Sensor/artifacts.xml +++ b/modules/samples/doormanager/component/analytics/src/main/resources/carbonapps/smartLock/artifacts.xml @@ -18,11 +18,10 @@ --> - - - - + + + +