/** * Adds the specified rule to the set of rules. * * @param rule the rule to be tested * @return this instance to build more rules */ public S test(T rule) { addRuleBindings(rule); return instance(); }
/** * Adds a HL7 section reference to a rule * * @param sectionReference the section in the HL7 specification * @return this instance to build more rules */ public S refersToSection(String sectionReference) { this.sectionReference = sectionReference; return instance(); }
/** * Add {@link RuleBinding}s for the rule that have been built * * @param rule the rule for which bindings shall be added */ protected void addRuleBindings(T rule) { if (Version.allVersions(versions)) { // Save some bindings when all HL7 versions are affected rules.addAll(getRuleBindings(rule, "*")); } else { for (Version version : versions) { rules.addAll(getRuleBindings(rule, version.getVersion())); } } }
/** * Adds a HL7 section reference to a rule * * @param sectionReference the section in the HL7 specification * @return this instance to build more rules */ public S refersToSection(String sectionReference) { this.sectionReference = sectionReference; return instance(); }
/** * Add {@link RuleBinding}s for the rule that have been built * * @param rule the rule for which bindings shall be added */ protected void addRuleBindings(T rule) { if (Version.allVersions(versions)) { // Save some bindings when all HL7 versions are affected rules.addAll(getRuleBindings(rule, "*")); } else { for (Version version : versions) { rules.addAll(getRuleBindings(rule, version.getVersion())); } } }
/** * Adds a description to the rule * * @param description description * @return this instance to build more rules */ public S description(String description) { this.description = description; return instance(); }
/** * Adds the specified rule to the set of rules. * * @param rule the rule to be tested * @return this instance to build more rules */ public S test(T rule) { addRuleBindings(rule); return instance(); }
/** * Sets the severity of the rule * * @param severity the the severity of the rule * @return this instance to build more rules */ public S severity(Severity severity) { this.severity = severity; return instance(); }
/** * Sets the severity of the rule * * @param severity the the severity of the rule * @return this instance to build more rules */ public S severity(Severity severity) { this.severity = severity; return instance(); }
/** * Marks the rule as being active (default) or inactive * * @param active true if this rule shall be active * @return this instance to build more rules */ public S active(boolean active) { this.active = active; return instance(); }
/** * Adds a description to the rule * * @param description description * @return this instance to build more rules */ public S description(String description) { this.description = description; return instance(); }
/** * Marks the rule as being active (default) or inactive * * @param active true if this rule shall be active * @return this instance to build more rules */ public S active(boolean active) { this.active = active; return instance(); }