JoinFaces
=============================
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.joinfaces/jsf-spring-boot-starter/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.joinfaces/jsf-spring-boot-starter)
[![Build Status](https://github.com/joinfaces/joinfaces/actions/workflows/gradle.yml/badge.svg)](https://github.com/joinfaces/joinfaces/actions/workflows/gradle.yml)
[![codecov](https://codecov.io/gh/joinfaces/joinfaces/branch/master/graph/badge.svg)](https://codecov.io/gh/joinfaces/joinfaces)
[![](https://img.shields.io/badge/javadoc-stable-green.svg)](https://docs.joinfaces.org/current/api)
[![](https://img.shields.io/badge/reference%20guide-stable-green.svg)](https://docs.joinfaces.org/current/reference)
[![GitHub license](https://img.shields.io/github/license/joinfaces/joinfaces.svg)](https://github.com/joinfaces/joinfaces/blob/master/LICENSE.txt)

This project enables [JSF](https://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html) usage inside [Spring Boot](https://projects.spring.io/spring-boot/) Application.

It autoconfigures
[PrimeFaces](https://primefaces.org/),
[PrimeFaces Extensions](http://primefaces-extensions.github.io/),
[Apache MyFaces Tobago](https://github.com/apache/myfaces-tobago),
[OmniFaces](http://omnifaces.org/),
[AdminFaces](https://adminfaces.github.io/site/),
[Mojarra](https://javaserverfaces.java.net/) and
[MyFaces](http://myfaces.apache.org/) libraries to run at embedded
[Tomcat](http://tomcat.apache.org/),
[Jetty](http://www.eclipse.org/jetty) or
[Undertow](http://undertow.io) servlet containers.
It autoconfigures [Weld](http://weld.cdi-spec.org),
[Apache OpenWebBeans](https://openwebbeans.apache.org/), and
[Rewrite](https://www.ocpsoft.org/rewrite/) too.

It also aims to solve [JSF](https://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html) and [Spring Boot](https://projects.spring.io/spring-boot/) integration features. Current version includes [JSF](https://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html) and [CDI](https://www.cdi-spec.org/) annotations support and [Spring Security](https://projects.spring.io/spring-security/) JSF Facelet Tag support.

## How to use

[JoinFaces Example](https://github.com/joinfaces/joinfaces-maven-jar-example) shows JSF Spring Boot Starter usage. It may help you to choose the JSF Spring Boot Starter that fits your needs.

### Official example projects

|Build tool \ packaging| `jar` | `war`
|---|---|---|
|[Maven](https://maven.apache.org/)|[maven-jar-example](https://github.com/joinfaces/joinfaces-maven-jar-example)|[maven-war-example](https://github.com/joinfaces/joinfaces-maven-war-example)|
|[Gradle](https://gradle.org/)|[gradle-jar-example](https://github.com/joinfaces/joinfaces-gradle-jar-example)|[gradle-war-example](https://github.com/joinfaces/joinfaces-gradle-war-example)|

## Key Features

Take a look at [Reference Guide](https://docs.joinfaces.org/master-SNAPSHOT/reference/) to see JoinFaces features: Starters, Servlet-Context Init Parameters, JSF and CDI scope-annotations support and Spring Security JSF Facelet Tag support.

## System Requirements

Joinfaces | Java           | Spring Boot | JSF / Faces
----------|----------------|-------------|-----
`2.x`     | `1.6` to `1.8` | `1.x`       |`2.0` to `2.2`
`3.0` to `3.2`| `1.8`          | `2.0`       |`2.0` to `2.3`
`4.0.x`   | `1.8` to `11`  | `2.1`       |`2.0` to `2.3`
`4.1.x`   | `1.8` to `12`  | `2.2`       |`2.0` to `2.3`
`4.3.x`   | `1.8` to `14`  | `2.3`       |`2.0` to `2.3`
`4.4.x`   | `1.8` to `15`  | `2.4`       |`2.0` to `2.3`
`4.5.x`   | `1.8` to `16`  | `2.5`       |`2.0` to `2.3`
`4.6.x`   | `1.8` to `16`  | `2.6`       |`2.0` to `2.3`
`4.7.x`   | `1.8` to `17`  | `2.7`       |`2.0` to `2.3`
`5.0.x`   | `17` to `19`   | `3.0`       |`3.0` to `4.0`
`5.1.x`   | `17` to `20`   | `3.1`       |`3.0` to `4.0`
`5.2.x`   | `17` to `21`   | `3.2`       |`3.0` to `4.0`
`5.3.x`   | `17` to `21`   | `3.3`       |`3.0` to `4.0`

This are the combinations we have tested and expect to work, but depending on the features you are using, other combinations might work, too.
When using Java 9 or higher, make sure to use JoinFaces only on the classpath and not on the modulepath.

## Getting Help

* Take a look at [wiki](https://github.com/joinfaces/joinfaces/wiki).
* Report questions and bugs at [github.com/joinfaces/joinfaces/issues](https://github.com/joinfaces/joinfaces/issues).

## Contributing

* Report documentation, features, enhancement and bugs at [github.com/joinfaces/joinfaces/issues](https://github.com/joinfaces/joinfaces/issues).
* Pull requests are welcome.


<!--
This file is part of JavaSMT,
an API wrapper for a collection of SMT solvers:
https://github.com/sosy-lab/java-smt

SPDX-FileCopyrightText: 2020 Dirk Beyer <https://www.sosy-lab.org>

SPDX-License-Identifier: Apache-2.0
-->

# JavaSMT

[![Build Status](https://gitlab.com/sosy-lab/software/java-smt/badges/master/pipeline.svg)](https://gitlab.com/sosy-lab/software/java-smt/pipelines)
[![Build Status on Windows](https://ci.appveyor.com/api/projects/status/uehe0fwa8bil8sha/branch/master?svg=true)](https://ci.appveyor.com/project/PhilippWendler/java-smt/branch/master)
![Test Coverage](https://gitlab.com/sosy-lab/software/java-smt/badges/master/coverage.svg)
[![Apache 2.0 License](https://img.shields.io/badge/license-Apache--2-brightgreen.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sosy-lab/java-smt/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sosy-lab/java-smt)

JavaSMT is a common API layer for accessing various SMT solvers.
The API is optimized for performance (using JavaSMT has very little runtime
overhead compared to using the solver API directly), customizability
(features and settings exposed by various solvers should be visible through the
wrapping layer) and type-safety (it shouldn't be possible to add boolean terms
to integer ones at _compile_ time) sometimes at the cost of verbosity.

#### Quick links
[Getting Started](doc/Getting-started.md) |
[Documentation][JavaDoc] |
[Known Issues](doc/KnownIssues.md) |
[Documentation for Developers](doc/Developers.md) |
[Changelog](CHANGELOG.md) |
[Configuration Options][ConfigurationOptions]

#### References

- D. Baier, D. Beyer, and K. Friedberger.
  [**JavaSMT 3: Interacting with SMT Solvers in Java**](https://link.springer.com/content/pdf/10.1007/978-3-030-81688-9_9.pdf).
  In Proc. CAV, LNCS 12760, pages 1-13, 2021. Springer.
- E. G. Karpenkov, K. Friedberger, and D. Beyer.
  [**JavaSMT: A Unified Interface for SMT Solvers in Java**](https://www.sosy-lab.org/research/pub/2016-VSTTE.JavaSMT_A_Unified_Interface_For_SMT_Solvers_in_Java.pdf).
  In Proc. VSTTE, LNCS 9971, pages 139–148, 2016. Springer.

### Feature overview
JavaSMT can express formulas in the following theories:

 - Integer
 - Rational
 - Bitvector
 - Floating Point
 - Array
 - Uninterpreted Function
 - String and RegEx

The concrete support for a certain theory depends on the underlying SMT solver.
Only a few SMT solvers provide support for theories like Arrays, Floating Point, String or RegEx.

Currently JavaSMT supports several SMT solvers (see [Getting Started](doc/Getting-started.md) for installation):

| SMT Solver | Linux64 | Windows64 | MacOS | Description |
| --- |:---:|:---:|:---:|:--- |
| [Bitwuzla](https://bitwuzla.github.io/) | :heavy_check_mark: | :heavy_check_mark: |  | a fast solver for bitvector logic |
| [Boolector](https://boolector.github.io/) | :heavy_check_mark: |  |  | a fast solver for bitvector logic, misses formula introspection, deprecated |
| [CVC4](https://cvc4.github.io/) | :heavy_check_mark: |  |  |  |
| [CVC5](https://cvc5.github.io/) | :heavy_check_mark: |  |  |  |
| [MathSAT5](http://mathsat.fbk.eu/) | :heavy_check_mark: | :heavy_check_mark: |  |  |
| [OpenSMT](https://verify.inf.usi.ch/opensmt) | :heavy_check_mark: |  |  |  |
| [OptiMathSAT](http://optimathsat.disi.unitn.it/) | :heavy_check_mark: |  |  | based on MathSAT5, with support for optimization queries |
| [Princess](http://www.philipp.ruemmer.org/princess.shtml) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Java-based SMT solver |
| [SMTInterpol](https://ultimate.informatik.uni-freiburg.de/smtinterpol/) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Java-based SMT solver |
| [Yices2](https://yices.csl.sri.com/) | :heavy_check_mark: | [maybe](https://github.com/sosy-lab/java-smt/pull/215) |  |  |
| [Z3](https://github.com/Z3Prover/z3) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | mature and well-known solver |

We support a reasonable list of operating systems and versions.
Our main target is Linux (64-bit, mainly Ubuntu 22.04 or newer,
several solver libraries also work on Ubuntu 18.04, or comparable Linux distributions).
Windows 10/11 and MacOS are supported for several SMT solvers (with limited hardware for testing).
If a specific operating system is missing and required, please do not hesitate and open an issue!

The following features are supported (depending on the used SMT solver):

 - Satisfiability checking
 - Quantifiers and quantifier elimination
 - Incremental solving with assumptions
 - Incremental solving with push/pop
 - Multiple independent contexts
 - Model generation
 - Interpolation, including tree and sequential structure
 - Formula transformation using built-in tactics
 - Formula introspection using visitors

We aim for supporting more important features, more SMT solvers, and more systems.
If something specific is missing, please [look for or file an issue](https://github.com/sosy-lab/java-smt/issues).

#### Multithreading Support
| SMT Solver | Concurrent context usage¹ | Concurrent prover usage² |
| --- |:---:|:---:|
| [Bitwuzla](https://bitwuzla.github.io/) | :heavy_check_mark: |  |
| [Boolector](https://boolector.github.io/) | :heavy_check_mark: |  |
| [CVC4](https://cvc4.github.io/) | :heavy_check_mark: | :heavy_check_mark: |
| [CVC5](https://cvc4.github.io/) | :question: | |
| [MathSAT5](http://mathsat.fbk.eu/) | :heavy_check_mark: |  |
| [OpenSMT](https://verify.inf.usi.ch/opensmt) | :question: | |
| [OptiMathSAT](http://optimathsat.disi.unitn.it/) | :heavy_check_mark: |  |
| [Princess](http://www.philipp.ruemmer.org/princess.shtml) | :heavy_check_mark: |  |
| [SMTInterpol](https://ultimate.informatik.uni-freiburg.de/smtinterpol/) | :heavy_check_mark: |  |
| [Yices2](https://yices.csl.sri.com/) |  |  |
| [Z3](https://github.com/Z3Prover/z3) | :heavy_check_mark: |  |

Interruption using a [ShutdownNotifier][] may be used to interrupt a solver from any thread.
Formulas are translatable in between contexts/provers/threads using _FormulaManager.translateFrom()_.

¹ Multiple contexts, but all operations on each context only from a single thread.
² Multiple provers on one or more contexts, with each prover using its own thread.

#### Garbage Collection in Native Solvers
JavaSMT exposes an API for performing garbage collection on solvers implemented in a native language.
As a native solver has no way of knowing whether the created formula object is still referenced
by the client application, this API is necessary to avoid leaking memory.
Note that several solvers already support _hash consing_ and thus,
there is never more than one copy of an identical formula object in memory.
Consequently, if all created formulas are later re-used (or re-created)
in the application, it is not necessary to perform any garbage collection at all.
Additionally, the memory for formulas created on user-side (i.e., via JavaSMT) is negligible
compared to solver-internal memory-consumption when solving a hard SMT query.

- **Z3**: The parameter `solver.z3.usePhantomReferences` may be used to control
  whether JavaSMT will attempt to decrease references on Z3 formula
  objects once they are no longer referenced.
- **MathSAT5**: Currently we do not support performing garbage collection for MathSAT5.
- **CVC4, CVC5, Bitwuzla**: Solvers using SWIG bindings do perform garbage collection.
- **Other native SMT solvers**: we do not perform garbage collection.

## Getting started
Installation is possible via [Maven][Maven repository],
[Ivy][Ivy repository], or [manually][Manual Installation].
Please see our [Getting Started Guide](doc/Getting-started.md).

#### Usage
``` java
// Instantiate JavaSMT with SMTInterpol as backend (for dependencies cf. documentation)
try (SolverContext context = SolverContextFactory.createSolverContext(
        config, logger, shutdownNotifier, Solvers.SMTINTERPOL)) {
  IntegerFormulaManager imgr = context.getFormulaManager().getIntegerFormulaManager();

  // Create formula "a = b" with two integer variables
  IntegerFormula a = imgr.makeVariable("a");
  IntegerFormula b = imgr.makeVariable("b");
  BooleanFormula f = imgr.equal(a, b);

  // Solve formula, get model, and print variable assignment
  try (ProverEnvironment prover = context.newProverEnvironment(ProverOptions.GENERATE_MODELS)) {
    prover.addConstraint(f);
    boolean isUnsat = prover.isUnsat();
    assert !isUnsat;
    try (Model model = prover.getModel()) {
      System.out.printf("SAT with a = %s, b = %s", model.evaluate(a), model.evaluate(b));
    }
  }
}
```

## Authors

 - Project maintainers: [Karlheinz Friedberger][] and [Philipp Wendler][]
 - Former project maintainer: [George Karpenkov][]
 - Initial codebase, many design decisions: [Philipp Wendler][]
 - Contributions: [Daniel Baier][], [Thomas Stieglmaier][] and several others.

[ConfigurationOptions]: https://sosy-lab.github.io/java-smt/ConfigurationOptions.txt
[Manual Installation]: doc/Getting-started.md#manual-installation
[ShutdownNotifier]: https://sosy-lab.github.io/java-common-lib/api/org/sosy_lab/common/ShutdownNotifier.html
[JavaDoc]: https://sosy-lab.github.io/java-smt/
[George Karpenkov]: http://metaworld.me
[Philipp Wendler]: https://www.philippwendler.de/
[Thomas Stieglmaier]: https://stieglmaier.me/
[Karlheinz Friedberger]: https://www.sosy-lab.org/people/friedberger
[Daniel Baier]: https://www.sosy-lab.org/people/baier
[Ivy repository]: https://www.sosy-lab.org/ivy
[Maven repository]: https://mvnrepository.com/artifact/org.sosy-lab/java-smt


# bitwig-extensions
Bitwig Studio Controller Extensions

A scripting guide and API reference resides in Bitwig Studio under Help > Documentation > Developer Resources.

## JAVA codestyle

If you plan on contributing to this repository please import `code-formatting.xml` in your IDE.


# DEPRECATED - This repository is no longer maintained
[![License](https://img.shields.io/hexpm/l/plug.svg?maxAge=2592000)]()

# Business Automation Community of Practice
Business Automation or Red Hat Process Automation Manager is a portfolio that includes a web tool for authoring, rules management application and building business processes (Workbench/Business Central).

This repository is meant to help bootstrap users of the Red Hat Process Automation Manager Portfolio to get started in building and using Red Hat Process Automation Manager (PAM) and Red Hat Decision Manager (DM) to build applications to run in different runtimes such as JBoss enterprise platform, spring boot and cloud-native using Kogito(Quarkus implementation for JBPM and drools).

# Red Hat Process Automation Manager (PAM)
PAM is a platform for developing business process management (BPM),
business rules management (BRM), Decision Model and Notation (DMN), and business resource optimization and complex event processing (CEP).

# Red Hat Decision Manager (DM)
DM is a platform for developing and authoring business rules management (BRM), business resource optimization and complex event processing (CEP).

## Decision Model and Notation (DMN)
It is a standard established by the Object Management Group (OMG) for describing and modelling operational decisions.

## Business Process Management (BPM)
It's a tool to help model, analyze, measure, improve, automate business processes and decisions based on the JBPM framework.

## Business rules management (BRM)
It provides a core Business Rules Engine (BRE) and full runtime support for Decision Model and Notation (DMN) models.

## Cloud Native - Kogito
Kogito is a framework that compiles your business process and business rules in a more cloud-native approach taking advantage of the latest technologies (Quarkus, Knative, etc.), you get amazingly fast boot times and instant scaling on orchestration platforms like Kubernetes.

## What's In This Repo?

This repo contains process automation(JBPM) and business rules(Drools and DMN) related quickstarts of several different flavours.


# Shadow

![Android CI](https://github.com/Tencent/Shadow/workflows/Android%20CI/badge.svg?event=push)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

## 介绍
Shadow是一个腾讯自主研发的Android插件框架，经过线上亿级用户量检验。
Shadow不仅开源分享了插件技术的关键代码，还完整的分享了上线部署所需要的所有设计。

与市面上其他插件框架相比，Shadow主要具有以下特点：

* **复用独立安装App的源码**：插件App的源码原本就是可以正常安装运行的。
* **零反射无Hack实现插件技术**：从理论上就已经确定无需对任何系统做兼容开发，更无任何隐藏API调用，和Google限制非公开SDK接口访问的策略完全不冲突。
* **全动态插件框架**：一次性实现完美的插件框架很难，但Shadow将这些实现全部动态化起来，使插件框架的代码成为了插件的一部分。插件的迭代不再受宿主打包了旧版本插件框架所限制。
* **宿主增量极小**：得益于全动态实现，真正合入宿主程序的代码量极小（15KB，160方法数左右）。
* **Kotlin实现**：core.loader，core.transform核心代码完全用Kotlin实现，代码简洁易维护。

### 支持特性
* 四大组件
* Fragment（代码添加和Xml添加）
* DataBinding（无需特别支持，但已验证可正常工作）
* 跨进程使用插件Service
* 自定义Theme
* 插件访问宿主类
* So加载
* 分段加载插件（多Apk分别加载或多Apk以此依赖加载）
* 一个Activity中加载多个Apk中的View
* 等等……

## 编译与开发环境

### 环境准备
建议直接用最新的稳定版本Android Studio打开工程。目前项目已适配`Android Studio Arctic Fox | 2020.3.1`，
低版本的Android Studio可能因为Gradle版本过高而无法正常打开项目。

然后在IDE中选择`sample-app`或`sample-host`模块直接运行，分别体验同一份代码在正常安装情况下和插件情况下的运行情况。

![选择sample-host直接运行](pics/run-sample-host-in-ide.png)

Shadow的所有代码都位于`projects`目录下的3个目录，分别是：

* `sdk`包含SDK的所有代码
* `test`包含SDK的自动化测试代码
* `sample`包含演示代码

其中`sample`应该是大家体验Shadow的最佳环境。
详见`sample`目录中的[README](projects/sample/README.md)介绍。

### 兼容性

Shadow项目有较为完善的自动化测试，因此最新代码对外部环境的版本兼容性可以参考自动化测试的配置。

* [pr-check.yml](.github/workflows/pr-check.yml) 虚拟机自动化测试，包含Android测试机版本和编译环境JDK等版本。
* [pr-check-gradle-plugin.yml](.github/workflows/pr-check-gradle-plugin.yml) AGP兼容性测试。
  其中指向的[test_JDK17.sh](projects/test/gradle-plugin-agp-compat-test/test_JDK17.sh)和
  [test_JDK11.sh](projects/test/gradle-plugin-agp-compat-test/test_JDK11.sh)中定义了被测试的AGP版本。

## 自己写的测试代码出错？

以我们多年的插件环境下业务开发经验，插件框架是不可能一步到位实现完美的。
因此，我们相信大部分业务在接入时都是需要一定的二次开发工作。
Shadow现有的代码满足的是我们自己的业务现在的需求。得益于全动态的设计，
插件框架和插件本身都是动态发布的，插件包里既有插件代码也有插件框架代码，
所以可以根据新版本插件的需要同时开发插件框架。

例如，ShadowActivity没有实现全所有Activity方法，你写的测试代码可能用到了，
就会出现Method Not Found错误，只需要在ShadowActivity中实现对应方法就可以了。
大部分方法的实现都只是需要简单的转调就能工作正常。

如果遇到不会实现的功能，可以提Issue。最好附上测试代码。

## 后续开发
* 原理与设计说明文档
* 多插件支持的演示工程
* 自动化测试用例补充
* 开源包含下载能力的manager实现

## 贡献代码

详见[CONTRIBUTING.md](CONTRIBUTING.md)

## 许可协议

Tencent Shadow采用`BSD 3-Clause License`，详见[LICENSE](LICENSE.txt)。

## 个人信息保护规则声明

详见[PRIVACY.md](PRIVACY.md)


![metadata-extractor logo](https://cdn.rawgit.com/drewnoakes/metadata-extractor/master/Resources/metadata-extractor-logo.svg)

[![metadata-extractor build status](https://github.com/drewnoakes/metadata-extractor/actions/workflows/maven.yml/badge.svg)](https://github.com/drewnoakes/metadata-extractor/actions/workflows/maven.yml)
[![Maven Central](https://img.shields.io/maven-central/v/com.drewnoakes/metadata-extractor.svg?maxAge=2592000)](https://mvnrepository.com/artifact/com.drewnoakes/metadata-extractor)
[![Donate](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TNXDJKCDV5Z2C&lc=GB&item_name=Drew%20Noakes&item_number=metadata%2dextractor&no_note=0&cn=Add%20a%20message%20%28optional%29%3a&no_shipping=1&currency_code=GBP&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)

_metadata-extractor_ is a Java library for reading metadata from media files.

## Installation

The easiest way is to install the library via its [Maven package](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.drewnoakes%22%20AND%20a%3A%22metadata-extractor%22).

```xml
<dependency>
  <groupId>com.drewnoakes</groupId>
  <artifactId>metadata-extractor</artifactId>
  <version>2.19.0</version>
</dependency>
```

Alternatively, download it from the [releases page](https://github.com/drewnoakes/metadata-extractor/releases).

## Usage

```java
Metadata metadata = ImageMetadataReader.readMetadata(imagePath);
```

With that `Metadata` instance, you can [iterate or query](https://github.com/drewnoakes/metadata-extractor/wiki/Getting-Started-(Java)#2-query-tags) the
[various tag values](https://github.com/drewnoakes/metadata-extractor/wiki/SampleOutput) that were read from the image.

## Features

The library understands several formats of metadata, many of which may be present in a single image:

* [Exif](https://en.wikipedia.org/wiki/Exchangeable_image_file_format)
* [IPTC](https://en.wikipedia.org/wiki/IPTC)
* [XMP](https://en.wikipedia.org/wiki/Extensible_Metadata_Platform)
* [JFIF / JFXX](https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format)
* [ICC Profiles](https://en.wikipedia.org/wiki/ICC_profile)
* [Photoshop](https://en.wikipedia.org/wiki/Photoshop) fields
* [WebP](https://en.wikipedia.org/wiki/WebP) properties
* [WAV](https://en.wikipedia.org/wiki/WAV) properties
* [AVI](https://en.wikipedia.org/wiki/Audio_Video_Interleave) properties
* [PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics) properties
* [BMP](https://en.wikipedia.org/wiki/BMP_file_format) properties
* [GIF](https://en.wikipedia.org/wiki/Graphics_Interchange_Format) properties
* [ICO](https://en.wikipedia.org/wiki/ICO_(file_format)) properties
* [PCX](https://en.wikipedia.org/wiki/PCX) properties
* [QuickTime](https://en.wikipedia.org/wiki/QuickTime_File_Format) properties
* [MP4](https://en.wikipedia.org/wiki/MPEG-4_Part_14) properties

It will process files of type:

* JPEG
* TIFF
* WebP
* WAV
* AVI
* PSD
* PNG
* BMP
* GIF
* HEIF (HEIC & AVIF)
* ICO
* PCX
* QuickTime
* MP4
* Camera Raw
  * NEF (Nikon)
  * CR2 (Canon)
  * ORF (Olympus)
  * ARW (Sony)
  * RW2 (Panasonic)
  * RWL (Leica)
  * SRW (Samsung)

Camera-specific "makernote" data is decoded for cameras manufactured by:

* Agfa
* Apple
* Canon
* Casio
* Epson
* Fujifilm
* Kodak
* Kyocera
* Leica
* Minolta
* Nikon
* Olympus
* Panasonic
* Pentax
* Reconyx
* Sanyo
* Sigma/Foveon
* Sony

Read [getting started](https://github.com/drewnoakes/metadata-extractor/wiki/Getting-Started) for an introduction to the basics of using this library.

## Questions & Feedback

The quickest way to have your questions answered is via [Stack Overflow](http://stackoverflow.com/questions/tagged/metadata-extractor).
Check whether your question has already been asked, and if not, ask a new one tagged with both `metadata-extractor` and `java`.

Bugs and feature requests should be provided via the project's [issue tracker](https://github.com/drewnoakes/metadata-extractor/issues).
Please attach sample images where possible as most issues cannot be investigated without an image.

## Contributing

If you want to get your hands dirty, making a pull request is a great way to enhance the library.
In general it's best to create an issue first that captures the problem you want to address.
You can discuss your proposed solution in that issue.
This gives others a chance to provide feedback before you spend your valuable time working on it.

An easier way to help is to contribute to the [sample image file library](https://github.com/drewnoakes/metadata-extractor-images/wiki) used for research and testing.

## Credits

This library is developed by [Drew Noakes](https://drewnoakes.com/code/exif/).

Thanks are due to the many [users](https://github.com/drewnoakes/metadata-extractor/wiki/UsedBy) who sent in suggestions, bug reports,
[sample images](https://github.com/drewnoakes/metadata-extractor-images/wiki) from their cameras as well as encouragement.
Wherever possible, they have been credited in the source code and commit logs.

## Other languages

- .NET  [metadata-extractor-dotnet](https://github.com/drewnoakes/metadata-extractor-dotnet) is a complete port to C#, maintained alongside this library
- PHP [php-metadata-extractor](https://github.com/gomoob/php-metadata-extractor) wraps this Java project, making it available to users of PHP
- Clojure [exif-processor](https://github.com/joshuamiller/exif-processor) wraps this Java project, returning a subset of data

---

More information about this project is available at:

* https://drewnoakes.com/code/exif/
* https://github.com/drewnoakes/metadata-extractor/


# JavaCC

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.java.dev.javacc/javacc/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.java.dev.javacc/javacc)
[![Javadocs](https://www.javadoc.io/badge/net.java.dev.javacc/javacc.svg)](https://www.javadoc.io/doc/net.java.dev.javacc/javacc)

Java Compiler Compiler (JavaCC) is the most popular parser generator for use with Java applications.

A parser generator is a tool that reads a grammar specification and converts it to a Java program that can recognize matches to the grammar.

In addition to the parser generator itself, JavaCC provides other standard capabilities related to parser generation such as tree building (via a tool called JJTree included with JavaCC), actions and debugging.

All you need to run a JavaCC parser, once generated, is a Java Runtime Environment (JRE).

This README is meant as a brief overview of the core features and how to set things up to get yourself started with JavaCC. For a fully detailed documentation, please see [https://javacc.github.io/javacc/](https://javacc.github.io/javacc/).

## Contents

- [Introduction](#introduction)
    * [Features](#features)
    * [An example](#an-example)
    * [Tutorials](docs/tutorials/index.md)
    * [FAQ](docs/faq.md)
- [Getting Started](#getting-started)
    * [From the command line](#use-javacc-from-the-command-line)
    * [Within an IDE](#use-javacc-within-an-ide)
    * [Rebuilding JavaCC](#rebuilding-javacc)
- [Community](#community)
    * [Support](#support)
    * [Documentation](#documentation)
    * [Resources](#resources)
    * [Powered by JavaCC](#powered-by-javacc)
- [License](#license)

## Introduction

### Features

* JavaCC generates top-down ([recursive descent](https://en.wikipedia.org/wiki/Recursive_descent_parser)) parsers as opposed to bottom-up parsers generated by [YACC](https://en.wikipedia.org/wiki/Yacc)-like tools. This allows the use of more general grammars, although [left-recursion](https://en.wikipedia.org/wiki/Left_recursion) is disallowed. Top-down parsers have a number of other advantages (besides more general grammars) such as being easier to debug, having the ability to parse to any [non-terminal](https://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols) in the grammar, and also having the ability to pass values (attributes) both up and down the parse tree during parsing.

* By default, JavaCC generates an `LL(1)` parser. However, there may be portions of grammar that are not `LL(1)`. JavaCC offers the capabilities of syntactic and semantic lookahead to resolve shift-shift ambiguities locally at these points. For example, the parser is `LL(k)` only at such points, but remains `LL(1)` everywhere else for better performance. Shift-reduce and reduce-reduce conflicts are not an issue for top-down parsers.

* JavaCC generates parsers that are 100% pure Java, so there is no runtime dependency on JavaCC and no special porting effort required to run on different machine platforms.

* JavaCC allows [extended BNF](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) specifications - such as `(A)*`, `(A)+` etc - within the lexical and the grammar specifications. Extended BNF relieves the need for left-recursion to some extent. In fact, extended BNF is often easier to read as in `A ::= y(x)*` versus `A ::= Ax|y`.

* The lexical specifications (such as regular expressions, strings) and the grammar specifications (the BNF) are both written together in the same file. It makes grammars easier to read since it is possible to use regular expressions inline in the grammar specification, and also easier to maintain.

* The [lexical analyzer](https://en.wikipedia.org/wiki/Lexical_analysis) of JavaCC can handle full Unicode input, and lexical specifications may also include any Unicode character. This facilitates descriptions of language elements such as Java identifiers that allow certain Unicode characters (that are not ASCII), but not others.

* JavaCC offers [Lex](https://en.wikipedia.org/wiki/Lex_(software))-like lexical state and lexical action capabilities. Specific aspects in JavaCC that are superior to other tools are the first class status it offers concepts such as `TOKEN`, `MORE`, `SKIP` and state changes. This allows cleaner specifications as well as better error and warning messages from JavaCC.

* Tokens that are defined as *special tokens* in the lexical specification are ignored during parsing, but these tokens are available for processing by the tools. A useful application of this is in the processing of comments.

* Lexical specifications can define tokens not to be case-sensitive either at the global level for the entire lexical specification, or on an individual lexical specification basis.

* JavaCC comes with JJTree, an extremely powerful tree building pre-processor.

* JavaCC also includes JJDoc, a tool that converts grammar files to documentation files, optionally in HTML.

* JavaCC offers many options to customize its behavior and the behavior of the generated parsers. Examples of such options are the kinds of Unicode processing to perform on the input stream, the number of tokens of ambiguity checking to perform etc.

* JavaCC error reporting is among the best in parser generators. JavaCC generated parsers are able to clearly point out the location of parse errors with complete diagnostic information.

* Using options `DEBUG_PARSER`, `DEBUG_LOOKAHEAD`, and `DEBUG_TOKEN_MANAGER`, users can get in-depth analysis of the parsing and the token processing steps.

* The JavaCC release includes a wide range of examples including Java and HTML grammars. The examples, along with their documentation, are a great way to get acquainted with JavaCC.

### An example

The following JavaCC grammar example recognizes matching braces followed by zero or more line terminators and then an end of file.

Examples of legal strings in this grammar are:

`{}`, `{% raw %}{{{{{}}}}}{% endraw %}` // ... etc

Examples of illegal strings are:

`{}{}`, `}{}}`, `{ }`, `{x}` // ... etc

##### Its grammar

```java
PARSER_BEGIN(Example)

/** Simple brace matcher. */
public class Example {

  /** Main entry point. */
  public static void main(String args[]) throws ParseException {
    Example parser = new Example(System.in);
    parser.Input();
  }

}

PARSER_END(Example)

/** Root production. */
void Input() :
{}
{
  MatchedBraces() ("\n"|"\r")* <EOF>
}

/** Brace matching production. */
void MatchedBraces() :
{}
{
  "{" [ MatchedBraces() ] "}"
}
```

##### Some executions and outputs

###### {{}} gives no error

```java
$ java Example
{{}}<return>
```

###### {x gives a Lexical error

```java
$ java Example
{x<return>
Lexical error at line 1, column 2.  Encountered: "x"
TokenMgrError: Lexical error at line 1, column 2.  Encountered: "x" (120), after : ""
        at ExampleTokenManager.getNextToken(ExampleTokenManager.java:146)
        at Example.getToken(Example.java:140)
        at Example.MatchedBraces(Example.java:51)
        at Example.Input(Example.java:10)
        at Example.main(Example.java:6)
```

###### {}} gives a ParseException

```java
$ java Example
{}}<return>
ParseException: Encountered "}" at line 1, column 3.
Was expecting one of:
    <EOF>
    "\n" ...
    "\r" ...
        at Example.generateParseException(Example.java:184)
        at Example.jj_consume_token(Example.java:126)
        at Example.Input(Example.java:32)
        at Example.main(Example.java:6)
```

## Getting Started

You can use JavaCC either from the command line or through an IDE.

### Use JavaCC from the command line

#### Download

Download the latest stable release (at least the source and the binaries) in a so called download directory:

* JavaCC 7.0.13 - ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.13.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.13.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.13/javacc-7.0.13.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.13/javacc-7.0.13-javadoc.jar), [Release Notes](docs/release-notes.md#javacc-7.0.13))

All JavaCC releases are available via [GitHub](https://github.com/javacc/javacc/releases) and [Maven](https://mvnrepository.com/artifact/net.java.dev.javacc/javacc) including checksums and cryptographic signatures.

For all previous releases, please see [stable releases](docs/downloads.md).

#### Install

Once you have downloaded the files, navigate to the download directory and unzip the source file, this creating a so called JavaCC installation directory:
```
$ unzip javacc-7.0.13.zip
or
$ tar xvf javacc-7.0.13.tar.gz
```

Then move the binary file `javacc-7.0.13.jar` under the download directory in a new `target/` directory under the installation directory, and rename it to `javacc.jar`.

Then add the `scripts/` directory in the JavaCC installation directory to your `PATH`. The JavaCC, JJTree, and JJDoc invocation scripts/executables reside in this directory.

On UNIX based systems, the scripts may not be executable immediately. This can be solved by using the command from the `javacc-7.0.13/` directory:
```
chmod +x scripts/javacc
```

#### Write your grammar and generate your parser

You can then create and edit a grammar file with your favorite text editor.

Then use the appropriate script for generating your parser from your grammar.

### Use JavaCC within an IDE

Minimal requirements for an IDE are:
* Support for Java
* Support for Maven with Java

#### IntelliJ IDEA

The IntelliJ IDE supports Maven out of the box and offers a plugin for JavaCC development.

* IntelliJ download: [https://www.jetbrains.com/idea/](https://www.jetbrains.com/idea/)
* IntelliJ JavaCC Plugin: [https://plugins.jetbrains.com/plugin/11431-javacc/](https://plugins.jetbrains.com/plugin/11431-javacc/)

#### Eclipse IDE

* Eclipse download: [https://www.eclipse.org/ide/](https://www.eclipse.org/ide/)
* Eclipse JavaCC Plugin: [https://marketplace.eclipse.org/content/javacc-eclipse-plug](https://marketplace.eclipse.org/content/javacc-eclipse-plug)

#### Maven

Add the following dependency to your `pom.xml` file.

```
<dependency>
    <groupId>net.java.dev.javacc</groupId>
    <artifactId>javacc</artifactId>
    <version>7.0.13</version>
</dependency>
```

#### Gradle

Add the following to your `build.gradle` file.

```
repositories {
    mavenLocal()
    maven {
        url = 'https://mvnrepository.com/artifact/net.java.dev.javacc/javacc'
    }
}

dependencies {
    compile group: 'net.java.dev.javacc', name: 'javacc', version: '7.0.13'
}
```

### Rebuilding JavaCC

#### From the source installation directory

The source installation directory contains the JavaCC, JJTree and JJDoc sources, launcher scripts, example grammars and documentation, and also a bootstrap version of JavaCC needed to build JavaCC.

Prerequisites for building JavaCC with this method:

* Ant (we require version 1.5.3 or above - you can get ant from [http://ant.apache.org](http://ant.apache.org))
* Maven
* Java 8 (Java 9 and 10 are not yet supported)

Use the ant build script:

```
$ cd javacc
$ ant
```

This will build the `javacc.jar` file in the `target/` directory

#### After cloning the JavaCC GitHub repository

This is the preferred method for contributing to JavaCC.

Prerequisites for building JavaCC with this method:

* Git
* Ant (we require version 1.5.3 or above - you can get ant from [http://ant.apache.org](http://ant.apache.org))
* Maven
* Java 8 (Java 9 and 10 are not yet supported)

Just clone the repository and then use the ant build script:

```
$ git clone https://github.com/javacc/javacc.git
$ cd javacc
$ ant
```

This will build the `javacc.jar` file in the `target/` directory

## Community

JavaCC is by far the most popular parser generator used with Java applications with an estimated user base of over 1,000 users and more than 100,000 downloads to date.

It is maintained by the [developer community](https://github.com/javacc/javacc/graphs/contributors) which includes the original authors and [Chris Ainsley](https://github.com/ainslec), [Tim Pizney](https://github.com/timp) and [Francis Andre](https://github.com/zosrothko).

### Support

Don’t hesitate to ask!

Contact the developers and community on the [Google user group](https://groups.google.com/forum/#!forum/javacc-users) or email us at [JavaCC Support](mailto:support@javacc.org) if you need any help.

[Open an issue](https://github.com/javacc/javacc/issues) if you found a bug in JavaCC.

For questions relating to development please join our [Slack channel](https://javacc.slack.com/).

### Documentation

The documentation of JavaCC is located on the website [https://javacc.github.io/javacc/](https://javacc.github.io/javacc/) and in the `docs/` directory of the source code on [GitHub](https://github.com/javacc/javacc).

It includes [detailed documentation](docs/documentation/index.md) for JavaCC, JJTree, and JJDoc.

### Resources

##### Books

* Dos Reis, Anthony J., Compiler Construction Using Java, JavaCC, and Yacc., Wiley-Blackwell 2012. ISBN 0-4709495-9-7 ([book](https://www.amazon.co.uk/Compiler-Construction-Using-Java-JavaCC/dp/0470949597), [pdf](https://doc.lagout.org/programmation/Java/Compiler%20Construction%20using%20Java%2C%20JavaCC%2C%20and%20YACC%20%5BReis%202011-12-20%5D.pdf)).
* Copeland, Tom, Generating Parsers with JavaCC., Centennial Books, 2007. ISBN 0-9762214-3-8 ([book](https://www.amazon.com/Generating-Parsers-JavaCC-Easy-Use/dp/0976221438)).

##### Tutorials

* JavaCC [tutorials](docs/tutorials/index.md).
* [Introduction to JavaCC](https://www.engr.mun.ca/~theo/JavaCC-Tutorial/javacc-tutorial.pdf) by Theodore S. Norvell.
* [Incorporating language processing into Java applications: a JavaCC tutorial](https://ieeexplore.ieee.org/document/1309649) by Viswanathan Kodaganallur.

##### Articles

* [Looking for lex and yacc for Java? You don't know Jack](https://www.javaworld.com/article/2077315/looking-for-lex-and-yacc-for-java--you-don-t-know-jack.html) by Chuck Mcmanis.
* [Build your own languages with JavaCC](https://www.javaworld.com/article/2076269/build-your-own-languages-with-javacc.html) by Oliver Enseling.
* [Writing an Interpreter Using JavaCC](https://anandsekar.github.io/writing-an-interpretter-using-javacc/) by Anand Rajasekar.
* [Building a lexical analyzer with JavaCC](http://kiwwito.com/build-a-lexical-analyzer-with-javacc/) by Keyvan Akbary.

##### Parsing theory

* Alfred V. Aho, Monica S. Lam, Ravi Sethi and Jeffrey D. Ullman, Compilers: Principles, Techniques, and Tools, 2nd Edition, Addison-Wesley, 2006, ISBN 0-3211314-3-6 ([book](https://www.amazon.co.uk/Compilers-Principles-Techniques-Tools-2nd/dp/0321131436), [pdf](https://github.com/germanoa/compiladores/blob/master/doc/ebook/Compilers%20Principles%2C%20Techniques%2C%20and%20Tools%20-%202nd%20Edition%20-%20Alfred%20V.%20Aho.pdf)).
* Charles N. Fischer and Richard J. Leblanc, Jr., Crafting a Compiler with C., Pearson, 1991. ISBN 0-8053216-6-7 ([book](https://www.amazon.co.uk/Crafting-Compiler-Charles-N-Fischer/dp/0805321667)).

### Powered by JavaCC

JavaCC is used in many commercial applications and open source projects.

The following list highlights a few notable JavaCC projects that run interesting use cases in production, with links to the relevant grammar specifications.

User                                                 | Use Case                                                       | Grammar File(s)
:--------------------------------------------------- |:-------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------:
[Apache ActiveMQ](https://activemq.apache.org/)      | Parsing JMS selector statements                                | [SelectorParser.jj](https://github.com/apache/activemq/blob/master/activemq-client/src/main/grammar/SelectorParser.jj), [HyphenatedParser.jj](https://github.com/apache/activemq-artemis/blob/master/artemis-selector/src/main/javacc/HyphenatedParser.jj)
[Apache Avro](https://avro.apache.org/)              | Parsing higher-level languages into Avro Schema                | [idl.jj](https://github.com/apache/avro/blob/master/lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj)
[Apache Calcite](https://calcite.apache.org/)        | Parsing SQL statements                                         | [Parser.jj](https://github.com/apache/calcite/blob/master/core/src/main/codegen/templates/Parser.jj)
[Apache Camel](https://camel.apache.org/)            | Parsing stored SQL templates                                   | [sspt.jj](https://github.com/apache/camel/blob/master/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/template/grammar/sspt.jj)
[Apache Jena](https://jena.apache.org/)              | Parsing queries written in SPARQL, ARQ, SSE, Turtle and JSON   | [sparql_10](https://github.com/apache/jena/blob/master/jena-arq/Grammar/Final/sparql_10-final.jj), [sparql_11](https://github.com/apache/jena/blob/master/jena-arq/Grammar/Final/sparql_11-final.jj), [arq.jj](https://github.com/apache/jena/blob/master/jena-arq/Grammar/arq.jj), [sse.jj](https://github.com/apache/jena/blob/master/jena-arq/Grammar/sse/sse.jj), [turtle.jj](https://github.com/apache/jena/blob/master/jena-arq/Grammar/turtle.jj), [json.jj](https://github.com/apache/jena/blob/master/jena-arq/Grammar/JSON/json.jj)
[Apache Lucene](https://lucene.apache.org/)          | Parsing search queries                                         | [QueryParser.jj](https://github.com/apache/lucene/blob/main/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj)
[Apache Tomcat](https://tomcat.apache.org/)          | Parsing Expression Language (EL) and JSON                      | [ELParser.jjt](https://github.com/apache/tomcat/blob/master/java/org/apache/el/parser/ELParser.jjt), [JSONParser.jj](https://github.com/apache/tomcat/blob/master/java/org/apache/tomcat/util/json/JSONParser.jj)
[Apache Zookeeper](https://zookeeper.apache.org/)    | Optimising serialisation/deserialisation of Hadoop I/O records | [rcc.jj](https://github.com/apache/zookeeper/blob/master/zookeeper-jute/src/main/java/org/apache/jute/compiler/generated/rcc.jj)
[Java Parser](https://javaparser.org/)               | Parsing Java language files                                    | [java.jj](https://github.com/javaparser/javaparser/blob/master/javaparser-core/src/main/javacc/java.jj)

## License

JavaCC is an open source project released under the [BSD License 2.0](LICENSE). The JavaCC project was originally developed at Sun Microsystems Inc. by [Sreeni Viswanadha](https://github.com/kaikalur) and [Sriram Sankar](https://twitter.com/sankarsearch).

---

[Top](#javacc)


[![JFXCentral](https://img.shields.io/badge/Find_me_on-JFXCentral-blue?logo=googlechrome&logoColor=white)](https://www.jfx-central.com/libraries/preferencesfx)

# PreferencesFX
**Preference dialogs for business applications made easy. Creating preference dialogs in Java has never been this easy!**

[![Maven Central](https://img.shields.io/maven-central/v/com.dlsc.preferencesfx/preferencesfx-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.dlsc.preferencesfx%22%20AND%20a:%22preferencesfx-core%22)
[![Build Status](https://travis-ci.com/dlsc-software-consulting-gmbh/PreferencesFX.svg?branch=master)](https://travis-ci.com/dlsc-software-consulting-gmbh/PreferencesFX)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX?ref=badge_shield)

![screenshot of created preferences dialog](docs/images/preferencesFX_in_use.png)

## Table of Contents
- [Maven](#maven)
- [Gradle](#gradle)
- [What is PreferencesFX](#what-is-preferencesfx)
- [Advantages](#advantages)
- [Main Features](#main-features)
- [Documentation](#documentation)
- [Structure](#structure)
- [Demos](#demos)
- [Defining a preferences dialog](#defining-a-preferences-dialog)
   - [Required arguments](#required-arguments)
   - [Optional arguments](#optional-arguments)
   - [Setting types](#setting-types)
- [Localisation](#localisation)
- [Validation](#validation)
- [Visibility](#visibility)
- [Team](#team)

## Maven

To use this framework as part of your Maven build simply add the following dependency to your pom.xml file:

### Java 8
```XML
<dependency>
  <groupId>com.dlsc.preferencesfx</groupId>
  <artifactId>preferencesfx-core</artifactId>
  <version>8.6.0</version>
</dependency>
```

### Java 11
```XML
<dependency>
  <groupId>com.dlsc.preferencesfx</groupId>
  <artifactId>preferencesfx-core</artifactId>
  <version>11.8.0</version>
</dependency>
```

## Gradle

To use this framework as part of your gradle build simply add the following to your build.gradle file and use the following dependency definition:

### Java 8
```groovy
dependencies {
    compile group: 'com.dlsc.preferencesfx', name: 'preferencesfx-core', version: '8.6.0'
}
```

### Java 11
```groovy
dependencies {
    compile group: 'com.dlsc.preferencesfx', name: 'preferencesfx-core', version: '11.8.0'
}
```

## What is PreferencesFX?
Creating preference dialogs in JavaFX is a tedious and very error-prone task. PreferencesFX is a framework which solves this problem. It enables the developer to create preference dialogs with ease and creates well-designed and user-friendly preference dialogs by default.

## Advantages
- Less error-prone
- Less code needed
- Easy to learn
- Easy to understand
- Easy to use, for developers and users alike

## Main Features
- Simple and understandable API
- The most important features are noted in the picture and the corresponding table below:

![screenshot of created preferences dialog with features](docs/images/preferencesFX_in_use_border.png)

Nr. | Feature | Description
--- | ------- | -----------
1 | `Search / Filter` | Filters all categories for a given String. Enables searching for a Setting, Group or Category by name.
2 | `TreeView` | Shows all categories in a hierarchical structure
3 | `Breadcrumb Bar` | Shows the user the previous categories in the hierarchy to the currently displayed category and allows the user to navigate back.
4 | `Undo / Redo Buttons` | Allows the user a stepwise undo and redo possibility of his last changes.
5 | `Various pre-defined setting types` | e.g. Integer, Double, Boolean, String, Lists, Objects
6 | `close/cancel buttons` | The close button just closes the window and leaves the preferences as they are. The cancel button discards all changes which are made during the time the dialog was last opened.
- | `Instant persistance` | Any changes to the application are saved instantly.

## Documentation
This project uses the `asciidoctor` plugin to generate the necessary documentation. Run the following *maven* task:
```Maven
process-resources
```
Afterwards, you will find the documentation in the `target/generated-docs/` subdirectory.

## Structure
A preferences dialog can contain multiple `Categories`.
Each `Category` contains one to multiple `Groups`
Each `Group` contains one to multiple `Settings`

For better illustration, the basic concept of writing a preferences dialog is shown below:
```Java
PreferencesFx preferencesFx =
    PreferencesFx.of(SaveClass.class,
        Category.of("Category Title",
            Group.of("Group Title",
                Setting.of("Setting Title", new Property())
            )
        )
    );
```
Notes:
- It is also possible to omit the `Group` and declare all settings in a `Category` directly. However, in this case all settings will simply be displayed one after another without grouping. If you want more control, use `Group`.
- A `Group` can also be defined without a title. In this case, the individual groups are displayed with more space in between them, to ensure they can be differentiated.
- A `Category` can also take a graphic node to be used as an icon as the second argument, e.g. `Category.of("Category Title", new ImageView(new Image("file:icon.png")),`

## Demos
We created several demos to visualize the capabilities of PreferencesFX.
Simply launch `preferencesfx-demo/src/com/dlsc/preferencesfx/AppStarter.java` and look into the different Tabs.

The following demos are available:

Import | Description
------ | -----------
`Standard` | The standard demo with a few settings and fully working bindings.
`Internationalized` | Shows how to define preference dialogs in multiple languages, using internationalization.
`OneCategory` | Shows the behavior of the API when only one category is used: The Breadcrumb Bar and TreeView will be omitted from the GUI.
`Extended` | A demo, populated with lots of categories, groups and settings without any bindings. Designed to show usage in a big project.

## Defining a preferences dialog
Creating a preferences dialog is as simple as calling `PreferencesFx.of()`.

```Java
StringProperty stringProperty = new SimpleStringProperty("String");
BooleanProperty booleanProperty = new SimpleBooleanProperty(true);
IntegerProperty integerProperty = new SimpleIntegerProperty(12);
DoubleProperty doubleProperty = new SimpleDoubleProperty(6.5);

PreferencesFx preferencesFx =
    PreferencesFx.of(AppStarter.class, // Save class (will be used to reference saved values of Settings to)
        Category.of("Category title 1",
            Setting.of("Setting title 1", stringProperty), // creates a group automatically
            Setting.of("Setting title 2", booleanProperty) // which contains both settings
        ),
        Category.of("Category title 2")
            .expand()                                       // Expand the parent category in the tree-view
            .subCategories( // adds a subcategory to "Category title 2"
                Category.of("Category title 3",
                    Group.of("Group title 1",
                        Setting.of("Setting title 3", integerProperty)
                    ),
                    Group.of( // group without title
                        Setting.of("Setting title 3", doubleProperty)
                    )
                )
            )
    );
```

This code snippet results in the following preferences window, containing three categories:

![result](docs/images/example_preferences.png)

To create a `Setting`, you only need to define a title and a `Property`. `PreferencesFX` does the rest.
You can then integrate this `Property` in your application. Changes of values in the preferences dialog will be persisted instantly, however it's up to you to decide whether you want to persist them instantly in your application as well.

#### Required arguments
You have a lot of options to influence the behavior and layout of the preferences dialog.
The following parameters are the absolute minimum, needed for the proper functioning of `PreferencesFX`:

Parameter | Description
------ | -----------
`AppStarter.class` | In the constructor of `PreferencesFx` a `saveClass` is required. This class is saved as a key for the saved setting values. Further information is available in the javadoc.
`Category description` | Each `Category` must have a description. This is required to display its description in the `TreeView`.
`Setting description` | Each `Setting` must have a description. It will be displayed on the left of the control, which is used to manipulate the respective `Setting`.

Note: The value of the each `Setting` is stored using the [Java Preferences API](https://docs.oracle.com/javase/8/docs/api/java/util/prefs/Preferences.html) by default.
For testing purposes, to clear the saved preferences of the demo, run the method in the class:
```
preferencesfx-demo/src/test/java/PreferencesStorageReset.java
```

#### Optional arguments
The following parameters are optionally available to further configure the dialog created by `PreferencesFX`:

Method | Class | Description
------ | ----- | -----------
`.subCategories` | `Category` | Subcategories allow a `Category` to have additional subcategories as children. Those are also displayed in the tree.
`.expand` | `Category` | Allows to specify if the `Category` should be expanded in the Tree-View by default.
`.description` | `Group` | If you decide not to add the description of a group in the constructor, you can still add it after the creation of the group.
`.validate` | `Setting` | Allows to add a [Validator](http://dlsc.com/wp-content/html/formsfx/apidocs/com/dlsc/formsfx/model/validators/Validator.html) to a setting, to set constraints to the values that can be entered.
`.persistApplicationState` | `PreferencesFx` | Defines if the Preferences API should save the application states. This includes the state persistence of the dialog window, as well as the values of each Setting.
`.persistWindowState` | `PreferencesFx` | Defines whether the state of the dialog window (position, size, last selected Category) should be persisted or not. Defaults to false.
`.saveSettings` | `PreferencesFx` | Defines whether the changed settings in the Preferences window should be saved or not. Defaults to true.
`.debugHistoryMode` | `PreferencesFx` | Makes it possible to enable or disable the keycombination to open a debug view of the list of all actions in the history (undo / redo). Pressing Ctrl + Shift + H (Windows) or CMD + Shift + H (Mac) opens a dialog with the undo / redo history, shown in a table. Defaults to false.
`.buttonsVisibility` | `PreferencesFx` | Sets the visibility of the cancel and close buttons in the `PreferencesFxDialog`. Defaults to true.
`.instantPersistent` | `PreferencesFx` | If set to true, it will instantly apply any changes that are being made in the `PreferencesFxDialog`. If set to false, it will only apply changes when the `Save` / `Apply` / `OK` button is pressed. Due to a limitation in FormsFX, undo / redo cannot be used with instant persistence switched off! Defaults to true.
`.i18n` | `PreferencesFx` | Sets the translation service of the preferences dialog for internationalization.
`.dialogTitle` | `PreferencesFx` | Allows to specify a custom dialog title.
`.dialogIcon` | `PreferencesFx` | Allows to specify a custom dialog icon.

#### Setting types
The following table shows how to create `Settings` using the predefined controls and how they look like:

        Syntax
        Outcome

// Integer
IntegerProperty brightness = new SimpleIntegerProperty(50);
Setting.of("Brightness", brightness);

// Integer Range
IntegerProperty fontSize = new SimpleIntegerProperty(12);
Setting.of("Font Size", fontSize, 6, 36);

// Double
DoubleProperty scaling = new SimpleDoubleProperty(1);
Setting.of("Scaling", scaling);

// Double Range
DoubleProperty lineSpacing = new SimpleDoubleProperty(1.5);
Setting.of("Line Spacing", lineSpacing, 0, 3, 1);

// Boolean
BooleanProperty nightMode = new SimpleBooleanProperty(true);
Setting.of("Night Mode", nightMode);

// String
StringProperty welcomeText = new SimpleStringProperty("Hello World");
Setting.of("Welcome Text", welcomeText);

// Combobox, Single Selection, with ObservableList
ObservableList<String> resolutionItems = FXCollections.observableArrayList(Arrays.asList(
  "1024x768", "1280x1024", "1440x900", "1920x1080")
);
ObjectProperty<String> resolutionSelection = new SimpleObjectProperty<>("1024x768");
Setting.of("Resolution", resolutionItems, resolutionSelection);

// Combobox, Single Selection, with ListProperty
ListProperty<String> orientationItems = new SimpleListProperty<>(
  FXCollections.observableArrayList(Arrays.asList("Vertical", "Horizontal"))
);
ObjectProperty<String> orientationSelection = new SimpleObjectProperty<>("Vertical");
Setting.of("Orientation", orientationItems, orientationSelection);

// Combobox, Multi Selection
ListProperty<String> favoritesItems = new SimpleListProperty<>(
  FXCollections.observableArrayList(Arrays.asList(
      "eMovie", "Eboda Phot-O-Shop", "Mikesoft Text",
      "Mikesoft Numbers", "Mikesoft Present", "IntelliG"
      )
  )
);
ListProperty<String> favoritesSelection = new SimpleListProperty<>(
  FXCollections.observableArrayList(Arrays.asList(
      "Eboda Phot-O-Shop", "Mikesoft Text"))
);
Setting.of("Favorites", favoritesItems, favoritesSelection);

// Color
ObjectProperty<Color> colorProperty = new SimpleObjectProperty<>(Color.PAPAYAWHIP);
Setting.of("Font Color", colorProperty);

// FileChooser / DirectoryChooser
ObjectProperty<File> fileProperty = new SimpleObjectProperty<>();
Setting.of("File", fileProperty, false);     // FileChooser
Setting.of("Directory", fileProperty, true); // DirectoryChooser

// Custom Control
IntegerProperty customControlProperty = new SimpleIntegerProperty(42);
IntegerField customControl = Field.ofIntegerType(customControlProperty).render(
  new IntegerSliderControl(0, 42));
Setting.of("Favorite Number", customControl, customControlProperty);

// Static node
Node staticNode = new Label("This can be your very own placeholder!");
Setting.of(staticNode);

Note: By default, PreferencesFX saves the settings under a key which consists of the breadcrumb to the setting, delimited by `#` signs. If you want to define your own key to be used for saving, use the method `setting.customKey("key")`

## Localisation
All displayed strings can be internationalized. You can use [resource bundles](https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html) to define different locales and use the key instead of the descriptions. Adding i18n support is simply done by calling the method `.i18n()` at the end when creating the preferences:

```java
private ResourceBundle rbDE = ResourceBundle.getBundle("demo.demo-locale", new Locale("de", "CH"));
private ResourceBundle rbEN = ResourceBundle.getBundle("demo.demo-locale", new Locale("en", "UK"));

private ResourceBundleService rbs = new ResourceBundleService(rbEN);

PreferencesFx.of(…)
             .i18n(rbs);
```

## Validation
It is possible to optionally add a [Validator](http://dlsc.com/wp-content/html/formsfx/apidocs/com/dlsc/formsfx/model/validators/Validator.html) to settings. PreferencesFX uses the [implementation of FormsFX for the validation](http://dlsc.com/wp-content/html/formsfx/apidocs/com/dlsc/formsfx/model/validators/Validator.html). FormsFX offers a wide range of pre-defined validators, but also includes support for custom validators using the `CustomValidator.forPredicate()` method. The following table lists the supported validators:

| Validator | Description |
| --------- | ----------- |
| `CustomValidator` | Defines a predicate that returns whether the field is valid or not. |
| `DoubleRangeValidator` | Defines a number range which is considered valid. This range can be limited in either one direction or in both directions. |
| `IntegerRangeValidator` | Defines a number range which is considered valid. This range can be limited in either one direction or in both directions. |
| `RegexValidator` | Valiates text against a regular expression. This validator offers pre-defined expressions for common use cases, such as email addresses.
| `SelectionLengthValidator` | Defines a length interval which is considered valid. This range can be limited in either one direction or in both directions. |
| `StringLengthValidator` | Defines a length interval which is considered valid. This range can be limited in either one direction or in both directions. |

## Visibility

PreferencesFX supports setting an optional visibility condition for Categories, Groups and Settings

* condition could be defined as a lambda-expression
* condition will be re-evaluated whenever any Setting changes

```java
Category.of("General",
  Group.of("Display",
    Setting.of("Brightness", brightness),
    Setting.of("Night mode", nightMode, VisibilityProperty.of(brightness, (newValue) -> newValue.intValue() > 50)),
    Setting.of("Scale", scale, VisibilityProperty.of(nightMode),
    Setting.of("Is production category visible", productionVisibility)
  )
),
Category.of("Production", VisibilityProperty.of(productionVisibility),
  Group.of("Display",
      Setting.of("Port", salary, VisibilityProperty.of(nightMode)
  )
),
Category.of("View",
  Group.of("Display",
    Setting.of("Salary", salary, VisibilityProperty.of(nightMode)
  ),
  Group.of("Bonuses", VisibilityProperty.of(salary, (newValue) -> newValue.intValue() > 10),
    Setting.of("Bonus", bonus)
  )
)
```

## Team
- Marco Sanfratello
  - marco.sanfratello@students.fhnw.ch
  - Skype: sanfratello.m@gmail.com
  - GitHub: Genron

- François Martin
  - francois.martin@students.fhnw.ch
  - Skype: francoisamimartin
  - GitHub: martinfrancois

- Dirk Lemmermann
  - dlemmermann@gmail.com
  - Skype: dlemmermann
  - GitHub: dlemmermann

- Dieter Holz
  - dieter.holz@fhnw.ch
  - Skype: dieter.holz.canoo.com
  - GitHub: DieterHolz

## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX?ref=badge_large)


# jMonkeyEngine Software Development Kit (SDK) [![Build Status](https://github.com/jMonkeyEngine/sdk/actions/workflows/gradle.yml/badge.svg)](../../actions)

Welcome to the repository of the jMonkeyEngine Software Development Kit (SDK).
This SDK simplifies developing 3D Applications with the jMonkeyEngine (jME). It contains everything ever needed to develop a full application.

Our SDK (or jmonkeyplatform) is based on the Netbeans IDE but includes additional features like:
-  A Scene Editor (SceneExplorer: Preview your scene, adjust all positions, add `Controls` and `AppStates` (WYSIWYG) and then just save the scene)

-  A Material Editor

-  A Filter Editor (combine multiple filters and just load them in-game)

-  Bundled JDK for each platform (so you don't need to install java first)

It is important to know that the SDK is not coupled with the engine itself, so if you have issues which are unrelated to the IDE, report them [here](https://github.com/jMonkeyEngine/jmonkeyengine).
This however also means, that the SDK can have a different pace than the engine but you can nonetheless work on a different engine version than the one which is bundled. For your own projects, you should consider using Gradle build system which also gives you flexibility on choosing any jMonkeyEngine version. More on this later.

## Getting Started / Downloading the SDK
Just have a look at our [releases](https://github.com/jMonkeyEngine/sdk/releases) section.
There you can download the version you desire. The SDK will generally follow the convention that it's version number is lined up with the matching engine version
plus some suffixes for different SDK releases on the same engine version.

There are multiple files from which you can choose:
You can take the platform agnostic `jmonkeyplatform.zip` which contains the full SDK able to be run on "any" (64-bit) platform (Windows, Mac OS, Linux) however it lacks the JDK.
Thus the prefered download is `jmonkeyplatform-windows-x64.exe` which essentially __is__ `jmonkeyplatform.zip` and the correct version of the JDK.

After the SDK is up and running. A good starting point is to look at the jME examples. Under *File | New project | JME3 Tests* you can create a new project, populated with the jME build in examples. You can freely mess around with these and try out stuff. Your changes can always be reverted by simply creating a new *JME3 Tests* project. Once you are all comfortable and ready to embark on your own exciting journey, *File | New project | Basic game (with Gradle)* is the recommended starting point.

## Building the SDK
Building the SDK is an easy process basically, but it depends on what kind of distribution you want to build. Currently the SDK requires __JDK 21__ to build.
You also have to know that the build process changes from time to time, so have a look at the `.github/workflows/gradle.yml` file, or related, you will see how we build our releases then.

Technically the gradle task `buildSdk` is the main task which builds the sdk (Invoking `./gradlew buildSdk` or `gradlew.bat buildSdk` on Windows).

__If you just want to run the SDK on your machine:__
    call `./gradlew run` (`gradlew.bat run`), which internally calls `buildSdk` and then uses `ant` to run the SDK.

__If you want to build the platform agnostic zip:__
    call `./gradlew buildSdk` and then you have the file in `dist/jmonkeyplatform.zip`

__If you want to build the platform installers (like we do):__
    call `./download-jdks.sh`, `./gradlew buildSdk` and then `ant build-installers`
    You have to install ant for this to work (for Linux consult the internet, for Mac OS look into homebrew).
    Note that this might take a long time, because a huge amount of data is compressed and such.

__If you want to build the platform installers (On Windows -> without having ant):__
    See above. You can bypass ant by declaring a gradle task, just like it has been done for run. There, the gradle included ant will be used).
    Alternatively you can launch netbeans in `netbeans/`, open the SDK as Netbeans Project Collection and select __package as__:
    ![Package as...](http://i.imgur.com/5V2uBHf.png).
    Note that you still have to download and unpack the JDKs somehow, which is a cumbersome process, which is why it is discouraged to
    build the installers on Windows (Linux and Mac OS are supported).

__If you want to debug the SDK inside an IDE:__
    See above. You want to open the SDK as Netbeans Project from within Netbeans (you can use the nb in `netbeans/`) and you can then treat it as regular project with the difference that there are several subproject.

A note about the `netbeans/` folder: To save bandwidth `buildSdk` downloads netbeans once to said folder and uses it over and over again. Even when the download URL is changed (i.e. when you update the Netbeans version), you have to delete the netbeans folder and remove it from any cache so it can be reloaded.

## Developing/Contributing
First of all, I suggest you to take a look at [docs/](https://github.com/jMonkeyEngine/sdk/tree/master/docs). Those docs are a loose collection of things I came across during development, but they prevent you from re-doing the same experiences.
Other than that, `Netbeans Platform` is your google keyword for any NB related issues.
Basically the only tricky thing is how we handle custom entries in the SceneExplorer. This is called the Netbeans Nodes API and is somewhat unintuitive.
Just take a look at the `Motion Event Pull Request`, which should've been added around `March 2016`, there you can see what was needed to add MotionEvents to the SDK.

Other than that, we are more than happy to help, even if your addition is incomplete. Make sure you use the Netbeans formatting, obvious variable naming and commented and especially documented code, though.
If you think you've encountered a bug in the SDK, please open an issue to let the developers know or post [on the hub](https://hub.jmonkeyengine.org) using the `Troubleshooting | jmonkeyplatform` category.


[![TruffleSqueak][ts_logo]](#)

[![Latest Release][ts_latest_badge]][ts_latest] [![Slack][graalvm_slack_badge]][graalvm_slack] [![Twitter][ts_twitter_badge]][ts_twitter] [![Build Status][ts_gh_action_badge]][ts_gh_action] [![Codacy][codacy_grade]][codacy] [![Coverage][codacy_coverage]][codacy] [![License][ts_license_badge]][ts_license]

A [Squeak/Smalltalk][squeak] VM and Polyglot Programming Environment for the [GraalVM][graalvm].

## Getting Started

1. Download and extract the latest [TruffleSqueak standalone][ts_latest] for your platform.
2. Run the following in a terminal to start TruffleSqueak:

    ```bash
    bin/trufflesqueak [<option>...] [<imageName> [<argument>...]]
    ```

## Demos

TruffleSqueak: Polyglot Notebooks

TruffleSqueak: Workspace, Inspector, and Explorer

TruffleSqueak: Live Plots with ggplot2

TruffleSqueak: Polyglot User Interfaces

TruffleSqueak: Polyglot Code Editor

TruffleSqueak: Polyglot Code Finder

TruffleSqueak vs. OpenSmalltalkVM: Bouncing Atoms

TruffleSqueak: CallTargetBrowser

TruffleSqueak: Polyglot Workspace

## Talks

Some Smalltalk with Fabio Niephaus and Thomas Würthinger
(~1h10min, GraalVM Stream on Twitch, 2021)

Exploiting Dynamic Run-time Data with TruffleSqueak
(~30min, Virtual Machine Meetup, 2021)

Polyglot Programming with TruffleSqueak and GraalVM
(~21min, HPI Symposium at SAP, 2021)

Polyglot Notebooks with Squeak/Smalltalk on the GraalVM
(~28min, ESUG 2019)

## Community Support

If you have a question, need some help, or want to discuss a new feature, feel
free to open an [issue][ts_issues] or join the `#trufflesqueak` channel on the
[GraalVM Slack][graalvm_slack].

## Documentation

Documentation is available in [`docs/`][ts_docs].

## Development

Active development is done in the [`main` branch][ts_main].
Please feel free to open a [pull request][pull_request] if you'd like to
contribute a bug-fix, documentation, or a new feature.
For more information, for example on how to build TruffleSqueak from source or
set up a development environment, please refer to the
[development.md][ts_dev_docs].

## Contributing

Please [report any issues here on GitHub][ts_issues] and open
[pull requests][pull_request] if you'd like to contribute code or documentation.

## Publications

*To cite this work, please use [the GraalSqueak paper presented at MPLR'19][mplr19_paper].*

### 2020
- Fabio Niephaus, Patrick Rein, Jakob Edding, Jonas Hering, Bastian König, Kolya
Opahle, Nico Scordialo, and Robert Hirschfeld. *Example-based Live Programming
for Everyone: Building Language-agnostic Tools for Live Programming With LSP and
GraalVM*. In Proceedings of [the ACM Symposium for New Ideas, New Paradigms, and
Reflections on Everything to do with Programming and Software (Onward!)
2020][onward20], co-located with the Conference on Object-oriented Programming,
Systems, Languages, and Applications (OOPSLA), pages 108-124, Chicago, United
States, November 17-18, 2020, ACM DL.
[![doi][onward20_doi]][onward20_paper] [![Preprint][preprint]][onward20_pdf]
- Jan Ehmueller, Alexander Riese, Hendrik Tjabben, Fabio Niephaus, and Robert
Hirschfeld. *Polyglot Code Finder*. In Proceedings of [the Programming
Experience 2020 (PX/20) Workshop][px20], companion volume to International
Conference on the Art, Science, and Engineering of Programming (‹Programming›),
co-located with the International Conference on the Art, Science, and Engineering
of Programming (‹Programming›), 6 pages, Genova, Italy, April 1, 2019, ACM DL.
[![doi][px20_doi]][px20_paper] [![Preprint][preprint]][px20_pdf]
- Alexander Riese, Fabio Niephaus, Tim Felgentreff, and Robert Hirschfeld.
*User-defined Interface Mappings for the GraalVM*. In Proceedings of [the
Interconnecting Code Workshop (ICW) 2020][icw20], companion volume to the
International Conference on the Art, Science, and Engineering of Programming
(‹Programming›), co-located with the International Conference on the Art,
Science, and Engineering of Programming (‹Programming›), pages 19-22, Porto,
Portugal, March 23, 2020, ACM DL.
[![doi][icw20_doi]][icw20_paper] [![Preprint][preprint]][icw20_pdf]

### 2019
- Fabio Niephaus. [*Smalltalk with the GraalVM*][javaadvent19]. In the
  JVM Programming Advent Calendar, December 7, 2019.
- Fabio Niephaus, Tim Felgentreff, and Robert Hirschfeld. *GraalSqueak: Toward a
Smalltalk-based Tooling Platform for Polyglot Programming*. In Proceedings of
[the International Conference on Managed Programming Languages and Runtimes
(MPLR) 2019][mplr19], co-located with the Conference on Object-oriented
Programming, Systems, Languages, and Applications (OOPSLA), 12 pages, Athens,
Greece, October 21, 2019, ACM DL.
[![doi][mplr19_doi]][mplr19_paper] [![Preprint][preprint]][mplr19_pdf]
- Daniel Stolpe, Tim Felgentreff, Christian Humer, Fabio Niephaus, and Robert
Hirschfeld. *Language-independent Development Environment Support for Dynamic
Runtimes*. In Proceedings of [the Dynamic Languages Symposium (DLS)
2019][dls19], co-located with the Conference on Object-oriented Programming,
Systems, Languages, and Applications (OOPSLA), 11 pages, Athens, Greece,
October 20, 2019, ACM DL.
[![doi][dls19_doi]][dls19_paper] [![Preprint][preprint]][dls19_pdf]
- Fabio Niephaus. [*HPI Polyglot Programming Seminar*][pp19_post]. In the
[GraalVM Blog][graalvm_blog], October 11, 2019.
- Fabio Niephaus, Tim Felgentreff, Tobias Pape, and Robert Hirschfeld.
*Efficient Implementation of Smalltalk Activation Records in Language
Implementation Frameworks*. In Proceedings of [the Workshop on Modern Language
Runtimes, Ecosystems, and VMs (MoreVMs) 2019][morevms19], companion volume to
International Conference on the Art, Science, and Engineering of Programming
(‹Programming›), co-located with the International Conference on the Art,
Science, and Engineering of Programming (‹Programming›), 3 pages, Genova, Italy,
April 1, 2019, ACM DL.
[![doi][morevms19_doi]][morevms19_paper] [![Preprint][preprint]][morevms19_pdf]
- Tobias Pape, Tim Felgentreff, Fabio Niephaus, and Robert Hirschfeld. *Let them
fail: towards VM built-in behavior that falls back to the program*. In
Proceedings of [the Salon des Refusés (SDR) 2019 Workshop][sdr19], companion
volume to International Conference on the Art, Science, and Engineering of
Programming (‹Programming›), co-located with the International Conference on the
Art, Science, and Engineering of Programming (‹Programming›), 7 pages, Genova,
Italy, April 1, 2019, ACM DL.
[![doi][sdr19_doi]][sdr19_paper] [![Preprint][preprint]][sdr19_pdf]
- Fabio Niephaus, Eva Krebs, Christian Flach, Jens Lincke, and Robert Hirschfeld.
*PolyJuS: A Squeak/Smalltalk-based Polyglot Notebook System for the GraalVM*. In
Proceedings of [the Programming Experience 2019 (PX/19) Workshop][px19],
companion volume to International Conference on the Art, Science, and
Engineering of Programming (‹Programming›), co-located with the International
Conference on the Art, Science, and Engineering of Programming (‹Programming›),
6 pages, Genova, Italy, April 1, 2019, ACM DL.
[![doi][px19_doi]][px19_paper] [![Preprint][preprint]][px19_pdf]

### 2018
- Fabio Niephaus, Tim Felgentreff, and Robert Hirschfeld. *GraalSqueak: A Fast
Smalltalk Bytecode Interpreter Written in an AST Interpreter Framework.* In
Proceedings of [the Workshop on Implementation, Compilation, Optimization of
Object-Oriented Languages, Programs, and Systems (ICOOOLPS) 2018][icooolps18],
co-located with the European Conference on Object-oriented Programming (ECOOP),
Amsterdam, Netherlands, July 17, 2018, ACM DL.
[![doi][icooolps18_doi]][icooolps18_paper] [![Preprint][preprint]][icooolps18_pdf]

## License

TruffleSqueak is released under the [MIT license][ts_license].

[codacy]: https://app.codacy.com/gh/hpi-swa/trufflesqueak/dashboard
[codacy_coverage]: https://img.shields.io/codacy/coverage/104b3300600346789d604fd269219efe.svg
[codacy_grade]: https://img.shields.io/codacy/grade/104b3300600346789d604fd269219efe.svg
[dls19]: https://conf.researchr.org/home/dls-2019
[dls19_doi]: https://img.shields.io/badge/doi-10.1145/3359619.3359746-blue.svg
[dls19_paper]: https://doi.org/10.1145/3359619.3359746
[dls19_pdf]: https://www.hpi.uni-potsdam.de/hirschfeld/publications/media/StolpeFelgentreffHumerNiephausHirschfeld_2019_LanguageIndependentDevelopmentEnvironmentSupportForDynamicRuntimes_AcmDL.pdf
[eclipse_cs]: https://checkstyle.org/eclipse-cs/
[eclipse_downloads]: https://www.eclipse.org/downloads/
[github_releases]: https://help.github.com/en/github/administering-a-repository/about-releases
[graal]: https://github.com/oracle/graal
[graalvm]: https://www.graalvm.org/
[graalvm_blog]: https://medium.com/graalvm
[graalvm_download]: https://www.graalvm.org/downloads/
[graalvm_updater]: https://www.graalvm.org/docs/reference-manual/install-components/
[graalvm_slack]: https://www.graalvm.org/slack-invitation/
[graalvm_slack_badge]: https://img.shields.io/badge/slack-%23trufflesqueak-active
[icooolps18]: https://2018.ecoop.org/event/icooolps-2018-papers-graalsqueak-a-fast-smalltalk-bytecode-interpreter-written-in-an-ast-interpreter-framework
[icooolps18_doi]: https://img.shields.io/badge/doi-10.1145/3242947.3242948-blue.svg
[icooolps18_paper]: https://doi.org/10.1145/3242947.3242948
[icooolps18_pdf]: https://fniephaus.com/2018/icooolps18-graalsqueak.pdf
[icw20]: https://2020.programming-conference.org/home/icw-2020
[icw20_doi]: https://img.shields.io/badge/doi-10.1145/3397537.3399577-blue.svg
[icw20_paper]: https://dl.acm.org/doi/10.1145/3397537.3399577
[icw20_pdf]: https://www.hpi.uni-potsdam.de/hirschfeld/publications/media/RieseNiephausFelgentreffHirschfeld_2020_UserDefinedInterfaceMappingsForTheGraalVM_AcmDL.pdf
[javaadvent19]: https://www.javaadvent.com/2019/12/smalltalk-with-the-graalvm.html
[morevms19]: https://2019.programming-conference.org/track/MoreVMs-2019
[morevms19_doi]: https://img.shields.io/badge/doi-10.1145/3328433.3328440-blue.svg
[morevms19_paper]: https://doi.org/10.1145/3328433.3328440
[morevms19_pdf]: https://fniephaus.com/2019/morevms19-efficient-activation-records.pdf
[mplr19]: https://conf.researchr.org/home/mplr-2019
[mplr19_doi]: https://img.shields.io/badge/doi-10.1145/3357390.3361024-blue.svg
[mplr19_paper]: https://doi.org/10.1145/3357390.3361024
[mplr19_pdf]: https://fniephaus.com/2019/mplr19-graalsqueak.pdf
[mx]: https://github.com/graalvm/mx
[onward20]: https://2020.splashcon.org/track/splash-2020-Onward-papers
[onward20_doi]: https://img.shields.io/badge/doi-10.1145/3426428.3426919-blue.svg
[onward20_paper]: https://doi.org/10.1145/3426428.3426919
[onward20_pdf]: https://fniephaus.com/2020/onward20-live-programming.pdf
[pp19_post]: https://medium.com/p/3fd06ffa59d2/
[preprint]: https://img.shields.io/badge/preprint-download-blue.svg
[pull_request]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request
[px19]: https://2019.programming-conference.org/track/px-2019-papers
[px19_doi]: https://img.shields.io/badge/doi-10.1145/3328433.3328434-blue.svg
[px19_paper]: https://doi.org/10.1145/3328433.3328434
[px19_pdf]: https://fniephaus.com/2019/px19-polyglot-notebooks.pdf
[px20]: https://2020.programming-conference.org/track/px-2020-papers
[px20_doi]: https://img.shields.io/badge/doi-10.1145/3397537.3397559-blue.svg
[px20_paper]: https://doi.org/10.1145/3397537.3397559
[px20_pdf]: https://www.hpi.uni-potsdam.de/hirschfeld/publications/media/EhmuellerRieseTjabbenNiephausHirschfeld_2020_PolyglotCodeFinder_AcmDL.pdf
[sdr19]: https://2019.programming-conference.org/track/sdr-2019-papers
[sdr19_doi]: https://img.shields.io/badge/doi-10.1145/3328433.3338056-blue.svg
[sdr19_paper]: https://doi.org/10.1145/3328433.3338056
[sdr19_pdf]: https://www.hpi.uni-potsdam.de/hirschfeld/publications/media/PapeFelgentreffNiephausHirschfeld_2019_LetThemFailTowardsVmBuiltInBehaviorThatFallsBackToTheProgram_AcmDL.pdf
[squeak]: https://squeak.org
[squeak_downloads]: https://squeak.org/downloads/
[ts_docs]: https://github.com/hpi-swa/trufflesqueak/tree/main/docs
[ts_dev_docs]: https://github.com/hpi-swa/trufflesqueak/blob/main/docs/development.md
[ts_gh_action]: https://github.com/hpi-swa/trufflesqueak/actions
[ts_gh_action_badge]: https://img.shields.io/github/actions/workflow/status/hpi-swa/trufflesqueak/ci.yml?branch=main
[ts_issues]: https://github.com/hpi-swa/trufflesqueak/issues/new
[ts_latest]: https://github.com/hpi-swa/trufflesqueak/releases/latest
[ts_latest_badge]: https://img.shields.io/github/v/release/hpi-swa/trufflesqueak
[ts_launcher]: https://github.com/hpi-swa/trufflesqueak/blob/main/src/de.hpi.swa.trufflesqueak.launcher/src/de/hpi/swa/trufflesqueak/launcher/TruffleSqueakLauncher.java
[ts_license]: https://github.com/hpi-swa/trufflesqueak/blob/main/LICENSE
[ts_license_badge]: https://img.shields.io/github/license/hpi-swa/trufflesqueak
[ts_logo]: https://user-images.githubusercontent.com/2368856/83736775-67f72280-a652-11ea-9785-35c2a688c0fc.png
[ts_main]: https://github.com/hpi-swa/trufflesqueak/tree/main
[ts_twitter]: https://twitter.com/TruffleSqueak
[ts_twitter_badge]: https://img.shields.io/badge/twitter-%40TruffleSqueak-active


# What is HerdDB ?

HerdDB is a **distributed Database**, data is distributed among a cluster of server **without the need of a shared storage**.

HerdDB primary language is **SQL** and clients are encouraged to use both the JDBC Driver API and the low level API.

HerdDB is **embeddable** in any Java Virtual Machine, each node will access directly to local data without the use of the network.

HerdDB replication functions are built upon **Apache ZooKeeper** and **Apache BookKeeper**.

HerdDB is internally very similar to a NoSQL database and, basically, it is a **key-value DB** with an SQL abstraction layer which enables every user to leverage existing known-how and to port existing applications.

*HerdDB has been designed for fast "writes" and for primary key read/update data access patterns.*

HerdDB supports **transactions** and "committed read" isolation level

HerdDB uses **Apache Calcite** as SQL parser and SQL Planner

## Basic concepts

Data, as in any **SQL database**, is organized in tables and tables are grouped inside **Tablespaces**.

A Tablespace is the fundamental architectural brick upon which the replication is built and some DB features are available only among tables of the same tablespace:
- transactions may span only tables of the same tablespace
- subqueries may span only tables of the same tablespace

Replication is configured at tablespace level, so for each tablespace only one server is designed to be the 'leader' (manager) at a specific point in time, then you may configure a set of 'replicas'.
The system automatically replicates data between replicas and handles server failures transparently.

## Overview

[Introducing HerdDB - Pulsar Summit 2020](https://www.youtube.com/watch?v=K7xQZ9V9Ml0) - Enrico Olivelli

[![Introducing HerdDB - Youtube link](https://img.youtube.com/vi/K7xQZ9V9Ml0/0.jpg)](https://www.youtube.com/watch?v=K7xQZ9V9Ml0)

[Other talks and deep dives](https://github.com/diennea/herddb/wiki/Talks-&-Publications)

## Getting Involved

Join the [mailing list](http://lists.herddb.org/mailman/listinfo)

## License

HerdDB is under [Apache 2 license](http://www.apache.org/licenses/LICENSE-2.0.html).


[![Build](https://github.com/paulcwarren/spring-content/workflows/Branch%20Build/badge.svg?branch=1.2.x)](https://github.com/paulcwarren/spring-content/actions?query=workflow%3A%22Branch+Build%22)
[![codecov](https://codecov.io/gh/paulcwarren/spring-content/branch/1.1.x/graph/badge.svg?token=Q7uPi3zXTB)](https://codecov.io/gh/paulcwarren/spring-content)
[![Join the chat at https://gitter.im/spring-content/Lobby](https://badges.gitter.im/spring-content/Lobby.svg)](https://gitter.im/spring-content/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# Spring Content

Cloud-Native Content Services for Spring.

Spring Content provides modules for managing content in JPA, MongoDB's GridFS, S3 or Filesystem storage.  When combined with Spring Data/REST it allows content to be associated with Spring Data Entities.  The Solr module provides an integration with Apache Solr for fulltext indexing and search capabilities.  The Renditions module provides a pluggable renditions framework and several out-of-the-box renderers that can render stored content in several different formats.

## Getting help
Having trouble with Spring Content? We'd like to help!

* Check the [reference documentation](https://paulcwarren.github.io/spring-content/).
* Learn the Spring basics -- Spring Content builds on many other Spring projects, check
  the [spring.io](https://spring.io) web-site for a wealth of reference documentation. If
  you are just starting out with Spring, try one of the [spring.io guides](https://spring.io/guides).
* If you are upgrading, read the [release notes](https://github.com/paulcwarren/spring-content/releases).
  for upgrade instructions and "new and noteworthy" features.
* Ask a question - we monitor our [Gitter room](https://gitter.im/spring-content/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) for questions.
* Report bugs with Spring Content at [github.com/paulcwarren/spring-content/issues](https://github.com/paulcwarren/spring-content/issues).

## Reporting Issues
Spring Content uses GitHub's integrated issue tracking system to record bugs and feature
requests. If you want to raise an issue, please follow the recommendations below:

* Before you log a bug, please [search the issue tracker](https://github.com/paulcwarren/spring-content/issues)
  to see if someone has already reported the problem.
* If the issue doesn't already exist, [create a new issue](https://github.com/paulcwarren/spring-content/issues/new).
* Please provide as much information as possible with the issue report, we like to know
  the version of Spring Content that you are using, as well as your Operating System and
  JVM version.
* If you need to paste code, or include a stack trace use Markdown `` ``` `` escapes
  before and after your text.
* If possible try to create a test-case or project that replicates the issue.

## Building from Source
You don't need to build from source to use Spring Content (binaries in
https://repo.maven.apache.org/maven2/), but if you want to try out the latest and
greatest, Spring Content can be easily built with the
[maven wrapper](https://github.com/takari/maven-wrapper). You also need JDK 1.8.

```
$ ./mvnw clean install
```

If you want to build with the regular `mvn` command, you will need
[Maven v3.2.1 or above](https://maven.apache.org/run-maven/index.html).

_Also see [CONTRIBUTING.md](CONTRIBUTING.md) if you wish to submit pull requests,
and in particular please fill out the [Contributor's License Agreement](https://cla-assistant.io/paulcwarren/spring-content) before your first change, however trivial._

#### Building reference documentation

The reference documentation can be included in the build by specifying the `docs` profile.

```
$ ./mvnw -P docs clean install
```

TIP: The generated documentation is available from `spring-content/target/generated-docs/refs/dev/`

## Guides
The [https://paulcwarren.github.io/spring-content/](https://paulcwarren.github.io/spring-content/) site contains several guides that show how to use Spring
Content step-by-step:

* [Getting Started with Spring Content](https://paulcwarren.github.io/spring-content/spring-content-fs-docs/) is a
  very basic guide that shows you how to create a simple application, backed by a filesystem-based content store.
* [Getting Started with Spring Content REST](https://paulcwarren.github.io/spring-content/spring-content-rest-docs/) is a guide that shows you how to create a REST Content Service backed by a filesystem-based content store
  can be configured.

## License
Spring Content is Open Source software released under the
[Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html).

## Acknowledgements

* Spring Content uses YourKit.  YourKit supports open source projects with its full-featured Java Profiler.
  YourKit, LLC is the creator of YourKit Java Profiler
  and YourKit .NET Profiler,
  innovative and intelligent tools for profiling Java and .NET applications.

  [![](https://www.yourkit.com/images/yklogo.png)](https://www.yourkit.com/java/profiler/index.jsp)