Package com.independentsoft.office
Class ValidationError
java.lang.Object
com.independentsoft.office.ValidationError
One problem found by a document's validate method.
-
Constructor Summary
ConstructorsConstructorDescriptionValidationError(String message, String location)Instantiates a new validation error. -
Method Summary
Modifier and TypeMethodDescriptionGets where the problem is, as a path through the object model - for example Slides[2] or Sheets[0].Name.Gets what is wrong, in terms of the object model rather than the XML - the caller fixes this by changing the document, not the file.toString()Returns the location and the message, which is what belongs in a log.
-
Constructor Details
-
ValidationError
Instantiates a new validation error. Normally these come from a document's validate method rather than from calling this; it is public only because the document classes live in other packages and Java has no way to widen access to just those.- Parameters:
message- what is wronglocation- where it is, as a path through the object model
-
-
Method Details
-
getMessage
Gets what is wrong, in terms of the object model rather than the XML - the caller fixes this by changing the document, not the file.- Returns:
- the message
-
getLocation
Gets where the problem is, as a path through the object model - for example Slides[2] or Sheets[0].Name. Null when the problem is the document as a whole.- Returns:
- the location
-
toString
Returns the location and the message, which is what belongs in a log.
-