Package com.scroogexhtml.converter
Enum StructuralViolation
- All Implemented Interfaces:
Serializable,Comparable<StructuralViolation>
A structural defect in the RTF input: markup that the RTF specification
does not allow, but that the converter can repair or skip.
In lenient mode (the default) the converter repairs the defect, logs a
warning once per kind and conversion, and continues. In strict mode
(SecurityConfiguration.setStrictMode(boolean))
the first defect aborts the conversion with a
StructuralViolationException.
The messages are fixed texts: they never contain RTF-derived content.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA\binNwith a negative length.A\redN,\greenNor\blueNoutside 0..255.A raw control character (other than TAB, CR, LF) in the text.The input does not start with{\rtf.A\'xxor\uNescape for a character XML does not allow (a C0 control other than TAB, LF, CR; U+FFFE, U+FFFF; an unpaired surrogate).List table markup outside its\listor\listoverridegroup.A\'xxescape without two hex digits.Picture data with a character that is not a hex digit.A keyword parameter outside the 32-bit integer range.A table row whose number of cells differs from its number of\cellx.A table cell that is not ended by\cell.Table row or cell markup with no table open.A\clmrgwith no preceding cell to merge with.A\itapNthat skips a nesting level or is negative.A paragraph with\itapN(N > 0) but without\intbl.Data other than whitespace after the closing brace of the document group.A reference to a color table entry that does not exist.A\lsNthat references an undefined list override.The input ends while groups are still open.A skip count of the uc keyword that is negative or implausibly large. -
Method Summary
Modifier and TypeMethodDescriptionstatic StructuralViolationReturns the enum constant of this type with the specified name.static StructuralViolation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INVALID_HEADER
The input does not start with{\rtf. -
TRAILING_DATA
Data other than whitespace after the closing brace of the document group. -
UNEXPECTED_END_OF_INPUT
The input ends while groups are still open. -
MALFORMED_HEX_ESCAPE
A\'xxescape without two hex digits. -
MALFORMED_PICTURE_DATA
Picture data with a character that is not a hex digit. -
CONTROL_CHARACTER
A raw control character (other than TAB, CR, LF) in the text. -
INVALID_XML_CHARACTER
A\'xxor\uNescape for a character XML does not allow (a C0 control other than TAB, LF, CR; U+FFFE, U+FFFF; an unpaired surrogate). -
PARAMETER_OUT_OF_RANGE
A keyword parameter outside the 32-bit integer range. -
UNICODE_SKIP_OUT_OF_RANGE
A skip count of the uc keyword that is negative or implausibly large. -
BINARY_LENGTH_NEGATIVE
A\binNwith a negative length. -
COLOR_COMPONENT_OUT_OF_RANGE
A\redN,\greenNor\blueNoutside 0..255. -
UNDEFINED_COLOR
A reference to a color table entry that does not exist. -
LIST_MARKUP_OUTSIDE_LIST
List table markup outside its\listor\listoverridegroup. -
UNDEFINED_LIST_OVERRIDE
A\lsNthat references an undefined list override. -
TABLE_MARKUP_OUTSIDE_TABLE
Table row or cell markup with no table open. -
TABLE_CELL_COUNT_MISMATCH
A table row whose number of cells differs from its number of\cellx. -
TABLE_CELL_NOT_ENDED
A table cell that is not ended by\cell. -
TABLE_MERGE_WITHOUT_CELL
A\clmrgwith no preceding cell to merge with. -
TABLE_PARAGRAPH_WITHOUT_INTBL
A paragraph with\itapN(N > 0) but without\intbl. -
TABLE_NESTING_LEVEL
A\itapNthat skips a nesting level or is negative.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getMessage
- Returns:
- a fixed description of the defect
-