Package com.dtrules.interpreter

Examples of com.dtrules.interpreter.IRObject.stringValue()


            throw new RulesException("Data Stack Underflow", "datapop()", "Data Stack underflow.");
        }
        IRObject rval = datastk[--datastkptr];
        datastk[datastkptr] = null;
        if (testState(VERBOSE)) {
            traceInfo("datapop", rval.stringValue());
        }
        return (rval);
    }

    /**
 
View Full Code Here


    public static class Newdate extends ROperator {
      Newdate(){super("newdate");}

      public void execute(DTState state) throws RulesException {
          IRObject obj   = state.datapop();
          String   date  = obj.stringValue();
        try{
          RDate rdate = RDate.getRDate(state.getSession(), date);
          state.datapush(rdate);
        }catch(RulesException e){
          state.datapush(RNull.getRNull());
View Full Code Here

      throw new RulesException( "Data Stack Underflow", "datapop()", "Data Stack underflow.");
    }
        IRObject rval = datastk[--datastkptr];
        datastk[datastkptr]=null;
        if((state | VERBOSE) != 0){
            traceInfo("datapop",rval.stringValue());
        }
    return(rval);
  }
 
  /**
 
View Full Code Here

                      e = autoDataMap.getSession().createEntity(null,entity);
                      autoDataMap.getEntities().put(entity,e);   // Remember the one we created, so we
                   }  
               }                                              //   don't create another one.
           }else {
               String skey = entity+"$"+iKey.stringValue();
               if(key!=null &&
                   !(key instanceof String
                       && ((String)key).length()==0)) {                // NOTE: We are NOT allowing "" as a key here!
                                                                         // If so, construct a key for that entity
                   e = (IREntity)autoDataMap.getEntities().get(skey);    //    and look for it.
View Full Code Here

        Allocate(){super("allocate"); alias("cpush");}

        public void execute(DTState state) throws RulesException {
            IRObject v = state.datapop();
            if(state.testState(DTState.TRACE)){
                state.traceInfo("allocate", "value",v.stringValue(),null);
            }
            state.cpush(v);
        }
    } 
   
View Full Code Here

        public void execute(DTState state) throws RulesException {
            int      index = state.datapop().intValue();
            IRObject value = state.getFrameValue(index);
            if(state.testState(DTState.TRACE)){
                state.traceInfo("local_fetch", "index",index+"","value",value.stringValue(),null);
            }
            state.datapush(value);
        }
    }
    /**
 
View Full Code Here

        public void execute(DTState state) throws RulesException {
            int      index = state.datapop().intValue();
            IRObject value = state.datapop();
            if(state.testState(DTState.TRACE)){
                state.traceInfo("local_store", "index",index+"","value",value.stringValue(),null);
            }
            state.setFrameValue(index, value);
        }
    }
View Full Code Here

        public void execute(DTState state) throws RulesException {
            IRObject value = state.datapop();
            throw new RulesException(
                        "throwException",
                        "ThrowExceiption.execute()",
                        value.stringValue());
        }
    }
}
View Full Code Here

                          }else{
                              dtstate.traceInfo("value","v",v.stringValue(),null);
                          }
                      }
               } else {
                       dtstate.traceInfo("value","v",value.stringValue(),null);
               }
               
                dtstate.traceTagEnd();
            } catch (RulesException e1) {
                dtstate.debug("Rules Engine Exception\n");
View Full Code Here

 
 
   public void printEntity(IXMLPrinter rpt, String tag, IREntity e) throws Exception {
       if(tag==null)tag = e.getName().stringValue();
       IRObject id = e.get(RName.getRName("mapping*key"));
       String   idString = id!=null?id.stringValue():"--none--";
         rpt.opentag(tag,"DTRulesId",e.getID()+"","id",printIds ? idString : "");
         Set<RName> names = e.getAttributeSet();
         RName keys[] = sort(names);
         for(RName name : keys){
             IRObject v    = e.get(name);
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.