From 6261995bea18756dca5d41e61a047ed722f1ca7a Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 30 May 2017 16:26:21 +0530 Subject: [PATCH] Adding GPL Siddhi Geo Exension --- .../pom.xml | 57 ++++ .../src/assembly/src.xml | 36 ++ .../pom.xml | 81 +++++ .../pom.xml | 139 ++++++++ .../pom.xml | 105 ++++++ .../scripts/gpl-siddhi-geo-extention/pom.xml | 323 ++++++++++++++++++ .../scripts/siddhi-geo-extention-deployer.xml | 190 +++++++++++ .../extensions/siddhi-extensions/pom.xml | 1 + .../pom.xml | 119 +++++++ .../src/main/resources/build.properties | 1 + .../src/main/resources/p2.inf | 7 + features/extensions-feature/pom.xml | 1 + 12 files changed, 1060 insertions(+) create mode 100644 components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml create mode 100644 components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/assembly/src.xml create mode 100644 components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.gpl.siddhi.extension.geo.feature/pom.xml create mode 100644 components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.gpl.siddhi.extension.geo.plugin/pom.xml create mode 100644 components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.orbit.org.geotools.gt-geojson/pom.xml create mode 100644 components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/pom.xml create mode 100644 components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/siddhi-geo-extention-deployer.xml create mode 100644 features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml create mode 100644 features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/src/main/resources/build.properties create mode 100644 features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/src/main/resources/p2.inf diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml new file mode 100644 index 0000000000..583ee824a9 --- /dev/null +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/pom.xml @@ -0,0 +1,57 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + siddhi-extensions + 3.0.37-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.gpl.siddhi.extension.geo.script + pom + GPL Siddhi Extension - Geo Script + http://wso2.org + + + + + maven-assembly-plugin + 2.5.5 + + ${project.artifactId}-${carbon.devicemgt.plugins.version} + false + + src/assembly/src.xml + + + + + create-archive + package + + single + + + + + + + \ No newline at end of file diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/assembly/src.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/assembly/src.xml new file mode 100644 index 0000000000..c6ab9a0bbf --- /dev/null +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/assembly/src.xml @@ -0,0 +1,36 @@ + + + + src + + zip + + false + ${basedir}/src + + + ${basedir}/src/main/resources/scripts + / + true + + + \ No newline at end of file diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.gpl.siddhi.extension.geo.feature/pom.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.gpl.siddhi.extension.geo.feature/pom.xml new file mode 100644 index 0000000000..286f800a05 --- /dev/null +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.gpl.siddhi.extension.geo.feature/pom.xml @@ -0,0 +1,81 @@ + + + + + + org.wso2.gpl.siddhi.extensions + siddhi-extension-gpl-geo-parent + 3.1.0-SNAPSHOT + ../pom.xml + + 4.0.0 + org.wso2.gpl.siddhi.extension.geo.feature + + pom + WSO2 GPL Carbon - Siddhi Geo Extension Feature + http://wso2.org + + + + org.wso2.gpl.siddhi.extensions + org.wso2.gpl.siddhi.extension.geo.plugin + ${siddhi-extension-gpl-geo.version} + + + org.wso2.orbit.org.geotools + gt-geojson + + + + + + + org.wso2.maven + carbon-p2-plugin + 1.5.4 + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.gpl.siddhi.extension.geo + ../etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.gpl.siddhi.extensions:org.wso2.gpl.siddhi.extension.geo.plugin + + org.wso2.orbit.org.geotools:gt-geojson + + + + + + + + + \ No newline at end of file diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.gpl.siddhi.extension.geo.plugin/pom.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.gpl.siddhi.extension.geo.plugin/pom.xml new file mode 100644 index 0000000000..09ff37aa01 --- /dev/null +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.gpl.siddhi.extension.geo.plugin/pom.xml @@ -0,0 +1,139 @@ + + + + + + org.wso2.gpl.siddhi.extensions + siddhi-extension-gpl-geo-parent + 3.1.0-SNAPSHOT + ../pom.xml + + 4.0.0 + bundle + http://wso2.org + + org.wso2.gpl.siddhi.extension.geo.plugin + Siddhi Extension - Geo Component + + + FunctionExecutors + 1. GeoWithinFunctionExecutor + Input : (longitude double, latitude double, geoJSONGeometryFence string) + OR (geoJSONGeometry string, geoJSONGeometryFence string) + Output : true if (longitude, latitude) or geoJSONGeometry is within the geoJSONGeometryFence + + 2. GeoIntersectsFunctionExecutor + Input : (longitude double, latitude double, geoJSONGeometryFence string) + OR (geoJSONGeometry string, geoJSONGeometryFence string) + Output : true if (longitude, latitude) or geoJSONGeometry intersects the geoJSONGeometryFence + + 3. GeoWithinDistanceFunctionExecutor + Input : (longitude double, latitude double, geoJSONGeometryFence string, distance double) + OR (geoJSONGeometry string, geoJSONGeometryFence string, distance double) + Output : true if (longitude, latitude) or geoJSONGeometry is within distance of the geoJSONGeometryFence + + StreamProcessors + 1. GeoCrossesStreamProcessor + Input : (id string, longitude double, latitude double, geoJSONGeometryFence string) + OR (id string, geoJSONGeometry string, geoJSONGeometryFence string) + Output : an event with `crosses` additional attribute set to true when the object ((longitude, latitude) or geoJSONGeometry) + crosses into geoJSONGeometryFence and an event with `crosses` additional attribute set to false + when the object crosses out of the geoJSONGeometryFence + + 2. GeoStationaryStreamProcessor + Input : (id string, longitude double, latitude double, geoJSONGeometryFence string, radius double) + OR (id string, geoJSONGeometry string, geoJSONGeometryFence string, radius double) + Output : when the object ((longitude, latitude) or geoJSONGeometry) starts being stationary within the radius + an event with `stationary` additional attribute set to true. When the object starts to move out of the radius + an event with `stationary` additional attribute set to false. + + 3. GeoProximityStreamProcessor + Input : (id string, longitude double, latitude double, geoJSONGeometryFence string, radius double) + OR (id string, geoJSONGeometry string, geoJSONGeometryFence string, radius double) + Output : when two objects ((longitude, latitude) or geoJSONGeometry) starts being in close proximity within the radius + an event with `inCloseProximity` additional attribute set to true. When the object starts to move out of the radius + an event with `inCloseProximity` additional. attribute set to false. On each event, additional attributes + `proximityWith` gives the id of the object that this object is in close proximity and `proximityId` is an id unique to + the pair of objects + + + + + + org.wso2.siddhi + siddhi-query-api + + + org.wso2.siddhi + siddhi-query-compiler + + + org.wso2.siddhi + siddhi-core + + + log4j + log4j + + + junit + junit + test + + + com.google.code.gson + gson + + + org.wso2.orbit.org.geotools + gt-geojson + + + + + + + org.apache.felix + maven-bundle-plugin + 2.3.7 + true + + + ${project.artifactId} + ${project.artifactId} + ${project.version} + Siddhi Extension for Geo Fencing + + org.wso2.gpl.siddhi.extensions.geo.* + + + org.wso2.gpl.siddhi.extensions.geo.internal.* + + + *;resolution:=optional + + + + + + + + diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.orbit.org.geotools.gt-geojson/pom.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.orbit.org.geotools.gt-geojson/pom.xml new file mode 100644 index 0000000000..0abe11d6d3 --- /dev/null +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/org.wso2.orbit.org.geotools.gt-geojson/pom.xml @@ -0,0 +1,105 @@ + + + + 4.0.0 + + org.wso2.orbit.org.geotools + gt-geojson + 13.6.0.wso2v1 + + gt-geojson.wso2 + bundle + + This bundle will represent Stanford NLP Library. + + http://wso2.org + + + + GNU General Public License version 3 (GPLv3) + http://www.gnu.org/licenses/gpl-3.0.txt + + + + + + org.geotools + gt-geojson + ${geotools.version} + true + + + + + 13.6 + 13.6.0.wso2v1 + UTF-8 + + + + + + org.apache.felix + maven-bundle-plugin + 2.3.7 + true + + + ${project.artifactId} + ${project.artifactId} + + com.vividsolutions.*;version="1.13", + org.jdom.*;version="1.1.3", + javax.media.*;version="1.1.3", + org.geotools.*;-split-package:=merge-last;version="${geotools.export.version}" + + + !org.geotools.*, + org.json.simple.* + + + *;resolution:=optional + + + + + + + + + + geomajas-nexus + http://apps.geomajas.org/nexus/content/groups/public/ + + true + daily + ignore + + + + + + + wso2.gpl.releases + WSO2 GPL Maven Repository + http://maven.wso2.org/nexus/content/repositories/wso2gpl/ + + + + \ No newline at end of file diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/pom.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/pom.xml new file mode 100644 index 0000000000..e592684b73 --- /dev/null +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/gpl-siddhi-geo-extention/pom.xml @@ -0,0 +1,323 @@ + + + + + + + org.wso2 + wso2 + 1 + + + 4.0.0 + + org.wso2.gpl.siddhi.extensions + siddhi-extension-gpl-geo-parent + 3.1.0-SNAPSHOT + pom + Siddhi Extension - Geo + WSO2 Siddhi Geo Extension + http://wso2.org + + + org.wso2.orbit.org.geotools.gt-geojson + org.wso2.gpl.siddhi.extension.geo.plugin + org.wso2.gpl.siddhi.extension.geo.feature + + + + + GNU General Public License version 3 (GPLv3) + http://www.gnu.org/licenses/gpl-3.0.txt + + + + + https://github.com/wso2-gpl/siddhi-extensions.git + scm:git:https://github.com/wso2-gpl/siddhi-extensions.git + scm:git:https://github.com/wso2-gpl/siddhi-extensions.git + HEAD + + + + + + log4j + log4j + ${log4j.version} + + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + + + junit + junit + ${junit.version} + test + + + org.mvel + mvel2 + ${mvel2.version} + compile + + + org.antlr + antlr-runtime + ${antlr.runtime.version} + compile + + + org.wso2.orbit.edu.stanford.nlp + stanford-nlp + ${stanford-nlp.version} + + + com.google.code.gson + gson + ${gson.version} + + + org.wso2.orbit.org.geotools + gt-geojson + ${geotools.version} + + + org.wso2.orbit.com.github.lucarosellini.rJava + r-java + ${rjava.version} + + + org.wso2.orbit.org.jpmml + pmml-model + ${jpmml.model.version} + + + org.wso2.orbit.org.jpmml + pmml-manager + ${jpmml.manager.version} + + + org.wso2.orbit.org.jpmml + pmml-schema + ${jpmml.model.version} + + + org.wso2.orbit.org.jpmml + pmml-evaluator + ${jpmml.model.version} + + + commons-logging + commons-logging + ${commons.logging.version} + + + org.wso2.orbit.joda-time + joda-time + ${joda.time.version} + + + + org.wso2.siddhi + siddhi-query-api + ${siddhi.version} + + + org.wso2.siddhi + siddhi-query-compiler + ${siddhi.version} + + + org.wso2.siddhi + siddhi-core + ${siddhi.version} + compile + + + + + + + + org.apache.maven.wagon + wagon-ssh + 2.1 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + + org.apache.maven.plugins + maven-surefire-plugin + 2.4.3 + + + org.apache.maven.plugins + maven-source-plugin + 2.1.2 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + + org.apache.felix + maven-bundle-plugin + 2.3.7 + true + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.6 + 1.6 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*TestCase.java + + brief + false + once + -ea -Xmx1g + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + + + + 3.1.0 + + 3.1.1 + 4.10 + 1.2.14 + 2.0.19 + 3.4 + 2.2.4 + 0.9.7.wso2v1 + 13.6.0.wso2v1 + 3.6.0.wso2v1 + 1.1.16.wso2v1 + 1.1.16.wso2v1 + 1.1.1 + 2.8.2.wso2v1 + UTF-8 + + + + + Architecture + architecture-request@wso2.org + architecture-request@wso2.org + architecture@wso2.org + http://wso2.markmail.org/search/?q=list%3Aorg.wso2.architecture+siddhi + + + + + + + osgeo + Open Source Geospatial Foundation Repository + http://download.osgeo.org/webdav/geotools/ + + + + true + + opengeo + OpenGeo Maven Repository + http://repo.opengeo.org + + + + + + wso2.gpl.releases + WSO2 GPL Maven Repository + http://maven.wso2.org/nexus/content/repositories/wso2gpl/ + + + wso2.gpl.snapshots + WSO2 GPL Maven Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/wso2gpl-snapshots/ + + + + diff --git a/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/siddhi-geo-extention-deployer.xml b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/siddhi-geo-extention-deployer.xml new file mode 100644 index 0000000000..89cd66b312 --- /dev/null +++ b/components/extensions/siddhi-extensions/org.wso2.gpl.siddhi.extension.geo.script/src/main/resources/scripts/siddhi-geo-extention-deployer.xml @@ -0,0 +1,190 @@ + + + + + org.wso2 + wso2 + 1 + + + + gpl-siddhi-geo-extention + + + 4.0.0 + org.wso2.iot.devicemgt-plugins + analytics-scripts + 3.1.0-SNAPSHOT + pom + Executing Analytics Scripts + http://wso2.org + + + + + org.wso2.maven + carbon-p2-plugin + 1.5.4 + + + 2-p2-repo-generation + package + + p2-repo-gen + + + file:${basedir}/p2-repo + file:${basedir}/p2-repo + true + true + + + org.wso2.gpl.siddhi.extensions:org.wso2.gpl.siddhi.extension.geo.feature:${org.wso2.gpl.siddhi.extensions.version} + + + + + + default-feature-install + package + + p2-profile-gen + + + default + file:${basedir}/p2-repo + file:${basedir}/p2-repo + ${basedir}/../repository/components + false + + + org.wso2.gpl.siddhi.extension.geo.feature.group + ${org.wso2.gpl.siddhi.extensions.version} + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.1 + + + default-feature-install + package + + + + + + + + + run + + + + + + + + + + wso2.releases + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/releases/ + + true + daily + ignore + + + + wso2.snapshots + Apache Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/snapshots/ + + true + daily + + + false + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + + + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + wso2.releases + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/releases/ + + true + daily + ignore + + + + wso2.snapshots + WSO2 Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/snapshots/ + + true + daily + + + false + + + + + 3.0.37-SNAPSHOT + 3.1.0-SNAPSHOT + + \ No newline at end of file diff --git a/components/extensions/siddhi-extensions/pom.xml b/components/extensions/siddhi-extensions/pom.xml index 6e7cf51916..39231cc769 100644 --- a/components/extensions/siddhi-extensions/pom.xml +++ b/components/extensions/siddhi-extensions/pom.xml @@ -34,6 +34,7 @@ org.wso2.extension.siddhi.execution.json + org.wso2.gpl.siddhi.extension.geo.script diff --git a/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml new file mode 100644 index 0000000000..20fd428c84 --- /dev/null +++ b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml @@ -0,0 +1,119 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + extensions-feature + 3.0.37-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.gpl.siddhi.extension.geo.script.feature + GPL Siddhi Extension - Geo Script Feature + pom + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.gpl.siddhi.extension.geo.script + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/scripts + + **/* + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.gpl.siddhi.extension.geo.script + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + + + + + + + + + \ No newline at end of file diff --git a/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/src/main/resources/build.properties b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/src/main/resources/build.properties new file mode 100644 index 0000000000..9c86577d76 --- /dev/null +++ b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/src/main/resources/p2.inf b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..d810a2aa07 --- /dev/null +++ b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/src/main/resources/p2.inf @@ -0,0 +1,7 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../scripts);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.gpl.siddhi.extension.geo.script_${feature.version}/scripts/,target:${installFolder}/../../../scripts/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../scripts/gpl-siddhi-geo-extention);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../scripts/siddhi-geo-extention-deployer.xml);\ \ No newline at end of file diff --git a/features/extensions-feature/pom.xml b/features/extensions-feature/pom.xml index 3ec8344b70..f28bbec9f6 100644 --- a/features/extensions-feature/pom.xml +++ b/features/extensions-feature/pom.xml @@ -39,6 +39,7 @@ org.wso2.carbon.device.mgt.adapter.feature org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature org.wso2.extension.siddhi.execution.json.feature + org.wso2.gpl.siddhi.extension.geo.script.feature