public interface Article
extends org.docgene.model.globals.XMLRootElement, org.docgene.model.globals.PackagedElement
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INDEX
The ID of the index article.
|
static java.lang.String |
INDEX_LC
The ID of the index article in lower case.
|
static short |
TYPE_ARTICLE
The type for a regular article.
|
static short |
TYPE_DISAMB
The type for a disambiguation article.
|
static short |
TYPE_FALLBACK
The type for a fallback article.
|
static short |
TYPE_INDEX
The type for the index article.
|
static short |
TYPE_RAW_HTML
The type for a raw html article.
|
static short |
TYPE_REDIRECT
The type for a redirect article.
|
static short |
TYPE_TEMPLATE
The type for a template article.
|
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
Modifier and Type | Method and Description |
---|---|
default boolean |
addAlternateTitle(java.lang.String title,
boolean keepCase,
boolean inDictionnary)
Add an alternate title to the article.
|
default void |
addReference(ArticleRef ref)
Add an article reference.
|
default boolean |
articleNameAlreadyTaken()
Return true if the article name was already taken, and the article was not added in the model.
|
default java.util.Set<java.lang.String> |
getAlternateTitles()
Return the article alternate titles.
|
default java.util.Map<java.lang.String,AlternateTitle> |
getAlternateTitlesMap()
Return the article alternate titles to the raw titles Map.
|
XMLParentArticle |
getArticle()
Return the XMLArticle which is really accessed through this Article.
|
short |
getArticleType()
Return the article type.
|
java.util.Set<java.lang.String> |
getCategories()
Return the categories on which this article belongs.
|
java.lang.String |
getDescription()
Return the article description.
|
default java.lang.String |
getHeader()
Construct the header text for the article.
|
java.lang.String |
getHeader(boolean escaping)
Construct the header text for the article.
|
java.lang.String |
getID()
Return the article ID.
|
default java.util.List<XMLMap> |
getMaps()
Return the list of maps in the article.
|
default java.lang.String |
getMeta()
Return the meta description to be used for the article for the dictionnary or categories.
|
default java.util.Set<java.lang.String> |
getNormalizedAlternateTitles()
Return the normalized article alternate titles.
|
default java.util.List<NoteContent> |
getNotes()
Return the notes.
|
java.lang.String |
getPackage()
Return the article package.
|
default ArticleRef |
getRef()
Return the article ref.
|
java.util.Set<ArticleRef> |
getReferences()
Return the references used in the article.
|
default short |
getRootElementType()
Return the
RootElement.ARTICLE type. |
default int |
getSuffix()
Return the article name suffix (used for articles which have the name of an already existing article).
|
default java.lang.String |
getTitle()
Return the article description by default.
|
default boolean |
hasAlternateTitles()
Return true if the article alternate titles.
|
default boolean |
hasCondition()
Return true if the article has a condition.
|
boolean |
hasID()
Return true if the article has a separate ID.
|
default boolean |
hasImageMaps()
Return true if the article has image maps.
|
default boolean |
hasImages()
Return true if this article has at least one image.
|
default boolean |
hasMaps()
Return true if the article has Maps.
|
default boolean |
hasNotes()
Return true if the article has notes.
|
default boolean |
hasSearchableTitles()
Return true if the article has searchable titles.
|
default boolean |
hasSuffix()
Return true if the article has a name suffix (used for articles which have the name of an already existing article).
|
default boolean |
hasTOC()
Return true if the article should have a Table of content (true by default).
|
default boolean |
isDirect()
Return true if this article is direct.
|
default boolean |
isDirectXMLArticle()
Return true if this article is direct and is not a raw html article.
|
default boolean |
isIndex()
Return true if the article is an index.
|
boolean |
isKeepingCase()
Return true if the article title should keep the title description case.
|
default boolean |
isRawHTMLArticle()
Return true if this article represents a raw HTML file.
|
default boolean |
isTemplate()
Return true if this article is a template.
|
default boolean |
isValid()
Return true if the article is valid.
|
default void |
setArticleNameAlreadyTaken(boolean articleNameAlreadyTaken)
Set if the article name was already taken, and the article was not added in the model.
|
void |
setDescription(java.lang.String id,
java.lang.String desc,
boolean keepCase)
Set the article description.
|
void |
setID(java.lang.String id)
Set the article ID.
|
default void |
setImages()
Set that this article has at least one image.
|
void |
setRoot(org.docgene.model.globals.RootDirectory root)
Set the root directory.
|
default void |
setSuffix(int suffix)
Set the article name suffix.
|
static final short TYPE_INDEX
static final short TYPE_ARTICLE
static final short TYPE_DISAMB
static final short TYPE_REDIRECT
static final short TYPE_TEMPLATE
static final short TYPE_RAW_HTML
static final short TYPE_FALLBACK
static final java.lang.String INDEX
static final java.lang.String INDEX_LC
short getArticleType()
default void setArticleNameAlreadyTaken(boolean articleNameAlreadyTaken)
articleNameAlreadyTaken
- true if the article name was already takendefault boolean articleNameAlreadyTaken()
default boolean hasCondition()
java.lang.String getPackage()
getPackage
in interface org.docgene.model.globals.PackagedElement
getPackage
in interface org.docgene.model.globals.XMLRootElement
boolean isKeepingCase()
default java.lang.String getHeader()
java.lang.String getHeader(boolean escaping)
escaping
- true if the text must be escaped to html contentboolean hasID()
default int getSuffix()
default boolean hasSuffix()
default void setSuffix(int suffix)
suffix
- the article name suffixdefault boolean hasTOC()
default void setImages()
default boolean hasAlternateTitles()
default boolean addAlternateTitle(java.lang.String title, boolean keepCase, boolean inDictionnary)
title
- the alternate titlekeepCase
- true if the title description should keep the title description caseinDictionnary
- true if the alternate title must be included in the dictionnary and categoriesdefault java.util.Set<java.lang.String> getAlternateTitles()
default java.util.Map<java.lang.String,AlternateTitle> getAlternateTitlesMap()
default java.util.Set<java.lang.String> getNormalizedAlternateTitles()
default boolean hasSearchableTitles()
default java.util.List<XMLMap> getMaps()
default boolean isRawHTMLArticle()
default boolean hasMaps()
default boolean hasImageMaps()
default boolean hasImages()
XMLParentArticle getArticle()
isDirect()
returns true.default java.lang.String getMeta()
default boolean isTemplate()
default boolean isDirect()
default boolean isDirectXMLArticle()
default boolean isIndex()
void setID(java.lang.String id)
id
- the article idvoid setRoot(org.docgene.model.globals.RootDirectory root)
root
- the rootvoid setDescription(java.lang.String id, java.lang.String desc, boolean keepCase)
id
- the article iddesc
- the article descriptionkeepCase
- true if the article description should keep the title description casejava.lang.String getDescription()
default ArticleRef getRef()
java.util.Set<ArticleRef> getReferences()
default void addReference(ArticleRef ref)
ref
- the article referencedefault java.lang.String getTitle()
java.lang.String getID()
getID
in interface org.docgene.model.globals.RootElement
default java.util.List<NoteContent> getNotes()
default boolean hasNotes()
java.util.Set<java.lang.String> getCategories()
default boolean isValid()
default short getRootElementType()
RootElement.ARTICLE
type.getRootElementType
in interface org.docgene.model.globals.RootElement
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence