/*******************************************************************************
 *  Copyright 2017-2018 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *   http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.dcm30_04.baselibs;



import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataElement;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDictionaryReader;
import cdac.medinfo.sdk.dcm30_04.commoninterface.ITransferSyntax;
import cdac.medinfo.sdk.dcm30_04.enums.EnumSourceStrengthUnits;
import cdac.medinfo.sdk.dcm30_04.enums.EnumSourceType;
import cdac.medinfo.sdk.dcm30_04.exceptions.InvalidItemException;
import cdac.medinfo.sdk.dcm30_04.exceptions.MandatoryMissingException;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConfig;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConstants;
import cdac.medinfo.sdk.dcm30_04.utils.DicomLogger;




/**
* This item class contains methods to validate,set and get the attributes in {@link SourceSequence}.
 */

public class SourceSequenceItem extends Item  
{
	

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * This constructor creates the item and internal code sequence macro with default TransferSyntax 
	 */
	SourceSequenceItem()
	{
		super();
	}


	/**
	 * This constructor creates the item and internal code sequence macro with default TransferSyntax 
	 * and default DictionaryReader
	 * @param objITransferSyntax specifies the DICOM Standard defined TransfeSyntax
	 */
	SourceSequenceItem(ITransferSyntax objITransferSyntax)
	{
		super(objITransferSyntax);
	}

	/**
	 * This constructor creates SourceSequenceItem with specified TransferSyntax and
	 * specified DictionaryReader
	 * @param objTransferSyntax specifies the DICOM Standard defined TransfeSyntax
	 * @param objDictionaryReader specifies the DICOM Dictionary reader to be used 
	 */
	SourceSequenceItem(ITransferSyntax objTransferSyntax, IDictionaryReader objDictionaryReader)
	{
		super(objTransferSyntax,objDictionaryReader);
	}


	/**
	 * Validates all the attributes in SourceSequenceItem that are present in the DataSet
	 * @return boolean - Success -true, Failure - false
	 * @throws InvalidItemException throws InvalidItemException If Conditional element fails.
	 */
	public boolean validateForModule()  throws InvalidItemException
	{
		try
		{
			if(!contains(0x300A,0x0212))
				throw new MandatoryMissingException("300A,0212");
			if(!contains(0x300A,0x0214))
				throw new MandatoryMissingException("300A,0214");
			if(!contains(0x300A,0x0226))
				throw new MandatoryMissingException("300A,0226");
			if(!contains(0x300A,0x0228))
				throw new MandatoryMissingException("300A,0228");
			if(!contains(0x300A,0x022A))
				throw new MandatoryMissingException("300A,022A");
			if(!contains(0x300A,0x022C))
				throw new MandatoryMissingException("300A,022C");
			if(!contains(0x300A,0x022E))
				throw new MandatoryMissingException("300A,022E");
		}
		catch( MandatoryMissingException me)
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger.getLogger().log(me.getMessage());
			}
			throw new InvalidItemException(this.getClass().getSimpleName(),me);
		}
		return true;
	}

	/**
	 * Sets Source Number .Uniquely identifies Source Number(300A,0212) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strSourceNumber String value of Source Number.
	 */
	public void setSourceNumber(String strSourceNumber)
	{
		/*Accept the SourceNumber in String format of type IS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0212, strSourceNumber,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0212,DicomConstants.DCM_DT_IS, strSourceNumber);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Source Number.
	 * @return String - value of Source Number.
	 */
	public String getSourceNumber()
	{
		Object objValue = getValue(0x300A,0x0212);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Source Serial Number.
	 * @param strSourceSerialNumber String value of Source Serial Number.
	 */
	public void setSourceSerialNumber(String strSourceSerialNumber)
	{
		/* Accept the Source Serial Number in String format of type LO.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x3008,0x0105, strSourceSerialNumber,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x3008,0x0105,DicomConstants.DCM_DT_LO, strSourceSerialNumber);

		addDataElement(objIDataElement);
	}

	/**
	 * Return Source Serial Number.
	 * @return String - value of Source Serial Number.
	 */
	public String getSourceSerialNumber()
	{
		Object objValue = getValue(0x3008,0x0105);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets the Source Model ID.
	 * @param strSourceModelID
	 */
	public void setSourceModelID(String strSourceModelID)
	{
		/*Accept the Source Model ID in String format of type SH.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * 
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A, 0x021B, strSourceModelID,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x300A, 0x021B,DicomConstants.DCM_DT_SH, strSourceModelID);

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Source Model ID.
	 * @return String - value of Source Model ID.
	 */
	public String getSourceModelID()
	{
		Object objValue = getValue(0x300A, 0x021B);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets Source Description.
	 * Description of the source.
	 * @param strSourceDescription String value of Source Description.
	 */
	public void setSourceDescription(String strSourceDescription)
	{
		/* Accept the Source Description in String format of type LO.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x021C, strSourceDescription,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x021C,DicomConstants.DCM_DT_LO, strSourceDescription);

		addDataElement(objIDataElement);
	}

	/**
	 * Return Source Description.
	 * Description of the source.
	 * @return String - value of Source Description.
	 */
	public String getSourceDescription()
	{
		Object objValue = getValue(0x300A,0x021C);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets Source Type .Uniquely identifies Source Type(300A,0214) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param enumSourceType Enum value of Source Type.
	 */
	public void setSourceType(EnumSourceType enumSourceType)
	{
		/*Accept the SourceType in String format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0214, enumSourceType.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0214,DicomConstants.DCM_DT_CS, enumSourceType.getValue());

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Source Type.
	 * @return String - value of Source Type.
	 */
	public String getSourceType()
	{
		Object objValue = getValue(0x300A,0x0214);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets Source Manufacturer .Uniquely identifies Source Manufacturer(300A,0216) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strSourceManufacturer String value of Source Manufacturer.
	 */
	public void setSourceManufacturer(String strSourceManufacturer)
	{
		/*Accept the SourceManufacturer in String format of type LO.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)	
			objIDataElement = new ImplicitDE(0x300A,0x0216, strSourceManufacturer,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0216,DicomConstants.DCM_DT_LO, strSourceManufacturer);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Source Manufacturer.
	 * @return String - value of Source Manufacturer.
	 */
	public String getSourceManufacturer()
	{
		Object objValue = getValue(0x300A,0x0216);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets Active Source Diameter .Uniquely identifies Active Source Diameter(300A,0218) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strActiveSourceDiameter String value of Active Source Diameter.
	 */
	public void setActiveSourceDiameter(String strActiveSourceDiameter)
	{
		/*Accept the ActiveSourceDiameter in String format of type DS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0218, strActiveSourceDiameter,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0218,DicomConstants.DCM_DT_DS, strActiveSourceDiameter);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Active Source Diameter.
	 * @return String - value of Active Source Diameter.
	 */
	public String getActiveSourceDiameter()
	{
		Object objValue = getValue(0x300A,0x0218);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets Active Source Length .Uniquely identifies Active Source Length(300A,021A) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strActiveSourceLength String value of Active Source Length.
	 */
	public void setActiveSourceLength(String strActiveSourceLength)
	{
		/*Accept the ActiveSourceLength in String format of type DS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x021A, strActiveSourceLength,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x021A,DicomConstants.DCM_DT_DS, strActiveSourceLength);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Active Source Length.
	 * @return String - value of Active Source Length.
	 */
	public String getActiveSourceLength()
	{
		Object objValue = getValue(0x300A,0x021A);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets Material ID .Uniquely identifies Material ID(300A,00E1) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strMaterialID String value of Material ID.
	 */
	public void setMaterialID(String strMaterialID)
	{
		/*Accept the MaterialID in String format of type SH.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x00E1, strMaterialID,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x00E1,DicomConstants.DCM_DT_SH, strMaterialID);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Material ID.
	 * @return String - value of Material ID.
	 */
	public String strMaterialID()
	{
		Object objValue = getValue(0x300A,0x00E1);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets Source Encapsulation Nominal Thickness .Uniquely identifies Source Encapsulation Nominal Thickness(300A,0222) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strSourceEncapsulationNominalThickness String value of Source Encapsulation Nominal Thickness.
	 */
	public void setSourceEncapsulationNominalThickness(String strSourceEncapsulationNominalThickness)
	{
		/*Accept the SourceEncapsulationNominalThickness in String format of type DS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0222, strSourceEncapsulationNominalThickness,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0222,DicomConstants.DCM_DT_DS, strSourceEncapsulationNominalThickness);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Source Encapsulation Nominal Thickness.
	 * @return String - value of Source Encapsulation Nominal Thickness.
	 */
	public String getSourceEncapsulationNominalThickness()
	{
		Object objValue = getValue(0x300A,0x0222);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets Source Encapsulation Nominal Transmission .Uniquely identifies Source Encapsulation Nominal Transmission(300A,0224) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strSourceEncapsulationNominalTransmission String value of Source Encapsulation Nominal Transmission.
	 */
	public void setSourceEncapsulationNominalTransmission(String strSourceEncapsulationNominalTransmission)
	{
		/*Accept the SourceEncapsulationNominalTransmission in String format of type DS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0224, strSourceEncapsulationNominalTransmission,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0224,DicomConstants.DCM_DT_DS, strSourceEncapsulationNominalTransmission);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Source Encapsulation Nominal Transmission.
	 * @return String - value of Source Encapsulation Nominal Transmission.
	 */
	public String getSourceEncapsulationNominalTransmission()
	{
		Object objValue = getValue(0x300A,0x0224);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets Source Isotope Name .Uniquely identifies Source Isotope Name(300A,0226) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strSourceIsotopeName String value of Source Isotope Name.
	 */
	public void setSourceIsotopeName(String strSourceIsotopeName)
	{
		/*Accept the SourceIsotopeName in String format of type LO.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0226, strSourceIsotopeName,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0226,DicomConstants.DCM_DT_LO, strSourceIsotopeName);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Source Isotope Name.
	 * @return String - value of Source Isotope Name.
	 */
	public String getSourceIsotopeName()
	{
		Object objValue = getValue(0x300A,0x0226);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets Source Isotope Half Life .Uniquely identifies Source Isotope Half Life(300A,0228) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strSourceIsotopeHalfLife String value of Source Isotope Half Life.
	 */
	public void setSourceIsotopeHalfLife(String strSourceIsotopeHalfLife)
	{
		/*Accept the SourceIsotopeHalfLife in String format of type DS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0228, strSourceIsotopeHalfLife,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0228,DicomConstants.DCM_DT_DS, strSourceIsotopeHalfLife);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Source Isotope Half Life.
	 * @return String - value of Source Isotope Half Life.
	 */
	public String getSourceIsotopeHalfLife()
	{
		Object objValue = getValue(0x300A,0x0228);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets type of Source Strength Units.
	 * Defined Terms:
	 * 1) AIR_KERMA_RATE.
	 * 2) DOSE_RATE_WATER.
	 * @param enumSourceStrengthUnits enum value of Source Strength Units.
	 */
	public void setSourceStrengthUnits(EnumSourceStrengthUnits enumSourceStrengthUnits)
	{
		/* Accept the Source Strength Units in String format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0229, enumSourceStrengthUnits.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0229,DicomConstants.DCM_DT_CS, enumSourceStrengthUnits.getValue());

		addDataElement(objIDataElement);


	}

	/**
	 * Return type of Source Strength Units. 
	 * @return String - value of Source Strength Units.
	 */
	public String getSourceStrengthUnits()
	{
		Object objValue = getValue(0x300A,0x0229);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Reference Air Kerma Rate.Uniquely identifies Reference Air Kerma Rate(300A,022A) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strReferenceAirKermaRate String value of Reference Air Kerma Rate.
	 */
	public void setReferenceAirKermaRate(String strReferenceAirKermaRate)
	{
		/*Accept the ReferenceAirKermaRate in String format of type DS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x022A, strReferenceAirKermaRate,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x022A,DicomConstants.DCM_DT_DS, strReferenceAirKermaRate);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Reference Air Kerma Rate.
	 * @return String - value of Reference Air Kerma Rate.
	 */
	public String getReferenceAirKermaRate()
	{
		Object objValue = getValue(0x300A,0x022A);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets Source Strength.
	 * @param strSourceStrength String value of Source Strength.
	 */
	public void setSourceStrength(String strSourceStrength)
	{
		/*Accept the Source Strength in String format of type DS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x022B, strSourceStrength,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x022B,DicomConstants.DCM_DT_DS, strSourceStrength);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Source Strength.
	 * @return String - value of Source Strength.
	 */
	public String getSourceStrength()
	{
		Object objValue = getValue(0x300A,0x022B);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets Air Kerma Rate Reference Date.Uniquely identifies Air Kerma Rate Reference Date(300A,022C) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strSourceStrengthReferenceDate String value of Source Strength Reference Date.
	 */
	public void setSourceStrengthReferenceDate(String strSourceStrengthReferenceDate)
	{
		/*Accept the SourceStrengthReferenceDate in String format of type DA.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x022C, strSourceStrengthReferenceDate,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x022C,DicomConstants.DCM_DT_DA, strSourceStrengthReferenceDate);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Air Kerma Rate Reference Date.
	 * @return String - value of Source Strength Reference Date.
	 */
	public String getSourceStrengthReferenceDate()
	{
		Object objValue = getValue(0x300A,0x022C);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets Air Kerma Rate Reference Time.Uniquely identifies Air Kerma Rate Reference Time(300A,022E) in Source Sequence(300A,0210) in RT BRACHY APPLICATION SETUPS MODULE of RT Plan IOD.
	 * @param strSourceStrengthReferenceTime String value of Source Strength Reference Time.
	 */
	public void setSourceStrengthReferenceTime(String strSourceStrengthReferenceTime)
	{
		/*Accept the Source Strength Reference Time in String format of type TM.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x022E, strSourceStrengthReferenceTime,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x022E,DicomConstants.DCM_DT_TM, strSourceStrengthReferenceTime);

		addDataElement(objIDataElement);


	}
	/**
	 * Retrieves Air Kerma Rate Reference Time.
	 * @return String - value of Source Strength Reference Time.
	 */
	public String getSourceStrengthReferenceTime()
	{
		Object objValue = getValue(0x300A,0x022E);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
}
