GithubHelp home page GithubHelp logo

sarkaraj / gozer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from walmartlabs/gozer

0.0 2.0 0.0 97 KB

Open source library to parse various X12 file formats for retail/supply chain

License: Other

Java 100.00%

gozer's Introduction

EDI X12 Standard Parsing Library

The EDI X12 Standard provides a uniform way for companies to exchange information across different sectors.

This open source library, available through @WalmartLabs, provides Java based classes that can parse various X12 file formats into a representative Java object model. It's primary focus is on those formats related to the Supply Chain sector.

Supported X12 Format Parsers

X12 Name Description X12 Version(s)
DEX 894 Delivery/Return Base Record DSD deliveries 4010,5010

Getting Started

Each X12 format that is supported will have a Java implementation for both the X12Parser and X12Validator. The parser will be responsible for parsing the message in the given format to the representative Java object model (POJO). The validator will be responsible for providing validations applying them to the values stored in the POJO that the parser creates.

If the X12 message is invalid and can't be parsed the parser is expected to throw an X12ParserException. The validator will not throw an exception under normal circumstances. Instead any validation errors will be returned in a Set of X12ErrorDetail objects.

String dexMessage = ...
DefaultDex894Parser dexParser = new DefaultDex894Parser();
DefaultDex894Validator dexValidator = new DefaultDex894Validator();

Dex894 dex = dexParser.parse(dexMessage);
Set<X12ErrorDetail> errorSet = dexValidator.validate(dex);

After parsing and validating an X12 formatted message, various utilities can be used for post-processing the data. For example

// get an item from the DEX object 
// that was returned from the parser
Dex894Item dexItem = dex.getItems().get(0);

// convert the UPC in G8304 to a 14 digit GTIN
String itf14 = util.convertRetailNumberToItf14(dexItem.getUpc());

More Information

About EDI Standards

EDI formats

GTIN formats

Converting between GTIN formats

ITF-14 format

Build and Release

mvn clean install

See walmartlabs-pom for more information

Licensing

Copyright 2011-present Walmart Inc.

This software is licensed under the Apache 2.0 License

Also see LICENSE file.

gozer's People

Contributors

mbarlot avatar mosabua avatar codesmell avatar jaympatel avatar seoklee avatar

Watchers

James Cloos avatar Rajarshi Sarkar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.