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

de.micromata.opengis.kml.v_2_2_0.PolyStyle 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 jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

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


/**
 * {@code }
 * Syntax: 
 * 
<PolyStyle id="ID">
 *   <!-- inherited from ColorStyle -->
 *   <color>ffffffff</color>            <!-- kml:color -->
 *   <colorMode>normal</colorMode>      <!-- kml:colorModeEnum: normal or random -->
 * 
 *   <!-- specific to PolyStyle -->
 *   <fill>1</fill>                     <!-- boolean -->
 *   <outline>1</outline>               <!-- boolean -->
 * </PolyStyle>
* * Extends: * * * Contained By: * * * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PolyStyleType", propOrder = { "fill", "outline", "polyStyleSimpleExtension", "polyStyleObjectExtension" }) @XmlRootElement(name = "PolyStyle", namespace = "http://www.opengis.net/kml/2.2") public class PolyStyle extends ColorStyle implements Cloneable { /** * {@code } *

* Boolean value. Specifies whether to fill the polygon. *

* * * */ @XmlElement(defaultValue = "1") @XmlJavaTypeAdapter(BooleanConverter.class) protected Boolean fill; /** * {@code } *

* Boolean value. Specifies whether to outline the polygon. Polygon outlines use the * current LineStyle. *

* * * */ @XmlElement(defaultValue = "1") @XmlJavaTypeAdapter(BooleanConverter.class) protected Boolean outline; @XmlElement(name = "PolyStyleSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List polyStyleSimpleExtension; /** * {@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 = "PolyStyleObjectExtensionGroup") protected List polyStyleObjectExtension; public PolyStyle() { super(); } /** * * @return * possible object is * {@link Boolean} * */ public Boolean isFill() { return fill; } /** * * * @param value * allowed object is * {@link Boolean} * */ public void setFill(Boolean value) { this.fill = value; } /** * * @return * possible object is * {@link Boolean} * */ public Boolean isOutline() { return outline; } /** * * * @param value * allowed object is * {@link Boolean} * */ public void setOutline(Boolean value) { this.outline = value; } /** * * */ public List getPolyStyleSimpleExtension() { if (polyStyleSimpleExtension == null) { polyStyleSimpleExtension = new ArrayList(); } return this.polyStyleSimpleExtension; } /** * * */ public List getPolyStyleObjectExtension() { if (polyStyleObjectExtension == null) { polyStyleObjectExtension = new ArrayList(); } return this.polyStyleObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((fill == null)? 0 :fill.hashCode())); result = ((prime*result)+((outline == null)? 0 :outline.hashCode())); result = ((prime*result)+((polyStyleSimpleExtension == null)? 0 :polyStyleSimpleExtension.hashCode())); result = ((prime*result)+((polyStyleObjectExtension == null)? 0 :polyStyleObjectExtension.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 PolyStyle) == false) { return false; } PolyStyle other = ((PolyStyle) obj); if (fill == null) { if (other.fill!= null) { return false; } } else { if (fill.equals(other.fill) == false) { return false; } } if (outline == null) { if (other.outline!= null) { return false; } } else { if (outline.equals(other.outline) == false) { return false; } } if (polyStyleSimpleExtension == null) { if (other.polyStyleSimpleExtension!= null) { return false; } } else { if (polyStyleSimpleExtension.equals(other.polyStyleSimpleExtension) == false) { return false; } } if (polyStyleObjectExtension == null) { if (other.polyStyleObjectExtension!= null) { return false; } } else { if (polyStyleObjectExtension.equals(other.polyStyleObjectExtension) == false) { return false; } } return true; } /** * * * @param polyStyleSimpleExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setPolyStyleSimpleExtension(final List polyStyleSimpleExtension) { this.polyStyleSimpleExtension = polyStyleSimpleExtension; } /** * add a value to the polyStyleSimpleExtension property collection * * @param polyStyleSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public PolyStyle addToPolyStyleSimpleExtension(final Object polyStyleSimpleExtension) { this.getPolyStyleSimpleExtension().add(polyStyleSimpleExtension); return this; } /** * * * @param polyStyleObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} */ public void setPolyStyleObjectExtension(final List polyStyleObjectExtension) { this.polyStyleObjectExtension = polyStyleObjectExtension; } /** * add a value to the polyStyleObjectExtension property collection * * @param polyStyleObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public PolyStyle addToPolyStyleObjectExtension(final AbstractObject polyStyleObjectExtension) { this.getPolyStyleObjectExtension().add(polyStyleObjectExtension); return this; } /** * * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public PolyStyle addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * * */ @Obvious @Override public void setSubStyleSimpleExtension(final List subStyleSimpleExtension) { super.setSubStyleSimpleExtension(subStyleSimpleExtension); } @Obvious @Override public PolyStyle addToSubStyleSimpleExtension(final Object subStyleSimpleExtension) { super.getSubStyleSimpleExtension().add(subStyleSimpleExtension); return this; } /** * * */ @Obvious @Override public void setSubStyleObjectExtension(final List subStyleObjectExtension) { super.setSubStyleObjectExtension(subStyleObjectExtension); } @Obvious @Override public PolyStyle addToSubStyleObjectExtension(final AbstractObject subStyleObjectExtension) { super.getSubStyleObjectExtension().add(subStyleObjectExtension); return this; } /** * * */ @Obvious @Override public void setColorStyleSimpleExtension(final List colorStyleSimpleExtension) { super.setColorStyleSimpleExtension(colorStyleSimpleExtension); } @Obvious @Override public PolyStyle addToColorStyleSimpleExtension(final Object colorStyleSimpleExtension) { super.getColorStyleSimpleExtension().add(colorStyleSimpleExtension); return this; } /** * * */ @Obvious @Override public void setColorStyleObjectExtension(final List colorStyleObjectExtension) { super.setColorStyleObjectExtension(colorStyleObjectExtension); } @Obvious @Override public PolyStyle addToColorStyleObjectExtension(final AbstractObject colorStyleObjectExtension) { super.getColorStyleObjectExtension().add(colorStyleObjectExtension); return this; } /** * fluent setter * * * @param fill * required parameter */ public PolyStyle withFill(final Boolean fill) { this.setFill(fill); return this; } /** * fluent setter * * * @param outline * required parameter */ public PolyStyle withOutline(final Boolean outline) { this.setOutline(outline); return this; } /** * fluent setter * * * @param polyStyleSimpleExtension * required parameter */ public PolyStyle withPolyStyleSimpleExtension(final List polyStyleSimpleExtension) { this.setPolyStyleSimpleExtension(polyStyleSimpleExtension); return this; } /** * fluent setter * * * @param polyStyleObjectExtension * required parameter */ public PolyStyle withPolyStyleObjectExtension(final List polyStyleObjectExtension) { this.setPolyStyleObjectExtension(polyStyleObjectExtension); return this; } @Obvious @Override public PolyStyle withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public PolyStyle withId(final String id) { super.withId(id); return this; } @Obvious @Override public PolyStyle withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Obvious @Override public PolyStyle withSubStyleSimpleExtension(final List subStyleSimpleExtension) { super.withSubStyleSimpleExtension(subStyleSimpleExtension); return this; } @Obvious @Override public PolyStyle withSubStyleObjectExtension(final List subStyleObjectExtension) { super.withSubStyleObjectExtension(subStyleObjectExtension); return this; } @Obvious @Override public PolyStyle withColor(final String color) { super.withColor(color); return this; } @Obvious @Override public PolyStyle withColorMode(final ColorMode colorMode) { super.withColorMode(colorMode); return this; } @Obvious @Override public PolyStyle withColorStyleSimpleExtension(final List colorStyleSimpleExtension) { super.withColorStyleSimpleExtension(colorStyleSimpleExtension); return this; } @Obvious @Override public PolyStyle withColorStyleObjectExtension(final List colorStyleObjectExtension) { super.withColorStyleObjectExtension(colorStyleObjectExtension); return this; } @Override public PolyStyle clone() { PolyStyle copy; copy = ((PolyStyle) super.clone()); copy.polyStyleSimpleExtension = new ArrayList((getPolyStyleSimpleExtension().size())); for (Object iter: polyStyleSimpleExtension) { copy.polyStyleSimpleExtension.add(iter); } copy.polyStyleObjectExtension = new ArrayList((getPolyStyleObjectExtension().size())); for (AbstractObject iter: polyStyleObjectExtension) { copy.polyStyleObjectExtension.add(iter.clone()); } return copy; } }