com.docmosis.template.analysis
Interface TemplateAnalysis

All Superinterfaces:
Serializable

public interface TemplateAnalysis
extends Serializable

A template analysis provides details about a (populable) template that may help in processing the template (performance hints). It also may provide hints that can be used when constructing a DataProvider as to what forms of data might be required. This allows data providers to pre-fetch data based on specifics of the template it is populating.


Method Summary
 ExternalResourceCollection getExternalResources()
          Get the external resource references detected in the template.
 com.docmosis.template.analysis.TemplateField[] getFields()
          Return only the fields in the template in the order they appear in the template.
 long getLength()
          Obtain the total size of the analysis stream.
 com.docmosis.template.analysis.list.ListStyles getListStyles()
          Get a map of the list styles that are useful in population.
 com.docmosis.template.analysis.list.ListTree getListTree()
          Get the ListTree describing relationships between numbered lists in the template
 TemplateAnalysis getMetaAnalysis()
          Get the analysis of the Meta of the template.
 String getOriginalMD5()
          The the MD5 hash string that the template had at the time of storing.
 boolean getProcessedAllowingPaddedFields()
          Determine if this template was processed allowing fields to be padded (eg << abc >>)
 boolean getProcessedWithExternalConverter()
          Determine if this template was processed with the external converter
 com.docmosis.template.analysis.TemplateSection[] getSections()
          Get the breakdown of a template as a set of sections.
 char[] getStaticNewStyles()
          Get any new styles derived during analysis
 TemplateAnalysis getStyleAnalysis()
          Get the analysis of the styles of the template.
 MessageAndSuggestions[] getTemplateErrorMessages()
          Get the error messages from the template (if any).
 com.docmosis.template.analysis.ImageAnalysis getTemplateImages()
          Get information about the images in the template.
 com.docmosis.template.analysis.TextWritableSafeAreas getWritableSafeAreas()
          Get the writable safe areas for validation
 boolean hasDynamicTableStyling()
          Determine if this template has tables with dynamic styling.
 boolean hasExternalResourcesPermisionFailures()
           
 boolean hasTableWithMergedNonBreakingRows()
          Determine if tables are present with merged rows and the "don't-break row" property set.
 boolean hasTemplateErrors()
          Determine if the template has errors in it.
 boolean hasTOC()
          Determine if the template has a Table of Contents (TOC)
 boolean isCoordinatorTemplate()
           
 

Method Detail

getSections

com.docmosis.template.analysis.TemplateSection[] getSections()
Get the breakdown of a template as a set of sections.

Returns:
the sections contained in this analysis or null.

getFields

com.docmosis.template.analysis.TemplateField[] getFields()
Return only the fields in the template in the order they appear in the template.

Returns:
null if there are no fields

getLength

long getLength()
Obtain the total size of the analysis stream.

Returns:
the size of the analysis stream.

getOriginalMD5

String getOriginalMD5()
The the MD5 hash string that the template had at the time of storing.

Returns:
an MD5 hash string.

hasDynamicTableStyling

boolean hasDynamicTableStyling()
Determine if this template has tables with dynamic styling.

Returns:
true if table dynamic styling been detected.

hasTemplateErrors

boolean hasTemplateErrors()
Determine if the template has errors in it. Errors in the template mean it should NOT be used for merging with data, but the template can be used to produce a document showing where the template errors exist (by rendering it to PDF for example).

Returns:
true if the template has errors ("compile" errors).

getTemplateErrorMessages

MessageAndSuggestions[] getTemplateErrorMessages()
Get the error messages from the template (if any). Messages may also be accompanied by zero or more suggestions.

Returns:
null if there are no errors

getStaticNewStyles

char[] getStaticNewStyles()
Get any new styles derived during analysis

Returns:
null if there are none.

getTemplateImages

com.docmosis.template.analysis.ImageAnalysis getTemplateImages()
Get information about the images in the template.

Returns:
null if there are no images.

hasTOC

boolean hasTOC()
Determine if the template has a Table of Contents (TOC)

Returns:

getStyleAnalysis

TemplateAnalysis getStyleAnalysis()
Get the analysis of the styles of the template. This includes populable fields in headers and footers.

Returns:
null if non exists

getMetaAnalysis

TemplateAnalysis getMetaAnalysis()
Get the analysis of the Meta of the template. This includes custom properties etc.

Returns:
null if non exists

hasTableWithMergedNonBreakingRows

boolean hasTableWithMergedNonBreakingRows()
Determine if tables are present with merged rows and the "don't-break row" property set.

Returns:
true if so

getProcessedWithExternalConverter

boolean getProcessedWithExternalConverter()
Determine if this template was processed with the external converter

Returns:
true if so

getProcessedAllowingPaddedFields

boolean getProcessedAllowingPaddedFields()
Determine if this template was processed allowing fields to be padded (eg << abc >>)

Returns:
true if so

getWritableSafeAreas

com.docmosis.template.analysis.TextWritableSafeAreas getWritableSafeAreas()
Get the writable safe areas for validation

Returns:

getListTree

com.docmosis.template.analysis.list.ListTree getListTree()
Get the ListTree describing relationships between numbered lists in the template

Returns:
an empty list if no lists are present.

getListStyles

com.docmosis.template.analysis.list.ListStyles getListStyles()
Get a map of the list styles that are useful in population.

Returns:
null if there are none.

isCoordinatorTemplate

boolean isCoordinatorTemplate()
Returns:
true if this template is a coordinator (eg multi-template render)

getExternalResources

ExternalResourceCollection getExternalResources()
Get the external resource references detected in the template. This can come from OLE objects which have hyperlinks for example

Returns:
null if there are none

hasExternalResourcesPermisionFailures

boolean hasExternalResourcesPermisionFailures()
Returns:
whether permission failures were detected against the permissions supplied when this template was stored


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