public class XMLRawHTMLArticle extends java.lang.Object implements XMLParentArticle, java.lang.Comparable<org.docgene.model.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(org.docgene.model.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(org.docgene.model.Article article) |
java.util.Set<java.lang.String> |
getAlternateTitles()
Return the article alternate titles.
|
java.util.Map<java.lang.String,org.docgene.model.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<org.docgene.model.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,org.docgene.model.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, isParsablepublic 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 org.docgene.model.ArticlearticleNameAlreadyTaken - true if the article name was already takenpublic boolean articleNameAlreadyTaken()
articleNameAlreadyTaken in interface org.docgene.model.Articlepublic short getArticleType()
getArticleType in interface org.docgene.model.Articlepublic void setDocument(org.jsoup.nodes.Document doc)
doc - the documentpublic org.jsoup.nodes.Document getDocument()
public boolean isValid()
isValid in interface org.docgene.model.Articlepublic boolean isDirect()
isDirect in interface org.docgene.model.Articlepublic boolean isRawHTMLArticle()
isRawHTMLArticle in interface org.docgene.model.Articlepublic java.lang.String getID()
getID in interface org.docgene.model.ArticlegetID in interface org.docgene.model.globals.RootElementpublic boolean hasID()
hasID in interface org.docgene.model.Articlepublic 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 org.docgene.model.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 org.docgene.model.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)
getHeader in interface org.docgene.model.Articleescaping - true if the text must be escaped to html contentpublic java.lang.String getHeader()
getHeader in interface org.docgene.model.Articlepublic XMLRawHTMLArticle getArticle()
getArticle in interface org.docgene.model.Articlepublic void addTitle(XMLTitle title)
title - the titlepublic java.util.Map<java.lang.String,org.docgene.model.TitledElement> getSearchableTitles()
getSearchableTitles in interface XMLParentArticlepublic boolean hasSearchableTitles()
hasSearchableTitles in interface org.docgene.model.Articlepublic void setID(java.lang.String id)
setID in interface org.docgene.model.Articleid - the article idpublic final void setDescription(java.lang.String id,
java.lang.String desc,
boolean keepCase)
setDescription in interface org.docgene.model.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 org.docgene.model.Articlepublic boolean addAlternateTitle(java.lang.String title,
boolean keepCase,
boolean inDictionnary)
addAlternateTitle in interface org.docgene.model.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,org.docgene.model.AlternateTitle> getAlternateTitlesMap()
getAlternateTitlesMap in interface org.docgene.model.Articlepublic java.util.Set<java.lang.String> getAlternateTitles()
getAlternateTitles in interface org.docgene.model.Articlepublic void setMeta(java.lang.String meta)
meta - the meta descriptionpublic java.lang.String getMeta()
getMeta in interface org.docgene.model.Articlepublic 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 org.docgene.model.Articlepublic void setRoot(org.docgene.model.globals.RootDirectory root)
setRoot in interface org.docgene.model.Articleroot - the rootpublic 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 org.docgene.model.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 org.docgene.model.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<org.docgene.model.AbstractParagraph> getParagraphs()
XMLParentgetParagraphs in interface XMLParentpublic void addParagraph(org.docgene.model.AbstractParagraph par)
XMLParentaddParagraph in interface XMLParentpar - the paragraphpublic int compareTo(org.docgene.model.Article article)
compareTo in interface java.lang.Comparable<org.docgene.model.Article>Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence