/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/eas/vo/lookups/ProtocolActions.java
//#############################################################################
//#                                                                           #
//#  Copyright (C) <2015>  <IMS MAXIMS>                                       #
//#                                                                           #
//#  This program is free software: you can redistribute it and/or modify     #
//#  it under the terms of the GNU Affero General Public License as           #
//#  published by the Free Software Foundation, either version 3 of the       #
//#  License, or (at your option) any later version.                          # 
//#                                                                           #
//#  This program is distributed in the hope that it will be useful,          #
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of           #
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
//#  GNU Affero General Public License for more details.                      #
//#                                                                           #
//#  You should have received a copy of the GNU Affero General Public License #
//#  along with this program.  If not, see <http://www.gnu.org/licenses/>.    #
//#                                                                           #
//#  IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of    #
//#  this program.  Users of this software do so entirely at their own risk.  #
//#  IMS MAXIMS only ensures the Clinical Safety of unaltered run-time        #
//#  software that it builds, deploys and maintains.                          #
//#                                                                           #
//#############################################################################
//#EOH
// This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814)
// Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved.
// WARNING: DO NOT MODIFY the content of this file

package ims.eas.vo.lookups;

import ims.framework.cn.data.TreeNode;
import java.util.ArrayList;
import ims.framework.utils.Image;
import ims.framework.utils.Color;

public class ProtocolActions extends ims.vo.LookupInstVo implements TreeNode
{
	private static final long serialVersionUID = 1L;

	public ProtocolActions()
	{
		super();
	}
	public ProtocolActions(int id)
	{
		super(id, "", true);
	}
	public ProtocolActions(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public ProtocolActions(int id, String text, boolean active, ProtocolActions parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public ProtocolActions(int id, String text, boolean active, ProtocolActions parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public ProtocolActions(int id, String text, boolean active, ProtocolActions parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static ProtocolActions buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new ProtocolActions(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (ProtocolActions)super.getParentInstance();
	}
	public ProtocolActions getParent()
	{
		return (ProtocolActions)super.getParentInstance();
	}
	public void setParent(ProtocolActions parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		ProtocolActions[] typedChildren = new ProtocolActions[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (ProtocolActions)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof ProtocolActions)
		{
			super.addChild((ProtocolActions)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof ProtocolActions)
		{
			super.removeChild((ProtocolActions)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		ProtocolActionsCollection result = new ProtocolActionsCollection();
		result.add(CONSULTATION_SESSION);
		result.add(PLANNING_CT);
		result.add(MRI_FOR_COREG);
		result.add(DENTIST);
		result.add(PEG);
		result.add(SIMULATION);
		result.add(CCCL);
		result.add(IV_CONTRAST);
		result.add(ORAL_CONTRAST);
		result.add(GATING_OPTIONS);
		result.add(IMRT);
		result.add(PET_CT_COREG);
		result.add(IMMOBILISATION_TYPE);
		result.add(MOULD_ROOM_PREP);
		return result;
	}
	public static ProtocolActions[] getNegativeInstances()
	{
		ProtocolActions[] instances = new ProtocolActions[14];
		instances[0] = CONSULTATION_SESSION;
		instances[1] = PLANNING_CT;
		instances[2] = MRI_FOR_COREG;
		instances[3] = DENTIST;
		instances[4] = PEG;
		instances[5] = SIMULATION;
		instances[6] = CCCL;
		instances[7] = IV_CONTRAST;
		instances[8] = ORAL_CONTRAST;
		instances[9] = GATING_OPTIONS;
		instances[10] = IMRT;
		instances[11] = PET_CT_COREG;
		instances[12] = IMMOBILISATION_TYPE;
		instances[13] = MOULD_ROOM_PREP;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[14];
		negativeInstances[0] = "CONSULTATION_SESSION";
		negativeInstances[1] = "PLANNING_CT";
		negativeInstances[2] = "MRI_FOR_COREG";
		negativeInstances[3] = "DENTIST";
		negativeInstances[4] = "PEG";
		negativeInstances[5] = "SIMULATION";
		negativeInstances[6] = "CCCL";
		negativeInstances[7] = "IV_CONTRAST";
		negativeInstances[8] = "ORAL_CONTRAST";
		negativeInstances[9] = "GATING_OPTIONS";
		negativeInstances[10] = "IMRT";
		negativeInstances[11] = "PET_CT_COREG";
		negativeInstances[12] = "IMMOBILISATION_TYPE";
		negativeInstances[13] = "MOULD_ROOM_PREP";
		return negativeInstances;
	}
	public static ProtocolActions getNegativeInstance(String name)
	{
		if(name == null)
			return null;
		String[] negativeInstances = getNegativeInstanceNames();
		for (int i = 0; i < negativeInstances.length; i++)
		{
			if(negativeInstances[i].equals(name))
				return getNegativeInstances()[i];
		}
		return null;
	}
	public static ProtocolActions getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		ProtocolActions[] negativeInstances = getNegativeInstances();
		for (int i = 0; i < negativeInstances.length; i++)
		{
			if(negativeInstances[i].getID() == id)
				return negativeInstances[i];
		}
		return null;
	}
	public int getTypeId()
	{
		return TYPE_ID;
	}
	public static final int TYPE_ID = 1451013;
	public static final ProtocolActions CONSULTATION_SESSION = new ProtocolActions(-2499, "Must plan in Consultation Session", true, null, null, Color.Default);
	public static final ProtocolActions PLANNING_CT = new ProtocolActions(-2500, "Planning CT", true, null, null, Color.Default);
	public static final ProtocolActions MRI_FOR_COREG = new ProtocolActions(-2501, "MRI for co-reg", true, null, null, Color.Default);
	public static final ProtocolActions DENTIST = new ProtocolActions(-2502, "Dentist Required", true, null, null, Color.Default);
	public static final ProtocolActions PEG = new ProtocolActions(-2503, "Peg Required", true, null, null, Color.Default);
	public static final ProtocolActions SIMULATION = new ProtocolActions(-2504, "Simulation", true, null, null, Color.Default);
	public static final ProtocolActions CCCL = new ProtocolActions(-2505, "Appropriate for CCC-L", true, null, null, Color.Default);
	public static final ProtocolActions IV_CONTRAST = new ProtocolActions(-2506, "IV Contrast", true, null, null, Color.Default);
	public static final ProtocolActions ORAL_CONTRAST = new ProtocolActions(-2507, "Oral Contrast", true, null, null, Color.Default);
	public static final ProtocolActions GATING_OPTIONS = new ProtocolActions(-2508, "Gating Options", true, null, null, Color.Default);
	public static final ProtocolActions IMRT = new ProtocolActions(-2509, "IMRT", true, null, null, Color.Default);
	public static final ProtocolActions PET_CT_COREG = new ProtocolActions(-2510, "PET CT for co-reg", true, null, null, Color.Default);
	public static final ProtocolActions IMMOBILISATION_TYPE = new ProtocolActions(-2511, "Immobilisation Type", true, null, null, Color.Default);
	public static final ProtocolActions MOULD_ROOM_PREP = new ProtocolActions(-2512, "Mould Room Preparation Required", true, null, null, Color.Default);
}
