Package com.dtrules.interpreter

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


         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

        public void execute(DTState state) throws RulesException {
            IRObject o = state.datapop();
            if(o.type().getId() == iNull){
                state.datapush(o);
            }else{
                state.datapush(RString.newRString(o.stringValue()));
            }
        }
    }
    /**
     * ( Object -- String ) Converts to a Name.  Returns a null if no valid
View Full Code Here

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

      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

            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

    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

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.