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

de.micromata.opengis.kml.v_2_2_0.Folder 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 de.micromata.opengis.kml.v_2_2_0.atom.Author;
import de.micromata.opengis.kml.v_2_2_0.atom.Link;
import de.micromata.opengis.kml.v_2_2_0.gx.Tour;
import de.micromata.opengis.kml.v_2_2_0.xal.AddressDetails;
import jakarta.xml.bind.annotation.*;

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


/**
 * {@code }
 * 

* A Folder is used to arrange other Features hierarchically (Folders, Placemarks, * NetworkLinks, or Overlays). A Feature is visible only if it and all its ancestors * are visible. *

*

* A Folder is used to arrange other Features hierarchically (Folders, Placemarks, * NetworkLinks, or Overlays). A Feature is visible only if it and all its ancestors * are visible. *

* * Syntax: *
<Folder id="ID">
 *   <!-- inherited from Feature element -->
 *   <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> * <styleUrl>...</styleUrl> <!-- anyURI --> * <StyleSelector>...</StyleSelector> * <Region>...</Region> * <Metadata>...</Metadata> <!-- deprecated in KML 2.2 --> * <ExtendedData>...</ExtendedData> <!-- new in KML 2.2 --> * * <!-- specific to Folder --> * <!-- 0 or more Feature elements --> * </Folder> *
* * Extends: * * * Contains: * * * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "FolderType", propOrder = { "feature", "folderSimpleExtension", "folderObjectExtension" }) @XmlRootElement(name = "Folder", namespace = "http://www.opengis.net/kml/2.2") public class Folder extends Container 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; @XmlElement(name = "FolderSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List folderSimpleExtension; /** * {@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 = "FolderObjectExtensionGroup") protected List folderObjectExtension; public Folder() { super(); } /** * * */ public List getFeature() { if (feature == null) { feature = new ArrayList(); } return this.feature; } /** * * */ public List getFolderSimpleExtension() { if (folderSimpleExtension == null) { folderSimpleExtension = new ArrayList(); } return this.folderSimpleExtension; } /** * * */ public List getFolderObjectExtension() { if (folderObjectExtension == null) { folderObjectExtension = new ArrayList(); } return this.folderObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((feature == null)? 0 :feature.hashCode())); result = ((prime*result)+((folderSimpleExtension == null)? 0 :folderSimpleExtension.hashCode())); result = ((prime*result)+((folderObjectExtension == null)? 0 :folderObjectExtension.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 Folder) == false) { return false; } Folder other = ((Folder) obj); if (feature == null) { if (other.feature!= null) { return false; } } else { if (feature.equals(other.feature) == false) { return false; } } if (folderSimpleExtension == null) { if (other.folderSimpleExtension!= null) { return false; } } else { if (folderSimpleExtension.equals(other.folderSimpleExtension) == false) { return false; } } if (folderObjectExtension == null) { if (other.folderObjectExtension!= null) { return false; } } else { if (folderObjectExtension.equals(other.folderObjectExtension) == 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 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 <}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 <}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 Folder addToFeature(final Feature feature) { this.getFeature().add(feature); return this; } /** * * * @param folderSimpleExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setFolderSimpleExtension(final List folderSimpleExtension) { this.folderSimpleExtension = folderSimpleExtension; } /** * add a value to the folderSimpleExtension property collection * * @param folderSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public Folder addToFolderSimpleExtension(final Object folderSimpleExtension) { this.getFolderSimpleExtension().add(folderSimpleExtension); return this; } /** * * * @param folderObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} */ public void setFolderObjectExtension(final List folderObjectExtension) { this.folderObjectExtension = folderObjectExtension; } /** * add a value to the folderObjectExtension property collection * * @param folderObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public Folder addToFolderObjectExtension(final AbstractObject folderObjectExtension) { this.getFolderObjectExtension().add(folderObjectExtension); return this; } /** * * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public Folder addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * * */ @Obvious @Override public void setStyleSelector(final List styleSelector) { super.setStyleSelector(styleSelector); } @Obvious @Override public Folder addToStyleSelector(final StyleSelector styleSelector) { super.getStyleSelector().add(styleSelector); return this; } /** * * */ @Obvious @Override public void setFeatureSimpleExtension(final List featureSimpleExtension) { super.setFeatureSimpleExtension(featureSimpleExtension); } @Obvious @Override public Folder addToFeatureSimpleExtension(final Object featureSimpleExtension) { super.getFeatureSimpleExtension().add(featureSimpleExtension); return this; } /** * * */ @Obvious @Override public void setFeatureObjectExtension(final List featureObjectExtension) { super.setFeatureObjectExtension(featureObjectExtension); } @Obvious @Override public Folder addToFeatureObjectExtension(final AbstractObject featureObjectExtension) { super.getFeatureObjectExtension().add(featureObjectExtension); return this; } /** * * */ @Obvious @Override public void setContainerSimpleExtension(final List containerSimpleExtension) { super.setContainerSimpleExtension(containerSimpleExtension); } @Obvious @Override public Folder addToContainerSimpleExtension(final Object containerSimpleExtension) { super.getContainerSimpleExtension().add(containerSimpleExtension); return this; } /** * * */ @Obvious @Override public void setContainerObjectExtension(final List containerObjectExtension) { super.setContainerObjectExtension(containerObjectExtension); } @Obvious @Override public Folder addToContainerObjectExtension(final AbstractObject containerObjectExtension) { super.getContainerObjectExtension().add(containerObjectExtension); return this; } /** * fluent setter * * * @param feature * required parameter */ public Folder withFeature(final List feature) { this.setFeature(feature); return this; } /** * fluent setter * * * @param folderSimpleExtension * required parameter */ public Folder withFolderSimpleExtension(final List folderSimpleExtension) { this.setFolderSimpleExtension(folderSimpleExtension); return this; } /** * fluent setter * * * @param folderObjectExtension * required parameter */ public Folder withFolderObjectExtension(final List folderObjectExtension) { this.setFolderObjectExtension(folderObjectExtension); return this; } @Obvious @Override public Folder withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public Folder withId(final String id) { super.withId(id); return this; } @Obvious @Override public Folder withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Obvious @Override public Folder withName(final String name) { super.withName(name); return this; } @Obvious @Override public Folder withVisibility(final Boolean visibility) { super.withVisibility(visibility); return this; } @Obvious @Override public Folder withOpen(final Boolean open) { super.withOpen(open); return this; } @Obvious @Override public Folder withAtomAuthor(final Author atomAuthor) { super.withAtomAuthor(atomAuthor); return this; } @Obvious @Override public Folder withAtomLink(final Link atomLink) { super.withAtomLink(atomLink); return this; } @Obvious @Override public Folder withAddress(final String address) { super.withAddress(address); return this; } @Obvious @Override public Folder withXalAddressDetails(final AddressDetails xalAddressDetails) { super.withXalAddressDetails(xalAddressDetails); return this; } @Obvious @Override public Folder withPhoneNumber(final String phoneNumber) { super.withPhoneNumber(phoneNumber); return this; } @Obvious @Override public Folder withSnippet(final Snippet snippet) { super.withSnippet(snippet); return this; } @Obvious @Override public Folder withSnippetd(final String snippetd) { super.withSnippetd(snippetd); return this; } @Obvious @Override public Folder withDescription(final String description) { super.withDescription(description); return this; } @Obvious @Override public Folder withAbstractView(final AbstractView abstractView) { super.withAbstractView(abstractView); return this; } @Obvious @Override public Folder withTimePrimitive(final TimePrimitive timePrimitive) { super.withTimePrimitive(timePrimitive); return this; } @Obvious @Override public Folder withStyleUrl(final String styleUrl) { super.withStyleUrl(styleUrl); return this; } @Obvious @Override public Folder withStyleSelector(final List styleSelector) { super.withStyleSelector(styleSelector); return this; } @Obvious @Override public Folder withRegion(final Region region) { super.withRegion(region); return this; } @Obvious @Override public Folder withMetadata(final Metadata metadata) { super.withMetadata(metadata); return this; } @Obvious @Override public Folder withExtendedData(final ExtendedData extendedData) { super.withExtendedData(extendedData); return this; } @Obvious @Override public Folder withFeatureSimpleExtension(final List featureSimpleExtension) { super.withFeatureSimpleExtension(featureSimpleExtension); return this; } @Obvious @Override public Folder withFeatureObjectExtension(final List featureObjectExtension) { super.withFeatureObjectExtension(featureObjectExtension); return this; } @Obvious @Override public Folder withContainerSimpleExtension(final List containerSimpleExtension) { super.withContainerSimpleExtension(containerSimpleExtension); return this; } @Obvious @Override public Folder withContainerObjectExtension(final List containerObjectExtension) { super.withContainerObjectExtension(containerObjectExtension); return this; } @Override public Folder clone() { Folder copy; copy = ((Folder) super.clone()); copy.feature = new ArrayList((getFeature().size())); for (Feature iter: feature) { copy.feature.add(iter.clone()); } copy.folderSimpleExtension = new ArrayList((getFolderSimpleExtension().size())); for (Object iter: folderSimpleExtension) { copy.folderSimpleExtension.add(iter); } copy.folderObjectExtension = new ArrayList((getFolderObjectExtension().size())); for (AbstractObject iter: folderObjectExtension) { copy.folderObjectExtension.add(iter.clone()); } return copy; } }