/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/hl7/vo/lookups/MessageType.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.hl7.vo.lookups;

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

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

	public MessageType()
	{
		super();
	}
	public MessageType(int id)
	{
		super(id, "", true);
	}
	public MessageType(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public MessageType(int id, String text, boolean active, MessageType parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public MessageType(int id, String text, boolean active, MessageType parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public MessageType(int id, String text, boolean active, MessageType parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static MessageType buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new MessageType(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (MessageType)super.getParentInstance();
	}
	public MessageType getParent()
	{
		return (MessageType)super.getParentInstance();
	}
	public void setParent(MessageType parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		MessageType[] typedChildren = new MessageType[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (MessageType)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof MessageType)
		{
			super.addChild((MessageType)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof MessageType)
		{
			super.removeChild((MessageType)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		MessageTypeCollection result = new MessageTypeCollection();
		result.add(ADT);
		result.add(A01);
		result.add(A02);
		result.add(A03);
		result.add(A04);
		result.add(A05);
		result.add(A08);
		result.add(A10);
		result.add(A11);
		result.add(A13);
		result.add(A21);
		result.add(A22);
		result.add(A28);
		result.add(A29);
		result.add(A31);
		result.add(A34);
		result.add(A38);
		result.add(A40);
		result.add(A47);
		result.add(A52);
		result.add(A53);
		result.add(A15);
		result.add(A26);
		result.add(A12);
		result.add(A60);
		result.add(A16);
		result.add(A25);
		result.add(OCS);
		result.add(O01);
		result.add(O02);
		result.add(O13);
		result.add(O19);
		result.add(O20);
		result.add(R01);
		result.add(MFN);
		result.add(M02);
		result.add(M05);
		result.add(M04);
		result.add(PPG);
		result.add(PCG);
		result.add(MDM);
		result.add(T02);
		result.add(SIU);
		result.add(S12);
		result.add(S15);
		result.add(S26);
		result.add(S13);
		result.add(S14);
		result.add(DFT);
		result.add(P03);
		result.add(BAR);
		result.add(P01);
		result.add(P02);
		result.add(P05);
		result.add(REF);
		result.add(I12);
		result.add(I13);
		result.add(I14);
		return result;
	}
	public static MessageType[] getNegativeInstances()
	{
		MessageType[] instances = new MessageType[58];
		instances[0] = ADT;
		instances[1] = A01;
		instances[2] = A02;
		instances[3] = A03;
		instances[4] = A04;
		instances[5] = A05;
		instances[6] = A08;
		instances[7] = A10;
		instances[8] = A11;
		instances[9] = A13;
		instances[10] = A21;
		instances[11] = A22;
		instances[12] = A28;
		instances[13] = A29;
		instances[14] = A31;
		instances[15] = A34;
		instances[16] = A38;
		instances[17] = A40;
		instances[18] = A47;
		instances[19] = A52;
		instances[20] = A53;
		instances[21] = A15;
		instances[22] = A26;
		instances[23] = A12;
		instances[24] = A60;
		instances[25] = A16;
		instances[26] = A25;
		instances[27] = OCS;
		instances[28] = O01;
		instances[29] = O02;
		instances[30] = O13;
		instances[31] = O19;
		instances[32] = O20;
		instances[33] = R01;
		instances[34] = MFN;
		instances[35] = M02;
		instances[36] = M05;
		instances[37] = M04;
		instances[38] = PPG;
		instances[39] = PCG;
		instances[40] = MDM;
		instances[41] = T02;
		instances[42] = SIU;
		instances[43] = S12;
		instances[44] = S15;
		instances[45] = S26;
		instances[46] = S13;
		instances[47] = S14;
		instances[48] = DFT;
		instances[49] = P03;
		instances[50] = BAR;
		instances[51] = P01;
		instances[52] = P02;
		instances[53] = P05;
		instances[54] = REF;
		instances[55] = I12;
		instances[56] = I13;
		instances[57] = I14;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[58];
		negativeInstances[0] = "ADT";
		negativeInstances[1] = "A01";
		negativeInstances[2] = "A02";
		negativeInstances[3] = "A03";
		negativeInstances[4] = "A04";
		negativeInstances[5] = "A05";
		negativeInstances[6] = "A08";
		negativeInstances[7] = "A10";
		negativeInstances[8] = "A11";
		negativeInstances[9] = "A13";
		negativeInstances[10] = "A21";
		negativeInstances[11] = "A22";
		negativeInstances[12] = "A28";
		negativeInstances[13] = "A29";
		negativeInstances[14] = "A31";
		negativeInstances[15] = "A34";
		negativeInstances[16] = "A38";
		negativeInstances[17] = "A40";
		negativeInstances[18] = "A47";
		negativeInstances[19] = "A52";
		negativeInstances[20] = "A53";
		negativeInstances[21] = "A15";
		negativeInstances[22] = "A26";
		negativeInstances[23] = "A12";
		negativeInstances[24] = "A60";
		negativeInstances[25] = "A16";
		negativeInstances[26] = "A25";
		negativeInstances[27] = "OCS";
		negativeInstances[28] = "O01";
		negativeInstances[29] = "O02";
		negativeInstances[30] = "O13";
		negativeInstances[31] = "O19";
		negativeInstances[32] = "O20";
		negativeInstances[33] = "R01";
		negativeInstances[34] = "MFN";
		negativeInstances[35] = "M02";
		negativeInstances[36] = "M05";
		negativeInstances[37] = "M04";
		negativeInstances[38] = "PPG";
		negativeInstances[39] = "PCG";
		negativeInstances[40] = "MDM";
		negativeInstances[41] = "T02";
		negativeInstances[42] = "SIU";
		negativeInstances[43] = "S12";
		negativeInstances[44] = "S15";
		negativeInstances[45] = "S26";
		negativeInstances[46] = "S13";
		negativeInstances[47] = "S14";
		negativeInstances[48] = "DFT";
		negativeInstances[49] = "P03";
		negativeInstances[50] = "BAR";
		negativeInstances[51] = "P01";
		negativeInstances[52] = "P02";
		negativeInstances[53] = "P05";
		negativeInstances[54] = "REF";
		negativeInstances[55] = "I12";
		negativeInstances[56] = "I13";
		negativeInstances[57] = "I14";
		return negativeInstances;
	}
	public static MessageType 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 MessageType getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		MessageType[] 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 = 1411000;
	public static final MessageType ADT = new MessageType(-1926, "ADT", true, null, null, Color.Default);
	public static final MessageType A01 = new MessageType(-1927, "A01", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A02 = new MessageType(-1928, "A02", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A03 = new MessageType(-1929, "A03", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A04 = new MessageType(-1930, "A04", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A05 = new MessageType(-1931, "A05", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A08 = new MessageType(-1932, "A08", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A10 = new MessageType(-1933, "A10", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A11 = new MessageType(-1934, "A11", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A13 = new MessageType(-1935, "A13", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A21 = new MessageType(-1936, "A21", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A22 = new MessageType(-1937, "A22", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A28 = new MessageType(-1938, "A28", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A29 = new MessageType(-1939, "A29", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A31 = new MessageType(-1940, "A31", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A34 = new MessageType(-1941, "A34", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A38 = new MessageType(-1942, "A38", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A40 = new MessageType(-1943, "A40", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A47 = new MessageType(-1944, "A47", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A52 = new MessageType(-1945, "A52", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A53 = new MessageType(-1946, "A53", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A15 = new MessageType(-3013, "A15", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A26 = new MessageType(-3014, "A26", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A12 = new MessageType(-2910, "A12", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A60 = new MessageType(-3025, "A60", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A16 = new MessageType(-3124, "A16", true, MessageType.ADT, null, Color.Default);
	public static final MessageType A25 = new MessageType(-3125, "A25", true, MessageType.ADT, null, Color.Default);
	public static final MessageType OCS = new MessageType(-1947, "OCS", true, null, null, Color.Default);
	public static final MessageType O01 = new MessageType(-1948, "O01", true, MessageType.OCS, null, Color.Default);
	public static final MessageType O02 = new MessageType(-1949, "O02", true, MessageType.OCS, null, Color.Default);
	public static final MessageType O13 = new MessageType(-1950, "O13", true, MessageType.OCS, null, Color.Default);
	public static final MessageType O19 = new MessageType(-1951, "O19", true, MessageType.OCS, null, Color.Default);
	public static final MessageType O20 = new MessageType(-1952, "O20", true, MessageType.OCS, null, Color.Default);
	public static final MessageType R01 = new MessageType(-1953, "R01", true, MessageType.OCS, null, Color.Default);
	public static final MessageType MFN = new MessageType(-1954, "MFN", true, null, null, Color.Default);
	public static final MessageType M02 = new MessageType(-1955, "M02", true, MessageType.MFN, null, Color.Default);
	public static final MessageType M05 = new MessageType(-1956, "M05", true, MessageType.MFN, null, Color.Default);
	public static final MessageType M04 = new MessageType(-3416, "M04", true, MessageType.MFN, null, Color.Default);
	public static final MessageType PPG = new MessageType(-1957, "PPG", true, null, null, Color.Default);
	public static final MessageType PCG = new MessageType(-1958, "PCG", true, MessageType.PPG, null, Color.Default);
	public static final MessageType MDM = new MessageType(-2178, "MDM", true, null, null, Color.Default);
	public static final MessageType T02 = new MessageType(-2179, "T02", true, MessageType.MDM, null, Color.Default);
	public static final MessageType SIU = new MessageType(-2710, "SIU", true, null, null, Color.Default);
	public static final MessageType S12 = new MessageType(-2711, "S12", true, MessageType.SIU, null, Color.Default);
	public static final MessageType S15 = new MessageType(-2712, "S15", true, MessageType.SIU, null, Color.Default);
	public static final MessageType S26 = new MessageType(-2713, "S26", true, MessageType.SIU, null, Color.Default);
	public static final MessageType S13 = new MessageType(-2836, "S13", true, MessageType.SIU, null, Color.Default);
	public static final MessageType S14 = new MessageType(-2846, "S14", true, MessageType.SIU, null, Color.Default);
	public static final MessageType DFT = new MessageType(-3403, "DFT", true, null, null, Color.Default);
	public static final MessageType P03 = new MessageType(-3404, "P03", true, MessageType.DFT, null, Color.Default);
	public static final MessageType BAR = new MessageType(-3407, "BAR", true, null, null, Color.Default);
	public static final MessageType P01 = new MessageType(-3408, "P01", true, MessageType.BAR, null, Color.Default);
	public static final MessageType P02 = new MessageType(-3409, "P02", true, MessageType.BAR, null, Color.Default);
	public static final MessageType P05 = new MessageType(-3410, "P05", true, MessageType.BAR, null, Color.Default);
	public static final MessageType REF = new MessageType(-3030, "REF", true, null, null, Color.Default);
	public static final MessageType I12 = new MessageType(-3031, "I12", true, MessageType.REF, null, Color.Default);
	public static final MessageType I13 = new MessageType(-3032, "I13", true, MessageType.REF, null, Color.Default);
	public static final MessageType I14 = new MessageType(-3033, "I14", true, MessageType.REF, null, Color.Default);
}
