/*******************************************************************************
 *  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_AbstractMultiDimensionalImageModelComponentUnits;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CTAndMRAnatomyImaged;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PETUnits;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_UnitsOfVolumeMeasurement;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_UnitsOfAreaMeasurement;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_UnitsOfLinearMeasurement;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_IndexedHemodynamicResistanceUnits;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_HemodynamicResistanceUnits;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PressureUnits;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AbstractMultiDimensionalImageModelComponentUnits;
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 AbstractMultiDimensionalImageModelComponentUnits - CID7181
 */
public class AbstractMultiDimensionalImageModelComponentUnits_CID7181 
{
	
	/**
	 * 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 CathComplications_CID3755
	 */
	private PressureUnits_CID3500 objPressureUnitsCID3500;
	/**
	 * Object of CathComplications_CID3755
	 */
	private HemodynamicResistanceUnits_CID3502 objHemodynamicResistanceUnitsCID3502;
	/**
	 * Object of IndexedHemodynamicResistanceUnits_CID3503
	 */
	private IndexedHemodynamicResistanceUnits_CID3503 objIndexedHemodynamicResistanceUnitsCID3503;
	/**
	 * Object of UnitsOfLinearMeasurement_CID7460
	 */
	private UnitsOfLinearMeasurement_CID7460 objUnitsOfLinearMeasurementCID7460;
	/**
	 * Object of UnitsOfAreaMeasurement_CID7461
	 */
	private UnitsOfAreaMeasurement_CID7461 objUnitsOfAreaMeasurementCID7461;
	/**
	 * Object of UnitsOfVolumeMeasurement_CID7462
	 */
	private UnitsOfVolumeMeasurement_CID7462 objUnitsOfVolumeMeasurementCID7462;
	/**
	 * Object of PETUnits_CID84
	 */
	private PETUnits_CID84 objPETUnitsCID84;
	/**
	 * Instantiates a new AbstractMultiDimensionalImageModelComponentUnits_CID7181 Template 
	 */
	public AbstractMultiDimensionalImageModelComponentUnits_CID7181()
	{

	}

	/**
	 * 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 Code Value according to Code Meaning.
	 * @param enumAbstractMultiDimensionalImageModelComponentUnits Object of EnumCM_AbstractMultiDimensionalImageModelComponentUnits represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_AbstractMultiDimensionalImageModelComponentUnits enumAbstractMultiDimensionalImageModelComponentUnits)
	{
		switch(enumAbstractMultiDimensionalImageModelComponentUnits)
		{
		case NO_UNITS: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.NO_UNITS_1.getValue(); break;
		case RATIO: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.RATIO_ratio.getValue(); break;
		case HOUNSFIELD_UNIT: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.HOUNSFIELD_UNIT_hnsf_U.getValue(); break;
		case COUNTS: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.COUNTS_counts.getValue(); break;
		case COUNTS_PER_SECOND: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.COUNTS_PER_SECOND_counts_PER_s.getValue(); break;
		case ARBITRARY_UNIT: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.ARBITRARY_UNIT_arb_U.getValue(); break;
		case CENTIMETER_PER_SECOND: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.CENTIMETER_SECOND_cm_PER_s.getValue(); break;
		case MILLIMETER_PER_SECOND: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.MILLIMETER_SECOND_mm_PER_s.getValue(); break;
		case DECIBEL: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.DECIBEL_dB.getValue(); break;
		case DEGREES_CELSIUS: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.DEGREES_CELSIUS_Cel.getValue(); break;
		case MILLILITER_PER_MINUTE: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.MILLILITER_PER_MINUTE_ml_PER_min.getValue(); break;
		case MILLILITER_PER_SECOND: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.MILLILITER_PER_SECOND_ml_PER_s.getValue(); break;
		case MILLISECOND: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.MILLISECOND_ms.getValue(); break;
		case SECOND: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.SECOND_s.getValue(); break;
		case HERTZ: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.HERTZ_Hz.getValue(); break;
		case MILLITESLA: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.MILLITESLA_mT.getValue(); break;
		case NUMBER_PARTICLES_PER_100_GRAM_OF_TISSUE: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.NUMBER_PARTICLES_PER_100_GRAM_OF_TISSUE_Particles_PER_100_g_Tissue.getValue(); break;
		case SQUARE_MILLIMETER_PER_SECOND: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.SQUARE_MILLIMETER_PER_SECOND_mm2_PER_s.getValue(); break;
		case SECOND_PER_SQUARE_MILLIMETER: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.SECOND_PER_SQUARE_MILLIMETER_s_PER_mm2.getValue(); break;
		case MILLILITER_PER_100_GRAM_PER_MINUTE: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.MILLILITER_PER_100_GRAM_PER_MINUTE_ml_PER_100g_PER_min.getValue(); break;
		case MILLILITER_PER_100_MILLILITER: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.MILLILITER_PER_100_MILLILITER_ml_PER_100ml.getValue(); break;
		case MILLIMOLES_PER_KG_WET_WEIGHT: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.MILLIMOLES_PER_KG_WET_WEIGHT_mmol_PER_kg_WetWeight.getValue(); break;
		case PER_MIN: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.PER_MIN_min.getValue(); break;
		case PER_SECOND: this.strCodeValue =EnumCV_AbstractMultiDimensionalImageModelComponentUnits.PER_S_s.getValue(); break;
		}
	}

	/**
	 * Sets the value for AbstractMultiDimensionalImageModelComponentUnits
	 * @param enumAbstractMultiDimensionalImageModelComponentUnits Object of EnumCM_AbstractMultiDimensionalImageModelComponentUnits.
	 */
	public void setAbstractMultiDimensionalImageModelComponentUnits(Enum enumValue)
	{
		if (enumValue instanceof EnumCM_AbstractMultiDimensionalImageModelComponentUnits) 
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_AbstractMultiDimensionalImageModelComponentUnits enumAbstractMultiDimensionalImageModelComponentUnits = (EnumCM_AbstractMultiDimensionalImageModelComponentUnits) enumValue;
			/**
			 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
			 * sets the Code Value according to Code Meaning.
			 */
			this.strCodeMeaning = enumAbstractMultiDimensionalImageModelComponentUnits.getValue();
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.UCUM.getValue();
			
			/**
			 * set code Value
			 */
			setCodeValue(enumAbstractMultiDimensionalImageModelComponentUnits);
		}
		else if(enumValue instanceof EnumCM_PressureUnits)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_PressureUnits new_enumPressureUnits = (EnumCM_PressureUnits) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objPressureUnitsCID3500)
	this.objPressureUnitsCID3500 = new PressureUnits_CID3500();
			this.objPressureUnitsCID3500.setPressureUnits(new_enumPressureUnits);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objPressureUnitsCID3500.getCodeMeaning();
			this.strCodeValue = objPressureUnitsCID3500.getCodeValue();
			this.strCodingSchemeDesignator = objPressureUnitsCID3500.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_HemodynamicResistanceUnits)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_HemodynamicResistanceUnits new_enumHemodynamicResistanceUnits = (EnumCM_HemodynamicResistanceUnits) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objHemodynamicResistanceUnitsCID3502)
	this.objHemodynamicResistanceUnitsCID3502 = new HemodynamicResistanceUnits_CID3502();
			this.objHemodynamicResistanceUnitsCID3502.setHemodynamicResistanceUnits(new_enumHemodynamicResistanceUnits);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objHemodynamicResistanceUnitsCID3502.getCodeMeaning();
			this.strCodeValue = objHemodynamicResistanceUnitsCID3502.getCodeValue();
			this.strCodingSchemeDesignator = objHemodynamicResistanceUnitsCID3502.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_IndexedHemodynamicResistanceUnits)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_IndexedHemodynamicResistanceUnits new_enumIndexedHemodynamicResistanceUnits = (EnumCM_IndexedHemodynamicResistanceUnits) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objIndexedHemodynamicResistanceUnitsCID3503)
	this.objIndexedHemodynamicResistanceUnitsCID3503 = new IndexedHemodynamicResistanceUnits_CID3503();
			this.objIndexedHemodynamicResistanceUnitsCID3503.setIndexedHemodynamicResistanceUnits(new_enumIndexedHemodynamicResistanceUnits);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objIndexedHemodynamicResistanceUnitsCID3503.getCodeMeaning();
			this.strCodeValue = objIndexedHemodynamicResistanceUnitsCID3503.getCodeValue();
			this.strCodingSchemeDesignator = objIndexedHemodynamicResistanceUnitsCID3503.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_UnitsOfLinearMeasurement)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_UnitsOfLinearMeasurement new_enumUnitsOfLinearMeasurement = (EnumCM_UnitsOfLinearMeasurement) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objUnitsOfLinearMeasurementCID7460)
	this.objUnitsOfLinearMeasurementCID7460 = new UnitsOfLinearMeasurement_CID7460();
			this.objUnitsOfLinearMeasurementCID7460.setUnitsOfLinearMeasurement(new_enumUnitsOfLinearMeasurement);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objUnitsOfLinearMeasurementCID7460.getCodeMeaning();
			this.strCodeValue = objUnitsOfLinearMeasurementCID7460.getCodeValue();
			this.strCodingSchemeDesignator = objUnitsOfLinearMeasurementCID7460.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_UnitsOfAreaMeasurement)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_UnitsOfAreaMeasurement new_enumUnitsOfAreaMeasurement = (EnumCM_UnitsOfAreaMeasurement) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objUnitsOfAreaMeasurementCID7461)
	this.objUnitsOfAreaMeasurementCID7461 = new UnitsOfAreaMeasurement_CID7461();
			this.objUnitsOfAreaMeasurementCID7461.setUnitsOfAreaMeasurement(new_enumUnitsOfAreaMeasurement);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objUnitsOfAreaMeasurementCID7461.getCodeMeaning();
			this.strCodeValue = objUnitsOfAreaMeasurementCID7461.getCodeValue();
			this.strCodingSchemeDesignator = objUnitsOfAreaMeasurementCID7461.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_UnitsOfVolumeMeasurement)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_UnitsOfVolumeMeasurement new_enumUnitsOfVolumeMeasurement = (EnumCM_UnitsOfVolumeMeasurement) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objUnitsOfVolumeMeasurementCID7462)
	this.objUnitsOfVolumeMeasurementCID7462 = new UnitsOfVolumeMeasurement_CID7462();
			this.objUnitsOfVolumeMeasurementCID7462.setUnitsOfVolumeMeasurement(new_enumUnitsOfVolumeMeasurement);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objUnitsOfVolumeMeasurementCID7462.getCodeMeaning();
			this.strCodeValue = objUnitsOfVolumeMeasurementCID7462.getCodeValue();
			this.strCodingSchemeDesignator = objUnitsOfVolumeMeasurementCID7462.getCodingSchemeDesignator();
		}
		else if(enumValue instanceof EnumCM_PETUnits)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_PETUnits new_enumPETUnits = (EnumCM_PETUnits) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objPETUnitsCID84)
	this.objPETUnitsCID84 = new PETUnits_CID84();
			this.objPETUnitsCID84.setPETUnits(new_enumPETUnits);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objPETUnitsCID84.getCodeMeaning();
			this.strCodeValue = objPETUnitsCID84.getCodeValue();
			this.strCodingSchemeDesignator = objPETUnitsCID84.getCodingSchemeDesignator();
		}
		else
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger objDicomLogger = DicomLogger.getLogger();
				objDicomLogger.log(ResourceBundleWrapper.getValue("warning","InvalidEnumeratedValue",new Locale(DicomConfig.createInstance().getLocale())));
			}
		}
	}
}
