pops.ale.epc.spec.grouping.string
Class PatternsValidation
java.lang.Object
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 :
- epc-tag type :
urn:epc:pat:sgtin-96:FilterValue.CompanyPrefix.ItemReference.SerialNumber
urn:epc:pat:sgln-96:FilterValue.CompanyPrefix.LocationReference.ExtensionComponent
- epc-pure type :
urn:epc:idpat:sgtin:CompanyPrefix.ItemReference.SerialNumber
urn:epc:idpat:sgln:CompanyPrefix.LocationReference.ExtensionComponent
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 |
PatternsValidation
public PatternsValidation()
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-tagpattern
- 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