org.oma.protocols.mlp.svc_init.MultiPolygon Maven / Gradle / Ivy
The newest version!
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="MultiPolygon">
* <xs:complexType>
* <xs:sequence>
* <xs:choice maxOccurs="unbounded">
* <!-- Reference to inner class Choice -->
* </xs:choice>
* </xs:sequence>
* <xs:attribute type="xs:string" name="gid"/>
* <xs:attribute type="xs:string" name="srsName"/>
* </xs:complexType>
* </xs:element>
*
*/
public class MultiPolygon
{
private List choiceList = new ArrayList();
private String gid;
private String srsName;
/**
* Get the list of choice items.
*
* @return list
*/
public List getChoiceList() {
return choiceList;
}
/**
* Set the list of choice items.
*
* @param list
*/
public void setChoiceList(List list) {
choiceList = list;
}
/**
* Get the 'gid' attribute value.
*
* @return value
*/
public String getGid() {
return gid;
}
/**
* Set the 'gid' attribute value.
*
* @param gid
*/
public void setGid(String gid) {
this.gid = gid;
}
/**
* Get the 'srsName' attribute value.
*
* @return value
*/
public String getSrsName() {
return srsName;
}
/**
* Set the 'srsName' attribute value.
*
* @param srsName
*/
public void setSrsName(String srsName) {
this.srsName = srsName;
}
/**
* Schema fragment(s) for this class:
*
* <xs:choice xmlns:ns="MLP_SVC_INIT_310.dtd" xmlns:xs="http://www.w3.org/2001/XMLSchema" maxOccurs="unbounded">
* <xs:element ref="ns:Polygon"/>
* <xs:element ref="ns:Box"/>
* <xs:element ref="ns:CircularArea"/>
* <xs:element ref="ns:CircularArcArea"/>
* <xs:element ref="ns:EllipticalArea"/>
* </xs:choice>
*
*/
public static class Choice
{
private int choiceListSelect = -1;
private static final int POLYGON_CHOICE = 0;
private static final int BOX_CHOICE = 1;
private static final int CIRCULAR_AREA_CHOICE = 2;
private static final int CIRCULAR_ARC_AREA_CHOICE = 3;
private static final int ELLIPTICAL_AREA_CHOICE = 4;
private Polygon polygon;
private Box box;
private CircularArea circularArea;
private CircularArcArea circularArcArea;
private EllipticalArea ellipticalArea;
private void setChoiceListSelect(int choice) {
if (choiceListSelect == -1) {
choiceListSelect = choice;
} else if (choiceListSelect != choice) {
throw new IllegalStateException(
"Need to call clearChoiceListSelect() before changing existing choice");
}
}
/**
* Clear the choice selection.
*/
public void clearChoiceListSelect() {
choiceListSelect = -1;
}
/**
* Check if Polygon is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifPolygon() {
return choiceListSelect == POLYGON_CHOICE;
}
/**
* Get the 'Polygon' element value.
*
* @return value
*/
public Polygon getPolygon() {
return polygon;
}
/**
* Set the 'Polygon' element value.
*
* @param polygon
*/
public void setPolygon(Polygon polygon) {
setChoiceListSelect(POLYGON_CHOICE);
this.polygon = polygon;
}
/**
* Check if Box is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifBox() {
return choiceListSelect == BOX_CHOICE;
}
/**
* Get the 'Box' element value.
*
* @return value
*/
public Box getBox() {
return box;
}
/**
* Set the 'Box' element value.
*
* @param box
*/
public void setBox(Box box) {
setChoiceListSelect(BOX_CHOICE);
this.box = box;
}
/**
* Check if CircularArea is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifCircularArea() {
return choiceListSelect == CIRCULAR_AREA_CHOICE;
}
/**
* Get the 'CircularArea' element value.
*
* @return value
*/
public CircularArea getCircularArea() {
return circularArea;
}
/**
* Set the 'CircularArea' element value.
*
* @param circularArea
*/
public void setCircularArea(CircularArea circularArea) {
setChoiceListSelect(CIRCULAR_AREA_CHOICE);
this.circularArea = circularArea;
}
/**
* Check if CircularArcArea is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifCircularArcArea() {
return choiceListSelect == CIRCULAR_ARC_AREA_CHOICE;
}
/**
* Get the 'CircularArcArea' element value.
*
* @return value
*/
public CircularArcArea getCircularArcArea() {
return circularArcArea;
}
/**
* Set the 'CircularArcArea' element value.
*
* @param circularArcArea
*/
public void setCircularArcArea(CircularArcArea circularArcArea) {
setChoiceListSelect(CIRCULAR_ARC_AREA_CHOICE);
this.circularArcArea = circularArcArea;
}
/**
* Check if EllipticalArea is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifEllipticalArea() {
return choiceListSelect == ELLIPTICAL_AREA_CHOICE;
}
/**
* Get the 'EllipticalArea' element value.
*
* @return value
*/
public EllipticalArea getEllipticalArea() {
return ellipticalArea;
}
/**
* Set the 'EllipticalArea' element value.
*
* @param ellipticalArea
*/
public void setEllipticalArea(EllipticalArea ellipticalArea) {
setChoiceListSelect(ELLIPTICAL_AREA_CHOICE);
this.ellipticalArea = ellipticalArea;
}
}
}