| Constructor and Description |
|---|
PrimitiveDataType(IDataTypeKey objIDataTypeKey)
constructor for the Class PrimitiveDataType
|
PrimitiveDataType(IDataTypeKey objIDataTypeKey,
int iMinLength,
int iMaxLength,
java.lang.String strCLength)
Constructor for PrimitiveDataType which takes two arguments and
sets the value in the respective member variable.
|
PrimitiveDataType(IDataTypeKey objIDataTypeKey,
int iMinLength,
int iMaxLength,
java.lang.String strCLength,
int iTableNo)
Constructor for PrimitiveDataType which takes three arguments and
sets the value in the respective member variable.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copy(IDataType objDataType,
IDelimiter objDelimiter)
This will create replicate of existing Data Type.
|
IDataTypeKey |
getDataTypeName()
This method returns the name of Data Type.
|
java.lang.String |
getICLength()
Function returns the cLength in the member variable iConformanceLength.
|
int |
getIMaxLength()
Function returns the maxLength in the member variable iMaxLength.
|
int |
getIMinLength()
Function returns the minLength in the member variable iMinLength.
|
int |
getLength()
This will return the length of DataType.
|
java.lang.Object |
getValue()
Function returns the value in the member variable strValue.
|
boolean |
isPrimitive()
This method returns the state for Data Type whether it
is primitive Data Type or composite DataType.
|
int |
read(java.lang.String strAttributeData,
IDelimiter objIDelimiter)
Method reads the data from the String.
|
void |
setICLength(java.lang.String cLength)
Function sets the cLength in the member variable iCVariable.
|
void |
setIMaxLength(int maxLength)
Function sets the maxLength in the member variable iMaxVariable.
|
void |
setIMinLength(int minLength)
Function sets the minLength in the member variable iMinVariable.
|
void |
setValue(java.lang.Object objValue)
Function sets the value in the member variable strValue after validations.
|
java.lang.String |
toString()
This method returns a string consisting name of the Item.
|
boolean |
validate()
This validate function validates the data value object
with the regular expression and check for maximum length.
|
int |
write(IHL7Stream objIHL7Stream,
IDelimiter objIDelimiter)
Method writes the data to the Stream.
|
public PrimitiveDataType(IDataTypeKey objIDataTypeKey)
public PrimitiveDataType(IDataTypeKey objIDataTypeKey, int iMinLength, int iMaxLength, java.lang.String strCLength)
objIDataTypeKey - object of IDataTypeKey.iMinLength - The Minimum length the DataType can have.iMaxLength - The Maximum length the DataType can have.iCLength - The Conformance length the DataType can have.public PrimitiveDataType(IDataTypeKey objIDataTypeKey, int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo)
objIDataTypeKey - object of IDataTypeKey.iMinLength - The Minimum length the DataType can have.iMaxLength - The Maximum length the DataType can have.iCLength - The Conformance length the DataType can have.iTableNo - The Table number to which the value for the component is specified.public IDataTypeKey getDataTypeName()
getDataTypeName in interface IDataTypepublic int getIMaxLength()
public void setIMaxLength(int maxLength)
maxLength - - the Maximum length.public int getIMinLength()
public void setIMinLength(int minLength)
maxLength - - the Minimum length.public java.lang.String getICLength()
public void setICLength(java.lang.String cLength)
cLength - - the Confromance length.public java.lang.Object getValue()
public void setValue(java.lang.Object objValue)
throws InvalidDataTypeException
setValue in interface IDataTypeobjValue - - the Object value as String.InvalidDataTypeExceptionpublic int write(IHL7Stream objIHL7Stream, IDelimiter objIDelimiter) throws java.io.IOException
public boolean validate()
throws InvalidDataTypeException
validate in interface IDataTypestrValue - - the string value.InvalidDataTypeException - - if Data Type Validation failspublic int read(java.lang.String strAttributeData,
IDelimiter objIDelimiter)
throws java.io.IOException
public void copy(IDataType objDataType, IDelimiter objDelimiter) throws java.io.IOException
objDataType - object of Data Type.objDelimiter - object of Delimiter.java.io.IOException - - if IO operation fails.public int getLength()
public boolean isPrimitive()
isPrimitive in interface IDataTypepublic java.lang.String toString()
toString in class java.lang.Object