public class OpaqueArticle extends java.lang.Object implements XMLParentArticle, java.lang.Comparable<Article>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
desc |
protected java.lang.String |
id |
protected java.lang.String |
pack |
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, UNDEFINED| Constructor and Description |
|---|
OpaqueArticle(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 |
addArticleParent(XMLParentArticle article)
Add an article which include this article.
|
void |
addCategory(java.lang.String category)
Add a category on which this article belongs.
|
void |
addChapter(XMLChapter chapter)
Add a chapter.
|
void |
addLinkFromArticle(XMLParentArticle article)
Add an article from which there is a reference to this article.
|
void |
addParagraph(AbstractParagraph par)
Add a paragraph.
|
int |
compareTo(Article article) |
boolean |
equals(java.lang.Object obj) |
OpaqueArticle |
getArticle()
Return itself.
|
java.util.Map<java.lang.String,XMLParentArticle> |
getArticleParents()
Return the articles which include this article.
|
short |
getArticleType()
Return the article type.
|
java.util.Set<java.lang.String> |
getCategories()
Return the categories on which this article belongs.
|
java.util.List<XMLChapter> |
getChapters()
Return the element children chapters.
|
java.lang.String |
getDefaultContent()
Return the default content for the opaque article.
|
java.lang.String |
getDescription()
Return the article description.
|
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.
|
java.io.File |
getInputFile()
Return the article input XML file.
|
java.util.SortedMap<java.lang.String,XMLParentArticle> |
getLinksFrom()
Return the articles from which there is a reference to this article.
|
java.io.File |
getLinksFromFile()
Return the article links from HTML file.
|
java.lang.String |
getMeta()
Return the meta description to be used for the article for the dictionnary or categories.
|
java.io.File |
getOutputFile()
Return the article output HTML file.
|
java.lang.String |
getPackage()
Return the article package.
|
java.util.List<AbstractParagraph> |
getParagraphs()
Return the element children paragraphs.
|
XMLParent |
getParent()
Return null.
|
ArticleRef |
getRef()
Return the article ref.
|
java.util.Set<ArticleRef> |
getReferences()
Return the references used in the article.
|
java.lang.String |
getRelativePath()
Return the relative path of the article XML file, from the associated root.
|
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 |
hasDefaultContent()
Return true if there is a default content for the opaque article. if there is a default content and the associated file does not exist, then the
article will be created with only the default content.
|
int |
hashCode() |
boolean |
hasID()
Return true if the article has a separate ID.
|
boolean |
hasPackage()
Return true if the article has a package.
|
boolean |
hasTOC()
Return true if the article should have a Table of content (true by default).
|
boolean |
isDirect()
Return true.
|
boolean |
isDirectXMLArticle()
Return false.
|
boolean |
isKeepingCase()
Return true if the article title should keep the title description case.
|
void |
setCategories(java.util.Set<java.lang.String> categories)
Set the categories on which this article belongs.
|
void |
setDefaultContent(java.lang.String defaultContent)
Set a default content for the opaque article.
|
void |
setDescription(java.lang.String id,
java.lang.String desc,
boolean keepCase)
Set the article description.
|
void |
setEmptyDefaultContent()
Set an empty default content for the opaque article.
|
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 |
setLinkFromArticles(java.util.SortedMap<java.lang.String,XMLParentArticle> linksFrom)
Set the articles from which there is a reference to this article.
|
void |
setLinksFromFile(java.io.File file)
Set the article links from XML file.
|
void |
setMeta(java.lang.String meta)
Set the meta description to be used for the article for the dictionnary or categories.
|
void |
setOutputFile(java.io.File file)
Set the article output XML file.
|
void |
setPackage(java.lang.String pack)
Set the package ID of the article.
|
void |
setRelativePath(java.lang.String path)
Set the relative path of the article XML file, from the associated root.
|
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, finalize, getClass, notify, notifyAll, wait, wait, waitcountSortableTables, getAnchor, getAnchorElements, getAnchors, getIncludes, getInfoboxes, getMessageBoxes, getNotes, getReviewElements, getSearchableTitles, getSeeAlso, getSeeAlsoHeading, getTitledElementsList, hasAnchor, hasAnchors, hasIncludes, hasInfoboxes, hasMessageBoxes, hasNotes, hasTitledElementsList, incrementSortableTables, isGlobalIndex, isNotesTwoColumns, isXMLArticleaddReference, articleNameAlreadyTaken, getAlternateTitles, getAlternateTitlesMap, getMaps, getNormalizedAlternateTitles, getRootElementType, getTitle, hasAlternateTitles, hasCondition, hasImageMaps, hasImages, hasMaps, hasSearchableTitles, hasSuffix, isIndex, isRawHTMLArticle, isTemplate, isValid, setArticleNameAlreadyTaken, setImagesgetAbsolutePath, hasInputFile, isParsablehasRoot, isArticle, isFallback, notExistingInputFilehasOutputFileprotected java.lang.String pack
protected java.lang.String id
protected java.lang.String desc
public OpaqueArticle(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 int getSuffix()
public void setSuffix(int suffix)
public short getArticleType()
getArticleType in interface Articlepublic 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 void setEmptyDefaultContent()
public void setDefaultContent(java.lang.String defaultContent)
defaultContent - the default contentpublic java.lang.String getDefaultContent()
public boolean hasDefaultContent()
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 void setKeepCase(boolean keepCase)
keepCase - true if the article title should keep the title description casepublic boolean isKeepingCase()
isKeepingCase in interface Articlepublic boolean hasTOC()
public java.lang.String getHeader(boolean escaping)
public java.lang.String getHeader()
public boolean hasID()
public 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 void setMeta(java.lang.String meta)
meta - the meta descriptionpublic java.lang.String getMeta()
public XMLParent getParent()
public void setInputFile(java.io.File file)
setInputFile in interface org.docgene.model.globals.XMLRootElementfile - the article input XML filepublic void setRelativePath(java.lang.String path)
path - the relative pathpublic java.lang.String getRelativePath()
getRelativePath in interface org.docgene.model.globals.XMLRootElementpublic java.io.File getInputFile()
getInputFile in interface org.docgene.model.globals.RootElementpublic boolean isDirect()
public boolean isDirectXMLArticle()
isDirectXMLArticle in interface Articlepublic void setOutputFile(java.io.File file)
setOutputFile in interface XMLParentArticlefile - the article output XML filepublic java.io.File getOutputFile()
getOutputFile in interface HTMLOutputpublic void setLinksFromFile(java.io.File file)
setLinksFromFile in interface XMLParentArticlefile - the article links from XML filepublic java.io.File getLinksFromFile()
getLinksFromFile in interface XMLParentArticlepublic java.util.Set<ArticleRef> getReferences()
getReferences in interface Articlepublic java.lang.String getDescription()
getDescription in interface Articlepublic java.lang.String getID()
public ArticleRef getRef()
public void setCategories(java.util.Set<java.lang.String> categories)
categories - the categories on which this article belongspublic void addCategory(java.lang.String category)
category - the categorypublic java.util.Set<java.lang.String> getCategories()
getCategories in interface Articlepublic OpaqueArticle getArticle()
getArticle in interface Articlepublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(Article article)
compareTo in interface java.lang.Comparable<Article>public void addArticleParent(XMLParentArticle article)
XMLParentArticleaddArticleParent in interface XMLParentArticlearticle - the articlepublic java.util.Map<java.lang.String,XMLParentArticle> getArticleParents()
XMLParentArticlegetArticleParents in interface XMLParentArticlepublic void addLinkFromArticle(XMLParentArticle article)
XMLParentArticleaddLinkFromArticle in interface XMLParentArticlearticle - the articlepublic void setLinkFromArticles(java.util.SortedMap<java.lang.String,XMLParentArticle> linksFrom)
XMLParentArticlesetLinkFromArticles in interface XMLParentArticlelinksFrom - the articles from which there is a reference to this articlepublic java.util.SortedMap<java.lang.String,XMLParentArticle> getLinksFrom()
XMLParentArticlegetLinksFrom in interface XMLParentArticlepublic void setRoot(org.docgene.model.globals.RootDirectory root)
public org.docgene.model.globals.RootDirectory getRoot()
getRoot in interface org.docgene.model.globals.RootElementpublic java.util.List<XMLChapter> getChapters()
XMLParentgetChapters in interface XMLParentpublic void addChapter(XMLChapter chapter)
XMLParentaddChapter in interface XMLParentchapter - the chapterpublic java.util.List<AbstractParagraph> getParagraphs()
XMLParentgetParagraphs in interface XMLParentpublic void addParagraph(AbstractParagraph par)
XMLParentaddParagraph in interface XMLParentpar - the paragraphCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence