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


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.XmlElementRef;
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;
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;


/**
 * 
 * 

* 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: * @see: * * Contains: * @see: * * * */ @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 { /** * *

* 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; @XmlElement(name = "FolderSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List folderSimpleExtension; /** * *

* 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 = "FolderObjectExtensionGroup") protected List folderObjectExtension; public Folder() { super(); } /** * @see feature * */ public List getFeature() { if (feature == null) { feature = new ArrayList(); } return this.feature; } /** * @see folderSimpleExtension * */ public List getFolderSimpleExtension() { if (folderSimpleExtension == null) { folderSimpleExtension = new ArrayList(); } return this.folderSimpleExtension; } /** * @see folderObjectExtension * */ 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: * * 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 Folder addToFeature(final Feature feature) { this.getFeature().add(feature); return this; } /** * @see folderSimpleExtension * * @param folderSimpleExtension */ 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; } /** * @see folderObjectExtension * * @param folderObjectExtension */ 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; } /** * @see objectSimpleExtension * */ @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; } /** * @see styleSelector * */ @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; } /** * @see featureSimpleExtension * */ @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; } /** * @see featureObjectExtension * */ @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; } /** * @see containerSimpleExtension * */ @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; } /** * @see containerObjectExtension * */ @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 * @see #setFeature(List) * * @param feature * required parameter */ public Folder withFeature(final List feature) { this.setFeature(feature); return this; } /** * fluent setter * @see #setFolderSimpleExtension(List) * * @param folderSimpleExtension * required parameter */ public Folder withFolderSimpleExtension(final List folderSimpleExtension) { this.setFolderSimpleExtension(folderSimpleExtension); return this; } /** * fluent setter * @see #setFolderObjectExtension(List) * * @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; } }