org.apache.oodt.cas.filemgr.structs.Query.addCriterion()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(275)

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

Query.addCriterion介绍

暂无

代码示例

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(JOB_ID, this.jobId);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: apache/oodt

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(JOB_ID, this.jobId);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: apache/oodt

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(FILENAME, this.fileName);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(PRODUCT_NAME, this.prodName);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(INPUT_FILES,
  4. this.origInputFile);
  5. query.addCriterion(crit);
  6. return query;
  7. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(FILENAME, this.fileName);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(OUTPUT_FILES,
  4. this.origOutputFile);
  5. query.addCriterion(crit);
  6. return query;
  7. }

代码示例来源:origin: apache/oodt

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(INPUT_FILES,
  4. this.origInputFile);
  5. query.addCriterion(crit);
  6. return query;
  7. }

代码示例来源:origin: apache/oodt

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(PRODUCT_NAME, this.prodName);
  4. query.addCriterion(crit);
  5. return query;
  6. }

代码示例来源:origin: apache/oodt

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. TermQueryCriteria crit = new TermQueryCriteria(OUTPUT_FILES,
  4. this.origOutputFile);
  5. query.addCriterion(crit);
  6. return query;
  7. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. private List<Product> getProductsOverDateRange(String elementName, String productType,
  2. String startOfQuery, String endOfQuery) throws CacheException {
  3. List<Product> products = new Vector<Product>();
  4. try {
  5. Query query = new Query();
  6. query.addCriterion(new RangeQueryCriteria(elementName,
  7. startOfQuery, endOfQuery));
  8. if(this.uniqueElementProductTypeNames != null &&
  9. this.uniqueElementProductTypeNames.size() > 0){
  10. for (String productTypeName : this.uniqueElementProductTypeNames) {
  11. products.addAll(getProducts(query, productTypeName));
  12. }
  13. }
  14. } catch (Exception e) {
  15. throw new CacheException("Failed to query for product via element "
  16. + elementName + " and range " + startOfQuery + " to "
  17. + endOfQuery + " : " + e.getMessage(), e);
  18. }
  19. return products;
  20. }

代码示例来源:origin: apache/oodt

  1. private List<Product> getProductsOverDateRange(String elementName, String productType,
  2. String startOfQuery, String endOfQuery) throws CacheException {
  3. List<Product> products = new Vector<Product>();
  4. try {
  5. Query query = new Query();
  6. query.addCriterion(new RangeQueryCriteria(elementName,
  7. startOfQuery, endOfQuery));
  8. if(this.uniqueElementProductTypeNames != null &&
  9. this.uniqueElementProductTypeNames.size() > 0){
  10. for (String productTypeName : this.uniqueElementProductTypeNames) {
  11. products.addAll(getProducts(query, productTypeName));
  12. }
  13. }
  14. } catch (Exception e) {
  15. throw new CacheException("Failed to query for product via element "
  16. + elementName + " and range " + startOfQuery + " to "
  17. + endOfQuery + " : " + e.getMessage(), e);
  18. }
  19. return products;
  20. }

代码示例来源:origin: org.apache.oodt/oodt-profile

  1. crit.setElementName(elemName);
  2. crit.setValue(elemValue);
  3. query.addCriterion(crit);

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. throws CacheException {
  2. Query query = new Query();
  3. query.addCriterion(new TermQueryCriteria(uniqueElementName,
  4. uniqueElementValue));
  5. try {

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. Term t = ((TermQuery) luceneQuery).getTerm();
  2. if (!t.field().equals(freeTextBlock)) {
  3. casQuery.addCriterion(new TermQueryCriteria(t.field(),
  4. t.text()));
  5. if (!t[0].field().equals(freeTextBlock)) {
  6. for (Term aT : t) {
  7. casQuery.addCriterion(new TermQueryCriteria(
  8. aT.field(), aT.text()));
  9. BytesRef startT = ((TermRangeQuery) luceneQuery).getLowerTerm();
  10. BytesRef endT = ((TermRangeQuery) luceneQuery).getUpperTerm();
  11. casQuery.addCriterion(new RangeQueryCriteria(((TermRangeQuery) luceneQuery).getField(), startT.utf8ToString(), endT.utf8ToString()));
  12. } else if (luceneQuery instanceof BooleanQuery) {
  13. List<BooleanClause> clauses = ((BooleanQuery) luceneQuery).clauses();

代码示例来源:origin: apache/oodt

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. RangeQueryCriteria crit = new RangeQueryCriteria();
  4. crit.setElementName(this.temporalFld);
  5. crit.setInclusive(true);
  6. if (this.startDateTime != null) {
  7. crit.setStartValue(this.startDateTime);
  8. }
  9. if (this.endDateTime != null) {
  10. crit.setEndValue(this.endDateTime);
  11. }
  12. query.addCriterion(crit);
  13. return query;
  14. }

代码示例来源:origin: apache/oodt

  1. Term t = ((TermQuery) luceneQuery).getTerm();
  2. if (!t.field().equals(freeTextBlock)) {
  3. casQuery.addCriterion(new TermQueryCriteria(t.field(),
  4. t.text()));
  5. if (!t[0].field().equals(freeTextBlock)) {
  6. for (Term aT : t) {
  7. casQuery.addCriterion(new TermQueryCriteria(
  8. aT.field(), aT.text()));
  9. BytesRef startT = ((TermRangeQuery) luceneQuery).getLowerTerm();
  10. BytesRef endT = ((TermRangeQuery) luceneQuery).getUpperTerm();
  11. casQuery.addCriterion(new RangeQueryCriteria(((TermRangeQuery) luceneQuery).getField(), startT.utf8ToString(), endT.utf8ToString()));
  12. } else if (luceneQuery instanceof BooleanQuery) {
  13. List<BooleanClause> clauses = ((BooleanQuery) luceneQuery).clauses();

代码示例来源:origin: org.apache.oodt/pcs-core

  1. public Query buildQuery() {
  2. Query query = new Query();
  3. RangeQueryCriteria crit = new RangeQueryCriteria();
  4. crit.setElementName(this.temporalFld);
  5. crit.setInclusive(true);
  6. if (this.startDateTime != null) {
  7. crit.setStartValue(this.startDateTime);
  8. }
  9. if (this.endDateTime != null) {
  10. crit.setEndValue(this.endDateTime);
  11. }
  12. query.addCriterion(crit);
  13. return query;
  14. }

代码示例来源:origin: org.apache.oodt/cas-filemgr

  1. if (!t.field().equals(freeTextBlock)) {
  2. casQuery
  3. .addCriterion(new TermQueryCriteria(t.field(), t.text()));
  4. if (!t[0].field().equals(freeTextBlock)) {
  5. for (Term aT : t) {
  6. casQuery.addCriterion(new TermQueryCriteria(aT.field(),
  7. aT.text()));
  8. casQuery.addCriterion(new RangeQueryCriteria(((TermRangeQuery) luceneQuery).getField(), startT.utf8ToString(), endT.utf8ToString()));
  9. } else if (luceneQuery instanceof BooleanQuery) {
  10. List<BooleanClause> clauses = ((BooleanQuery) luceneQuery).clauses();

代码示例来源:origin: apache/oodt

  1. if (!t.field().equals(freeTextBlock)) {
  2. casQuery
  3. .addCriterion(new TermQueryCriteria(t.field(), t.text()));
  4. if (!t[0].field().equals(freeTextBlock)) {
  5. for (Term aT : t) {
  6. casQuery.addCriterion(new TermQueryCriteria(aT.field(),
  7. aT.text()));
  8. casQuery.addCriterion(new RangeQueryCriteria(((TermRangeQuery) luceneQuery).getField(), startT.utf8ToString(), endT.utf8ToString()));
  9. } else if (luceneQuery instanceof BooleanQuery) {
  10. List<BooleanClause> clauses = ((BooleanQuery) luceneQuery).clauses();

相关文章