|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Validator
The validator class allows to perform validation - correction of
related to HTML Document instances.
| Method Summary | |
|---|---|
void |
addRule(Class<? extends Rule> rule)
Allows to register a new rule to this validator |
void |
addRule(Class<? extends Rule> rule,
Class<? extends Fix> fix)
Allows to register a new rule to this validator and associating it to a fix. |
List<Class<? extends Rule>> |
getAllRules()
Returns all the registered rules. |
List<Class<? extends Fix>> |
getFixes(Class<? extends Rule> rule)
Returns all fixes registered for the give rule. |
void |
removeRule(Class<? extends Rule> rule)
Allows to remove a rule from the validator and all the related Fixes. |
ValidationReport |
validate(DOMDocument document,
boolean applyFix)
Performs a validation - fixing of the provided document. |
ValidationReport |
validate(URI documentURI,
Document document,
boolean applyFix)
Performs a validation - fixing of the provided document. |
| Method Detail |
|---|
ValidationReport validate(DOMDocument document,
boolean applyFix)
throws ValidatorException
document - the DOMDocument instance wrapping the
original HTML document.applyFix - if true tries to fix the document.
ValidatorException - if an error occurs during the validation process.
ValidationReport validate(URI documentURI,
Document document,
boolean applyFix)
throws ValidatorException
documentURI - the document source URI.document - the original HTML document.applyFix - if true tries to fix the document.
ValidatorException - if an error occurs during the validation process.void addRule(Class<? extends Rule> rule)
rule -
void addRule(Class<? extends Rule> rule,
Class<? extends Fix> fix)
rule - fix - void removeRule(Class<? extends Rule> rule)
Fixes.
rule - List<Class<? extends Rule>> getAllRules()
List<Class<? extends Fix>> getFixes(Class<? extends Rule> rule)
rule -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||