FIAS Client

Java client for FNS FIAS database.

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

org.meridor
ArtifactId

ArtifactId

fias-client
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

FIAS Client
Java client for FNS FIAS database.
Project Organization

Project Organization

Meridor
Source Code Management

Source Code Management

https://github.com/meridor/fias-client

Download fias-client

How to add to project

<!-- https://jarcasting.com/artifacts/org.meridor/fias-client/ -->
<dependency>
    <groupId>org.meridor</groupId>
    <artifactId>fias-client</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.meridor/fias-client/
implementation 'org.meridor:fias-client:1.0'
// https://jarcasting.com/artifacts/org.meridor/fias-client/
implementation ("org.meridor:fias-client:1.0")
'org.meridor:fias-client:jar:1.0'
<dependency org="org.meridor" name="fias-client" rev="1.0">
  <artifact name="fias-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.meridor', module='fias-client', version='1.0')
)
libraryDependencies += "org.meridor" % "fias-client" % "1.0"
[org.meridor/fias-client "1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.jvnet.jaxb2_commons : jaxb2-basics-runtime jar 0.6.5

Project Modules

There are no modules declared in this project.

FIAS Client

This repository contains an implementation of FIAS (Federal Address Information System) of Russian Fiscal Authorities (FNS) database client. It supports only XML-based version of the database. This library gives you NO performance guarantee and should NOT be used in performance sensitive environments. Its main purpose is to transfer data from FIAS XML files to any real database.

Usage

Dependencies

Use your build tool of choice and add dependency below to your project. For Maven it looks like:

<dependency>
    <groupId>org.meridor</groupId>
    <artifactId>fias-client</artifactId>
    <version>${fias-client-latest.version}</version> <!-- Substitute latest release version here -->
</dependency>

Loading data

You load data in two forms - raw data and domain objects. Raw data is a one-to-one mapping to XML structure whereas domain objects give you a set of XML-agnostic objects like Region, City, Address and so on. Loading raw data is as simple as specifying a predicate to e.g. AddressObjects.Object class:

Path xmlDirectory = Paths.get("/my/xml/directory");
FiasClient fiasClient = new FiasClient(xmlDirectory);
fiasClient.load(o -> o.getAOLEVEL().equals(AddressLevel.REGION.getAddressLevel()));

To load data as domain objects - simply use one of Fias class methods like the following:

Path xmlDirectory = Paths.get("/my/xml/path");
List<Region> regions = Fias
        .withXMLDirectory(xmlDirectory)
        .getRegions();
regions.forEach(r -> System.out.println(r.getName() + " " + r.getCode()));

Building

In order to build the client from source code you need:

  • Java 1.8+
  • Maven 3 To run the build type:
$ mvn clean install
org.meridor

Meridor

Versions

Version
1.0