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

import java.util.Locale;

import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ArterialInputFunctionMeasurementMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_BolusArrivalTimeDerivationMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PerfusionAnalysisMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PerfusionMeasurementMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_QuantitativeMethodsusedforPerfusionAndTracerKineticModels;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_T1MeasurementMethods;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_TracerKineticModels;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_QuantitativeMethodsusedforPerfusionAndTracerKineticModels;
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 QuantitativeMethodsusedforPerfusionAndTracerKineticModels - CID4106
 */

public class QuantitativeMethodsusedforPerfusionAndTracerKineticModels_CID4106 {

	/**
	 * 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 T1MeasurementMethods_CID4100
	 */
	private T1MeasurementMethods_CID4100 objT1MeasurementMethods_CID4100;
	
	/**
	 * Object of TracerKineticModels_CID4101
	 */
	private TracerKineticModels_CID4101 objTracerKineticModelsCID4101;

	/**
	 * Object of PerfusionMeasurementMethods_CID4102
	 */
	private PerfusionMeasurementMethods_CID4102 objPerfusionMeasurementMethodsCID4102;
	
	/**
	 * Object of ArterialInputFunctionMeasurementMethods_CID4103
	 */
	private ArterialInputFunctionMeasurementMethods_CID4103 objArterialInputFunctionMeasurementMethodsCID4103;
	
	/**
	 * Object of BolusArrivalTimeDerivationMethods_CID4104
	 */
	private BolusArrivalTimeDerivationMethods_CID4104 objBolusArrivalTimeDerivationMethodsCID4104;
	
	/**
	 * Object of PerfusionAnalysisMethods_CID4015
	 */
	private PerfusionAnalysisMethods_CID4015 objPerfusionAnalysisMethods_CID4015;
	
	/**
	 * 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;
	}
	
	/**
	 * Instantiates a new QuantitativeMethodsusedforPerfusionAndTracerKineticModels Template 
	 */
	public QuantitativeMethodsusedforPerfusionAndTracerKineticModels_CID4106() 
	{

	}

	/**
	 * Sets the Code Value according to Code Meaning.
	 * @param enumQuantitativeMethodsusedforPerfusionAndTracerKineticModels Object of EnumCM_QuantitativeMethodsusedforPerfusionAndTracerKineticModels represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_QuantitativeMethodsusedforPerfusionAndTracerKineticModels enumQuantitativeMethodsusedforPerfusionAndTracerKineticModels)
	{
		switch(enumQuantitativeMethodsusedforPerfusionAndTracerKineticModels)
		{
		case MODEL_FREE_CONCENTRATION_TIME_QUANTITIFICATION: this.strCodeValue = EnumCV_QuantitativeMethodsusedforPerfusionAndTracerKineticModels.MODEL_FREE_CONCENTRATION_TIME_QUANTITIFICATION_126342.getValue();break;
		}
	}

	/**
	 * Sets the value for QuantitativeMethodsusedforPerfusionAndTracerKineticModels
	 * @param enumValue This Enum value can be one of the following enums - EnumT1MeasurementMethods, EnumCM_QuantitativeMethodsusedforPerfusionAndTracerKineticModels,
	 * or EnumCM_TracerKineticModels.
	 */
	public void setQuantitativeMethodsusedforPerfusionAndTracerKineticModels(Enum enumValue)
	{
		if (enumValue instanceof EnumCM_QuantitativeMethodsusedforPerfusionAndTracerKineticModels) 
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_QuantitativeMethodsusedforPerfusionAndTracerKineticModels new_enumQuantitativeMethodsusedforPerfusionAndTracerKineticModels = (EnumCM_QuantitativeMethodsusedforPerfusionAndTracerKineticModels)enumValue;
			
			this.strCodeMeaning = new_enumQuantitativeMethodsusedforPerfusionAndTracerKineticModels.getValue();
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
			setCodeValue(new_enumQuantitativeMethodsusedforPerfusionAndTracerKineticModels);
		}
		else if(enumValue instanceof EnumCM_T1MeasurementMethods)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_T1MeasurementMethods new_enumT1MeasurementMethods = (EnumCM_T1MeasurementMethods) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objT1MeasurementMethods_CID4100)
	this.objT1MeasurementMethods_CID4100 = new T1MeasurementMethods_CID4100();
			this.objT1MeasurementMethods_CID4100.setT1MeasurementMethods(new_enumT1MeasurementMethods);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objT1MeasurementMethods_CID4100.getCodeMeaning();
			this.strCodeValue = objT1MeasurementMethods_CID4100.getCodeValue();
			this.strCodingSchemeDesignator = objT1MeasurementMethods_CID4100.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_TracerKineticModels)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_TracerKineticModels new_enumTracerKineticModels = (EnumCM_TracerKineticModels) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objTracerKineticModelsCID4101)
	this.objTracerKineticModelsCID4101 = new TracerKineticModels_CID4101();
			this.objTracerKineticModelsCID4101.setTracerKineticModels(new_enumTracerKineticModels);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objTracerKineticModelsCID4101.getCodeMeaning();
			this.strCodeValue = objTracerKineticModelsCID4101.getCodeValue();
			this.strCodingSchemeDesignator = objTracerKineticModelsCID4101.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_PerfusionMeasurementMethods)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_PerfusionMeasurementMethods new_enumPerfusionMeasurementMethods = (EnumCM_PerfusionMeasurementMethods) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objPerfusionMeasurementMethodsCID4102)
	this.objPerfusionMeasurementMethodsCID4102 = new PerfusionMeasurementMethods_CID4102();
			this.objPerfusionMeasurementMethodsCID4102.setPerfusionMeasurementMethods(new_enumPerfusionMeasurementMethods);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objPerfusionMeasurementMethodsCID4102.getCodeMeaning();
			this.strCodeValue = objPerfusionMeasurementMethodsCID4102.getCodeValue();
			this.strCodingSchemeDesignator = objPerfusionMeasurementMethodsCID4102.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_ArterialInputFunctionMeasurementMethods)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_ArterialInputFunctionMeasurementMethods new_enumArterialInputFunctionMeasurementMethods = (EnumCM_ArterialInputFunctionMeasurementMethods) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objArterialInputFunctionMeasurementMethodsCID4103)
	this.objArterialInputFunctionMeasurementMethodsCID4103 = new ArterialInputFunctionMeasurementMethods_CID4103();
			this.objArterialInputFunctionMeasurementMethodsCID4103.setArterialInputFunctionMeasurementMethods(new_enumArterialInputFunctionMeasurementMethods);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objArterialInputFunctionMeasurementMethodsCID4103.getCodeMeaning();
			this.strCodeValue = objArterialInputFunctionMeasurementMethodsCID4103.getCodeValue();
			this.strCodingSchemeDesignator = objArterialInputFunctionMeasurementMethodsCID4103.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_BolusArrivalTimeDerivationMethods)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_BolusArrivalTimeDerivationMethods new_enumBolusArrivalTimeDerivationMethods = (EnumCM_BolusArrivalTimeDerivationMethods) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objBolusArrivalTimeDerivationMethodsCID4104)
	this.objBolusArrivalTimeDerivationMethodsCID4104 = new BolusArrivalTimeDerivationMethods_CID4104();
			this.objBolusArrivalTimeDerivationMethodsCID4104.setBolusArrivalTimeDerivationMethods(new_enumBolusArrivalTimeDerivationMethods);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objBolusArrivalTimeDerivationMethodsCID4104.getCodeMeaning();
			this.strCodeValue = objBolusArrivalTimeDerivationMethodsCID4104.getCodeValue();
			this.strCodingSchemeDesignator = objBolusArrivalTimeDerivationMethodsCID4104.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_PerfusionAnalysisMethods)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_PerfusionAnalysisMethods new_enumPerfusionAnalysisMethods = (EnumCM_PerfusionAnalysisMethods) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objPerfusionAnalysisMethods_CID4015)
	this.objPerfusionAnalysisMethods_CID4015 = new PerfusionAnalysisMethods_CID4015();
			this.objPerfusionAnalysisMethods_CID4015.setPerfusionAnalysisMethods(new_enumPerfusionAnalysisMethods);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objPerfusionAnalysisMethods_CID4015.getCodeMeaning();
			this.strCodeValue = objPerfusionAnalysisMethods_CID4015.getCodeValue();
			this.strCodingSchemeDesignator = objPerfusionAnalysisMethods_CID4015.getCodingSchemeDesignator();
		}
		else
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger objDicomLogger = DicomLogger.getLogger();
				objDicomLogger.log(ResourceBundleWrapper.getValue("warning","InvalidEnumeratedValue",new Locale(DicomConfig.createInstance().getLocale())));
			}
		}
	}
}
