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

de.micromata.opengis.kml.v_2_2_0.atom.Link 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.atom;

import jakarta.xml.bind.annotation.*;


/**
 * {@code } (required). see {@code }.
 * 

* {@code } specifies the location of any of the following: *

*

* If the file specified in {@code }is a local file, the {@code } and {@code } * elements are not used. *

*

* KML files fetched by network links Image files used in any Overlay (the {@code }element * specifies the image in an Overlay; {@code }has the same fields as {@code }) Model files * used in the {@code } element *

*

* Specifies the URL of the website containing this KML or KMZ file. Be sure to include * the namespace for this element in any KML file that uses it: xmlns:atom="http://www.w3.org/2005/Atom" * (see the sample that follows). *

*

* Specifies the file to load and optional refresh parameters. See {@code }. *

*

* The {@code } element replaces the {@code } element of NetworkLink contained in earlier * KML releases and adds functionality for the {@code } element (introduced in KML * 2.1). In Google Earth releases 3.0 and earlier, the {@code } element is ignored. *

*

* The file is conditionally loaded and refreshed, depending on the refresh parameters * supplied here. Two different sets of refresh parameters can be specified: one set * is based on time ({@code } and {@code }) and one is based on the current * "camera" view ({@code } and {@code }). In addition, Link specifies * whether to scale the bounding box parameters that are sent to the server ({@code } * and provides a set of optional viewing parameters that can be sent to the server * ({@code }) as well as a set of optional parameters containing version and language * information. *

*

* Tip: To display the top-level Folder or Document within a Network Link in the List * View, assign an ID to the Folder or Document. Without this ID, only the child object * names are displayed in the List View. *

*

* When a file is fetched, the URL that is sent to the server is composed of three * pieces of information: *

*

* the href (Hypertext Reference) that specifies the file to load. an arbitrary format * string that is created from (a) parameters that you specify in the {@code } * element or (b) bounding box parameters (this is the default and is used if no {@code } * element is included in the file). a second format string that is specified in the * {@code } element. *

* * Syntax: *
<Link id="ID">
 *   <!-- specific to Link -->
 *   <href>...</href>                      <!-- string -->
 *   <refreshMode>onChange</refreshMode>   
 *     <!-- refreshModeEnum: onChange, onInterval, or onExpire -->   
 *   <refreshInterval>4</refreshInterval>  <!-- float -->
 *   <viewRefreshMode>never</viewRefreshMode> 
 *     <!-- viewRefreshModeEnum: never, onStop, onRequest, onRegion -->
 *   <viewRefreshTime>4</viewRefreshTime>  <!-- float -->
 *   <viewBoundScale>1</viewBoundScale>    <!-- float -->
 *   <viewFormat>BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]</viewFormat>
 *                                         <!-- string -->
 *   <httpQuery>...</httpQuery>            <!-- string -->
 * </Link>
* */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "link") public class Link implements Cloneable { /** *

* A URL (either an HTTP address or a local file specification). When the parent of * {@code } is a NetworkLink, {@code }is a KML file. When the parent of {@code } is a Model, * {@code }is a COLLADA file. When the parent of {@code }(same fields as {@code }) is an * Overlay, {@code }is an image. Relative URLs can be used in this tag and are evaluated * relative to the enclosing KML file. *

*

* An HTTP address or a local file specification used to load an icon. *

*

* Specifies the URI of the image used in the List View for the Feature. *

*/ @XmlAttribute(name = "href", required = true) @XmlSchemaType(name = "anySimpleType") protected String href; @XmlAttribute(name = "rel") @XmlSchemaType(name = "anySimpleType") protected String rel; @XmlAttribute(name = "type") protected String type; @XmlAttribute(name = "hreflang") protected String hreflang; @XmlAttribute(name = "title") @XmlSchemaType(name = "anySimpleType") protected String title; @XmlAttribute(name = "length") @XmlSchemaType(name = "anySimpleType") protected String length; /** * Value constructor with only mandatory fields * * @param href * required parameter */ public Link(final String href) { super(); this.href = href; } /** * Default no-arg constructor is private. Use overloaded constructor instead! (Temporary solution, till a better and more suitable ObjectFactory is created.) * */ @Deprecated private Link() { super(); } /** * @return * possible object is * {@link String} * */ public String getHref() { return href; } /** * @param value * allowed object is * {@link String} * */ public void setHref(String value) { this.href = value; } /** * @return * possible object is * {@link String} * */ public String getRel() { return rel; } /** * @param value * allowed object is * {@link String} * */ public void setRel(String value) { this.rel = value; } /** * @return * possible object is * {@link String} * */ public String getType() { return type; } /** * @param value * allowed object is * {@link String} * */ public void setType(String value) { this.type = value; } /** * @return * possible object is * {@link String} * */ public String getHreflang() { return hreflang; } /** * @param value * allowed object is * {@link String} * */ public void setHreflang(String value) { this.hreflang = value; } /** * @return * possible object is * {@link String} * */ public String getTitle() { return title; } /** * @param value * allowed object is * {@link String} * */ public void setTitle(String value) { this.title = value; } /** * @return * possible object is * {@link String} * */ public String getLength() { return length; } /** * @param value * allowed object is * {@link String} * */ public void setLength(String value) { this.length = value; } @Override public int hashCode() { final int prime = 31; int result = 1; result = ((prime*result)+((href == null)? 0 :href.hashCode())); result = ((prime*result)+((rel == null)? 0 :rel.hashCode())); result = ((prime*result)+((type == null)? 0 :type.hashCode())); result = ((prime*result)+((hreflang == null)? 0 :hreflang.hashCode())); result = ((prime*result)+((title == null)? 0 :title.hashCode())); result = ((prime*result)+((length == null)? 0 :length.hashCode())); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if ((obj instanceof Link) == false) { return false; } Link other = ((Link) obj); if (href == null) { if (other.href!= null) { return false; } } else { if (href.equals(other.href) == false) { return false; } } if (rel == null) { if (other.rel!= null) { return false; } } else { if (rel.equals(other.rel) == false) { return false; } } if (type == null) { if (other.type!= null) { return false; } } else { if (type.equals(other.type) == false) { return false; } } if (hreflang == null) { if (other.hreflang!= null) { return false; } } else { if (hreflang.equals(other.hreflang) == false) { return false; } } if (title == null) { if (other.title!= null) { return false; } } else { if (title.equals(other.title) == false) { return false; } } if (length == null) { if (other.length!= null) { return false; } } else { if (length.equals(other.length) == false) { return false; } } return true; } /** * fluent setter * * * @param rel * required parameter */ public Link withRel(final String rel) { this.setRel(rel); return this; } /** * fluent setter * * * @param type * required parameter */ public Link withType(final String type) { this.setType(type); return this; } /** * fluent setter * * * @param hreflang * required parameter */ public Link withHreflang(final String hreflang) { this.setHreflang(hreflang); return this; } /** * fluent setter * * * @param title * required parameter */ public Link withTitle(final String title) { this.setTitle(title); return this; } /** * fluent setter * * * @param length * required parameter */ public Link withLength(final String length) { this.setLength(length); return this; } @Override public Link clone() { Link copy; try { copy = ((Link) super.clone()); } catch (CloneNotSupportedException _x) { throw new InternalError((_x.toString())); } return copy; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy