/*******************************************************************************
 *  Copyright 2017 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.hl7282.utils;


import cdac.medinfo.sdk.hl7282.commoninterface.ISegmentKey;

/**
 * This interface needs to be implemented by all classes which implements the necessary functionality for the SegmentItem.
 */
public interface ISegmentItem 
{
	/**
	 * Retrieves Name of segment
	 * @return ISegmentKey Specified enumeration showing segment name
	 */
	ISegmentKey getName();
	
	/**
	 * Sets Name of segment
	 * @param enumName enumeration showing segment name
	 */
	void setName(ISegmentKey enumName);
	
	/**
	 * Retrieves Segment Cardinality
	 * @return EnumSegmentCardinality - enumeration showing SegmentCardinality
	 */
	EnumSegmentCardinality getSegmentCardinality();
	
	/**
	 * Sets Segment Cardinality
	 * @param enumSegmentCardinality enumeration showing SegmentCardinality
	 */
	void setSegmentCardinality(EnumSegmentCardinality enumSegmentCardinality);
	
	/**
	 * Retrieves list of Group items
	 * @return IPairedCollection<Integer, SegmentItem> - collection of group items
	 */
	IMap getGroupItemMessageMap(); 
	
	/**
	 * Sets list of Group items
	 * @param objGroupItemMessageMap collection of group items.
	 */
	void setGroupItems(IMap objGroupItemMessageMap);
	
	/**
	 * Defines whether it is a segment or a group
	 * @return boolean shows status as success or failure
	 */
	boolean isGroup();
	
	/**
	 * Specifies item as group or segment
	 * @param isGroup shows status as success or failure
	 */
	void setIsGroup(boolean isGroup); 
}
