public abstract class DocumentationGeneratorBase extends Object implements NamespaceToPrefixes
SubDocumentType
.Modifier and Type | Class and Description |
---|---|
static class |
DocumentationGeneratorBase.PageInfo
Information about an HTML page generated by a DocumentationGenerator.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
addContentMeta |
static byte |
BOTH_NAVIGATION_BARS |
static byte |
BOTTOM_NAVIGATION_BAR |
protected String |
charset |
protected String |
css |
protected static String |
defaultNamespaceLabel |
static String |
INDEX_PAGE_NAME |
protected static String |
indexPageTitle |
protected static String |
namespacePrefixLabel |
static String |
NAMESPACES_PAGE_NAME |
protected static String |
namespacesPageTitle |
protected static String |
namespaceURILabel |
protected byte |
navigationBars |
protected PrefixPreferences |
prefixPreferences |
static byte |
TOP_NAVIGATION_BAR |
protected PrefixPreferences |
userPrefixPreferences |
EMPTY_PREFIXES, XML_PREFIXES
Constructor and Description |
---|
DocumentationGeneratorBase() |
public static final String INDEX_PAGE_NAME
public static final String NAMESPACES_PAGE_NAME
public static final byte TOP_NAVIGATION_BAR
public static final byte BOTTOM_NAVIGATION_BAR
public static final byte BOTH_NAVIGATION_BARS
protected String css
protected boolean addContentMeta
protected String charset
protected PrefixPreferences userPrefixPreferences
protected PrefixPreferences prefixPreferences
protected byte navigationBars
protected static final String indexPageTitle
protected static final String namespacesPageTitle
protected static final String namespacePrefixLabel
protected static final String namespaceURILabel
protected static final String defaultNamespaceLabel
public void setCSS(String css)
public String getCSS()
public void setContentMetaAdded(boolean add)
public boolean isContentMetaAdded()
public void setCharset(String charset)
public String getCharset()
public void setPrefixPreferences(PrefixPreferences map)
public PrefixPreferences getPrefixPreferences()
public void setNavigationBars(int bars)
public int getNavigationBars()
public abstract void initSubDocumentType(SubDocumentType subDocType)
public abstract SubDocumentType getSubDocumentType()
public abstract void generateAll(File outDir) throws IOException
IOException
public abstract void generateIndexPage(DocumentationGeneratorBase.PageInfo info)
public abstract void generateNamespacesPage(DocumentationGeneratorBase.PageInfo info)
public abstract ElementType getElementType(String pageName)
public abstract boolean generateElementPage(ElementType elementType, DocumentationGeneratorBase.PageInfo info)
protected void generateNamespacesPage(PrefixEntry[] extraPrefixes, DocumentationGeneratorBase.PageInfo info)
protected void appendPageStart(StringBuilder page)
protected void appendPageMiddle(boolean index, boolean namespaces, StringBuilder page)
protected void appendPageEnd(boolean index, boolean namespaces, StringBuilder page)
protected void appendNavigationBar(boolean index, boolean namespaces, boolean bottom, StringBuilder page)
public String[] namespaceToPrefixes(Namespace namespace)
NamespaceToPrefixes
The returned list may contain the empty string which means that specified namespace is the default namespace.
Note:In principle, this method is not invoked for
the absent namespace ("") and for
"http://www.w3.org/XML/1998/namespace".
However, it should return NamespaceToPrefixes.EMPTY_PREFIXES
for
the absent namespace and NamespaceToPrefixes.XML_PREFIXES
for
the "http://www.w3.org/XML/1998/namespace" namespace.
namespaceToPrefixes
in interface NamespaceToPrefixes
namespace
- the namespace represented by one or several prefixesnull
if specified namespace is not represented by any
prefix.