public class ArticleCategory extends AbstractXMLParent implements HTMLOutput, org.docgene.model.globals.XMLRootElement
chapters, paragraphsARTICLE, CATEGORIES, CATEGORY, DICTIONARY, FOOTER, FULL_TEXT_SEARCH, GLOSSARY, HEADER, IMAGE_DEFINITION, IMAGES_DEFINITION, INFOBOX_DEFINITION, INFOBOX_PROPERTY, MENUS, PACKAGE, RESOURCE_DEFINITION, RESOURCES_DEFINITION, UNDEFINED| Constructor and Description |
|---|
ArticleCategory(ArticlesModel model)
Constructor.
|
ArticleCategory(ArticlesModel model,
java.lang.String desc)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArticle(Article article)
Add an article.
|
void |
addSubCategory(ArticleCategory category)
Add a sub-category.
|
java.util.Map<java.lang.String,Article> |
getArticles()
Return the articles in this category.
|
java.util.Map<ArticleRef,Article> |
getArticlesByRef()
Return the articles in this category, mapped by their ref.
|
org.docgene.main.props.CountProperty |
getCount()
Return the number of articles in the category.
|
java.lang.String |
getDesc()
Return the category title.
|
java.lang.String |
getDescription()
Return the category description.
|
java.lang.String |
getID()
Return the category ID.
|
java.io.File |
getInputFile()
Return the category input XML file.
|
XMLParentArticle |
getMainArticle()
Return the main article of the category.
|
ArticlesModel |
getModel()
Return the articles model.
|
java.io.File |
getOutputFile()
Return the category description output file.
|
XMLParent |
getParent()
Return null.
|
java.util.Map<java.lang.String,ArticleCategory> |
getParentCategories()
Return the parent categories.
|
org.docgene.model.globals.RootDirectory |
getRoot()
Return the root directory.
|
short |
getRootElementType()
Return the
RootElement.CATEGORY type. |
java.util.Map<java.lang.String,ArticleCategory> |
getSubCategories()
Return the sub-categories.
|
boolean |
hasMainArticle()
Return true if there is a main article for the category.
|
boolean |
hasParentCategories()
Return true if there are parent categories.
|
boolean |
hasSubCategories()
Return true if there are sub-categories.
|
boolean |
isEmpty()
Return true if this category is empty.
|
void |
setDescription(java.lang.String desc)
Set the category description.
|
void |
setInputFile(java.io.File file)
Set the category input XML file.
|
void |
setMainArticle(XMLParentArticle mainArticle)
Set the main article of the category.
|
void |
setOutputFile(java.io.File file)
Set the category description output file.
|
void |
setRoot(org.docgene.model.globals.RootDirectory root)
Set the root directory.
|
java.lang.String |
toString() |
addChapter, addParagraph, getChapters, getParagraphsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasOutputFilepublic ArticleCategory(ArticlesModel model)
model - the articles modelpublic ArticleCategory(ArticlesModel model, java.lang.String desc)
model - the articles modeldesc - the category namepublic ArticlesModel getModel()
public void setMainArticle(XMLParentArticle mainArticle)
mainArticle - the articlepublic XMLParentArticle getMainArticle()
public void addSubCategory(ArticleCategory category)
category - the sub-categorypublic boolean hasSubCategories()
public java.util.Map<java.lang.String,ArticleCategory> getSubCategories()
public boolean hasParentCategories()
public java.util.Map<java.lang.String,ArticleCategory> getParentCategories()
public boolean hasMainArticle()
public org.docgene.main.props.CountProperty getCount()
CountProperty.COUNT
property.public XMLParent getParent()
public void setInputFile(java.io.File file)
setInputFile in interface org.docgene.model.globals.XMLRootElementfile - the category input XML filepublic java.io.File getInputFile()
getInputFile in interface org.docgene.model.globals.RootElementpublic void setRoot(org.docgene.model.globals.RootDirectory root)
root - the rootpublic org.docgene.model.globals.RootDirectory getRoot()
getRoot in interface org.docgene.model.globals.RootElementpublic void setOutputFile(java.io.File file)
file - the category description output filepublic java.io.File getOutputFile()
getOutputFile in interface HTMLOutputpublic java.lang.String getID()
getID in interface org.docgene.model.globals.RootElementpublic java.lang.String getDesc()
public void setDescription(java.lang.String desc)
desc - the descriptionpublic java.lang.String getDescription()
public void addArticle(Article article)
article - the articlepublic java.util.Map<java.lang.String,Article> getArticles()
public boolean isEmpty()
isEmpty in interface XMLParentisEmpty in class AbstractXMLParentpublic java.util.Map<ArticleRef,Article> getArticlesByRef()
public short getRootElementType()
RootElement.CATEGORY type.getRootElementType in interface org.docgene.model.globals.RootElementpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence