public class ArticlesModel
extends java.lang.Object
Constructor and Description |
---|
ArticlesModel()
Constructor.
|
ArticlesModel(boolean isConcurrent)
Constructor.
|
ArticlesModel(boolean isConcurrent,
boolean storeResources)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
short |
acceptDependency(java.lang.String origPack,
java.lang.String destPack)
Return true if dependencies betwen two packages are accepted.
|
Article |
addArticle(Article article,
java.lang.String pack)
Add an article.
|
Article |
addArticle(Article article,
java.lang.String pack,
boolean checkName,
boolean resolve)
Add an article.
|
Article |
addArticleToDictionnary(Article article)
Add an article to the dictionnary and categories.
|
Article |
addArticleToDictionnary(java.lang.String title,
Article article)
Add an article to the dictionnary.
|
void |
addCategoriesFile(org.docgene.model.unparsable.CategoriesFile catFile)
Add one categories File.
|
void |
addCategory(ArticleCategory cat)
Add a category to the model.
|
void |
addComment(XMLArticle article,
XMLComment comment)
Add a comment to the comment list.
|
void |
addDirectResource(XMLResource resource)
Add a resource directy specified in a "doc-files" directory.
|
void |
addDisambArticle(XMLDisambArticle article)
Add a disambiguation article.
|
void |
addElementDefinitionFile(org.docgene.model.unparsable.ElementDefinitionsFile eltFile)
Add one elements definition File.
|
void |
addImage(org.docgene.model.globals.ImageDefinition image)
Add an image resource.
|
void |
addImageFromHRef()
Add an image from a path on the model.
|
void |
addInfobox(org.docgene.model.globals.InfoboxDefinition infobox)
Add an infobox definition.
|
void |
addLinksFrom()
Set if the articles must have a "What Links Here" link.
|
org.docgene.model.globals.PackageModel |
addPackage(org.docgene.model.globals.PackageModel packModel)
Add a package.
|
org.docgene.model.globals.PackageModel |
addPackage(org.docgene.model.globals.RootDirectory root,
java.lang.String pack)
Add a package.
|
void |
addParsedArticle(Article article)
Add a parsed article.
|
void |
addReferenceToDisambArticle(ArticleRef articleRef,
XMLDisambArticle article)
Add an article reference to the associated disambiguation article.
|
void |
addResource(org.docgene.model.globals.ResourceDefinition resource)
Add a resource.
|
org.docgene.model.globals.RootDirectory |
addRoot(java.io.File rootDir)
Add a root directory.
|
void |
addTodo(XMLArticle article,
TodoElement todo)
Add a TODO to the TODO list.
|
void |
addUnparsableArticle(org.docgene.model.unparsable.UnparsableArticle article,
java.lang.String pack)
Add an unparsable article.
|
void |
addUnparsableFile(org.docgene.model.unparsable.UnparsableUndefinedFile unparsableFile)
Add one unparsable file.
|
void |
allowIdenticalTitleIDs(boolean value)
Set if if the parser accept identical title IDs(default is true).
|
int |
countArticles()
Return the count of all articles, excluding the
XMLRedirect and template articles. |
void |
forceAbsoluteLinks(boolean value)
Set if relative links to files on the file system outside of the wiki will be converted to absolute links (default is false).
|
java.util.List<Article> |
getAllArticles()
Return all the articles including those from the packages.
|
java.util.List<org.docgene.model.globals.ImageDefinition> |
getAllImages()
Return all the images including those from the packages.
|
java.util.List<org.docgene.model.globals.InfoboxDefinition> |
getAllInfoboxes()
Return all the infobox definitions including those from the packages.
|
java.util.List<org.docgene.model.globals.ResourceDefinition> |
getAllResources()
Return all the resources including those from the packages.
|
XMLParentArticle |
getArticle(ArticleRef articleRef)
Return an article specified by its reference.
|
Article |
getArticle(java.io.File file)
Return the article coresponding to a specified input file.
|
XMLParentArticle |
getArticle(java.lang.String refID)
Return an article specified by its reference.
|
XMLParentArticle |
getArticle(java.lang.String refID,
java.lang.String pack)
Return an article specified by its reference.
|
XMLParentArticle |
getArticle(java.lang.String refID,
java.lang.String origPack,
java.lang.String pack)
Return an article specified by its reference.
|
java.util.Map<java.lang.String,Article> |
getArticles()
Return the articles without packages.
|
java.util.Map<java.io.File,Article> |
getArticlesForFiles()
Return the map from input file to article.
|
java.util.Iterator<Article> |
getArticlesIterator()
Return an iterator on all the articles, including packages.
|
java.util.Map<java.lang.String,java.util.List<Article>> |
getArticlesMap()
Return the Map of articles for each name, for all packages.
|
java.util.Map<ArticleRef,Article> |
getArticlesMapByRef()
Return the Map of articles for each article reference, for all packages.
|
java.util.Map<java.lang.String,Article> |
getArticlesPerAllNames()
Return the articles without packages.
|
ArticlesCategories |
getCategories()
Return the categories.
|
java.util.Map<java.io.File,org.docgene.model.unparsable.CategoriesFile> |
getCategoriesFiles()
Return the categories Files.
|
ArticleCategory |
getCategory(java.lang.String catID)
Return the category with a specified ID.
|
XMLCommentList |
getCommentList()
Return the comment list.
|
ArticleCategory |
getDefaultCategory()
The default category is the category of articles which belong to no category.
|
ArticlesDictionary |
getDictionary()
Return the articles glossary.
|
org.docgene.model.unparsable.DictionaryFile |
getDictionaryFile()
Return the dictionary File.
|
XMLDisambArticle |
getDisambArticle(ArticleRef ref)
Return the disambiguation article corresponding to an article reference.
|
XMLDisambArticle |
getDisambArticle(java.lang.String desc)
Return the disambiguation article for a specified description.
|
java.util.Map<java.lang.String,XMLDisambArticle> |
getDisambArticles()
Add the Map of disambiguation articles.
|
java.util.Map<java.io.File,org.docgene.model.unparsable.ElementDefinitionsFile> |
getElementDefinitionFiles()
Return the elements definition Files.
|
XMLFallbackArticle |
getFallbackArticle(char type)
Return a fallback article.
|
XMLParentArticle |
getFirstArticle(java.lang.String refID)
Return the first article specified by its reference, regardless of the package in which the article is defined.
|
XMLParentArticle |
getFirstArticle(java.lang.String refID,
boolean includePackages)
Return the first article specified by its reference, regardless of the package in which the article is defined.
|
XMLFooter |
getFooter()
Return the articles footer.
|
org.docgene.model.globals.FullTextSearch |
getFullTextSearch()
Return the articles full text search.
|
ArticlesGlossary |
getGlossary()
Return the articles glossary.
|
XMLHeader |
getHeader()
Return the articles header.
|
org.docgene.model.globals.ImageDefinition |
getImage(java.lang.String id)
Return the image of a specified id.
|
org.docgene.model.globals.ImageDefinition |
getImage(java.lang.String id,
java.lang.String origPack,
java.lang.String pack)
Return the image of a specified id and package.
|
org.docgene.model.globals.ImageDefinition |
getImageForAllPackages(java.lang.String id)
Return the image of a specified id (for all packages).
|
java.util.Map<java.lang.String,org.docgene.model.globals.ImageDefinition> |
getImages()
Return the image resources.
|
XMLIndex |
getIndex()
Return the index article.
|
org.docgene.model.globals.InfoboxDefinition |
getInfobox(java.lang.String id)
Return the infobox definition of a specified id and package.
|
org.docgene.model.globals.InfoboxDefinition |
getInfobox(java.lang.String id,
java.lang.String origPack,
java.lang.String pack)
Return the infobox definition of a specified id and package.
|
java.util.Map<java.lang.String,org.docgene.model.globals.InfoboxDefinition> |
getInfoboxes()
Return the infobox definitions.
|
org.docgene.model.globals.ArticlesMenus |
getMenus()
Return the articles menus.
|
java.lang.String |
getNonExistingDesc(Article article)
Return a description which is not used for an article.
|
org.docgene.model.globals.PackageModel |
getPackage(java.lang.String pack)
Return the package of a specified name.
|
java.util.Map<java.lang.String,org.docgene.model.globals.PackageModel> |
getPackages()
Return the packages.
|
org.docgene.model.globals.PackagesDependencies |
getPackagesDependencies()
Return the Packages Dependencies.
|
org.docgene.model.globals.PageRanks |
getPageRanks()
Return the computed PageRanks.
|
java.util.Collection<Article> |
getParsedArticles()
Return the parsed articles.
|
java.util.List<Article> |
getRankedArticles()
Return all the articles including those from the packages, possibly takning the page ranks into accounts.
|
java.util.Map<ArticleRef,XMLDisambArticle> |
getReferenceToDisambArticles()
Return the map from article reference to the associated disambiguation article.
|
org.docgene.model.globals.ResourceDefinition |
getResource(java.lang.String id,
java.lang.String origPack,
java.lang.String pack)
Return the resource of a specified id and package.
|
java.util.Map<java.lang.String,org.docgene.model.globals.ResourceDefinition> |
getResources()
Return the resources.
|
java.io.File |
getStyleSheet()
Return the output StyleSheet file.
|
java.io.File |
getStyleSheetTheme()
Return the output StyleSheet theme file..
|
XMLTodoList |
getTodoList()
Return the TODO list.
|
XMLParentArticle |
getTransitiveArticle(java.lang.String refID,
java.lang.String origPack,
java.lang.String pack)
Return the concrete article for a specified id and package.
|
java.util.Map<java.io.File,org.docgene.model.unparsable.UnparsableUndefinedFile> |
getUnparsableFiles()
Return the unparsable files.
|
org.docgene.model.incremental.IncrementalGenerationState |
getWikiState()
Return the object which hold the current state of the wiki
|
boolean |
hasArticle(java.lang.String refID)
Return true if the model contains an article with no package which can be reached through a specified reference.
|
boolean |
hasArticle(java.lang.String refID,
java.lang.String origPack,
java.lang.String pack)
Return true if the model contains an article which can be reached through a specified reference.
|
boolean |
hasArticleFromAnyPackage(java.lang.String refID)
Return true if the model contains an article with no package which can be reached through a specified reference, from any package.
|
boolean |
hasCategory(java.lang.String catID)
Return true if the model has a category with a specified ID.
|
boolean |
hasComments()
Return true if there are comments.
|
boolean |
hasCustomGlossaryMenuItem(boolean isIndex)
Return true if there is a custom glossary menu item.
|
boolean |
hasDictionaryFile()
Return true if there is a dictionary File.
|
boolean |
hasDisambArticle(ArticleRef ref)
Return true if there is a disambiguation article corresponding to an article reference.
|
boolean |
hasDisambArticle(java.lang.String desc)
Return true if the model has a disambiguation article for a specified description.
|
boolean |
hasFallbackArticle(char type)
Return a fallback article.
|
boolean |
hasFullTextSearch()
Return true if the model has full text Search.
|
boolean |
hasGenerationByDelta()
Return the generation mode.
|
boolean |
hasGlobalIndex()
Return true if there is a global index.
|
boolean |
hasGlossary()
Return true if the articles have a glossary.
|
boolean |
hasImage(java.lang.String id)
Return true if the model has an image with no package of a specified ID.
|
boolean |
hasImage(java.lang.String id,
java.lang.String origPack,
java.lang.String pack)
Return true if the model has an image for a specified id and package.
|
boolean |
hasImageForAllPackages(java.lang.String id)
Return true if the model has an image for a specified id (for all packages).
|
boolean |
hasImages()
Return true if the model has images.
|
boolean |
hasIndex()
Return true if the model has already an index article.
|
boolean |
hasInfobox(java.lang.String id)
Return true if there is an infobox definition of a specified ID.
|
boolean |
hasInfobox(java.lang.String id,
java.lang.String origPack,
java.lang.String pack)
Return true if the model has an infobox definition for a specified id and package.
|
boolean |
hasLinksFrom()
Return true if the articles must have a "What Links Here" link.
|
boolean |
hasPackage(java.lang.String pack)
Return true if a package exists.
|
boolean |
hasPackages()
Return true if there are packages.
|
boolean |
hasPageRanks()
Return true if there are computed PageRanks.
|
boolean |
hasRawArticles()
Return true if this model has at least one raw HTML file.
|
boolean |
hasResource(java.lang.String id)
Return true if the model has a resource with no package of a specified ID.
|
boolean |
hasResource(java.lang.String id,
java.lang.String origPack,
java.lang.String pack)
Return true if the model has a resource for a specified id and package.
|
boolean |
hasTitles()
Return true if at least one article has a searchable title.
|
boolean |
hasTransitiveArticle(java.lang.String refID,
java.lang.String origPack,
java.lang.String pack)
Return true if the model has a concrete article for a specified id and package.
|
boolean |
hasTransitiveArticle(java.lang.String refID,
java.lang.String origPack,
java.lang.String pack,
boolean acceptInclude)
Return true if the model has a concrete article for a specified id and package.
|
boolean |
isAllowingIdenticalTitleIDs()
Return true if if the parser accept identical title IDs (default is true).
|
boolean |
isConcurrent()
Return true for concurrent parsing.
|
boolean |
isForcingAbsoluteLinks()
Return if relative links to files on the file system outside of the wiki will be converted to absolute links (default is false).
|
boolean |
isIncludingElement(org.docgene.model.globals.PackagedElement element)
Return true if an element must be included in the wiki output.
|
boolean |
isIncludingPackage(java.lang.String pack)
Return true if a package must be included in the wiki output.
|
boolean |
isStoringResources()
Return true if resources must be stored.
|
boolean |
isSupportingThemes()
Return true if the model writer support themes.
|
boolean |
isWritingAnyScripts()
Return true if allowing to write any scripts.
|
boolean |
isWritingArticlesHeaderFrame()
Return true if articles header frame must be written (default is true).
|
boolean |
isWritingArticlesTOC()
Return true if articles Table of content must be written (default is true)
|
boolean |
isWritingResources()
Return true if allowing to write resources files.
|
boolean |
isWritingScripts()
Return true if allowing to write scripts.
|
boolean |
isWritingSeeAlso()
Return true if allowing to write the seeAlso elements(default is true).
|
boolean |
isWritingSubDirectories()
Return true if allowing to write articles, resources and images in sub-directories (default is true).
|
protected void |
refreshCategories(Article article,
boolean resolve)
Integrate the categories of an article in the list of categories.
|
boolean |
removeArticle(Article article)
Remove an article.
|
void |
removeCategoriesFile(org.docgene.model.unparsable.CategoriesFile catFile)
Remove one categories File.
|
void |
removeElementDefinitionFile(org.docgene.model.unparsable.ElementDefinitionsFile eltFile)
Remove one elements definition File.
|
boolean |
removeImage(org.docgene.model.globals.ImageDefinition image)
Removes an image.
|
boolean |
removeInfobox(org.docgene.model.globals.InfoboxDefinition infobox)
Removes an infobox definition.
|
boolean |
removeResource(org.docgene.model.globals.ResourceDefinition resource)
Removes a resource.
|
void |
renameArticle(Article article,
XMLDisambArticle disamb,
java.lang.String newDesc)
Rename an article, making sure it will not use an existing name.
|
void |
replaceArticle(Article article)
Replace an article by anotehr version.
|
void |
setDictionaryFile(org.docgene.model.unparsable.DictionaryFile dictionaryFile) |
void |
setFallbackArticle(XMLFallbackArticle fallbackArticle)
Set a fallback article.
|
void |
setFooter(XMLFooter footer)
Set the articles footer.
|
void |
setFulltextSearch(org.docgene.model.globals.FullTextSearch fullTextSearch)
Set the full text search manager.
|
void |
setGlossary(ArticlesGlossary glossary)
Set the articles glossary.
|
void |
setHasTitles()
Set that the model has titles.
|
void |
setHeader(XMLHeader header)
Set the articles header.
|
void |
setIndex(XMLIndex article,
java.lang.String pack)
Set the model index.
|
void |
setIndex(XMLIndex article,
java.lang.String pack,
boolean isGlobalIndex)
Set the model index.
|
void |
setPackagesDependencies(org.docgene.model.globals.PackagesDependencies dependencies)
Set the Packages Dependencies.
|
void |
setPageRanks(org.docgene.model.globals.PageRanks pageRanks)
Set the computed PageRanks.
|
void |
setStyleSheet(java.io.File styleSheet)
Set the output StyleSheet file.
|
void |
setStyleSheetTheme(java.io.File styleSheetTheme)
Set the StyleSheet theme file.
|
void |
setupElementDefinitions()
Setup element definitions to be sure that we don't have more than once the same path name.
|
void |
setWikiState(org.docgene.model.incremental.IncrementalGenerationState wikiState)
Set the object which hold the current state of the wiki
|
boolean |
showElementErrors(org.docgene.model.globals.PackagedElement element)
Return true if errors on an element must be emitted.
|
boolean |
showPackageErrors(java.lang.String pack)
Return true if a package must be included in the wiki output.
|
boolean |
showUnresolvedImages(java.lang.String origPack,
java.lang.String destPack)
Return true if unresolved images between between two packages must emit an error.
|
boolean |
showUnresolvedInfoboxes(java.lang.String origPack,
java.lang.String destPack)
Return true if unresolved infoboxes between between two packages must emit an error.
|
boolean |
showUnresolvedReferences(java.lang.String origPack,
java.lang.String destPack)
Return true if unresolved references between between two packages must emit an error.
|
void |
supportThemes(boolean supportThemes)
Set if the model writer support themes.
|
void |
writeAnyScripts(boolean isWriting)
Set if allowing to write any scripts (default is true).
|
void |
writeArticlesHeaderFrame(boolean value)
Set if articles header frame must be written (default is true).
|
void |
writeArticlesTOC(boolean value)
Set if articles Table of content must be written (default is true).
|
void |
writeResources(boolean value)
Set if allowing to write resources files (default is true).
|
void |
writeScripts(boolean isWriting)
Set if allowing to write scripts (default is true).
|
void |
writeSeeAlso(boolean value)
Set if allowing to write the seeAlso elements (default is true).
|
void |
writeSubDirectories(boolean value)
Set if allowing to write articles, resources and images in sub-directories (default is true).
|
public ArticlesModel()
public ArticlesModel(boolean isConcurrent)
isConcurrent
- true for concurrent parsingpublic ArticlesModel(boolean isConcurrent, boolean storeResources)
isConcurrent
- true for concurrent parsingstoreResources
- true if resources should be stored in the model (this concerns images and resources definition files)public boolean isConcurrent()
public void addElementDefinitionFile(org.docgene.model.unparsable.ElementDefinitionsFile eltFile)
eltFile
- the XML elements definition Filepublic java.util.Map<java.io.File,org.docgene.model.unparsable.ElementDefinitionsFile> getElementDefinitionFiles()
public void removeElementDefinitionFile(org.docgene.model.unparsable.ElementDefinitionsFile eltFile)
eltFile
- the XML elements definition Filepublic void addCategoriesFile(org.docgene.model.unparsable.CategoriesFile catFile)
catFile
- the XML categories Filepublic java.util.Map<java.io.File,org.docgene.model.unparsable.CategoriesFile> getCategoriesFiles()
public void removeCategoriesFile(org.docgene.model.unparsable.CategoriesFile catFile)
catFile
- the categories Filepublic void setDictionaryFile(org.docgene.model.unparsable.DictionaryFile dictionaryFile)
public org.docgene.model.unparsable.DictionaryFile getDictionaryFile()
public boolean hasDictionaryFile()
public void addUnparsableFile(org.docgene.model.unparsable.UnparsableUndefinedFile unparsableFile)
unparsableFile
- the unparsable filepublic java.util.Map<java.io.File,org.docgene.model.unparsable.UnparsableUndefinedFile> getUnparsableFiles()
public boolean isStoringResources()
public void setWikiState(org.docgene.model.incremental.IncrementalGenerationState wikiState)
wikiState
- the wiki statepublic org.docgene.model.incremental.IncrementalGenerationState getWikiState()
public boolean hasGenerationByDelta()
public boolean hasPageRanks()
public void setPageRanks(org.docgene.model.globals.PageRanks pageRanks)
pageRanks
- the PageRankspublic org.docgene.model.globals.PageRanks getPageRanks()
public org.docgene.model.globals.ArticlesMenus getMenus()
public boolean hasCustomGlossaryMenuItem(boolean isIndex)
isIndex
- true for the index pagepublic void writeArticlesHeaderFrame(boolean value)
value
- true if articles header frame must be writtenpublic boolean isWritingArticlesHeaderFrame()
public void writeArticlesTOC(boolean value)
value
- true if articles Table of content must be writtenpublic boolean isWritingArticlesTOC()
public void writeSubDirectories(boolean value)
value
- true if allowing to write articles, resources and images in sub-directoriespublic boolean isWritingSubDirectories()
public void allowIdenticalTitleIDs(boolean value)
value
- true if the parser accept identical title IDspublic boolean isAllowingIdenticalTitleIDs()
public void writeSeeAlso(boolean value)
value
- true if allowing to write the seeAlso elementspublic boolean isWritingSeeAlso()
public void writeResources(boolean value)
value
- true if allowing to write resources filespublic boolean isWritingResources()
public void writeScripts(boolean isWriting)
isWriting
- true if allowing to write scriptspublic boolean isWritingScripts()
public void writeAnyScripts(boolean isWriting)
isWriting
- true if allowing to write any scriptspublic boolean isWritingAnyScripts()
public void forceAbsoluteLinks(boolean value)
value
- true if relative links to files on the file system outside of the wiki will be converted to absolute linkspublic boolean isForcingAbsoluteLinks()
public void supportThemes(boolean supportThemes)
supportThemes
- true if the model writer support themespublic boolean isSupportingThemes()
public void setFulltextSearch(org.docgene.model.globals.FullTextSearch fullTextSearch)
fullTextSearch
- the full text search managerpublic void addLinksFrom()
public boolean hasLinksFrom()
public void addTodo(XMLArticle article, TodoElement todo)
article
- the articletodo
- the TODOpublic XMLTodoList getTodoList()
public void addComment(XMLArticle article, XMLComment comment)
article
- the articlecomment
- the commentpublic XMLCommentList getCommentList()
public boolean hasComments()
public ArticlesDictionary getDictionary()
public org.docgene.model.globals.FullTextSearch getFullTextSearch()
public boolean hasFullTextSearch()
public ArticlesGlossary getGlossary()
public boolean hasGlossary()
public void setGlossary(ArticlesGlossary glossary)
glossary
- the glossarypublic boolean hasImage(java.lang.String id, java.lang.String origPack, java.lang.String pack)
id
- the image IDorigPack
- the origin package (ie it is the package from which the reference is emitted)pack
- the image packagepublic boolean hasImageForAllPackages(java.lang.String id)
id
- the image IDpublic org.docgene.model.globals.ImageDefinition getImageForAllPackages(java.lang.String id)
id
- the image IDpublic org.docgene.model.globals.ImageDefinition getImage(java.lang.String id)
id
- the image IDpublic org.docgene.model.globals.ImageDefinition getImage(java.lang.String id, java.lang.String origPack, java.lang.String pack)
id
- the image IDorigPack
- the origin package (ie it is the package from which the reference is emitted)pack
- the image packagepublic void addImage(org.docgene.model.globals.ImageDefinition image)
image
- the image resourcepublic boolean removeImage(org.docgene.model.globals.ImageDefinition image)
image
- the image.public java.util.Map<java.lang.String,org.docgene.model.globals.ImageDefinition> getImages()
public java.util.List<org.docgene.model.globals.ImageDefinition> getAllImages()
public boolean hasImage(java.lang.String id)
id
- the IDpublic final void addImageFromHRef()
public boolean hasImages()
public void addInfobox(org.docgene.model.globals.InfoboxDefinition infobox)
infobox
- the infoboxpublic boolean removeInfobox(org.docgene.model.globals.InfoboxDefinition infobox)
infobox
- infobox definition.public boolean hasInfobox(java.lang.String id)
id
- the infobox definition IDpublic boolean hasInfobox(java.lang.String id, java.lang.String origPack, java.lang.String pack)
id
- the image IDorigPack
- the origin package (ie it is the package from which the reference is emitted)pack
- the infobox definition packagepublic org.docgene.model.globals.InfoboxDefinition getInfobox(java.lang.String id)
id
- the infobox definition IDpublic org.docgene.model.globals.InfoboxDefinition getInfobox(java.lang.String id, java.lang.String origPack, java.lang.String pack)
id
- the infobox definition IDorigPack
- the origin package (ie it is the package from which the reference is emitted)pack
- the infobox definition packagepublic java.util.Map<java.lang.String,org.docgene.model.globals.InfoboxDefinition> getInfoboxes()
public java.util.List<org.docgene.model.globals.InfoboxDefinition> getAllInfoboxes()
public void setStyleSheet(java.io.File styleSheet)
styleSheet
- the StyleSheet filepublic java.io.File getStyleSheet()
public void setStyleSheetTheme(java.io.File styleSheetTheme)
styleSheetTheme
- StyleSheet theme file.public java.io.File getStyleSheetTheme()
public void setupElementDefinitions()
public boolean hasResource(java.lang.String id)
id
- the IDpublic void addResource(org.docgene.model.globals.ResourceDefinition resource)
articles ==> resources.xml ==> doc-files ====> myResourceFile.xml ====> anotherResourceFile.htmlIn that case, the "resources.xml" file can have the following content to reference both the resources:
<resources> <resourceDefinition id="resource1" url="myresourceFile.xml" /> <resourceDefinition id="resource2" url="anotherResourceFile.html" /> </resources>Note that the "doc-files" directory is not part of the resource URL specification.
resource
- the resourceResourceDefinition
public boolean removeResource(org.docgene.model.globals.ResourceDefinition resource)
resource
- the resource.public void addDirectResource(XMLResource resource)
resource
- the resource.public boolean hasRawArticles()
public boolean hasResource(java.lang.String id, java.lang.String origPack, java.lang.String pack)
id
- the resource IDorigPack
- the origin package (ie it is the package from which the reference is emitted)pack
- the resource packagepublic org.docgene.model.globals.ResourceDefinition getResource(java.lang.String id, java.lang.String origPack, java.lang.String pack)
id
- the resource IDorigPack
- the origin package (ie it is the package from which the reference is emitted)pack
- the resource packagepublic java.util.Map<java.lang.String,org.docgene.model.globals.ResourceDefinition> getResources()
addResource(org.docgene.model.globals.ResourceDefinition)
,
ResourceDefinition
public java.util.List<org.docgene.model.globals.ResourceDefinition> getAllResources()
public void setIndex(XMLIndex article, java.lang.String pack, boolean isGlobalIndex)
article
- the index articlepack
- the article packageisGlobalIndex
- true for the global indexpublic boolean hasGlobalIndex()
public void setIndex(XMLIndex article, java.lang.String pack)
article
- the index articlepack
- the article packagepublic void setHeader(XMLHeader header)
header
- the articles headerpublic XMLHeader getHeader()
public void setFooter(XMLFooter footer)
footer
- the articles footerpublic XMLFooter getFooter()
public void setFallbackArticle(XMLFallbackArticle fallbackArticle)
fallbackArticle
- the fallback articlepublic XMLFallbackArticle getFallbackArticle(char type)
type
- the fallback article typepublic boolean hasFallbackArticle(char type)
type
- the fallback article typepublic boolean hasIndex()
public XMLIndex getIndex()
public void setPackagesDependencies(org.docgene.model.globals.PackagesDependencies dependencies)
dependencies
- the Packages Dependenciespublic org.docgene.model.globals.PackagesDependencies getPackagesDependencies()
public java.util.Map<java.lang.String,org.docgene.model.globals.PackageModel> getPackages()
public boolean hasPackages()
public boolean hasPackage(java.lang.String pack)
pack
- the package namepublic java.util.Iterator<Article> getArticlesIterator()
public java.util.Map<java.lang.String,Article> getArticles()
public int countArticles()
XMLRedirect
and template articles.XMLRedirect
and template articlespublic java.util.Map<java.lang.String,Article> getArticlesPerAllNames()
XMLArticle.getDescription()
XMLArticle.getID()
public XMLParentArticle getFirstArticle(java.lang.String refID, boolean includePackages)
refID
- the article reference ID. It can be:includePackages
- true if the packaegs are takne into accountpublic XMLParentArticle getFirstArticle(java.lang.String refID)
refID
- the article reference ID. It can be:public short acceptDependency(java.lang.String origPack, java.lang.String destPack)
origPack
- the origin packagedestPack
- the destination packagepublic boolean isIncludingPackage(java.lang.String pack)
pack
- the packagepublic boolean showPackageErrors(java.lang.String pack)
pack
- the packagepublic boolean isIncludingElement(org.docgene.model.globals.PackagedElement element)
element
- the elementpublic boolean showElementErrors(org.docgene.model.globals.PackagedElement element)
element
- the elementpublic boolean showUnresolvedReferences(java.lang.String origPack, java.lang.String destPack)
origPack
- the origin packagedestPack
- the destination packagepublic boolean showUnresolvedImages(java.lang.String origPack, java.lang.String destPack)
origPack
- the origin packagedestPack
- the destination packagepublic boolean showUnresolvedInfoboxes(java.lang.String origPack, java.lang.String destPack)
origPack
- the origin packagedestPack
- the destination packagepublic XMLParentArticle getArticle(ArticleRef articleRef)
articleRef
- the article reference ID.getArticle(java.lang.String, java.lang.String)
public XMLParentArticle getArticle(java.lang.String refID, java.lang.String pack)
refID
- the article reference ID. It can be:
XMLArticle.getID()
XMLArticle.getDescription()
pack
- the article packagepublic XMLParentArticle getArticle(java.lang.String refID)
refID
- the article reference ID. It can be:
XMLArticle.getID()
XMLArticle.getDescription()
public XMLParentArticle getArticle(java.lang.String refID, java.lang.String origPack, java.lang.String pack)
refID
- the article reference ID. It can be:
XMLArticle.getID()
XMLArticle.getDescription()
origPack
- the origin package (ie it is the package from which the reference is emitted)pack
- the article packagepublic boolean removeArticle(Article article)
article
- the article.public java.util.Collection<Article> getParsedArticles()
public java.util.List<Article> getRankedArticles()
public java.util.List<Article> getAllArticles()
public java.util.Map<java.lang.String,java.util.List<Article>> getArticlesMap()
public java.util.Map<ArticleRef,Article> getArticlesMapByRef()
public boolean hasArticle(java.lang.String refID)
refID
- the article reference IDpublic boolean hasArticleFromAnyPackage(java.lang.String refID)
refID
- the article reference IDpublic boolean hasTransitiveArticle(java.lang.String refID, java.lang.String origPack, java.lang.String pack)
refID
- the article IDorigPack
- the origin packagepack
- the article packagepublic boolean hasTransitiveArticle(java.lang.String refID, java.lang.String origPack, java.lang.String pack, boolean acceptInclude)
refID
- the article IDorigPack
- the origin packagepack
- the article packageacceptInclude
- true if templates are acceptedpublic XMLParentArticle getTransitiveArticle(java.lang.String refID, java.lang.String origPack, java.lang.String pack)
refID
- the article IDorigPack
- the origin packagepack
- the article packagepublic boolean hasArticle(java.lang.String refID, java.lang.String origPack, java.lang.String pack)
refID
- the article reference IDorigPack
- the origin package (ie it is the package from which the reference is emitted)pack
- the article packagepublic ArticlesCategories getCategories()
public boolean hasCategory(java.lang.String catID)
catID
- the category IDpublic ArticleCategory getCategory(java.lang.String catID)
catID
- the category IDpublic ArticleCategory getDefaultCategory()
public org.docgene.model.globals.PackageModel addPackage(org.docgene.model.globals.PackageModel packModel)
packModel
- the packagepublic org.docgene.model.globals.PackageModel addPackage(org.docgene.model.globals.RootDirectory root, java.lang.String pack)
root
- the root directorypack
- the package namepublic org.docgene.model.globals.PackageModel getPackage(java.lang.String pack)
pack
- the package namepublic Article addArticleToDictionnary(java.lang.String title, Article article)
title
- the titlearticle
- the articlepublic Article addArticleToDictionnary(Article article)
article
- the articleprotected void refreshCategories(Article article, boolean resolve)
article
- the articleresolve
- true to perform the categories resolutionpublic void addCategory(ArticleCategory cat)
cat
- the categorypublic boolean hasTitles()
public void addDisambArticle(XMLDisambArticle article)
article
- the articlepublic void addReferenceToDisambArticle(ArticleRef articleRef, XMLDisambArticle article)
articleRef
- the article referencearticle
- the disambiguation articlepublic boolean hasDisambArticle(ArticleRef ref)
ref
- the article referencepublic XMLDisambArticle getDisambArticle(ArticleRef ref)
ref
- the article referencepublic java.util.Map<ArticleRef,XMLDisambArticle> getReferenceToDisambArticles()
public java.util.Map<java.lang.String,XMLDisambArticle> getDisambArticles()
public boolean hasDisambArticle(java.lang.String desc)
desc
- the article descriptionpublic XMLDisambArticle getDisambArticle(java.lang.String desc)
desc
- the article descriptionpublic void setHasTitles()
public org.docgene.model.globals.RootDirectory addRoot(java.io.File rootDir)
rootDir
- the directorypublic java.util.Map<java.io.File,Article> getArticlesForFiles()
public Article getArticle(java.io.File file)
file
- the input filepublic java.lang.String getNonExistingDesc(Article article)
article
- the articlepublic void renameArticle(Article article, XMLDisambArticle disamb, java.lang.String newDesc)
article
- the articledisamb
- the disambiguation articlenewDesc
- the new article descriptionpublic void addParsedArticle(Article article)
article
- the articlepublic void replaceArticle(Article article)
article
- the articlepublic Article addArticle(Article article, java.lang.String pack)
article
- the articlepack
- the package namepublic void addUnparsableArticle(org.docgene.model.unparsable.UnparsableArticle article, java.lang.String pack)
article
- the articlepack
- the article packagepublic Article addArticle(Article article, java.lang.String pack, boolean checkName, boolean resolve)
article
- the articlepack
- the article packagecheckName
- true if the name of the article must be checkedresolve
- if the article must be included in the categoriesCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence