WarningSource
Inheritance: java.lang.Object
public class WarningSource
Specifies the module that produces a warning during document loading or saving.
Examples:
Shows how to work with the warning source.
Document doc = new Document(getMyDir() + "Emphases markdown warning.docx");
WarningInfoCollection warnings = new WarningInfoCollection();
doc.setWarningCallback(warnings);
doc.save(getArtifactsDir() + "DocumentBuilder.EmphasesWarningSourceMarkdown.md");
for (WarningInfo warningInfo : warnings) {
if (warningInfo.getSource() == WarningSource.MARKDOWN)
Assert.assertEquals("The (*, 0:11) cannot be properly written into Markdown.", warningInfo.getDescription());
}
Fields
Field | Description |
---|---|
CHM | Module that reads CHM files. |
DOC | Module that reads/writes binary DOC files. |
DOCX | Module that reads/writes DOCX files. |
DRAWING_ML | Module that renders DrawingML shapes. |
EPUB | Module that reads/writes EPUB files. |
FONT | Module that reads font files. |
HTML | Module that reads/writes HTML/MHTML files. |
IMAGE | Module that renders images. |
LAYOUT | Module that builds a document layout. |
MARKDOWN | Module that reads/writes Markdown files. |
MATH_ML | Module that reads W3C MathML files. |
METAFILE | Module that renders metafiles. |
NRX | Common modules that are shared between DOCX/WML reader/writer modules. |
ODT | Module that reads/writes ODT files. |
OFFICE_MATH | Module that renders OfficeMath. |
Module that renders PDF. | |
RTF | Module that reads/writes RTF files. |
SHAPES | Module that renders ordinary shapes. |
SVG | Module that reads SVG files. |
SVM | Module that reads Svm files. |
TEXT | Module that reads/writes plaintext files. |
UNKNOWN | The warning source is not specified. |
VALIDATOR | Module that verifies model consistency and validity. |
WORD_ML | Module that reads/writes WML files. |
XAML | Module that reads/writes Xaml files. |
XLSX | Module that writes XLSX files. |
XML | Module that reads XML files. |
XPS | Module that renders XPS. |
length |
Methods
Method | Description |
---|---|
fromName(String warningSourceName) | |
getName(int warningSource) | |
getValues() | |
toString(int warningSource) |
CHM
public static int CHM
Module that reads CHM files.
DOC
public static int DOC
Module that reads/writes binary DOC files.
DOCX
public static int DOCX
Module that reads/writes DOCX files.
DRAWING_ML
public static int DRAWING_ML
Module that renders DrawingML shapes.
EPUB
public static int EPUB
Module that reads/writes EPUB files.
FONT
public static int FONT
Module that reads font files.
HTML
public static int HTML
Module that reads/writes HTML/MHTML files.
IMAGE
public static int IMAGE
Module that renders images.
LAYOUT
public static int LAYOUT
Module that builds a document layout.
MARKDOWN
public static int MARKDOWN
Module that reads/writes Markdown files.
MATH_ML
public static int MATH_ML
Module that reads W3C MathML files.
METAFILE
public static int METAFILE
Module that renders metafiles.
NRX
public static int NRX
Common modules that are shared between DOCX/WML reader/writer modules.
ODT
public static int ODT
Module that reads/writes ODT files.
OFFICE_MATH
public static int OFFICE_MATH
Module that renders OfficeMath.
public static int PDF
Module that renders PDF.
RTF
public static int RTF
Module that reads/writes RTF files.
SHAPES
public static int SHAPES
Module that renders ordinary shapes.
SVG
public static int SVG
Module that reads SVG files.
SVM
public static int SVM
Module that reads Svm files.
TEXT
public static int TEXT
Module that reads/writes plaintext files.
UNKNOWN
public static int UNKNOWN
The warning source is not specified.
VALIDATOR
public static int VALIDATOR
Module that verifies model consistency and validity.
WORD_ML
public static int WORD_ML
Module that reads/writes WML files.
XAML
public static int XAML
Module that reads/writes Xaml files.
XLSX
public static int XLSX
Module that writes XLSX files.
XML
public static int XML
Module that reads XML files.
XPS
public static int XPS
Module that renders XPS.
length
public static int length
fromName(String warningSourceName)
public static int fromName(String warningSourceName)
Parameters:
Parameter | Type | Description |
---|---|---|
warningSourceName | java.lang.String |
Returns: int
getName(int warningSource)
public static String getName(int warningSource)
Parameters:
Parameter | Type | Description |
---|---|---|
warningSource | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int warningSource)
public static String toString(int warningSource)
Parameters:
Parameter | Type | Description |
---|---|---|
warningSource | int |
Returns: java.lang.String