/*******************************************************************************
 *  Copyright 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.templates.generaltemplates;

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ImageLibrary;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_ImageLibrary;

/**
 * This class represents ImageLibrary_TID1600
 */
public class ImageLibrary_TID1600 extends Template{

	/**
	 * Object of ImageLibraryEntry_TID1601
	 */
	private ImageLibraryEntry_TID1601 objImageLibraryEntry_TID1601;
	/**
	 * Object of ImageLibraryEntryDescriptors_TID1602
	 */
	private ImageLibraryEntryDescriptors_TID1602 objImageLibraryEntryDescriptors_TID1602;
	/**
	 * Instantiates ImageLibrary_TID1600 Template.
	 * @param objTree Object of SRTree.
	 */
	public ImageLibrary_TID1600(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves ImageLibraryEntry_TID1601 
	 * @return objImageLibraryEntry_TID1601 Object of ImageLibraryEntry_TID1601 
	 */
	public ImageLibraryEntry_TID1601 getImageLibraryEntry() 
	{
		if(null == this.objImageLibraryEntry_TID1601)
			this.objImageLibraryEntry_TID1601 = new ImageLibraryEntry_TID1601(getSRTree());
		return this.objImageLibraryEntry_TID1601;
	}
	/**
	 * Retrieves ImageLibraryEntryDescriptors_TID1602 
	 * @return objImageLibraryEntryDescriptors_TID1602 Object of ImageLibraryEntryDescriptors_TID1602 
	 */
	public ImageLibraryEntryDescriptors_TID1602 getImageLibraryEntryDescriptors() 
	{
		if(null == this.objImageLibraryEntryDescriptors_TID1602)
			this.objImageLibraryEntryDescriptors_TID1602 = new ImageLibraryEntryDescriptors_TID1602(getSRTree());
		return this.objImageLibraryEntryDescriptors_TID1602;
	}
	/**
	 * Sets the value for ImageLibrary
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setImageLibrary(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ImageLibrary.IMAGE_LIBRARY.getValue();
		String strCodeValue = EnumCV_ImageLibrary.IMAGE_LIBRARY_111028.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CONTAINER and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for ImageLibraryGroup
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setImageLibraryGroup(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ImageLibrary.IMAGE_LIBRARY_GROUP.getValue();
		String strCodeValue = EnumCV_ImageLibrary.IMAGE_LIBRARY_GROUP_126200.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CONTAINER and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
}
