All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unlaxer.jaddress.parser.DataAccessContextFactory Maven / Gradle / Ivy

package org.unlaxer.jaddress.parser;

import java.nio.file.Path;

import org.unlaxer.jaddress.ElaticeSearchAccessor;
import org.unlaxer.jaddress.UserHomeContext;

import io.vavr.Lazy;

public class DataAccessContextFactory{
	
	public static final Path DEFAULT_SQLITE_PATH =  UserHomeContext.getPathWithFolderAndFile("jyuusyojp","zenkoku.sqlite3");
	
	static Lazy singleton = Lazy.of(()->{
		return new DataAccessContextImpl(
				DEFAULT_SQLITE_PATH,
				new ElaticeSearchAccessor(),
				new AddressParserImpl()
		);
	});
	
	public static DataAccessContext get() {
		return singleton.get();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy