ca.uhn.hl7v2.model
Class AbstractMessage

java.lang.Object
  extended by ca.uhn.hl7v2.model.AbstractGroup
      extended by ca.uhn.hl7v2.model.AbstractMessage
All Implemented Interfaces:
Group, Message, Structure, java.io.Serializable
Direct Known Subclasses:
GenericMessage

public abstract class AbstractMessage
extends AbstractGroup
implements Message

A default implementation of Message.

Author:
Bryan Tripp (bryan_tripp@sourceforge.net)
See Also:
Serialized Form

Constructor Summary
AbstractMessage(ModelClassFactory theFactory)
           
 
Method Summary
 Message getMessage()
          Returns this Message object - this is an implementation of the abstract method in AbstractGroup.
 ValidationContext getValidationContext()
           
 java.lang.String getVersion()
          Returns the version number.
 void setValidationContext(ValidationContext theContext)
           
 
Methods inherited from class ca.uhn.hl7v2.model.AbstractGroup
add, addNonstandardSegment, currentReps, get, get, getAll, getClass, getName, getNames, getParent, isRepeating, isRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.uhn.hl7v2.model.Group
addNonstandardSegment, get, get, getAll, getClass, getNames, isRepeating, isRequired
 
Methods inherited from interface ca.uhn.hl7v2.model.Structure
getName, getParent
 

Constructor Detail

AbstractMessage

public AbstractMessage(ModelClassFactory theFactory)
Parameters:
theFactory - factory for model classes (e.g. group, segment) for this message
Method Detail

getMessage

public Message getMessage()
Returns this Message object - this is an implementation of the abstract method in AbstractGroup.

Specified by:
getMessage in interface Structure
Overrides:
getMessage in class AbstractGroup

getVersion

public java.lang.String getVersion()
Returns the version number. This default implementation inspects this.getClass().getName(). This should be overridden if you are putting a custom message definition in your own package, or it will default.

Specified by:
getVersion in interface Message
See Also:
Message.getVersion()

getValidationContext

public ValidationContext getValidationContext()
Specified by:
getValidationContext in interface Message
Returns:
the set of validation rules that applies to this message

setValidationContext

public void setValidationContext(ValidationContext theContext)
Specified by:
setValidationContext in interface Message
Parameters:
theContext - the set of validation rules that are to apply to this message