本文整理了Java中com.hp.hpl.jena.query.Query.getQueryType
方法的一些代码示例,展示了Query.getQueryType
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getQueryType
方法的具体详情如下:
包路径:com.hp.hpl.jena.query.Query
类名称:Query
方法名:getQueryType
暂无
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
@Override
public void visitResultForm(Query query1)
{ check("Query result form", query1.getQueryType() == query2.getQueryType()) ; }
代码示例来源:origin: com.hp.hpl.jena/arq
public void visitResultForm(Query query1)
{ check("Query result form", query1.getQueryType() == query2.getQueryType()) ; }
代码示例来源:origin: spaziocodice/SolRDF
/**
* Determines the content type that will be associated with this response writer.
*
* @param request the current Solr request.
* @return the content type associated with this response writer.
*/
String getContentType(final SolrQueryRequest request, final boolean log) {
final Query query = (Query)request.getContext().get(Names.QUERY);
if (query == null) {
return null;
}
final HttpServletRequest httpRequest = (HttpServletRequest) request.getContext().get(Names.HTTP_REQUEST_KEY);
final String accept = httpRequest.getHeader(HttpHeaders.ACCEPT);
final String [] mediaTypes = accept != null ? accept.split(",") : null;
String [] requestedMediaTypes = null;
if (mediaTypes != null) {
requestedMediaTypes = new String[mediaTypes.length];
for (int i = 0; i < mediaTypes.length; i++) {
requestedMediaTypes[i] = cleanMediaType(mediaTypes[i]);
}
}
final String contentType = contentTypeChoiceStrategies.get(query.getQueryType()).getContentType(requestedMediaTypes);
if (log) {
LOGGER.debug(MessageCatalog._00092_NEGOTIATED_CONTENT_TYPE, query.getQueryType(), accept, contentType);
}
return contentType;
}
代码示例来源:origin: spaziocodice/SolRDF
return;
writers.get(query.getQueryType()).doWrite(values, writer, getContentType(request, false));
代码示例来源:origin: spaziocodice/SolRDF
response.add(Names.QUERY_EXECUTION, execution);
switch(query.getQueryType()) {
case Query.QueryTypeAsk:
response.add(Names.QUERY_RESULT, execution.execAsk());
final String message = MessageFactory.createMessage(
MessageCatalog._00111_UNKNOWN_QUERY_TYPE,
query.getQueryType());
LOGGER.error(message);
throw new IllegalArgumentException(message);
内容来源于网络,如有侵权,请联系作者删除!