本文整理汇总了Java中org.apache.jena.query.Query.setBaseURI方法的典型用法代码示例。如果您正苦于以下问题:Java Query.setBaseURI方法的具体用法?Java Query.setBaseURI怎么用?Java Query.setBaseURI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jena.query.Query
的用法示例。
在下文中一共展示了Query.setBaseURI方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareQueryDefinition
import org.apache.jena.query.Query; //导入方法依赖的package包/类
private SPARQLQueryDefinition prepareQueryDefinition(Query query) {
JenaDatabaseClient client = markLogicDatasetGraph.getDatabaseClient();
SPARQLQueryDefinition qdef = client.newQueryDefinition(query.toString());
if (query.getBaseURI() != null) {
qdef.setBaseUri(query.getBaseURI());
} else {
query.setBaseURI((String) null);
}
if (markLogicDatasetGraph.getRulesets() != null) {
qdef.setRulesets(markLogicDatasetGraph.getRulesets());
}
bindVariables(qdef, this.initial, markLogicDatasetGraph);
QueryDefinition constrainingQueryDefinition = markLogicDatasetGraph.getConstrainingQueryDefinition();
qdef.setConstrainingQueryDefinition(constrainingQueryDefinition);
return qdef;
}
示例2: createQueryExecution
import org.apache.jena.query.Query; //导入方法依赖的package包/类
@Override
protected QueryExecution createQueryExecution(Query query) {
if (this.getOptions().getEnsureAbsoluteURIs()) {
if (!query.explicitlySetBaseURI()) query.setBaseURI((String)null);
}
return QueryExecutionFactory.sparqlService(this.getOptions().getQueryEndpoint(), query, this.getOptions()
.getAuthenticator());
}
示例3: createQueryExecution
import org.apache.jena.query.Query; //导入方法依赖的package包/类
@Override
protected QueryExecution createQueryExecution(Query query) {
if (this.getOptions().getEnsureAbsoluteURIs()) {
if (!query.explicitlySetBaseURI())
query.setBaseURI((String) null);
}
return QueryExecutionFactory.create(query, this.getDataset(this.getOptions()));
}
示例4: prepareWrapper
import org.apache.jena.query.Query; //导入方法依赖的package包/类
private static Query prepareWrapper(Prologue prologue) {
Query summaryQuery = new Query();
if (prologue.explicitlySetBaseURI()) {
summaryQuery.setBaseURI(prologue.getBaseURI());
}
summaryQuery.setPrefixMapping(prologue.getPrefixMapping());
summaryQuery.setQuerySelectType();
Aggregator countAgg = new AggCount();
Expr countExpr = summaryQuery.allocAggregate(countAgg);
summaryQuery.addResultVar(SUMMARIZED_QUERY_RESULT_VARIABLE, countExpr);
return summaryQuery;
}