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


Java DatasetAccessorFactory类代码示例

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


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

示例1: build

import com.hp.hpl.jena.query.DatasetAccessorFactory; //导入依赖的package包/类
/**
 * Builds a new SolRDF proxy instance.
 * 
 * @return a new SolRDF proxy instance.
 * @throws UnableToBuildSolRDFClientException in case of build failure.
 */
public SolRDF build() throws UnableToBuildSolRDFClientException {
	if (endpoints.isEmpty()) {
		endpoints.add(DEFAULT_ENDPOINT);
	}

	// FIXME: for DatasetAccessor and (HTTP) query execution service we also need something like LBHttpSolrServer
	final String firstEndpointAddress = endpoints.iterator().next();
	try {
		return new SolRDF(
				DatasetAccessorFactory.createHTTP(
						firstEndpointAddress +
						graphStoreProtocolEndpointPath),
				firstEndpointAddress + sparqlEndpointPath,		
				zkHost != null
					? new CloudSolrClient(zkHost)
					: (endpoints.size() == 1)
						? new HttpSolrClient(endpoints.iterator().next(), httpClient)
						: new LBHttpSolrClient(httpClient, endpoints.toArray(new String[endpoints.size()])));
	} catch (final Exception exception) {
		throw new UnableToBuildSolRDFClientException(exception);
	}	
}
 
开发者ID:spaziocodice,项目名称:SolRDF,代码行数:29,代码来源:SolRDF.java

示例2: uploadFile

import com.hp.hpl.jena.query.DatasetAccessorFactory; //导入依赖的package包/类
public void uploadFile(Path path) {
    Model m = FileManager.get().loadModel(path.toString());
    DatasetAccessorFactory.createHTTP(
            CONFIG.sparqlUpload(), authenticator).add(m);
}
 
开发者ID:ailabitmo,项目名称:DAAFSE,代码行数:6,代码来源:Store.java


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