本文整理了Java中org.apache.jena.query.Query.getPrologue
方法的一些代码示例,展示了Query.getPrologue
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getPrologue
方法的具体详情如下:
包路径:org.apache.jena.query.Query
类名称:Query
方法名:getPrologue
暂无
代码示例来源:origin: SmartDataAnalytics/jena-sparql-api
@Override
public Prologue apply(String prologue) {
String queryStr = prologue + "SELECT * { ?s ?p ?o }";
Query query = sparqlQueryParser.apply(queryStr);
Prologue result = query.getPrologue();
return result;
}
代码示例来源:origin: apache/jena
private static void doSelectQuery(Prologue prologue, QueryExecution qe, ResultsFormat outputFormat) {
if ( prologue == null )
prologue = qe.getQuery().getPrologue() ;
if ( outputFormat == null || outputFormat == ResultsFormat.FMT_UNKNOWN )
outputFormat = ResultsFormat.FMT_TEXT ;
ResultSet results = qe.execSelect() ;
outputResultSet(results, prologue, outputFormat) ;
}
代码示例来源:origin: org.apache.jena/jena-fuseki-core
SPARQLResult result = executeQuery(action, qExec, query, queryStringLog) ;
sendResults(action, result, query.getPrologue()) ;
代码示例来源:origin: apache/jena
SPARQLResult result = executeQuery(action, qExec, query, queryStringLog) ;
sendResults(action, result, query.getPrologue()) ;
代码示例来源:origin: apache/jena
@Override
public void startVisit(Query query) {
newQuery.setSyntax(query.getSyntax());
if (query.explicitlySetBaseURI())
newQuery.setBaseURI(query.getPrologue().getResolver());
newQuery.setQueryResultStar(query.isQueryResultStar());
if (query.hasDatasetDescription()) {
DatasetDescription desc = query.getDatasetDescription();
for (String x : desc.getDefaultGraphURIs())
newQuery.addGraphURI(x);
for (String x : desc.getDefaultGraphURIs())
newQuery.addNamedGraphURI(x);
}
// Aggregators.
newQuery.getAggregators().addAll(query.getAggregators());
}
代码示例来源:origin: SmartDataAnalytics/jena-sparql-api
@Override
public void startVisit(Query query) {
newQuery.setSyntax(query.getSyntax()) ;
if ( query.explicitlySetBaseURI() )
newQuery.setBaseURI(query.getPrologue().getResolver()) ;
newQuery.setQueryResultStar(query.isQueryResultStar()) ;
if ( query.hasDatasetDescription() ) {
DatasetDescription desc = query.getDatasetDescription() ;
for (String x : desc.getDefaultGraphURIs())
newQuery.addGraphURI(x) ;
for (String x : desc.getDefaultGraphURIs())
newQuery.addNamedGraphURI(x) ;
}
// Aggregators.
newQuery.getAggregators().addAll(query.getAggregators()) ;
}
代码示例来源:origin: tarql/tarql
query.getPrologue().setResolver(result.getPrologue().getResolver());
代码示例来源:origin: apache/jena
public static void executeQuery(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat) {
Query query = queryExecution.getQuery() ;
if ( prologue == null )
prologue = query.getPrologue() ;
if ( prologue == null )
prologue = dftPrologue ;
if ( query.isSelectType() )
doSelectQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isDescribeType() )
doDescribeQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isConstructQuad() )
// Before isConstructType.
doConstructQuadsQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isConstructType() )
doConstructQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isAskType() )
doAskQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isJsonType() )
doJsonQuery(prologue, queryExecution, outputFormat) ;
else
throw new QueryException("Unrecognized query form");
}
内容来源于网络,如有侵权,请联系作者删除!