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

de.micromata.opengis.kml.v_2_2_0.StyleSelector 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 jakarta.xml.bind.annotation.*;

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


/**
 * {@code }
 * 

* One or more Styles and StyleMaps can be defined to customize the appearance of any * element derived from Feature or of the Geometry in a Placemark. (See {@code }, * {@code }, {@code }, and the styles derived from {@code }.) A style * defined within a Feature is called an "inline style" and applies only to the Feature * that contains it. A style defined as the child of a {@code } is called a "shared * style." A shared style must have an id defined for it. This id is referenced by * one or more Features within the {@code }. In cases where a style element is defined * both in a shared style and in an inline style for a Feature—that is, a Folder, GroundOverlay, * NetworkLink, Placemark, or ScreenOverlay—the value for the Feature's inline style * takes precedence over the value for the shared style. *

* * Syntax: *
<!-- abstract element; do not create -->
 * <!-- StyleSelector id="ID" -->                 <!-- Style,StyleMap -->
 * <!-- /StyleSelector -->
* * Extends: * * * Extended By: * * * * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AbstractStyleSelectorType", propOrder = { "styleSelectorSimpleExtension", "styleSelectorObjectExtension" }) @XmlSeeAlso({ Style.class, StyleMap.class }) public abstract class StyleSelector extends AbstractObject implements Cloneable { @XmlElement(name = "AbstractStyleSelectorSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List styleSelectorSimpleExtension; /** * {@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 = "AbstractStyleSelectorObjectExtensionGroup") protected List styleSelectorObjectExtension; public StyleSelector() { super(); } /** * * */ public List getStyleSelectorSimpleExtension() { if (styleSelectorSimpleExtension == null) { styleSelectorSimpleExtension = new ArrayList(); } return this.styleSelectorSimpleExtension; } /** * * */ public List getStyleSelectorObjectExtension() { if (styleSelectorObjectExtension == null) { styleSelectorObjectExtension = new ArrayList(); } return this.styleSelectorObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((styleSelectorSimpleExtension == null)? 0 :styleSelectorSimpleExtension.hashCode())); result = ((prime*result)+((styleSelectorObjectExtension == null)? 0 :styleSelectorObjectExtension.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 StyleSelector) == false) { return false; } StyleSelector other = ((StyleSelector) obj); if (styleSelectorSimpleExtension == null) { if (other.styleSelectorSimpleExtension!= null) { return false; } } else { if (styleSelectorSimpleExtension.equals(other.styleSelectorSimpleExtension) == false) { return false; } } if (styleSelectorObjectExtension == null) { if (other.styleSelectorObjectExtension!= null) { return false; } } else { if (styleSelectorObjectExtension.equals(other.styleSelectorObjectExtension) == false) { return false; } } return true; } /** * * * @param styleSelectorSimpleExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setStyleSelectorSimpleExtension(final List styleSelectorSimpleExtension) { this.styleSelectorSimpleExtension = styleSelectorSimpleExtension; } /** * add a value to the styleSelectorSimpleExtension property collection * * @param styleSelectorSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public StyleSelector addToStyleSelectorSimpleExtension(final Object styleSelectorSimpleExtension) { this.getStyleSelectorSimpleExtension().add(styleSelectorSimpleExtension); return this; } /** * * * @param styleSelectorObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} */ public void setStyleSelectorObjectExtension(final List styleSelectorObjectExtension) { this.styleSelectorObjectExtension = styleSelectorObjectExtension; } /** * add a value to the styleSelectorObjectExtension property collection * * @param styleSelectorObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public StyleSelector addToStyleSelectorObjectExtension(final AbstractObject styleSelectorObjectExtension) { this.getStyleSelectorObjectExtension().add(styleSelectorObjectExtension); return this; } /** * * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public StyleSelector addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * fluent setter * * * @param styleSelectorSimpleExtension * required parameter */ public StyleSelector withStyleSelectorSimpleExtension(final List styleSelectorSimpleExtension) { this.setStyleSelectorSimpleExtension(styleSelectorSimpleExtension); return this; } /** * fluent setter * * * @param styleSelectorObjectExtension * required parameter */ public StyleSelector withStyleSelectorObjectExtension(final List styleSelectorObjectExtension) { this.setStyleSelectorObjectExtension(styleSelectorObjectExtension); return this; } @Obvious @Override public StyleSelector withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public StyleSelector withId(final String id) { super.withId(id); return this; } @Obvious @Override public StyleSelector withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Override public StyleSelector clone() { StyleSelector copy; copy = ((StyleSelector) super.clone()); copy.styleSelectorSimpleExtension = new ArrayList((getStyleSelectorSimpleExtension().size())); for (Object iter: styleSelectorSimpleExtension) { copy.styleSelectorSimpleExtension.add(iter); } copy.styleSelectorObjectExtension = new ArrayList((getStyleSelectorObjectExtension().size())); for (AbstractObject iter: styleSelectorObjectExtension) { copy.styleSelectorObjectExtension.add(iter.clone()); } return copy; } }