{"id":13691843,"url":"https://github.com/Cumulocity-IoT/apama-streaming-analytics-connectivity-RegExCodec","last_synced_at":"2025-05-02T15:33:05.496Z","repository":{"id":32769806,"uuid":"112744779","full_name":"Cumulocity-IoT/apama-streaming-analytics-connectivity-RegExCodec","owner":"Cumulocity-IoT","description":"A Java based connectivity codec for transforming messages with regular expressions","archived":false,"fork":false,"pushed_at":"2025-01-06T17:18:23.000Z","size":82,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-04T12:52:42.843Z","etag":null,"topics":["apama","connectivity","iot-analytics","regex"],"latest_commit_sha":null,"homepage":"http://www.apamacommunity.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cumulocity-IoT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-12-01T13:47:14.000Z","updated_at":"2025-01-06T17:17:56.000Z","dependencies_parsed_at":"2024-04-08T02:01:10.324Z","dependency_job_id":"70eb7185-c98a-493b-ae1b-c528ef6f1c6e","html_url":"https://github.com/Cumulocity-IoT/apama-streaming-analytics-connectivity-RegExCodec","commit_stats":null,"previous_names":["cumulocity-iot/apama-streaming-analytics-connectivity-regexcodec","softwareag/apama-streaming-analytics-connectivity-regexcodec"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fapama-streaming-analytics-connectivity-RegExCodec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fapama-streaming-analytics-connectivity-RegExCodec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fapama-streaming-analytics-connectivity-RegExCodec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fapama-streaming-analytics-connectivity-RegExCodec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cumulocity-IoT","download_url":"https://codeload.github.com/Cumulocity-IoT/apama-streaming-analytics-connectivity-RegExCodec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252063140,"owners_count":21688655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apama","connectivity","iot-analytics","regex"],"created_at":"2024-08-02T17:00:50.934Z","updated_at":"2025-05-02T15:33:05.488Z","avatar_url":"https://github.com/Cumulocity-IoT.png","language":"Java","funding_links":[],"categories":["IoT \u0026 Analytics"],"sub_categories":["![icon-Apama-64x64](https://user-images.githubusercontent.com/23717841/230378172-ec6dfd5c-6785-4785-b0f8-4a1ac670b4fa.png) Apama"],"readme":"# apama-streaming-analytics-connectivity-RegExCodec\nJava based Connectivity Codec for performing regular expression operations on messages for use with [Apama](https://www.apamacommunity.com/).\n\n## Description\nApplies a regular expression on the given event map data. For more information on the Apama Connectivity Framework, as well as Apama in general, please see [the community website](https://www.apamacommunity.com/). Furthermore, if you wish to examine this plugin in more detail, a blog describing it also exists called \"creating-your-own-regex-plug-in\".\n\n## Set-up\nFirst, ensure you have an install of the Apama engine; a free edition is available at [the community website](https://www.apamacommunity.com/). This plugin assumes the user has familiarity with the basic structure of the install, more information of which can also be found on the community site.\n\nRunning and building of the sample requires access to the Correlator and Apama command line tools.\n\nTo ensure that the environment is configured correctly for Apama, all the commands below should be executed from an Apama Command Prompt, or from a shell or command prompt where the bin\\apama_env script has been run (or sourced on Unix).\n\n## Getting the source\nThe RegEx codec has a dependency on the [File Transport plugin](https://github.com/Cumulocity-IoT/apama-streaming-analytics-connectivity-FileTransport) to build.\n\nFor the sample to find the dependency, it has to be stored in a folder called \"FileTransport\" as either a sibling or child directory (with the child directory taking priority).\n\nThe following instructions will cover how to set this up.\n\n### Using Git clone\nThe preferred way is to use git clone, as File Transport is a submodule of this repository.\n\nWhen performing a clone, use the `--recurse-submodules` flag to automatically checkout the File Transport plugin.\n\nFor example:\n\u003e git clone --recurse-submodules https://github.com/Cumulocity-IoT/apama-streaming-analytics-connectivity-RegExCodec.git\n\nIf you have already cloned, or the submodule hasn't been checked out, you may need to do an explicit update:\n\u003e git submodule update --init --recursive\n\n### Using \"Download ZIP\"\nGitHub does not automatically resolve submodules when downloading the repository as a ZIP file, so you will need to resolve it manually.\n\nDownload the ZIP for this repository, extract it, and navigate into it. Now download the ZIP for the [File Transport plugin](https://github.com/Cumulocity-IoT/apama-streaming-analytics-connectivity-FileTransport), and extract the contents of it into the empty \"FileTransport\" folder.\n\n## To build\nThe RegEx codec is most easily built with the Apache ANT tool from the directory containing 'build.xml':\n\n\u003e ant \n \nBut if you do not have access to ANT, it will need to be built manually (along with the FileTransport sample):\n\nFor Linux:\n\u003e mkdir build_output\n\u003e javac -cp $APAMA_HOME/lib/connectivity-plugins-api.jar -d build_output src/com/apama/samples/*.java\n\u003e jar -cf build_output/regex-codec.jar -C build_output .\n\u003e cp build_output/regex-codec-sample.jar $APAMA_WORK/lib/\n\nFor Windows:\n\u003e mkdir build_output\n\u003e javac -cp %APAMA_HOME%/lib/connectivity-plugins-api.jar -d build_output src/com/apama/samples/*.java\n\u003e jar -cf build_output/regex-codec.jar -C build_output .\n\u003e copy build_output\\regex-codec-sample.jar %APAMA_WORK%\\lib\\\n  \nA successful build will produce output files for the RegEx codec:\n\n\tbuild-output/regex-codec.jar\n\nThese should have already been copied to APAMA_WORK/lib where the correlator will load them from.\n\nTo run the sample, you will also need to have built the [File Transport](https://github.com/Cumulocity-IoT/apama-streaming-analytics-connectivity-FileTransport) to create a full connectivity chain.\n\n## Running the sample\nYou can either run the sample via the [Pysys](https://pysys-test.github.io/pysys-test/) framework by invoking the tests, or by passing the yaml Connectivity configuration file to the Correlator.\n\nWhen run, the sample creates a connectivity plugin chain.  The chain will have the correlator at one end and to access the 'ouside world', a plugin chain must end with a Transport.  For this sample we use the File Transport which can read in data from a file to be passed towards the host correlator, or write data out to a file that has come from the host correlator.  Between the File Transport and the correlator is the RegEx Plugin which uses regular expressions to perform replacements on payload fields.\n\nTo run via [Pysys](https://pysys-test.github.io/pysys-test/), go to the tests directory and invoke the command: \n  \n  pysys run\n\nYou can then inspect the output within the individual tests output directory\n\nShould you wish to run directly\n\n1. Use example files found in the test directory RegEx:\n\n\u003e cd RegEx/tests/system/RegexCodec_sys_001/Input\n\n2. Start the Apama Correlator specifying the connectivity config file\n\n\u003e correlator --connectivityConfig connectivity.yaml\n\n3. Inject the Connectivity plugins support monitor:\n\n\u003e (Linux) engine_inject $APAMA_HOME/monitors/ConnectivityPluginsControl.mon $APAMA_HOME/monitors/ConnectivityPlugins.mon\n\n\u003e (Windows) engine_inject %APAMA_HOME%/monitors/ConnectivityPluginsControl.mon %APAMA_HOME%/monitors/ConnectivityPlugins.mon\n\n4. Inject the Test monitor:\n\n\u003e engine_inject Test.mon\n\nThe connectivity.yaml file describes the chain of plugins that this test uses and the regular expression and replacement to be applied.\n\n### Sample Output\n\nThe EPL application is sending out events to the connectivity chain, which the correlator presents as maps to the chain. The RegEx codec sees these expressions and applies them as transforms on the payload strings.\n\nRunning the sample will produce one output file:\n\n\toutput.txt\n\nWhen compared to input.txt, you'll notice that any numerical value within that was replaced with the string '\u003cnumber\u003e'. This transformation was defined in the .yaml file. If you run the test via the pysys framework, you can see the Apama events themselves, showing the input and the output value together. \n\n## License\nCopyright (c) 2017-2022 Cumulocity GmbH, Duesseldorf, Germany and/or its affiliates and/or their licensors.\nCopyright (c) 2024 Cumulocity GmbH. The name Cumulocity GmbH and all Cumulocity GmbH product names are either trademarks or registered trademarks of Cumulocity GmbH and/or its subsidiaries and/or its affiliates and/or their licensors. Other company and product names mentioned herein may be trademarks of their respective owners. \n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\nfile except in compliance with the License. You may obtain a copy of the License at\nhttp://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed under the\nLicense is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\neither express or implied. \nSee the License for the specific language governing permissions and limitations under the License.\n\n______________________\nThese tools are provided as-is and without warranty or support. They do not constitute part of the Cumulocity GmbH product suite. Users are free to use, fork and modify them, subject to the license agreement. While Cumulocity GmbH welcomes contributions, we cannot guarantee to include every contribution in the main project.\n_____________\nContact us at [Apama community](https://apamacommunity.com) if you have any questions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCumulocity-IoT%2Fapama-streaming-analytics-connectivity-RegExCodec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCumulocity-IoT%2Fapama-streaming-analytics-connectivity-RegExCodec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCumulocity-IoT%2Fapama-streaming-analytics-connectivity-RegExCodec/lists"}