Package com.dtrules.interpreter

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


           
            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


            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

     */
    protected static void alias (IRObject o ,String n) {
        try {
            RName rn = RName.getRName(n);
            if(primitives.containsAttribute(rn)){
                System.err.println("Duplicate Operators defined for " + rn.stringValue());
              throw new RuntimeException("Duplicate definitions for " + rn.stringValue());
            }
            primitives.addAttribute(rn, "", o, false, true, o.type(),null,"operator","","");
            primitives.put(null, rn,o);
        } catch (RulesException e) {
View Full Code Here

    protected static void alias (IRObject o ,String n) {
        try {
            RName rn = RName.getRName(n);
            if(primitives.containsAttribute(rn)){
                System.err.println("Duplicate Operators defined for " + rn.stringValue());
              throw new RuntimeException("Duplicate definitions for " + rn.stringValue());
            }
            primitives.addAttribute(rn, "", o, false, true, o.type(),null,"operator","","");
            primitives.put(null, rn,o);
        } catch (RulesException e) {
            System.err.println("An Error occured in alias building the primitives Entity: "+n);
View Full Code Here

   */
  public List<String> getRulesets() {
    List<String> rulesets = new ArrayList<String>();
    for(Iterator it = rd.getRulesets().keySet().iterator(); it.hasNext();){
      RName name = (RName)it.next();
      rulesets.add(name.stringValue());
    }
    return rulesets;
  }

  /**
 
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));
                switch(e.getEntry(aname).type){
                   case IRObject.iEntity: {
                      if(value.type()==IRObject.iNull){
                          dtstate.traceInfo("value","type","null","value","null",null);
                          break;
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

            RName    n = ia.next();
            IRObject o = get(n);
            if(o==null){                // Protect ourselves from nulls.
                o = RNull.getRNull();
            }
            v +=n.stringValue()+" = "+get(n).stringValue()+"  ";
        }
        v +="}";
        return v;
       
  }
View Full Code Here

        while(attribs.hasNext()){
           RName attrib = attribs.next();
           if(attrib.equals(name))continue;     // Skip the self reference.
           REntityEntry entry = attributes.get(attrib);
           p.print("<entity attribute=\"");
           p.print(attrib.stringValue());
           p.print("\" type =\"");
           p.print(RSession.typeInt2Str(entry.type));
           p.print("\" cdd_default_value=\"");
           p.print(entry.defaulttxt);
           p.print("\" cdd_i_c=\"");
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.