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

de.micromata.opengis.kml.v_2_2_0.SimpleData Maven / Gradle / Ivy


package de.micromata.opengis.kml.v_2_2_0;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;


/**
 * 
 * 

* This element assigns a value to the custom data field * identified by the name attribute. The type and name of this custom data field are * declared in the element. Here is an example of defining two custom data * elements: Easy trail * Pi in the sky 3.14159 * 10 * -122.000,37.002 Difficult * trail Mount Everest 347.45 * 10000 * -122.000,37.002 *

*

* Here is an example of defining two custom data elements: *

*

* This element assigns a value to the custom data field identified by the name attribute. * The type and name of this custom data field are declared in the element. *

* * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SimpleDataType", propOrder = { "value" }) @XmlRootElement(name = "SimpleData", namespace = "http://www.opengis.net/kml/2.2") public class SimpleData implements Cloneable { /** * *

* Club house 1 * 234 * 4 *

*

* An optional formatted version of name, to be used for display purposes. * Value of the data pair. Club house * 1 234 * 4 *

*

* Value of the data pair. *

* * * */ @XmlValue protected String value; /** * *

* User-defined text displayed in the 3D viewer as the label for the object (for example, * for a Placemark, Folder, or NetworkLink). *

* * * */ @XmlAttribute(name = "name", required = true) protected String name; /** * Value constructor with only mandatory fields * * @param name * required parameter */ public SimpleData(final String name) { super(); this.name = name; } /** * Default no-arg constructor is private. Use overloaded constructor instead! (Temporary solution, till a better and more suitable ObjectFactory is created.) * */ @Deprecated private SimpleData() { super(); } /** * @see value * * @return * possible object is * {@link String} * */ public String getValue() { return value; } /** * @see value * * @param value * allowed object is * {@link String} * */ public void setValue(String value) { this.value = value; } /** * @see name * * @return * possible object is * {@link String} * */ public String getName() { return name; } /** * @see name * * @param value * allowed object is * {@link String} * */ public void setName(String value) { this.name = value; } @Override public int hashCode() { final int prime = 31; int result = 1; result = ((prime*result)+((value == null)? 0 :value.hashCode())); result = ((prime*result)+((name == null)? 0 :name.hashCode())); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if ((obj instanceof SimpleData) == false) { return false; } SimpleData other = ((SimpleData) obj); if (value == null) { if (other.value!= null) { return false; } } else { if (value.equals(other.value) == false) { return false; } } if (name == null) { if (other.name!= null) { return false; } } else { if (name.equals(other.name) == false) { return false; } } return true; } /** * fluent setter * @see #setValue(String) * * @param value * required parameter */ public SimpleData withValue(final String value) { this.setValue(value); return this; } @Override public SimpleData clone() { SimpleData copy; try { copy = ((SimpleData) super.clone()); } catch (CloneNotSupportedException _x) { throw new InternalError((_x.toString())); } return copy; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy