Enum StructuralViolation

java.lang.Object
java.lang.Enum<StructuralViolation>
com.scroogexhtml.converter.StructuralViolation
All Implemented Interfaces:
Serializable, Comparable<StructuralViolation>

public enum StructuralViolation extends Enum<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 Details

    • INVALID_HEADER

      public static final StructuralViolation INVALID_HEADER
      The input does not start with {\rtf.
    • TRAILING_DATA

      public static final StructuralViolation TRAILING_DATA
      Data other than whitespace after the closing brace of the document group.
    • UNEXPECTED_END_OF_INPUT

      public static final StructuralViolation UNEXPECTED_END_OF_INPUT
      The input ends while groups are still open.
    • MALFORMED_HEX_ESCAPE

      public static final StructuralViolation MALFORMED_HEX_ESCAPE
      A \'xx escape without two hex digits.
    • MALFORMED_PICTURE_DATA

      public static final StructuralViolation MALFORMED_PICTURE_DATA
      Picture data with a character that is not a hex digit.
    • CONTROL_CHARACTER

      public static final StructuralViolation CONTROL_CHARACTER
      A raw control character (other than TAB, CR, LF) in the text.
    • INVALID_XML_CHARACTER

      public static final StructuralViolation INVALID_XML_CHARACTER
      A \'xx or \uN escape 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

      public static final StructuralViolation PARAMETER_OUT_OF_RANGE
      A keyword parameter outside the 32-bit integer range.
    • UNICODE_SKIP_OUT_OF_RANGE

      public static final StructuralViolation UNICODE_SKIP_OUT_OF_RANGE
      A skip count of the uc keyword that is negative or implausibly large.
    • BINARY_LENGTH_NEGATIVE

      public static final StructuralViolation BINARY_LENGTH_NEGATIVE
      A \binN with a negative length.
    • COLOR_COMPONENT_OUT_OF_RANGE

      public static final StructuralViolation COLOR_COMPONENT_OUT_OF_RANGE
      A \redN, \greenN or \blueN outside 0..255.
    • UNDEFINED_COLOR

      public static final StructuralViolation UNDEFINED_COLOR
      A reference to a color table entry that does not exist.
    • LIST_MARKUP_OUTSIDE_LIST

      public static final StructuralViolation LIST_MARKUP_OUTSIDE_LIST
      List table markup outside its \list or \listoverride group.
    • UNDEFINED_LIST_OVERRIDE

      public static final StructuralViolation UNDEFINED_LIST_OVERRIDE
      A \lsN that references an undefined list override.
    • TABLE_MARKUP_OUTSIDE_TABLE

      public static final StructuralViolation TABLE_MARKUP_OUTSIDE_TABLE
      Table row or cell markup with no table open.
    • TABLE_CELL_COUNT_MISMATCH

      public static final StructuralViolation TABLE_CELL_COUNT_MISMATCH
      A table row whose number of cells differs from its number of \cellx.
    • TABLE_CELL_NOT_ENDED

      public static final StructuralViolation TABLE_CELL_NOT_ENDED
      A table cell that is not ended by \cell.
    • TABLE_MERGE_WITHOUT_CELL

      public static final StructuralViolation TABLE_MERGE_WITHOUT_CELL
      A \clmrg with no preceding cell to merge with.
    • TABLE_PARAGRAPH_WITHOUT_INTBL

      public static final StructuralViolation TABLE_PARAGRAPH_WITHOUT_INTBL
      A paragraph with \itapN (N > 0) but without \intbl.
    • TABLE_NESTING_LEVEL

      public static final StructuralViolation TABLE_NESTING_LEVEL
      A \itapN that skips a nesting level or is negative.
  • Method Details

    • values

      public static StructuralViolation[] 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

      public static StructuralViolation valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getMessage

      public String getMessage()
      Returns:
      a fixed description of the defect