org.jopendocument.util
Class Validator

java.lang.Object
  extended by org.jopendocument.util.Validator
Direct Known Subclasses:
Validator.DTDValidator, Validator.JAXPValidator

public abstract class Validator
extends Object


Nested Class Summary
static class Validator.DTDValidator
           
static class Validator.JAXPValidator
           
 
Constructor Summary
protected Validator(org.jdom.Document doc)
           
 
Method Summary
protected  org.jdom.Document getDoc()
           
abstract  String isValid()
          Validate a document, stopping at the first problem.
abstract  CollectionMap<String,String> validateCompletely()
          Validate the whole document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator

protected Validator(org.jdom.Document doc)
Method Detail

getDoc

protected final org.jdom.Document getDoc()

isValid

public abstract String isValid()
Validate a document, stopping at the first problem.

Returns:
null if doc is valid, a String describing the first problem otherwise.

validateCompletely

public abstract CollectionMap<String,String> validateCompletely()
Validate the whole document.

Returns:
all problems (with line number) indexed by type, e.g. ERROR unexpected attribute "style:join-border" => [on line 22:50, on line 14901:290].


Copyright © 2010 jOpenDocument All Rights Reserved.