An EFX translator written in Java.

Overview

eForms Expression Language (EFX)

This project uses ANTLR: https://www.antlr.org

ANTLR grammars, see .g4 files

IDE setup

mvn clean install always do this first to ensure everything is OK outside the IDE.

Build and add "target/generated-source/antlr4" to the build path. Rebuild sources after that.

Testing

See unit tests under src/test/java/.

mvn clean install will also run the tests.

After running the unit tests with mvn test, you can generate a coverage report withmvn jacoco:report. The report is available under target/site/jacoco/, in HTML, CSV, and XML format.

Export of artifact into local m2 repo

mvn clean install copies the JAR and pom file to your local maven repository. You can then add the dependency as usual in pom.xml of your project:

    
      eu.europa.ted.eforms
      efx-toolkit-java
      0.1.0
    

Make sure to update the version number to the latest version available.

You might also like...

Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

Oct 4, 2022

Modern configuration library for distributed apps written in Java.

Overview cfg4j ("configuration for Java") is a configuration library for Java distributed apps (and more). Features: Open source Easy to use Auto-relo

Nov 23, 2022

H2 is an embeddable RDBMS written in Java.

Welcome to H2, the Java SQL database. The main features of H2 are: Very fast, open source, JDBC API Embedded and server modes; disk-based or in-memory

Jan 5, 2023

A complete 3D game development suite written purely in Java.

A complete 3D game development suite written purely in Java.

jMonkeyEngine jMonkeyEngine is a 3-D game engine for adventurous Java developers. It’s open-source, cross-platform, and cutting-edge. 3.2.4 is the lat

Dec 31, 2022

JSON to JSON transformation library written in Java.

Jolt JSON to JSON transformation library written in Java where the "specification" for the transform is itself a JSON document. Useful For Transformin

Dec 30, 2022

Datumbox is an open-source Machine Learning framework written in Java which allows the rapid development of Machine Learning and Statistical applications.

Datumbox is an open-source Machine Learning framework written in Java which allows the rapid development of Machine Learning and Statistical applications.

Datumbox Machine Learning Framework The Datumbox Machine Learning Framework is an open-source framework written in Java which allows the rapid develop

Dec 9, 2022

API gateway for REST and SOAP written in Java.

Membrane Service Proxy Reverse HTTP proxy (framework) written in Java, that can be used as an API gateway as a security proxy for HTTP based integrati

Dec 31, 2022

a pug implementation written in Java (formerly known as jade)

Attention: jade4j is now pug4j In alignment with the javascript template engine we renamed jade4j to pug4j. You will find it under https://github.com/

Oct 16, 2022

Library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine.

J8Spec J8Spec is a library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine. More details here: j8spec.github

Feb 17, 2022

Most popular Mocking framework for unit tests written in Java

Most popular Mocking framework for unit tests written in Java

Most popular mocking framework for Java Current version is 3.x Still on Mockito 1.x? See what's new in Mockito 2! Mockito 3 does not introduce any bre

Jan 9, 2023

Dex : The Data Explorer -- A data visualization tool written in Java/Groovy/JavaFX capable of powerful ETL and publishing web visualizations.

Dex : The Data Explorer -- A data visualization tool written in Java/Groovy/JavaFX capable of powerful ETL and publishing web visualizations.

Dex Dex : The data explorer is a powerful tool for data science. It is written in Groovy and Java on top of JavaFX and offers the ability to: Read in

Jan 8, 2023

a pug implementation written in Java (formerly known as jade)

Attention: jade4j is now pug4j In alignment with the javascript template engine we renamed jade4j to pug4j. You will find it under https://github.com/

Oct 16, 2022

Jetserver is a high speed nio socket based multiplayer java game server written using Netty and Mike Rettig's Jetlang.It is specifically tuned for network based multiplayer games and supports TCP and UDP network protocols.

Note New version of Jetserver is called Nadron and is in a new netty 4 branch of this same repo. JetServer is a java nio based server specifically des

Dec 14, 2022

API gateway for REST and SOAP written in Java.

API gateway for REST and SOAP written in Java.

Dec 31, 2022

OpenGrok is a fast and usable source code search and cross reference engine, written in Java

Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. OpenGrok - a wicked fast source browser OpenGrok - a wicked fast source br

Jan 8, 2023

Solutions for some common algorithm problems written in Java.

Solutions for some common algorithm problems written in Java.

Algorithms This repository contains my solution for common algorithms. I've created this repository to learn about algorithms and improve solutions to

Dec 30, 2022

Creational design patterns written in Java

Java Design Patterns Creational design patterns implementation: Singleton, Factory Method, Builder written in Java. Getting Started No additional step

Mar 7, 2022

Apache Solr is an enterprise search platform written in Java and using Apache Lucene.

Apache Solr is an enterprise search platform written in Java and using Apache Lucene. Major features include full-text search, index replication and sharding, and result faceting and highlighting.

Dec 28, 2022
Comments
  • Feature/tedefo 1539 adapt symbol resolver for codelist parent

    Feature/tedefo 1539 adapt symbol resolver for codelist parent

    Focus only on the second commit (the first one contains a bit of Java code formatting and warning fixes).

    See SdkSymbolResolver, SdkField and SdkCodelist. SdkField is most impacted and has a signature change due to changing the method getRootCodelistId to getCodelistId (as we cannot have the root purely through JsonNode field anymore). In the resolver we first get the codelist id from the field info and then we get the parent id from the codelist info via the codelist id (mock data in the EFX toolkit).

    The old unit test "EfxTemplateTranslatorTest.java" ensures the EFX label of a code of a tailored codelist works by using "authority-activity" which is a tailored codelist of "main-activity" (this used and still uses mock data).

    opened by rouschr 1
  • Fixed attribute step contextualisation

    Fixed attribute step contextualisation

    I discovered this while I was investigating another bug. Apparently we have been doing this wrong all along and we never noticed. Can you verify that my fix renders the proper results. Please look at the modified test cases. Do not merge to develop yet. Only approve or reject or comment please.

    opened by rousso 1
  • Align map get with containsKey

    Align map get with containsKey

    The current implementation leads to a NPE when the ScriptGenerator's composeVariableReference returns a script that is anything other than exactly the variable name.

    opened by DeMol-EE 0
Releases(1.2.0)
  • 1.2.0(Oct 31, 2022)

    Release Notes

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also includes an implementation of an EFX-to-XPath transpiler.


    In this release:

    • We fixed a bug in the XPathScriptGenerator that was causing references to fields of type measure (duration) to throw an exception when multiple values where matched by the reference.
    • We fixed an issue in the SdkSymbolResolver that was causing some code labels to be resolved incorrectly. The SdkSymbolResolver now correctly looks for the root codelist associated with a field in the codelist metadata provided in the codelists folder, instead of relying on the codelist constraint metadata provided in fields.json.
      :warning: CAUTION: If you have implemented your own SymbolResolver make sure that your implementation of getRootCodelistOfField retrieves the parent codelist information from codelists/codelists.json or directly from the .gc files in the codelists folder of the eForms SDK.
    • We refactored the code to move to the eForms Core Java library some common entity classes that were not specific to EFX (SdkEntityFactory, SdkField, SdkNode, SdkCodelist). We also moved into the EFX Toolkit some reusable classes (SdkSymbolResolver, ComponentFactory) from the eForms Notice Viewer sample application. The result of this refactoring is efx-toolkit-java-1.2.0, eforms-core-java-1.0.0 and eforms-notice-viewer-0.6.0.

    You can download the latest EFX Toolkit from Maven Central.
    Maven Central

    Documentation for the EFX Toolkit is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit


    This version of the EFX Toolkit has a compile-time dependency on the following versions of eForms SDK versions and uses the EFX grammar that each version provides:

    • eForms SDK 0.6.x
    • eForms SDK 0.7.x
    • eForms SDK 1.x.x

    It also depends on the eForms Core Java library version 1.0.0.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Oct 20, 2022)

    EFX Toolkit 1.1.1 Release Notes

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also includes an implementation of an EFX-to-XPath transpiler.


    In this release:

    • We fixed a bug that was causing (in some cases) the wrong relative XPath to be calculated for fields that point to XML attributes.
    • We fixed an issue with variable scoping in EFX Templates.

    You can download the latest EFX Toolkit from Maven Central.
    Maven Central

    Documentation for the EFX Toolkit is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit


    This version of the EFX Toolkit has a compile-time dependency on the following versions of eForms SDK versions and uses the EFX grammar that each version provides:

    • eForms SDK 0.6.x
    • eForms SDK 0.7.x
    • eForms SDK 1.x.x

    It also depends on the eForms Core Java library version 0.1.1.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Oct 12, 2022)

    EFX Toolkit 1.1.0 Release Notes

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also includes an implementation of an EFX-to-XPath transpiler.


    In this release:

    In this release we moved some utility classes to a new java library: eforms-core-java. These utility classes enable the parallel use of multiple major versions of the SDK by applications. We decided to extract this functionality to a new shared library so that it can also be used by applications that do not necessarily need EFX translation.

    This release also removes the need to use the "classindex" annotation processor plugin. You can remove the following section from your pom.xml:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.compiler.plugin}</version>
        <configuration>
          <annotationProcessorPaths>
            <annotationProcessorPath>
              <groupId>org.atteo.classindex</groupId>
              <artifactId>classindex</artifactId>
              <version>${version.classindex}</version>
            </annotationProcessorPath>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
    

    You can download the latest EFX Toolkit from Maven Central.
    Maven Central

    Documentation for the EFX Toolkit is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit


    This version of the EFX Toolkit has a compile-time dependency on the following versions of eForms SDK versions and uses the EFX grammar that each version provides:

    • eForms SDK 0.6.x
    • eForms SDK 0.7.x
    • eForms SDK 1.x.x

    It also depends on the eForms Core Java library version 0.1.0.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.3(Oct 11, 2022)

    EFX Toolkit 1.0.3 Release Notes

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also includes an implementation of an EFX-to-XPath transpiler.


    In this release:

    This patch fixes and issue in the translation of indirect label references (e.g. #{BT-123-Field}). The issue prevented applications from being able to render sequences of labels when the indirect reference returned sequences of values.

    You can see how this change can be utilised by applications by looking at the changes released in version 0.4.0 of eforms-notice-viewer, which can now use a sequence of values returned by an indirect label reference to generate a comma separated list of labels.


    You can download the latest EFX Toolkit from Maven Central.
    Maven Central

    Documentation for the EFX Toolkit is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit


    This version of the EFX Toolkit has a compile-time dependency on the following versions of eForms SDK versions and uses the EFX grammar that each version provides:

    • eForms SDK 0.6.x
    • eForms SDK 0.7.x
    • eForms SDK 1.x.x
    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Oct 11, 2022)

    EFX Toolkit 1.0.2 Release Notes

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also includes an implementation of an EFX-to-XPath transpiler.


    In this release:

    This patch fixes a bug in the translation of shorthand indirect label references (e.g. #{BT-123-Field}). The bug affected only fields pointing to XML attributes.


    You can download the latest EFX Toolkit from Maven Central.
    Maven Central

    Documentation for the EFX Toolkit is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit


    This version of the EFX Toolkit has a compile-time dependency on the following versions of eForms SDK versions and uses the EFX grammar that each version provides:

    • eForms SDK 0.6.x
    • eForms SDK 0.7.x
    • eForms SDK 1.x.x
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Sep 23, 2022)

    EFX Toolkit 1.0.1 Release Notes

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also provides an implementation that turns an EFX expression into XPath.

    This patch adds a temporary workaround for basic number formatting. The issue will be addressed properly in the next major release of the SDK.

    You can download the latest EFX Toolkit from Maven Central. Maven Central

    Documentation for the EFX Toolkit is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit

    This version of the EFX Toolkit has a compile-time dependency on the following versions of eForms SDK versions and uses the EFX grammar that each version provides:

    • eForms SDK 0.6.x
    • eForms SDK 0.7.x
    • eForms SDK 1.x.x
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Sep 16, 2022)

    EFX Toolkit 1.0.0 Release Notes

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also provides an implementation that turns an EFX expression into XPath.

    In this release we added an implementation of EFX grammar for SDK 1.x.x.

    We also made improvements in the way multiple versions of the SDK can be supported.

    You can download the latest EFX Toolkit from Maven Central. Maven Central

    Documentation for the EFX Toolkit is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit

    This version of the EFX Toolkit has a compile-time dependency on the following versions of eForms SDK versions and uses the EFX grammar that each version provides:

    • eForms SDK 0.6.x
    • eForms SDK 0.7.x
    • eForms SDK 1.x.x
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Jul 12, 2022)

    EFX Toolkit 0.2.0 Release Notes

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also provides an implementation that turns an EFX expression into XPath.

    In this release we added support for the new EFX language features that were introduced with eForms SDK 0.7.0.

    We also reorganized the code of the toolkit so that it can function with multiple versions of the SDK. You can use our approach as an example on how you can handle several incompatible versions of the SDK from one application that needs to read them.

    You can download the latest EFX Toolkit from Maven Central. Maven Central

    Documentation for the EFX Toolkit is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit

    This version of the EFX Toolkit has a compile-time dependency on the following versions of eForms SDK versions and uses the EFX grammar that each version provides:

    • eForms SDK 0.6.x
    • eForms SDK 0.7.x
    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(May 20, 2022)

    EFX Toolkit 0.1.1 Release Notes

    EFX Toolkit 0.1.1 fixes an issue that we overlooked with 0.1.0 that was preventing us from publishing the EFX Toolkit to Maven Central.

    You can download the latest EFX Toolkit from Maven Central. Maven Central

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(May 20, 2022)

    EFX Toolkit 0.1.0 Release Notes

    This is the first release of the EFX toolkit, a Java library for the eForms Expression Language (EFX)

    The EFX Toolkit for Java developers is a library that enables the transpilation of EFX expressions and templates to different target languages. It also provides an implementation that turns an EFX expression into XPath.

    The documentation is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit

    This version depends on the eForms SDK version 0.6.2, and uses the EFX grammar that it provides.

    Source code(tar.gz)
    Source code(zip)
Owner
TED & EU Public Procurement
TED & EU Public Procurement Unit - Publications Office of the EU
TED & EU Public Procurement
A scalable web crawler framework for Java.

Readme in Chinese A scalable crawler framework. It covers the whole lifecycle of crawler: downloading, url management, content extraction and persiste

Yihua Huang 10.7k Jan 5, 2023
Concise UI Tests with Java!

Selenide = UI Testing Framework powered by Selenium WebDriver What is Selenide? Selenide is a framework for writing easy-to-read and easy-to-maintain

Selenide 1.6k Jan 4, 2023
jQuery-like cross-driver interface in Java for Selenium WebDriver

seleniumQuery Feature-rich jQuery-like Java interface for Selenium WebDriver seleniumQuery is a feature-rich cross-driver Java library that brings a j

null 69 Nov 27, 2022
jsoup: the Java HTML parser, built for HTML editing, cleaning, scraping, and XSS safety.

jsoup: Java HTML Parser jsoup is a Java library for working with real-world HTML. It provides a very convenient API for fetching URLs and extracting a

Jonathan Hedley 9.9k Jan 4, 2023
Elegant parsing in Java and Scala - lightweight, easy-to-use, powerful.

Please see https://repo1.maven.org/maven2/org/parboiled/ for download access to the artifacts https://github.com/sirthias/parboiled/wiki for all docum

Mathias 1.2k Dec 21, 2022
A pure-Java Markdown processor based on a parboiled PEG parser supporting a number of extensions

:>>> DEPRECATION NOTE <<<: Although still one of the most popular Markdown parsing libraries for the JVM, pegdown has reached its end of life. The pro

Mathias 1.3k Nov 24, 2022
My solution in Java for Advent of Code 2021.

advent-of-code-2021 My solution in Java for Advent of Code 2021. What is Advent of Code? Advent of Code (AoC) is an Advent calendar of small programmi

Phil Träger 3 Dec 2, 2021
Dicas , códigos e soluções para projetos desenvolvidos na linguagem Java

Digytal Code - Programação, Pesquisa e Educação www.digytal.com.br (11) 95894-0362 Autores Gleyson Sampaio Repositório repleto de desafios, componente

Digytal Code 13 Apr 15, 2022
AWS JSON TRANSLATOR CLI is a command line application to translate JSON files using AWS Translate

A command line tool to translate JSON files using AWS Translate.

Marc Guillem 0 May 30, 2022
A modular and portable open source XMPP client library written in Java for Android and Java (SE) VMs

Smack About Smack is an open source, highly modular, easy to use, XMPP client library written in Java for Java SE compatible JVMs and Android. A pure

Ignite Realtime 2.3k Dec 28, 2022