當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。