Package org.apache.daffodil.api
Class Diagnostic
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.daffodil.api.Diagnostic
- All Implemented Interfaces:
Serializable
Class containing diagnostic information. This does not need to
be implemented by the user.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDiagnostic(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) Constructor to create Diagnostic -
Method Summary
Modifier and TypeMethodDescriptionabstract List<DataLocation>Get data location information relevant to this diagnostic object.abstract List<? extends LocationInSchemaFile>Get schema location information relevant to this diagnostic object.abstract StringGet the diagnostic messageabstract StringGet the diagnostic mode nameabstract booleanisError()Determine if a diagnostic object represents an error or something less serious.abstract booleanDetermine if a diagnostic object represents a validation diagnostic.abstract StringtoString()Get a string containing the mode name, message, schema location, and data location combined into a single stringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
Diagnostic
public Diagnostic(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) Constructor to create Diagnostic- Parameters:
message- diagnostic messagecause- diagnostic causeenableSuppression- boolean to enable suppression of warningswritableStackTrace- writable stack trace
-
-
Method Details
-
getMessage
Get the diagnostic messageThis does not include any additional details about the Diagnostic, such as mode name, schema context, or data location. For a human-readable representation of this diagnostic, including the message and all context information, use
toString().- Overrides:
getMessagein classThrowable- Returns:
- diagnostic message in string form
-
getModeName
Get the diagnostic mode name- Returns:
- diagnostic mode name in string form
-
toString
Get a string containing the mode name, message, schema location, and data location combined into a single string -
getDataLocations
Get data location information relevant to this diagnostic object.For example, this might be a file name, and position within the file.
- Returns:
- list of
DataLocation's related to this diagnostic
-
getLocationsInSchemaFiles
Get schema location information relevant to this diagnostic object.For example, this might be a file name of a schema, and position within the schema file.
- Returns:
- list of
LocationInSchemaFile's related to this diagnostic.
-
isError
public abstract boolean isError()Determine if a diagnostic object represents an error or something less serious.- Returns:
- true if it represents an error, false otherwise
-
isValidation
public abstract boolean isValidation()Determine if a diagnostic object represents a validation diagnostic. This could be a validation error or a validation warning depending on isError- Returns:
- true if it represents a validation diagnostic, false otherwise
-