|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uhn.hl7v2.validation.impl.RegexPrimitiveRule
public class RegexPrimitiveRule
A PrimitiveTypeRule
that validates primitive values
using a regular expression.
Constructor Summary | |
---|---|
RegexPrimitiveRule(java.lang.String theRegex,
java.lang.String theSectionReference)
|
Method Summary | |
---|---|
java.lang.String |
correct(java.lang.String value)
Optionally performs an automatic correction on given data to make it conform (eg trims leading whitespace). |
java.lang.String |
getDescription()
Returns a text description of the rule. |
java.lang.String |
getSectionReference()
A string indicating the section of the HL7 standard from which this rule is derived (if applicable). |
boolean |
test(java.lang.String value)
Empty string, null, and the HL7 explicit null (two double-quotes) are passed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegexPrimitiveRule(java.lang.String theRegex, java.lang.String theSectionReference)
theRegex
- a regular expression against which to validate primitive
valuestheSectionReference
- to be returned by getSectionReference()
Method Detail |
---|
public boolean test(java.lang.String value)
test
in interface PrimitiveTypeRule
PrimitiveTypeRule.test(java.lang.String)
public java.lang.String getDescription()
Rule
getDescription
in interface Rule
Rule.getDescription()
public java.lang.String getSectionReference()
Rule
getSectionReference
in interface Rule
Rule.getSectionReference()
public java.lang.String correct(java.lang.String value)
PrimitiveTypeRule
correct
in interface PrimitiveTypeRule
value
- an original value to be corrected
PrimitiveTypeRule.correct(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |