public class XMLValidationProblem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected javax.xml.stream.Location |
mLocation
Location within validated xml stream where the problem occured.
|
protected java.lang.String |
mMessage |
protected XMLValidator |
mReporter
Validator instance that reported the problem, if any (may be
null if stream reader or writer itself reported the problem)
|
protected int |
mSeverity |
protected java.lang.String |
mType
Type of the problem, available types implementation specified.
|
static int |
SEVERITY_ERROR |
static int |
SEVERITY_FATAL |
static int |
SEVERITY_WARNING |
Constructor and Description |
---|
XMLValidationProblem(javax.xml.stream.Location loc,
java.lang.String msg) |
XMLValidationProblem(javax.xml.stream.Location loc,
java.lang.String msg,
int severity) |
XMLValidationProblem(javax.xml.stream.Location loc,
java.lang.String msg,
int severity,
java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
javax.xml.stream.Location |
getLocation() |
java.lang.String |
getMessage() |
XMLValidator |
getReporter()
Returns the validator that reported the problem if known.
|
int |
getSeverity() |
java.lang.String |
getType() |
void |
setLocation(javax.xml.stream.Location l) |
void |
setReporter(XMLValidator v)
Set the validator object that reported this problem, if known.
|
void |
setType(java.lang.String t) |
XMLValidationException |
toException()
Convenience method for constructing a
XMLValidationException
to throw based on information contained in this object. |
public static final int SEVERITY_WARNING
public static final int SEVERITY_ERROR
public static final int SEVERITY_FATAL
protected javax.xml.stream.Location mLocation
protected final java.lang.String mMessage
protected final int mSeverity
protected java.lang.String mType
protected XMLValidator mReporter
public XMLValidationProblem(javax.xml.stream.Location loc, java.lang.String msg)
public XMLValidationProblem(javax.xml.stream.Location loc, java.lang.String msg, int severity)
public XMLValidationProblem(javax.xml.stream.Location loc, java.lang.String msg, int severity, java.lang.String type)
public XMLValidationException toException()
XMLValidationException
to throw based on information contained in this object.
Base implementation is equivalent to:
return XMLValidationException.createException(this);
public void setType(java.lang.String t)
public void setLocation(javax.xml.stream.Location l)
public void setReporter(XMLValidator v)
public javax.xml.stream.Location getLocation()
public java.lang.String getMessage()
public int getSeverity()
SEVERITY_
constants
(such as SEVERITY_WARNING
public java.lang.String getType()
public XMLValidator getReporter()