Skip to content

Tiim/lenex-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages