Package org.dmd.dmc.rules

Examples of org.dmd.dmc.rules.DynamicInitIF


             
            ClassDefinition ruleDataCD   = sm.cdef(uco.getConstructionClass());
            RuleDataDMO   dmo     = (RuleDataDMO) dmofactory.createObject(uco);
            RuleDefinition  ruleDEF    = ruleDataCD.getRuleDefinition();

            DynamicInitIF rule = (DynamicInitIF) ruleDEF.newRuleInstance();
            rule.setRuleData(dmo);
           
            parsedRulesDMOs.put(dmo.getObjectName(), dmo);
            ruleInstances.put(dmo.getObjectName(), (RuleIF) rule);
          } catch (ResultException e) {
            // TODO Auto-generated catch block
View Full Code Here


            catch(DmcValueExceptionSet ex){
              System.err.println(ex.toString() + "\nFile: " + ruledata.getFile() + "  Line: " + ruledata.getLineNumber());
            }
             
            try{
              DynamicInitIF rule = (DynamicInitIF) ruleDEF.newRuleInstance();
              rule.setRuleData(ruledata);
             
              allRuleData.add(ruledata);
             
//              addThisRule((RuleIF) rule);
              allRules.add((RuleIF) rule);
            }
            catch(Exception ex){
              System.err.println(ex.toString());
            }
          }
            }
      }
     
      DmcOmni.instance().reset();
      schemas = sm.getSchemas();
      while(schemas.hasNext()){
        SchemaDefinition curr = schemas.next();
        DmcOmni.instance().addCompactSchema(curr.getCompactSchema());
      }
     
      // We add the rules after we've reinitialized the DmcOmni so that we can resolve
      // applyToClass information.
      for(RuleIF rule: allRules)
        addThisRule(rule);
     
      DebugInfo.debug("*** ALL RULE COLLECTIONS ***\n\n" + this.toString());
     
//      DebugInfo.debug("\n\n*** RULE TRACING DISABLED ***\n\n");
      DmcOmni.instance().ruleTracer(new ConsoleRuleTracer());
      DmcOmni.instance().ruleTracing(true);
     
      for(RuleDataDMO rule: allRuleData){
        SourceInfo source = new SourceInfo(rule.getFile(), rule.getLineNumber()+"", rule);
       
//        if (rule.getRuleName().equals("dmtSvNumericRange")){
//          DebugInfo.debug("HERE");
//        }
       
View Full Code Here

TOP

Related Classes of org.dmd.dmc.rules.DynamicInitIF

Copyright © 2018 www.massapicom. 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.