This project has retired. For details please refer to its Attic page.
AboutNotURIRule (Apache Any23 :: Core 0.7.0-incubating-SNAPSHOT API)

org.apache.any23.validator.rule
Class AboutNotURIRule

java.lang.Object
  extended by org.apache.any23.validator.rule.AboutNotURIRule
All Implemented Interfaces:
Rule

public class AboutNotURIRule
extends Object
implements Rule

This rule is able to detect whether an about value is a valid URL or otherwise is a valid relative URL.

Author:
Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)

Field Summary
static String NODES_WITH_INVALID_ABOUT
           
 
Constructor Summary
AboutNotURIRule()
           
 
Method Summary
 boolean applyOn(DOMDocument document, RuleContext context, ValidationReportBuilder validationReportBuilder)
          Applies this rule to the given document.
 String getHRName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODES_WITH_INVALID_ABOUT

public static final String NODES_WITH_INVALID_ABOUT
See Also:
Constant Field Values
Constructor Detail

AboutNotURIRule

public AboutNotURIRule()
Method Detail

getHRName

public String getHRName()
Specified by:
getHRName in interface Rule
Returns:
returns the human readable name for this rule.

applyOn

public boolean applyOn(DOMDocument document,
                       RuleContext context,
                       ValidationReportBuilder validationReportBuilder)
Description copied from interface: Rule
Applies this rule to the given document.

Specified by:
applyOn in interface Rule
Parameters:
document - the target document.
context - the context used to pass data to an eventual Fix.
validationReportBuilder - the report builder used to collect rule reporting.
Returns:
true if al least an issue is detected, false otherwise.


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.