Class CalsTableConfiguration
Specifies configuration options for CALS table comparison. These configuration options can be specified on a
DocumentComparator to configure its behaviour when comparing tables.
- Since:
- 10.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theCalsColumnKeyingModecurrently in use when comparing CALS tables.Returns the current behaviour in use when inputs contain invalid CALS tables.Returns theValidationLevelcurrent in use when validating CALS tables.Returns theWarningReportModein use when invalid CALS tables are encountered.booleanDetermines whether ignoring CALS table column order is enabled.booleanReturns true if markTableCellSpanExtentChanges feature is on, otherwise false.booleanDetermines whether CALS table processing is enabled.voidSets theCalsColumnKeyingModeto use when comparing CALS tables.voidsetIgnoreColumnOrder(boolean ignoreColumnOrder) Sets whether theDocumentComparatorshould ignore CALS table column order.voidsetInvalidTableBehaviour(InvalidTableBehaviour behaviour) Sets the behaviour to use when inputs contain invalid CALS tables.voidsetMarkTableCellSpanExtentChanges(boolean value) Sets the markTableCellSpanExtentChanges feature on or off.voidsetProcessTables(boolean value) Sets whether theDocumentComparatorshould process CALS tables.voidSets theValidationLevelto use for CALS table validation.voidSpecifies how CALS table invalidity warnings should be reported.
-
Constructor Details
-
CalsTableConfiguration
public CalsTableConfiguration()Constructs a newCalsTableConfigurationinstance.
-
-
Method Details
-
setProcessTables
public void setProcessTables(boolean value) Sets whether the
DocumentComparatorshould process CALS tables.CALS table processing is recommended as it will perform sophisticated processing when comparing two CALS tables to ensure that the resulting CALS table is valid.
- Parameters:
value- whether to use CALS table processing
-
isProcessTables
public boolean isProcessTables()Determines whether CALS table processing is enabled.
- Returns:
- a boolean describing the enabled state of CALS table processing
-
setInvalidTableBehaviour
Sets the behaviour to use when inputs contain invalid CALS tables.- Parameters:
behaviour- an instance ofInvalidTableBehaviourspecifying the behaviour to use when invalid CALS tables are encountered
-
getInvalidTableBehaviour
Returns the current behaviour in use when inputs contain invalid CALS tables.- Returns:
- an instance of
InvalidTableBehaviourdescribing the behaviour in use
-
setWarningReportMode
Specifies how CALS table invalidity warnings should be reported.- Parameters:
mode- theWarningReportModeto use when invalid CALS tables are encountered
-
getWarningReportMode
Returns theWarningReportModein use when invalid CALS tables are encountered.- Returns:
- an instance of
WarningReportModedescribing the reporting mode in use
-
setValidationLevel
Sets the
ValidationLevelto use for CALS table validation.A value of
ValidationLevel.STRICTwill cause theInvalidTableBehaviourmode to be used for any CALS invalidity. A value ofValidationLevel.RELAXEDmeans that invalidities which are known to have no effect on CALS processing will not prevent CALS processing from running. N.B. Warnings will be reported according to theWarningReportModeregardless of the setting used here.- Parameters:
level- an instance ofValidationLeveldescribing the level to use
-
getValidationLevel
Returns the
ValidationLevelcurrent in use when validating CALS tables.- Returns:
- an instance of
ValidationLeveldescribing the level in use
-
setIgnoreColumnOrder
public void setIgnoreColumnOrder(boolean ignoreColumnOrder) Sets whether the
DocumentComparatorshould ignore CALS table column order.- Parameters:
ignoreColumnOrder- whether to ignore CALS table column order
-
isIgnoreColumnOrder
public boolean isIgnoreColumnOrder()Determines whether ignoring CALS table column order is enabled.
- Returns:
- a boolean describing whether the CALS table column order is ignored
-
setCalsColumnKeyingMode
Sets the
CalsColumnKeyingModeto use when comparing CALS tables.- Parameters:
mode- an instance ofCalsColumnKeyingModedescribing the keying mode to use
-
getCalsColumnKeyingMode
Returns the
CalsColumnKeyingModecurrently in use when comparing CALS tables.- Returns:
- an instance of
CalsColumnKeyingModedescribing the keying mode in use
-
setMarkTableCellSpanExtentChanges
public void setMarkTableCellSpanExtentChanges(boolean value) Sets the markTableCellSpanExtentChanges feature on or off. When set, a deltaxml:span-extent-changed attribute is added to table cell elements that have changed spans.- Parameters:
value- A boolean value to set this feature.
-
isMarkTableCellSpanExtentChanges
public boolean isMarkTableCellSpanExtentChanges()Returns true if markTableCellSpanExtentChanges feature is on, otherwise false.- Returns:
- the current setting for markTableCellSpanExtentChanges.
-