pops.ale.epc.spec.grouping.string
Class PatternsValidation

java.lang.Object
  extended by pops.ale.epc.spec.grouping.string.PatternsValidation

public class PatternsValidation
extends java.lang.Object

This class provides utilities for analyzing patterns in relation with the ECFieldSpec specification class.
Patterns may be in one of the following forms :


Constructor Summary
PatternsValidation()
           
 
Method Summary
static int arePaternsValid(java.lang.String fieldType, java.lang.String[] patterns)
          Method for validating an array of patterns of the same type.
static boolean isPaternValid(java.lang.String fieldType, java.lang.String pattern)
          Method for validating a pattern.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternsValidation

public PatternsValidation()
Method Detail

arePaternsValid

public static int arePaternsValid(java.lang.String fieldType,
                                  java.lang.String[] patterns)
Method for validating an array of patterns of the same type.

Parameters:
fieldType - epc-pure or epc-tag (the same of all)
patterns - Array of patterns to check.
Returns:
the index of the first invalid pattern of the array, -1 if all are valid

isPaternValid

public static boolean isPaternValid(java.lang.String fieldType,
                                    java.lang.String pattern)
Method for validating a pattern.

Parameters:
fieldType - epc-pure or epc-tag
pattern - to validate.
Returns:
true if valid, false otherwise

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception