当前位置: 首页>>代码示例>>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;未经允许,请勿转载。