Examples of RName


Examples of com.dtrules.interpreter.RName

     * @return
     */
    private RName mapName(AutoDataMap autoDataMap, LabelMap labelMap, String name){
        String tname = labelMap.getMapAttributes().get(name);
        if(tname == null) tname = name;
        RName rname = RName.getRName(tname);
        return rname;
    }
View Full Code Here

Examples of com.dtrules.interpreter.RName

        if(node.getParent() instanceof MapNodeObject){
            MapNodeObject parentNode = (MapNodeObject)node.getParent();
            Object        tgtObj     = parentNode.getTargetObject();
            if(tgtObj == null) return;
            IREntity      entity     = (IREntity) tgtObj;
            RName         attribute  = RName.getRName(node.getAttribute().getName());
            REntityEntry  entry      = entity.getEntry(attribute);
            if(entry != null && entry.writable){
                IRObject  value  = entity.get(node.getAttribute().getName());
                Object    v      = convert(value);   
                node.setData(v);
View Full Code Here

Examples of com.dtrules.interpreter.RName

            while(labelMap != null && labelMap.getTargetGroup()!=autoDataMap.getCurrentGroup()){
                labelMap = labelMap.getNext();
            }
        }

        RName rname = mapName(autoDataMap, labelMap, node.getAttribute().getName());
       
        IREntity entity = (IREntity) autoDataMap.getCurrentObject();
       
        try{                        // We are going to ignore assertion errors.
           entity.put(autoDataMap.getSession(), rname, ref);
View Full Code Here

Examples of com.dtrules.interpreter.RName

   
   
    @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();
View Full Code Here

Examples of com.dtrules.interpreter.RName

   
    @Override
    public Object mapMap(AutoDataMap autoDataMap, LabelMap labelMap, MapNodeMap node){
        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);
View Full Code Here

Examples of com.dtrules.interpreter.RName

        p.println("<decision_table>");
        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

Examples of com.dtrules.interpreter.RName

    static class Sortentities extends ROperator {
      Sortentities() {super("sortentities");}
     
      public void execute(DTState state) throws RulesException {
        boolean asc  = state.datapop().booleanValue();
        RName rname = state.datapop().rNameValue();
        RArray rarray  = state.datapop().rArrayValue();
        ArrayList<IRObject> array = rarray.arrayValue();
        if(state.testState(DTState.TRACE)){
                 state.traceInfo("sortentities",
                         "length",   array.size()+"",
                         "by",       rname.stringValue(),
                         "arrayID",  rarray.getID()+"",
                         asc ? "true" : "false");
              }
        REntity temp = null;
        int size = array.size();
View Full Code Here

Examples of com.dtrules.interpreter.RName

       */
      static class NewXmlAttribute extends ROperator {
          NewXmlAttribute(){super("newxmlattribute"); }
          @Override
            public void execute(DTState state) throws RulesException {
                RName     name      = state.datapop().rNameValue();
                XMLTag    xmlNode   = new XMLTag(name.stringValue(),null);
                RXmlValue xmlValue  = new RXmlValue(state,xmlNode);
               
                state.datapush(xmlValue);
            }
View Full Code Here

Examples of com.dtrules.interpreter.RName

        private IRObject p(String v) { return RString.newRString(v==null?"":v); }
        private RName    n(String x) { return RName.getRName(x);}
       
        public void execute(DTState state) throws RulesException {
            RName    error        = state.datapop().rNameValue();
            RName    error_table  = state.datapop().rNameValue();
            RName    table        = state.datapop().rNameValue();
           
            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

Examples of com.dtrules.interpreter.RName

                      break;
                  }
              }
           }
           if(type==null || defined==false){
               RName rname = RName.getRName(
                  (entity==null||entity.length()==0?"":entity+".")+ident);
               try {
                  IRObject o = session.getState().find(rname);
                  if(o==null)return -1;
                  return o.type();
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.