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

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


package de.micromata.opengis.kml.v_2_2_0;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlList;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import de.micromata.opengis.kml.v_2_2_0.annotations.Obvious;


/**
 * 
 * 

* Specifies the current state of the NetworkLink or Folder. Possible values * are open, closed, error, fetching0, fetching1, and fetching2. These values can be * combined by inserting a space between two values (no comma). Specifies the * URI of the image used in the List View for the Feature. *

*

* Icon used in the List view that reflects the state of a Folder or Link fetch. Icons * associated with the open and closed modes are used for Folders and Network Links. * Icons associated with the error and fetching0, fetching1, and fetching2 modes are * used for Network Links. The following screen capture illustrates the Google Earth * icons for these states: *

* * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ItemIconType", propOrder = { "state", "href", "itemIconSimpleExtension", "itemIconObjectExtension" }) @XmlRootElement(name = "ItemIcon", namespace = "http://www.opengis.net/kml/2.2") public class ItemIcon extends AbstractObject implements Cloneable { /** * *

* Specifies the current state of the NetworkLink or Folder. Possible values are open, * closed, error, fetching0, fetching1, and fetching2. These values can be combined * by inserting a space between two values (no comma). *

* * * */ @XmlList protected List state; /** * *

* A URL (either an HTTP address or a local file specification). When the parent of * is a NetworkLink, is a KML file. When the parent of is a Model, * is a COLLADA file. When the parent of (same fields as ) is an * Overlay, is an image. Relative URLs can be used in this tag and are evaluated * relative to the enclosing KML file. *

*

* An HTTP address or a local file specification used to load an icon. *

*

* Specifies the URI of the image used in the List View for the Feature. *

* * * */ protected String href; @XmlElement(name = "ItemIconSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List itemIconSimpleExtension; /** * *

* 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 mechanism is to * be used. *

* * Syntax: *
<!-- abstract element; do not create -->
     * <!-- Object id="ID" targetId="NCName" -->
     * <!-- /Object> -->
* * * */ @XmlElement(name = "ItemIconObjectExtensionGroup") protected List itemIconObjectExtension; public ItemIcon() { super(); } /** * @see state * */ public List getState() { if (state == null) { state = new ArrayList(); } return this.state; } /** * @see href * * @return * possible object is * {@link String} * */ public String getHref() { return href; } /** * @see href * * @param value * allowed object is * {@link String} * */ public void setHref(String value) { this.href = value; } /** * @see itemIconSimpleExtension * */ public List getItemIconSimpleExtension() { if (itemIconSimpleExtension == null) { itemIconSimpleExtension = new ArrayList(); } return this.itemIconSimpleExtension; } /** * @see itemIconObjectExtension * */ public List getItemIconObjectExtension() { if (itemIconObjectExtension == null) { itemIconObjectExtension = new ArrayList(); } return this.itemIconObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((state == null)? 0 :state.hashCode())); result = ((prime*result)+((href == null)? 0 :href.hashCode())); result = ((prime*result)+((itemIconSimpleExtension == null)? 0 :itemIconSimpleExtension.hashCode())); result = ((prime*result)+((itemIconObjectExtension == null)? 0 :itemIconObjectExtension.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 ItemIcon) == false) { return false; } ItemIcon other = ((ItemIcon) obj); if (state == null) { if (other.state!= null) { return false; } } else { if (state.equals(other.state) == false) { return false; } } if (href == null) { if (other.href!= null) { return false; } } else { if (href.equals(other.href) == false) { return false; } } if (itemIconSimpleExtension == null) { if (other.itemIconSimpleExtension!= null) { return false; } } else { if (itemIconSimpleExtension.equals(other.itemIconSimpleExtension) == false) { return false; } } if (itemIconObjectExtension == null) { if (other.itemIconObjectExtension!= null) { return false; } } else { if (itemIconObjectExtension.equals(other.itemIconObjectExtension) == false) { return false; } } return true; } /** * @see state * * @param state */ public void setState(final List state) { this.state = state; } /** * add a value to the state property collection * * @param state * Objects of the following type are allowed in the list: {@link ItemIconState} * @return * true (as general contract of Collection.add). */ public ItemIcon addToState(final ItemIconState state) { this.getState().add(state); return this; } /** * @see itemIconSimpleExtension * * @param itemIconSimpleExtension */ public void setItemIconSimpleExtension(final List itemIconSimpleExtension) { this.itemIconSimpleExtension = itemIconSimpleExtension; } /** * add a value to the itemIconSimpleExtension property collection * * @param itemIconSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public ItemIcon addToItemIconSimpleExtension(final Object itemIconSimpleExtension) { this.getItemIconSimpleExtension().add(itemIconSimpleExtension); return this; } /** * @see itemIconObjectExtension * * @param itemIconObjectExtension */ public void setItemIconObjectExtension(final List itemIconObjectExtension) { this.itemIconObjectExtension = itemIconObjectExtension; } /** * add a value to the itemIconObjectExtension property collection * * @param itemIconObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public ItemIcon addToItemIconObjectExtension(final AbstractObject itemIconObjectExtension) { this.getItemIconObjectExtension().add(itemIconObjectExtension); return this; } /** * @see objectSimpleExtension * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public ItemIcon addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * fluent setter * @see #setState(List) * * @param state * required parameter */ public ItemIcon withState(final List state) { this.setState(state); return this; } /** * fluent setter * @see #setHref(String) * * @param href * required parameter */ public ItemIcon withHref(final String href) { this.setHref(href); return this; } /** * fluent setter * @see #setItemIconSimpleExtension(List) * * @param itemIconSimpleExtension * required parameter */ public ItemIcon withItemIconSimpleExtension(final List itemIconSimpleExtension) { this.setItemIconSimpleExtension(itemIconSimpleExtension); return this; } /** * fluent setter * @see #setItemIconObjectExtension(List) * * @param itemIconObjectExtension * required parameter */ public ItemIcon withItemIconObjectExtension(final List itemIconObjectExtension) { this.setItemIconObjectExtension(itemIconObjectExtension); return this; } @Obvious @Override public ItemIcon withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public ItemIcon withId(final String id) { super.withId(id); return this; } @Obvious @Override public ItemIcon withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Override public ItemIcon clone() { ItemIcon copy; copy = ((ItemIcon) super.clone()); copy.state = new ArrayList((getState().size())); for (ItemIconState iter: state) { copy.state.add(iter); } copy.itemIconSimpleExtension = new ArrayList((getItemIconSimpleExtension().size())); for (Object iter: itemIconSimpleExtension) { copy.itemIconSimpleExtension.add(iter); } copy.itemIconObjectExtension = new ArrayList((getItemIconObjectExtension().size())); for (AbstractObject iter: itemIconObjectExtension) { copy.itemIconObjectExtension.add(iter.clone()); } return copy; } }