A basic element contains 0 or 1 Feature and 0 or 1 NetworkLinkControl:
The element may also include the namespace for any external XML schemas that
are referenced within the file.
The root element of a KML file. This element is required. It follows the xml declaration
at the beginning of the file. The hint attribute is used as a signal to Google Earth
to display the file as celestial data.
unmarshal(java.io.InputStream content)
KML to Java
Similar to the other unmarshal methods
with the exception that it transforms a InputStream into a graph of Java objects.
unmarshal(java.lang.String content)
KML to Java
Similar to the other unmarshal methods
with the exception that it transforms a String into a graph of Java objects.
unmarshalFromKmz(java.io.File file)
KMZ to Java
Similar to the other unmarshal methods
with the exception that it transforms a KMZ-file into a graph of Java objects.
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.
Creates a new instance of NetworkLinkControl and set it to networkLinkControl.
This method is a short version for:
NetworkLinkControl networkLinkControl = new NetworkLinkControl();
this.setNetworkLinkControl(networkLinkControl);
Creates a new instance of NetworkLink and set it to feature.
This method is a short version for:
NetworkLink networkLink = new NetworkLink();
this.setFeature(networkLink);
Creates a new instance of PhotoOverlay and set it to feature.
This method is a short version for:
PhotoOverlay photoOverlay = new PhotoOverlay();
this.setFeature(photoOverlay);
Creates a new instance of ScreenOverlay and set it to feature.
This method is a short version for:
ScreenOverlay screenOverlay = new ScreenOverlay();
this.setFeature(screenOverlay);
Creates a new instance of GroundOverlay and set it to feature.
This method is a short version for:
GroundOverlay groundOverlay = new GroundOverlay();
this.setFeature(groundOverlay);
Creates a new instance of Document and set it to feature.
This method is a short version for:
Document document = new Document();
this.setFeature(document);
Creates a new instance of Placemark and set it to feature.
This method is a short version for:
Placemark placemark = new Placemark();
this.setFeature(placemark);
setKmlSimpleExtension
public void setKmlSimpleExtension(java.util.List<java.lang.Object> kmlSimpleExtension)
Parameters:
kmlSimpleExtension -
See Also:
kmlSimpleExtension
addToKmlSimpleExtension
public KmladdToKmlSimpleExtension(java.lang.Object kmlSimpleExtension)
add a value to the kmlSimpleExtension property collection
Parameters:
kmlSimpleExtension - Objects of the following type are allowed in the list: Object
Returns:
true (as general contract of Collection.add).
setKmlObjectExtension
public void setKmlObjectExtension(java.util.List<AbstractObject> kmlObjectExtension)
Parameters:
kmlObjectExtension -
See Also:
kmlObjectExtension
addToKmlObjectExtension
public KmladdToKmlObjectExtension(AbstractObject kmlObjectExtension)
add a value to the kmlObjectExtension property collection
Parameters:
kmlObjectExtension - Objects of the following type are allowed in the list: AbstractObject
public boolean marshal(java.io.OutputStream outputstream)
throws java.io.FileNotFoundException
Java to KML
The object graph is marshalled to an OutputStream object.
The object is not saved as a zipped .kmz file.
Throws:
java.io.FileNotFoundException
See Also:
marshalKmz(String, Kml...)
marshal
public boolean marshal(java.io.Writer writer)
Java to KML
The object graph is marshalled to a Writer object.
The object is not saved as a zipped .kmz file.
See Also:
marshalKmz(String, Kml...)
marshal
public boolean marshal(org.xml.sax.ContentHandler contenthandler)
Java to KML
The object graph is marshalled to a Contenthandler object.
Useful if marshaller cis needed to generate CDATA blocks.
https://jaxb.dev.java.net/faq/http://code.google.com/p/javaapiforkml/issues/detail?id=7
The object is not saved as a zipped .kmz file.
See Also:
marshalKmz(String, Kml...)
marshal
public boolean marshal()
Java to KML
The object graph is printed to the console.
(Nothing is saved, nor saved. Just printed.)
marshal
public boolean marshal(java.io.File filename)
throws java.io.FileNotFoundException
Java to KML
The object graph is marshalled to a File object.
The object is not saved as a zipped .kmz file.
Throws:
java.io.FileNotFoundException
See Also:
marshalKmz(String, Kml...)
marshalAsKmz
public boolean marshalAsKmz(
Throws:
java.io.IOException
unmarshal
public static Kmlunmarshal(java.io.File file,
boolean validate)
KML to Java
KML given as a file object is transformed into a graph of Java objects.
The boolean value indicates, whether the File object should be validated
automatically during unmarshalling and be checked if the object graph meets
all constraints defined in OGC's KML schema specification.
KML to Java
KML given as a file object is transformed into a graph of Java objects.
Similar to the method:
unmarshal(final File, final boolean)
with the exception that the File object is not validated (boolean is false).
unmarshal
public static Kmlunmarshal(java.lang.String content)
KML to Java
Similar to the other unmarshal methods
with the exception that it transforms a String into a graph of Java objects.
unmarshal
public static Kmlunmarshal(java.io.InputStream content)
KML to Java
Similar to the other unmarshal methods
with the exception that it transforms a InputStream into a graph of Java objects.