Examples of QueryModel


Examples of com.sm.framework.util.queryModel.QueryModel

   * @param operation
   * @param page
   * @return 2012-12-9 ����9:31:47 ��С��
   */
  public List<Operation> queryOprationListPage(Operation operation, Page page) {
    QueryModel queryModel = new QueryModel();
    if (null != operation) {
      queryModel.combLike("title", operation.getTitle());
      queryModel.combLike("module", operation.getModule());
      queryModel.combLike("resource", operation.getResource());
    }
    queryModel.setOrder("id DESC");
    return super.queryPageByModel(queryModel, page);
  }
View Full Code Here

Examples of net.sf.jz3950.query.model.QueryModel

    }

    public QueryModel toQueryModel() throws InvalidQueryException
    {
        StreamTokenizer tokenizer = createTokenizer(new StringReader(this.prefixString));
        QueryModel result = new QueryModel();
        int currentToken = readToken(tokenizer);

        if (currentToken == PrefixQuery.TOKEN_ATTRSET)
        {
            // Consume the Attrset token
            currentToken = readToken(tokenizer);

            String attributeSet = tokenizer.sval;

            // Consume the namespace value token
            currentToken = readToken(tokenizer);

            QueryModelNamespaceNode namespaceNode = new QueryModelNamespaceNode();
            result.setRoot(namespaceNode);
            namespaceNode.setAttributeSet(attributeSet);
            namespaceNode.setRoot(visitPrefixQuery(tokenizer, currentToken, attributeSet));
        }
        else
        {
            result.setRoot(visitPrefixQuery(tokenizer, currentToken, "bib-1"));
        }

        return result;
    }
View Full Code Here

Examples of net.sf.jz3950.query.model.QueryModel

        this.rootNode = rootNode;
    }

    public QueryModel toQueryModel() throws InvalidQueryException
    {
        return new QueryModel(translate(this.rootNode));
    }
View Full Code Here

Examples of nickyb.sqleonardo.querybuilder.QueryModel

    this.designTimeContext = designTimeContext;
    this.connectionProvider = jndiSource;

    try
    {
      final QueryModel queryModel = SQLParser.toQueryModel(query);
      queryBuilder.setQueryModel(queryModel);
    }
    catch (Exception e1)
    {
      log.warn("QueryPanel.actionPerformed ", e1);
    }

    try
    {
      if (schema != null)
      {
        final QueryModel qm = queryBuilder.getQueryModel();
        qm.setSchema(schema);
        queryBuilder.setQueryModel(qm);
      }
    }
    catch (Exception e1)
    {
View Full Code Here

Examples of nickyb.sqleonardo.querybuilder.QueryModel

    this.confirmed = false;
    this.connectionProvider = jndiSource;

    try
    {
      final QueryModel queryModel = SQLParser.toQueryModel(query);
      queryBuilder.setQueryModel(queryModel);
    }
    catch (Exception e1)
    {
      log.warn("QueryPanel.actionPerformed ", e1);
    }

    try
    {
      if (schema != null)
      {
        final QueryModel qm = queryBuilder.getQueryModel();
        qm.setSchema(schema);
        queryBuilder.setQueryModel(qm);
      }
    }
    catch (Exception e1)
    {
View Full Code Here

Examples of org.jzkit.search.util.QueryModel

                             Map<String,AttrValue> transforms,
                             QueryModel qm,
                             String target_cql) throws org.jzkit.search.util.Profile.ProfileServiceException, org.jzkit.search.util.QueryModel.InvalidQueryException {

    org.jzkit.search.util.Profile.ProfileService ps = (org.jzkit.search.util.Profile.ProfileService) ctx.getBean("ProfileService");
    QueryModel new_qm = ps.makeConformant(qm,valid_attributes,transforms,null);
    String new_cql = transform(new_qm,ctx);
    log.debug(" testing "+qm.toString()+" -> "+new_cql+" (want "+target_cql+")");
    if ( new_cql.equals(target_cql) ) {
      log.debug(" PASS ");
    }
View Full Code Here

Examples of org.jzkit.search.util.QueryModel

      // Do a search
      org.jzkit.search.impl.StatelessQueryService sqs = svc.getStatelessQueryService();

      String result_set_id = null;
      QueryModel model = new org.jzkit.search.util.QueryModel.PrefixString.PrefixString("@attrset bib-1 @attr 1=4 Science");
      LandscapeSpecification landscape = new org.jzkit.search.landscape.SimpleLandscapeSpecification(collection_ids);
      int first_hit = 1;
      int num_hits = 10;
      RecordFormatSpecification rfs = null;
      ExplicitRecordFormatSpecification display_spec = null;
View Full Code Here

Examples of org.jzkit.search.util.QueryModel

    app_context = new ClassPathXmlApplicationContext( "TestApplicationContext.xml" );
  }

  public void testSimplePrefix() throws Exception {
    System.err.println("\n\ntestSimplePrefix\n\n");
    QueryModel qm = new org.jzkit.search.util.QueryModel.PrefixString.PrefixString("@attrset bib-1 @attr 1=4 science");
    System.err.println("Result of parse = "+qm.toString());
    InternalModelRootNode imrn = qm.toInternalQueryModel(app_context);
    System.err.println("Internal Model = "+imrn);
    System.err.println("Internal Model using RPN Visitor = "+org.jzkit.search.util.QueryModel.PrefixString.PrefixQueryVisitor.toPQF(imrn));
  }
View Full Code Here

Examples of org.jzkit.search.util.QueryModel

    System.err.println("Internal Model using RPN Visitor = "+org.jzkit.search.util.QueryModel.PrefixString.PrefixQueryVisitor.toPQF(imrn));
  }

  public void testBooleanPrefix() throws Exception {
    System.err.println("\n\ntestBooleanPrefix\n\n");
    QueryModel qm = new org.jzkit.search.util.QueryModel.PrefixString.PrefixString("@attrset bib-1 @and @attr 1=4 science @attr 1=2 beer");
    System.err.println("Result of parse = "+qm.toString());
    InternalModelRootNode imrn = qm.toInternalQueryModel(app_context);
    System.err.println("Internal Model = "+imrn);
    System.err.println("Internal Model using RPN Visitor = "+org.jzkit.search.util.QueryModel.PrefixString.PrefixQueryVisitor.toPQF(imrn));
  }
View Full Code Here

Examples of org.jzkit.search.util.QueryModel

    // Here we need to get an instance of CQLQuery.. So if thats not what we have been passed,
    // this is the place to create one.
    log.fine("Class of IRQuery: "+q.getQueryModel().getClass().getName());

    CQLString cql_string = null;
    QueryModel qm = q.getQueryModel();

    if ( qm instanceof CQLString )
      cql_string = (CQLString)qm;
    else
      cql_string = CQLBuilder.buildFrom(qm, ctx);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.