public class HookContext
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
aborted() |
org.docgene.model.XMLParagraph |
addParagraph(org.docgene.model.XMLArticle article)
Add a paragraph to an arricle.
|
org.docgene.model.XMLArticle |
createArticle(java.lang.String desc)
Create an article.
|
org.docgene.model.XMLArticle |
createArticle(java.lang.String id,
java.lang.String desc)
Create an article.
|
org.docgene.model.XMLArticle |
createArticle(java.lang.String id,
java.lang.String desc,
boolean keepCase)
Create an article.
|
int |
getElementIndex()
Return the current element index.
|
java.util.List<ParagraphElement> |
getElementsAfter()
Return all the elements after the current element.
|
java.util.List<ParagraphElement> |
getElementsBefore()
Return all the elements before the current element.
|
ArticlesModel |
getModel()
Return the ArticlesModel.
|
ParagraphElement |
getNextElement()
Return the next element after the current element.
|
ParagraphElement |
getPreviousElement()
Return the previous element before the current element.
|
ParagraphElement |
getSiblingElement(int elementOffset)
Return a sibling element with an offset relative to the current element.
|
java.lang.String |
getSiblingElementTypeDecl(int elementOffset)
Return the type declaration of the sibling element with an offset relative to the current element.
|
boolean |
hasNextElement()
Return true if there is a next element after the current element.
|
boolean |
hasPreviousElement()
Return true if there is a previous element before the current element.
|
void |
insertElementsAfter(ParagraphElement... elements)
Insert a list of elements after the current element.
|
void |
insertElementsBefore(ParagraphElement... elements)
Insert a list of elements before the current element.
|
void |
removeCurrentElement()
Remove the current element.
|
public ArticlesModel getModel()
public org.docgene.model.XMLArticle createArticle(java.lang.String desc)
desc
- the article descriptionpublic org.docgene.model.XMLArticle createArticle(java.lang.String id, java.lang.String desc)
id
- the article id (maybe null)desc
- the article descriptionpublic org.docgene.model.XMLArticle createArticle(java.lang.String id, java.lang.String desc, boolean keepCase)
id
- the article id (maybe null)desc
- the article descriptionkeepCase
- true if the article description should keep the title description casepublic org.docgene.model.XMLParagraph addParagraph(org.docgene.model.XMLArticle article)
article
- the articlepublic int getElementIndex()
public boolean hasPreviousElement()
public boolean hasNextElement()
public ParagraphElement getPreviousElement()
public ParagraphElement getNextElement()
public java.lang.String getSiblingElementTypeDecl(int elementOffset)
elementOffset
- the offsetpublic void aborted()
public ParagraphElement getSiblingElement(int elementOffset)
elementOffset
- the offsetpublic java.util.List<ParagraphElement> getElementsAfter()
insertElementsAfter(org.docgene.model.ParagraphElement...)
if you want to add new elements.public java.util.List<ParagraphElement> getElementsBefore()
public void removeCurrentElement()
public void insertElementsAfter(ParagraphElement... elements)
elements
- the list of elementspublic void insertElementsBefore(ParagraphElement... elements)
elements
- the list of elementsCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence