de.micromata.opengis.kml.v_2_2_0
Class Link

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

public class Link
extends BasicLink
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 httpQuery
          
protected  java.util.List<AbstractObject> linkObjectExtension
          
protected  java.util.List<java.lang.Object> linkSimpleExtension
           
protected  double refreshInterval
          
protected  RefreshMode refreshMode
          RefreshMode
protected  double viewBoundScale
          
protected  java.lang.String viewFormat
          
protected  ViewRefreshMode viewRefreshMode
          ViewRefreshMode
protected  double viewRefreshTime
          
 
Fields inherited from class de.micromata.opengis.kml.v_2_2_0.BasicLink
basicLinkObjectExtension, basicLinkSimpleExtension, href
 
Fields inherited from class de.micromata.opengis.kml.v_2_2_0.AbstractObject
id, objectSimpleExtension, targetId
 
Constructor Summary
Link()
           
 
Method Summary
 Link addToBasicLinkObjectExtension(AbstractObject basicLinkObjectExtension)
          add a value to the basicLinkObjectExtension property collection
 Link addToBasicLinkSimpleExtension(java.lang.Object basicLinkSimpleExtension)
          add a value to the basicLinkSimpleExtension property collection
 Link addToLinkObjectExtension(AbstractObject linkObjectExtension)
          add a value to the linkObjectExtension property collection
 Link addToLinkSimpleExtension(java.lang.Object linkSimpleExtension)
          add a value to the linkSimpleExtension property collection
 Link addToObjectSimpleExtension(java.lang.Object objectSimpleExtension)
          add a value to the objectSimpleExtension property collection
 Link clone()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getHttpQuery()
           
 java.util.List<AbstractObject> getLinkObjectExtension()
           
 java.util.List<java.lang.Object> getLinkSimpleExtension()
           
 double getRefreshInterval()
           
 RefreshMode getRefreshMode()
           
 double getViewBoundScale()
           
 java.lang.String getViewFormat()
           
 ViewRefreshMode getViewRefreshMode()
           
 double getViewRefreshTime()
           
 int hashCode()
           
 void setBasicLinkObjectExtension(java.util.List<AbstractObject> basicLinkObjectExtension)
          Sets the value of the basicLinkObjectExtension property Objects of the following type(s) are allowed in the list List.
 void setBasicLinkSimpleExtension(java.util.List<java.lang.Object> basicLinkSimpleExtension)
          Sets the value of the basicLinkSimpleExtension property Objects of the following type(s) are allowed in the list List.
 void setHttpQuery(java.lang.String value)
           
 void setLinkObjectExtension(java.util.List<AbstractObject> linkObjectExtension)
           
 void setLinkSimpleExtension(java.util.List<java.lang.Object> linkSimpleExtension)
           
 void setObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
           
 void setRefreshInterval(double value)
           
 void setRefreshMode(RefreshMode value)
           
 void setViewBoundScale(double value)
           
 void setViewFormat(java.lang.String value)
           
 void setViewRefreshMode(ViewRefreshMode value)
           
 void setViewRefreshTime(double value)
           
 Link withBasicLinkObjectExtension(java.util.List<AbstractObject> basicLinkObjectExtension)
          fluent setter
 Link withBasicLinkSimpleExtension(java.util.List<java.lang.Object> basicLinkSimpleExtension)
          fluent setter
 Link withHref(java.lang.String href)
          fluent setter
 Link withHttpQuery(java.lang.String httpQuery)
          fluent setter
 Link withId(java.lang.String id)
          fluent setter
 Link withLinkObjectExtension(java.util.List<AbstractObject> linkObjectExtension)
          fluent setter
 Link withLinkSimpleExtension(java.util.List<java.lang.Object> linkSimpleExtension)
          fluent setter
 Link withObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
          fluent setter
 Link withRefreshInterval(double refreshInterval)
          fluent setter
 Link withRefreshMode(RefreshMode refreshMode)
          fluent setter
 Link withTargetId(java.lang.String targetId)
          fluent setter
 Link withViewBoundScale(double viewBoundScale)
          fluent setter
 Link withViewFormat(java.lang.String viewFormat)
          fluent setter
 Link withViewRefreshMode(ViewRefreshMode viewRefreshMode)
          fluent setter
 Link withViewRefreshTime(double viewRefreshTime)
          fluent setter
 
Methods inherited from class de.micromata.opengis.kml.v_2_2_0.BasicLink
getBasicLinkObjectExtension, getBasicLinkSimpleExtension, getHref, setHref
 
Methods inherited from class de.micromata.opengis.kml.v_2_2_0.AbstractObject
getId, getObjectSimpleExtension, getTargetId, setId, setTargetId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

refreshMode

protected RefreshMode refreshMode
RefreshMode

onChange, onInterval, onExpire

See Also: See


refreshInterval

protected double refreshInterval

Indicates to refresh the file every n seconds.


viewRefreshMode

protected ViewRefreshMode viewRefreshMode
ViewRefreshMode

never, onRequest, onStop, onRegion

See Also: See


viewRefreshTime

protected double viewRefreshTime

After camera movement stops, specifies the number of seconds to wait before refreshing the view. (See and onStop above.)


viewBoundScale

protected double viewBoundScale

Scales the BBOX parameters before sending them to the server. A value less than 1 specifies to use less than the full view (screen). A value greater than 1 specifies to fetch an area that extends beyond the edges of the current view.


viewFormat

protected java.lang.String viewFormat

BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]

If you specify a of onStop and do not include the tag in the file, the following information is automatically appended to the query string:

If you specify an empty tag, no information is appended to the query string.

Specifies the format of the query string that is appended to the Link's before the file is fetched.(If the specifies a local file, this element is ignored.)

This information matches the Web Map Service (WMS) bounding box specification.

You can also specify a custom set of viewing parameters to add to the query string. If you supply a format string, it is used instead of the BBOX information. If you also want the BBOX information, you need to add those parameters along with the custom parameters.

You can use any of the following parameters in your format string (and Google Earth will substitute the appropriate current value at the time it creates the query string): [lookatLon], [lookatLat] - longitude and latitude of the point that is viewing [lookatRange], [lookatTilt], [lookatHeading] - values used by the element (see descriptions of , , and in ) [lookatTerrainLon], [lookatTerrainLat], [lookatTerrainAlt] - point on the terrain in degrees/meters that is viewing [cameraLon], [cameraLat], [cameraAlt] - degrees/meters of the eyepoint for the camera [horizFov], [vertFov] - horizontal, vertical field of view for the camera [horizPixels], [vertPixels] - size in pixels of the 3D viewer [terrainEnabled] - indicates whether the 3D viewer is showing terrain


httpQuery

protected java.lang.String httpQuery

Appends information to the query string, based on the parameters specified. (Google Earth substitutes the appropriate current value at the time it creates the query string.) The following parameters are supported: [clientVersion] [kmlVersion] [clientName] [language]


linkSimpleExtension

protected java.util.List<java.lang.Object> linkSimpleExtension

linkObjectExtension

protected java.util.List<AbstractObject> linkObjectExtension

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 mechanism is to be used.

Syntax:
<!-- abstract element; do not create -->
 <!-- Object id="ID" targetId="NCName" -->
 <!-- /Object> -->

Constructor Detail

Link

public Link()
Method Detail

getRefreshMode

public RefreshMode getRefreshMode()
Returns:
possible object is RefreshMode
See Also:
refreshMode

setRefreshMode

public void setRefreshMode(RefreshMode value)
Parameters:
value - allowed object is RefreshMode
See Also:
refreshMode

getRefreshInterval

public double getRefreshInterval()
Returns:
possible object is Double
See Also:
refreshInterval

setRefreshInterval

public void setRefreshInterval(double value)
Parameters:
value - allowed object is Double
See Also:
refreshInterval

getViewRefreshMode

public ViewRefreshMode getViewRefreshMode()
Returns:
possible object is ViewRefreshMode
See Also:
viewRefreshMode

setViewRefreshMode

public void setViewRefreshMode(ViewRefreshMode value)
Parameters:
value - allowed object is ViewRefreshMode
See Also:
viewRefreshMode

getViewRefreshTime

public double getViewRefreshTime()
Returns:
possible object is Double
See Also:
viewRefreshTime

setViewRefreshTime

public void setViewRefreshTime(double value)
Parameters:
value - allowed object is Double
See Also:
viewRefreshTime

getViewBoundScale

public double getViewBoundScale()
Returns:
possible object is Double
See Also:
viewBoundScale

setViewBoundScale

public void setViewBoundScale(double value)
Parameters:
value - allowed object is Double
See Also:
viewBoundScale

getViewFormat

public java.lang.String getViewFormat()
Returns:
possible object is String
See Also:
viewFormat

setViewFormat

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

getHttpQuery

public java.lang.String getHttpQuery()
Returns:
possible object is String
See Also:
httpQuery

setHttpQuery

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

getLinkSimpleExtension

public java.util.List<java.lang.Object> getLinkSimpleExtension()
See Also:
linkSimpleExtension

getLinkObjectExtension

public java.util.List<AbstractObject> getLinkObjectExtension()
See Also:
linkObjectExtension

hashCode

public int hashCode()
Overrides:
hashCode in class BasicLink

equals

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

setLinkSimpleExtension

public void setLinkSimpleExtension(java.util.List<java.lang.Object> linkSimpleExtension)
Parameters:
linkSimpleExtension -
See Also:
linkSimpleExtension

addToLinkSimpleExtension

public Link addToLinkSimpleExtension(java.lang.Object linkSimpleExtension)
add a value to the linkSimpleExtension property collection

Parameters:
linkSimpleExtension - Objects of the following type are allowed in the list: Object
Returns:
true (as general contract of Collection.add).

setLinkObjectExtension

public void setLinkObjectExtension(java.util.List<AbstractObject> linkObjectExtension)
Parameters:
linkObjectExtension -
See Also:
linkObjectExtension

addToLinkObjectExtension

public Link addToLinkObjectExtension(AbstractObject linkObjectExtension)
add a value to the linkObjectExtension property collection

Parameters:
linkObjectExtension - Objects of the following type are allowed in the list: AbstractObject
Returns:
true (as general contract of Collection.add).

setObjectSimpleExtension

public void setObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
Overrides:
setObjectSimpleExtension in class BasicLink
See Also:
objectSimpleExtension

addToObjectSimpleExtension

public Link addToObjectSimpleExtension(java.lang.Object objectSimpleExtension)
Description copied from class: AbstractObject
add a value to the objectSimpleExtension property collection

Overrides:
addToObjectSimpleExtension in class BasicLink
Parameters:
objectSimpleExtension - Objects of the following type are allowed in the list: Object
Returns:
true (as general contract of Collection.add).

setBasicLinkSimpleExtension

public void setBasicLinkSimpleExtension(java.util.List<java.lang.Object> basicLinkSimpleExtension)
Description copied from class: BasicLink
Sets the value of the basicLinkSimpleExtension property Objects of the following type(s) are allowed in the list List.

Note:

This method does not make use of the fluent pattern.If you would like to make it fluent, use BasicLink.withBasicLinkSimpleExtension(java.util.List) instead.

Overrides:
setBasicLinkSimpleExtension in class BasicLink
See Also:
basicLinkSimpleExtension

addToBasicLinkSimpleExtension

public Link addToBasicLinkSimpleExtension(java.lang.Object basicLinkSimpleExtension)
Description copied from class: BasicLink
add a value to the basicLinkSimpleExtension property collection

Overrides:
addToBasicLinkSimpleExtension in class BasicLink
Parameters:
basicLinkSimpleExtension - Objects of the following type are allowed in the list: Object
Returns:
true (as general contract of Collection.add).

setBasicLinkObjectExtension

public void setBasicLinkObjectExtension(java.util.List<AbstractObject> basicLinkObjectExtension)
Description copied from class: BasicLink
Sets the value of the basicLinkObjectExtension property Objects of the following type(s) are allowed in the list List.

Note:

This method does not make use of the fluent pattern.If you would like to make it fluent, use BasicLink.withBasicLinkObjectExtension(java.util.List) instead.

Overrides:
setBasicLinkObjectExtension in class BasicLink
See Also:
basicLinkObjectExtension

addToBasicLinkObjectExtension

public Link addToBasicLinkObjectExtension(AbstractObject basicLinkObjectExtension)
Description copied from class: BasicLink
add a value to the basicLinkObjectExtension property collection

Overrides:
addToBasicLinkObjectExtension in class BasicLink
Parameters:
basicLinkObjectExtension - Objects of the following type are allowed in the list: AbstractObject
Returns:
true (as general contract of Collection.add).

withRefreshMode

public Link withRefreshMode(RefreshMode refreshMode)
fluent setter

Parameters:
refreshMode - required parameter
See Also:
setRefreshMode(RefreshMode)

withRefreshInterval

public Link withRefreshInterval(double refreshInterval)
fluent setter

Parameters:
refreshInterval - required parameter
See Also:
setRefreshInterval(double)

withViewRefreshMode

public Link withViewRefreshMode(ViewRefreshMode viewRefreshMode)
fluent setter

Parameters:
viewRefreshMode - required parameter
See Also:
setViewRefreshMode(ViewRefreshMode)

withViewRefreshTime

public Link withViewRefreshTime(double viewRefreshTime)
fluent setter

Parameters:
viewRefreshTime - required parameter
See Also:
setViewRefreshTime(double)

withViewBoundScale

public Link withViewBoundScale(double viewBoundScale)
fluent setter

Parameters:
viewBoundScale - required parameter
See Also:
setViewBoundScale(double)

withViewFormat

public Link withViewFormat(java.lang.String viewFormat)
fluent setter

Parameters:
viewFormat - required parameter
See Also:
setViewFormat(String)

withHttpQuery

public Link withHttpQuery(java.lang.String httpQuery)
fluent setter

Parameters:
httpQuery - required parameter
See Also:
setHttpQuery(String)

withLinkSimpleExtension

public Link withLinkSimpleExtension(java.util.List<java.lang.Object> linkSimpleExtension)
fluent setter

Parameters:
linkSimpleExtension - required parameter
See Also:
#setLinkSimpleExtension(List)

withLinkObjectExtension

public Link withLinkObjectExtension(java.util.List<AbstractObject> linkObjectExtension)
fluent setter

Parameters:
linkObjectExtension - required parameter
See Also:
#setLinkObjectExtension(List)

withObjectSimpleExtension

public Link withObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
Description copied from class: AbstractObject
fluent setter

Overrides:
withObjectSimpleExtension in class BasicLink
Parameters:
objectSimpleExtension - required parameter
See Also:
#setObjectSimpleExtension(List)

withId

public Link withId(java.lang.String id)
Description copied from class: AbstractObject
fluent setter

Overrides:
withId in class BasicLink
Parameters:
id - required parameter
See Also:
AbstractObject.setId(String)

withTargetId

public Link withTargetId(java.lang.String targetId)
Description copied from class: AbstractObject
fluent setter

Overrides:
withTargetId in class BasicLink
Parameters:
targetId - required parameter
See Also:
AbstractObject.setTargetId(String)

withHref

public Link withHref(java.lang.String href)
Description copied from class: BasicLink
fluent setter

Overrides:
withHref in class BasicLink
Parameters:
href - required parameter
See Also:
BasicLink.setHref(String)

withBasicLinkSimpleExtension

public Link withBasicLinkSimpleExtension(java.util.List<java.lang.Object> basicLinkSimpleExtension)
Description copied from class: BasicLink
fluent setter

Overrides:
withBasicLinkSimpleExtension in class BasicLink
Parameters:
basicLinkSimpleExtension - required parameter
See Also:
#setBasicLinkSimpleExtension(List)

withBasicLinkObjectExtension

public Link withBasicLinkObjectExtension(java.util.List<AbstractObject> basicLinkObjectExtension)
Description copied from class: BasicLink
fluent setter

Overrides:
withBasicLinkObjectExtension in class BasicLink
Parameters:
basicLinkObjectExtension - required parameter
See Also:
#setBasicLinkObjectExtension(List)

clone

public Link clone()
Overrides:
clone in class BasicLink