genealogy.utils
Class HTMLFormatter

java.lang.Object
  |
  +--genealogy.utils.HTMLFormatter

public class HTMLFormatter
extends java.lang.Object

Format data to HTML.


Field Summary
private  java.util.ResourceBundle dateBundle
           
private  java.util.ResourceBundle eventBundle
           
private  java.lang.StringBuffer result
           
 
Constructor Summary
HTMLFormatter(java.util.Locale loc)
          Create localized HTMLFormatter
 
Method Summary
 java.lang.String formatDate(int dateType, int dateBegin, int dateEnd)
          Format date to printable.
 java.lang.String formatEvent(java.lang.String eventTag)
          Format event-tag printable.
 void formatSNER(java.lang.String element, java.util.Hashtable notes, java.util.Hashtable sources, java.util.Hashtable events, java.util.Hashtable refTexts, int type, int level)
          Make html from data read to RawData.
get the result with getHTML()
 java.lang.String getHTML()
          Get the html made by formatSNER
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

result

private java.lang.StringBuffer result

dateBundle

private java.util.ResourceBundle dateBundle

eventBundle

private java.util.ResourceBundle eventBundle
Constructor Detail

HTMLFormatter

public HTMLFormatter(java.util.Locale loc)
Create localized HTMLFormatter
Parameters:
loc - Locale
Method Detail

getHTML

public java.lang.String getHTML()
Get the html made by formatSNER
Returns:
String the HTML.

formatEvent

public java.lang.String formatEvent(java.lang.String eventTag)
Format event-tag printable. (OCCU ---> Occupation)
Parameters:
eventTag -  
Returns:
String formatted String

formatDate

public java.lang.String formatDate(int dateType,
                                   int dateBegin,
                                   int dateEnd)
Format date to printable.
Parameters:
dateType - type of date
dateBegin - begin of the date
dateEnd - end of the date
Returns:
String localized output of the date

formatSNER

public void formatSNER(java.lang.String element,
                       java.util.Hashtable notes,
                       java.util.Hashtable sources,
                       java.util.Hashtable events,
                       java.util.Hashtable refTexts,
                       int type,
                       int level)
Make html from data read to RawData.
get the result with getHTML()
Parameters:
element - root element where to start (indiId, familyId)
notes - Hashtable where notes are
sources - Hashtable where sources are
events - Hashtable where events are
refTexts - Hashtable where refTexts are
type - type of structure where we are in.
level - level of current recursion