org.apache.uima.annotator.regex.extension.impl
Class ISBNNumberValidator

java.lang.Object
  extended by org.apache.uima.annotator.regex.extension.impl.ISBNNumberValidator
All Implemented Interfaces:
Validation

public class ISBNNumberValidator
extends java.lang.Object
implements Validation

ISBN number validator


Constructor Summary
ISBNNumberValidator()
           
 
Method Summary
 boolean validate(java.lang.String coveredText, java.lang.String ruleID)
          The validate method validates the covered text of an annotator and returns true or false whether the annotation is correct or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISBNNumberValidator

public ISBNNumberValidator()
Method Detail

validate

public boolean validate(java.lang.String coveredText,
                        java.lang.String ruleID)
                 throws java.lang.Exception
Description copied from interface: Validation
The validate method validates the covered text of an annotator and returns true or false whether the annotation is correct or not. The validate method is called between a rule match and the annotation creation. The annotation is only created if the method returns true.

Specified by:
validate in interface Validation
Parameters:
coveredText - covered text of the annotation that should be validated
ruleID - ruleID of the rule which created the match
Returns:
true if the annotation is valid or false if the annotation is invalid
Throws:
java.lang.Exception - throws an exception if an validation error occurred


Copyright © 2011. All Rights Reserved.