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

de.micromata.opengis.kml.v_2_2_0.GroundOverlay Maven / Gradle / Ivy

Go to download

This is JavaAPIforKMml, Micromata's library for use with applications that want to parse, generate and operate on KML. It is an implementation of the OGC KML 2.2 standard. It is written entirely in Java and makes heavy use of JAXB.

There is a newer version: 3.0.4
Show newest version

package de.micromata.opengis.kml.v_2_2_0;

import de.micromata.opengis.kml.v_2_2_0.annotations.Obvious;
import de.micromata.opengis.kml.v_2_2_0.atom.Author;
import de.micromata.opengis.kml.v_2_2_0.atom.Link;
import de.micromata.opengis.kml.v_2_2_0.gx.LatLonQuad;
import de.micromata.opengis.kml.v_2_2_0.xal.AddressDetails;
import jakarta.xml.bind.annotation.*;

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


/**
 * GroundOverlay
 * 

* This element draws an image overlay draped onto the terrain. The {@code }child of * {@code }specifies the image to be used as the overlay. This file can be either on * a local file system or on a web server. If this element is omitted or contains no * {@code }, a rectangle is drawn using the color and LatLonBox bounds defined by the * ground overlay. *

* * Syntax: *
<GroundOverlay id="ID">
 *   <!-- inherited from Feature element -->
 *   <name>...</name>                      <!-- string -->
 *   <visibility>1</visibility>            <!-- boolean -->
 *   <open>0</open>                        <!-- boolean -->
 *   <atom:author>...<atom:author>         <!-- xmlns:atom -->
 *   <atom:link>...</atom:link>            <!-- xmlns:atom -->
 *   <address>...</address>                <!-- string -->
 *   <xal:AddressDetails>...</xal:AddressDetails>  <!-- xmlns:xal -->
<phoneNumber>...</phoneNumber> <!-- string -->
<Snippet maxLines="2">...</Snippet> <!-- string --> * <description>...</description> <!-- string --> * <AbstractView>...</AbstractView> <!-- Camera or LookAt --> * <TimePrimitive>...</TimePrimitive> * <styleUrl>...</styleUrl> <!-- anyURI --> * <StyleSelector>...</StyleSelector> * <Region>...</Region> * <Metadata>...</Metadata> <!-- deprecated in KML 2.2 --> * <ExtendedData>...</ExtendedData> <!-- new in KML 2.2 --> * * <!-- inherited from Overlay element --> * <color>ffffffff</color> <!-- kml:color --> * <drawOrder>0</drawOrder> <!-- int --> * <Icon>...</Icon> * * <!-- specific to GroundOverlay --> * <altitude>0</altitude> <!-- double --> * <altitudeMode>clampToGround</altitudeMode> * <!-- kml:altitudeModeEnum: clampToGround or absolute --> * <!-- or, substitute gx:altitudeMode: clampToSeaFloor or relativeToSeaFloor --> * <LatLonBox> * <north>...</north> <! kml:angle90 --> * <south>...</south> <! kml:angle90 --> * <east>...</east> <! kml:angle180 --> * <west>...</west> <! kml:angle180 --> * <rotation>0</rotation> <! kml:angle180 --> * </LatLonBox> * </GroundOverlay>
* * Extends: * * * * Contained By: * * * * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "GroundOverlayType", propOrder = { "altitude", "altitudeMode", "latLonBox", "groundOverlaySimpleExtension", "groundOverlayObjectExtension" }) @XmlRootElement(name = "GroundOverlay", namespace = "http://www.opengis.net/kml/2.2") public class GroundOverlay extends Overlay implements Cloneable { /** * altitude *

* Distance from the earth's surface, in meters. Interpreted according to the LookAt's * altitude mode. *

*

* Distance of the camera from the earth's surface, in meters. Interpreted according * to the Camera's altitudeMode or gx:altitudeMode. *

*

* Specifies the distance above the earth's surface, in meters, and is interpreted * according to the altitude mode. *

* * * */ @XmlElement(defaultValue = "0.0") protected double altitude; /** * AltitudeMode *

* clampToGround, relativeToGround, absolute *

* * See Also: * See LookAt and {@code } * * * */ @XmlElement(defaultValue = "clampToGround") protected AltitudeMode altitudeMode; /** * latlongbox *

* Specifies where the top, bottom, right, and left sides of a bounding box for the * ground overlay are aligned. north Specifies the latitude of the north edge of * the bounding box, in decimal degrees from 0 to ±90. south Specifies the latitude * of the south edge of the bounding box, in decimal degrees from 0 to ±90. east * Specifies the longitude of the east edge of the bounding box, in decimal degrees * from 0 to ±180. (For overlays that overlap the meridian of 180° longitude, values * can extend beyond that range.) west Specifies the longitude of the west edge of * the bounding box, in decimal degrees from 0 to ±180. (For overlays that overlap * the meridian of 180° longitude, values can extend beyond that range.) rotation * Specifies a rotation of the overlay about its center, in degrees. Values can be * ±180. The default is 0 (north). Rotations are specified in a counterclockwise direction. * latlongbox north 48.25475939255556 south 48.25207367852141 east -90.86591508839973 * west -90.8714285289695 rotation 39.37878630116985 *

* * * */ @XmlElement(name = "LatLonBox") protected LatLonBox latLonBox; @XmlElement(name = "GroundOverlaySimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List groundOverlaySimpleExtension; /** * {@code } *

* This is an abstract base class and cannot be used directly in a KML file. It provides * the id attribute, which allows unique identification of a KML element, and the targetId * attribute, which is used to reference objects that have already been loaded into * Google Earth. The id attribute must be assigned if the Update mechanism is to * be used. *

* * Syntax: *
<!-- abstract element; do not create -->
     * <!-- Object id="ID" targetId="NCName" -->
     * <!-- /Object> -->
* * * */ @XmlElementRef(name = "GroundOverlayObjectExtensionGroup", namespace = "http://www.opengis.net/kml/2.2", required = false) protected List groundOverlayObjectExtension; public GroundOverlay() { super(); } /** * * * @return * possible object is * {@link Double} * */ public double getAltitude() { return altitude; } /** * * * @param value * allowed object is * {@link Double} * */ public void setAltitude(double value) { this.altitude = value; } /** * * * @return * possible object is * {@code <}{@link Object}{@code >} * {@code <}{@link de.micromata.opengis.kml.v_2_2_0.AltitudeMode}{@code >} * * */ public AltitudeMode getAltitudeMode() { return altitudeMode; } /** * * * @param value * allowed object is * {@code <}{@link Object}{@code >} * {@code <}{@link de.micromata.opengis.kml.v_2_2_0.AltitudeMode}{@code >} * * */ public void setAltitudeMode(AltitudeMode value) { this.altitudeMode = value; } /** * * * @return * possible object is * {@link LatLonBox} * */ public LatLonBox getLatLonBox() { return latLonBox; } /** * * * @param value * allowed object is * {@link LatLonBox} * */ public void setLatLonBox(LatLonBox value) { this.latLonBox = value; } /** * * */ public List getGroundOverlaySimpleExtension() { if (groundOverlaySimpleExtension == null) { groundOverlaySimpleExtension = new ArrayList(); } return this.groundOverlaySimpleExtension; } /** * * */ public List getGroundOverlayObjectExtension() { if (groundOverlayObjectExtension == null) { groundOverlayObjectExtension = new ArrayList(); } return this.groundOverlayObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp; temp = Double.doubleToLongBits(altitude); result = ((prime*result)+((int)(temp^(temp >>>(32))))); result = ((prime*result)+((altitudeMode == null)? 0 :altitudeMode.hashCode())); result = ((prime*result)+((latLonBox == null)? 0 :latLonBox.hashCode())); result = ((prime*result)+((groundOverlaySimpleExtension == null)? 0 :groundOverlaySimpleExtension.hashCode())); result = ((prime*result)+((groundOverlayObjectExtension == null)? 0 :groundOverlayObjectExtension.hashCode())); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (super.equals(obj) == false) { return false; } if ((obj instanceof GroundOverlay) == false) { return false; } GroundOverlay other = ((GroundOverlay) obj); if (altitude!= other.altitude) { return false; } if (altitudeMode == null) { if (other.altitudeMode!= null) { return false; } } else { if (altitudeMode.equals(other.altitudeMode) == false) { return false; } } if (latLonBox == null) { if (other.latLonBox!= null) { return false; } } else { if (latLonBox.equals(other.latLonBox) == false) { return false; } } if (groundOverlaySimpleExtension == null) { if (other.groundOverlaySimpleExtension!= null) { return false; } } else { if (groundOverlaySimpleExtension.equals(other.groundOverlaySimpleExtension) == false) { return false; } } if (groundOverlayObjectExtension == null) { if (other.groundOverlayObjectExtension!= null) { return false; } } else { if (groundOverlayObjectExtension.equals(other.groundOverlayObjectExtension) == false) { return false; } } return true; } /** * Creates a new instance of {@link LatLonBox} and set it to latLonBox. * * This method is a short version for: * {@code * LatLonBox latLonBox = new LatLonBox(); * this.setLatLonBox(latLonBox); } * * */ public LatLonBox createAndSetLatLonBox() { LatLonBox newValue = new LatLonBox(); this.setLatLonBox(newValue); return newValue; } /** * * * @param groundOverlaySimpleExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setGroundOverlaySimpleExtension(final List groundOverlaySimpleExtension) { this.groundOverlaySimpleExtension = groundOverlaySimpleExtension; } /** * add a value to the groundOverlaySimpleExtension property collection * * @param groundOverlaySimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public GroundOverlay addToGroundOverlaySimpleExtension(final Object groundOverlaySimpleExtension) { this.getGroundOverlaySimpleExtension().add(groundOverlaySimpleExtension); return this; } /** * * * @param groundOverlayObjectExtension * Objects of the following type are allowed in the list: {@code <}{@link LatLonQuad}{@code >}{@code <}{@link AbstractObject}{@code >} */ public void setGroundOverlayObjectExtension(final List groundOverlayObjectExtension) { this.groundOverlayObjectExtension = groundOverlayObjectExtension; } /** * add a value to the groundOverlayObjectExtension property collection * * @param groundOverlayObjectExtension * Objects of the following type are allowed in the list: {@code <}{@link LatLonQuad}{@code >}{@code <}{@link AbstractObject}{@code >} * @return * true (as general contract of Collection.add). */ public GroundOverlay addToGroundOverlayObjectExtension(final AbstractObject groundOverlayObjectExtension) { this.getGroundOverlayObjectExtension().add(groundOverlayObjectExtension); return this; } /** * * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public GroundOverlay addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * * */ @Obvious @Override public void setStyleSelector(final List styleSelector) { super.setStyleSelector(styleSelector); } @Obvious @Override public GroundOverlay addToStyleSelector(final StyleSelector styleSelector) { super.getStyleSelector().add(styleSelector); return this; } /** * * */ @Obvious @Override public void setFeatureSimpleExtension(final List featureSimpleExtension) { super.setFeatureSimpleExtension(featureSimpleExtension); } @Obvious @Override public GroundOverlay addToFeatureSimpleExtension(final Object featureSimpleExtension) { super.getFeatureSimpleExtension().add(featureSimpleExtension); return this; } /** * * */ @Obvious @Override public void setFeatureObjectExtension(final List featureObjectExtension) { super.setFeatureObjectExtension(featureObjectExtension); } @Obvious @Override public GroundOverlay addToFeatureObjectExtension(final AbstractObject featureObjectExtension) { super.getFeatureObjectExtension().add(featureObjectExtension); return this; } /** * * */ @Obvious @Override public void setOverlaySimpleExtension(final List overlaySimpleExtension) { super.setOverlaySimpleExtension(overlaySimpleExtension); } @Obvious @Override public GroundOverlay addToOverlaySimpleExtension(final Object overlaySimpleExtension) { super.getOverlaySimpleExtension().add(overlaySimpleExtension); return this; } /** * * */ @Obvious @Override public void setOverlayObjectExtension(final List overlayObjectExtension) { super.setOverlayObjectExtension(overlayObjectExtension); } @Obvious @Override public GroundOverlay addToOverlayObjectExtension(final AbstractObject overlayObjectExtension) { super.getOverlayObjectExtension().add(overlayObjectExtension); return this; } /** * fluent setter * * * @param altitude * required parameter */ public GroundOverlay withAltitude(final double altitude) { this.setAltitude(altitude); return this; } /** * fluent setter * * * @param altitudeMode * required parameter */ public GroundOverlay withAltitudeMode(final AltitudeMode altitudeMode) { this.setAltitudeMode(altitudeMode); return this; } /** * fluent setter * * * @param latLonBox * required parameter */ public GroundOverlay withLatLonBox(final LatLonBox latLonBox) { this.setLatLonBox(latLonBox); return this; } /** * fluent setter * * * @param groundOverlaySimpleExtension * required parameter */ public GroundOverlay withGroundOverlaySimpleExtension(final List groundOverlaySimpleExtension) { this.setGroundOverlaySimpleExtension(groundOverlaySimpleExtension); return this; } /** * fluent setter * * * @param groundOverlayObjectExtension * required parameter */ public GroundOverlay withGroundOverlayObjectExtension(final List groundOverlayObjectExtension) { this.setGroundOverlayObjectExtension(groundOverlayObjectExtension); return this; } @Obvious @Override public GroundOverlay withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public GroundOverlay withId(final String id) { super.withId(id); return this; } @Obvious @Override public GroundOverlay withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Obvious @Override public GroundOverlay withName(final String name) { super.withName(name); return this; } @Obvious @Override public GroundOverlay withVisibility(final Boolean visibility) { super.withVisibility(visibility); return this; } @Obvious @Override public GroundOverlay withOpen(final Boolean open) { super.withOpen(open); return this; } @Obvious @Override public GroundOverlay withAtomAuthor(final Author atomAuthor) { super.withAtomAuthor(atomAuthor); return this; } @Obvious @Override public GroundOverlay withAtomLink(final Link atomLink) { super.withAtomLink(atomLink); return this; } @Obvious @Override public GroundOverlay withAddress(final String address) { super.withAddress(address); return this; } @Obvious @Override public GroundOverlay withXalAddressDetails(final AddressDetails xalAddressDetails) { super.withXalAddressDetails(xalAddressDetails); return this; } @Obvious @Override public GroundOverlay withPhoneNumber(final String phoneNumber) { super.withPhoneNumber(phoneNumber); return this; } @Obvious @Override public GroundOverlay withSnippet(final Snippet snippet) { super.withSnippet(snippet); return this; } @Obvious @Override public GroundOverlay withSnippetd(final String snippetd) { super.withSnippetd(snippetd); return this; } @Obvious @Override public GroundOverlay withDescription(final String description) { super.withDescription(description); return this; } @Obvious @Override public GroundOverlay withAbstractView(final AbstractView abstractView) { super.withAbstractView(abstractView); return this; } @Obvious @Override public GroundOverlay withTimePrimitive(final TimePrimitive timePrimitive) { super.withTimePrimitive(timePrimitive); return this; } @Obvious @Override public GroundOverlay withStyleUrl(final String styleUrl) { super.withStyleUrl(styleUrl); return this; } @Obvious @Override public GroundOverlay withStyleSelector(final List styleSelector) { super.withStyleSelector(styleSelector); return this; } @Obvious @Override public GroundOverlay withRegion(final Region region) { super.withRegion(region); return this; } @Obvious @Override public GroundOverlay withMetadata(final Metadata metadata) { super.withMetadata(metadata); return this; } @Obvious @Override public GroundOverlay withExtendedData(final ExtendedData extendedData) { super.withExtendedData(extendedData); return this; } @Obvious @Override public GroundOverlay withFeatureSimpleExtension(final List featureSimpleExtension) { super.withFeatureSimpleExtension(featureSimpleExtension); return this; } @Obvious @Override public GroundOverlay withFeatureObjectExtension(final List featureObjectExtension) { super.withFeatureObjectExtension(featureObjectExtension); return this; } @Obvious @Override public GroundOverlay withColor(final String color) { super.withColor(color); return this; } @Obvious @Override public GroundOverlay withDrawOrder(final int drawOrder) { super.withDrawOrder(drawOrder); return this; } @Obvious @Override public GroundOverlay withIcon(final Icon icon) { super.withIcon(icon); return this; } @Obvious @Override public GroundOverlay withOverlaySimpleExtension(final List overlaySimpleExtension) { super.withOverlaySimpleExtension(overlaySimpleExtension); return this; } @Obvious @Override public GroundOverlay withOverlayObjectExtension(final List overlayObjectExtension) { super.withOverlayObjectExtension(overlayObjectExtension); return this; } @Override public GroundOverlay clone() { GroundOverlay copy; copy = ((GroundOverlay) super.clone()); copy.latLonBox = ((latLonBox == null)?null:((LatLonBox) latLonBox.clone())); copy.groundOverlaySimpleExtension = new ArrayList((getGroundOverlaySimpleExtension().size())); for (Object iter: groundOverlaySimpleExtension) { copy.groundOverlaySimpleExtension.add(iter); } copy.groundOverlayObjectExtension = new ArrayList((getGroundOverlayObjectExtension().size())); for (AbstractObject iter: groundOverlayObjectExtension) { copy.groundOverlayObjectExtension.add(iter.clone()); } return copy; } }