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

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.gx.Tour;
import jakarta.xml.bind.annotation.*;

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


/**
 * {@code }
 * 

* Child elements for {@code }, 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 NetworkLink. * The targetHref element in Update 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 {@code } 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 { /** * {@code } *

* 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: * * * Extended By: * * * * * * * * */ @XmlElementRef(name = "AbstractFeatureGroup", namespace = "http://www.opengis.net/kml/2.2", required = false) protected List feature; public Delete() { super(); } /** * * */ 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: * {@code * 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: * {@code * 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: * {@code * 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: * {@code * 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: * {@code * 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: * {@code * 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: * {@code * 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: * {@code * Placemark placemark = new Placemark(); * this.getFeature().add(placemark); } * * */ public Placemark createAndAddPlacemark() { Placemark newValue = new Placemark(); this.getFeature().add(newValue); return newValue; } /** * * * @param feature * Objects of the following type are allowed in the list: {@code <}{@link Container}{@code >}{@code <}{@link GroundOverlay}{@code >}{@code <}{@link NetworkLink}{@code >}{@code <}{@link Folder}{@code >}{@code <}{@link PhotoOverlay}{@code >}{@code <}{@link Document}{@code >}{@code <}{@link Tour}{@code >}{@code <}{@link ScreenOverlay}{@code >}{@code <}{@link Feature}{@code >}{@code <}{@link Placemark}{@code >}{@code <}{@link Overlay}{@code >} */ 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 >}{@code <}{@link GroundOverlay}{@code >}{@code <}{@link NetworkLink}{@code >}{@code <}{@link Folder}{@code >}{@code <}{@link PhotoOverlay}{@code >}{@code <}{@link Document}{@code >}{@code <}{@link Tour}{@code >}{@code <}{@link ScreenOverlay}{@code >}{@code <}{@link Feature}{@code >}{@code <}{@link Placemark}{@code >}{@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 * * * @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; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy