Coder Social home page Coder Social logo

lenex-java's Introduction

Lenex Java

Java Library for the Lenex 3.0 file format.

The format is commonly used in swimmeets and developed by Swimrankings.net. The library is able to read an uncompressed .lef file or a compressed .lxf file and transform it into POJOs.

This library was originally deveopped for the SwimCoachOrganizer project and has just been extracted to a separate library. The API will likely change in the future as I am trying to make the library easier to use.

Requirement

This library requires at leas java 8 or newer.

Ussage

Read .lxf file

InputStream is = new FileInputStream(...);              // Open stream to lenex file
Lenex lenex = LenexParser.parse(is, LenexType.LENEX_COMPRESSED);
                                                        // Parse the stream to the lenex object
                                                        // Use LenexType.LENEX_PLAIN if you are reading a .lef file
...

Print all athletes and all data associated with them

lenex.getMeets().stream()                               // stream all meets
                .flatMap(m -> m.getClubs().stream())    // map the stream to a list of clubs
                .flatMap(c -> c.getAthletes().stream()) // map the clubs to a list of athletes
                .map(Object::toString)                  // convert athletes to string
                .forEach(System.out::println);          // print each string

Installation

We don't have a maven repo yet as this library is not yet production ready at all. If you want to play with it anyway feel free to clone this project.

lenex-java's People

Contributors

tiim avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

rocamador

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.