org.jibx.schema.org.hr_xml.ns._2_4.HR_XML_2_4.StandAlone.PositionOpening.SpatialLocationType Maven / Gradle / Ivy
package org.jibx.schema.org.hr_xml.ns._2_4.HR_XML_2_4.StandAlone.PositionOpening;
import java.math.BigDecimal;
/**
* Schema fragment(s) for this class:
*
* <xs:complexType xmlns:ns="http://ns.hr-xml.org/2006-02-28" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="SpatialLocationType">
* <xs:sequence>
* <xs:element type="xs:decimal" name="Latitude"/>
* <xs:element type="xs:decimal" name="Longitude"/>
* <xs:choice>
* <xs:element type="xs:decimal" name="Altitude" minOccurs="0"/>
* <xs:element type="xs:decimal" name="AltitudeMeanSeaLevel" minOccurs="0"/>
* </xs:choice>
* <xs:element type="xs:decimal" name="HorizontalAccuracy" minOccurs="0"/>
* <xs:element type="xs:decimal" name="VerticalAccuracy" minOccurs="0"/>
* </xs:sequence>
* </xs:complexType>
*
*/
public class SpatialLocationType
{
private BigDecimal latitude;
private BigDecimal longitude;
private int choiceSelect = -1;
private static final int ALTITUDE_CHOICE = 0;
private static final int ALTITUDE_MEAN_SEA_LEVEL_CHOICE = 1;
private BigDecimal altitude;
private BigDecimal altitudeMeanSeaLevel;
private BigDecimal horizontalAccuracy;
private BigDecimal verticalAccuracy;
/**
* Get the 'Latitude' element value.
*
* @return value
*/
public BigDecimal getLatitude() {
return latitude;
}
/**
* Set the 'Latitude' element value.
*
* @param latitude
*/
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
/**
* Get the 'Longitude' element value.
*
* @return value
*/
public BigDecimal getLongitude() {
return longitude;
}
/**
* Set the 'Longitude' element value.
*
* @param longitude
*/
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
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 Altitude is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifAltitude() {
return choiceSelect == ALTITUDE_CHOICE;
}
/**
* Get the 'Altitude' element value. [(+)|-]x.f meter from WGS-84 datum reference ellipsoid, + above, - below, decimal fraction f in arbitrary length (ex. +12 )
*
* @return value
*/
public BigDecimal getAltitude() {
return altitude;
}
/**
* Set the 'Altitude' element value. [(+)|-]x.f meter from WGS-84 datum reference ellipsoid, + above, - below, decimal fraction f in arbitrary length (ex. +12 )
*
* @param altitude
*/
public void setAltitude(BigDecimal altitude) {
setChoiceSelect(ALTITUDE_CHOICE);
this.altitude = altitude;
}
/**
* Check if AltitudeMeanSeaLevel is current selection for choice.
*
* @return true
if selection, false
if not
*/
public boolean ifAltitudeMeanSeaLevel() {
return choiceSelect == ALTITUDE_MEAN_SEA_LEVEL_CHOICE;
}
/**
* Get the 'AltitudeMeanSeaLevel' element value. [(+)|-]x.f meter from mean sea level, + above, - below, decimal fraction f in arbitrary length (ex. +10 )
*
* @return value
*/
public BigDecimal getAltitudeMeanSeaLevel() {
return altitudeMeanSeaLevel;
}
/**
* Set the 'AltitudeMeanSeaLevel' element value. [(+)|-]x.f meter from mean sea level, + above, - below, decimal fraction f in arbitrary length (ex. +10 )
*
* @param altitudeMeanSeaLevel
*/
public void setAltitudeMeanSeaLevel(BigDecimal altitudeMeanSeaLevel) {
setChoiceSelect(ALTITUDE_MEAN_SEA_LEVEL_CHOICE);
this.altitudeMeanSeaLevel = altitudeMeanSeaLevel;
}
/**
* Get the 'HorizontalAccuracy' element value. by circle of radius from the positioned point in (+)x.f meter, decimal fraction f in arbitrary length (ex. 50.0)
*
* @return value
*/
public BigDecimal getHorizontalAccuracy() {
return horizontalAccuracy;
}
/**
* Set the 'HorizontalAccuracy' element value. by circle of radius from the positioned point in (+)x.f meter, decimal fraction f in arbitrary length (ex. 50.0)
*
* @param horizontalAccuracy
*/
public void setHorizontalAccuracy(BigDecimal horizontalAccuracy) {
this.horizontalAccuracy = horizontalAccuracy;
}
/**
* Get the 'VerticalAccuracy' element value. in (+)x.f meter, decimal fraction f in arbitrary length (ex. 2.5)
*
* @return value
*/
public BigDecimal getVerticalAccuracy() {
return verticalAccuracy;
}
/**
* Set the 'VerticalAccuracy' element value. in (+)x.f meter, decimal fraction f in arbitrary length (ex. 2.5)
*
* @param verticalAccuracy
*/
public void setVerticalAccuracy(BigDecimal verticalAccuracy) {
this.verticalAccuracy = verticalAccuracy;
}
}