/*******************************************************************************
 *  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.services.print.printsinkimpl;

import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataSet;
import cdac.medinfo.sdk.dcm30_04.enums.EnumSOPClassUIDs;

/**
 *  This class contains the Attributes for Query Model. Also contains methods to populate and fill dataset of Query Model.
 */
public class NCreateImagePrintMangMeta_Attributes 
{
	private NCreateFilmSessionAttribute objNCreateFilmSessionAttribute;
	private NCreateFilmBoxAttribute objNCreateFilmBoxAttribute;
	private NCreatePrintImageOverlayBoxAttribute objNCreatePrintImageOverlayBoxAttribute;
	private NCreatePresentationLUTAttribute objNCreatePresentationLUTAttribute;
	private EnumSOPClassUIDs enumSOPClassUIDs;
	
	/**
	 * This is default Constructor for NCreateImagePrintMangMeta_Attributes.
	 */
	public NCreateImagePrintMangMeta_Attributes() {
		super();
	}

	public NCreateImagePrintMangMeta_Attributes(EnumSOPClassUIDs enumSOPClassUIDs)
	{
		this.enumSOPClassUIDs = enumSOPClassUIDs;
	}
	
	/**
	 * Populates the query Model using filled dataset.
	 */
	public void populate(IDataSet objIDataSet)
	{
		if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.BASICFILMSESSIONIOD))
		{
			if(objNCreateFilmSessionAttribute == null)
				objNCreateFilmSessionAttribute = new NCreateFilmSessionAttribute();
			objNCreateFilmSessionAttribute.populate(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.BASICFILMBOXIOD))
		{
			if(objNCreateFilmBoxAttribute == null)
				objNCreateFilmBoxAttribute = new NCreateFilmBoxAttribute();
			objNCreateFilmBoxAttribute.populate(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.BASICPRINTIMAGEOVERLAYBOXIOD))
		{
			if(objNCreatePrintImageOverlayBoxAttribute == null)
				objNCreatePrintImageOverlayBoxAttribute = new NCreatePrintImageOverlayBoxAttribute();
			objNCreatePrintImageOverlayBoxAttribute.populate(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRESENTATIONLUTIOD))
		{
			if(objNCreatePresentationLUTAttribute == null)
				objNCreatePresentationLUTAttribute = new NCreatePresentationLUTAttribute();
			objNCreatePresentationLUTAttribute.populate(objIDataSet);
		}
	}	
	
	/**
	 * Fills the dataset using already populated Query Model.
	 */
	public void fill(IDataSet objIDataSet)
	{
		if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.BASICFILMSESSIONIOD))
		{
			if(objNCreateFilmSessionAttribute != null)
				objNCreateFilmSessionAttribute.fill(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.BASICFILMBOXIOD))
		{
			if(objNCreateFilmBoxAttribute != null)
				objNCreateFilmBoxAttribute.fill(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.BASICPRINTIMAGEOVERLAYBOXIOD))
		{
			if(objNCreatePrintImageOverlayBoxAttribute != null)
				objNCreatePrintImageOverlayBoxAttribute.fill(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRESENTATIONLUTIOD))
		{
			if(objNCreatePresentationLUTAttribute != null)
				objNCreatePresentationLUTAttribute.fill(objIDataSet);
		}
	}

	/**
	 * Retrieve the object of NCreateSOPCommonAttributes.
	 * @return Object of NCreateSOPCommonAttributes
	 */
	public NCreateFilmSessionAttribute getNCreateSOPCommonAttributes()
	{
		if(objNCreateFilmSessionAttribute == null)
			objNCreateFilmSessionAttribute = new NCreateFilmSessionAttribute();
		return objNCreateFilmSessionAttribute;
	}

	/**
	 * Set the value of NCreateSOPCommonAttributes.
	 * @param objNCreateFilmSessionAttribute - object of NCreateSOPCommonAttributes
	 */
	public void setNCreateSOPCommonAttributes(NCreateFilmSessionAttribute objNCreateFilmSessionAttribute)
	{
		this.objNCreateFilmSessionAttribute = objNCreateFilmSessionAttribute;
	}

	/**
	 * Retrieve the object of NCreateFilmBoxAttribute.
	 * @return Object of NCreateFilmBoxAttribute
	 */
	public NCreateFilmBoxAttribute getNCreateFilmBoxAttribute() 
	{
		if(objNCreateFilmBoxAttribute == null)
			objNCreateFilmBoxAttribute = new NCreateFilmBoxAttribute();
		return objNCreateFilmBoxAttribute;
	}

	/**
	 * Set the value of NCreateFilmBoxAttribute.
	 * @param objNCreateFilmBoxAttribute  - object of NCreateFilmBoxAttribute
	 */
	public void setNCreateFilmBoxAttribute(NCreateFilmBoxAttribute objNCreateFilmBoxAttribute)
	{
		this.objNCreateFilmBoxAttribute = objNCreateFilmBoxAttribute;
	}

	/**
	 * Retrieve the object of NCreatePrintImageOverlayBoxAttribute.
	 * @return Object of NCreatePrintImageOverlayBoxAttribute
	 */
	public NCreatePrintImageOverlayBoxAttribute getNCreatePrintImageOverlayBoxAttribute()
	{
		if(objNCreatePrintImageOverlayBoxAttribute == null)
			objNCreatePrintImageOverlayBoxAttribute = new NCreatePrintImageOverlayBoxAttribute();
		return objNCreatePrintImageOverlayBoxAttribute;
	}

	/**
	 * Set the value of NCreatePrintImageOverlayBoxAttribute.
	 * @param objNCreatePrintImageOverlayBoxAttribute - object of NCreatePrintImageOverlayBoxAttribute
	 */
	public void setNCreatePrintImageOverlayBoxAttribute(NCreatePrintImageOverlayBoxAttribute objNCreatePrintImageOverlayBoxAttribute) 
	{
		this.objNCreatePrintImageOverlayBoxAttribute = objNCreatePrintImageOverlayBoxAttribute;
	}

	/**
	 * Retrieve the object of NCreatePresentationLUTAttribute.
	 * @return Object of NCreatePresentationLUTAttribute
	 */
	public NCreatePresentationLUTAttribute getNCreatePresentationLUTAttribute()
	{
		if(objNCreatePresentationLUTAttribute == null)
			objNCreatePresentationLUTAttribute = new NCreatePresentationLUTAttribute();
		return objNCreatePresentationLUTAttribute;
	}

	/**
	 * Set the value of NCreatePresentationLUTAttribute.
	 * @param objNCreatePresentationLUTAttribute - object of NCreatePresentationLUTAttribute
	 */
	public void setNCreatePresentationLUTAttribute(NCreatePresentationLUTAttribute objNCreatePresentationLUTAttribute) 
	{
		this.objNCreatePresentationLUTAttribute = objNCreatePresentationLUTAttribute;
	}
	/**
	 * Retrieve the object of NCreateFilmSessionAttribute.
	 * @return Object of NCreateFilmSessionAttribute
	 */
	public NCreateFilmSessionAttribute getNCreateFilmSessionAttribute() {
		return objNCreateFilmSessionAttribute;
	}

	/**
	 * Set the value of NCreateFilmSessionAttribute.
	 * @param objNCreateFilmSessionAttribute - object of NCreateFilmSessionAttribute
	 */
	public void setNCreateFilmSessionAttribute(
			NCreateFilmSessionAttribute objNCreateFilmSessionAttribute) {
		this.objNCreateFilmSessionAttribute = objNCreateFilmSessionAttribute;
	}
}
