|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception javax.xml.transform.TransformerException net.sf.saxon.trans.XPathException net.sf.saxon.type.ValidationException
public class ValidationException
This exception indicates a failure when validating an instance against a type defined in a schema.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.saxon.trans.XPathException |
---|
XPathException.Circularity |
Constructor Summary | |
---|---|
ValidationException(Exception exception)
Creates a new ValidationException with the given nested exception. |
|
ValidationException(String message)
Creates a new ValidationException with the given message. |
|
ValidationException(String message,
Exception exception)
Creates a new ValidationException with the given message and nested exception. |
|
ValidationException(String message,
SourceLocator locator)
Create a new ValidationException from a message and a Locator. |
Method Summary | |
---|---|
int |
getColumnNumber()
|
String |
getConstraintClauseNumber()
Get the constraint clause number |
String |
getConstraintName()
Get the constraint name |
String |
getConstraintReference()
Get the constraint name and clause in the format defined in XML Schema Part C (Outcome Tabulations). |
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()
|
SourceLocator |
getLocator()
|
NodeInfo |
getNode()
|
String |
getPublicId()
|
String |
getSystemId()
|
void |
setColumnNumber(int column)
|
void |
setConstraintReference(int schemaPart,
String constraintName,
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(Locator locator)
|
void |
setPublicId(String id)
|
void |
setSourceLocator(SourceLocator locator)
|
void |
setSystemId(String id)
|
String |
toString()
Returns the String representation of this Exception |
Methods inherited from class net.sf.saxon.trans.XPathException |
---|
getErrorCodeLocalPart, getErrorCodeNamespace, getErrorCodeQName, getErrorObject, getXPathContext, hasBeenReported, isGlobalError, isStaticError, isTypeError, makeStatic, makeXPathException, maybeSetContext, maybeSetErrorCode, maybeSetLocation, setErrorCode, setErrorCodeQName, setErrorObject, setHasBeenReported, setIsGlobalError, setIsStaticError, setIsTypeError, setXPathContext |
Methods inherited from class javax.xml.transform.TransformerException |
---|
getCause, getException, getLocationAsString, getMessageAndLocation, initCause, printStackTrace, printStackTrace, printStackTrace, setLocator |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValidationException(String message)
message
- the message for this Exceptionpublic ValidationException(Exception exception)
exception
- the nested exceptionpublic ValidationException(String message, Exception exception)
message
- the detail message for this exceptionexception
- the nested exceptionpublic ValidationException(String message, SourceLocator locator)
message
- The error or warning message.locator
- The locator object for the error or warning.Method Detail |
---|
public void setConstraintReference(int schemaPart, String constraintName, 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 String getConstraintReferenceMessage()
public int getConstraintSchemaPart()
public String getConstraintName()
public String getConstraintClauseNumber()
public String getConstraintReference()
public String toString()
toString
in class Throwable
public String getPublicId()
getPublicId
in interface SourceLocator
getPublicId
in interface Locator
public String getSystemId()
getSystemId
in interface SourceLocator
getSystemId
in interface Locator
public int getLineNumber()
getLineNumber
in interface SourceLocator
getLineNumber
in interface Locator
public int getColumnNumber()
getColumnNumber
in interface SourceLocator
getColumnNumber
in interface Locator
public NodeInfo getNode()
public void setPublicId(String id)
public void setSystemId(String id)
public void setLineNumber(int line)
public void setColumnNumber(int column)
public void setLocator(Locator locator)
public void setSourceLocator(SourceLocator locator)
public SourceLocator getLocator()
getLocator
in class TransformerException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |