Examples of RName


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

     * means no Entity on the entity Stack defines an attribute with
     * a name that mathches the name provided. 
     * @param name
     */
    public IREntity findEntity(RName name) throws RulesException{
       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;
           }
View Full Code Here

Examples of com.dtrules.interpreter.RName

     * @param name
     * @param value
     */
    public boolean def(RName name, IRObject value, boolean protect) throws RulesException{

        RName entityname = name.getEntityName();
       
       
        for(int i=entitystkptr-1;i>=0;i--){
           IREntity e = entitystk[i];
           if(!e.isReadOnly() && (entityname == null || e.getName().equals(entityname) )){
View Full Code Here

Examples of com.dtrules.interpreter.RName

              defaultO = EntityFactory.computeDefaultValue(session, ef, defaultv, itype) ;
          } catch (RulesException e) {
              errorMsgs += "Bad Default Value '"+defaultv+"' encountered on entity: '"+entityname+"' attribute: '"+attribute+"' \n";
              succeeded = false;
          }
      RName  entityRName = RName.getRName(entityname.trim(),false);
      RName  attributeRName = RName.getRName(attribute.trim(),false);
      REntity entity = ef.findcreateRefEntity(false,entityRName);
          int    intType = -1;
          try {
      intType = RSession.typeStr2Int(type,entityname,attribute);
      } catch (RulesException e) {
View Full Code Here

Examples of com.dtrules.interpreter.RName

          succeeded = false;
        }
               
        IRObject defaultO = EntityFactory.computeDefaultValue(session, ef, default_value, itype) ;
       
        RName  entityRName = RName.getRName(entityname.trim(),false);
        RName  attributeRName = RName.getRName(attrib_name.trim(),false);
        REntity entity = ef.findcreateRefEntity(false,entityRName);
        int    intType = -1;

        try {
          intType = RSession.typeStr2Int(type,entityname,attrib_name);
View Full Code Here

Examples of com.dtrules.interpreter.RName

    static class  Def extends ROperator {
        Def(){super("def");}

        public void execute(DTState state) throws RulesException {
            IRObject value = state.datapop();
            RName    name  = state.datapop().rNameValue();
            boolean f = state.def(name, value, true);
            if(!f)throw new RulesException("Undefined",
                    "def",
                    name+" is undefined");
        }
View Full Code Here

Examples of com.dtrules.interpreter.RName

     */
    static class  Find   extends ROperator {
        Find(){super("find");}

        public void execute(DTState state) throws RulesException {
            RName    name = state.datapop().rNameValue();
            IRObject v    = state.find(name);
            if(v==null)throw new RulesException("Undefined",
                    "find",
                    name+" is undefined");
        }
View Full Code Here

Examples of com.dtrules.interpreter.RName

     */
    static class  Xdef extends ROperator {
        Xdef(){super("xdef");}

        public void execute(DTState state) throws RulesException {
            RName    name  = state.datapop().rNameValue();
            IRObject value = state.datapop();
            boolean f = state.def(name, value, true);
            if(!f)
                if(state.find(name)==null){
                    throw new RulesException("Undefined",
View Full Code Here

Examples of com.dtrules.interpreter.RName

     */
    static class  Createentity   extends ROperator {
        Createentity(){super("createentity");}
       
        public void execute(DTState state) throws RulesException {
            RName    ename  = state.datapop().rNameValue();
            IREntity entity = ((RSession) state.getSession()).createEntity(null, ename);
            state.datapush(entity);
        }
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.