Skip to content

urbancamo/adif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADIF parser and generator

This is a fork of the MarSik ADIF Library by Martin Sivák

His documentation is below:

This library is meant to be used for reading and writing of ADIF data (ADI format only for now, although the XML based ADIX is almost the same).

The current format I am targeting is ADIF 3.0.8 as described at the ADIF site.

This code is released under the Apache License 2.0

Adding this library to your project

This library is released on Maven Central so just add the dependency to your pom.xml:

<dependency>
    <groupId>org.marsik.ham</groupId>
    <artifactId>adif</artifactId>
    <version>1.1</version>
</dependency>

The other option is to use Jitpack.io by configuring a repository and dependency in the following way:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.github.MarSik</groupId>
    <artifactId>adif</artifactId>
    <version>1.1</version>
</dependency>

Reading ADIF files

import org.marsik.ham.adif.Adif3
import org.marsik.ham.adif.AdiReader

AdiReader reader = new AdiReader();
BufferedReader buffInput = ...; // get buffered reader from stream or file
Optional<Adif3> adif = reader.read(buffInput);

Note: For reading Logbook of the World adi files enable the quirks mode with reader.setQuirksMode(true);. The quirks mode accepts submodes (i.e PSK31) in the modes fields and translates them to the appropriate mode (i.e. PSK).

Writing ADIF files

import org.marsik.ham.adif.Adif3Record
import org.marsik.ham.adif.AdifHeader
import org.marsik.ham.adif.AdiWriter

AdiWriter writer = new AdiWriter();
writer.append(/* AdifHeader */)
for Adif3Record record: /* some data source */ {
  writer.append(record);
}
writer.toString() // -> to some output

About

Fork of ADIF read/write Java Library

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages