/*******************************************************************************
 *  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.services.dicomdir;



import cdac.medinfo.sdk.dcm30_04.baselibs.DataSet;
import cdac.medinfo.sdk.dcm30_04.baselibs.DirectoryRecordSequenceItem;
import cdac.medinfo.sdk.dcm30_04.baselibs.ExplicitDE;
import cdac.medinfo.sdk.dcm30_04.baselibs.TransferSyntax;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataElement;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataSet;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDictionaryReader;
import cdac.medinfo.sdk.dcm30_04.commoninterface.ITransferSyntax;
import cdac.medinfo.sdk.dcm30_04.enums.EnumDirectoryRecordType;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConstants;
import cdac.medinfo.sdk.dcm30_04.utils.EnumFeatureList;
import cdac.medinfo.sdk.dcm30_04.utils.ICollectionIterator;
import cdac.medinfo.sdk.dcm30_04.utils.StandardMethods;

/**
 * It contains the mapping of Record Selection keys and their type.
 * This class works as an agent, to which if data set is given then it can retrieve various types of 
 * Record Selection keys from the data set. It can also retrieve Record selection keys from the 
 * Directory Record Sequence Item.
 */
class DICOMDIRKeysAgent 
{
	
	
	/**
	 * This method gets the WaveForm keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains WaveForm keys. 
	 * @param objIDataSet the instance of DataSet from which waveform keys are retrieved.
	 * @return IDataSet - DataSet containing Waveform keys.
	 */
	IDataSet getWaveFormKeys(IDataSet objIDataSet)
	{
		IDataSet objWaveFormKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));

		if(objIDataSet.isPresent(EnumKeyValues.EnumWaveformKeys.INSTANCE_NUMBER_GROUP_NO.getValue(),EnumKeyValues.EnumWaveformKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumWaveformKeys.INSTANCE_NUMBER_GROUP_NO.getValue(),EnumKeyValues.EnumWaveformKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objWaveFormKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumWaveformKeys.CONTENT_DATE_GROUP_NO.getValue(),EnumKeyValues.EnumWaveformKeys.CONTENT_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumWaveformKeys.CONTENT_DATE_GROUP_NO.getValue(),EnumKeyValues.EnumWaveformKeys.CONTENT_DATE_ELEMENT_NO.getValue(), objIDataSet, objWaveFormKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumWaveformKeys.CONTENT_TIME_GROUP_NO.getValue(),EnumKeyValues.EnumWaveformKeys.CONTENT_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumWaveformKeys.CONTENT_TIME_GROUP_NO.getValue(),EnumKeyValues.EnumWaveformKeys.CONTENT_TIME_ELEMENT_NO.getValue(), objIDataSet, objWaveFormKeysDataSet);
		}
		return objWaveFormKeysDataSet;
	}

	void addDataElementToDataSet(int iGroupNo, int iElementNo, IDataSet objIDataSet, IDataSet objKeyValueDataSet)
	{
		IDataElement objDataElement = objIDataSet.getDataForTag(iGroupNo, iElementNo);
		int iVR = getIVRType(objDataElement, objIDataSet);
		setValue(objDataElement.getValue(), objDataElement.getTag().getGroupNumber(),objDataElement.getTag().getElementNumber(),iVR, objKeyValueDataSet);
	}

	int getIVRType(IDataElement objDataElement, IDataSet objIDataSet)
	{
		int iVR = 0;
		if(objDataElement instanceof ExplicitDE)
		{
			iVR = ((ExplicitDE)objDataElement).getIVRType();
		}
		else
		{
			String strVR = objIDataSet.getDictionaryReader().getVR(objDataElement.getTag().getGroupNumber(), objDataElement.getTag().getElementNumber());
			iVR = StandardMethods.getiVRtype(strVR);
		}
		return iVR;
	}

	/**
	 * This method gets the VOILUT keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains VOILUT keys.
	 * @param objIDataSet the instance of DataSet from which VOILUT keys are retrieved.
	 * @return IDataSet - DataSet containing VOILUT keys.
	 */
	IDataSet getVOILUTKeys(IDataSet objIDataSet)
	{
		IDataSet objVOILUTKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));

		if(objIDataSet.isPresent(EnumKeyValues.EnumVOILUTKeys.LOOKUP_TABLE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumVOILUTKeys.LOOKUP_TABLE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumVOILUTKeys.LOOKUP_TABLE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumVOILUTKeys.LOOKUP_TABLE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objVOILUTKeysDataSet);
		}
		return objVOILUTKeysDataSet;
	}

	/**
	 * This method gets the Visit keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Visit keys.
	 * @param objIDataSet the instance of DataSet from which Visit keys are retrieved.
	 * @return IDataSet - DataSet containing Visit keys.
	 */
	IDataSet getVisitKeys(IDataSet objIDataSet)
	{
		IDataSet objVisitKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumVisitKeys.INSTITUTION_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumVisitKeys.INSTITUTION_NAME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumVisitKeys.INSTITUTION_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumVisitKeys.INSTITUTION_NAME_ELEMENT_NO.getValue(), objIDataSet, objVisitKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumVisitKeys.ADMITTING_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumVisitKeys.ADMITTING_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumVisitKeys.ADMITTING_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumVisitKeys.ADMITTING_DATE_ELEMENT_NO.getValue(), objIDataSet, objVisitKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumVisitKeys.ADMISSION_ID_GROUP_NO.getValue(), EnumKeyValues.EnumVisitKeys.ADMISSION_ID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumVisitKeys.ADMISSION_ID_GROUP_NO.getValue(), EnumKeyValues.EnumVisitKeys.ADMISSION_ID_ELEMENT_NO.getValue(), objIDataSet, objVisitKeysDataSet);
		}
		return objVisitKeysDataSet;
	}

	/**
	 * This method gets the Topic keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Topic keys.
	 * @param objIDataSet the instance of DataSet from which Topic keys are retrieved.
	 * @return IDataSet - DataSet containing Topic keys.
	 */
	IDataSet getTopicKeys(IDataSet objIDataSet)
	{
		IDataSet objTopicKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumTopicKeys.TOPIC_TITLE_GROUP_NO.getValue(), EnumKeyValues.EnumTopicKeys.TOPIC_TITLE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumTopicKeys.TOPIC_TITLE_GROUP_NO.getValue(), EnumKeyValues.EnumTopicKeys.TOPIC_TITLE_ELEMENT_NO.getValue(), objIDataSet, objTopicKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumTopicKeys.TOPIC_SUBJECT_GROUP_NO.getValue(), EnumKeyValues.EnumTopicKeys.TOPIC_SUBJECT_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumTopicKeys.TOPIC_SUBJECT_GROUP_NO.getValue(), EnumKeyValues.EnumTopicKeys.TOPIC_SUBJECT_ELEMENT_NO.getValue(), objIDataSet, objTopicKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumTopicKeys.TOPIC_AUTHOR_GROUP_NO.getValue(), EnumKeyValues.EnumTopicKeys.TOPIC_AUTHOR_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumTopicKeys.TOPIC_AUTHOR_GROUP_NO.getValue(), EnumKeyValues.EnumTopicKeys.TOPIC_AUTHOR_ELEMENT_NO.getValue(), objIDataSet, objTopicKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumTopicKeys.TOPIC_KEY_WORDS_GROUP_NO.getValue(), EnumKeyValues.EnumTopicKeys.TOPIC_KEY_WORDS_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumTopicKeys.TOPIC_KEY_WORDS_GROUP_NO.getValue(), EnumKeyValues.EnumTopicKeys.TOPIC_KEY_WORDS_ELEMENT_NO.getValue(), objIDataSet, objTopicKeysDataSet);
		}
		return objTopicKeysDataSet;
	}

	/**
	 * This method gets the Study keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Study keys.
	 * @param objIDataSet the instance of DataSet from which Study keys are retrieved.
	 * @return IDataSet - DataSet containing Study keys.
	 */
	IDataSet getStudyKeys(IDataSet objIDataSet)
	{
		IDataSet objStudyKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyKeys.STUDY_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyKeys.STUDY_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_DATE_ELEMENT_NO.getValue(), objIDataSet, objStudyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyKeys.STUDY_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_DESCRIPTION_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyKeys.STUDY_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_DESCRIPTION_ELEMENT_NO.getValue(), objIDataSet, objStudyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyKeys.STUDY_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyKeys.STUDY_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_TIME_ELEMENT_NO.getValue(), objIDataSet, objStudyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyKeys.STUDY_INSTANCE_UID_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_INSTANCE_UID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyKeys.STUDY_INSTANCE_UID_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_INSTANCE_UID_ELEMENT_NO.getValue(), objIDataSet, objStudyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyKeys.STUDY_ID_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_ID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyKeys.STUDY_ID_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.STUDY_ID_ELEMENT_NO.getValue(), objIDataSet, objStudyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyKeys.ACCESSION_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.ACCESSION_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyKeys.ACCESSION_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumStudyKeys.ACCESSION_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objStudyKeysDataSet);
		}
		return objStudyKeysDataSet;
	}

	/**
	 * This method gets the Study Component keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Study Component keys.
	 * @param objIDataSet the instance of DataSet from which Study Component keys are retrieved.
	 * @return IDataSet - DataSet containing Study Component keys.
	 */
	IDataSet getStudyComponentKeys(IDataSet objIDataSet)
	{
		IDataSet objStudyComponentKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));

		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyComponentKeys.MODALITY_GROUP_NO.getValue(), EnumKeyValues.EnumStudyComponentKeys.MODALITY_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyComponentKeys.MODALITY_GROUP_NO.getValue(), EnumKeyValues.EnumStudyComponentKeys.MODALITY_ELEMENT_NO.getValue(), objIDataSet, objStudyComponentKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyComponentKeys.STUDY_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumStudyComponentKeys.STUDY_DESCRIPTION_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyComponentKeys.STUDY_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumStudyComponentKeys.STUDY_DESCRIPTION_ELEMENT_NO.getValue(), objIDataSet, objStudyComponentKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumStudyComponentKeys.PERFORMING_PHYSICIAN_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumStudyComponentKeys.PERFORMING_PHYSICIAN_NAME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStudyComponentKeys.PERFORMING_PHYSICIAN_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumStudyComponentKeys.PERFORMING_PHYSICIAN_NAME_ELEMENT_NO.getValue(), objIDataSet, objStudyComponentKeysDataSet);
		}
		return objStudyComponentKeysDataSet;
	}

	/**
	 * This method gets the Stored Print keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Stored Print keys.
	 * @param objIDataSet the instance of DataSet from which Stored Print keys are retrieved.
	 * @return IDataSet - DataSet containing Stored Print keys.
	 */
	IDataSet getStoredPrintKeys(IDataSet objIDataSet)
	{
		IDataSet objStoredPrintKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumStoredPrintKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumStoredPrintKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumStoredPrintKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumStoredPrintKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objStoredPrintKeysDataSet);
		}
		return objStoredPrintKeysDataSet;
	}

	/**
	 * This method gets the SR Document keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains SR Document keys.
	 * @param objIDataSet the instance of DataSet from which SR Document keys are retrieved.
	 * @return IDataSet - DataSet containing SR Document keys.
	 */
	IDataSet getSRDocumentKeys(IDataSet objIDataSet)
	{
		IDataSet objSRDocumentKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));

		if(objIDataSet.isPresent(EnumKeyValues.EnumSRDocumentKeys.INSTANCE_NO_GROUP_NO.getValue(), EnumKeyValues.EnumSRDocumentKeys.INSTANCE_NO_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSRDocumentKeys.INSTANCE_NO_GROUP_NO.getValue(), EnumKeyValues.EnumSRDocumentKeys.INSTANCE_NO_ELEMENT_NO.getValue(), objIDataSet, objSRDocumentKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSRDocumentKeys.COMPLETION_FLAG_GROUP_NO.getValue(),EnumKeyValues.EnumSRDocumentKeys.COMPLETION_FLAG_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSRDocumentKeys.COMPLETION_FLAG_GROUP_NO.getValue(),EnumKeyValues.EnumSRDocumentKeys.COMPLETION_FLAG_ELEMENT_NO.getValue(), objIDataSet, objSRDocumentKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSRDocumentKeys.VERIFICATION_FLAG_GROUP_NO.getValue(), EnumKeyValues.EnumSRDocumentKeys.VERIFICATION_FLAG_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSRDocumentKeys.VERIFICATION_FLAG_GROUP_NO.getValue(), EnumKeyValues.EnumSRDocumentKeys.VERIFICATION_FLAG_ELEMENT_NO.getValue(), objIDataSet, objSRDocumentKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSRDocumentKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumSRDocumentKeys.CONTENT_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSRDocumentKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumSRDocumentKeys.CONTENT_DATE_ELEMENT_NO.getValue(), objIDataSet, objSRDocumentKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSRDocumentKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumSRDocumentKeys.CONTENT_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSRDocumentKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumSRDocumentKeys.CONTENT_TIME_ELEMENT_NO.getValue(), objIDataSet, objSRDocumentKeysDataSet);
		}
		return objSRDocumentKeysDataSet;
	}

	/**
	 * This method gets the Spectroscopy keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Spectroscopy keys.
	 * @param objIDataSet the instance of DataSet from which Spectroscopy keys are retrieved.
	 * @return IDataSet - DataSet containing Spectroscopy keys.
	 */
	IDataSet getSpectroscopyKeys(IDataSet objIDataSet)
	{
		IDataSet objSpectroscopyKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));

		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.IMAGE_TYPE_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.IMAGE_TYPE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.IMAGE_TYPE_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.IMAGE_TYPE_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.CONTENT_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.CONTENT_DATE_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.CONTENT_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.CONTENT_TIME_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.NUMBER_OF_FRAMES_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.NUMBER_OF_FRAMES_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.NUMBER_OF_FRAMES_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.NUMBER_OF_FRAMES_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.ROWS_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.ROWS_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.ROWS_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.ROWS_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.COLUMNS_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.COLUMNS_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.COLUMNS_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.COLUMNS_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_ROWS_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_ROWS_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_ROWS_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_ROWS_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_COLUMNS_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_COLUMNS_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_COLUMNS_GROUP_NO.getValue(), EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_COLUMNS_ELEMENT_NO.getValue(), objIDataSet, objSpectroscopyKeysDataSet);
		}
		return objSpectroscopyKeysDataSet;
	}

	/**
	 * This method gets the Series keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Series keys.
	 * @param objIDataSet the instance of DataSet from which Series keys are retrieved.
	 * @return IDataSet - DataSet containing Series keys.
	 */
	IDataSet getSeriesKeys(IDataSet objIDataSet)
	{
		IDataSet objSeriesKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));

		if(objIDataSet.isPresent(EnumKeyValues.EnumSeriesKeys.MODALITY_GROUP_NO.getValue(), EnumKeyValues.EnumSeriesKeys.MODALITY_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSeriesKeys.MODALITY_GROUP_NO.getValue(), EnumKeyValues.EnumSeriesKeys.MODALITY_ELEMENT_NO.getValue(), objIDataSet, objSeriesKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSeriesKeys.SERIES_INSTANCE_UID_GROUP_NO.getValue(), EnumKeyValues.EnumSeriesKeys.SERIES_INSTANCE_UID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSeriesKeys.SERIES_INSTANCE_UID_GROUP_NO.getValue(), EnumKeyValues.EnumSeriesKeys.SERIES_INSTANCE_UID_ELEMENT_NO.getValue(), objIDataSet, objSeriesKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumSeriesKeys.SERIES_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumSeriesKeys.SERIES_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumSeriesKeys.SERIES_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumSeriesKeys.SERIES_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objSeriesKeysDataSet);
		}
		return objSeriesKeysDataSet;
	}

	/**
	 * This method gets the RT Treatment Record keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains RT Treatment Record keys.
	 * @param objIDataSet the instance of DataSet from which RT Treatment Record keys are retrieved.
	 * @return IDataSet - DataSet containing RT Treatment Record keys.
	 */
	IDataSet getRTTreatmentRecordKeys(IDataSet objIDataSet)
	{
		IDataSet objRTTreatmentRecordKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTTreatmentRecordKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRTTreatmentRecordKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTTreatmentRecordKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRTTreatmentRecordKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objRTTreatmentRecordKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_DATE_ELEMENT_NO.getValue(), objIDataSet, objRTTreatmentRecordKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_TIME_ELEMENT_NO.getValue(), objIDataSet, objRTTreatmentRecordKeysDataSet);
		}
		return objRTTreatmentRecordKeysDataSet;
	}

	/**
	 * This method gets the RT Structure Set keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains RT Structure Set keys.
	 * @param objIDataSet the instance of DataSet from which RT Structure Set keys are retrieved.
	 * @return IDataSet - DataSet containing RT Structure Set keys.
	 */
	IDataSet getRTStructureSetKeys(IDataSet objIDataSet)
	{
		IDataSet objRTStructureSetKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTStructureSetKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRTStructureSetKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTStructureSetKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRTStructureSetKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objRTStructureSetKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_LABEL_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_LABEL_ELEMENT_NO.getValue(), objIDataSet, objRTStructureSetKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_DATE_ELEMENT_NO.getValue(), objIDataSet, objRTStructureSetKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_TIME_ELEMENT_NO.getValue(), objIDataSet, objRTStructureSetKeysDataSet);
		}
		return objRTStructureSetKeysDataSet;
	}

	/**
	 * This method gets the Interpretation keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Interpretation keys.
	 * @param objIDataSet the instance of DataSet from which Interpretation keys are retrieved.
	 * @return IDataSet - DataSet containing Interpretation keys.
	 */
	IDataSet getInterpretationKeys(IDataSet objIDataSet)
	{
		IDataSet objInterpretationKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TRANSCRIPTION_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TRANSCRIPTION_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TRANSCRIPTION_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TRANSCRIPTION_DATE_ELEMENT_NO.getValue(), objIDataSet, objInterpretationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_AUTHOR_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_AUTHOR_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_AUTHOR_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_AUTHOR_ELEMENT_NO.getValue(), objIDataSet, objInterpretationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_DIAGNOSIS_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_DIAGNOSIS_DESCRIPTION_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_DIAGNOSIS_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_DIAGNOSIS_DESCRIPTION_ELEMENT_NO.getValue(), objIDataSet, objInterpretationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_ID_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_ID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_ID_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_ID_ELEMENT_NO.getValue(), objIDataSet, objInterpretationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TYPE_ID_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TYPE_ID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TYPE_ID_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TYPE_ID_ELEMENT_NO.getValue(), objIDataSet, objInterpretationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_STATUS_ID_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_STATUS_ID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_STATUS_ID_GROUP_NO.getValue(), EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_STATUS_ID_ELEMENT_NO.getValue(), objIDataSet, objInterpretationKeysDataSet);
		}
		return objInterpretationKeysDataSet;
	}

	/**
	 * This method gets the Key Object Document keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Key Object Document keys.
	 * @param objIDataSet the instance of DataSet from which Key Object Document keys are retrieved.
	 * @return IDataSet - DataSet containing Key Object Document keys.
	 */
	IDataSet getKeyObjectDocumentKeys(IDataSet objIDataSet)
	{
		IDataSet objKeyObjectDocumentKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumKeyObjectDocumentKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumKeyObjectDocumentKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumKeyObjectDocumentKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumKeyObjectDocumentKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objKeyObjectDocumentKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_DATE_ELEMENT_NO.getValue(), objIDataSet, objKeyObjectDocumentKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_TIME_ELEMENT_NO.getValue(), objIDataSet, objKeyObjectDocumentKeysDataSet);
		}
		return objKeyObjectDocumentKeysDataSet;
	}

	/**
	 * This method gets the Modality LUT keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Modality LUT keys.
	 * @param objIDataSet the instance of DataSet from which Modality LUT keys are retrieved.
	 * @return IDataSet - DataSet containing Modality LUT keys.
	 */
	IDataSet getModalityLUTKeys(IDataSet objIDataSet)
	{
		IDataSet objModalityLUTKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumModalityLUTKeys.LOOKUP_TABLE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumModalityLUTKeys.LOOKUP_TABLE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumModalityLUTKeys.LOOKUP_TABLE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumModalityLUTKeys.LOOKUP_TABLE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objModalityLUTKeysDataSet);
		}
		return objModalityLUTKeysDataSet;
	}

	/**
	 * This method gets the Overlay keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Overlay keys.
	 * @param objIDataSet the instance of DataSet from which Overlay keys are retrieved.
	 * @return IDataSet - DataSet containing Overlay keys.
	 */
	IDataSet getOverlayKeys(IDataSet objIDataSet)
	{
		IDataSet objOverlayKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumOverlayKeys.OVERLAY_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumOverlayKeys.OVERLAY_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumOverlayKeys.OVERLAY_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumOverlayKeys.OVERLAY_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objOverlayKeysDataSet);
		}
		return objOverlayKeysDataSet;
	}

	/**
	 * This method gets the Patient keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Patient keys.
	 * @param objIDataSet the instance of DataSet from which Patient keys are retrieved.
	 * @return IDataSet - DataSet containing Patient keys.
	 */
	IDataSet getPatientKeys(IDataSet objIDataSet)
	{
		IDataSet objPatientKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumPatientKeys.PATIENT_ID_GROUP_NO.getValue(), EnumKeyValues.EnumPatientKeys.PATIENT_ID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumPatientKeys.PATIENT_ID_GROUP_NO.getValue(), EnumKeyValues.EnumPatientKeys.PATIENT_ID_ELEMENT_NO.getValue(), objIDataSet, objPatientKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumPatientKeys.PATIENT_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumPatientKeys.PATIENT_NAME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumPatientKeys.PATIENT_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumPatientKeys.PATIENT_NAME_ELEMENT_NO.getValue(), objIDataSet, objPatientKeysDataSet);
		}
		return objPatientKeysDataSet;
	}

	/**
	 * This method gets the Presentation keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Presentation keys.
	 * @param objIDataSet the instance of DataSet from which Presentation keys are retrieved.
	 * @return IDataSet - DataSet containing Presentation keys.
	 */
	IDataSet getPresentationKeys(IDataSet objIDataSet)
	{
		IDataSet objPresentationKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumPresentationKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumPresentationKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objPresentationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumPresentationKeys.CONTENT_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.CONTENT_LABEL_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumPresentationKeys.CONTENT_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.CONTENT_LABEL_ELEMENT_NO.getValue(), objIDataSet, objPresentationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumPresentationKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumPresentationKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue(), objIDataSet, objPresentationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_DATE_ELEMENT_NO.getValue(), objIDataSet, objPresentationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_TIME_ELEMENT_NO.getValue(), objIDataSet, objPresentationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumPresentationKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumPresentationKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumPresentationKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue(), objIDataSet, objPresentationKeysDataSet);
		}
		return objPresentationKeysDataSet;
	}

	/**
	 * This method gets the Raw Data keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Raw Data keys.
	 * @param objIDataSet the instance of DataSet from which Raw Data keys are retrieved.
	 * @return IDataSet - DataSet containing Raw Data keys.
	 */
	IDataSet getRawDataKeys(IDataSet objIDataSet)
	{
		IDataSet objRawDataKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));

		if(objIDataSet.isPresent(EnumKeyValues.EnumRawDataKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumRawDataKeys.CONTENT_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRawDataKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumRawDataKeys.CONTENT_DATE_ELEMENT_NO.getValue(), objIDataSet, objRawDataKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRawDataKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRawDataKeys.CONTENT_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRawDataKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRawDataKeys.CONTENT_TIME_ELEMENT_NO.getValue(), objIDataSet, objRawDataKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRawDataKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRawDataKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRawDataKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRawDataKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objRawDataKeysDataSet);
		}
		return objRawDataKeysDataSet;
	}

	/**
	 * This method gets the Registration keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Registration keys.
	 * @param objIDataSet the instance of DataSet from which Registration keys are retrieved.
	 * @return IDataSet - DataSet containing Registration keys.
	 */
	IDataSet getRegistrationKeys(IDataSet objIDataSet)
	{
		IDataSet objRegistrationKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumRegistrationKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRegistrationKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_DATE_ELEMENT_NO.getValue(), objIDataSet, objRegistrationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRegistrationKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRegistrationKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_TIME_ELEMENT_NO.getValue(), objIDataSet, objRegistrationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRegistrationKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRegistrationKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objRegistrationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRegistrationKeys.CONTENT_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_LABEL_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRegistrationKeys.CONTENT_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_LABEL_ELEMENT_NO.getValue(), objIDataSet, objRegistrationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRegistrationKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRegistrationKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue(), objIDataSet, objRegistrationKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRegistrationKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRegistrationKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumRegistrationKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue(), objIDataSet, objRegistrationKeysDataSet);
		}
		return objRegistrationKeysDataSet;
	}

	/**
	 * This method gets the Result keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Result keys.
	 * @param objIDataSet the instance of DataSet from which Result keys are retrieved.
	 * @return IDataSet - DataSet containing Result keys.
	 */
	IDataSet getResultKey(IDataSet objIDataSet)
	{
		IDataSet objResultKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumResultKey.INSTANCE_CREATIONDATE_GROUP_NO.getValue(), EnumKeyValues.EnumResultKey.INSTANCE_CREATIONDATE_ELMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumResultKey.INSTANCE_CREATIONDATE_GROUP_NO.getValue(), EnumKeyValues.EnumResultKey.INSTANCE_CREATIONDATE_ELMENT_NO.getValue(), objIDataSet, objResultKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumResultKey.RESULT_ID_GROUP_NO.getValue(), EnumKeyValues.EnumResultKey.RESULT_ID_ELMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumResultKey.RESULT_ID_GROUP_NO.getValue(), EnumKeyValues.EnumResultKey.RESULT_ID_ELMENT_NO.getValue(), objIDataSet, objResultKeysDataSet);
		}
		return objResultKeysDataSet;
	}

	/**
	 * This method gets the RT Dose keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains RT Dose keys.
	 * @param objIDataSet the instance of DataSet from which RT Dose keys are retrieved.
	 * @return IDataSet - DataSet containing RT Dose keys.
	 */
	IDataSet getRTDoseKeys(IDataSet objIDataSet)
	{
		IDataSet objRTDoseKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTDoseKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRTDoseKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTDoseKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRTDoseKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objRTDoseKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTDoseKeys.DOSE_SUMMATION_TYPE_GROUP_NO.getValue(), EnumKeyValues.EnumRTDoseKeys.DOSE_SUMMATION_TYPE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTDoseKeys.DOSE_SUMMATION_TYPE_GROUP_NO.getValue(), EnumKeyValues.EnumRTDoseKeys.DOSE_SUMMATION_TYPE_ELEMENT_NO.getValue(), objIDataSet, objRTDoseKeysDataSet);
		}
		return objRTDoseKeysDataSet;
	}

	/**
	 * This method gets the RT Plan keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains RT Plan keys.
	 * @param objIDataSet the instance of DataSet from which RT Plan keys are retrieved.
	 * @return IDataSet - DataSet containing RT Plan keys.
	 */
	IDataSet getRTPlanKeys(IDataSet objIDataSet)
	{
		IDataSet objRTPlanKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTPlanKeys.INTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRTPlanKeys.INTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTPlanKeys.INTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumRTPlanKeys.INTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objRTPlanKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTPlanKeys.RT_PLAN_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumRTPlanKeys.RT_PLAN_LABEL_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTPlanKeys.RT_PLAN_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumRTPlanKeys.RT_PLAN_LABEL_ELEMENT_NO.getValue(), objIDataSet, objRTPlanKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTPlanKeys.RT_PLAN_DATA_GROUP_NO.getValue(), EnumKeyValues.EnumRTPlanKeys.RT_PLAN_DATA_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTPlanKeys.RT_PLAN_DATA_GROUP_NO.getValue(), EnumKeyValues.EnumRTPlanKeys.RT_PLAN_DATA_ELEMENT_NO.getValue(), objIDataSet, objRTPlanKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumRTPlanKeys.RT_PLAN_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRTPlanKeys.RT_PLAN_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumRTPlanKeys.RT_PLAN_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumRTPlanKeys.RT_PLAN_TIME_ELEMENT_NO.getValue(), objIDataSet, objRTPlanKeysDataSet);
		}
		return objRTPlanKeysDataSet;
	}

	/**
	 * This method gets the Image keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Image keys.
	 * @param objIDataSet the instance of DataSet from which Image keys are retrieved.
	 * @return IDataSet - DataSet containing Image keys.
	 */
	IDataSet getImageKeys(IDataSet objIDataSet)
	{
		IDataSet objImageKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumImageKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumImageKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objImageKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumImageKeys.ROWS_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.ROWS_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumImageKeys.ROWS_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.ROWS_ELEMENT_NO.getValue(), objIDataSet, objImageKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumImageKeys.NO_OF_FRAME_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.NO_OF_FRAME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumImageKeys.NO_OF_FRAME_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.NO_OF_FRAME_ELEMENT_NO.getValue(), objIDataSet, objImageKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumImageKeys.IMAGE_TYPE_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.IMAGE_TYPE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumImageKeys.IMAGE_TYPE_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.IMAGE_TYPE_ELEMENT_NO.getValue(), objIDataSet, objImageKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumImageKeys.SOP_CLASS_UID_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.SOP_CLASS_UID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumImageKeys.SOP_CLASS_UID_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.SOP_CLASS_UID_ELEMENT_NO.getValue(), objIDataSet, objImageKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumImageKeys.SOP_INSTANCE_UID_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.SOP_INSTANCE_UID_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumImageKeys.SOP_INSTANCE_UID_GROUP_NO.getValue(), EnumKeyValues.EnumImageKeys.SOP_INSTANCE_UID_ELEMENT_NO.getValue(), objIDataSet, objImageKeysDataSet);
		}
		return objImageKeysDataSet;
	}

	/**
	 * This method gets the Fiducial keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Fiducial keys.
	 * @param objIDataSet the instance of DataSet from which Fiducial keys are retrieved.
	 * @return IDataSet - DataSet containing Fiducial keys.
	 */
	IDataSet getFiducialKeys(IDataSet objIDataSet)
	{
		IDataSet objFiducialKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumFiducialKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_DATE_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumFiducialKeys.CONTENT_DATE_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_DATE_ELEMENT_NO.getValue(), objIDataSet, objFiducialKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumFiducialKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_TIME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumFiducialKeys.CONTENT_TIME_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_TIME_ELEMENT_NO.getValue(), objIDataSet, objFiducialKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumFiducialKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumFiducialKeys.INSTANCE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objFiducialKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumFiducialKeys.CONTENT_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_LABEL_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumFiducialKeys.CONTENT_LABEL_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_LABEL_ELEMENT_NO.getValue(), objIDataSet, objFiducialKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumFiducialKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumFiducialKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue(), objIDataSet, objFiducialKeysDataSet);
		}
		if(objIDataSet.isPresent(EnumKeyValues.EnumFiducialKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumFiducialKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue(), EnumKeyValues.EnumFiducialKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue(), objIDataSet, objFiducialKeysDataSet);
		}
		return objFiducialKeysDataSet;
	}

	/**
	 * This method gets the Curve keys from the given DataSet.
	 * It returns a DataSet in Little Endian Explicit Transfer Syntax which contains Curve keys.
	 * @param objIDataSet the instance of DataSet from which Curve keys are retrieved.
	 * @return IDataSet - DataSet containing Curve keys.
	 */
	IDataSet getCurveKeys(IDataSet objIDataSet)
	{
		IDataSet objCurveKeysDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));
		if(objIDataSet.isPresent(EnumKeyValues.EnumCurveKeys.CURVE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumCurveKeys.CURVE_NUMBER_ELEMENT_NO.getValue()))
		{
			addDataElementToDataSet(EnumKeyValues.EnumCurveKeys.CURVE_NUMBER_GROUP_NO.getValue(), EnumKeyValues.EnumCurveKeys.CURVE_NUMBER_ELEMENT_NO.getValue(), objIDataSet, objCurveKeysDataSet);
		}
		return objCurveKeysDataSet;
	}

	/**
	 * This function get the record key data elements from Directory record Sequence ,
	 * created data set from these key values and return it. 
	 * @param objDirectoryRecordSequenceItem instance of Directory Record Sequence Item from which 
	 * record keys are to be extracted.
	 * @return IDataSet - instance of Data Set containing key values.
	 */
	IDataSet extractKeys(DirectoryRecordSequenceItem objDirectoryRecordSequenceItem)
	{
		String strDirectoryRecordType = objDirectoryRecordSequenceItem.getDirectoryRecordType();
		EnumDirectoryRecordType enumDirectoryRecordType = getDirectoryRecordType(strDirectoryRecordType);
		IDataSet objIDataSet = new DataSet(new TransferSyntax(DicomConstants.TS_EXPLICIT_VR_LITTLE_ENDIAN));

		ICollectionIterator<IDataElement> objDataElementCollection = objDirectoryRecordSequenceItem.iterator();
		switch(enumDirectoryRecordType)
		{
		case CURVE:
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumCurveKeys.CURVE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumCurveKeys.CURVE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case FIDUCIAL:
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_LABEL_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_LABEL_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumFiducialKeys.CONTENT_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumFiducialKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumFiducialKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case IMAGE :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumImageKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumFiducialKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumImageKeys.ROWS_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumImageKeys.ROWS_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumImageKeys.COLUMNS_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumImageKeys.COLUMNS_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumImageKeys.NO_OF_FRAME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumImageKeys.NO_OF_FRAME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumImageKeys.IMAGE_TYPE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumImageKeys.IMAGE_TYPE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumImageKeys.SOP_CLASS_UID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumImageKeys.SOP_CLASS_UID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumImageKeys.SOP_INSTANCE_UID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumImageKeys.SOP_INSTANCE_UID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case INTERPRETATION :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TRANSCRIPTION_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TRANSCRIPTION_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_AUTHOR_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_AUTHOR_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_DIAGNOSIS_DESCRIPTION_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_DIAGNOSIS_DESCRIPTION_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_ID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_ID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TYPE_ID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_TYPE_ID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_STATUS_ID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumInterpretationKeys.INTERPRETATION_STATUS_ID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case KEY_OBJECT_DOC :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumKeyObjectDocumentKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumKeyObjectDocumentKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumKeyObjectDocumentKeys.CONTENT_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case MODALITY_LUT :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumModalityLUTKeys.LOOKUP_TABLE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumModalityLUTKeys.LOOKUP_TABLE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case OVERLAY :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() ==EnumKeyValues.EnumOverlayKeys.OVERLAY_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumOverlayKeys.OVERLAY_NUMBER_GROUP_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case PATIENT :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumPatientKeys.PATIENT_NAME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumPatientKeys.PATIENT_NAME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumPatientKeys.PATIENT_ID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumPatientKeys.PATIENT_ID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case PRESENTATION :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumPresentationKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumPresentationKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumPresentationKeys.CONTENT_LABEL_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumPresentationKeys.CONTENT_LABEL_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumPresentationKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumPresentationKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumPresentationKeys.PRESENTATION_CREATION_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumPresentationKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumPresentationKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case RAW_DATA :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRawDataKeys.CONTENT_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRawDataKeys.CONTENT_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRawDataKeys.CONTENT_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRawDataKeys.CONTENT_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRawDataKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRawDataKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case REGISTRATION :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRegistrationKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRegistrationKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_LABEL_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_LABEL_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_DESCRIPTION_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_DESCRIPTION_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_CREATOR_NAME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRegistrationKeys.CONTENT_CREATOR_NAME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case RESULTS :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumResultKey.RESULT_ID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumResultKey.RESULT_ID_ELMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumResultKey.INSTANCE_CREATIONDATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumResultKey.INSTANCE_CREATIONDATE_ELMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case RT_DOSE :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTDoseKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTDoseKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTDoseKeys.DOSE_SUMMATION_TYPE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTDoseKeys.DOSE_SUMMATION_TYPE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case RT_PLAN :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTPlanKeys.INTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTPlanKeys.INTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTPlanKeys.RT_PLAN_LABEL_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTPlanKeys.RT_PLAN_LABEL_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTPlanKeys.RT_PLAN_DATA_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTPlanKeys.RT_PLAN_DATA_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTPlanKeys.RT_PLAN_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTPlanKeys.RT_PLAN_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case RT_STRUCTURE_SET :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTStructureSetKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTStructureSetKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_LABEL_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_LABEL_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTStructureSetKeys.STRUCTURE_SET_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case RT_TREAT_RECORD :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTTreatmentRecordKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTTreatmentRecordKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumRTTreatmentRecordKeys.TREATMENT_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case SERIES:
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSeriesKeys.MODALITY_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSeriesKeys.MODALITY_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSeriesKeys.SERIES_INSTANCE_UID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSeriesKeys.SERIES_INSTANCE_UID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSeriesKeys.SERIES_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSeriesKeys.SERIES_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case SPECTROSCOPY:
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSpectroscopyKeys.IMAGE_TYPE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSpectroscopyKeys.IMAGE_TYPE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSpectroscopyKeys.CONTENT_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSpectroscopyKeys.CONTENT_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSpectroscopyKeys.CONTENT_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSpectroscopyKeys.CONTENT_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSpectroscopyKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSpectroscopyKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSpectroscopyKeys.ROWS_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSpectroscopyKeys.ROWS_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSpectroscopyKeys.COLUMNS_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSpectroscopyKeys.COLUMNS_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_ROWS_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_ROWS_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_COLUMNS_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSpectroscopyKeys.DATA_POINT_COLUMNS_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case SR_DOCUMENT :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSRDocumentKeys.INSTANCE_NO_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSRDocumentKeys.	INSTANCE_NO_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSRDocumentKeys.COMPLETION_FLAG_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSRDocumentKeys.COMPLETION_FLAG_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSRDocumentKeys.VERIFICATION_FLAG_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSRDocumentKeys.VERIFICATION_FLAG_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSRDocumentKeys.CONTENT_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSRDocumentKeys.CONTENT_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumSRDocumentKeys.CONTENT_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumSRDocumentKeys.CONTENT_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case STORED_PRINT :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStoredPrintKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStoredPrintKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case STUDY_COMPONENT :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyComponentKeys.MODALITY_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyComponentKeys.MODALITY_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyComponentKeys.STUDY_DESCRIPTION_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyComponentKeys.STUDY_DESCRIPTION_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyComponentKeys.PERFORMING_PHYSICIAN_NAME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyComponentKeys.PERFORMING_PHYSICIAN_NAME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case STUDY :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyKeys.STUDY_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyKeys.STUDY_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyKeys.STUDY_DESCRIPTION_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyKeys.STUDY_DESCRIPTION_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyKeys.STUDY_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyKeys.STUDY_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyKeys.STUDY_INSTANCE_UID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyKeys.STUDY_INSTANCE_UID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyKeys.STUDY_ID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyKeys.STUDY_ID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumStudyKeys.ACCESSION_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumStudyKeys.ACCESSION_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case TOPIC :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumTopicKeys.TOPIC_TITLE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumTopicKeys.TOPIC_TITLE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumTopicKeys.TOPIC_SUBJECT_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumTopicKeys.TOPIC_SUBJECT_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumTopicKeys.TOPIC_AUTHOR_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumTopicKeys.TOPIC_AUTHOR_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumTopicKeys.TOPIC_KEY_WORDS_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumTopicKeys.TOPIC_KEY_WORDS_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case VISIT :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumVisitKeys.ADMITTING_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumVisitKeys.ADMITTING_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumVisitKeys.ADMISSION_ID_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumVisitKeys.ADMISSION_ID_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() ==EnumKeyValues.EnumVisitKeys.INSTITUTION_NAME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumVisitKeys.INSTITUTION_NAME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case VOI_LUT :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumVOILUTKeys.LOOKUP_TABLE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumVOILUTKeys.LOOKUP_TABLE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		case WAVEFORM :
			while(objDataElementCollection.hasNext())
			{
				IDataElement objIDataElement = objDataElementCollection.next();
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumWaveformKeys.INSTANCE_NUMBER_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumWaveformKeys.INSTANCE_NUMBER_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumWaveformKeys.CONTENT_DATE_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumWaveformKeys.CONTENT_DATE_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
				if(objIDataElement.getTag().getGroupNumber() == EnumKeyValues.EnumWaveformKeys.CONTENT_TIME_GROUP_NO.getValue() &&  objIDataElement.getTag().getElementNumber() == EnumKeyValues.EnumWaveformKeys.CONTENT_TIME_ELEMENT_NO.getValue())
				{
					objIDataSet.addDataElement(objIDataElement);
				}
			}
			break;
		}
		return objIDataSet;
	}

	/**
	 * This function gets the Enum Value of Directory Record Type for a particular String.
	 * @param strDirectoryRecordType String vlaue of Directory Record Type.
	 * @return EnumDirectoryRecordType - Enum value of Directory Record type. 
	 */
	EnumDirectoryRecordType getDirectoryRecordType(String strDirectoryRecordType)
	{
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.PATIENT.getValue()))
			return EnumDirectoryRecordType.PATIENT;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.STUDY.getValue()))
			return EnumDirectoryRecordType.STUDY;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.SERIES.getValue()))
			return EnumDirectoryRecordType.SERIES;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.IMAGE.getValue()))
			return EnumDirectoryRecordType.IMAGE;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.OVERLAY.getValue()))
			return EnumDirectoryRecordType.OVERLAY;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.MODALITY_LUT.getValue()))
			return EnumDirectoryRecordType.MODALITY_LUT;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.VOI_LUT.getValue()))
			return EnumDirectoryRecordType.VOI_LUT;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.CURVE.getValue()))
			return EnumDirectoryRecordType.CURVE;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.TOPIC.getValue()))
			return EnumDirectoryRecordType.TOPIC;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.VISIT.getValue()))
			return EnumDirectoryRecordType.VISIT;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.RESULTS.getValue()))
			return EnumDirectoryRecordType.RESULTS;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.INTERPRETATION.getValue()))
			return EnumDirectoryRecordType.INTERPRETATION;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.STUDY_COMPONENT.getValue()))
			return EnumDirectoryRecordType.STUDY_COMPONENT;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.STORED_PRINT.getValue()))
			return EnumDirectoryRecordType.STORED_PRINT;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.RT_DOSE.getValue()))
			return EnumDirectoryRecordType.RT_DOSE;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.RT_STRUCTURE_SET.getValue()))
			return EnumDirectoryRecordType.RT_STRUCTURE_SET;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.RT_PLAN.getValue()))
			return EnumDirectoryRecordType.RT_PLAN;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.RT_TREAT_RECORD.getValue()))
			return EnumDirectoryRecordType.RT_TREAT_RECORD;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.PRESENTATION.getValue()))
			return EnumDirectoryRecordType.PRESENTATION;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.WAVEFORM.getValue()))
			return EnumDirectoryRecordType.WAVEFORM;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.SR_DOCUMENT.getValue()))
			return EnumDirectoryRecordType.SR_DOCUMENT;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.KEY_OBJECT_DOC.getValue()))
			return EnumDirectoryRecordType.KEY_OBJECT_DOC;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.SPECTROSCOPY.getValue()))
			return EnumDirectoryRecordType.SPECTROSCOPY;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.RAW_DATA.getValue()))
			return EnumDirectoryRecordType.RAW_DATA;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.REGISTRATION.getValue()))
			return EnumDirectoryRecordType.REGISTRATION;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.FIDUCIAL.getValue()))
			return EnumDirectoryRecordType.FIDUCIAL;
		if(strDirectoryRecordType.equals(EnumDirectoryRecordType.PRIVATE.getValue()))
			return EnumDirectoryRecordType.PRIVATE;
		return null;
	}

	/**
	 * Sets value in dataElement and adds it to passed DataSet.
	 * @param objValue Object value 
	 * @param iGroupNumber Group Number of the DataElement
	 * @param iElementNumber Element Number of the DataElement
	 * @param iVR VR type for DataElement.
	 * @param objIDataSet instance of DataSet
	 */
	private void setValue(Object objValue,int iGroupNumber,int iElementNumber, int iVR, IDataSet objIDataSet)
	{
		/* 
		 * 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 Hash Map
		 */
		IDictionaryReader objIDictionaryReader = objIDataSet.getDictionaryReader();
		ITransferSyntax objITransferSyntax = objIDataSet.getTransferSyntax();
		IDataElement objIDataElement = new ExplicitDE(iGroupNumber,iElementNumber,iVR,objValue,objITransferSyntax,objIDictionaryReader);
		objIDataSet.addDataElement(objIDataElement);
	}
}