Examples of IREntity


Examples of com.dtrules.entity.IREntity

   
   
    @Override
    public Object mapAttribute(AutoDataMap autoDataMap, LabelMap labelMap, MapNodeAttribute node) {
        RName rname = mapName(autoDataMap, labelMap, node.getAttribute().getName());
        IREntity entity   = (IREntity) autoDataMap.getCurrentObject();
        if(entity == null){
            return null;
        }
        Object data = node.getData();
        IRObject value = iconvert(data);
        try {
            entity.put(autoDataMap.getSession(), rname, value);
            value = entity.get(rname);
        } catch (RulesException e) {
           
        }       
        return value;
    }
View Full Code Here

Examples of com.dtrules.entity.IREntity

        RTable rTable = null;
        try {
            RName rname = null;
            Object object = autoDataMap.getCurrentObject();
            if(object instanceof IREntity){
                IREntity entity = (IREntity) object;
                rname = mapName(autoDataMap, labelMap, node.getAttribute().getName() );
                IRObject olist = entity.get(rname);
                if(olist != null && olist.type() == IRObject.iTable){
                    rTable = olist.rTableValue();
                }
            }
            if(rTable == null){
View Full Code Here

Examples of com.dtrules.entity.IREntity

    static class InContext extends ROperator {
            InContext(){super("InContext");}

            public void execute(DTState state) throws RulesException {
                RName       entityName  = state.datapop().rNameValue();
                IREntity    entity      = state.findEntity(entityName);
                state.datapush(entity);
            }
View Full Code Here

Examples of com.dtrules.entity.IREntity

    public static class InContext extends ROperator {
            InContext(){super("InContext");}

            public void arrayExecute(DTState state) throws RulesException {
                RName       entityName  = state.datapop().rNameValue();
                IREntity    entity      = state.findEntity(entityName);
                state.datapush(entity);
            }
View Full Code Here

Examples of com.dtrules.entity.IREntity

      IRObject n2 = state.datapop();
      IRObject v1 = state.datapop();
      IRObject n1 = state.datapop();
     
      for(IRObject ie : array){
        IREntity e = ie.rEntityValue();
       
        if(n3.type().getId() != RNull.type.getId()){
          IRObject v = e.get(n3.rNameValue());
          if(!v.equals(v3)){
            continue;
          }
        }
        if(n2.type().getId() != RNull.type.getId()){
          IRObject v = e.get(n2.rNameValue());
          if(!v.equals(v2)){
            continue;
          }
        }
        if(n1.type().getId() != RNull.type.getId()){
          IRObject v = e.get(n1.rNameValue());
          if(!v.equals(v1)){
            continue;
          }
        }
        state.datapush(e);
View Full Code Here

Examples of com.dtrules.entity.IREntity

            throw new RulesException("Entity Stack Underflow", "entitypop", "Entity Stack underflow.");
        }
        if((state & TRACE) > 0){
          traceInfo("entitypop",null);
        }
        IREntity rval = entitystk[--entitystkptr];
        entitystk[entitystkptr] = null;
        return (rval);
    }
View Full Code Here

Examples of com.dtrules.entity.IREntity

     */
    public IREntity entityfetch(int i) throws RulesException {
        if (entitystkptr <= i) {
            throw new RulesException("Entity Stack Underflow", "entityfetch", "Entity Stack underflow.");
        }
        IREntity rval = entitystk[entitystkptr - 1 - i];
        return (rval);
    }
View Full Code Here

Examples of com.dtrules.entity.IREntity

     * @param entity
     * @return
     */
    public boolean inContext(RName entity) {
        for (int i = 0; i < entitystkptr; i++) { // entity on the Entity Stack.
            IREntity e = entitystk[i];
            if (e.getName().equals(entity))
                return true;
        }
        return false;
    }
View Full Code Here

Examples of com.dtrules.entity.IREntity

        RName entityname = name.getEntityName(); // If the RName does not spec
                                                 // an Enttiy Name
        if (entityname == null) { // then we simply look for the RName in each
            for (int i = entitystkptr - 1; i >= 0; i--) { // entity on the
                                                          // Entity Stack.
                IREntity e = entitystk[i];
                if (e.containsAttribute(name))
                    return e;
            }
        } else { // Otherwise, we insist that the Entity name
            for (int i = entitystkptr - 1; i >= 0; i--) { // match as well as
                                                          // insist that the
                                                          // Entity
                IREntity e = entitystk[i]; // have an attribute that matches
                                           // this name.
                if (e.getName().equals(entityname)) {
                    if (e.containsAttribute(name)) {
                        return e;
                    }
                }
            }
        }
View Full Code Here

Examples of com.dtrules.entity.IREntity

     * found, the value is returned. A null is returned if no match is found.
     *
     * @param name
     */
    public IRObject find(RName name) throws RulesException {
        IREntity entity = findEntity(name);
        if (entity == null)
            return null;
        return entity.get(name);
    }
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.