de.micromata.opengis.kml.v_2_2_0.atom
Class Link

java.lang.Object
  extended by de.micromata.opengis.kml.v_2_2_0.atom.Link
All Implemented Interfaces:
java.lang.Cloneable

public class Link
extends java.lang.Object
implements java.lang.Cloneable

(required). see .

specifies the location of any of the following:

If the file specified in is a local file, the and elements are not used.

KML files fetched by network links Image files used in any Overlay (the element specifies the image in an Overlay; has the same fields as ) Model files used in the 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 .

The element replaces the element of contained in earlier KML releases and adds functionality for the element (introduced in KML 2.1). In Google Earth releases 3.0 and earlier, the 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 ( and ) and one is based on the current "camera" view ( and ). In addition, Link specifies whether to scale the bounding box parameters that are sent to the server ( and provides a set of optional viewing parameters that can be sent to the server () 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 element or (b) bounding box parameters (this is the default and is used if no element is included in the file). a second format string that is specified in the 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>
Extends:


Field Summary
protected  java.lang.String href
          
protected  java.lang.String hreflang
           
protected  java.lang.String length
           
protected  java.lang.String rel
           
protected  java.lang.String title
           
protected  java.lang.String type
           
 
Constructor Summary
Link(java.lang.String href)
          Value constructor with only mandatory fields
 
Method Summary
 Link clone()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getHref()
           
 java.lang.String getHreflang()
           
 java.lang.String getLength()
           
 java.lang.String getRel()
           
 java.lang.String getTitle()
           
 java.lang.String getType()
           
 int hashCode()
           
 void setHref(java.lang.String value)
           
 void setHreflang(java.lang.String value)
           
 void setLength(java.lang.String value)
           
 void setRel(java.lang.String value)
           
 void setTitle(java.lang.String value)
           
 void setType(java.lang.String value)
           
 Link withHreflang(java.lang.String hreflang)
          fluent setter
 Link withLength(java.lang.String length)
          fluent setter
 Link withRel(java.lang.String rel)
          fluent setter
 Link withTitle(java.lang.String title)
          fluent setter
 Link withType(java.lang.String type)
          fluent setter
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

href

protected java.lang.String href

A URL (either an HTTP address or a local file specification). When the parent of is a NetworkLink, is a KML file. When the parent of is a Model, is a COLLADA file. When the parent of (same fields as ) is an Overlay, 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.


rel

protected java.lang.String rel

type

protected java.lang.String type

hreflang

protected java.lang.String hreflang

title

protected java.lang.String title

length

protected java.lang.String length
Constructor Detail

Link

public Link(java.lang.String href)
Value constructor with only mandatory fields

Parameters:
href - required parameter
Method Detail

getHref

public java.lang.String getHref()
Returns:
possible object is String
See Also:
href

setHref

public void setHref(java.lang.String value)
Parameters:
value - allowed object is String
See Also:
href

getRel

public java.lang.String getRel()
Returns:
possible object is String
See Also:
rel

setRel

public void setRel(java.lang.String value)
Parameters:
value - allowed object is String
See Also:
rel

getType

public java.lang.String getType()
Returns:
possible object is String
See Also:
type

setType

public void setType(java.lang.String value)
Parameters:
value - allowed object is String
See Also:
type

getHreflang

public java.lang.String getHreflang()
Returns:
possible object is String
See Also:
hreflang

setHreflang

public void setHreflang(java.lang.String value)
Parameters:
value - allowed object is String
See Also:
hreflang

getTitle

public java.lang.String getTitle()
Returns:
possible object is String
See Also:
title

setTitle

public void setTitle(java.lang.String value)
Parameters:
value - allowed object is String
See Also:
title

getLength

public java.lang.String getLength()
Returns:
possible object is String
See Also:
length

setLength

public void setLength(java.lang.String value)
Parameters:
value - allowed object is String
See Also:
length

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

withRel

public Link withRel(java.lang.String rel)
fluent setter

Parameters:
rel - required parameter
See Also:
setRel(String)

withType

public Link withType(java.lang.String type)
fluent setter

Parameters:
type - required parameter
See Also:
setType(String)

withHreflang

public Link withHreflang(java.lang.String hreflang)
fluent setter

Parameters:
hreflang - required parameter
See Also:
setHreflang(String)

withTitle

public Link withTitle(java.lang.String title)
fluent setter

Parameters:
title - required parameter
See Also:
setTitle(String)

withLength

public Link withLength(java.lang.String length)
fluent setter

Parameters:
length - required parameter
See Also:
setLength(String)

clone

public Link clone()
Overrides:
clone in class java.lang.Object