Docmosis API 4.8.0

com.docmosis.template.analysis
Interface TemplateSection

All Superinterfaces:
Serializable
All Known Subinterfaces:
TemplateField
All Known Implementing Classes:
com.docmosis.template.analysis.SimpleTemplateContainer, com.docmosis.template.analysis.SimpleTemplateSection, SimpleTemplateTableCell, SimpleTemplateTableRow

public interface TemplateSection
extends Serializable

This interface defines a section of a template. A template can be broken up recursively into section which have various attributes including a start and end index to help processing the template.


Method Summary
 boolean equals(Object other, boolean ignorePosition)
          Determine if this object is equal to the given object optionally ignoring positional information.
 long getEndIndex()
          Get the index into the content of the last character of this section
 long getLength()
          Determine the length of this section of the template (end - start)
 com.docmosis.template.analysis.ParsedField getParsedFieldDetails()
          Get the parsed details for this field.
 long getPostAmbleStartIdx()
          Get the start index of the post amble.
 long getPreAmbleEndIdx()
          Get the end index of the pre amble.
 long getStartIndex()
          Get the index into the content of the first character of this section
 TemplateSection[] getSubSections()
          Get the sections contained by this section.
 boolean isArtificial()
          Determine if this section is artificial, meaning it was created by Docmosis during analysis to assist with population.
 boolean isConditional()
          Determine if this section is conditional
 boolean isContainer()
          Determine if this section is a container section (meaning it can contain other sections).
 boolean isPopulable()
          Determine if this section has items in it which may be candidates for population.
 boolean isRepeatable()
          Determine if this section is repeatable
 boolean isSkipSection()
          Determine if this section indicates a skip (and hence should be skipped).
 boolean skipPreAndPostAmble()
          Determine if this section has pre and post amble sections that should be skipped during population.
 

Method Detail

isRepeatable

boolean isRepeatable()
Determine if this section is repeatable

Returns:
true if so

isConditional

boolean isConditional()
Determine if this section is conditional

Returns:
true if so

getStartIndex

long getStartIndex()
Get the index into the content of the first character of this section

Returns:
the start index

getEndIndex

long getEndIndex()
Get the index into the content of the last character of this section

Returns:
the end index

getLength

long getLength()
Determine the length of this section of the template (end - start)

Returns:
the length of the section

isPopulable

boolean isPopulable()
Determine if this section has items in it which may be candidates for population. If not it can be considered plain content that may be streamed directly without further processing.

Returns:
true if this contains items of interest for population.

isContainer

boolean isContainer()
Determine if this section is a container section (meaning it can contain other sections).

Returns:
true if this section may contain other sections.

getSubSections

TemplateSection[] getSubSections()
Get the sections contained by this section.

Returns:
null if there are none

skipPreAndPostAmble

boolean skipPreAndPostAmble()
Determine if this section has pre and post amble sections that should be skipped during population. Skipping means they will not become part of the resulting stream.

Returns:
true if pre and post amble sections should be skipped

getPreAmbleEndIdx

long getPreAmbleEndIdx()
Get the end index of the pre amble.

Returns:
the index of the last byte of the preamble

getPostAmbleStartIdx

long getPostAmbleStartIdx()
Get the start index of the post amble.

Returns:
the index of the first byte of the postamble

isSkipSection

boolean isSkipSection()
Determine if this section indicates a skip (and hence should be skipped). The end idx of the section indicates where to skip to.

Returns:
true if this section should be skipped.

equals

boolean equals(Object other,
               boolean ignorePosition)
Determine if this object is equal to the given object optionally ignoring positional information.

Parameters:
other - the other object to compare
ignorePosition - if true, positional information will not be compared
Returns:
true if the objects are equivlent ignoring position.

getParsedFieldDetails

com.docmosis.template.analysis.ParsedField getParsedFieldDetails()
Get the parsed details for this field.

Returns:
null if there are none

isArtificial

boolean isArtificial()
Determine if this section is artificial, meaning it was created by Docmosis during analysis to assist with population. It is not a directly user-defined section.

Returns:
true if so

Docmosis API 4.8.0

Copyright © 2014–2024 Docmosis Pty Ltd. All rights reserved.