FIAS Client

Java client for FNS FIAS database.

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

org.meridor
Идентификатор

Идентификатор

fias-client
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

FIAS Client
Java client for FNS FIAS database.
Организация-разработчик

Организация-разработчик

Meridor
Система контроля версий

Система контроля версий

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

Скачать fias-client

Как подключить последнюю версию

<!-- 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"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.jvnet.jaxb2_commons : jaxb2-basics-runtime jar 0.6.5

Модули Проекта

Данный проект не имеет модулей.

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

Версии библиотеки

Версия
1.0