datawave.webservice.query.Query.getQuery()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(194)

本文整理了Java中datawave.webservice.query.Query.getQuery方法的一些代码示例,展示了Query.getQuery的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getQuery方法的具体详情如下:
包路径:datawave.webservice.query.Query
类名称:Query
方法名:getQuery

Query.getQuery介绍

暂无

代码示例

代码示例来源:origin: NationalSecurityAgency/datawave

@Override
public String toString() {
  
  String host = System.getProperty("jboss.host.name");
  
  return new StringBuilder().append("host:").append(host).append(", id:").append(this.getSettings().getId()).append(", query:")
          .append(StringEscapeUtils.escapeHtml(this.getSettings().getQuery())).append(", auths:")
          .append(this.getSettings().getQueryAuthorizations()).append(", user:").append(this.getSettings().getOwner()).append(", queryLogic:")
          .append(this.getSettings().getQueryLogicName()).append(", name:").append(this.getSettings().getQueryName()).append(", pagesize:")
          .append(this.getSettings().getPagesize()).append(", begin:").append(this.getSettings().getBeginDate()).append(", end:")
          .append(this.getSettings().getEndDate()).append(", expiration:").append(this.getSettings().getExpirationDate()).append(", params: ")
          .append(this.getSettings().getParameters()).append(", callTime: ")
          .append((this.getTimeOfCurrentCall() == 0) ? 0 : System.currentTimeMillis() - this.getTimeOfCurrentCall()).toString();
  
}

代码示例来源:origin: NationalSecurityAgency/datawave

@Override
public List<String> extractSelectors(Query query) throws IllegalArgumentException {
  List<String> selectorList = new ArrayList<>();
  
  String selectorSeparator = this.separatorCharacter;
  if (this.separatorParameter != null) {
    QueryImpl.Parameter parameter = query.findParameter(separatorParameter);
    if (parameter != null && parameter.getParameterValue() != null) {
      String value = parameter.getParameterValue();
      if (StringUtils.isNotBlank(value) && value.length() == 1) {
        selectorSeparator = value;
      }
    }
  }
  
  String queryStr = query.getQuery();
  if (selectorSeparator == null) {
    selectorList.add(query.getQuery());
  } else {
    String[] querySplit = queryStr.split(selectorSeparator);
    for (int splitNumber = 0; splitNumber < querySplit.length; splitNumber++) {
      if (useSplitsList == null || useSplit(useSplitsList, splitNumber)) {
        String s = querySplit[splitNumber];
        selectorList.add(s.trim());
      }
    }
  }
  return selectorList;
}

代码示例来源:origin: NationalSecurityAgency/datawave

public QueryInformation(Query query, String queryStr) {
  Preconditions.checkNotNull(query);
  queryId = testAndSetOption(query.getId());
  queryLogicName = testAndSetOption(query.getQueryLogicName());
  queryName = testAndSetOption(query.getQueryName());
  if (null == queryStr)
    queryString = testAndSetOption(query.getQuery());
  else
    queryString = testAndSetOption(queryStr);
  queryUser = testAndSetOption(query.getOwner());
}

代码示例来源:origin: NationalSecurityAgency/datawave

public HudQuerySummary build(Query query) {
  HudQuerySummary summary = new HudQuerySummary();
  summary.setQueryLogicName(query.getQueryLogicName());
  summary.setId(query.getId().toString());
  summary.setQueryName(query.getQueryName());
  summary.setUserDN(query.getUserDN());
  summary.setQuery(query.getQuery());
  summary.setQueryAuthorizations(query.getQueryAuthorizations());
  summary.setExpirationDate(query.getExpirationDate().getTime());
  return summary;
}

代码示例来源:origin: NationalSecurityAgency/datawave

final String query = settings.getQuery().trim();
      throw new IllegalArgumentException("Query does not specify all needed parts: " + settings.getQuery()
              + ". Each space-delimited term should be of the form 'DOCUMENT:shardId/datatype/eventUID'.");
  throw new IllegalArgumentException("Query does not specify all needed parts: " + settings.getQuery()
          + ". At least one term required of the form 'DOCUMENT:shardId/datatype/eventUID'.");

代码示例来源:origin: NationalSecurityAgency/datawave

ps.setInt(x++, 10);
} else {
  ps.setString(x++, query.getQuery());
  if (query.getBeginDate() != null) {
    ps.setTimestamp(x++, new Timestamp(query.getBeginDate().getTime()));

代码示例来源:origin: NationalSecurityAgency/datawave

logger.trace("parseQuery");
String query = settings.getQuery();
String fieldName;
String fieldValue = null;

代码示例来源:origin: NationalSecurityAgency/datawave

private void addQueryToTrackingMap(Map<String,String> trackingMap, Query q) {
  
  if (trackingMap == null || q == null) {
    return;
  }
  
  if (q.getOwner() != null) {
    trackingMap.put("query.user", q.getOwner());
  }
  if (q.getId() != null) {
    trackingMap.put("query.id", q.getId().toString());
  }
  if (q.getId() != null) {
    trackingMap.put("query.query", q.getQuery());
  }
}

代码示例来源:origin: NationalSecurityAgency/datawave

private void addQueryToTrackingMap(Map<String,String> trackingMap, Query q) {
  
  if (trackingMap == null || q == null) {
    return;
  }
  
  if (q.getOwner() != null) {
    trackingMap.put("query.user", q.getOwner());
  }
  if (q.getId() != null) {
    trackingMap.put("query.id", q.getId().toString());
  }
  if (q.getId() != null) {
    trackingMap.put("query.query", q.getQuery());
  }
}

代码示例来源:origin: NationalSecurityAgency/datawave

jexlScript = JexlASTHelper.parseJexlQuery(query.getQuery());
} catch (Throwable t1) {
    node = luceneToJexlParser.parse(query.getQuery());
    String jexlQuery = node.getOriginalQuery();
    jexlScript = JexlASTHelper.parseJexlQuery(jexlQuery);

代码示例来源:origin: NationalSecurityAgency/datawave

public String getJexlQueryString(Query settings) throws ParseException {
  String originalQuery = settings.getQuery();

代码示例来源:origin: NationalSecurityAgency/datawave

config.setQueryString(query.getQuery());
config.setAuthorizations(auths);

代码示例来源:origin: NationalSecurityAgency/datawave

String queryString = settings.getQuery();
if (null == queryString) {
  throw new IllegalArgumentException("Query cannot be null");

代码示例来源:origin: NationalSecurityAgency/datawave

MetadataHelper metadataHelper = initializeMetadataHelper(connection, config.getMetadataTableName(), auths);
if (StringUtils.isEmpty(settings.getQuery())) {
  throw new IllegalArgumentException("Query cannot be null");
QueryNode node = parser.parse(settings.getQuery().trim());
  log.debug("Original Query = " + settings.getQuery().trim());
  log.debug("JEXL Query = " + node.getOriginalQuery());

代码示例来源:origin: NationalSecurityAgency/datawave

if (StringUtils.isEmpty(settings.getQuery())) {
  throw new IllegalArgumentException("Query cannot be null");
QueryNode node = parser.parse(settings.getQuery().trim());
  log.debug("Original Query = " + settings.getQuery().trim());
  log.debug("JEXL Query = " + node.getOriginalQuery());

代码示例来源:origin: NationalSecurityAgency/datawave

StringBuilder auditMessage = new StringBuilder();
auditMessage.append("User running secondary query on cached results of original query,");
auditMessage.append(" original query: ").append(query.getQuery());
auditMessage.append(", secondary query: ").append(sqlQuery);
MultivaluedMap<String,String> params = query.toMap();

相关文章