public class RegexPrimitiveRule extends Object implements PrimitiveTypeRule
PrimitiveTypeRule that validates primitive values
using a regular expression.| Constructor and Description |
|---|
RegexPrimitiveRule(String theRegex,
String theSectionReference) |
| Modifier and Type | Method and Description |
|---|---|
String |
correct(String value)
Optionally performs an automatic correction on given data to make it
conform (eg trims leading whitespace).
|
String |
getDescription()
Returns a text description of the rule.
|
String |
getSectionReference()
A string indicating the section of the HL7 standard from which this rule
is derived (if applicable).
|
boolean |
test(String value)
Empty string, null, and the HL7 explicit null (two double-quotes) are passed.
|
public RegexPrimitiveRule(String theRegex, String theSectionReference)
theRegex - a regular expression against which to validate primitive
valuestheSectionReference - to be returned by getSectionReference()public boolean test(String value)
test in interface PrimitiveTypeRulePrimitiveTypeRule.test(java.lang.String)public String getDescription()
RulegetDescription in interface RuleRule.getDescription()public String getSectionReference()
RulegetSectionReference in interface RuleRule.getSectionReference()public String correct(String value)
PrimitiveTypeRulecorrect in interface PrimitiveTypeRulevalue - an original value to be correctedPrimitiveTypeRule.correct(java.lang.String)Copyright © 2001-2012 University Health Network. All Rights Reserved.