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

de.micromata.opengis.kml.v_2_2_0.Icon 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 jakarta.xml.bind.annotation.*;

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


/**
 * {@code }see also {@code }.
 * 

* {@code Sunset.jpg } *

*

* A custom Icon. In {@code }, the only child element of {@code } is {@code : :} * An HTTP address or a local file specification used to load an icon. *

*

* Defines an image associated with an Icon style or overlay. {@code }has the same child * elements as {@code }. The required {@code }child element defines the location of the * image to be used as the overlay or as the icon for the placemark. This location * can either be on a local file system or a remote web server. *

*

* Defines the image associated with the Overlay. The {@code }element defines the location * of the image to be used as the Overlay. This location 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 size defined by the ground or screen overlay. {@code * icon.jpg } *

* * Syntax: *
<Icon id="ID">
 *   <!-- specific to Icon -->
 *   <href>...</href>                      <!-- anyURI -->
 *   <refreshMode>onChange</refreshMode>   
 *     <!-- kml:refreshModeEnum: onChange, onInterval, or onExpire -->   
 *   <refreshInterval>4</refreshInterval>  <!-- float -->
 *   <viewRefreshMode>never</viewRefreshMode> 
 *     <!-- kml:viewRefreshModeEnum: never, onStop, onRequest, onRegion -->
 *   <viewRefreshTime>4</viewRefreshTime>  <!-- float -->
 *   <viewBoundScale>1</viewBoundScale>    <!-- float -->
 *   <viewFormat>...</viewFormat>          <!-- string -->
 *   <httpQuery>...</httpQuery>            <!-- string -->
 *   </Icon>
* * Contained By: * * * * * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Icon", namespace = "", propOrder = { "refreshMode", "refreshInterval", "viewRefreshMode", "viewRefreshTime", "viewBoundScale", "viewFormat", "httpQuery", "linkSimpleExtension", "linkObjectExtension" }) @XmlRootElement(name = "Icon", namespace = "http://www.opengis.net/kml/2.2") public class Icon extends BasicLink implements Cloneable { /** * RefreshMode *

* onChange, onInterval, onExpire *

* * See Also: * See {@code } * * * */ @XmlElement(namespace = "http://www.opengis.net/kml/2.2", defaultValue = "onChange") protected RefreshMode refreshMode; /** * {@code {@code }} *

* Indicates to refresh the file every n seconds. *

* * * */ @XmlElement(namespace = "http://www.opengis.net/kml/2.2", defaultValue = "4.0") protected double refreshInterval; /** * ViewRefreshMode *

* never, onRequest, onStop, onRegion *

* * See Also: * See {@code } * * * */ @XmlElement(namespace = "http://www.opengis.net/kml/2.2", defaultValue = "never") protected ViewRefreshMode viewRefreshMode; /** * {@code } *

* After camera movement stops, specifies the number of seconds to wait before refreshing * the view. (See {@code {@code }} and onStop above.) *

* * * */ @XmlElement(namespace = "http://www.opengis.net/kml/2.2", defaultValue = "4.0") protected double viewRefreshTime; /** * {@code } *

* Scales the BBOX parameters before sending them to the server. A value less than * 1 specifies to use less than the full view (screen). A value greater than 1 specifies * to fetch an area that extends beyond the edges of the current view. *

* * * */ @XmlElement(namespace = "http://www.opengis.net/kml/2.2", defaultValue = "1.0") protected double viewBoundScale; /** * {@code } *

* BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth] *

*

* If you specify a {@code } of onStop and do not include the {@code } * tag in the file, the following information is automatically appended to the query * string: *

*

* If you specify an empty {@code } tag, no information is appended to the query * string. *

*

* Specifies the format of the query string that is appended to the Link's {@code }before * the file is fetched.(If the {@code }specifies a local file, this element is ignored.) *

*

* This information matches the Web Map Service (WMS) bounding box specification. *

*

* You can also specify a custom set of viewing parameters to add to the query string. * If you supply a format string, it is used instead of the BBOX information. If you * also want the BBOX information, you need to add those parameters along with the * custom parameters. *

*

* You can use any of the following parameters in your format string (and Google Earth * will substitute the appropriate current value at the time it creates the query string): * [lookatLon], [lookatLat] - longitude and latitude of the point that LookAt is * viewing [lookatRange], [lookatTilt], [lookatHeading] - values used by the LookAt * element (see descriptions of {@code }, {@code }, and {@code } in LookAt) [lookatTerrainLon], * [lookatTerrainLat], [lookatTerrainAlt] - point on the terrain in degrees/meters * that LookAt is viewing [cameraLon], [cameraLat], [cameraAlt] - degrees/meters * of the eyepoint for the camera [horizFov], [vertFov] - horizontal, vertical field * of view for the camera [horizPixels], [vertPixels] - size in pixels of the 3D viewer * [terrainEnabled] - indicates whether the 3D viewer is showing terrain *

* * * */ @XmlElement(namespace = "http://www.opengis.net/kml/2.2") protected String viewFormat; /** * {@code } *

* Appends information to the query string, based on the parameters specified. (Google * Earth substitutes the appropriate current value at the time it creates the query * string.) The following parameters are supported: [clientVersion] [kmlVersion] [clientName] * [language] *

* * * */ @XmlElement(namespace = "http://www.opengis.net/kml/2.2") protected String httpQuery; @XmlElement(name = "LinkSimpleExtensionGroup", namespace = "http://www.opengis.net/kml/2.2") @XmlSchemaType(name = "anySimpleType") protected List linkSimpleExtension; /** * {@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> -->
* * * */ @XmlElement(name = "LinkObjectExtensionGroup", namespace = "http://www.opengis.net/kml/2.2") protected List linkObjectExtension; public Icon() { super(); } /** * * * @return * possible object is * {@link RefreshMode} * */ public RefreshMode getRefreshMode() { return refreshMode; } /** * * * @param value * allowed object is * {@link RefreshMode} * */ public void setRefreshMode(RefreshMode value) { this.refreshMode = value; } /** * * * @return * possible object is * {@link Double} * */ public double getRefreshInterval() { return refreshInterval; } /** * * * @param value * allowed object is * {@link Double} * */ public void setRefreshInterval(double value) { this.refreshInterval = value; } /** * * * @return * possible object is * {@link ViewRefreshMode} * */ public ViewRefreshMode getViewRefreshMode() { return viewRefreshMode; } /** * * * @param value * allowed object is * {@link ViewRefreshMode} * */ public void setViewRefreshMode(ViewRefreshMode value) { this.viewRefreshMode = value; } /** * * * @return * possible object is * {@link Double} * */ public double getViewRefreshTime() { return viewRefreshTime; } /** * * * @param value * allowed object is * {@link Double} * */ public void setViewRefreshTime(double value) { this.viewRefreshTime = value; } /** * * * @return * possible object is * {@link Double} * */ public double getViewBoundScale() { return viewBoundScale; } /** * * * @param value * allowed object is * {@link Double} * */ public void setViewBoundScale(double value) { this.viewBoundScale = value; } /** * * * @return * possible object is * {@link String} * */ public String getViewFormat() { return viewFormat; } /** * * * @param value * allowed object is * {@link String} * */ public void setViewFormat(String value) { this.viewFormat = value; } /** * * * @return * possible object is * {@link String} * */ public String getHttpQuery() { return httpQuery; } /** * * * @param value * allowed object is * {@link String} * */ public void setHttpQuery(String value) { this.httpQuery = value; } /** * * */ public List getLinkSimpleExtension() { if (linkSimpleExtension == null) { linkSimpleExtension = new ArrayList(); } return this.linkSimpleExtension; } /** * * */ public List getLinkObjectExtension() { if (linkObjectExtension == null) { linkObjectExtension = new ArrayList(); } return this.linkObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp; result = ((prime*result)+((refreshMode == null)? 0 :refreshMode.hashCode())); temp = Double.doubleToLongBits(refreshInterval); result = ((prime*result)+((int)(temp^(temp >>>(32))))); result = ((prime*result)+((viewRefreshMode == null)? 0 :viewRefreshMode.hashCode())); temp = Double.doubleToLongBits(viewRefreshTime); result = ((prime*result)+((int)(temp^(temp >>>(32))))); temp = Double.doubleToLongBits(viewBoundScale); result = ((prime*result)+((int)(temp^(temp >>>(32))))); result = ((prime*result)+((viewFormat == null)? 0 :viewFormat.hashCode())); result = ((prime*result)+((httpQuery == null)? 0 :httpQuery.hashCode())); result = ((prime*result)+((linkSimpleExtension == null)? 0 :linkSimpleExtension.hashCode())); result = ((prime*result)+((linkObjectExtension == null)? 0 :linkObjectExtension.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 Icon) == false) { return false; } Icon other = ((Icon) obj); if (refreshMode == null) { if (other.refreshMode!= null) { return false; } } else { if (refreshMode.equals(other.refreshMode) == false) { return false; } } if (refreshInterval!= other.refreshInterval) { return false; } if (viewRefreshMode == null) { if (other.viewRefreshMode!= null) { return false; } } else { if (viewRefreshMode.equals(other.viewRefreshMode) == false) { return false; } } if (viewRefreshTime!= other.viewRefreshTime) { return false; } if (viewBoundScale!= other.viewBoundScale) { return false; } if (viewFormat == null) { if (other.viewFormat!= null) { return false; } } else { if (viewFormat.equals(other.viewFormat) == false) { return false; } } if (httpQuery == null) { if (other.httpQuery!= null) { return false; } } else { if (httpQuery.equals(other.httpQuery) == false) { return false; } } if (linkSimpleExtension == null) { if (other.linkSimpleExtension!= null) { return false; } } else { if (linkSimpleExtension.equals(other.linkSimpleExtension) == false) { return false; } } if (linkObjectExtension == null) { if (other.linkObjectExtension!= null) { return false; } } else { if (linkObjectExtension.equals(other.linkObjectExtension) == false) { return false; } } return true; } /** * * * @param linkSimpleExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setLinkSimpleExtension(final List linkSimpleExtension) { this.linkSimpleExtension = linkSimpleExtension; } /** * add a value to the linkSimpleExtension property collection * * @param linkSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public Icon addToLinkSimpleExtension(final Object linkSimpleExtension) { this.getLinkSimpleExtension().add(linkSimpleExtension); return this; } /** * * * @param linkObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} */ public void setLinkObjectExtension(final List linkObjectExtension) { this.linkObjectExtension = linkObjectExtension; } /** * add a value to the linkObjectExtension property collection * * @param linkObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public Icon addToLinkObjectExtension(final AbstractObject linkObjectExtension) { this.getLinkObjectExtension().add(linkObjectExtension); return this; } /** * * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public Icon addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * * */ @Obvious @Override public void setBasicLinkSimpleExtension(final List basicLinkSimpleExtension) { super.setBasicLinkSimpleExtension(basicLinkSimpleExtension); } @Obvious @Override public Icon addToBasicLinkSimpleExtension(final Object basicLinkSimpleExtension) { super.getBasicLinkSimpleExtension().add(basicLinkSimpleExtension); return this; } /** * * */ @Obvious @Override public void setBasicLinkObjectExtension(final List basicLinkObjectExtension) { super.setBasicLinkObjectExtension(basicLinkObjectExtension); } @Obvious @Override public Icon addToBasicLinkObjectExtension(final AbstractObject basicLinkObjectExtension) { super.getBasicLinkObjectExtension().add(basicLinkObjectExtension); return this; } /** * fluent setter * * * @param refreshMode * required parameter */ public Icon withRefreshMode(final RefreshMode refreshMode) { this.setRefreshMode(refreshMode); return this; } /** * fluent setter * * * @param refreshInterval * required parameter */ public Icon withRefreshInterval(final double refreshInterval) { this.setRefreshInterval(refreshInterval); return this; } /** * fluent setter * * * @param viewRefreshMode * required parameter */ public Icon withViewRefreshMode(final ViewRefreshMode viewRefreshMode) { this.setViewRefreshMode(viewRefreshMode); return this; } /** * fluent setter * * * @param viewRefreshTime * required parameter */ public Icon withViewRefreshTime(final double viewRefreshTime) { this.setViewRefreshTime(viewRefreshTime); return this; } /** * fluent setter * * * @param viewBoundScale * required parameter */ public Icon withViewBoundScale(final double viewBoundScale) { this.setViewBoundScale(viewBoundScale); return this; } /** * fluent setter * * * @param viewFormat * required parameter */ public Icon withViewFormat(final String viewFormat) { this.setViewFormat(viewFormat); return this; } /** * fluent setter * * * @param httpQuery * required parameter */ public Icon withHttpQuery(final String httpQuery) { this.setHttpQuery(httpQuery); return this; } /** * fluent setter * * * @param linkSimpleExtension * required parameter */ public Icon withLinkSimpleExtension(final List linkSimpleExtension) { this.setLinkSimpleExtension(linkSimpleExtension); return this; } /** * fluent setter * * * @param linkObjectExtension * required parameter */ public Icon withLinkObjectExtension(final List linkObjectExtension) { this.setLinkObjectExtension(linkObjectExtension); return this; } @Obvious @Override public Icon withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public Icon withId(final String id) { super.withId(id); return this; } @Obvious @Override public Icon withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Obvious @Override public Icon withHref(final String href) { super.withHref(href); return this; } @Obvious @Override public Icon withBasicLinkSimpleExtension(final List basicLinkSimpleExtension) { super.withBasicLinkSimpleExtension(basicLinkSimpleExtension); return this; } @Obvious @Override public Icon withBasicLinkObjectExtension(final List basicLinkObjectExtension) { super.withBasicLinkObjectExtension(basicLinkObjectExtension); return this; } @Override public Icon clone() { Icon copy; copy = ((Icon) super.clone()); copy.linkSimpleExtension = new ArrayList((getLinkSimpleExtension().size())); for (Object iter: linkSimpleExtension) { copy.linkSimpleExtension.add(iter); } copy.linkObjectExtension = new ArrayList((getLinkObjectExtension().size())); for (AbstractObject iter: linkObjectExtension) { copy.linkObjectExtension.add(iter.clone()); } return copy; } }