All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.oma.protocols.mlp.svc_init.Hdr Maven / Gradle / Ivy


package org.oma.protocols.mlp.svc_init;

import java.util.ArrayList;
import java.util.List;

/** 
 * Schema fragment(s) for this class:
 * 
 * <xs:element xmlns:ns="MLP_SVC_INIT_310.dtd" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="hdr">
 *   <xs:complexType>
 *     <xs:sequence>
 *       <xs:choice>
 *         <xs:element ref="ns:client"/>
 *         <xs:element ref="ns:sessionid"/>
 *         <xs:sequence>
 *           <xs:element ref="ns:client"/>
 *           <xs:element ref="ns:sessionid"/>
 *         </xs:sequence>
 *       </xs:choice>
 *       <xs:element ref="ns:subclient" minOccurs="0" maxOccurs="unbounded"/>
 *       <xs:element ref="ns:requestor" minOccurs="0"/>
 *     </xs:sequence>
 *     <xs:attribute type="xs:string" fixed="3.0.0" name="ver"/>
 *   </xs:complexType>
 * </xs:element>
 * 
*/ public class Hdr { private int choiceSelect = -1; private static final int CLIENT_CHOICE = 0; private static final int SESSIONID_CHOICE = 1; private static final int CLIENT1_CHOICE = 2; private Client client; private Sessionid sessionid; private Client client1; private Sessionid sessionid1; private List subclientList = new ArrayList(); private Requestor requestor; private String ver; private void setChoiceSelect(int choice) { if (choiceSelect == -1) { choiceSelect = choice; } else if (choiceSelect != choice) { throw new IllegalStateException( "Need to call clearChoiceSelect() before changing existing choice"); } } /** * Clear the choice selection. */ public void clearChoiceSelect() { choiceSelect = -1; } /** * Check if Client is current selection for choice. * * @return true if selection, false if not */ public boolean ifClient() { return choiceSelect == CLIENT_CHOICE; } /** * Get the 'client' element value. * * @return value */ public Client getClient() { return client; } /** * Set the 'client' element value. * * @param client */ public void setClient(Client client) { setChoiceSelect(CLIENT_CHOICE); this.client = client; } /** * Check if Sessionid is current selection for choice. * * @return true if selection, false if not */ public boolean ifSessionid() { return choiceSelect == SESSIONID_CHOICE; } /** * Get the 'sessionid' element value. * * @return value */ public Sessionid getSessionid() { return sessionid; } /** * Set the 'sessionid' element value. * * @param sessionid */ public void setSessionid(Sessionid sessionid) { setChoiceSelect(SESSIONID_CHOICE); this.sessionid = sessionid; } /** * Check if Client is current selection for choice. * * @return true if selection, false if not */ public boolean ifClient1() { return choiceSelect == CLIENT1_CHOICE; } /** * Get the 'client' element value. * * @return value */ public Client getClient1() { return client1; } /** * Set the 'client' element value. * * @param client1 */ public void setClient1(Client client1) { setChoiceSelect(CLIENT1_CHOICE); this.client1 = client1; } /** * Get the 'sessionid' element value. * * @return value */ public Sessionid getSessionid1() { return sessionid1; } /** * Set the 'sessionid' element value. * * @param sessionid1 */ public void setSessionid1(Sessionid sessionid1) { setChoiceSelect(CLIENT1_CHOICE); this.sessionid1 = sessionid1; } /** * Get the list of 'subclient' element items. * * @return list */ public List getSubclientList() { return subclientList; } /** * Set the list of 'subclient' element items. * * @param list */ public void setSubclientList(List list) { subclientList = list; } /** * Get the 'requestor' element value. * * @return value */ public Requestor getRequestor() { return requestor; } /** * Set the 'requestor' element value. * * @param requestor */ public void setRequestor(Requestor requestor) { this.requestor = requestor; } /** * Get the 'ver' attribute value. * * @return value */ public String getVer() { return ver; } /** * Set the 'ver' attribute value. * * @param ver */ public void setVer(String ver) { this.ver = ver; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy