|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.stax2.validation.XMLValidationProblem
public class XMLValidationProblem
Simple container class used to store a non-fatal problem either to be returned as is, or to use for creating and throwing a validation exception.
Field Summary | |
---|---|
protected Location |
mLocation
Location within validated xml stream where the problem occured. |
protected 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 String |
mType
Type of the problem, available types implementation specified. |
static int |
SEVERITY_ERROR
|
static int |
SEVERITY_FATAL
|
static int |
SEVERITY_WARNING
|
Constructor Summary | |
---|---|
XMLValidationProblem(Location loc,
String msg)
|
|
XMLValidationProblem(Location loc,
String msg,
int severity)
|
|
XMLValidationProblem(Location loc,
String msg,
int severity,
String type)
|
Method Summary | |
---|---|
Location |
getLocation()
|
String |
getMessage()
|
XMLValidator |
getReporter()
Returns the validator that reported the problem if known. |
int |
getSeverity()
|
String |
getType()
|
void |
setLocation(Location l)
|
void |
setReporter(XMLValidator v)
Set the validator object that reported this problem, if known. |
void |
setType(String t)
|
XMLValidationException |
toException()
Convenience method for constructing a XMLValidationException
to throw based on information contained in this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SEVERITY_WARNING
public static final int SEVERITY_ERROR
public static final int SEVERITY_FATAL
protected Location mLocation
protected final String mMessage
protected final int mSeverity
protected String mType
protected XMLValidator mReporter
Constructor Detail |
---|
public XMLValidationProblem(Location loc, String msg)
public XMLValidationProblem(Location loc, String msg, int severity)
public XMLValidationProblem(Location loc, String msg, int severity, String type)
Method Detail |
---|
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(String t)
public void setLocation(Location l)
public void setReporter(XMLValidator v)
public Location getLocation()
public String getMessage()
public int getSeverity()
SEVERITY_
constants
(such as SEVERITY_WARNING
public String getType()
public XMLValidator getReporter()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |