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


Java QueryEngineHTTP.execConstruct方法代码示例

本文整理汇总了Java中com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execConstruct方法的典型用法代码示例。如果您正苦于以下问题:Java QueryEngineHTTP.execConstruct方法的具体用法?Java QueryEngineHTTP.execConstruct怎么用?Java QueryEngineHTTP.execConstruct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP的用法示例。


在下文中一共展示了QueryEngineHTTP.execConstruct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execGraphQuery

import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; //导入方法依赖的package包/类
@Override
public Object execGraphQuery(String query) {

	com.hp.hpl.jena.query.Query queryVar = QueryFactory.create(query) ;
	
	QueryEngineHTTP qexec = QueryExecutionFactory.createServiceRequest(this.serviceURI, queryVar);
	String params = prop.getProperty(Constants.URL_PARAM);
	StringTokenizer paramTokens = new StringTokenizer(params, ";");
	while(paramTokens.hasMoreTokens())
	{
		String token = paramTokens.nextToken();
		qexec.addParam(token, prop.getProperty(token));			
	}
	Model resultModel = qexec.execConstruct() ;
	logger.info("Executing the RDF File Graph Query " + query);
	return resultModel;
	//qexec.close() ;
}
 
开发者ID:SEMOSS,项目名称:semoss,代码行数:19,代码来源:RemoteJenaEngine.java

示例2: getMeasure

import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; //导入方法依赖的package包/类
public Model getMeasure(String graph, String subject) {
    logger.debug("getMeaure: " + graph + " " + subject);
    ParameterizedSparqlString prepareQuery = new ParameterizedSparqlString(MEASURE_PROPERTY_QUERY);
    prepareQuery.setIri("g", graph);

    if (subject != null) {
        prepareQuery.setIri("s", subject);
    }

    Model model = null;
    try {
        QueryEngineHTTP qeHTTP = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(TRIPLE_STORE, prepareQuery.toString());
        model = qeHTTP.execConstruct();
    } catch (QueryParseException exception) {
        logger.error("QueryParseException: ", exception);
    }

    return model;
}
 
开发者ID:bayerls,项目名称:bacon,代码行数:20,代码来源:MergeDao.java

示例3: getDimension

import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; //导入方法依赖的package包/类
public Model getDimension(String graph, String subject) {
    logger.debug("getDimensions: " + graph);
    ParameterizedSparqlString prepareQuery = new ParameterizedSparqlString(DIMENSION_PROPERTY_QUERY);
    prepareQuery.setIri("g", graph);
    prepareQuery.setIri("s", subject);

    Model model = null;
    try {
        QueryEngineHTTP qeHTTP = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(TRIPLE_STORE, prepareQuery.toString());
        model = qeHTTP.execConstruct();
    } catch (QueryParseException exception) {
        logger.error("QueryParseException: ", exception);
    }

    return model;
}
 
开发者ID:bayerls,项目名称:bacon,代码行数:17,代码来源:MergeDao.java

示例4: getEntityDefinition

import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; //导入方法依赖的package包/类
public Model getEntityDefinition(String graph, String entity) {
    logger.debug("getEntityDefinition: " + graph + " " + entity);
    ParameterizedSparqlString prepareQuery = new ParameterizedSparqlString(ENTITY_CONSTRUCT_QUERY);
    prepareQuery.setIri("g", graph);

    if (entity != null) {
        prepareQuery.setIri("s", entity);
    }

    Model model = null;
    try {
        QueryEngineHTTP qeHTTP = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(TRIPLE_STORE, prepareQuery.toString());
        model = qeHTTP.execConstruct();
    } catch (QueryParseException exception) {
        logger.error("QueryParseException: ", exception);
    }

    return model;
}
 
开发者ID:bayerls,项目名称:bacon,代码行数:20,代码来源:MergeDao.java

示例5: getDimensions

import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; //导入方法依赖的package包/类
public Model getDimensions(String graph) {
    logger.debug("getDimensions: " + graph);
    ParameterizedSparqlString prepareQuery = new ParameterizedSparqlString(DIMENSION_PROPERTY_QUERY);
    prepareQuery.setIri("g", graph);

    Model model = null;
    try {
        QueryEngineHTTP qeHTTP = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(TRIPLE_STORE, prepareQuery.toString());
        model = qeHTTP.execConstruct();
    } catch (QueryParseException exception) {
        logger.error("QueryParseException: ", exception);
    }

    return model;
}
 
开发者ID:bayerls,项目名称:bacon,代码行数:16,代码来源:MergeDao.java

示例6: getCompleteGraph

import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; //导入方法依赖的package包/类
public Model getCompleteGraph(String graph) {
    logger.debug("getCompleteGraph: " + graph);
    ParameterizedSparqlString prepareQuery = new ParameterizedSparqlString(GENERIC_CONSTRUCT);
    prepareQuery.setIri("g", graph);

    QueryEngineHTTP qeHTTP = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(TRIPLE_STORE, prepareQuery.toString());

    return qeHTTP.execConstruct();
}
 
开发者ID:bayerls,项目名称:bacon,代码行数:10,代码来源:MergeDao.java


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