本文整理汇总了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() ;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}