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

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

public class KmlLightDocument
extends Object

A "light" implementation of a KML document

Author:
Bart Hanssens

Field Summary
static String KML_NS
           
 
Constructor Summary
KmlLightDocument()
          Constructor
 
Method Summary
 void addPlacemark(Node name, Node address, Node description, Node timespan)
          Create a
 Element createAddress(String street, String municipality, String zip)
          Create a
Note: it's up to the processing application to convert the address to (GPS) coordinates.
 Element createDescriptionNode(String description)
          Create a element, the description can contain HTML markup
 Element createName(String name)
          Create a , to be used as a label
 Element createTimespan(Date begin, 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 String KML_NS
See Also:
Constant Field Values
Constructor Detail

KmlLightDocument

public KmlLightDocument()
                 throws IOException
Constructor

Throws:
IOException
Method Detail

createName

public Element createName(String name)
Create a , to be used as a label

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

createAddress

public Element createAddress(String street,
                             String municipality,
                             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 Element createDescriptionNode(String description)
Create a element, the description can contain HTML markup

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

createTimespan

public Element createTimespan(Date begin,
                              Date end)
Create a element

Parameters:
begin -
Returns:

addPlacemark

public void addPlacemark(Node name,
                         Node address,
                         Node description,
                         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 IOException
Get the raw KML bytes

Returns:
KML document
Throws:
IOException


Copyright © 2008-2012 FedICT. All Rights Reserved.