Package com.dtrules.interpreter

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


     */
    protected static void alias (IRObject o ,String n) {
        try {
            RName rn = RName.getRName(n);
            if(primitives.containsAttribute(rn)){
                System.err.println("Duplicate Operators defined for " + rn.stringValue());
              throw new RuntimeException("Duplicate definitions for " + rn.stringValue());
            }
            primitives.addAttribute(rn, "", o, false, true, o.type(),null,"operator","","");
            primitives.put(null, rn,o);
        } catch (RulesException e) {
View Full Code Here


    protected static void alias (IRObject o ,String n) {
        try {
            RName rn = RName.getRName(n);
            if(primitives.containsAttribute(rn)){
                System.err.println("Duplicate Operators defined for " + rn.stringValue());
              throw new RuntimeException("Duplicate definitions for " + rn.stringValue());
            }
            primitives.addAttribute(rn, "", o, false, true, o.type(),null,"operator","","");
            primitives.put(null, rn,o);
        } catch (RulesException e) {
            System.err.println("An Error occured in alias building the primitives Entity: "+n);
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(RSession.typeInt2Str(entry.type));
           p.print("\" cdd_default_value=\"");
           p.print(entry.defaulttxt);
           p.print("\" cdd_i_c=\"");
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

        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

     */
    protected static void alias (IRObject o ,String n) {
        try {
            RName rn = RName.getRName(n);
            if(primitives.containsAttribute(rn)){
                System.err.println("Duplicate Operators defined for " + rn.stringValue());
              throw new RuntimeException("Duplicate definitions for " + rn.stringValue());
            }
            primitives.addAttribute(rn, "", o, false, true, o.type(),null,"operator","","");
            primitives.put(null, rn,o);
        } catch (RulesException e) {
View Full Code Here

    protected static void alias (IRObject o ,String n) {
        try {
            RName rn = RName.getRName(n);
            if(primitives.containsAttribute(rn)){
                System.err.println("Duplicate Operators defined for " + rn.stringValue());
              throw new RuntimeException("Duplicate definitions for " + rn.stringValue());
            }
            primitives.addAttribute(rn, "", o, false, true, o.type(),null,"operator","","");
            primitives.put(null, rn,o);
        } catch (RulesException e) {
            System.err.println("An Error occured in alias building the primitives Entity: "+n);
View Full Code Here

        while(anames.hasNext()){
            try {
                RName        aname = anames.next();
                IRObject     value = e.get(aname);
               
                dtstate.traceTagBegin("attribute", "name",aname.stringValue(),"type",getType(e,aname));
                switch(e.getEntry(aname).type){
                   case IRObject.iEntity: {
                      if(value.type()==IRObject.iNull){
                          dtstate.traceInfo("value","type","null","value","null",null);
                          break;
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.