public class ArticleCategory extends AbstractXMLParent implements HTMLOutput, org.docgene.model.globals.XMLRootElement
chapters, paragraphs
ARTICLE, 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 id)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addArticle(Article article)
Add an article.
|
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 |
getDescription()
Return the category description.
|
java.lang.String |
getID()
Return the category ID.
|
java.io.File |
getInputFile()
Return the category input XML file.
|
ArticlesModel |
getModel()
Return the articles model.
|
java.io.File |
getOutputFile()
Return the category description output file.
|
XMLParent |
getParent()
Return null.
|
org.docgene.model.globals.RootDirectory |
getRoot()
Return the root directory.
|
short |
getRootElementType()
Return the
RootElement.CATEGORY type. |
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 |
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, getParagraphs
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
hasOutputFile
public ArticleCategory(ArticlesModel model)
model
- the articles modelpublic ArticleCategory(ArticlesModel model, java.lang.String id)
model
- the articles modelid
- the category IDpublic ArticlesModel getModel()
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.XMLRootElement
file
- the category input XML filepublic java.io.File getInputFile()
getInputFile
in interface org.docgene.model.globals.RootElement
public void setRoot(org.docgene.model.globals.RootDirectory root)
root
- the rootpublic org.docgene.model.globals.RootDirectory getRoot()
getRoot
in interface org.docgene.model.globals.RootElement
public void setOutputFile(java.io.File file)
file
- the category description output filepublic java.io.File getOutputFile()
getOutputFile
in interface HTMLOutput
public java.lang.String getID()
getID
in interface org.docgene.model.globals.RootElement
public void setDescription(java.lang.String desc)
desc
- the category descriptionpublic java.lang.String getDescription()
public void addArticle(Article article)
article
- the articlepublic java.util.Map<java.lang.String,Article> getArticles()
public boolean isEmpty()
public java.util.Map<ArticleRef,Article> getArticlesByRef()
public short getRootElementType()
RootElement.CATEGORY
type.getRootElementType
in interface org.docgene.model.globals.RootElement
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence