org.makumba.commons
Class MakumbaTLDGenerator

java.lang.Object
  extended by org.makumba.commons.MakumbaTLDGenerator

public class MakumbaTLDGenerator
extends Object

This class generates the Makumba TLD files based on the documented TLD XML file.

Version:
$Id: MakumbaTLDGenerator.java 5169 2010-05-20 11:13:55Z rosso_nero $
Author:
Manuel Gay

Constructor Summary
MakumbaTLDGenerator()
           
 
Method Summary
static org.dom4j.Element getReferencedAttributes(HashMap<String,org.dom4j.Element> processedTags, String errorMsg, String tagName, org.dom4j.Element attributeTagContent)
          Retrieves the attribute referenced via "specifiedIn"
static void main(String[] args)
           
static String readFileAsString(String filePath)
           
static void replaceReferencedAttribute(HashMap<String,org.dom4j.Element> processedTags, String errorMsg, String tagName, org.dom4j.Element attributeTagContent)
          Replaces the content of a tag attribute using "specifiedIn" by the actual content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MakumbaTLDGenerator

public MakumbaTLDGenerator()
Method Detail

main

public static void main(String[] args)

replaceReferencedAttribute

public static void replaceReferencedAttribute(HashMap<String,org.dom4j.Element> processedTags,
                                              String errorMsg,
                                              String tagName,
                                              org.dom4j.Element attributeTagContent)
Replaces the content of a tag attribute using "specifiedIn" by the actual content

Parameters:
processedTags - the hashmap of already processed tags
errorMsg - the error message appearing in case the referenced attribute can't be found
tagName - the name of the parent tag
attributeTagContent - the content of the attribute

getReferencedAttributes

public static org.dom4j.Element getReferencedAttributes(HashMap<String,org.dom4j.Element> processedTags,
                                                        String errorMsg,
                                                        String tagName,
                                                        org.dom4j.Element attributeTagContent)
Retrieves the attribute referenced via "specifiedIn"

Parameters:
processedTags - the hashmap of already processed tags
errorMsg - the error message appearing in case the referenced attribute can't be found
tag - the parent tag
tagName - the name of the parent tag
attributeTagContent - the content of the attribute
Returns:
a copy of the attribute Element, enriched with the "inheritedFrom" attribute to track origin

readFileAsString

public static String readFileAsString(String filePath)
                               throws IOException
Throws:
IOException