public class ValidationContextImpl extends Object implements ValidationContext, Serializable
ValidationContext
.Modifier and Type | Field and Description |
---|---|
protected Map<String,Collection<EncodingRule>> |
encodingRuleCache |
protected Map<String,Collection<MessageRule>> |
messageRuleCache |
protected Map<String,Collection<PrimitiveTypeRule>> |
primitiveRuleCache |
Constructor and Description |
---|
ValidationContextImpl() |
Modifier and Type | Method and Description |
---|---|
List<RuleBinding<EncodingRule>> |
getEncodingRuleBindings() |
Collection<EncodingRule> |
getEncodingRules(String theVersion,
String theEncoding) |
List<RuleBinding<MessageRule>> |
getMessageRuleBindings() |
Collection<MessageRule> |
getMessageRules(String theVersion,
String theMessageType,
String theTriggerEvent) |
List<RuleBinding<PrimitiveTypeRule>> |
getPrimitiveRuleBindings() |
Collection<PrimitiveTypeRule> |
getPrimitiveRules(String theVersion,
String theTypeName,
Primitive theType) |
protected void |
initCaches()
Initializes caches for the three rule types.
|
protected static <T extends Rule<?>> |
newRuleCache(int size) |
protected Map<String,Collection<PrimitiveTypeRule>> primitiveRuleCache
protected Map<String,Collection<MessageRule>> messageRuleCache
protected Map<String,Collection<EncodingRule>> encodingRuleCache
public ValidationContextImpl()
protected void initCaches()
public Collection<PrimitiveTypeRule> getPrimitiveRules(String theVersion, String theTypeName, Primitive theType)
getPrimitiveRules
in interface ValidationContext
theType
- ignoredtheVersion
- an HL7 version (eg "2.1")theTypeName
- a primitive datatype name (eg "ST")ValidationContext.getPrimitiveRules(String, String, Primitive)
public List<RuleBinding<PrimitiveTypeRule>> getPrimitiveRuleBindings()
RuleBinding
s for
PrimitiveTypeRule
s.public Collection<MessageRule> getMessageRules(String theVersion, String theMessageType, String theTriggerEvent)
getMessageRules
in interface ValidationContext
theVersion
- an HL7 version (eg "2.1")theMessageType
- a value valid for MSH-9-1theTriggerEvent
- a value valid fro MSH-9-2ValidationContext.getMessageRules(java.lang.String, java.lang.String, java.lang.String)
public List<RuleBinding<MessageRule>> getMessageRuleBindings()
RuleBinding
s for MessageRule
s.public Collection<EncodingRule> getEncodingRules(String theVersion, String theEncoding)
getEncodingRules
in interface ValidationContext
theVersion
- an HL7 version (eg "2.1")theEncoding
- an encoding name (eg "VB", "XML)ValidationContext.getEncodingRules(java.lang.String,
java.lang.String)
public List<RuleBinding<EncodingRule>> getEncodingRuleBindings()
RuleBinding
s for EncodingRule
s.protected static <T extends Rule<?>> Map<String,Collection<T>> newRuleCache(int size)
Copyright © 2001–2017 University Health Network. All rights reserved.