/*******************************************************************************
 *  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.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.VesselBranchModifiers_CID12117;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VesselBranchModifiers;

/**
 * This class represents EquationOrTable -TID315
 */
public class EquationOrTable_TID315 extends Template{
	/**
	 * Object of VesselBranchModifiers_CID12117
	 */
	private VesselBranchModifiers_CID12117 objVesselBranchModifiersCID12117;
	/**
	 * Instantiates EquationOrTable_TID315 Template.
	 * @param objTree Object of SRTree.
	 */
	public EquationOrTable_TID315(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Sets value for EquationorTable.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumVesselSegmentModifiers Enumerated value for EquationorTable.
	 */
	public void setEquationorTable(int[] arrPosition, EnumCM_VesselBranchModifiers enumVesselBranchModifiers)
	{
		
		if(null== this.objVesselBranchModifiersCID12117)
			this.objVesselBranchModifiersCID12117 = new VesselBranchModifiers_CID12117();
		this.objVesselBranchModifiersCID12117.setVesselBranchModifiers(enumVesselBranchModifiers);

		String strCM = objVesselBranchModifiersCID12117.getCodeMeaning();
		String strCV = objVesselBranchModifiersCID12117.getCodeValue();
		String strCSD = objVesselBranchModifiersCID12117.getCodingSchemeDesignator();
		String strSNMDCTID = objVesselBranchModifiersCID12117.getSNOMEDCTID();

		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, "", "", "", strCV, strCSD, "", strCM,strSNMDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
}
