ca.uhn.hl7v2.validation
Interface PrimitiveTypeRule

All Superinterfaces:
Rule, java.io.Serializable
All Known Implementing Classes:
RegexPrimitiveRule, SizeRule, TrimLeadingWhitespace

public interface PrimitiveTypeRule
extends Rule

A rule that applies to a primitive datatype.

Author:
Bryan Tripp

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).
 boolean test(java.lang.String value)
          Tests the given string against the criteria defined by this rule -- returns true if it passes the test, false otherwise.
 
Methods inherited from interface ca.uhn.hl7v2.validation.Rule
getDescription, getSectionReference
 

Method Detail

correct

java.lang.String correct(java.lang.String value)
Optionally performs an automatic correction on given data to make it conform (eg trims leading whitespace). This is to be called prior to test(). If no corrections are performed, the original value is returned.

Parameters:
value - an original value to be corrected
Returns:
a corrected version of the given value

test

boolean test(java.lang.String value)
Tests the given string against the criteria defined by this rule -- returns true if it passes the test, false otherwise.



Copyright © 2001-2011 University Health Network. All Rights Reserved.