eXPL Extensions

eXPL with Lightweight JPA

Expression Pattern Language can be adapted to work with data in any tabular format, including relational database tables. The extensions package, named "Classy eXPL" provides a bridge to the "Classy Data" Lightweight JPA package so minimal effort is required to work with relational databases. Also platforms with limited resources, such as Android, can utilize eXPL with JPA.

Step 1 - Download project to your PC

The Classy eXPL project is downloaded from the a public Git repository. In a command console, go to your chosen workspace location and run:

git clone https://github.com/cybersearch2/classy_eXPL.git

Upon completion, the project will be found in the "classy_eXPL" sub directory, from now referred to as the Classy eXPL "home location". There are four sub modules under the parent POM:

  • xpl-extensions, the package to extend eXPL using Classy Data
  • xpl-tutorial, the code examples for eXPL extensions reference
  • xpl-example, additional examples (currently only 1)

Step 2 - Set up Maven Settings and Classy eXPL Project

There are three major dependencies that need to be located when the project is installed by Maven:

  • Ormlite version 5.0 - Located at the Maven Central Repository, so available instantly
  • Classy Data library version 1.3.2 - Located at JCenter Maven Repository. To install the project successfully, the local Maven Settings file needs to be configured. Refer to the "SET ME UP" link on the JCenter home page.
  • eXPL Library version 2.0.1 - Also located at JCenter

Build the project and deploy artifacts to the local repository using Maven. Go to the eXPL home location and run:

mvn clean install
Classy eXPL uses Classy Data Lightweight Java Persistence API package which can be emebedded in an application for ease of installation and set up.
Download and Install Classy Data Project

To learn more about Classy Data, follow the steps at Classy Data Getting Started. Go to Portable Java Development to build the project and deploy the artifacts to the local repository *. Upon successful completion, the local repository will contain Classy Data packages and dependencies.

Note that the pom.xml in the eXPL home location has a "classy_tools.version" property which will need to be changed to match the downloaded snapshot release.

* Android is also supported. See Android.

Tutorial

The recommended approach to running the Persistence tutorial examples is to import eXPL modules "xpl-extensions" and "tutorial-extensions" into Eclipse as Maven projects. Each example can be run using "Run as Java application...". However, other IDEs such as IntelliJ IDEA can be used, or even the command line.

There are a large number of dependencies, including the parser library. When Maven is not being used to run examples, the library jars can be copied to a project "libs" folder by running the following Maven profile in the tutorial directory:

mvn initialize -P java

The jar files copied to the libs folder can then be included in the classpath for running the tutorials.