Class DateValidator

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

public class DateValidator extends Object
Functions for validating date-related schema data types.
Author:
ostwald
  • Constructor Details

    • DateValidator

      public DateValidator()
  • Method Details

    • 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