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_TEMPLATEARTICLE, CATEGORIES, CATEGORY, DICTIONARY, FOOTER, FULL_TEXT_SEARCH, GLOSSARY, HEADER, IMAGE_DEFINITION, IMAGES_DEFINITION, INFOBOX_DEFINITION, INFOBOX_PROPERTY, MENUS, PACKAGE, RESOURCE_DEFINITION, RESOURCES_DEFINITION, UNDEFINEDTYPE_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, waitacceptTOCLevel, acceptTOCLevel, addReference, articleNameAlreadyTaken, getAlternateTitlesMap, getHeader, getMaps, getMaximumTOCLevel, getNormalizedAlternateTitles, getNotes, getRef, getRootElementType, getTitle, hasCondition, hasImageMaps, hasImages, hasMaps, hasMaximumTOCLevel, hasNotes, hasSearchableTitles, hasSuffix, hasTOC, isDirect, isDirectXMLArticle, isIndex, isRawHTMLArticle, isTemplate, setArticleNameAlreadyTaken, setImagesgetAbsolutePath, getRelativePath, hasInputFile, isParsablehasRoot, isArticle, isFallback, notExistingInputFileisAutoDesc, isBareReference, setDescgetCustomStyles, getDeclaration, getInlinedStyle, getStyle, hasInlinedStyle, setCustomStyles, setCustomStyles, setInlinedStylehasLineNumberpublic 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 Articlepublic void setLineNumber(int lineNumber)
lineNumber - the line numberpublic int getLineNumber()
getLineNumber in interface ElementReferencepublic int getSuffix()
public void setSuffix(int suffix)
public void setPackage(java.lang.String pack)
setPackage in interface org.docgene.model.globals.XMLRootElementpack - the package ID of the articlepublic java.lang.String getPackage()
getPackage in interface ArticlegetPackage in interface org.docgene.model.globals.PackagedElementgetPackage in interface org.docgene.model.globals.XMLRootElementpublic boolean hasPackage()
hasPackage in interface org.docgene.model.globals.PackagedElementhasPackage in interface org.docgene.model.globals.XMLRootElementpublic java.lang.String getRefPackage()
getRefPackage in interface ArticleReferencepublic void setKeepCase(boolean keepCase)
keepCase - true if the article title should keep the title description casepublic boolean isKeepingCase()
isKeepingCase in interface Articlepublic java.lang.String getHeader(boolean escaping)
public boolean hasID()
public boolean hasAlternateTitles()
hasAlternateTitles in interface Articlepublic boolean addAlternateTitle(java.lang.String title,
boolean keepCase,
boolean inDictionnary)
addAlternateTitle in interface Articletitle - 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 Articlepublic 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.XMLRootElementfile - the article input XML filepublic java.io.File getInputFile()
getInputFile in interface org.docgene.model.globals.RootElementpublic void setRoot(org.docgene.model.globals.RootDirectory root)
public org.docgene.model.globals.RootDirectory getRoot()
getRoot in interface org.docgene.model.globals.RootElementpublic java.lang.String getDescription()
getDescription in interface Articlepublic 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 Articleid - the article iddesc - the article descriptionkeepCase - true if the article description should keep the title description casepublic java.lang.String getDesc()
getDesc in interface ArticleReferencepublic void setRefID(java.lang.String refID)
refID - the referenced article IDpublic java.lang.String getRefID()
getRefID in interface ArticleReferencepublic AnchorElement getAnchorElement()
getAnchorElement in interface ArticleReferencepublic java.util.Set<ArticleRef> getReferences()
getReferences in interface Articlepublic java.util.Set<java.lang.String> getCategories()
getCategories in interface Articlepublic void bind(XMLParentArticle article)
bind in interface ArticleReferencearticle - the referenced articlepublic ArticleRef getArticleRef()
getArticleRef in interface ArticleReferencepublic boolean isValid()
public void bind(XMLParentArticle article, AnchorElement anchor)
bind in interface ArticleReferencearticle - the referenced articleanchor - the AnchorElementpublic java.lang.String toString()
toString in class java.lang.Objectpublic XMLParentArticle getArticle()
getArticle in interface Articlepublic XMLParentArticle getReferencedArticle()
getReferencedArticle in interface ArticleReferencepublic boolean isBound()
isBound in interface ArticleReferenceCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence