public class XMLRedirect extends java.lang.Object implements Article, ArticleReference
INDEX, INDEX_LC, TYPE_ARTICLE, TYPE_DISAMB, TYPE_FALLBACK, TYPE_INDEX, TYPE_RAW_HTML, TYPE_REDIRECT, TYPE_TEMPLATE
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
TYPE_NONE
Constructor and Description |
---|
XMLRedirect(java.lang.String desc,
boolean keepCase)
Constructor.
|
XMLRedirect(java.lang.String id,
java.lang.String desc,
boolean keepCase)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addAlternateTitle(java.lang.String title,
boolean keepCase,
boolean inDictionnary)
Add an alternate title to the article.
|
void |
bind(XMLParentArticle article)
Set the referenced article.
|
void |
bind(XMLParentArticle article,
AnchorElement anchor)
Set the referenced article and associated chapter or title.
|
java.util.Set<java.lang.String> |
getAlternateTitles()
Return the article alternate titles.
|
AnchorElement |
getAnchorElement()
Return the referenced anchor element.
|
XMLParentArticle |
getArticle()
Return the XMLArticle which is really accessed through this Article.
|
ArticleRef |
getArticleRef()
Return the associated reference.
|
short |
getArticleType()
Return the article type.
|
java.util.Set<java.lang.String> |
getCategories()
Return the categories on which this article belongs.
|
java.lang.String |
getDesc()
Return the reference text.
|
java.lang.String |
getDescription()
Return the article description.
|
java.lang.String |
getHeader(boolean escaping)
Construct the header text for the redirect article.
|
java.lang.String |
getID()
Return the article ID.
|
java.io.File |
getInputFile()
Return the article input XML file.
|
int |
getLineNumber()
Return the line where the reference appear.
|
java.lang.String |
getMeta()
Return the meta description to be used for the article for the dictionnary or categories.
|
java.lang.String |
getPackage()
Return the article package.
|
XMLParentArticle |
getReferencedArticle()
Return the XMLArticle which is really accessed through this Article.
|
java.util.Set<ArticleRef> |
getReferences()
Return the references used in the article.
|
java.lang.String |
getRefID()
Return the referenced article ID.
|
java.lang.String |
getRefPackage()
Return the referenced article package.
|
org.docgene.model.globals.RootDirectory |
getRoot()
Return the root directory.
|
int |
getSuffix()
Return the article name suffix (used for articles which have the name of an already existing article).
|
boolean |
hasAlternateTitles()
Return false.
|
boolean |
hasID()
Return true if the article has a separate ID.
|
boolean |
hasPackage()
Return true if the article has a package.
|
boolean |
isBound()
Return true if the reference is bound.
|
boolean |
isKeepingCase()
Return true if the article title should keep the title description case.
|
boolean |
isValid()
Return true if the redirect is valid.
|
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.
|
void |
setInputFile(java.io.File file)
Set the article input XML file.
|
void |
setKeepCase(boolean keepCase)
Set if the article title should keep the title description case.
|
void |
setLineNumber(int lineNumber)
Set the line number where the reference appear.
|
void |
setMeta(java.lang.String meta)
Set the meta description to be used for the article for the dictionnary or categories.
|
void |
setPackage(java.lang.String pack)
Set the package ID of the article.
|
void |
setRefID(java.lang.String refID)
Set the referenced article ID.
|
void |
setRoot(org.docgene.model.globals.RootDirectory root)
Set the root directory.
|
void |
setSuffix(int suffix)
Set the article name suffix.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addReference, articleNameAlreadyTaken, getAlternateTitlesMap, getHeader, getMaps, getNormalizedAlternateTitles, getNotes, getRef, getRootElementType, getTitle, hasCondition, hasImageMaps, hasImages, hasMaps, hasNotes, hasSearchableTitles, hasSuffix, hasTOC, isDirect, isDirectXMLArticle, isIndex, isRawHTMLArticle, isTemplate, setArticleNameAlreadyTaken, setImages
getAbsolutePath, getRelativePath, hasInputFile, isParsable
hasRoot, isArticle, isFallback, notExistingInputFile
isAutoDesc, isBareReference, setDesc
getCustomStyles, getDeclaration, getInlinedStyle, getStyle, hasInlinedStyle, setCustomStyles, setCustomStyles, setInlinedStyle
hasLineNumber
public XMLRedirect(java.lang.String desc, boolean keepCase)
desc
- the article description. The article getID()
will be equal to its descriptionkeepCase
- true if the article description should keep the title description casepublic XMLRedirect(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 casepublic short getArticleType()
getArticleType
in interface Article
public void setLineNumber(int lineNumber)
lineNumber
- the line numberpublic int getLineNumber()
getLineNumber
in interface ElementReference
public int getSuffix()
public void setSuffix(int suffix)
public void setPackage(java.lang.String pack)
setPackage
in interface org.docgene.model.globals.XMLRootElement
pack
- the package ID of the articlepublic java.lang.String getPackage()
getPackage
in interface Article
getPackage
in interface org.docgene.model.globals.PackagedElement
getPackage
in interface org.docgene.model.globals.XMLRootElement
public boolean hasPackage()
hasPackage
in interface org.docgene.model.globals.PackagedElement
hasPackage
in interface org.docgene.model.globals.XMLRootElement
public java.lang.String getRefPackage()
getRefPackage
in interface ArticleReference
public void setKeepCase(boolean keepCase)
keepCase
- true if the article title should keep the title description casepublic boolean isKeepingCase()
isKeepingCase
in interface Article
public java.lang.String getHeader(boolean escaping)
public boolean hasID()
public boolean hasAlternateTitles()
hasAlternateTitles
in interface Article
public boolean addAlternateTitle(java.lang.String title, boolean keepCase, boolean inDictionnary)
addAlternateTitle
in interface Article
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 categoriespublic java.util.Set<java.lang.String> getAlternateTitles()
getAlternateTitles
in interface Article
public void setMeta(java.lang.String meta)
meta
- the meta descriptionpublic java.lang.String getMeta()
public void setInputFile(java.io.File file)
setInputFile
in interface org.docgene.model.globals.XMLRootElement
file
- the article input XML filepublic java.io.File getInputFile()
getInputFile
in interface org.docgene.model.globals.RootElement
public void setRoot(org.docgene.model.globals.RootDirectory root)
public org.docgene.model.globals.RootDirectory getRoot()
getRoot
in interface org.docgene.model.globals.RootElement
public java.lang.String getDescription()
getDescription
in interface Article
public java.lang.String getID()
public void setID(java.lang.String id)
public void setDescription(java.lang.String id, java.lang.String desc, boolean keepCase)
setDescription
in interface Article
id
- the article iddesc
- the article descriptionkeepCase
- true if the article description should keep the title description casepublic java.lang.String getDesc()
getDesc
in interface ArticleReference
public void setRefID(java.lang.String refID)
refID
- the referenced article IDpublic java.lang.String getRefID()
getRefID
in interface ArticleReference
public AnchorElement getAnchorElement()
getAnchorElement
in interface ArticleReference
public java.util.Set<ArticleRef> getReferences()
getReferences
in interface Article
public java.util.Set<java.lang.String> getCategories()
getCategories
in interface Article
public void bind(XMLParentArticle article)
bind
in interface ArticleReference
article
- the referenced articlepublic ArticleRef getArticleRef()
getArticleRef
in interface ArticleReference
public boolean isValid()
public void bind(XMLParentArticle article, AnchorElement anchor)
bind
in interface ArticleReference
article
- the referenced articleanchor
- the AnchorElementpublic java.lang.String toString()
toString
in class java.lang.Object
public XMLParentArticle getArticle()
getArticle
in interface Article
public XMLParentArticle getReferencedArticle()
getReferencedArticle
in interface ArticleReference
public boolean isBound()
isBound
in interface ArticleReference
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence