/*******************************************************************************
 *  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.commoninterface;

import java.io.Serializable;

/**
 * This interface needs to be implemented by all classes which implements the necessary functionality for the Dictionary Data Provider.
 */
public interface IDictionaryDataProvider extends Serializable
{
	/**
	 * Creates a new entry for data Dictionary.
	 * @param iGroupNumber integer value of group number.
	 * @param iElementNumber integer value of element number
	 * @param strElementName String value of element name.
	 * @param strVR String value of VR type.
	 * @param iMinVM integer value of minimum value multiplicity.
	 * @param iMaxVM integer value of maximum value multiplicity.
	 * @param isRetired boolean value shows status of element.
	 */
	void makeEntry(int iGroupNumber, int iElementNumber, String strElementName, String strVR, int iMinVM, int iMaxVM, boolean isRetired);

	/**
	 * Retrieves the VR type of element.
	 * @param iGroupNumber integer value of group number.
	 * @param iElementNumber integer value of element number.
	 * @return String - String value of VR type. 
	 */
	String getVR(int iGroupNumber, int iElementNumber);

	/**
	 * Retrieves minimum value multiplicity of the element.
	 * @param iGroupNumber Integer value of group number.
	 * @param iElementNumber Integer value of element number.
	 * @return int - integer value of minimum value multiplicity.
	 */
	int getMinVM(int iGroupNumber, int iElementNumber);

	/**
	 * Retrieves maximum value multiplicity of the element.
	 * @param iGroupNumber Integer value of group number.
	 * @param iElementNumber Integer value of element number.
	 * @return int - integer value of minimum value multiplicity.
	 */
	int getMaxVM(int iGroupNumber, int iElementNumber);

	/**
	 * Retrieves the name of the element.
	 * @param iGroupNumber Integer value of group number.
	 * @param iElementNumber Integer value of element number.
	 * @return String - name of the element.
	 */
	String getName(int iGroupNumber, int iElementNumber);

	/**
	 * Checks the current status of element whether it's retired or not.
	 * @param iGroupNumber Integer value of group number.
	 * @param iElementNumber Integer value of element number.
	 * @return boolean - shows status of element.
	 */
	boolean isRetired(int iGroupNumber, int iElementNumber);

	/**
	 * Checks that given group number is present or not.
	 * @param iGroupNumber Integer value of element number.
	 * @return boolean - shows presence of element number.
	 */
	boolean isGroupNumberPresent(int iGroupNumber);

	/**
	 * Checks that given element number is present or not.
	 * @param iElementNumber Integer value of element number.
	 * @return boolean - shows presence of element number.
	 */
	boolean isElementNumberPresent(int iElementNumber);

	/**
	 * Checks that given VR type is present or not.
	 * VR Type represents the Value Representation for the specified Tag.
	 * @param strVR string value of VR type.
	 * @return boolean - shows presence of VR type.
	 */
	boolean isVRPresent(String strVR);

	/**
	 * Checks that given group number and element number constructs a valid tag.
	 * @param iGroupNumber Integer value of group number.
	 * @param iElementNumber Integer value of element number.
	 * @return boolean - shows validity of tag.
	 */
	boolean isStandardTag(int iGroupNumber, int iElementNumber);

	/**
	 * Checks that data dictionary is populated or not.
	 * @return boolean - shows status of dictionary.
	 */
	boolean isPopulated();

	/**
	 * Retrieves the  Group Number and Element Number of Attribute Name provided.
	 * This function return a short array in which element at index 0 is Group Number
	 * and at index 1 is Element Number. 
	 * @param strDataElementName String value of Data Element name.
	 * @return short[] - return short array. The element at index 0 represents Group Number and 
	 * at index 1 represents Element Number. 
	 */
	short[] getTag(String strDataElementName);
}
