de.micromata.opengis.kml.v_2_2_0
Class Feature

java.lang.Object
  extended by de.micromata.opengis.kml.v_2_2_0.AbstractObject
      extended by de.micromata.opengis.kml.v_2_2_0.Feature
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Container, NetworkLink, Overlay, Placemark, Tour

public abstract class Feature
extends AbstractObject
implements java.lang.Cloneable

This is an abstract element and cannot be used directly in a KML file. The following diagram shows how some of a Feature's elements appear in Google Earth.

Syntax:
<!-- abstract element; do not create -->
 <!-- Feature id="ID" -->                <!-- Document,Folder,
                                              NetworkLink,Placemark,
                                              GroundOverlay,PhotoOverlay,ScreenOverlay -->
   <name>...</name>                      <!-- string -->
   <visibility>1</visibility>            <!-- boolean -->
   <open>0</open>                        <!-- boolean -->
   <atom:author>...<atom:author>         <!-- xmlns:atom -->
   <atom:link>...</atom:link>            <!-- xmlns:atom -->
   <address>...</address>                <!-- string -->
   <xal:AddressDetails>...</xal:AddressDetails>  <!-- xmlns:xal -->
<phoneNumber>...</phoneNumber> <!-- string -->
<Snippet maxLines="2">...</Snippet> <!-- string --> <description>...</description> <!-- string --> <AbstractView>...</AbstractView> <!-- Camera or LookAt --> <TimePrimitive>...</TimePrimitive> <!-- TimeStamp or TimeSpan --> <styleUrl>...</styleUrl> <!-- anyURI --> <StyleSelector>...</StyleSelector> <Region>...</Region> <Metadata>...</Metadata> <!-- deprecated in KML 2.2 --> <ExtendedData>...</ExtendedData> <!-- new in KML 2.2 -->
<-- /Feature -->
Extends:


Field Summary
protected  AbstractView abstractView
          
protected  java.lang.String address
          
protected  Author atomAuthor
          
protected  Link atomLink
           (required).
protected  java.lang.String description
          
protected  ExtendedData extendedData
          
protected  java.util.List<AbstractObject> featureObjectExtension
          
protected  java.util.List<java.lang.Object> featureSimpleExtension
          
protected  Metadata metadata
           (deprecated in kml 2.2; use instead)
protected  java.lang.String name
          
protected  java.lang.Boolean open
          
protected  java.lang.String phoneNumber
          
protected  Region region
          
protected  Snippet snippet
          
protected  java.lang.String snippetd
           
protected  java.util.List<StyleSelector> styleSelector
          
protected  java.lang.String styleUrl
          
protected  TimePrimitive timePrimitive
          
protected  java.lang.Boolean visibility
          
protected  AddressDetails xalAddressDetails
          
 
Fields inherited from class de.micromata.opengis.kml.v_2_2_0.AbstractObject
id, objectSimpleExtension, targetId
 
Constructor Summary
Feature()
           
 
Method Summary
 Feature addToFeatureObjectExtension(AbstractObject featureObjectExtension)
          add a value to the featureObjectExtension property collection
 Feature addToFeatureSimpleExtension(java.lang.Object featureSimpleExtension)
          add a value to the featureSimpleExtension property collection
 Feature addToObjectSimpleExtension(java.lang.Object objectSimpleExtension)
          add a value to the objectSimpleExtension property collection
 Feature addToStyleSelector(StyleSelector styleSelector)
          add a value to the styleSelector property collection
 Feature clone()
           
 Style createAndAddStyle()
          Creates a new instance of Style and adds it to styleSelector.
 StyleMap createAndAddStyleMap()
          Creates a new instance of StyleMap and adds it to styleSelector.
 Author createAndSetAtomAuthor()
          Creates a new instance of Author and set it to atomAuthor.
 Link createAndSetAtomLink(java.lang.String href)
          Creates a new instance of Link and set it to atomLink.
 Camera createAndSetCamera()
          Creates a new instance of Camera and set it to abstractView.
 ExtendedData createAndSetExtendedData()
          Creates a new instance of ExtendedData and set it to extendedData.
 LookAt createAndSetLookAt()
          Creates a new instance of LookAt and set it to abstractView.
 Metadata createAndSetMetadata()
          Creates a new instance of Metadata and set it to metadata.
 Region createAndSetRegion()
          Creates a new instance of Region and set it to region.
 Snippet createAndSetSnippet()
          Creates a new instance of Snippet and set it to snippet.
 TimeSpan createAndSetTimeSpan()
          Creates a new instance of TimeSpan and set it to timePrimitive.
 TimeStamp createAndSetTimeStamp()
          Creates a new instance of TimeStamp and set it to timePrimitive.
 AddressDetails createAndSetXalAddressDetails(AddressDetails.Address xalAddress, AddressLines addressLines, AddressDetails.Country country, AdministrativeArea administrativeArea, Locality locality, Thoroughfare thoroughfare)
          Creates a new instance of AddressDetails and set it to xalAddressDetails.
 boolean equals(java.lang.Object obj)
           
 AbstractView getAbstractView()
           
 java.lang.String getAddress()
           
 Author getAtomAuthor()
           
 Link getAtomLink()
           
 java.lang.String getDescription()
           
 ExtendedData getExtendedData()
           
 java.util.List<AbstractObject> getFeatureObjectExtension()
           
 java.util.List<java.lang.Object> getFeatureSimpleExtension()
           
 Metadata getMetadata()
           
 java.lang.String getName()
           
 java.lang.String getPhoneNumber()
           
 Region getRegion()
           
 Snippet getSnippet()
           
 java.lang.String getSnippetd()
           
 java.util.List<StyleSelector> getStyleSelector()
           
 java.lang.String getStyleUrl()
           
 TimePrimitive getTimePrimitive()
           
 AddressDetails getXalAddressDetails()
           
 int hashCode()
           
 java.lang.Boolean isOpen()
           
 java.lang.Boolean isVisibility()
           
 void setAbstractView(AbstractView value)
           
 void setAddress(java.lang.String value)
           
 void setAtomAuthor(Author value)
           
 void setAtomLink(Link value)
           
 void setDescription(java.lang.String value)
           
 void setExtendedData(ExtendedData value)
           
 void setFeatureObjectExtension(java.util.List<AbstractObject> featureObjectExtension)
           
 void setFeatureSimpleExtension(java.util.List<java.lang.Object> featureSimpleExtension)
           
 void setMetadata(Metadata value)
           
 void setName(java.lang.String value)
           
 void setObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
           
 void setOpen(java.lang.Boolean value)
           
 void setPhoneNumber(java.lang.String value)
           
 void setRegion(Region value)
           
 void setSnippet(Snippet value)
           
 void setSnippetd(java.lang.String value)
           
 void setStyleSelector(java.util.List<StyleSelector> styleSelector)
           
 void setStyleUrl(java.lang.String value)
           
 void setTimePrimitive(TimePrimitive value)
           
 void setVisibility(java.lang.Boolean value)
           
 void setXalAddressDetails(AddressDetails value)
           
 Feature withAbstractView(AbstractView abstractView)
          fluent setter
 Feature withAddress(java.lang.String address)
          fluent setter
 Feature withAtomAuthor(Author atomAuthor)
          fluent setter
 Feature withAtomLink(Link atomLink)
          fluent setter
 Feature withDescription(java.lang.String description)
          fluent setter
 Feature withExtendedData(ExtendedData extendedData)
          fluent setter
 Feature withFeatureObjectExtension(java.util.List<AbstractObject> featureObjectExtension)
          fluent setter
 Feature withFeatureSimpleExtension(java.util.List<java.lang.Object> featureSimpleExtension)
          fluent setter
 Feature withId(java.lang.String id)
          fluent setter
 Feature withMetadata(Metadata metadata)
          fluent setter
 Feature withName(java.lang.String name)
          fluent setter
 Feature withObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
          fluent setter
 Feature withOpen(java.lang.Boolean open)
          fluent setter
 Feature withPhoneNumber(java.lang.String phoneNumber)
          fluent setter
 Feature withRegion(Region region)
          fluent setter
 Feature withSnippet(Snippet snippet)
          fluent setter
 Feature withSnippetd(java.lang.String snippetd)
          fluent setter
 Feature withStyleSelector(java.util.List<StyleSelector> styleSelector)
          fluent setter
 Feature withStyleUrl(java.lang.String styleUrl)
          fluent setter
 Feature withTargetId(java.lang.String targetId)
          fluent setter
 Feature withTimePrimitive(TimePrimitive timePrimitive)
          fluent setter
 Feature withVisibility(java.lang.Boolean visibility)
          fluent setter
 Feature withXalAddressDetails(AddressDetails xalAddressDetails)
          fluent setter
 
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

name

protected java.lang.String name

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


visibility

protected java.lang.Boolean visibility

Boolean value. Specifies whether the feature is drawn in the 3D viewer when it is initially loaded. In order for a feature to be visible, the tag of all its ancestors must also be set to 1. In the Google Earth List View, each Feature has a checkbox that allows the user to control visibility of the Feature.


open

protected java.lang.Boolean open

Boolean value. Specifies whether a Document or Folder appears closed or open when first loaded into the Places panel. 0=collapsed (the default), 1=expanded. See also . This element applies only to Document, Folder, and NetworkLink.


atomAuthor

protected Author atomAuthor

KML 2.2 supports new elements for including data about the author and related website in your KML file. This information is displayed in geo search results, both in Earth browsers such as Google Earth, and in other applications such as Google Maps. The ascription elements used in KML are as follows:

The element is the parent element for , which specifies the author of the KML feature.

These elements are defined in the Atom Syndication Format. The complete specification is found at http://atompub.org. (see the sample that follows).

These elements are defined in the Atom Syndication Format. The complete specification is found at http://atompub.org. (see the sample that follows).


atomLink

protected Link atomLink
(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:


address

protected java.lang.String address

A string value representing an unstructured address written as a standard street, city, state address, and/or as a postal code. You can use the

tag to specify the location of a point instead of using latitude and longitude coordinates. (However, if a is provided, it takes precedence over the
.) To find out which locales are supported for this tag in Google Earth, go to the Google Maps Help.


xalAddressDetails

protected AddressDetails xalAddressDetails

A structured address, formatted as xAL, or eXtensible Address Language, an international standard for address formatting. is used by KML for geocoding in Google Maps only. For details, see the Google Maps API documentation. Currently, Google Earth does not use this element; use

instead. Be sure to include the namespace for this element in any KML file that uses it: xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"

A structured address, formatted as xAL, or eXtensible Address Language, an international standard for address formatting. is used by KML for geocoding in Google Maps only. For details, see the Google Maps API documentation. Currently, Google Earth does not use this element; use

instead. Be sure to include the namespace for this element in any KML file that uses it: xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"


phoneNumber

protected java.lang.String phoneNumber


snippet

protected Snippet snippet

A short description of the feature. In Google Earth, this description is displayed in the Places panel under the name of the feature. If a Snippet is not supplied, the first two lines of the are used. In Google Earth, if a Placemark contains both a description and a Snippet, the appears beneath the Placemark in the Places panel, and the appears in the Placemark's description balloon. This tag does not support HTML markup. has a maxLines attribute, an integer that specifies the maximum number of lines to display.


snippetd

protected java.lang.String snippetd

description

protected java.lang.String description

The supported content for the element changed from Google Earth 4.3 to 5.0. Specific information for each version is listed out below, followed by information common to both.

User-supplied content that appears in the description balloon.

User-supplied content that appears in the description balloon. The supported content for the element changed from Google Earth 4.3 to 5.0. Specific information for each version is listed out below, followed by information common to both. Google Earth 5.0 Google Earth 5.0 supports plain text content, as well as full HTML and JavaScript, within description balloons. Contents of the description tag are rendered by the WebKit open source web browser engine, and are displayed as they would be in any WebKit-based browser. General restrictions Links to local files are generally not allowed. This prevents malicious code from damaging your system or accessing your data. Should you wish to allow access to your local filesystem, select Preferences > Allow placemark balloons to access local files and personal data. Links to image files on the local filesystem are always allowed, if contained within an tag. Content that has been compressed into a KMZ file can be accessed, even if on the local filesystem. Cookies are completely disabled, including cookies set or read by content contained within a iFrame. There are no exceptions to this rule. Doctype declarations are ignored.


abstractView

protected AbstractView abstractView

Defines a viewpoint associated with any element derived from Feature. See and .

This is an abstract element and cannot be used directly in a KML file. This element is extended by the and elements.

Syntax:
<!-- abstract element; do not create -->
 <!-- AbstractView -->                   <!-- Camera, LookAt -->                
   <!-- extends Object -->
   <TimePrimitive>...</TimePrimitive>                        <!-- gx:TimeSpan or gx:TimeStamp -->
 <-- /AbstractView -->
Extends:


timePrimitive

protected TimePrimitive timePrimitive

Associates this Feature with a period of time () or a point in time ().

This is an abstract element and cannot be used directly in a KML file. This element is extended by the and elements.

Syntax:
<!-- abstract element; do not create -->
 <!-- TimePrimitive id="ID" -->            <!-- TimeSpan,TimeStamp -->               
   <!-- extends Object -->
 <!-- /TimePrimitive -->
Extends:


styleUrl

protected java.lang.String styleUrl

URL of a