org.infinispan.tools.doclet.config
Class AbstractConfigHtmlGenerator

java.lang.Object
  extended by org.infinispan.tools.doclet.html.HtmlGenerator
      extended by org.infinispan.tools.doclet.config.AbstractConfigHtmlGenerator
Direct Known Subclasses:
ConfigHtmlGenerator

public abstract class AbstractConfigHtmlGenerator
extends HtmlGenerator


Field Summary
protected static String CONFIG_REF
           
protected static String CONFIG_REF_DESC_ATT
           
protected static String CONFIG_REF_NAME_ATT
           
protected static String CONFIG_REF_PARENT_NAME_ATT
           
protected  com.sun.javadoc.RootDoc rootDoc
           
protected  StringBuilder sb
           
 
Constructor Summary
AbstractConfigHtmlGenerator(String encoding, String title, String bottom, String footer, String header, String metaDescription, List<String> metaKeywords)
           
 
Method Summary
protected  void extractConfigurationDocComments(AnnotatedElement e, Map<String,String> m, ConfigurationDoc cd)
           
protected  Map<String,String> findDescription(AnnotatedElement e)
           
protected  com.sun.javadoc.Doc findDocElement(Class<?> c, String elementName)
           
protected  Field findField(Class<?> clazz, String name)
           
protected  String generateContents()
           
protected  void generateHeaderForConfigurationElement(StringBuilder sb, XMLTreeOutputWalker tw, TreeNode n)
           
protected  void generateTableRowForAttribute(com.sun.xml.xsom.XSAttributeDecl a, StringBuilder sb, Object beanClassInstance)
           
protected  InputStream getAsInputStreamFromClassLoader(String filename)
           
protected abstract  List<Class<?>> getConfigBeans()
           
 com.sun.javadoc.RootDoc getRootDoc()
           
protected abstract  String getRootElementName()
          Name of the root element in the schema
protected abstract  String getSchemaFile()
          Returns name of the schema file.
protected  StringBuilder getStringBuilder()
           
protected  String getTitle()
           
 InputStream lookupFile(String filename)
           
protected  boolean postVisitNode(TreeNode n)
          Callback invoked after visiting the specified node n.
protected  void postXMLTableOfContentsCreate(XSOMSchemaTreeWalker w, XMLTreeOutputWalker tw)
          Invoked after creation of XML tree table of contents for configuration elements in schema
protected  boolean preVisitNode(TreeNode n)
          Callback invoked prior to visiting the specified node n.
protected  void preXMLTableOfContentsCreate(XSOMSchemaTreeWalker sw, XMLTreeOutputWalker tw)
          Invoked prior to creation of XML tree table of contents for configuration elements in schema
 void setRootDoc(com.sun.javadoc.RootDoc rootDoc)
           
 
Methods inherited from class org.infinispan.tools.doclet.html.HtmlGenerator
generateHtml, generateHtml, isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_REF

protected static final String CONFIG_REF
See Also:
Constant Field Values

CONFIG_REF_NAME_ATT

protected static final String CONFIG_REF_NAME_ATT
See Also:
Constant Field Values

CONFIG_REF_PARENT_NAME_ATT

protected static final String CONFIG_REF_PARENT_NAME_ATT
See Also:
Constant Field Values

CONFIG_REF_DESC_ATT

protected static final String CONFIG_REF_DESC_ATT
See Also:
Constant Field Values

rootDoc

protected com.sun.javadoc.RootDoc rootDoc

sb

protected StringBuilder sb
Constructor Detail

AbstractConfigHtmlGenerator

public AbstractConfigHtmlGenerator(String encoding,
                                   String title,
                                   String bottom,
                                   String footer,
                                   String header,
                                   String metaDescription,
                                   List<String> metaKeywords)
Method Detail

getConfigBeans

protected abstract List<Class<?>> getConfigBeans()
                                          throws Exception
Throws:
Exception

getSchemaFile

protected abstract String getSchemaFile()
Returns name of the schema file.

Note that schema file should be placed on a classpath.

Returns:
name of the schema file located on the classpath.

getRootElementName

protected abstract String getRootElementName()
Name of the root element in the schema

Returns:
name of the root element in the schema

preXMLTableOfContentsCreate

protected void preXMLTableOfContentsCreate(XSOMSchemaTreeWalker sw,
                                           XMLTreeOutputWalker tw)
Invoked prior to creation of XML tree table of contents for configuration elements in schema

Parameters:
sw -
tw -

postXMLTableOfContentsCreate

protected void postXMLTableOfContentsCreate(XSOMSchemaTreeWalker w,
                                            XMLTreeOutputWalker tw)
Invoked after creation of XML tree table of contents for configuration elements in schema

Parameters:
sw -
tw -

preVisitNode

protected boolean preVisitNode(TreeNode n)
Callback invoked prior to visiting the specified node n.

Parameters:
n -
Returns:
true if the TreeNode n should be skipped for configuration reference creation, false otherwise

postVisitNode

protected boolean postVisitNode(TreeNode n)
Callback invoked after visiting the specified node n.

Parameters:
n -
Returns:
true if no more elements should be included in configuration reference creation, false otherwise

getTitle

protected String getTitle()

getRootDoc

public com.sun.javadoc.RootDoc getRootDoc()

setRootDoc

public void setRootDoc(com.sun.javadoc.RootDoc rootDoc)

lookupFile

public InputStream lookupFile(String filename)

getAsInputStreamFromClassLoader

protected InputStream getAsInputStreamFromClassLoader(String filename)

getStringBuilder

protected StringBuilder getStringBuilder()

generateContents

protected String generateContents()
Specified by:
generateContents in class HtmlGenerator

generateTableRowForAttribute

protected void generateTableRowForAttribute(com.sun.xml.xsom.XSAttributeDecl a,
                                            StringBuilder sb,
                                            Object beanClassInstance)

generateHeaderForConfigurationElement

protected void generateHeaderForConfigurationElement(StringBuilder sb,
                                                     XMLTreeOutputWalker tw,
                                                     TreeNode n)

findField

protected Field findField(Class<?> clazz,
                          String name)

findDescription

protected Map<String,String> findDescription(AnnotatedElement e)

extractConfigurationDocComments

protected void extractConfigurationDocComments(AnnotatedElement e,
                                               Map<String,String> m,
                                               ConfigurationDoc cd)

findDocElement

protected com.sun.javadoc.Doc findDocElement(Class<?> c,
                                             String elementName)

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.