Examples of RTable


Examples of com.dtrules.interpreter.RTable

        node.setMap(new HashMap<Object,Object>());
      }else{
          node.getMap().clear();
      }
     
        RTable result = (RTable) node.getTargetMap();
        Set<IRObject> keys = result.getTable().keySet();
        for(IRObject key : keys){
            Object thekey   = convert(key);
            Object thevalue = null;
            try {
                thevalue = convert(result.getValue(key));
            } catch (RulesException e) {}
            node.getMap().put(thekey, thevalue);
        }
    }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

        }
    }
   
    @Override
    public Object mapMap(AutoDataMap autoDataMap, LabelMap labelMap, MapNodeMap node){
        RTable rTable = null;
        try {
            RName rname = null;
            Object object = autoDataMap.getCurrentObject();
            if(object instanceof IREntity){
                IREntity entity = (IREntity) object;
                rname = mapName(autoDataMap, labelMap, node.getAttribute().getName() );
                IRObject olist = entity.get(rname);
                if(olist != null && olist.type() == IRObject.iTable){
                    rTable = olist.rTableValue();
                }
            }
            if(rTable == null){
                rTable = RTable.newRTable(autoDataMap.getSession().getEntityFactory(),
                        null , null, IRObject.iString);
            }
           
            node.setTargetMap(rTable);
            if(node.getMap() != null){
              Set<Object> keys = node.getMap().keySet();
              for(Object key : keys ){
                  rTable.setValue(iconvert(key),
                          iconvert(node.getMap().get(key).toString()));
              }
            }
        } catch (RulesException e) { }
       
View Full Code Here

Examples of com.dtrules.interpreter.RTable

        }
    }
   
    @Override
    public Object mapMap(AutoDataMap autoDataMap, LabelMap labelMap, MapNodeMap node){
        RTable rTable = null;
        try {
            RName rname = null;
            Object object = autoDataMap.getCurrentObject();
            if(object instanceof IREntity){
                IREntity entity = (IREntity) object;
                rname = mapName(autoDataMap, labelMap, node.getAttribute().getName() );
                IRObject olist = entity.get(rname);
                if(olist != null && olist.type().getId() == IRObject.iTable){
                    rTable = olist.rTableValue();
                }
            }
            if(rTable == null){
                rTable = RTable.newRTable(autoDataMap.getSession().getEntityFactory(),
                        null , null);
            }
           
            node.setTargetMap(rTable);
            if(node.getMap() != null){
              Set<Object> keys = node.getMap().keySet();
              for(Object key : keys ){
                  rTable.setValue(iconvert(key),
                          iconvert(node.getMap().get(key).toString()));
              }
            }
        } catch (RulesException e) { }
       
View Full Code Here

Examples of com.dtrules.interpreter.RTable

             while(state.getds(--d).type().getId()!=iTable)cnt++;
             RName []keys = new RName[cnt];
             for(int i=0;i<cnt;i++){
                keys[i]= state.datapop().rNameValue();
             }
             RTable rtable = state.datapop().rTableValue();
             state.datapush(rtable.getValue(keys));
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

     public static class GetWithKey extends ROperator {
         GetWithKey(){ super("getwithkey");}
        
         public void execute(DTState state) throws RulesException {
             IRObject key = state.datapop();
             RTable rtable = state.datapop().rTableValue();
             state.datapush(rtable.getValue(key));
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

     
         public void execute(DTState state) throws RulesException {
            
             IRObject   v      = state.datapop();                // Get the value to store
             IRObject   key    = state.datapop().rNameValue();
             RTable     rtable = state.datapop().rTableValue();
             rtable.setValue(key,v);
            
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

                
                 for(int i=0;i<cnt;i++){                        // Get all the keys off the data stack
                    keys[i]= state.datapop();
                 }
                
                 RTable rtable = state.datapop().rTableValue();
                
                 rtable.setValue(state,keys, v);                // Set the value.
             }else{
                 IRObject   key    = state.datapop();
                 RTable     rtable = state.datapop().rTableValue();
                 rtable.setValue(key,v);
             }
            
            
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

      */
     public static class GetKeysArray extends ROperator {
         GetKeysArray(){ super("getkeysarray");}
        
         public void execute(DTState state) throws RulesException {
             RTable rtable = state.datapop().rTableValue();
             state.datapush(rtable.getKeys(state));
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

      */
     public static class ClearTable extends ROperator {
         ClearTable(){ super("cleartable");}
        
         public void execute(DTState state) throws RulesException {
             RTable rtable = state.datapop().rTableValue();
             rtable.getTable().clear();
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

         NewTable(){ super("newtable");}
        
         public void execute(DTState state) throws RulesException {
             String type  = state.datapop().stringValue();
             RName  name  = state.datapop().rNameValue();
             RTable table = RTable.newRTable(state.getSession().getEntityFactory(),name,"");
             state.datapush(table);
         }
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.