Examples of CQLParser


Examples of org.z3950.zing.cql.CQLParser

        title=dbProperties.getProperty("SRWFileSystemDatabase.title");
        schemaName=dbProperties.getProperty("SRWFileSystemDatabase.schemaName");
        schemaID=dbProperties.getProperty("SRWFileSystemDatabase.schemaID");
        schemaLocation=dbProperties.getProperty("SRWFileSystemDatabase.schemaLocation");
        directory=new File(dbHome);
        parser=new CQLParser(CQLParser.V1POINT1);
        getFilenames();
        log.debug("leaving SRWFileSystemDatabase.init");
        return;
    }
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

        String scanClause=request.getScanClause();
        log.info("scanClause="+scanClause);
        if(scanClause!=null) {
            ert.setScanClause(scanClause);
            try {
                CQLTermNode node=Utilities.getFirstTerm(new CQLParser(CQLParser.V1POINT1).parse(scanClause));
                if(node!=null) {
                    SearchClauseType sct=new SearchClauseType();
                    sct.setTerm(node.getTerm());
                    RelationType rt=new RelationType();
                    rt.setValue(node.getRelation().getBase());
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

    /**
     * Test of getFirstTerm method, of class ORG.oclc.os.SRW.Utilities.
     */
    public void testGetFirstTerm() throws Exception {
        CQLParser parser = new CQLParser();       
        CQLNode rootNode=parser.parse("dog");
        assertEquals("dog", Utilities.getFirstTerm(rootNode).getTerm());

        rootNode=parser.parse("dog or cat and mouse");
        assertEquals("dog", Utilities.getFirstTerm(rootNode).getTerm());
    }
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

        String output = "XCQL";
        if (!args[1].isEmpty())
            output = args[1].getStringValue();
       
          try {
        CQLParser parser = new CQLParser(CQLParser.V1POINT2);
//          String local_full_query_string = query;
//          local_full_query_string = local_full_query_string.replace("-", "%2D");
          CQLNode query_cql = parser.parse(query);
          if (output.equals(OutputTypeXCQL)) {
        String xmlContent = query_cql.toXCQL();
        if (xmlContent.length() == 0) {
      return Sequence.EMPTY_SEQUENCE;
        }
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

  }

  @Override
  protected ModelAndView handleQueryRequest(HttpServletRequest request,HttpServletResponse response,BindException errors, String query) throws CQLParseException, IOException, InstantiationException {
    //String query = request.getParameter("query");       
    CQLParser parser = new CQLParser();
    CQLNode root = parser.parse(query);
    root = normalizeParseTree(root);
    Set<Matrix> queryResults = doCQLQuery(root, new HashSet<Matrix>(),request, response, errors);
    MatrixSearchResults tsr = new MatrixSearchResults(queryResults);
    saveSearchResults(request, tsr);
    if ( TreebaseUtil.isEmpty(request.getParameter("format")) || ! request.getParameter("format").equals("rss1") ) {
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

  @Override
  protected ModelAndView handleQueryRequest(HttpServletRequest request,
      HttpServletResponse response, BindException errors, String query)
      throws CQLParseException, IOException, InstantiationException {
    //String query = request.getParameter("query");
    CQLParser parser = new CQLParser();
    CQLNode root = parser.parse(query);
    root = normalizeParseTree(root);
    Set<PhyloTree> queryResults = doCQLQuery(root, new HashSet<PhyloTree>(),request, response, errors);
    TreeSearchResults tsr = new TreeSearchResults(queryResults);
    saveSearchResults(request, tsr);
    if ( TreebaseUtil.isEmpty(request.getParameter("format")) || ! request.getParameter("format").equals("rss1") ) {     
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

  @Override
  protected ModelAndView handleQueryRequest(HttpServletRequest request,
      HttpServletResponse response, BindException errors, String query)
      throws CQLParseException, IOException, InstantiationException {
    //
    CQLParser parser = new CQLParser();
    CQLNode root = parser.parse(query);
    root = normalizeParseTree(root);
    HashSet<PhyloTree> queryResults = doCQLQuery(root, new HashSet<PhyloTree>(),request, response, errors);
    TreeSearchResults tsr = new TreeSearchResults(queryResults);
    saveSearchResults(request, tsr);
   
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

    public CqlQuery(String cqlQuery)
    {
        try
        {
            logger.debug("Parsing CQL query: " + cqlQuery);
            this.rootNode = new CQLParser().parse(cqlQuery);
        }
        catch (CQLParseException e)
        {
            logger.error("CQL parsing error", e);
        }
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

  @Override
  protected ModelAndView handleQueryRequest(HttpServletRequest request,
      HttpServletResponse response, BindException errors,String query)
      throws CQLParseException, IOException, InstantiationException, ParseException {
    //String query = request.getParameter("query");           
    CQLParser parser = new CQLParser();
    CQLNode root = parser.parse(query);
    root = normalizeParseTree(root);
    Set<Study> queryResults = doCQLQuery(root, new HashSet<Study>(),request, response, errors);
    StudySearchResults tsr = new StudySearchResults(queryResults);
    if ( TreebaseUtil.isEmpty(request.getParameter("format")) || ! request.getParameter("format").equals("rss1") ) {
      saveSearchResults(request, tsr);
View Full Code Here

Examples of org.z3950.zing.cql.CQLParser

  @Override
  protected ModelAndView handleQueryRequest(HttpServletRequest request,
      HttpServletResponse response, BindException errors, String query)
      throws CQLParseException, IOException, InstantiationException {
    //String query = request.getParameter("query");
    CQLParser parser = new CQLParser();
    CQLNode root = parser.parse(query);
    root = normalizeParseTree(root);
    Set<Taxon> queryResults = doCQLQuery(root, new HashSet<Taxon>(),request);
    TaxonSearchResults tsr = new TaxonSearchResults(queryResults);
    saveSearchResults(request, tsr);
    if ( TreebaseUtil.isEmpty(request.getParameter("format")) ||
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.