public class DocGeneratorAPI
extends java.lang.Object
Constructor and Description |
---|
DocGeneratorAPI()
Create the API and don't reset the configuration.
|
DocGeneratorAPI(boolean reset)
Create the API.
|
Modifier and Type | Method and Description |
---|---|
void |
addAlternateTitle(XMLArticle article,
java.lang.String text,
boolean keepCase,
boolean inDictionnary)
Adds an alternate title to an article.
|
XMLAnchor |
addAnchor(XMLArticle article,
ParagraphElementParent parent,
java.lang.String anchorID,
java.lang.String text)
Add an anchor.
|
XMLAnchor |
addAnchor(XMLArticle article,
ParagraphElementParent parent,
java.lang.String anchorID,
java.lang.String text,
int type)
Add an anchor.
|
XMLAnchor |
addAnchor(XMLArticle article,
java.lang.String anchorID,
java.lang.String text)
Add an anchor at the end of an article.
|
XMLAnchor |
addAnchor(XMLArticle article,
java.lang.String anchorID,
java.lang.String text,
int type)
Add an anchor at the end of an article.
|
XMLAnchor |
addAnchor(XMLTextStyle textStyle,
java.lang.String anchorID,
java.lang.String text) |
void |
addBreak(ParagraphElementParent parent)
Add a break.
|
void |
addBreak(XMLArticle article)
Add a break, at the end of an article.
|
DefaultMenuItem |
addDefaultMenuItem(XMLMenu menu,
short type)
Add a default menu item.
|
DefaultMenuItem |
addDefaultMenuItem(XMLMenu menu,
short type,
java.lang.String desc)
Add a default menu item.
|
void |
addEmptyLine(ParagraphElementParent parent)
Add an empty line.
|
void |
addEmptyLine(XMLArticle article)
Add an empty line, at the end of an article.
|
XMLExternalLink |
addExternalLink(ParagraphElementParent parent,
java.net.URL url,
java.lang.String desc)
Add an external link.
|
XMLExternalLink |
addExternalLink(XMLArticle article,
java.net.URL url,
java.lang.String desc)
Add an external link.
|
ExternalMenuItem |
addExternalMenuItem(XMLMenu menu,
java.lang.String desc,
java.net.URL url)
Add an external menu item to a menu.
|
ExternalMenuItem |
addExternalMenuItem(XMLMenu menu,
java.net.URL url,
java.lang.String desc)
Add an external menu item to a menu.
|
DefaultMenuItem |
addGlossaryMenuItem(XMLMenu menu,
java.lang.String desc)
Add an glossary menu item to a menu.
|
XMLImage |
addImage(XMLArticle article,
java.awt.image.BufferedImage bimg,
boolean br)
Add an image at the end of an article.
|
XMLImage |
addImage(XMLArticle article,
java.io.File imageFile,
boolean br)
Add an image at the end of an article.
|
XMLImage |
addImage(XMLArticle article,
java.lang.String imageID,
boolean br)
Add an image at the end of an article.
|
XMLImage |
addImage(XMLArticle article,
java.net.URL url,
boolean br)
Add an image at the end of an article.
|
XMLImage |
addImage(org.docgene.model.globals.XMLRootElement element,
ParagraphElementParent parent,
java.awt.image.BufferedImage bimg,
boolean br)
Add an image.
|
XMLImage |
addImage(org.docgene.model.globals.XMLRootElement element,
ParagraphElementParent parent,
java.io.File imageFile,
boolean br)
Add an image.
|
XMLImage |
addImage(org.docgene.model.globals.XMLRootElement element,
ParagraphElementParent parent,
java.lang.String imageID,
boolean br)
Add an image.
|
XMLImage |
addImage(org.docgene.model.globals.XMLRootElement element,
ParagraphElementParent parent,
java.net.URL url,
boolean br)
Add an image.
|
InternalMenuItem |
addInternalMenuItem(XMLMenu menu,
java.lang.String refID,
java.lang.String desc)
Add an internal menu item to a menu.
|
InternalMenuItem |
addInternalMenuItem(XMLMenu menu,
XMLParentArticle article)
Add an internal menu item to a menu.
|
InternalMenuItem |
addInternalMenuItem(XMLMenu menu,
XMLParentArticle article,
java.lang.String desc)
Add an internal menu item to a menu.
|
XMLList |
addList(ParagraphElementParent parent,
boolean isUL)
Add a list.
|
XMLList |
addList(XMLArticle article,
boolean isUL)
Add a list at the end of an article.
|
XMLListItem |
addListItem(XMLList list)
Add a list item to a list.
|
XMLListItem |
addListItem(XMLList list,
java.lang.String sentence)
Add a list item to a list.
|
XMLListItem |
addListItem(XMLList list,
java.lang.String sentence,
SentenceStyle style)
Add a list item to a list.
|
void |
addMultilineSentence(ParagraphElementParent parent,
java.lang.String text)
Add a multiline sentence.
|
void |
addMultilineSentence(ParagraphElementParent parent,
java.lang.String text,
int type)
Add a multiline sentence.
|
void |
addMultilineSentence(ParagraphElementParent parent,
java.lang.String text,
SentenceStyle style)
Add a multiline sentence, setting also its style.
|
void |
addMultilineSentence(XMLArticle article,
java.lang.String text)
Add a multiline sentence, at the end of an article.
|
void |
addMultilineSentence(XMLArticle article,
java.lang.String text,
SentenceStyle style)
Add a multiline sentence, setting also its style, at the end of an article.
|
XMLParagraph |
addParagraph(XMLParent parent)
Add a paragraph.
|
XMLReference |
addReference(XMLArticle article,
AnchorElement anchor)
Add a reference at the end of an article.
|
XMLReference |
addReference(XMLArticle article,
AnchorElement anchor,
java.lang.String desc)
Add a reference at the end of an article.
|
XMLReference |
addReference(XMLArticle article,
ParagraphElementParent parent,
AnchorElement anchor)
Add a reference.
|
XMLReference |
addReference(XMLArticle article,
ParagraphElementParent parent,
AnchorElement anchor,
java.lang.String desc)
Add a reference.
|
XMLReference |
addReference(XMLArticle article,
ParagraphElementParent parent,
java.lang.String refID)
Add a reference.
|
XMLReference |
addReference(XMLArticle article,
ParagraphElementParent parent,
java.lang.String refID,
java.lang.String desc)
Add a reference.
|
XMLReference |
addReference(XMLArticle article,
ParagraphElementParent parent,
XMLParentArticle refArticle)
Add a reference.
|
XMLReference |
addReference(XMLArticle article,
ParagraphElementParent parent,
XMLParentArticle refArticle,
java.lang.String desc)
Add a reference.
|
XMLReference |
addReference(XMLArticle article,
java.lang.String refID)
Add a reference at the end of an article.
|
XMLReference |
addReference(XMLArticle article,
java.lang.String refID,
java.lang.String desc)
Add a reference at the end of an article.
|
XMLReference |
addReference(XMLArticle article,
XMLParentArticle refArticle)
Add a reference at the end of an article.
|
XMLReference |
addReference(XMLArticle article,
XMLParentArticle refArticle,
java.lang.String desc)
Add a reference at the end of an article.
|
void |
addSeeAlso(XMLArticle article,
java.lang.String ref)
Add a seeAlso for the article.
|
void |
addSeeAlso(XMLArticle article,
java.lang.String ref,
java.lang.String desc)
Add a seeAlso for the article.
|
void |
addSeeAlso(XMLArticle article,
XMLArticle seeAlsoArticle)
Add a seeAlso for the article.
|
void |
addSeeAlso(XMLArticle article,
XMLArticle seeAlsoArticle,
java.lang.String desc)
Add a seeAlso for the article.
|
XMLSentence |
addSentence(ParagraphElementParent parent,
java.lang.String text)
Add a sentence.
|
XMLSentence |
addSentence(ParagraphElementParent parent,
java.lang.String text,
int type)
Add a sentence.
|
XMLSentence |
addSentence(ParagraphElementParent parent,
java.lang.String text,
int type,
int size)
Add a sentence.
|
XMLSentence |
addSentence(ParagraphElementParent parent,
java.lang.String text,
SentenceStyle style)
Add a sentence, setting also its style.
|
XMLSentence |
addSentence(XMLArticle article,
java.lang.String text)
Add a sentence, at the end of an article.
|
XMLSentence |
addSentence(XMLArticle article,
java.lang.String text,
int type)
Add a sentence.
|
XMLSentence |
addSentence(XMLArticle article,
java.lang.String text,
int type,
int size)
Add a sentence.
|
XMLSentence |
addSentence(XMLArticle article,
java.lang.String text,
SentenceStyle style)
Add a sentence, setting also its style, at the end of an article.
|
XMLSentence |
addSentence(XMLTextStyle textStyle,
java.lang.String text)
Add a sentence in a text style.
|
void |
addTab(ParagraphElementParent parent)
Add an tabulation.
|
void |
addTab(XMLArticle article)
Add an tabulation.
|
XMLTable |
addTable(XMLArticle article)
Add a not sortable table at the end of an article.
|
XMLTable |
addTable(XMLArticle article,
boolean isSortable)
Add a table at the end of an article.
|
XMLTable |
addTable(XMLArticle article,
ParagraphElementParent parent,
boolean isSortable)
Add a table.
|
XMLTableCell |
addTableCell(XMLTableRow trow)
Add a table cell.
|
XMLTableCell |
addTableCell(XMLTableRow trow,
java.lang.String sentence)
Add a table cell.
|
XMLTableCell |
addTableCell(XMLTableRow trow,
java.lang.String sentence,
SentenceStyle style)
Add a table cell.
|
XMLTableColumn |
addTableColumn(XMLTable table)
Add a table column.
|
XMLTableColumn |
addTableColumn(XMLTable table,
java.lang.String title)
Add a table column.
|
XMLTableColumn |
addTableColumn(XMLTable table,
java.lang.String title,
SentenceStyle style)
Add a table column.
|
XMLTableRow |
addTableRow(XMLTable table)
Add a table row.
|
XMLSizedTableRow |
addTableRow(XMLTable table,
boolean relWidths,
int... widths)
Add a table row with specified widths.
|
XMLTextStyle |
addTextStyle(ParagraphElementParent parent,
SentenceStyle style)
Add a text style.
|
XMLTextStyle |
addTextStyle(XMLArticle article,
SentenceStyle style)
Add a text style, at the end of an article.
|
XMLTitle |
addTitle(XMLArticle article,
int level,
java.lang.String title)
Add a title for the article.
|
XMLTitle |
addTitle(XMLArticle article,
int level,
java.lang.String title,
boolean keepCase)
Add a title for the article.
|
XMLTitle |
addTitle(XMLArticle article,
int level,
java.lang.String title,
boolean keepCase,
boolean isSearchable)
Add a title for the article.
|
XMLTitle |
addTitle(XMLArticle article,
ParagraphElementParent parent,
int level,
java.lang.String title,
boolean keepCase)
Add a title for the article.
|
XMLTitle |
addTitle(XMLArticle article,
ParagraphElementParent parent,
int level,
java.lang.String title,
boolean keepCase,
boolean isSearchable)
Add a title for the article.
|
XMLTitle |
addTitle(XMLArticle article,
ParagraphElementParent parent,
java.lang.String title)
Add a title for the article, at level 1.
|
XMLTitle |
addTitle(XMLArticle article,
java.lang.String title)
Add a title for the article, at the default level (1).
|
XMLMenu |
cleanGlobalLeftMenu()
Merge the left menu on the index and the articles and clean its default content.
|
void |
clear()
Clear the content of the generator.
|
XMLArticle |
createArticle(java.lang.String desc)
Creates an article.
|
XMLArticle |
createArticle(java.lang.String desc,
boolean hasTOC,
boolean keepCase)
Creates an article.
|
XMLArticle |
createArticle(java.lang.String desc,
boolean hasTOC,
boolean keepCase,
java.lang.String... categories)
Creates an article.
|
XMLArticle |
createArticle(java.lang.String desc,
java.lang.String... categories)
Creates an article, belonging to one or several categories.
|
ArticleCategory |
createCategory(java.lang.String id)
Creates a category.
|
ArticleCategory |
createCategory(java.lang.String id,
java.lang.String desc)
Creates a category.
|
XMLFooter |
createFooter()
Create the wiki footer.
|
XMLHeader |
createHeader()
Create the wiki header.
|
ArticlesModel |
createModel()
Creates the model.
|
OpaqueArticle |
createOpaqueArticle(java.lang.String desc)
Creates an opaque article.
|
OpaqueArticle |
createOpaqueArticle(java.lang.String desc,
boolean keepCase)
Creates an opaque article, belonging to one or several categories.
|
OpaqueArticle |
createOpaqueArticle(java.lang.String desc,
boolean keepCase,
java.lang.String... categories)
Creates an opaque article, belonging to one or several categories.
|
XMLParentArticle |
getArticle(java.lang.String desc)
Return the article of a specified description.
|
Configuration |
getConfiguration()
Return the configuration.
|
org.docgene.model.globals.CustomSearchCategories |
getCustomSearchCategories()
Return the custom search categories.
|
java.lang.String |
getDefaultFontFace()
Return the default font face for sentences.
|
int |
getDefaultFontSize()
Return the default font size for sentences.
|
java.util.List<org.mdiutil.xml.ResolverSAXHandler.ExceptionResult> |
getGenerationExceptions()
Return the parsing or consistency exceptions.
|
XMLIndex |
getIndex()
Return the index.
|
AbstractParagraph |
getLastParagraph(XMLParent parent)
Return the ladt paragraph of an elemen, or creates one paragraph if it does not exist.
|
org.docgene.model.globals.ArticlesMenus |
getMenus()
Return the articles menus.
|
ArticlesModel |
getModel()
Return the model.
|
OpaqueArticle |
getOpaqueArticle(java.lang.String desc)
Return the opaque article of a specified description.
|
ParagraphElementParent |
getOrCreateLastParagraphParent(XMLArticle article)
Return the last paragraph parent for an article, or create one if it does not exist.
|
java.io.File |
getOutputDirectory()
Return the output directory.
|
XMLArticle |
getXMLArticle(java.lang.String desc)
Return the article of a specified description.
|
boolean |
hasGenerationExceptions()
Return true if the resolving triggered parsing or consistency exceptions.
|
XMLArticle |
importArticle(java.io.File file)
Import an article and add this article to the model.
|
XMLArticle |
importArticle(java.net.URL url)
Import an article and add this article to the model.
|
boolean |
importImageDefinition(java.io.File file)
Import an Image definition XML file to the model.
|
boolean |
importImageDefinition(java.net.URL url)
Import an Image definition XML url to the model.
|
XMLArticle |
includeArticle(XMLArticle parentArticle,
java.io.File file,
boolean keepLevels)
Include an article in another parent article.
|
XMLArticle |
includeArticle(XMLArticle parentArticle,
java.net.URL url,
boolean keepLevels)
Include an article in another parent article.
|
void |
includeArticle(XMLArticle parentArticle,
XMLArticle includedArticle,
boolean keepLevels)
Import an article and add this article to the model.
|
void |
resetConfiguration()
Reset the configuration.
|
boolean |
setCategories(XMLArticle article,
java.lang.String... categories)
Set the categories for an article.
|
void |
setCustomStyles(StyledElement element,
java.lang.String styleClass,
java.lang.String style)
Set the custom styles for an element.
|
void |
setDefaultFontFace(java.lang.String fontFace)
Set the default font face for sentences.
|
void |
setDefaultFontSize(int size)
Set the default font size for sentences.
|
boolean |
setFooter(java.lang.String content)
Set the footer of the wiki.
|
void |
setFullTextSearch(boolean isEnabled,
int compressionLevel)
Configure the full text search.
|
boolean |
setHeader(java.lang.String content)
Set the header of the wiki.
|
void |
setIndexGenerationType(char type)
Set the index generation type.
|
boolean |
setLocale(java.lang.String locale)
Set the localization.
|
void |
setMeta(XMLArticle article,
java.lang.String meta)
Set the meta of an article.
|
boolean |
setOutputDirectory(java.io.File outputDir)
Set the output directory.
|
boolean |
setOutputDirectory(java.net.URL outputDir)
Set the output directory.
|
boolean |
setOutputType(java.lang.String outputType)
Set the output type of the wiki.
|
void |
setResourcesGenerationType(char type)
Set the resources generation type.
|
void |
setSearch(short searchType)
Set the search type.
|
XMLTableHeader |
setTableHeader(XMLTable table,
boolean isVertical)
Set a table header.
|
void |
showGenerationExceptions()
Show the parsing or consistency exceptions.
|
void |
writeContent()
Write the wiki content.
|
void |
writeContent(boolean clean)
Write the wiki content.
|
public DocGeneratorAPI()
public DocGeneratorAPI(boolean reset)
reset
- true if the configuration must be resetpublic void clear()
public Configuration getConfiguration()
public void resetConfiguration()
public org.docgene.model.globals.CustomSearchCategories getCustomSearchCategories()
public ArticlesModel createModel()
public void setIndexGenerationType(char type)
type
- the index generation typeFileGenerationType
public void setResourcesGenerationType(char type)
type
- the resources generation typeFileGenerationType
public ArticleCategory createCategory(java.lang.String id)
id
- the category idpublic ArticleCategory createCategory(java.lang.String id, java.lang.String desc)
id
- the category iddesc
- the category descriptionpublic ArticlesModel getModel()
public void setDefaultFontSize(int size)
size
- the font sizepublic int getDefaultFontSize()
public void setDefaultFontFace(java.lang.String fontFace)
fontFace
- the font facepublic java.lang.String getDefaultFontFace()
public XMLIndex getIndex()
public org.docgene.model.globals.ArticlesMenus getMenus()
public XMLMenu cleanGlobalLeftMenu()
public DefaultMenuItem addDefaultMenuItem(XMLMenu menu, short type) throws DocGeneratorAPIException
menu
- the menutype
- the item typeDocGeneratorAPIException
public DefaultMenuItem addDefaultMenuItem(XMLMenu menu, short type, java.lang.String desc) throws DocGeneratorAPIException
menu
- the menutype
- the item typedesc
- the item description (may be null)DocGeneratorAPIException
public InternalMenuItem addInternalMenuItem(XMLMenu menu, java.lang.String refID, java.lang.String desc)
menu
- the menurefID
- the id of the referenced elementdesc
- the description of the menu itempublic InternalMenuItem addInternalMenuItem(XMLMenu menu, XMLParentArticle article)
menu
- the menuarticle
- the referenced articlepublic InternalMenuItem addInternalMenuItem(XMLMenu menu, XMLParentArticle article, java.lang.String desc)
menu
- the menuarticle
- the referenced articledesc
- the description of the menu itempublic ExternalMenuItem addExternalMenuItem(XMLMenu menu, java.lang.String desc, java.net.URL url)
menu
- the menudesc
- the item descriptionurl
- the item urlpublic DefaultMenuItem addGlossaryMenuItem(XMLMenu menu, java.lang.String desc)
menu
- the menudesc
- the description of the menu itempublic ExternalMenuItem addExternalMenuItem(XMLMenu menu, java.net.URL url, java.lang.String desc)
menu
- the menuurl
- the urldesc
- the description of the menu itempublic XMLHeader createHeader()
public boolean setHeader(java.lang.String content)
content
- the header contentpublic boolean setFooter(java.lang.String content)
content
- the footer contentpublic XMLFooter createFooter()
public XMLArticle createArticle(java.lang.String desc)
desc
- the article descriptionpublic XMLParentArticle getArticle(java.lang.String desc)
desc
- the article descriptionpublic XMLArticle getXMLArticle(java.lang.String desc)
desc
- the article descriptionpublic OpaqueArticle getOpaqueArticle(java.lang.String desc)
desc
- the article descriptionpublic XMLArticle createArticle(java.lang.String desc, java.lang.String... categories)
desc
- the article descriptioncategories
- the categories on which the article belongpublic XMLArticle createArticle(java.lang.String desc, boolean hasTOC, boolean keepCase)
desc
- the article descriptionhasTOC
- true if the article has a table of contentskeepCase
- true if the title of the article case is keptpublic boolean importImageDefinition(java.net.URL url) throws DocGeneratorAPIException
url
- the Image definition XML URLDocGeneratorAPIException
public boolean importImageDefinition(java.io.File file) throws DocGeneratorAPIException
file
- the Image definition XML fileDocGeneratorAPIException
public XMLArticle importArticle(java.net.URL url) throws DocGeneratorAPIException
url
- the article urlDocGeneratorAPIException
- if the parsing thhrows exceptionspublic XMLArticle importArticle(java.io.File file) throws DocGeneratorAPIException
file
- the article fileDocGeneratorAPIException
- if the parsing thhrows exceptionspublic XMLArticle includeArticle(XMLArticle parentArticle, java.net.URL url, boolean keepLevels) throws DocGeneratorAPIException
parentArticle
- the article in which to include the other articleurl
- the article urlkeepLevels
- true if the numebring of the included afrticle must be keptDocGeneratorAPIException
- if the parsing thhrows exceptionspublic XMLArticle includeArticle(XMLArticle parentArticle, java.io.File file, boolean keepLevels) throws DocGeneratorAPIException
parentArticle
- the article in which to include the other articlefile
- the article filekeepLevels
- true if the numebring of the included afrticle must be keptDocGeneratorAPIException
- if the parsing thhrows exceptionspublic void includeArticle(XMLArticle parentArticle, XMLArticle includedArticle, boolean keepLevels)
parentArticle
- the article in which to include the articleincludedArticle
- the included articlekeepLevels
- true if the numebring of the included afrticle must be keptpublic XMLArticle createArticle(java.lang.String desc, boolean hasTOC, boolean keepCase, java.lang.String... categories)
desc
- the article descriptionhasTOC
- true if the article has a table of contentskeepCase
- true if the title of the article case is keptcategories
- the categories on which the article belongpublic OpaqueArticle createOpaqueArticle(java.lang.String desc)
desc
- the article descriptionpublic OpaqueArticle createOpaqueArticle(java.lang.String desc, boolean keepCase)
desc
- the article descriptionkeepCase
- true if the title of the article case is keptpublic OpaqueArticle createOpaqueArticle(java.lang.String desc, boolean keepCase, java.lang.String... categories)
desc
- the article descriptionkeepCase
- true if the title of the article case is keptcategories
- the categories on which the article belongpublic void addAlternateTitle(XMLArticle article, java.lang.String text, boolean keepCase, boolean inDictionnary)
article
- the articletext
- the alternate title textkeepCase
- true if the alternate title case is keptinDictionnary
- true if the alternate title must be added in the dictionnarypublic void setMeta(XMLArticle article, java.lang.String meta)
article
- the articlemeta
- the metapublic XMLTitle addTitle(XMLArticle article, ParagraphElementParent parent, java.lang.String title)
article
- the articleparent
- the paragraph parenttitle
- the title textpublic XMLTitle addTitle(XMLArticle article, java.lang.String title)
article
- the articletitle
- the title textpublic XMLTitle addTitle(XMLArticle article, int level, java.lang.String title)
article
- the articlelevel
- the title leveltitle
- the title textpublic XMLTitle addTitle(XMLArticle article, ParagraphElementParent parent, int level, java.lang.String title, boolean keepCase)
article
- the articleparent
- the paragraph parentlevel
- the title leveltitle
- the title textkeepCase
- true if the case should be keptpublic XMLTitle addTitle(XMLArticle article, int level, java.lang.String title, boolean keepCase)
article
- the articlelevel
- the title leveltitle
- the title textkeepCase
- true if the case should be keptpublic XMLTitle addTitle(XMLArticle article, int level, java.lang.String title, boolean keepCase, boolean isSearchable)
article
- the articlelevel
- the title leveltitle
- the title textkeepCase
- true if the case should be keptisSearchable
- true if the title is searchablepublic XMLTitle addTitle(XMLArticle article, ParagraphElementParent parent, int level, java.lang.String title, boolean keepCase, boolean isSearchable)
article
- the articleparent
- the paragraph parentlevel
- the title leveltitle
- the title textkeepCase
- true if the case should be keptisSearchable
- true if the title is searchablepublic void addSeeAlso(XMLArticle article, java.lang.String ref)
article
- the articleref
- the see also referencepublic void addSeeAlso(XMLArticle article, java.lang.String ref, java.lang.String desc)
article
- the articleref
- the see also referencedesc
- the seeAlso descriptionpublic void addSeeAlso(XMLArticle article, XMLArticle seeAlsoArticle)
article
- the articleseeAlsoArticle
- the see also articlepublic void addSeeAlso(XMLArticle article, XMLArticle seeAlsoArticle, java.lang.String desc)
article
- the articleseeAlsoArticle
- the see also articledesc
- the seeAlso descriptionpublic boolean setCategories(XMLArticle article, java.lang.String... categories)
article
- the articlecategories
- the categoriespublic XMLParagraph addParagraph(XMLParent parent)
parent
- the parentpublic AbstractParagraph getLastParagraph(XMLParent parent)
parent
- the parentpublic ParagraphElementParent getOrCreateLastParagraphParent(XMLArticle article)
article
- the articlepublic void addBreak(ParagraphElementParent parent)
parent
- the parentpublic void addBreak(XMLArticle article)
article
- the articlepublic void addEmptyLine(ParagraphElementParent parent)
parent
- the parentpublic void addEmptyLine(XMLArticle article)
article
- the articlepublic void addTab(ParagraphElementParent parent)
parent
- the parentpublic void addTab(XMLArticle article)
article
- the articlepublic XMLSentence addSentence(XMLArticle article, java.lang.String text)
article
- the articletext
- the sentence textpublic XMLSentence addSentence(ParagraphElementParent parent, java.lang.String text)
parent
- the parenttext
- the sentence textpublic XMLSentence addSentence(ParagraphElementParent parent, java.lang.String text, int type)
parent
- the parenttext
- the sentence texttype
- the sentence typepublic XMLSentence addSentence(XMLArticle article, java.lang.String text, SentenceStyle style)
article
- the articletext
- the sentence textstyle
- the sentence stylepublic XMLSentence addSentence(ParagraphElementParent parent, java.lang.String text, SentenceStyle style)
parent
- the parenttext
- the sentence textstyle
- the sentence stylepublic void addMultilineSentence(XMLArticle article, java.lang.String text)
article
- the articletext
- the sentence textpublic void addMultilineSentence(ParagraphElementParent parent, java.lang.String text)
parent
- the parenttext
- the sentence textpublic void addMultilineSentence(ParagraphElementParent parent, java.lang.String text, int type)
parent
- the parenttext
- the sentence texttype
- the sentence typepublic void addMultilineSentence(XMLArticle article, java.lang.String text, SentenceStyle style)
article
- the articletext
- the sentence textstyle
- the sentence stylepublic void addMultilineSentence(ParagraphElementParent parent, java.lang.String text, SentenceStyle style)
parent
- the parenttext
- the sentence textstyle
- the sentence stylepublic XMLAnchor addAnchor(XMLTextStyle textStyle, java.lang.String anchorID, java.lang.String text)
public XMLTextStyle addTextStyle(XMLArticle article, SentenceStyle style)
article
- the articlestyle
- the sentence stylepublic XMLSentence addSentence(XMLTextStyle textStyle, java.lang.String text)
textStyle
- the text styletext
- the textpublic XMLTextStyle addTextStyle(ParagraphElementParent parent, SentenceStyle style)
parent
- the parentstyle
- the sentence stylepublic XMLAnchor addAnchor(XMLArticle article, ParagraphElementParent parent, java.lang.String anchorID, java.lang.String text)
article
- the articleparent
- the parentanchorID
- the anchor IDtext
- the anchor textpublic XMLAnchor addAnchor(XMLArticle article, ParagraphElementParent parent, java.lang.String anchorID, java.lang.String text, int type)
article
- the articleparent
- the parentanchorID
- the anchor IDtext
- the anchor texttype
- the anchor text typepublic XMLAnchor addAnchor(XMLArticle article, java.lang.String anchorID, java.lang.String text)
article
- the articleanchorID
- the anchor IDtext
- the anchor textpublic XMLAnchor addAnchor(XMLArticle article, java.lang.String anchorID, java.lang.String text, int type)
article
- the articleanchorID
- the anchor IDtext
- the anchor texttype
- the anchor text typepublic XMLList addList(XMLArticle article, boolean isUL)
article
- the articleisUL
- true for a "ul" listpublic XMLList addList(ParagraphElementParent parent, boolean isUL)
parent
- the parentisUL
- true for a "ul" listpublic XMLListItem addListItem(XMLList list)
list
- the listpublic XMLListItem addListItem(XMLList list, java.lang.String sentence)
list
- the listsentence
- the sentencepublic XMLListItem addListItem(XMLList list, java.lang.String sentence, SentenceStyle style)
list
- the listsentence
- the sentencestyle
- the sentence stylepublic XMLTable addTable(XMLArticle article)
article
- the articlepublic XMLTable addTable(XMLArticle article, boolean isSortable)
article
- the articleisSortable
- true if the table is sortablepublic XMLTable addTable(XMLArticle article, ParagraphElementParent parent, boolean isSortable)
article
- the articleparent
- the parentisSortable
- true if the table is sortablepublic XMLTableHeader setTableHeader(XMLTable table, boolean isVertical)
table
- the tableisVertical
- true for vertical headerspublic XMLTableColumn addTableColumn(XMLTable table, java.lang.String title)
table
- the tabletitle
- the colum titlepublic XMLTableColumn addTableColumn(XMLTable table, java.lang.String title, SentenceStyle style)
table
- the tabletitle
- the column titlestyle
- the column sentence stylepublic XMLTableColumn addTableColumn(XMLTable table)
table
- the tablepublic XMLTableRow addTableRow(XMLTable table)
table
- the tablepublic XMLSizedTableRow addTableRow(XMLTable table, boolean relWidths, int... widths)
table
- the tablerelWidths
- true for relative widthswidths
- the row widthspublic XMLTableCell addTableCell(XMLTableRow trow)
trow
- the table rowpublic XMLTableCell addTableCell(XMLTableRow trow, java.lang.String sentence)
trow
- the table rowsentence
- the cell sentencepublic XMLTableCell addTableCell(XMLTableRow trow, java.lang.String sentence, SentenceStyle style)
trow
- the table rowsentence
- the cell sentencestyle
- the sentence stylepublic XMLSentence addSentence(ParagraphElementParent parent, java.lang.String text, int type, int size)
parent
- the parenttext
- the texttype
- the sentence typesize
- the sentence sizepublic XMLSentence addSentence(XMLArticle article, java.lang.String text, int type, int size)
article
- the articletext
- the texttype
- the sentence typesize
- the sentence sizepublic XMLSentence addSentence(XMLArticle article, java.lang.String text, int type)
article
- the articletext
- the texttype
- the sentence typepublic XMLExternalLink addExternalLink(ParagraphElementParent parent, java.net.URL url, java.lang.String desc)
parent
- the parenturl
- the URLdesc
- the link descriptionpublic XMLExternalLink addExternalLink(XMLArticle article, java.net.URL url, java.lang.String desc)
article
- the articleurl
- the URLdesc
- the link descriptionpublic XMLReference addReference(XMLArticle article, ParagraphElementParent parent, java.lang.String refID)
article
- the articleparent
- the parentrefID
- the reference IDpublic XMLReference addReference(XMLArticle article, java.lang.String refID)
article
- the articlerefID
- the reference IDpublic XMLReference addReference(XMLArticle article, ParagraphElementParent parent, java.lang.String refID, java.lang.String desc)
article
- the articleparent
- the parentrefID
- the reference IDdesc
- the reference descriptionpublic XMLReference addReference(XMLArticle article, java.lang.String refID, java.lang.String desc)
article
- the articlerefID
- the reference IDdesc
- the reference descriptionpublic XMLReference addReference(XMLArticle article, ParagraphElementParent parent, XMLParentArticle refArticle)
article
- the articleparent
- the parentrefArticle
- the reference articlepublic XMLReference addReference(XMLArticle article, XMLParentArticle refArticle)
article
- the articlerefArticle
- the reference articlepublic XMLReference addReference(XMLArticle article, ParagraphElementParent parent, XMLParentArticle refArticle, java.lang.String desc)
article
- the articleparent
- the parentrefArticle
- the reference articledesc
- the reference descriptionpublic XMLReference addReference(XMLArticle article, XMLParentArticle refArticle, java.lang.String desc)
article
- the articlerefArticle
- the reference articledesc
- the reference descriptionpublic XMLReference addReference(XMLArticle article, ParagraphElementParent parent, AnchorElement anchor)
article
- the articleparent
- the parentanchor
- the reference anchorpublic XMLReference addReference(XMLArticle article, AnchorElement anchor)
article
- the articleanchor
- the reference anchorpublic XMLReference addReference(XMLArticle article, ParagraphElementParent parent, AnchorElement anchor, java.lang.String desc)
article
- the articleparent
- the parentanchor
- the anchordesc
- the reference descriptionpublic XMLReference addReference(XMLArticle article, AnchorElement anchor, java.lang.String desc)
article
- the articleanchor
- the anchordesc
- the reference descriptionpublic XMLImage addImage(org.docgene.model.globals.XMLRootElement element, ParagraphElementParent parent, java.lang.String imageID, boolean br)
element
- the root elementparent
- the parentimageID
- the image idbr
- true if the image must be added in a new linepublic XMLImage addImage(XMLArticle article, java.lang.String imageID, boolean br)
article
- the articleimageID
- the image idbr
- true if the image must be added in a new linepublic XMLImage addImage(org.docgene.model.globals.XMLRootElement element, ParagraphElementParent parent, java.awt.image.BufferedImage bimg, boolean br)
element
- the root elementparent
- the parentbimg
- the imagebr
- true if the image must be added in a new linepublic XMLImage addImage(XMLArticle article, java.awt.image.BufferedImage bimg, boolean br)
article
- the articlebimg
- the imagebr
- true if the image must be added in a new linepublic XMLImage addImage(org.docgene.model.globals.XMLRootElement element, ParagraphElementParent parent, java.io.File imageFile, boolean br)
element
- the root elementparent
- the parentimageFile
- the image Filebr
- true if the image must be added in a new linepublic XMLImage addImage(org.docgene.model.globals.XMLRootElement element, ParagraphElementParent parent, java.net.URL url, boolean br)
element
- the root elementparent
- the parenturl
- the image URLbr
- true if the image must be added in a new linepublic XMLImage addImage(XMLArticle article, java.io.File imageFile, boolean br)
article
- the articleimageFile
- the image Filebr
- true if the image must be added in a new linepublic XMLImage addImage(XMLArticle article, java.net.URL url, boolean br)
article
- the articleurl
- the image URLbr
- true if the image must be added in a new linepublic void setCustomStyles(StyledElement element, java.lang.String styleClass, java.lang.String style)
element
- the elementstyleClass
- the style classstyle
- the stylepublic boolean setOutputDirectory(java.net.URL outputDir)
outputDir
- the directorypublic boolean setOutputDirectory(java.io.File outputDir)
outputDir
- the directorypublic java.io.File getOutputDirectory()
public void setSearch(short searchType)
searchType
- the search typeSearchOptions
public boolean setLocale(java.lang.String locale)
locale
- the localeLocalization
public void setFullTextSearch(boolean isEnabled, int compressionLevel)
isEnabled
- true if the full text search is enabledcompressionLevel
- the compression level, from 0 to 2public boolean setOutputType(java.lang.String outputType)
outputType
- the output typeAPIOutputTypes
public void writeContent() throws DocGeneratorAPIException
DocGeneratorAPIException
public void writeContent(boolean clean) throws DocGeneratorAPIException
clean
- true if the content of the output directory must be cleaned prior to the writingDocGeneratorAPIException
public boolean hasGenerationExceptions()
public java.util.List<org.mdiutil.xml.ResolverSAXHandler.ExceptionResult> getGenerationExceptions()
public void showGenerationExceptions()
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence