be.fedict.eid.applet.service.util
Class KmlLightDocument

java.lang.Object
  extended by be.fedict.eid.applet.service.util.KmlLightDocument

public class KmlLightDocument
extends java.lang.Object

A "light" implementation of a KML document

Author:
Bart Hanssens

Field Summary
static java.lang.String KML_NS
           
 
Constructor Summary
KmlLightDocument()
          Constructor
 
Method Summary
 void addPlacemark(org.w3c.dom.Node name, org.w3c.dom.Node address, org.w3c.dom.Node description, org.w3c.dom.Node timespan)
          Create a
 org.w3c.dom.Element createAddress(java.lang.String street, java.lang.String municipality, java.lang.String zip)
          Create a
Note: it's up to the processing application to convert the address to (GPS) coordinates.
 org.w3c.dom.Element createDescriptionNode(java.lang.String description)
          Create a element, the description can contain HTML markup
 org.w3c.dom.Element createName(java.lang.String name)
          Create a , to be used as a label
 org.w3c.dom.Element createTimespan(java.util.Date begin, java.util.Date end)
          Create a element
 byte[] getDocumentAsBytes()
          Get the raw KML bytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KML_NS

public static final java.lang.String KML_NS
See Also:
Constant Field Values
Constructor Detail

KmlLightDocument

public KmlLightDocument()
                 throws java.io.IOException
Constructor

Throws:
java.io.IOException
Method Detail

createName

public org.w3c.dom.Element createName(java.lang.String name)
Create a , to be used as a label

Parameters:
name - name to be used
Returns:
name element

createAddress

public org.w3c.dom.Element createAddress(java.lang.String street,
                                         java.lang.String municipality,
                                         java.lang.String zip)
Create a
Note: it's up to the processing application to convert the address to (GPS) coordinates.

Parameters:
street - street name and number
municipality - muncipality / city
zip - zip code
Returns:
address element

createDescriptionNode

public org.w3c.dom.Element createDescriptionNode(java.lang.String description)
Create a element, the description can contain HTML markup

Parameters:
description - text to be used
Returns:
element containing description

createTimespan

public org.w3c.dom.Element createTimespan(java.util.Date begin,
                                          java.util.Date end)
Create a element

Parameters:
begin -
Returns:

addPlacemark

public void addPlacemark(org.w3c.dom.Node name,
                         org.w3c.dom.Node address,
                         org.w3c.dom.Node description,
                         org.w3c.dom.Node timespan)
Create a

Parameters:
name - the name (title)
address - the address
description - the short description
timespan - day of birth

getDocumentAsBytes

public byte[] getDocumentAsBytes()
                          throws java.io.IOException
Get the raw KML bytes

Returns:
KML document
Throws:
java.io.IOException


Copyright © 2008-2011 FedICT. All Rights Reserved.