Package com.dtrules.interpreter

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


        for(int i=0; i< refs.size(); i++){
            if(refs.get(i).equals(POSSIBLE_REF)){
                RName entityName = entities.get(i).getName();
                // Ignore self references.
                if(!entityName.equals(name)){
                    attribs.add(entityName.stringValue()+"."+name.stringValue());
               
            }
        }
        return attribs;
    }
View Full Code Here


          RName a = RName.getRName(attr);                
          IRObject value;
                    
                    IREntity enclosingEntity = session.getState().findEntity(a);
                    if(enclosingEntity==null){
                        throw new Exception ("No Entity is in the context that defines "+ a.stringValue());
                    }
          int type = enclosingEntity.getEntry(a).type.getId();
         
          if(type == IRObject.iInteger){
            value = RInteger.getRIntegerValue(getLong(body));
View Full Code Here

        for(int i=0; i< refs.size(); i++){
            if(refs.get(i).equals(NOT_REF)){
                RName entityName = entities.get(i).getName();
                // Ignore self references.
                if(!entityName.equals(name)){
                  unreferenced.add(entityName.stringValue()+"."+name.stringValue());
               
            }
        }
        return unreferenced;
    }
View Full Code Here

        for(int i=0; i< refs.size(); i++){
            if(refs.get(i).equals(POSSIBLE_REF)){
                RName entityName = entities.get(i).getName();
                // Ignore self references.
                if(!entityName.equals(name)){
                    attribs.add(entityName.stringValue()+"."+name.stringValue());
               
            }
        }
        return attribs;
    }
View Full Code Here

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

  /**
 
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(entry.type.toString());
           p.print("\" cdd_default_value=\"");
           p.print(entry.defaulttxt);
           p.print("\" cdd_i_c=\"");
View Full Code Here

          RName a = RName.getRName(attr);                
          IRObject value;
                    
                    IREntity enclosingEntity = session.getState().findEntity(a);
                    if(enclosingEntity==null){
                        throw new Exception ("No Entity is in the context that defines "+ a.stringValue());
                    }
          int type = enclosingEntity.getEntry(a).type.getId();
         
          if(type == IRObject.iInteger){
            value = RInteger.getRIntegerValue(getLong(body));
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

            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

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.