Package com.dtrules.interpreter

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


                 rpt.printdata(entityName,"DTRulesId",printIds ? e.getID():"","id",e.get("mapping*key").stringValue(),"multiple reference")
         }else{
             entitypath.add(e);
             if(printed!=null) printed.add(e);
             IRObject id = e.get(RName.getRName("mapping*key"));
             String   idString = id!=null?id.stringValue():"--none--";
             rpt.opentag(entityName,"DTRulesId",printIds ? e.getID():"","id",idString);
             Set<RName> keys = e.getAttributeSet();
             RName akeys [] = sort(keys);
             for(RName name : akeys){
                 IRObject v    = e.get(name);
View Full Code Here


            public void execute(DTState state) throws RulesException {
        IRObject  value     = state.datapop();
        IRObject  attribute = state.datapop();
        XMLNode   xmlNode   = state.datapop().xmlTagValue();
        if(xmlNode != null){
            state.traceInfo("SetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute.stringValue(),"value",value.stringValue(), null);
            xmlNode.getAttribs().put(attribute.stringValue(), value.stringValue());
        }
      }
    }
    /**
 
View Full Code Here

        IRObject  value     = state.datapop();
        IRObject  attribute = state.datapop();
        XMLNode   xmlNode   = state.datapop().xmlTagValue();
        if(xmlNode != null){
            state.traceInfo("SetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute.stringValue(),"value",value.stringValue(), null);
            xmlNode.getAttribs().put(attribute.stringValue(), value.stringValue());
        }
      }
    }
    /**
         * GetXmlAttribute ( XmlValue Attribute --> Value )
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

      public void execute(DTState state) throws RulesException {
        IRObject  rarray = state.datapop();
                ArrayList array  = rarray.arrayValue();
        array.clear();
                if (state.testState(DTState.TRACE)){
                    state.traceInfo("clear","array",rarray.stringValue(),null);
                }
      }
    }   

      /**
 
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

         Set<RName> names = e.getAttributeSet();
         RName keys[] = sort(names);
         for(RName name : keys){
             IRObject v    = e.get(name);
             if(v.type().getId()==IRObject.iArray && v.rArrayValue().size()==0) continue;
             String   vstr = v==null?"":v.stringValue();
             rpt.printdata("attribute","name",name.stringValue(), vstr);
         }
   }

View Full Code Here

                 rpt.printdata(entityName,"DTRulesId",printIds ? e.getID():"","id",e.get("mapping*key").stringValue(),"multiple reference")
         }else{
             entitypath.add(e);
             if(printed!=null) printed.add(e);
             IRObject id = e.get(RName.getRName("mapping*key"));
             String   idString = id!=null?id.stringValue():"--none--";
             rpt.opentag(entityName,"DTRulesId",printIds ? e.getID():"","id",idString);
             Set<RName> keys = e.getAttributeSet();
             RName akeys [] = sort(keys);
             for(RName name : akeys){
                 IRObject v    = e.get(name);
View Full Code Here

      String pattern = state.datapop().stringValue();
      IRObject obj1 = state.datapop();
      String v = "";
      if (obj1.type().getId() != IRObject.iNull) {
        v = obj1.stringValue().trim();
      }
      String[] results = v.split(pattern);

      RArray r = RArray.newArray(state.getSession(), false, false);
      for (String t : results) {
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.