Package com.dtrules.interpreter

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


        newline = true;
        printattrib(p,"table_name",dtname.stringValue());
        Iterator<RName> ifields = fields.keySet().iterator();
        while(ifields.hasNext()){
            RName name = ifields.next();
            printattrib(p,name.stringValue(),fields.get(name));
        }
        openTag(p, "conditions");
        for(int i=0; i< conditions.length; i++){
            openTag(p, "condition_details");
            printattrib(p,"condition_number",(i+1)+"");
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;
         
          if(type == IRObject.iInteger){
            value = RInteger.getRIntegerValue(getLong(body));
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

        RName entityTraceIDList = RName.getRName("entityTraceIdList");
        public void arrayExecute(DTState state) throws RulesException {
         
            RInteger id     = state.datapop().rIntegerValue();
          RName    ename  = state.datapop().rNameValue();
            String   key    = ename.stringValue().toLowerCase()+id.stringValue();
                    
            IREntity entity = state.getSession().createEntity(id, ename);
           
            state.datapush(entity);
        }
View Full Code Here

     */
    protected static void alias (IRObject o ,String n) {
        try {
            RName rn = RName.getRName(n);
            if(primitives.containsAttribute(rn)){
              throw new RuntimeException("Duplicate definitions for "+rn.stringValue());
            }
            primitives.addAttribute(rn, "", o, false, true, o.type(),null,"operator","");
            primitives.put(rn,o);
        } catch (RulesException e) {
            throw new RuntimeException("An Error occured in alias building the primitives Entity: "+n);
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

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

        newline = true;
        printattrib(p,"table_name",dtname.stringValue());
        Iterator<RName> ifields = fields.keySet().iterator();
        while(ifields.hasNext()){
            RName name = ifields.next();
            printattrib(p,name.stringValue(),fields.get(name));
        }
        openTag(p, "conditions");
        for(int i=0; i< conditions.length; i++){
            openTag(p, "condition_details");
            printattrib(p,"condition_number",(i+1)+"");
View Full Code Here

     
      Iterator<RName> es = this.map.entities.keySet().iterator();
      while(es.hasNext()){
        RName  ename = (RName) es.next();            
         try {
        IREntity e     = findEntity(ename.stringValue().toLowerCase(),null,null);
        state.entitypush(e);
       } catch (RulesException e) {
              state.traceInfo("error", "Failed to initialize the Entity Stack (Failed on "+ename+")\n"+e);
          throw new RuntimeException(e)
       }
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

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.