public class XMLChapter extends org.docgene.model.AbstractXMLParent implements ParagraphElementParent, ParagraphElement, org.docgene.model.TitledElement, JustifiedElement
TYPE_NONE
ALIGNMENT_CENTER, ALIGNMENT_INHERIT, ALIGNMENT_JUSTIFIED, ALIGNMENT_LEFT, ALIGNMENT_NONE, ALIGNMENT_RIGHT, JUSTIFIED_AUTO, JUSTIFIED_CHARACTER, JUSTIFIED_INHERIT, JUSTIFIED_NONE, JUSTIFIED_WORD
Constructor and Description |
---|
XMLChapter(XMLParent parent,
java.lang.String title,
boolean keepCase)
Constructor.
|
XMLChapter(XMLParent parent,
java.lang.String title,
java.lang.String id,
boolean keepCase)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(ParagraphElement element)
Add an element.
|
void |
addParagraph(org.docgene.model.AbstractParagraph par)
Add a paragraph.
|
char |
getAlignment()
Return the alignment of the element.
|
java.util.Set<java.lang.String> |
getCustomStyles()
Return the element custom classes.
|
java.lang.String |
getDeclaration()
Return the declaration ID of the element.
|
java.util.List<ParagraphElement> |
getElements()
Return the list of elements.
|
java.lang.String |
getID()
Return the chapter id.
|
char |
getJustification()
Return the justification of the element.
|
int |
getLevel()
Return the chapter level.
|
XMLParent |
getParent()
Return the chapter parent.
|
java.lang.String |
getSeq()
Return the title sequence id.
|
java.lang.String |
getTitle()
Return the chapter title.
|
boolean |
hasSeq()
Return true if the title has a forced sequence id.
|
boolean |
isDuplicate()
Return true if the chapter is a duplicate of another existing title.
|
boolean |
isKeepingCase()
Return trur if the chapter description should keep the title description case.
|
boolean |
isResolved()
Return true if the title element has having been already resolved.
|
boolean |
isSearchable()
Return true if the chapter title is searchable.
|
void |
removeLastElement()
Remove the last element.
|
void |
setAlignment(char alignment)
Set the alignment of the element.
|
void |
setCustomStyles(java.util.Set<java.lang.String> classes)
Set the element custom classes.
|
void |
setDuplicate(boolean isDuplicate)
Set if the chapter is a duplicate of another existing title.
|
void |
setElements(java.util.List<ParagraphElement> elements)
Set the list of elements.
|
void |
setID(java.lang.String id)
Set the chapter id.
|
void |
setJustification(char justification)
Set the justification of the element.
|
void |
setKeepCase(boolean keepCase)
Set if the chapter description should keep the title description case.
|
void |
setResolved()
Set the titled element as being resolved.
|
void |
setSearchable(boolean isSearchable)
Set if the chapter title is searchable
|
void |
setSeq(java.lang.String seq)
Set the title sequence id.
|
void |
setTitle(java.lang.String title)
Set the title.
|
addChapter, getChapters, getParagraphs
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countElements, getElement, getFirstElement, getLastElement, hasElements, isEmpty
getInlinedStyle, getStyle, hasInlinedStyle, setCustomStyles, setInlinedStyle
public XMLChapter(XMLParent parent, java.lang.String title, boolean keepCase)
parent
- the parenttitle
- the chapter titlekeepCase
- true if the chapter description should keep the title description casepublic XMLChapter(XMLParent parent, java.lang.String title, java.lang.String id, boolean keepCase)
parent
- the parenttitle
- the chapter titleid
- the chapter idkeepCase
- true if the chapter description should keep the title description casepublic void setSearchable(boolean isSearchable)
isSearchable
- true if the chapter title is searchablepublic boolean isSearchable()
isSearchable
in interface org.docgene.model.TitledElement
public void setDuplicate(boolean isDuplicate)
isDuplicate
- true if the chapter is a duplicate of another existing titlepublic boolean isDuplicate()
isDuplicate
in interface org.docgene.model.TitledElement
public void setElements(java.util.List<ParagraphElement> elements)
setElements
in interface ParagraphElementParent
elements
- the list of elementspublic void addElement(ParagraphElement element)
addElement
in interface ParagraphElementParent
element
- the elementpublic void addParagraph(org.docgene.model.AbstractParagraph par)
addParagraph
in interface XMLParent
addParagraph
in class org.docgene.model.AbstractXMLParent
par
- the paragraphpublic java.util.List<ParagraphElement> getElements()
getElements
in interface ParagraphElementParent
public void removeLastElement()
public void setTitle(java.lang.String title)
setTitle
in interface org.docgene.model.TitledElement
title
- the titlepublic void setSeq(java.lang.String seq)
setSeq
in interface org.docgene.model.TitledElement
seq
- the sequence idpublic boolean hasSeq()
hasSeq
in interface org.docgene.model.TitledElement
public java.lang.String getSeq()
getSeq
in interface org.docgene.model.TitledElement
public java.lang.String getDeclaration()
getDeclaration
in interface StyledElement
public void setAlignment(char alignment)
setAlignment
in interface JustifiedElement
alignment
- the alignment typepublic char getAlignment()
getAlignment
in interface JustifiedElement
public char getJustification()
getJustification
in interface JustifiedElement
public void setJustification(char justification)
setJustification
in interface JustifiedElement
justification
- the justification typepublic void setKeepCase(boolean keepCase)
keepCase
- true if the chapter description should keep the title description casepublic boolean isKeepingCase()
isKeepingCase
in interface org.docgene.model.TitledElement
public void setResolved()
setResolved
in interface org.docgene.model.TitledElement
public boolean isResolved()
isResolved
in interface org.docgene.model.TitledElement
public XMLParent getParent()
XMLArticle
or a XMLChapter
.public void setCustomStyles(java.util.Set<java.lang.String> classes)
setCustomStyles
in interface StyledElement
classes
- the custom element classespublic java.util.Set<java.lang.String> getCustomStyles()
getCustomStyles
in interface StyledElement
public int getLevel()
getLevel
in interface org.docgene.model.TitledElement
public void setID(java.lang.String id)
setID
in interface org.docgene.model.AnchorElement
id
- the chapter idpublic java.lang.String getID()
getID
in interface org.docgene.model.AnchorElement
public java.lang.String getTitle()
getTitle
in interface org.docgene.model.AnchorElement
getTitle
in interface org.docgene.model.TitledElement
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence