<commit_before># Onyx-Java

Onyx-Java is designed to allow users who write Java code to use the Onyx Platform.
<br>
The package provides the following features:
<ul>
<li>A simple Java interface for the Onyx Platform core API</li>
<li>Utilities for manipulating Clojure maps directly in Java</li>
<li>Tools to simplify use of core.async plugins</li>
<li>Affordances for inclusion of pure Java classes in a workflow</li>
</ul>
<br>

## Overview
Onyx-Java mirrors the Onyx Platform core API by providing a Java equivalent for each component of an Onyx workflow. This means the parts of Onyx such as Catalogs, Lifecycles, Jobs, Tasks, and so on, each have a new equivalent Java class.
<br><br>
These classes provide methods for adding entries to components, such as adding tasks to catalogs, edges to workflows, catalogs to jobs, etc.
<br><br>
<strong>
Please note:
<br>
Onyx-Java does not validate semantic correctness of entries - parameter and type checking enforcement is left to Onyx Platform itself, which takes place at runtime.
<br>
This means that it is up to the user to refer to the Onyx Platform information model documentation to ensure that they are passing the expected parameters of types expected by the Onyx Platform.
</strong>
<br><br>
### Utilities

Onyx-Java provides the following utilities for high-level package consumption:

#### Onyx Environment

The Onyx Platform is powerful, but using it can be complex - the platform allows for multiple configuration options, needs to make several calls during spin up and shutdown, and requires that persistent peer and environment metadata is available to core API calls, such as job execution.
<br>
Onyx-Java provides a utility class called *OnyxEnv* to simplify management of the environment and provide proxying methods to encapsulate this complexity. It provides convenience functions for setting up, controlling, and using the Onyx environment and the jobs that the environment contains.

#### Maps

The native language of the Onyx Platform is Clojure, and the ubiquitous data structure that it uses for all communication is an implementation of the IPersistentMap. While Java can manipulate these maps directly, it is often easier or preferable to use tools that mirror the natural way Onyx is used to using for argument manipulation.
<br>
Onyx-Java provides this ability in the utility class *MapFns*, which offers pure Java versions of useful Clojure map manipulation functions, such as get, getIn, assoc, dissoc, and others, making it easier to directly manipulate the arguments used by Onyx.
<br>
MapFns also provides support for loading edn files that contain map specifications, allowing the environment, peer configuration, and task specifications to be configured rather than coded. This promotes highly patterned design, allows high reuse, and guarantees efficiency.
<br><br>

#### Core Async

The Onyx Platform provides excellent support for asynchronous task execution via a core-async plugin.
<br>
Core-async jobs in Onyx are common and stereotyped, and setting them up generally includes rewriting boilerplate code.
<br><br>
Onyx-Java provides the ability to set up these common core-async jobs up automatically, via the utility classes *AsyncCatalog* and *AsyncLifecycles*. These two classes encapsulate generating the correct catalog and lifecycle entries for setting up, using, and collecting the resulting output from async channels. This utility provides a way for users to avoid writing boilerplate code in this common scenario.
<br><br>
<commit_msg>Added build status (building via circleCI)<commit_after># Onyx-Java

Onyx-Java is designed to allow users who write Java code to use the Onyx Platform.
<br>
The package provides the following features:
<ul>
<li>A simple Java interface for the Onyx Platform core API</li>
<li>Utilities for manipulating Clojure maps directly in Java</li>
<li>Tools to simplify use of core.async plugins</li>
<li>Affordances for inclusion of pure Java classes in a workflow</li>
</ul>
<br>

## Build Status

 [![CircleCI](https://circleci.com/gh/RBerkheimer/onyx-java.svg?style=svg)](https://circleci.com/gh/RBerkheimer/onyx-java)

## Overview
Onyx-Java mirrors the Onyx Platform core API by providing a Java equivalent for each component of an Onyx workflow. This means the parts of Onyx such as Catalogs, Lifecycles, Jobs, Tasks, and so on, each have a new equivalent Java class.
<br><br>
These classes provide methods for adding entries to components, such as adding tasks to catalogs, edges to workflows, catalogs to jobs, etc.
<br><br>
<strong>
Please note:
</strong>
<br>
Onyx-Java does not validate semantic correctness of entries - parameter and type checking enforcement is left to Onyx Platform itself, which takes place at runtime.
<br>
This means that it is up to the user to refer to the Onyx Platform information model documentation to ensure that they are passing the expected parameters of types expected by the Onyx Platform.
<br><br>
### Utilities

Onyx-Java provides the following utilities for high-level package consumption:

#### Onyx Environment

The Onyx Platform is powerful, but using it can be complex - the platform allows for multiple configuration options, needs to make several calls during spin up and shutdown, and requires that persistent peer and environment metadata is available to core API calls, such as job execution.
<br>
Onyx-Java provides a utility class called *OnyxEnv* to simplify management of the environment and provide proxying methods to encapsulate this complexity. It provides convenience functions for setting up, controlling, and using the Onyx environment and the jobs that the environment contains.

#### Maps

The native language of the Onyx Platform is Clojure, and the ubiquitous data structure that it uses for all communication is an implementation of the IPersistentMap. While Java can manipulate these maps directly, it is often easier or preferable to use tools that mirror the natural way Onyx is used to using for argument manipulation.
<br>
Onyx-Java provides this ability in the utility class *MapFns*, which offers pure Java versions of useful Clojure map manipulation functions, such as get, getIn, assoc, dissoc, and others, making it easier to directly manipulate the arguments used by Onyx.
<br>
MapFns also provides support for loading edn files that contain map specifications, allowing the environment, peer configuration, and task specifications to be configured rather than coded. This promotes highly patterned design, allows high reuse, and guarantees efficiency.
<br><br>

#### Core Async

The Onyx Platform provides excellent support for asynchronous task execution via a core-async plugin.
<br>
Core-async jobs in Onyx are common and stereotyped, and setting them up generally includes rewriting boilerplate code.
<br><br>
Onyx-Java provides the ability to set up these common core-async jobs up automatically, via the utility classes *AsyncCatalog* and *AsyncLifecycles*. These two classes encapsulate generating the correct catalog and lifecycle entries for setting up, using, and collecting the resulting output from async channels. This utility provides a way for users to avoid writing boilerplate code in this common scenario.
<br><br>

{'fraction_non_alphanumeric': 0.05135284373274434, 'fraction_numerical': 0.0, 'mean_word_length': 5.108768971332209, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '434493', 'n_tokens_mistral': 1841, 'n_tokens_neox': 1701, 'n_words': 1054}