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

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

public class CreditCardNumberValidator
extends java.lang.Object
implements Validation

credit card number validator


Constructor Summary
CreditCardNumberValidator()
           
 
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

CreditCardNumberValidator

public CreditCardNumberValidator()
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.