public class HtmlTableConfiguration
extends java.lang.Object
Specifies configuration options for HTML table comparison. These configuration options can be specified on a
DocumentComparator to configure its behaviour when comparing tables.
| Constructor and Description |
|---|
HtmlTableConfiguration()
Constructs a new
HtmlTableConfiguration instance. |
| Modifier and Type | Method and Description |
|---|---|
InvalidTableBehaviour |
getInvalidTableBehaviour()
Returns the current behaviour in use when inputs contain invalid HTML tables.
|
ValidationLevel |
getValidationLevel()
Returns the
ValidationLevel current in use when validating HTML tables. |
WarningReportMode |
getWarningReportMode()
Returns the
WarningReportMode in use when invalid HTML tables are encountered. |
boolean |
isNormalizeTable()
Determines whether HTML table column specification is normalized.
|
boolean |
isProcessTables()
Determines whether HTML table processing is enabled.
|
void |
setInvalidTableBehaviour(InvalidTableBehaviour behaviour)
Sets the behaviour to use when inputs contain invalid HTML tables.
|
void |
setNormalizeTable(boolean value)
Sets whether the
DocumentComparator should normalize the specification of columns in HTML tables. |
void |
setProcessTables(boolean value)
Sets whether the
DocumentComparator should process HTML tables. |
void |
setValidationLevel(ValidationLevel level)
Sets the
ValidationLevel to use for HTML table validation. |
void |
setWarningReportMode(WarningReportMode mode)
Specifies how HTML table invalidity warnings should be reported.
|
public HtmlTableConfiguration()
HtmlTableConfiguration instance.public void setProcessTables(boolean value)
Sets whether the DocumentComparator should process HTML tables.
HTML table processing is recommended as it will perform sophisticated processing when comparing two HTML tables to ensure that the resulting HTML table is valid.
value - whether to use HTML table processingpublic boolean isProcessTables()
Determines whether HTML table processing is enabled.
public void setValidationLevel(ValidationLevel level)
Sets the ValidationLevel to use for HTML table validation.
A value of ValidationLevel.STRICT will cause the InvalidTableBehaviour mode to be used for any HTML
invalidity. A value of ValidationLevel.RELAXED means that invalidities which are known to have no effect on HTML
processing will not prevent HTML processing from running. N.B. Warnings will be reported according to the
WarningReportMode regardless of the setting used here.
level - an instance of ValidationLevel describing the level to usepublic ValidationLevel getValidationLevel()
Returns the ValidationLevel current in use when validating HTML tables.
ValidationLevel describing the level in usepublic void setInvalidTableBehaviour(InvalidTableBehaviour behaviour)
behaviour - an instance of InvalidTableBehaviour specifying the behaviour to use when invalid HTML tables
are encounteredpublic InvalidTableBehaviour getInvalidTableBehaviour()
InvalidTableBehaviour describing the behaviour in usepublic void setWarningReportMode(WarningReportMode mode)
mode - the WarningReportMode to use when invalid HTML tables are encounteredpublic WarningReportMode getWarningReportMode()
WarningReportMode in use when invalid HTML tables are encountered.WarningReportMode describing the reporting mode in usepublic void setNormalizeTable(boolean value)
Sets whether the DocumentComparator should normalize the specification of columns in HTML tables.
This setting is recommended when there is a difference between inputs of specifying columns, e.g. if one uses just <colgroup> and another uses <col> without <colgroup>.
value - whether to normalize HTML Table column specificationpublic boolean isNormalizeTable()
Determines whether HTML table column specification is normalized.
Copyright © 2001-2018 DeltaXML Ltd. All Rights Reserved.