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_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
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, wait
countSortableTables, getAnchor, getAnchorElements, getAnchors, getIncludes, getInfoboxes, getMessageBoxes, getNotes, getReviewElements, getSearchableTitles, getSeeAlso, getSeeAlsoHeading, getTitledElementsList, hasAnchor, hasAnchors, hasIncludes, hasInfoboxes, hasMessageBoxes, hasNotes, hasTitledElementsList, incrementSortableTables, isGlobalIndex, isNotesTwoColumns, isXMLArticle
addReference, articleNameAlreadyTaken, getAlternateTitles, getAlternateTitlesMap, getMaps, getNormalizedAlternateTitles, getRootElementType, getTitle, hasAlternateTitles, hasCondition, hasImageMaps, hasImages, hasMaps, hasSearchableTitles, hasSuffix, isIndex, isRawHTMLArticle, isTemplate, isValid, setArticleNameAlreadyTaken, setImages
getAbsolutePath, hasInputFile, isParsable
hasRoot, isArticle, isFallback, notExistingInputFile
hasOutputFile
protected 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 Article
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 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.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 void setKeepCase(boolean keepCase)
keepCase
- true if the article title should keep the title description casepublic boolean isKeepingCase()
isKeepingCase
in interface Article
public 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 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 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.XMLRootElement
file
- 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.XMLRootElement
public java.io.File getInputFile()
getInputFile
in interface org.docgene.model.globals.RootElement
public boolean isDirect()
public boolean isDirectXMLArticle()
isDirectXMLArticle
in interface Article
public void setOutputFile(java.io.File file)
setOutputFile
in interface XMLParentArticle
file
- the article output XML filepublic java.io.File getOutputFile()
getOutputFile
in interface HTMLOutput
public void setLinksFromFile(java.io.File file)
setLinksFromFile
in interface XMLParentArticle
file
- the article links from XML filepublic java.io.File getLinksFromFile()
getLinksFromFile
in interface XMLParentArticle
public java.util.Set<ArticleRef> getReferences()
getReferences
in interface Article
public java.lang.String getDescription()
getDescription
in interface Article
public 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 Article
public OpaqueArticle getArticle()
getArticle
in interface Article
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(Article article)
compareTo
in interface java.lang.Comparable<Article>
public void addArticleParent(XMLParentArticle article)
XMLParentArticle
addArticleParent
in interface XMLParentArticle
article
- the articlepublic java.util.Map<java.lang.String,XMLParentArticle> getArticleParents()
XMLParentArticle
getArticleParents
in interface XMLParentArticle
public void addLinkFromArticle(XMLParentArticle article)
XMLParentArticle
addLinkFromArticle
in interface XMLParentArticle
article
- the articlepublic void setLinkFromArticles(java.util.SortedMap<java.lang.String,XMLParentArticle> linksFrom)
XMLParentArticle
setLinkFromArticles
in interface XMLParentArticle
linksFrom
- the articles from which there is a reference to this articlepublic java.util.SortedMap<java.lang.String,XMLParentArticle> getLinksFrom()
XMLParentArticle
getLinksFrom
in interface XMLParentArticle
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.util.List<XMLChapter> getChapters()
XMLParent
getChapters
in interface XMLParent
public void addChapter(XMLChapter chapter)
XMLParent
addChapter
in interface XMLParent
chapter
- the chapterpublic java.util.List<AbstractParagraph> getParagraphs()
XMLParent
getParagraphs
in interface XMLParent
public void addParagraph(AbstractParagraph par)
XMLParent
addParagraph
in interface XMLParent
par
- the paragraphCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence