

package gov.va.med.cds.hapi.extension.type;


import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.Location;
import ca.uhn.hl7v2.model.AbstractType;
import ca.uhn.hl7v2.model.Composite;
import ca.uhn.hl7v2.model.DataTypeException;
import ca.uhn.hl7v2.model.Message;
import ca.uhn.hl7v2.model.MessageVisitor;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.v24.datatype.ST;


public class Custom_SPR_ST
    extends
        AbstractType
    implements
        Composite
{
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
    private Type data[];


    public Custom_SPR_ST( Message message )
    {
        super( message );

        data = new Type[13];

        data[0] = new ST( message );
        data[1] = new ST( message );
        data[2] = new ST( message );
        data[3] = new ST( message );
        data[4] = new ST( message );
        data[5] = new ST( message );
        data[6] = new ST( message );
        data[7] = new ST( message );
        data[8] = new ST( message );
        data[9] = new ST( message );
        data[10] = new ST( message );
        data[11] = new ST( message );
        data[12] = new ST( message );
    }


    public Type getComponent( int i )
        throws DataTypeException
    {
        try
        {
            return data[i];
        }
        catch ( ArrayIndexOutOfBoundsException arrayindexoutofboundsexception )
        {
            throw new DataTypeException( "Element " + i + " doesn't exist in 13 element Custom_SPR_ST composite" );
        }
    }


    public Type[] getComponents( )
    {
        return data;
    }


	@Override
	public boolean accept(MessageVisitor visitor, Location currentLocation) throws HL7Exception {
		// TODO Auto-generated method stub
		return false;
	}
}
