當前位置: 首頁>>代碼示例>>Java>>正文


Java Query.isConstructType方法代碼示例

本文整理匯總了Java中com.hp.hpl.jena.query.Query.isConstructType方法的典型用法代碼示例。如果您正苦於以下問題:Java Query.isConstructType方法的具體用法?Java Query.isConstructType怎麽用?Java Query.isConstructType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.hp.hpl.jena.query.Query的用法示例。


在下文中一共展示了Query.isConstructType方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: sparqlConstruct

import com.hp.hpl.jena.query.Query; //導入方法依賴的package包/類
@Override
public ClosableIterable<Statement> sparqlConstruct(String queryString)
        throws ModelRuntimeException {
	assertModel();
	Query query = QueryFactory.create(queryString);
	QueryExecution qexec = QueryExecutionFactory.create(query, this.jenaModel);
	
	if(query.isConstructType()) {
		com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
		Model resultModel = new ModelImplJena(null, m, Reasoning.none);
		resultModel.open();
		return resultModel;
	} else {
		throw new RuntimeException("Cannot handle this type of queries! Please use CONSTRUCT.");
	}
}
 
開發者ID:semweb4j,項目名稱:semweb4j,代碼行數:17,代碼來源:ModelImplJena.java

示例2: queryConstruct

import com.hp.hpl.jena.query.Query; //導入方法依賴的package包/類
@Override
public ClosableIterable<Statement> queryConstruct(String query,
		String querylanguage) throws QueryLanguageNotSupportedException,
		MalformedQueryException, ModelRuntimeException {

	Query jenaQuery = QueryFactory.create(query);
	QueryExecution qexec = QueryExecutionFactory.create(jenaQuery,
			this.dataset);

	if (jenaQuery.isConstructType()) {
		com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
		Model resultModel = new ModelImplJena(null, m, Reasoning.none);
		resultModel.open();
		return resultModel;
	} else {
		throw new RuntimeException(
				"Cannot handle this type of query! Please use CONSTRUCT.");
	}
}
 
開發者ID:semweb4j,項目名稱:semweb4j,代碼行數:20,代碼來源:ModelSetImplJena.java

示例3: sparqlConstruct

import com.hp.hpl.jena.query.Query; //導入方法依賴的package包/類
@Override
public ClosableIterable<Statement> sparqlConstruct(String query)
		throws ModelRuntimeException, MalformedQueryException {
	Query jenaQuery = QueryFactory.create(query);
	QueryExecution qexec = QueryExecutionFactory.create(jenaQuery,
			this.dataset);

	if (jenaQuery.isConstructType()) {
		com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
		Model resultModel = new ModelImplJena(null, m, Reasoning.none);
		resultModel.open();
		return resultModel;
	} else {
		throw new RuntimeException(
				"Cannot handle this type of query! Please use CONSTRUCT.");
	}

}
 
開發者ID:semweb4j,項目名稱:semweb4j,代碼行數:19,代碼來源:ModelSetImplJena.java

示例4: registerConstructQuery

import com.hp.hpl.jena.query.Query; //導入方法依賴的package包/類
/**
 * register the construct-type query with the engine
 *
 * @param query
 * @return
 */
public ContinuousConstruct registerConstructQuery(Query query) {
    OpRouter qR = generateRoutingPolicy(query);
    if (query.isConstructType()) {
        ///TODO
        ContinuousConstruct rootRouter = (ContinuousConstruct) addRouter(qR,
                new ContinuousConstruct(context, query, qR));
        return rootRouter;
    }
    return null;
}
 
開發者ID:KMax,項目名稱:cqels,代碼行數:17,代碼來源:HeuristicRoutingPolicy.java


注:本文中的com.hp.hpl.jena.query.Query.isConstructType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。