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

de.micromata.opengis.kml.v_2_2_0.Delete 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.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import de.micromata.opengis.kml.v_2_2_0.gx.Tour;


/**
 * 
 * 

* Child elements for , which are the only elements that can be deleted, are * Document, Folder, GroundOverlay, Placemark, and ScreenOverlay. *

*

* Deletes features from a complex element that has already been loaded via a . * The element in specifies the .kml or .kmz file containing * the data to be deleted. Within that file, the element to be deleted must already * have an explicit id defined for it. The element references this id in the * targetId attribute. *

* * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DeleteType", propOrder = { "feature" }) @XmlRootElement(name = "Delete", namespace = "http://www.opengis.net/kml/2.2") public class Delete implements Cloneable { /** * *

* This is an abstract element and cannot be used directly in a KML file. The following * diagram shows how some of a Feature's elements appear in Google Earth. *

* * Syntax: *
<!-- abstract element; do not create -->
     * <!-- Feature id="ID" -->                <!-- Document,Folder,
     *                                              NetworkLink,Placemark,
     *                                              GroundOverlay,PhotoOverlay,ScreenOverlay -->
     *   <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> <!-- TimeStamp or TimeSpan --> * <styleUrl>...</styleUrl> <!-- anyURI --> * <StyleSelector>...</StyleSelector> * <Region>...</Region> * <Metadata>...</Metadata> <!-- deprecated in KML 2.2 --> * <ExtendedData>...</ExtendedData> <!-- new in KML 2.2 -->
<-- /Feature -->
* * Extends: * @see: * * Extended By: * @see: * @see: * @see: * @see: * @see: * * * */ @XmlElementRef(name = "AbstractFeatureGroup", namespace = "http://www.opengis.net/kml/2.2", required = false) protected List feature; public Delete() { super(); } /** * @see feature * */ public List getFeature() { if (feature == null) { feature = new ArrayList(); } return this.feature; } @Override public int hashCode() { final int prime = 31; int result = 1; result = ((prime*result)+((feature == null)? 0 :feature.hashCode())); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if ((obj instanceof Delete) == false) { return false; } Delete other = ((Delete) obj); if (feature == null) { if (other.feature!= null) { return false; } } else { if (feature.equals(other.feature) == false) { return false; } } return true; } /** * Creates a new instance of {@link Tour} and adds it to feature. * This method is a short version for: * * Tour tour = new Tour(); * this.getFeature().add(tour); * * */ public Tour createAndAddTour() { Tour newValue = new Tour(); this.getFeature().add(newValue); return newValue; } /** * Creates a new instance of {@link ScreenOverlay} and adds it to feature. * This method is a short version for: * * ScreenOverlay screenOverlay = new ScreenOverlay(); * this.getFeature().add(screenOverlay); * * */ public ScreenOverlay createAndAddScreenOverlay() { ScreenOverlay newValue = new ScreenOverlay(); this.getFeature().add(newValue); return newValue; } /** * Creates a new instance of {@link PhotoOverlay} and adds it to feature. * This method is a short version for: * * PhotoOverlay photoOverlay = new PhotoOverlay(); * this.getFeature().add(photoOverlay); * * */ public PhotoOverlay createAndAddPhotoOverlay() { PhotoOverlay newValue = new PhotoOverlay(); this.getFeature().add(newValue); return newValue; } /** * Creates a new instance of {@link GroundOverlay} and adds it to feature. * This method is a short version for: * * GroundOverlay groundOverlay = new GroundOverlay(); * this.getFeature().add(groundOverlay); * * */ public GroundOverlay createAndAddGroundOverlay() { GroundOverlay newValue = new GroundOverlay(); this.getFeature().add(newValue); return newValue; } /** * Creates a new instance of {@link NetworkLink} and adds it to feature. * This method is a short version for: * * NetworkLink networkLink = new NetworkLink(); * this.getFeature().add(networkLink); * * */ public NetworkLink createAndAddNetworkLink() { NetworkLink newValue = new NetworkLink(); this.getFeature().add(newValue); return newValue; } /** * Creates a new instance of {@link Folder} and adds it to feature. * This method is a short version for: * * Folder folder = new Folder(); * this.getFeature().add(folder); * * */ public Folder createAndAddFolder() { Folder newValue = new Folder(); this.getFeature().add(newValue); return newValue; } /** * Creates a new instance of {@link Document} and adds it to feature. * This method is a short version for: * * Document document = new Document(); * this.getFeature().add(document); * * */ public Document createAndAddDocument() { Document newValue = new Document(); this.getFeature().add(newValue); return newValue; } /** * Creates a new instance of {@link Placemark} and adds it to feature. * This method is a short version for: * * Placemark placemark = new Placemark(); * this.getFeature().add(placemark); * * */ public Placemark createAndAddPlacemark() { Placemark newValue = new Placemark(); this.getFeature().add(newValue); return newValue; } /** * @see feature * * @param feature */ public void setFeature(final List feature) { this.feature = feature; } /** * add a value to the feature property collection * * @param feature * Objects of the following type are allowed in the list: {@code <}{@link Container}{@code>}{@link JAXBElement}{@code <}{@link GroundOverlay}{@code>}{@link JAXBElement}{@code <}{@link NetworkLink}{@code>}{@link JAXBElement}{@code <}{@link Folder}{@code>}{@link JAXBElement}{@code <}{@link PhotoOverlay}{@code>}{@link JAXBElement}{@code <}{@link Document}{@code>}{@link JAXBElement}{@code <}{@link Tour}{@code>}{@link JAXBElement}{@code <}{@link ScreenOverlay}{@code>}{@link JAXBElement}{@code <}{@link Feature}{@code>}{@link JAXBElement}{@code <}{@link Placemark}{@code>}{@link JAXBElement}{@code <}{@link Overlay}{@code>} * @return * true (as general contract of Collection.add). */ public Delete addToFeature(final Feature feature) { this.getFeature().add(feature); return this; } /** * fluent setter * @see #setFeature(List) * * @param feature * required parameter */ public Delete withFeature(final List feature) { this.setFeature(feature); return this; } @Override public Delete clone() { Delete copy; try { copy = ((Delete) super.clone()); } catch (CloneNotSupportedException _x) { throw new InternalError((_x.toString())); } copy.feature = new ArrayList((getFeature().size())); for (Feature iter: feature) { copy.feature.add(iter.clone()); } return copy; } }