org.oma.protocols.mlp.svc_result.Slia Maven / Gradle / Ivy
package org.oma.protocols.mlp.svc_result;
import java.util.ArrayList;
import java.util.List;
/**
* Schema fragment(s) for this class:
*
* <xs:element xmlns:ns="MLP_SVC_RESULT_310.dtd" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="slia">
* <xs:complexType>
* <xs:sequence>
* <xs:choice>
* <xs:element ref="ns:pos" maxOccurs="unbounded"/>
* <xs:element ref="ns:req_id"/>
* <xs:sequence>
* <xs:element ref="ns:result"/>
* <xs:element ref="ns:add_info" minOccurs="0"/>
* </xs:sequence>
* </xs:choice>
* </xs:sequence>
* <xs:attribute type="xs:string" fixed="3.0.0" name="ver"/>
* </xs:complexType>
* </xs:element>
*
*/
public class Slia
{
private int choiceSelect = -1;
private static final int PO_LIST_CHOICE = 0;
private static final int REQ_ID_CHOICE = 1;
private static final int RESULT_CHOICE = 2;
private List poList = new ArrayList();
private ReqId reqId;
private Result result;
private AddInfo addInfo;
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 PoList is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifPoList() {
return choiceSelect == PO_LIST_CHOICE;
}
/**
* Get the list of 'pos' element items.
*
* @return list
*/
public List getPoList() {
return poList;
}
/**
* Set the list of 'pos' element items.
*
* @param list
*/
public void setPoList(List list) {
setChoiceSelect(PO_LIST_CHOICE);
poList = list;
}
/**
* Check if ReqId is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifReqId() {
return choiceSelect == REQ_ID_CHOICE;
}
/**
* Get the 'req_id' element value.
*
* @return value
*/
public ReqId getReqId() {
return reqId;
}
/**
* Set the 'req_id' element value.
*
* @param reqId
*/
public void setReqId(ReqId reqId) {
setChoiceSelect(REQ_ID_CHOICE);
this.reqId = reqId;
}
/**
* Check if Result is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifResult() {
return choiceSelect == RESULT_CHOICE;
}
/**
* Get the 'result' element value.
*
* @return value
*/
public Result getResult() {
return result;
}
/**
* Set the 'result' element value.
*
* @param result
*/
public void setResult(Result result) {
setChoiceSelect(RESULT_CHOICE);
this.result = result;
}
/**
* Get the 'add_info' element value.
*
* @return value
*/
public AddInfo getAddInfo() {
return addInfo;
}
/**
* Set the 'add_info' element value.
*
* @param addInfo
*/
public void setAddInfo(AddInfo addInfo) {
setChoiceSelect(RESULT_CHOICE);
this.addInfo = addInfo;
}
/**
* 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 - 2025 Weber Informatics LLC | Privacy Policy