DLESE Tools
v1.6.0

org.dlese.dpc.xml.schema
Class DateValidator

java.lang.Object
  extended by org.dlese.dpc.xml.schema.DateValidator

public class DateValidator
extends Object

Functions for validating date-related schema data types.

Author:
ostwald

Constructor Summary
DateValidator()
           
 
Method Summary
static boolean checkValidBCType(String value, XSDatatypeManager xsdManager)
          First make sure value is valid as a "xsd:gYear" and then make sure the max inclusive value is "-0001"
static boolean checkValidUnionDate(String value)
          We are given a date String.
static boolean checkValidXsdDate(String value)
          Description of the Method
static void main(String[] args)
          The main program for the DateValidator class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateValidator

public DateValidator()
Method Detail

checkValidXsdDate

public static boolean checkValidXsdDate(String value)
                                 throws Exception
Description of the Method

Parameters:
value - Description of the Parameter
Returns:
Description of the Return Value
Throws:
Exception - Description of the Exception

checkValidBCType

public static boolean checkValidBCType(String value,
                                       XSDatatypeManager xsdManager)
                                throws Exception
First make sure value is valid as a "xsd:gYear" and then make sure the max inclusive value is "-0001"

Throws:
Exception

checkValidUnionDate

public static boolean checkValidUnionDate(String value)
                                   throws Exception
We are given a date String. First check to make sure it is formatted correctly. Then check to see that the values of each field are leagal. This is done by checking the fields of the parsed Date against the original date String.

Parameters:
value - Description of the Parameter
Returns:
Description of the Return Value
Throws:
Exception - Description of the Exception

main

public static void main(String[] args)
                 throws Exception
The main program for the DateValidator class

Parameters:
args - The command line arguments
Throws:
Exception - Description of the Exception

DLESE Tools
v1.6.0