Examples of RName


Examples of com.dtrules.interpreter.RName

        }   
    if (attr != null){       
        attribs.remove("set attribute");
      // Look and see if we have an attribute name defined.
            if(body!=null){
          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

Examples of com.dtrules.interpreter.RName

   * Entity.
   */
  HashMap entities = new HashMap();
 
  IREntity UpdateReferences(IREntity e)throws RulesException {
    RName listname   = RName.getRName(e.getName().stringValue()+"s");
       
        // First add this entity to any list found on the entity stack.
        for(int i=0; i< state.edepth(); i++){
            // Look for all Array Lists on the Entity Stack that look like lists of this Entity
            IRObject elist = state.getes(i).get(listname);
View Full Code Here

Examples of com.dtrules.interpreter.RName

            throw new RuntimeException(e);
      }
     
      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

Examples of com.dtrules.interpreter.RName

    }     
   
    if ((attr = (String) attribs.get("set attribute"))!=null){       
      // Look and see if we have an attribute name defined.
       
          RName a = RName.getRName(attr);                
          IRObject value;
                    
                    IREntity enclosingEntity = session.getState().findEntity(a);
                    if(enclosingEntity!=null){
                       
View Full Code Here

Examples of com.dtrules.interpreter.RName

   * Entity.
   */
  HashMap entities = new HashMap();
 
  IREntity UpdateReferences(IREntity e, EntityInfo info)throws RulesException {
    RName listname;
    if(info!=null && info.list.length()==0){
        listname   = RName.getRName(e.getName().stringValue()+"s");
    }else{
      listname   = RName.getRName(info.list);
    }
View Full Code Here

Examples of com.dtrules.interpreter.RName

     * Creates and returns a new Decision Table object.
     * @param name -- The name of the new decision table.
     * @return -- The new decision table
     */
    public RDecisionTable newDecisionTable(String name, IRSession session)throws RulesException{
        RName    rname = RName.getRName(name);
        return newDecisionTable(rname, session);
    }
View Full Code Here

Examples of com.dtrules.interpreter.RName

      IREntity e = referenceEntities.get(ikeys.next());
      buff.append(e.getName().toString());
      buff.append("\r\n");
      Iterator iattribs = e.getAttributeIterator();
      while(iattribs.hasNext()){
        RName        entryname  = (RName)iattribs.next();
        REntityEntry entry      = e.getEntry(entryname);
        buff.append("   ");
        buff.append(entryname);
        if(entry.defaultvalue!=null){
          buff.append("  --  default value: ");
View Full Code Here

Examples of com.dtrules.interpreter.RName

  }
   
   
   
    public void writeAttributes(XMLPrinter xout) throws RulesException {
       RName entities[]= new RName[0];
       entities = referenceEntities.keySet().toArray(entities);
       Arrays.sort(entities);
       for ( RName key : entities ){
           IREntity entity = referenceEntities.get(key);
           {
               String access  = entity.isReadOnly()?"r":"rw";
               String comment = entity.getComment();
               String name    = key.stringValue();
               xout.opentag("entity","name",name,"access",access,"comment",comment);
           }
           RName attributes [] = new RName[0];
           attributes = entity.getAttributeSet().toArray(attributes);
           Arrays.sort(attributes);
           for (RName attribute : attributes){
               REntityEntry entry = entity.getEntry(attribute);
              
View Full Code Here

Examples of com.dtrules.interpreter.RName

     static class NewTable extends ROperator {
         NewTable(){ super("newtable");}
        
         public void execute(DTState state) throws RulesException {
             String type  = state.datapop().stringValue();
             RName  name  = state.datapop().rNameValue();
             int    itype = RSession.typeStr2Int(type,"","");
             RTable table = RTable.newRTable(state.getSession().getEntityFactory(),name,"",itype);
             state.datapush(table);
         }
View Full Code Here

Examples of com.dtrules.interpreter.RName

    @Override
    public Object mapList(AutoDataMap autoDataMap, LabelMap labelMap, MapNodeList node) {
        IAttribute a = node.getAttribute();
        try {
            RArray list = null;
            RName rname = null;
            Object object = autoDataMap.getCurrentObject();
            if(object instanceof IREntity){
                IREntity entity = (IREntity) object;
                rname = mapName(autoDataMap, labelMap, node.getLabel());
                IRObject olist = entity.get(rname);
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.