Examples of CQLRelation


Examples of org.z3950.zing.cql.CQLRelation

            {
                logger.debug("Using default qualifier: " + DEFAULT_QUALIFIER);
                attributePlusTermNode.setAttribute("bib-1.1", DEFAULT_QUALIFIER);
            }

            CQLRelation relation = cqlTermNode.getRelation();

            if (relation != null)
            {
                if (relation.getBase() != null)
                {
                    if (relation.getBase().equalsIgnoreCase("src"))
                    {
                        attributePlusTermNode.setAttribute("bib-1.2", new AttributeValue("="));
                    }
                    else if (relation.getBase().equalsIgnoreCase("exact"))
                    {
                        attributePlusTermNode.setAttribute("bib-1.2", new AttributeValue("="));
                    }
                    else if (relation.getBase().equalsIgnoreCase("all"))
                    {
                        attributePlusTermNode.setAttribute("bib-1.2", new AttributeValue("="));
                    }
                    else if (relation.getBase().equalsIgnoreCase("any"))
                    {
                        attributePlusTermNode.setAttribute("bib-1.2", new AttributeValue("="));
                    }
                    else
                    {
                        attributePlusTermNode.setAttribute("bib-1.2", new AttributeValue(relation.getBase()));
                    }

                    logger.debug("Modifiers: " + relation.getModifiers());
                }
            }

            result = attributePlusTermNode;
        }
View Full Code Here

Examples of org.z3950.zing.cql.CQLRelation

        }
        else if (node instanceof QueryModelAPTNode)
        {
            QueryModelAPTNode attributPlusTermNode = (QueryModelAPTNode) node;

            CQLRelation relation = null;

            if (attributPlusTermNode.getAttribute("bib-1.2") != null)
            {
                relation = new CQLRelation(attributPlusTermNode.getAttribute("bib-1.2").toString());
            }
            else
            {
                relation = new CQLRelation("=");
            }

            String qualifier = null;
            Object accessPointNode = attributPlusTermNode.getAttribute("bib-1.1");
View Full Code Here

Examples of org.z3950.zing.cql.CQLRelation

      results = resultsLeft;
    }   
    else if ( node instanceof CQLTermNode ) {
      CQLTermNode term = (CQLTermNode)node;
      boolean exactMatch = term.getRelation().getBase().equals("==");
      CQLRelation relation = term.getRelation();
      String index = term.getIndex();
      if ( index.startsWith("tb.title") ) {
        results.addAll(doSearch(request, response, SearchType.byTitle, errors, term.getTerm(),exactMatch,relation));
      } else if ( index.equals("tb.identifier.study") ) {
        results.addAll(doSearch(request, response, SearchType.byID, errors, term.getTerm(),exactMatch,relation));
View Full Code Here

Examples of org.z3950.zing.cql.CQLRelation

      return node;
    }
    else if ( node instanceof CQLTermNode ) {
      String index = ((CQLTermNode)node).getIndex();
      String term = ((CQLTermNode)node).getTerm();
      CQLRelation relation = ((CQLTermNode)node).getRelation();
      Map<String,String> mapping = getPredicateMapping();
      for ( String key : mapping.keySet() ) {
        index = index.replaceAll(key, mapping.get(key));
      }
      return new CQLTermNode(index,relation,term);
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.