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


import java.util.Locale;

//import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_EchocardiographyAreaMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_EchocardiographyVolumeMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_GradientMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_MyocardiumMassMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VolumeFlowMethods;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConfig;
import cdac.medinfo.sdk.dcm30_04.utils.DicomLogger;
import cdac.medinfo.sdk.dcm30_04.utils.ResourceBundleWrapper;


/**
 * This class represents EchocardiographyMeasurementMethod - CID12227
 */
public class EchocardiographyMeasurementMethod_CID12227 
{
	
	/**
	 * The Code Value for template.
	 */
	private String strCodeValue = null;

	/**
	 * The Code Meaning for template.
	 */
	private String strCodeMeaning = null;

	/**
	 * The Coding Scheme Designator for template.
	 */
	private String strCodingSchemeDesignator;
	/**
	 * Object of EchocardiographyVolumeMethods_CID12228
	 */
	private EchocardiographyVolumeMethods_CID12228 objEchocardiographyVolumeMethodsCID12228;
	/**
	 * Object of EchocardiographyAreaMethods_CID12229
	 */
	private EchocardiographyAreaMethods_CID12229 objEchocardiographyAreaMethodsCID12229;
	/**
	 * Object of GradientMethods_CID12230
	 */
	private GradientMethods_CID12230 objGradientMethodsCID12230;
	/**
	 * Object of VolumeFlowMethods_CID12231
	 */
	private VolumeFlowMethods_CID12231 objVolumeFlowMethodsCID12231;
	/**
	 * Object of MyocardiumMassMethods_CID12232
	 */
	private MyocardiumMassMethods_CID12232 objMyocardiumMassMethodsCID12232;

	/**
	 * Instantiates a new EchocardiographyMeasurementMethod_CID12227 Template 
	 */
	public EchocardiographyMeasurementMethod_CID12227()
	{

	}

	/**
	 * Retrieves the value for Code Meaning.
	 * @return String value for Code Meaning.
	 */
	public String getCodeMeaning()
	{
		return strCodeMeaning;
	}

	/**
	 * Retrieves the value for Code Value.
	 * @return String value for Code Value.
	 */
	public String getCodeValue() 
	{
		return strCodeValue;
	}

	/**
	 * Retrieves the value for Coding Scheme Designator.
	 * @return String value for Coding Scheme Designator.
	 */
	public String getCodingSchemeDesignator() 
	{
		return strCodingSchemeDesignator;
	}

	/**
	 * Sets the value for EchocardiographyMeasurementMethod
	 * @param enumEchocardiographyMeasurementMethod Object of EnumCM_EchocardiographyMeasurementMethod.
	 */
	public void setEchocardiographyMeasurementMethod(Enum enumValue)
	{
		 if(enumValue instanceof EnumCM_EchocardiographyVolumeMethods)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_EchocardiographyVolumeMethods new_enumEchocardiographyVolumeMethods = (EnumCM_EchocardiographyVolumeMethods) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objEchocardiographyVolumeMethodsCID12228)
			this.objEchocardiographyVolumeMethodsCID12228 = new EchocardiographyVolumeMethods_CID12228();
			this.objEchocardiographyVolumeMethodsCID12228.setEchocardiographyVolumeMethods(new_enumEchocardiographyVolumeMethods);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objEchocardiographyVolumeMethodsCID12228.getCodeMeaning();
			this.strCodeValue = objEchocardiographyVolumeMethodsCID12228.getCodeValue();
			this.strCodingSchemeDesignator = objEchocardiographyVolumeMethodsCID12228.getCodingSchemeDesignator();
		}
		 else if(enumValue instanceof EnumCM_EchocardiographyAreaMethods)
			{
				/**
				 * Casting EnumValue to required Enum.
				 */
			 EnumCM_EchocardiographyAreaMethods new_enumEchocardiographyAreaMethods = (EnumCM_EchocardiographyAreaMethods) enumValue;
				
				/**
				 * Creating object of require CID with respect to enum and setting value accordingly.
				 */
				if(null== this.objEchocardiographyAreaMethodsCID12229)
				this.objEchocardiographyAreaMethodsCID12229 = new EchocardiographyAreaMethods_CID12229();
				this.objEchocardiographyAreaMethodsCID12229.setEchocardiographyAreaMethods(new_enumEchocardiographyAreaMethods);
				
				/**
				 * Retrieving attributes and setting it to member variables. 
				 */
				this.strCodeMeaning = objEchocardiographyAreaMethodsCID12229.getCodeMeaning();
				this.strCodeValue = objEchocardiographyAreaMethodsCID12229.getCodeValue();
				this.strCodingSchemeDesignator = objEchocardiographyAreaMethodsCID12229.getCodingSchemeDesignator();
			}
		 else if(enumValue instanceof EnumCM_GradientMethods)
			{
				/**
				 * Casting EnumValue to required Enum.
				 */
			 EnumCM_GradientMethods new_enumGradientMethods = (EnumCM_GradientMethods) enumValue;
				
				/**
				 * Creating object of require CID with respect to enum and setting value accordingly.
				 */
				if(null== this.objGradientMethodsCID12230)
				this.objGradientMethodsCID12230 = new GradientMethods_CID12230();
				this.objGradientMethodsCID12230.setGradientMethods(new_enumGradientMethods);
				
				/**
				 * Retrieving attributes and setting it to member variables. 
				 */
				this.strCodeMeaning = objGradientMethodsCID12230.getCodeMeaning();
				this.strCodeValue = objGradientMethodsCID12230.getCodeValue();
				this.strCodingSchemeDesignator = objGradientMethodsCID12230.getCodingSchemeDesignator();
			}
		 else if(enumValue instanceof EnumCM_VolumeFlowMethods)
			{
				/**
				 * Casting EnumValue to required Enum.
				 */
			 EnumCM_VolumeFlowMethods new_enumVolumeFlowMethods = (EnumCM_VolumeFlowMethods) enumValue;
				
				/**
				 * Creating object of require CID with respect to enum and setting value accordingly.
				 */
				if(null== this.objVolumeFlowMethodsCID12231)
				this.objVolumeFlowMethodsCID12231 = new VolumeFlowMethods_CID12231();
				this.objVolumeFlowMethodsCID12231.setVolumeFlowMethods(new_enumVolumeFlowMethods);
				
				/**
				 * Retrieving attributes and setting it to member variables. 
				 */
				this.strCodeMeaning = objVolumeFlowMethodsCID12231.getCodeMeaning();
				this.strCodeValue = objVolumeFlowMethodsCID12231.getCodeValue();
				this.strCodingSchemeDesignator = objVolumeFlowMethodsCID12231.getCodingSchemeDesignator();
			}
		 else if(enumValue instanceof EnumCM_MyocardiumMassMethods)
			{
				/**
				 * Casting EnumValue to required Enum.
				 */
			 EnumCM_MyocardiumMassMethods new_enumMyocardiumMassMethods = (EnumCM_MyocardiumMassMethods) enumValue;
				
				/**
				 * Creating object of require CID with respect to enum and setting value accordingly.
				 */
				if(null== this.objMyocardiumMassMethodsCID12232)
				this.objMyocardiumMassMethodsCID12232 = new MyocardiumMassMethods_CID12232();
				this.objMyocardiumMassMethodsCID12232.setMyocardiumMassMethods(new_enumMyocardiumMassMethods);
				
				/**
				 * Retrieving attributes and setting it to member variables. 
				 */
				this.strCodeMeaning = objMyocardiumMassMethodsCID12232.getCodeMeaning();
				this.strCodeValue = objMyocardiumMassMethodsCID12232.getCodeValue();
				this.strCodingSchemeDesignator = objMyocardiumMassMethodsCID12232.getCodingSchemeDesignator();
			}
		else
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger objDicomLogger = DicomLogger.getLogger();
				objDicomLogger.log(ResourceBundleWrapper.getValue("warning","InvalidEnumeratedValue",new Locale(DicomConfig.createInstance().getLocale())));
			}
		}
	}
}
