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_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 |
---|
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, wait
countSortableTables, getAnchor, getAnchorElements, getAnchors, getIncludes, getInfoboxes, getMessageBoxes, getNotes, getReviewElements, getSeeAlso, getSeeAlsoHeading, getTitledElementsList, hasAnchor, hasAnchors, hasIncludes, hasInfoboxes, hasMessageBoxes, hasNotes, hasTitledElementsList, incrementSortableTables, isGlobalIndex, isNotesTwoColumns, isXMLArticle
addReference, getMaps, getNormalizedAlternateTitles, getRef, getRootElementType, getSuffix, getTitle, hasAlternateTitles, hasCondition, hasImageMaps, hasImages, hasMaps, hasSuffix, hasTOC, isDirectXMLArticle, isIndex, isTemplate, setImages, setSuffix
getAbsolutePath, getRelativePath, hasInputFile, isParsable
public 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.Article
articleNameAlreadyTaken
- true if the article name was already takenpublic boolean articleNameAlreadyTaken()
articleNameAlreadyTaken
in interface org.docgene.model.Article
public short getArticleType()
getArticleType
in interface org.docgene.model.Article
public void setDocument(org.jsoup.nodes.Document doc)
doc
- the documentpublic org.jsoup.nodes.Document getDocument()
public boolean isValid()
isValid
in interface org.docgene.model.Article
public boolean isDirect()
isDirect
in interface org.docgene.model.Article
public boolean isRawHTMLArticle()
isRawHTMLArticle
in interface org.docgene.model.Article
public java.lang.String getID()
getID
in interface org.docgene.model.Article
getID
in interface org.docgene.model.globals.RootElement
public boolean hasID()
hasID
in interface org.docgene.model.Article
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 org.docgene.model.Article
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 org.docgene.model.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 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.Article
escaping
- true if the text must be escaped to html contentpublic java.lang.String getHeader()
getHeader
in interface org.docgene.model.Article
public XMLRawHTMLArticle getArticle()
getArticle
in interface org.docgene.model.Article
public void addTitle(XMLTitle title)
title
- the titlepublic java.util.Map<java.lang.String,org.docgene.model.TitledElement> getSearchableTitles()
getSearchableTitles
in interface XMLParentArticle
public boolean hasSearchableTitles()
hasSearchableTitles
in interface org.docgene.model.Article
public void setID(java.lang.String id)
setID
in interface org.docgene.model.Article
id
- the article idpublic final void setDescription(java.lang.String id, java.lang.String desc, boolean keepCase)
setDescription
in interface org.docgene.model.Article
id
- 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.Article
public boolean addAlternateTitle(java.lang.String title, boolean keepCase, boolean inDictionnary)
addAlternateTitle
in interface org.docgene.model.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 java.util.Map<java.lang.String,org.docgene.model.AlternateTitle> getAlternateTitlesMap()
getAlternateTitlesMap
in interface org.docgene.model.Article
public java.util.Set<java.lang.String> getAlternateTitles()
getAlternateTitles
in interface org.docgene.model.Article
public void setMeta(java.lang.String meta)
meta
- the meta descriptionpublic java.lang.String getMeta()
getMeta
in interface org.docgene.model.Article
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 org.docgene.model.Article
public void setRoot(org.docgene.model.globals.RootDirectory root)
setRoot
in interface org.docgene.model.Article
root
- the rootpublic org.docgene.model.globals.RootDirectory getRoot()
getRoot
in interface org.docgene.model.globals.RootElement
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 org.docgene.model.Article
public void addLinkFromArticle(XMLParentArticle article)
addLinkFromArticle
in interface XMLParentArticle
article
- the articlepublic void setLinkFromArticles(java.util.SortedMap<java.lang.String,XMLParentArticle> linksFrom)
setLinkFromArticles
in interface XMLParentArticle
linksFrom
- the articles from which there is a reference to this articlepublic java.util.SortedMap<java.lang.String,XMLParentArticle> getLinksFrom()
getLinksFrom
in interface XMLParentArticle
public void setInputFile(java.io.File file)
setInputFile
in interface org.docgene.model.globals.XMLRootElement
file
- the article input XML filepublic java.io.File getInputFile()
getInputFile
in interface org.docgene.model.globals.RootElement
public 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 XMLParentArticle
file
- the article output XML filepublic java.io.File getOutputFile()
getOutputFile
in interface org.docgene.model.HTMLOutput
public java.io.File getFrameFile()
public java.io.File getRawHTMLFile()
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 XMLParent getParent()
XMLParent
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<org.docgene.model.AbstractParagraph> getParagraphs()
XMLParent
getParagraphs
in interface XMLParent
public void addParagraph(org.docgene.model.AbstractParagraph par)
XMLParent
addParagraph
in interface XMLParent
par
- 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