net.sf.saxon.type
public class ValidationException extends XPathException implements javax.xml.transform.SourceLocator, org.xml.sax.Locator
XPathException.Circularity
Constructor and Description |
---|
ValidationException(java.lang.Exception exception)
Creates a new ValidationException with the given nested
exception.
|
ValidationException(java.lang.String message)
Creates a new ValidationException with the given message.
|
ValidationException(java.lang.String message,
java.lang.Exception exception)
Creates a new ValidationException with the given message
and nested exception.
|
ValidationException(java.lang.String message,
javax.xml.transform.SourceLocator locator)
Create a new ValidationException from a message and a Locator.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber() |
java.lang.String |
getConstraintClauseNumber()
Get the constraint clause number
|
java.lang.String |
getConstraintName()
Get the constraint name
|
java.lang.String |
getConstraintReference()
Get the constraint name and clause in the format defined in XML Schema Part C (Outcome Tabulations).
|
java.lang.String |
getConstraintReferenceMessage()
Get the constraint reference as a string for inserting into an error message.
|
int |
getConstraintSchemaPart()
Get the "schema part" component of the constraint reference
|
int |
getLineNumber() |
javax.xml.transform.SourceLocator |
getLocator() |
NodeInfo |
getNode() |
java.lang.String |
getPublicId() |
java.lang.String |
getSystemId() |
void |
setColumnNumber(int column) |
void |
setConstraintReference(int schemaPart,
java.lang.String constraintName,
java.lang.String clause)
Set a reference to the constraint in XML Schema that is not satisfied
|
void |
setConstraintReference(ValidationException e)
Copy the constraint reference from another exception object
|
void |
setLineNumber(int line) |
void |
setLocator(org.xml.sax.Locator locator) |
void |
setPublicId(java.lang.String id) |
void |
setSourceLocator(javax.xml.transform.SourceLocator locator) |
void |
setSystemId(java.lang.String id) |
java.lang.String |
toString()
Returns the String representation of this Exception
|
getErrorCodeLocalPart, getErrorCodeNamespace, getErrorObject, getXPathContext, hasBeenReported, isStaticError, isTypeError, makeStatic, makeXPathException, maybeSetContext, maybeSetLocation, setErrorCode, setErrorCode, setErrorObject, setHasBeenReported, setIsStaticError, setIsTypeError, setXPathContext
getCause, getException, getLocationAsString, getMessageAndLocation, initCause, printStackTrace, printStackTrace, printStackTrace, setLocator
public ValidationException(java.lang.String message)
message
- the message for this Exceptionpublic ValidationException(java.lang.Exception exception)
exception
- the nested exceptionpublic ValidationException(java.lang.String message, java.lang.Exception exception)
message
- the detail message for this exceptionexception
- the nested exceptionpublic ValidationException(java.lang.String message, javax.xml.transform.SourceLocator locator)
message
- The error or warning message.locator
- The locator object for the error or warning.public void setConstraintReference(int schemaPart, java.lang.String constraintName, java.lang.String clause)
schemaPart
- - 1 or 2, depending whether the constraint is in XMLSchema part 1 or part 2constraintName
- - the short name of the constraint in XMLSchema, as a fragment identifier in the
HTML of the XML Schema Part 1 specificationclause
- - the clause number within the description of that constraintpublic void setConstraintReference(ValidationException e)
e
- the other exception object from which to copy the informationpublic java.lang.String getConstraintReferenceMessage()
public int getConstraintSchemaPart()
public java.lang.String getConstraintName()
public java.lang.String getConstraintClauseNumber()
public java.lang.String getConstraintReference()
public java.lang.String toString()
toString
in class java.lang.Throwable
public java.lang.String getPublicId()
getPublicId
in interface javax.xml.transform.SourceLocator
getPublicId
in interface org.xml.sax.Locator
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.SourceLocator
getSystemId
in interface org.xml.sax.Locator
public int getLineNumber()
getLineNumber
in interface javax.xml.transform.SourceLocator
getLineNumber
in interface org.xml.sax.Locator
public int getColumnNumber()
getColumnNumber
in interface javax.xml.transform.SourceLocator
getColumnNumber
in interface org.xml.sax.Locator
public NodeInfo getNode()
public void setPublicId(java.lang.String id)
public void setSystemId(java.lang.String id)
public void setLineNumber(int line)
public void setColumnNumber(int column)
public void setLocator(org.xml.sax.Locator locator)
public void setSourceLocator(javax.xml.transform.SourceLocator locator)
public javax.xml.transform.SourceLocator getLocator()
getLocator
in class javax.xml.transform.TransformerException