Class ProcessorContext
java.lang.Object
pro.verron.officestamper.api.ProcessorContext
Represents a context within a document processing operation.
This class encapsulates key elements involved in the processing of a specific part of a
WordprocessingMLPackage-based document, such as a part of the document, a specific paragraph, an associated
comment, and an expression being evaluated or processed.
The ProcessorContext provides structured access to these elements, enabling seamless document traversal,
manipulation, and analysis during processing workflows.
-
Constructor Summary
ConstructorsConstructorDescriptionProcessorContext(DocxPart part, Paragraph paragraph, Comment comment, String expression, ContextTree contextTree) Constructs a ProcessorContext. -
Method Summary
Modifier and TypeMethodDescriptioncomment()Returns the comment associated with the current processing context.Returns an iterator over the content associated with the current comment's range.Returns the context tree managing the hierarchical scopes for this context.Returns the expression or directive currently being evaluated.Returns the paragraph currently being processed.part()Returns the document part currently being processed.table()Returns the table containing the current paragraph, if any.tableRow()Returns the table row containing the current paragraph, if any.
-
Constructor Details
-
ProcessorContext
public ProcessorContext(DocxPart part, Paragraph paragraph, Comment comment, String expression, ContextTree contextTree) Constructs a ProcessorContext.- Parameters:
part- TheDocxPartrepresenting a specific part of the document being processed.paragraph- TheParagraphassociated with the processing context.comment- TheCommentthat is relevant to the current processing context.expression- AStringcontaining the expression or directive being evaluated.contextTree- TheContextTreemanaging the hierarchical scopes for this context.
-
-
Method Details
-
contentIterator
Returns an iterator over the content associated with the current comment's range.- Returns:
- a
ResetableIteratorofObjectrepresenting the content within the comment's scope.
-
comment
-
tableRow
-
table
-
part
-
paragraph
-
expression
-
contextHolder
Returns the context tree managing the hierarchical scopes for this context.- Returns:
- the
ContextTreeobject.
-