当前位置: 首页>>代码示例>>Java>>正文


Java NativeStore类代码示例

本文整理汇总了Java中org.eclipse.rdf4j.sail.nativerdf.NativeStore的典型用法代码示例。如果您正苦于以下问题:Java NativeStore类的具体用法?Java NativeStore怎么用?Java NativeStore使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


NativeStore类属于org.eclipse.rdf4j.sail.nativerdf包,在下文中一共展示了NativeStore类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadEndpoint

import org.eclipse.rdf4j.sail.nativerdf.NativeStore; //导入依赖的package包/类
@Override
public Endpoint loadEndpoint(RepositoryInformation repoInfo) throws FedXException {
	
	File store = FileUtil.getFileLocation(config, repoInfo.getLocation());
	
	if (!store.exists()){
		throw new FedXRuntimeException("Store does not exist at '" + repoInfo.getLocation() + ": " + store.getAbsolutePath() + "'.");
	}
	
	try {
		NativeStore ns = new NativeStoreExt(store);
		SailRepository repo = new SailRepository(ns);
		repo.initialize();
		
		ProviderUtil.checkConnectionIfConfigured(config, repo);
		
		Endpoint res = new Endpoint(repoInfo.getId(), repoInfo.getName(), repoInfo.getLocation(), repoInfo.getType(), EndpointClassification.Local);
		res.setEndpointConfiguration(repoInfo.getEndpointConfiguration());
		res.setRepo(repo);
		
		/*
		// register a federated service manager to deal with this endpoint
		SAILFederatedService federatedService = new SAILFederatedService(res);
		federatedService.initialize();
		FederatedServiceManager.getInstance().registerService(repoInfo.getName(), federatedService);
		*/
		
		return res;
	} catch (RepositoryException e) {
		throw new FedXException("Repository " + repoInfo.getId() + " could not be initialized: " + e.getMessage(), e);
	}
}
 
开发者ID:dice-group,项目名称:CostFed,代码行数:33,代码来源:NativeStoreProvider.java

示例2: createRepository

import org.eclipse.rdf4j.sail.nativerdf.NativeStore; //导入依赖的package包/类
public void createRepository() throws IOException {
    final Sail sail = new NativeStore(tempDir.newFolder());
    repository = new SailRepository(sail);
    repository.initialize();
}
 
开发者ID:apache,项目名称:commons-rdf,代码行数:6,代码来源:NativeStoreGraphTest.java


注:本文中的org.eclipse.rdf4j.sail.nativerdf.NativeStore类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。