Package com.dtrules.interpreter

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


         while(names.hasNext()){
             RName    name = names.next();
             IRObject v    = e.get(name);
             if(v.type()==IRObject.iArray && v.rArrayValue().size()==0) continue;
             String   vstr = v==null?"":v.stringValue();
             rpt.printdata("attribute","name",name.stringValue(), vstr);
         }
   }

   public void printArray(IXMLPrinter rpt, ArrayList<IRObject> entitypath, ArrayList<IRObject> printed, DTState state, String name, RArray rarray)throws RulesException{
View Full Code Here


           
            try{
                state.find(table).execute(state);
            }catch(NullPointerException e){
                throw new RulesException("undefined", "PerformCatchError",
                        "The table '"+table.stringValue()+"' is undefined");
            }catch(RulesException e){
                IRSession     session       = state.getSession();
                EntityFactory ef            = session.getEntityFactory();  
                IREntity      errorEntity   = ef.findRefEntity(error).clone(session).rEntityValue();
                state.entitypush(errorEntity);
View Full Code Here

        while(anames.hasNext()){
            try {
                RName        aname = anames.next();
                IRObject     value = e.get(aname);
               
                dtstate.traceTagBegin("attribute", "name",aname.stringValue(),"type",getType(e,aname));
                int type = e.getEntry(aname).type.getId();
               
               if(type == IRObject.iEntity) {
                      if(value.type().getId() == IRObject.iNull){
                          dtstate.traceInfo("value","type","null","value","null",null);
View Full Code Here

            IRObject value = state.find(name);
            if(value == null){
                throw new RulesException(
                        "undefined",
                        "Lookup",
                        "Could not find a value for "+name.stringValue()+" in the current context."
                );
            }
            state.datapush(value);
        }
    }
View Full Code Here

       int cnt = ret.length;
       for(int i = 0; i< cnt-1; i++){
         for(int j = 0; j < cnt-1-i; j++){
           RName one = ret[j];
           RName two = ret[j+1];
           if(one.stringValue().compareTo(two.stringValue())>0){
             RName hld = ret[j];
             ret[j]    = ret[j+1];
             ret[j+1= hld;
           }
         }
View Full Code Here

                  +"' is too complex, and must be split into two tables.");
              t = "Table too Big to Print";
              System.err.flush();
            }
            out.println();
            out.println(dtname.stringValue());
            out.println();
            out.println(t);
        }
    }
    /**
 
View Full Code Here

     
      Iterator<RName> es = this.map.entities.keySet().iterator();
      while(es.hasNext()){
        RName  ename = (RName) es.next();            
         try {
        IREntity e     = findEntity(ename.stringValue().toLowerCase(),null,null);
        state.entitypush(e);
       } catch (RulesException e) {
              state.traceInfo("error", "Failed to initialize the Entity Stack (Failed on "+ename+")\n"+e);
          throw new RuntimeException(e)
       }
View Full Code Here

             rpt.opentag("entity","name",entityName,"DTRulesId",e.getID()+"","id",idString);
             Iterator<RName> names = e.getAttributeIterator();
             while(names.hasNext()){
                 RName    name = names.next();
                 IRObject v    = e.get(name);
                 printIRObject(rpt, entitypath, printed, state, name.stringValue(), v);
             }
             rpt.closetag();
             entitypath.remove(entitypath.size()-1);
         }
     }
View Full Code Here

            RName dtname = dts.next();
            RDecisionTable dt = this.getEntityFactory().findDecisionTable(dtname);
            String t = dt.getBalancedTable().getPrintableTable();
           
            out.println();
            out.println(dtname.stringValue());
            out.println();
            out.println(t);
        }
    }
   
View Full Code Here

        RName entityTraceIDList = RName.getRName("entityTraceIdList");
        public void execute(DTState state) throws RulesException {
         
            RInteger id     = state.datapop().rIntegerValue();
          RName    ename  = state.datapop().rNameValue();
            String   key    = ename.stringValue().toLowerCase()+id.stringValue();
                    
            IREntity entity = state.getSession().createEntity(id, ename);
           
            state.datapush(entity);
        }
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.