Examples of bool()


Examples of org.apache.xpath.objects.XObject.bool()

      // iteration; changing xsl:if to fire one regardless of true/false

      if (transformer.getDebug())
        transformer.getTraceManager().fireTraceEvent(this);

      if (test.bool())
      {
        transformer.executeChildTemplates(this, true);       
      }

      if (transformer.getDebug())
View Full Code Here

Examples of org.apache.xpath.objects.XObject.bool()

            node = ni.nextNode();
            break;

          case XObject.CLASS_BOOLEAN :
            ni = EMPTY_NODE_ITERATOR;
            node = new Boolean(xobject.bool());
            break;

          case XObject.CLASS_STRING :
            ni = EMPTY_NODE_ITERATOR;
            node = xobject.str();
View Full Code Here

Examples of org.apache.xpath.objects.XObject.bool()

            //For compliance with legacy behavior where selecting an empty node returns true,
            //selectNodeIterator is attempted in case of a failure.

            CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
            XObject result = cachedXPathAPI.eval(doc, xpath);
            if (result.bool())
              return true;
            else {
              NodeIterator iterator = cachedXPathAPI.selectNodeIterator(doc, xpath);
              return (iterator.nextNode() != null);
            }
View Full Code Here

Examples of org.apache.xpath.objects.XObject.bool()

      if (TransformerImpl.S_DEBUG)
        transformer.getTraceManager().fireSelectedEvent(sourceNode, this,
                "test", m_test, test);

      if (test.bool())
      {
        // Note that there was a bad incompatibility with xsl:if...
        // which was called whether the test was successful or not. 
        // With the current logic of xsl:for-each,
        // if the node-set is empty trace will not be called at all.
View Full Code Here

Examples of org.apache.xpath.objects.XObject.bool()

          if (TransformerImpl.S_DEBUG)
            transformer.getTraceManager().fireSelectedEvent(sourceNode, when,
                    "test", when.getTest(), test);

          if (test.bool())
          {
            transformer.getTraceManager().fireTraceEvent(when);
           
            transformer.executeChildTemplates(when, true);
View Full Code Here

Examples of org.apache.xpath.objects.XObject.bool()

          if(m_predicates[i].isStableNumber() && i == nPredicates - 1)
          {
            m_foundLast = true;
          }
        }
        else if (!pred.bool())
          return false;

        countProximityPosition(++m_predicateIndex);
      }
    }
View Full Code Here

Examples of org.compass.core.CompassQueryBuilder.bool()

     * @param clazzes
     * @return
     */
    public CompassQuery buildPolyClassQuery(CompassSession compassSession, Collection clazzes) {
        CompassQueryBuilder queryBuilder = compassSession.queryBuilder();
        CompassQueryBuilder.CompassBooleanQueryBuilder instanceBoolBuilder = queryBuilder.bool();
        for (Iterator iter = clazzes.iterator(); iter.hasNext(); ) {
            Class clz = (Class) iter.next();
            instanceBoolBuilder.addShould(
                queryBuilder.term("$/poly/class", clz.getName())
            );
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.bool()

  public static IMap toRascalModifiers(int stateMask,IMap prevMap,IEvaluatorContext ctx){
    IValueFactory vf = ValueFactoryFactory.getValueFactory();
    for(int i = 0 ; i < modifiers.length ;i++){
      Type controlType = modifiers[i];
      IValue cons = vf.constructor(controlType);
      prevMap = prevMap.put(cons, vf.bool((stateMask & modifiersSWT[i]) != 0));
    }
    return prevMap;
  }
 
  public static IValue toRascalKey(KeyEvent e,IEvaluatorContext ctx){
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.bool()

        if (!dt.isTime()) {
          return makeResult(getTypeFactory().integerType(), vf.integer(getValue().getCentury()), ctx);
        }
        throw new UnsupportedOperation("Can not retrieve the century on a time value",ctx.getCurrentAST());
      } else if (name.equals("isDate")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isDate()), ctx);
      } else if (name.equals("isTime")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isTime()), ctx);
      } else if (name.equals("isDateTime")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isDateTime()), ctx);
      } else if (name.equals("justDate")) {
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.bool()

        }
        throw new UnsupportedOperation("Can not retrieve the century on a time value",ctx.getCurrentAST());
      } else if (name.equals("isDate")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isDate()), ctx);
      } else if (name.equals("isTime")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isTime()), ctx);
      } else if (name.equals("isDateTime")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isDateTime()), ctx);
      } else if (name.equals("justDate")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().dateTimeType(),
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.