package cdac.medinfo.sdk.dcm30_04.baselibs;

import cdac.medinfo.sdk.dcm30_04.commoninterface.IDictionaryReader;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IItem;
import cdac.medinfo.sdk.dcm30_04.commoninterface.ITransferSyntax;

/**
 * This class contains a sequence containing General Machine Verification Sequence.
 */
public class GeneralMachineVerificationSequence extends SQ
{
	private static final long serialVersionUID = 1L;

	/**
	 * This constructor creates SQ with specified transferSyntax and specified DictionaryReader.
	 * @param objTransferSyntax specifies the DICOM Standard defined TransfeSyntax
	 * @param objDictionaryReader specifies the DICOM Dictionary reader to be used 
	 */
	GeneralMachineVerificationSequence(ITransferSyntax objTransferSyntax,IDictionaryReader objDictionaryReader)
	{
		super(objTransferSyntax, objDictionaryReader);
	}
	/*
	 * This is the overriding method isValidItem which checks whether the
	 * item being added is of GeneralMachineVerificationSequenceItem
	 */
	protected boolean isValidItem(IItem objIItem)
	{
		return objIItem instanceof GeneralMachineVerificationSequenceItem ? true : false;
	}

	/*
	 * (non-Javadoc) This overriding method creates the item of type GeneralMachineVerificationSequenceItem
	 * @see cdac.medinfo.sdk.dcm30_04.baselibs.dicomv3.SQ#createItem()
	 */
	protected IItem createItem()
	{
		return new GeneralMachineVerificationSequenceItem(objITransferSyntax,objIDictionaryReader);
	}

	/**
	 * Return Alternate Content Description Sequence Item.
	 * User has to add this item to sequence by calling additem of SQ.
	 * @return - instance of {@link GeneralMachineVerificationSequenceItem}
	 */
	public GeneralMachineVerificationSequenceItem getNewItem()
	{
		GeneralMachineVerificationSequenceItem objGeneralMachineVerificationSequenceItem = new GeneralMachineVerificationSequenceItem(objITransferSyntax,objIDictionaryReader);

		return objGeneralMachineVerificationSequenceItem;
	}
}
