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


Java DatasetGraphTransaction类代码示例

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


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

示例1: bulkload

import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction; //导入依赖的package包/类
/**
 * Load a list of files into a database located in a given directory.
 * 
 * @param dir directory containing the database file.
 * @param urls URLs of the files containing the RDF content to be loaded into the database file. 
 */
public static void bulkload(String dir, URL[] urls) {
	DatasetGraphTransaction dataset = (DatasetGraphTransaction) TDBFactory.createDatasetGraph(dir);
	String[] stringURLs = new String[urls.length];
	int i=0;
	for(URL url : urls) {
		stringURLs[i] = url.toString();
		i++;
	}
	TDBLoader.load(dataset.getDatasetGraphToQuery(), Arrays.asList(stringURLs));
}
 
开发者ID:AKSW,项目名称:KBox,代码行数:17,代码来源:TDB.java

示例2: createDataSet

import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction; //导入依赖的package包/类
/**
 * create a dataset with a specified location
 *
 * @param location the specified location string
 */
public void createDataSet(String location) {
    this.dataset = ((DatasetGraphTransaction) TDBFactory.createDatasetGraph(location)).getBaseDatasetGraph();
    this.arqExCtx = new ExecutionContext(this.dataset.getContext(),
            this.dataset.getDefaultGraph(),
            this.dataset, OpExecutorTDB1.OpExecFactoryTDB);
}
 
开发者ID:KMax,项目名称:cqels,代码行数:12,代码来源:ExecContext.java

示例3: dsgToQuery

import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction; //导入依赖的package包/类
protected DatasetGraphTDB dsgToQuery(DatasetGraph dataset)
{
    if (dataset instanceof DatasetGraphTDB) return (DatasetGraphTDB)dataset ;
    if (dataset instanceof DatasetGraphTransaction) 
        return ((DatasetGraphTransaction)dataset).getDatasetGraphToQuery() ;
    throw new TDBException("Internal inconsistency: trying to execute query on unrecognized kind of DatasetGraph: "+Lib.className(dataset)) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:8,代码来源:QueryEngineFactoryQuackTDB.java

示例4: isHandledByTDB

import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction; //导入依赖的package包/类
private static boolean isHandledByTDB(DatasetGraph dataset)
{
    if (dataset instanceof DatasetGraphTDB) return true ;
    if (dataset instanceof DatasetGraphTransaction ) return true ;
    return false ;
}
 
开发者ID:afs,项目名称:quack,代码行数:7,代码来源:QueryEngineFactoryQuackTDB.java

示例5: initTDBGraph

import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction; //导入依赖的package包/类
/**
 * init TDB graph with the specified directory
 *
 * @param directory
 */
public void initTDBGraph(String directory) {
    //this.dataset = TDBFactory.createDatasetGraph(directory);
    this.dataset = ((DatasetGraphTransaction) TDBFactory.createDatasetGraph(location)).getBaseDatasetGraph();
}
 
开发者ID:KMax,项目名称:cqels,代码行数:10,代码来源:ExecContext.java


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