
org.meridor.fias.FiasClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fias-client Show documentation
Show all versions of fias-client Show documentation
Java client for FNS FIAS database.
The newest version!
package org.meridor.fias;
import org.meridor.fias.loader.ReferenceProvider;
import org.meridor.fias.loader.XMLLoader;
import java.io.FileNotFoundException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.function.Predicate;
public class FiasClient implements FiasAware {
private final XMLLoader xmlLoader;
public FiasClient(Path xmlDirectory) throws FileNotFoundException {
if (!Files.exists(xmlDirectory)) {
throw new FileNotFoundException(String.format(
"Specified path [%s] does not exist",
xmlDirectory
));
}
xmlLoader = new XMLLoader(xmlDirectory);
}
@Override
public List load(Predicate predicate) {
return xmlLoader.loadRaw(predicate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy