Vocabulary Management

A central Java library of the standard constants and strings used in EPCIS event data.

The source code of the library is on GitHub:

• EPCIS vocabulary/constants application code: https://github.com/openepcis/openepcis-epcis-constants

Introduction

OpenEPCIS Event Constants is a central repository for the constants and string values that appear again and again in applications built on the EPCIS standard. These values stand for standard EPCIS terms, event information and GS1 keywords, and data stays consistent and interoperable only when every application spells them the same way. When each OpenEPCIS project defined them on its own, the duplicates had to be maintained separately, could drift apart and made the code harder to read. The library gives all projects one shared definition.

The EPCIS standard defines vocabulary terms and identifiers such as these:

  • bizStep: Represents a business step in the supply chain.
  • disposition: Describes the state of a physical entity.
  • sgtin: Describes a type of identifier in EPCIS.
  • ObjectEvent: Describes a type of event in EPCIS.

EPCIS-based projects rely on them when they validate and process events.

Usage

The constants live in the EPCIS class and can be used directly. This example reads the bizStep and errorDeclaration keywords:

Java code snippet
final String businessStep=EPCIS.BIZ_STEP;
System.out.println("Business Step: "+businessStep); // output: bizStep

final String errorDeclaration=EPCIS.ERROR_DECLARATION;
System.out.println("Error Declaration: "+errorDeclaration); // output: errorDeclaration

Contribution

Contributions from the community help the vocabulary grow. You can add new EPCIS vocabulary or constant terms, improve existing ones, add test cases that validate the vocabulary, or send feedback and suggestions.