de.micromata.opengis.kml.v_2_2_0.gx.AnimatedUpdate Maven / Gradle / Ivy
Show all versions of JavaAPIforKml Show documentation
package de.micromata.opengis.kml.v_2_2_0.gx;
import de.micromata.opengis.kml.v_2_2_0.Update;
import de.micromata.opengis.kml.v_2_2_0.annotations.Obvious;
import jakarta.xml.bind.annotation.*;
import java.util.List;
/**
* gx:AnimatedUpdate
*
* gx:AnimatedUpdate controls changes during a tour to KML features, using Update.
* Changes to KML features will not modify the DOM - that is, any changes will be reverted
* when the tour is over, and will not be saved in the KML at any time.
*
*
* gx:AnimatedUpdate should also contain a gx:duration value to specify the length
* of time in seconds over which the update takes place. Integer, float, and color
* fields are smoothly animated from original to new value across the duration; boolean,
* string, and other values that don't lend to interpolation are updated at the end
* of the duration.
*
*
* Refer to Tour timelines in the Touring chapter of the KML Developer's Guide for
* information about gx:AnimatedUpdate and the tour timeline.
*
*
* Syntax:
* <gx:AnimatedUpdate>
* <gx:duration>0.0</gx:duration> <!-- double, specifies time in seconds -->
* <Update>
* <targetHref>...</targetHref> <!-- required; can contain a URL or be left blank -->
* <!-- (to target elements within the same file -->
* <Change>...</Change>
* <Create>...</Create>
* <Delete>...</Delete>
* </Update>
* </gx:AnimatedUpdate>
*
* Extends:
*
*
* Contains:
*
*
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AnimatedUpdateType", propOrder = {
"duration",
"update",
"delayedStart"
})
@XmlRootElement(name = "AnimatedUpdate", namespace = "http://www.google.com/kml/ext/2.2")
public class AnimatedUpdate
extends TourPrimitive
implements Cloneable
{
/**
* gx:duration
*
* gx:duration extends gx:TourPrimitive by specifying a time-span for events. The
* time is written as seconds using XML's double datatype.
*
*
* Duration and gx:AnimatedUpdate
*
*
* Duration and gx:FlyTo
*
*
* Specifies the length of time over which the update takes place. Integer, float,
* and color fields are smoothly animated from original to new value across the duration;
* boolean, string, and other values that don't lend to interpolation are updated at
* the end of the duration.
*
*
* When a duration is included within a gx:FlyTo element, it specifies the length
* of time that the browser takes to fly from the previous point to the specified point.
*
*
* Syntax:
* <gx:duration>0.0</gx:duration> <!-- double -->
*
*
*
*
*/
@XmlElement(defaultValue = "0.0")
protected double duration;
/**
* Update
*
* Specifies an addition, change, or deletion to KML data that has already been loaded
* using the specified URL. The targetHref specifies the .kml or .kmz file whose
* data (within Google Earth) is to be modified. Update is always contained in a
* NetworkLinkControl. Furthermore, the file containing the NetworkLinkControl must
* have been loaded by a NetworkLink. See the "Topics in KML" page on Updates for a
* detailed example of how Update works.
*
*
* With Update, you can specify any number of Change, Create, and Delete tags for
* a .kml file or .kmz archive that has previously been loaded with a network link.
* See Update.
*
*
* Syntax:
* <Update>
* <targetHref>...<targetHref> <!-- URL -->
* <Change>...</Change>
* <Create>...</Create>
* <Delete>...</Delete>
* </Update>
*
* Contained By:
*
*
*
*
*
*
*/
@XmlElement(name = "Update", namespace = "http://www.opengis.net/kml/2.2")
protected Update update;
@XmlElement(defaultValue = "0.0")
protected double delayedStart;
public AnimatedUpdate() {
super();
}
/**
*
*
* @return
* possible object is
* {@link Double}
*
*/
public double getDuration() {
return duration;
}
/**
*
*
* @param value
* allowed object is
* {@link Double}
*
*/
public void setDuration(double value) {
this.duration = value;
}
/**
*
*
* @return
* possible object is
* {@link Update}
*
*/
public Update getUpdate() {
return update;
}
/**
*
*
* @param value
* allowed object is
* {@link Update}
*
*/
public void setUpdate(Update value) {
this.update = value;
}
/**
*
*
* @return
* possible object is
* {@link Double}
*
*/
public double getDelayedStart() {
return delayedStart;
}
/**
*
*
* @param value
* allowed object is
* {@link Double}
*
*/
public void setDelayedStart(double value) {
this.delayedStart = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
long temp;
temp = Double.doubleToLongBits(duration);
result = ((prime*result)+((int)(temp^(temp >>>(32)))));
result = ((prime*result)+((update == null)? 0 :update.hashCode()));
temp = Double.doubleToLongBits(delayedStart);
result = ((prime*result)+((int)(temp^(temp >>>(32)))));
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if ((obj instanceof AnimatedUpdate) == false) {
return false;
}
AnimatedUpdate other = ((AnimatedUpdate) obj);
if (duration!= other.duration) {
return false;
}
if (update == null) {
if (other.update!= null) {
return false;
}
} else {
if (update.equals(other.update) == false) {
return false;
}
}
if (delayedStart!= other.delayedStart) {
return false;
}
return true;
}
/**
* Creates a new instance of {@link Update} and set it to update.
*
* This method is a short version for:
* {@code
* Update update = new Update();
* this.setUpdate(update); }
*
*
* @param createOrDeleteOrChange
* required parameter
* @param targetHref
* required parameter
*/
public Update createAndSetUpdate(final String targetHref, final List