public String getEnabled() { AttributeDescr enabled = this.attributes.get( "enabled" ); return enabled != null ? enabled.getValue() : null; }
public String getDialect() { AttributeDescr dialect = this.attributes.get( "dialect" ); return dialect != null ? dialect.getValue() : null; }
public String getSalience() { AttributeDescr salience = this.attributes.get( "salience" ); return salience != null ? salience.getValue() : null; }
public void visitAttributeDescr(final AttributeDescr attributeDescr) { this.template = new String(); this.template = "<rule-attribute name=\"" + attributeDescr.getName() + "\" value=\"" + attributeDescr.getValue() + "\" />" + XmlDumper.eol; }
private String getPackageDialect(PackageDescr packageDescr) { String dialectName = this.defaultDialect; // see if this packageDescr overrides the current default dialect for (AttributeDescr value : packageDescr.getAttributes()) { if ("dialect".equals(value.getName())) { dialectName = value.getValue(); break; } } return dialectName; }
true ) ); } else if ( name.equals( "agenda-group" ) ) { rule.setAgendaGroup( attributeDescr.getValue() ); } else if ( name.equals( "activation-group" ) ) { rule.setActivationGroup( attributeDescr.getValue() ); } else if ( name.equals( "ruleflow-group" ) ) { rule.setRuleFlowGroup( attributeDescr.getValue() ); } else if ( name.equals( "lock-on-active" ) ) { rule.setLockOnActive( getBooleanValue( attributeDescr, true ) ); } else if ( name.equals( DroolsSoftKeywords.DURATION ) || name.equals( DroolsSoftKeywords.TIMER ) ) { String duration = attributeDescr.getValue(); buildTimer( rule, duration, context); } else if ( name.equals( "calendars" ) ) { buildCalendars( rule, attributeDescr.getValue(), context ); } else if ( name.equals( "date-effective" ) ) { final Calendar cal = Calendar.getInstance(); cal.setTime( DateUtils.parseDate( attributeDescr.getValue(), context.getPackageBuilder().getDateFormats() ) ); rule.setDateEffective( cal ); } else if ( name.equals( "date-expires" ) ) { final Calendar cal = Calendar.getInstance(); cal.setTime( DateUtils.parseDate( attributeDescr.getValue(), context.getPackageBuilder().getDateFormats() ) ); rule.setDateExpires( cal );
AttributeDescr attribute = pkg.getDescr().getAttribute( "dialect" ); if ( attribute != null ) { function.dialect( attribute.getValue() );