public class XMLRawHTMLArticle extends java.lang.Object implements XMLParentArticle, java.lang.Comparable<Article>
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 |
|---|
XMLRawHTMLArticle(java.lang.String id,
java.lang.String desc,
boolean keepCase) |
XMLRawHTMLArticle(java.lang.String id,
java.lang.String desc,
boolean keepCase,
boolean isConcurrent)
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 |
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.
|
void |
addTitle(XMLTitle title)
Add a resolved title to the article.
|
boolean |
articleNameAlreadyTaken()
Return true if the article name was already taken, and the article was not added in the model.
|
int |
compareTo(Article article) |
java.util.Set<java.lang.String> |
getAlternateTitles()
Return the article alternate titles.
|
java.util.Map<java.lang.String,AlternateTitle> |
getAlternateTitlesMap()
Return the article alternate titles to the raw titles Map.
|
XMLRawHTMLArticle |
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 |
getDescription()
Return the article description.
|
org.jsoup.nodes.Document |
getDocument()
Return the document.
|
java.io.File |
getFrameFile()
Return the article frame HTML file.
|
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 the element parent.
|
java.io.File |
getRawHTMLFile()
Return the article raw HTML file.
|
java.util.Set<ArticleRef> |
getReferences()
Return the references used in the article.
|
org.docgene.model.globals.RootDirectory |
getRoot()
Return the root directory.
|
java.util.Map<java.lang.String,TitledElement> |
getSearchableTitles()
Return the map of Searchable titles.
|
java.net.URL |
getURL()
Return the URL.
|
boolean |
hasID()
Return true if the article has a separate ID.
|
boolean |
hasPackage()
Return true if the article has a package.
|
boolean |
hasSearchableTitles()
Return true if the article has searchable titles.
|
boolean |
isDirect()
Return true.
|
boolean |
isInFrame()
Return true if the article content is in a frame.
|
boolean |
isKeepingCase()
Return true if the article title should keep the title description case.
|
boolean |
isRawHTMLArticle()
Return true.
|
boolean |
isRemovingH1Titles()
Return true if H1 titles must be skipped.
|
boolean |
isRemovingNav()
Return true if if the article nav content must be removed.
|
boolean |
isValid()
Return true if the article is valid.
|
void |
removeH1Titles(boolean removeH1Titles)
Set if H1 titles must be skipped.
|
void |
removeNav(boolean removeNav)
Set if the article nav content must be removed.
|
void |
setArticleNameAlreadyTaken(boolean articleNameAlreadyTaken)
Set if the article name was already taken, and the article was not added in the model.
|
void |
setCategories(java.util.Set<java.lang.String> categories)
Set the categories on which this article belongs.
|
void |
setDescription(java.lang.String id,
java.lang.String desc,
boolean keepCase)
Set the article description.
|
void |
setDocument(org.jsoup.nodes.Document doc)
Set the document.
|
void |
setID(java.lang.String id)
Set the article ID.
|
void |
setInFrame(boolean inFrame)
Set if the article content is in a frame.
|
void |
setInputFile(java.io.File file)
Set the article input XML file.
|
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 |
setOutputFile(java.io.File file,
java.io.File frameFile)
Set the article output XML file.
|
void |
setPackage(java.lang.String pack)
Set the package ID of the article.
|
void |
setRoot(org.docgene.model.globals.RootDirectory root)
Set the root directory.
|
void |
setURL(java.net.URL url)
Set the URL.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcountSortableTables, getAnchor, getAnchorElements, getAnchors, getIncludes, getInfoboxes, getMessageBoxes, getNotes, getReviewElements, getSeeAlso, getSeeAlsoHeading, getTitledElementsList, hasAnchor, hasAnchors, hasIncludes, hasInfoboxes, hasMessageBoxes, hasNotes, hasTitledElementsList, incrementSortableTables, isGlobalIndex, isNotesTwoColumns, isXMLArticleaddReference, getMaps, getNormalizedAlternateTitles, getRef, getRootElementType, getSuffix, getTitle, hasAlternateTitles, hasCondition, hasImageMaps, hasImages, hasMaps, hasSuffix, hasTOC, isDirectXMLArticle, isIndex, isTemplate, setImages, setSuffixgetAbsolutePath, getRelativePath, hasInputFile, isParsablehasRoot, isArticle, isFallback, notExistingInputFilehasOutputFilepublic XMLRawHTMLArticle(java.lang.String id,
java.lang.String desc,
boolean keepCase)
public XMLRawHTMLArticle(java.lang.String id,
java.lang.String desc,
boolean keepCase,
boolean isConcurrent)
id - the article iddesc - the article description. The article getID() will be equal to its descriptionkeepCase - true if the article description should keep the title description caseisConcurrent - true for concurrent parsingpublic void setArticleNameAlreadyTaken(boolean articleNameAlreadyTaken)
setArticleNameAlreadyTaken in interface ArticlearticleNameAlreadyTaken - true if the article name was already takenpublic boolean articleNameAlreadyTaken()
articleNameAlreadyTaken in interface Articlepublic short getArticleType()
getArticleType in interface Articlepublic void setDocument(org.jsoup.nodes.Document doc)
doc - the documentpublic org.jsoup.nodes.Document getDocument()
public boolean isValid()
public boolean isDirect()
public boolean isRawHTMLArticle()
isRawHTMLArticle in interface Articlepublic java.lang.String getID()
public boolean hasID()
public void setInFrame(boolean inFrame)
inFrame - true if the article content is in a framepublic boolean isInFrame()
public void removeNav(boolean removeNav)
removeNav - true if the article nav content must be removedpublic boolean isRemovingNav()
public void removeH1Titles(boolean removeH1Titles)
removeH1Titles - true if H1 titles must be skippedpublic boolean isRemovingH1Titles()
public boolean isKeepingCase()
isKeepingCase in interface Articlepublic 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 setURL(java.net.URL url)
url - the URLpublic java.net.URL getURL()
public java.lang.String getHeader(boolean escaping)
public java.lang.String getHeader()
public XMLRawHTMLArticle getArticle()
getArticle in interface Articlepublic void addTitle(XMLTitle title)
title - the titlepublic java.util.Map<java.lang.String,TitledElement> getSearchableTitles()
getSearchableTitles in interface XMLParentArticlepublic boolean hasSearchableTitles()
hasSearchableTitles in interface Articlepublic void setID(java.lang.String id)
public final 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 getDescription()
getDescription 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.Map<java.lang.String,AlternateTitle> getAlternateTitlesMap()
getAlternateTitlesMap in interface Articlepublic 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 setCategories(java.util.Set<java.lang.String> categories)
categories - the categories on which this article belongspublic java.util.Set<java.lang.String> getCategories()
getCategories in interface Articlepublic void setRoot(org.docgene.model.globals.RootDirectory root)
public org.docgene.model.globals.RootDirectory getRoot()
getRoot in interface org.docgene.model.globals.RootElementpublic 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 void addLinkFromArticle(XMLParentArticle article)
addLinkFromArticle in interface XMLParentArticlearticle - the articlepublic void setLinkFromArticles(java.util.SortedMap<java.lang.String,XMLParentArticle> linksFrom)
setLinkFromArticles in interface XMLParentArticlelinksFrom - the articles from which there is a reference to this articlepublic java.util.SortedMap<java.lang.String,XMLParentArticle> getLinksFrom()
getLinksFrom in interface XMLParentArticlepublic 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 setOutputFile(java.io.File file,
java.io.File frameFile)
file - the article output XML fileframeFile - the frame filepublic void setOutputFile(java.io.File file)
setOutputFile in interface XMLParentArticlefile - the article output XML filepublic java.io.File getOutputFile()
getOutputFile in interface HTMLOutputpublic java.io.File getFrameFile()
public java.io.File getRawHTMLFile()
public void addArticleParent(XMLParentArticle article)
XMLParentArticleaddArticleParent in interface XMLParentArticlearticle - the articlepublic java.util.Map<java.lang.String,XMLParentArticle> getArticleParents()
XMLParentArticlegetArticleParents in interface XMLParentArticlepublic XMLParent getParent()
XMLParentpublic 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