org.apache.uima.annotator.regex.extension.impl
Class CreditCardNumberValidator
java.lang.Object
org.apache.uima.annotator.regex.extension.impl.CreditCardNumberValidator
- All Implemented Interfaces:
- Validation
public class CreditCardNumberValidator
- extends Object
- implements Validation
credit card number validator
Method Summary |
boolean |
validate(String coveredText,
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 |
CreditCardNumberValidator
public CreditCardNumberValidator()
validate
public boolean validate(String coveredText,
String ruleID)
throws 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 validatedruleID
- ruleID of the rule which created the match
- Returns:
- true if the annotation is valid or false if the annotation is invalid
- Throws:
Exception
- throws an exception if an validation error occurred
Copyright © 2006-2011 The Apache Software Foundation. All Rights Reserved.