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

FieldDescription
CHMModule that reads CHM files.
DOCModule that reads/writes binary DOC files.
DOCXModule that reads/writes DOCX files.
DRAWING_MLModule that renders DrawingML shapes.
EPUBModule that reads/writes EPUB files.
FONTModule that reads font files.
HTMLModule that reads/writes HTML/MHTML files.
IMAGEModule that renders images.
LAYOUTModule that builds a document layout.
MARKDOWNModule that reads/writes Markdown files.
MATH_MLModule that reads W3C MathML files.
METAFILEModule that renders metafiles.
NRXCommon modules that are shared between DOCX/WML reader/writer modules.
ODTModule that reads/writes ODT files.
OFFICE_MATHModule that renders OfficeMath.
PDFModule that renders PDF.
RTFModule that reads/writes RTF files.
SHAPESModule that renders ordinary shapes.
SVGModule that reads SVG files.
SVMModule that reads Svm files.
TEXTModule that reads/writes plaintext files.
UNKNOWNThe warning source is not specified.
VALIDATORModule that verifies model consistency and validity.
WORD_MLModule that reads/writes WML files.
XAMLModule that reads/writes Xaml files.
XLSXModule that writes XLSX files.
XMLModule that reads XML files.
XPSModule that renders XPS.
length

Methods

MethodDescription
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.

PDF

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:

ParameterTypeDescription
warningSourceNamejava.lang.String

Returns: int

getName(int warningSource)

public static String getName(int warningSource)

Parameters:

ParameterTypeDescription
warningSourceint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int warningSource)

public static String toString(int warningSource)

Parameters:

ParameterTypeDescription
warningSourceint

Returns: java.lang.String