< prev index next >

src/com/sun/org/apache/xerces/internal/impl/dv/xs/AbstractDateTimeDV.java

Print this page
rev 2127 : 8048021: Remove @version tag in jaxp repo
Reviewed-by: joehw


  30 import com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl;
  31 import com.sun.org.apache.xerces.internal.xs.datatypes.XSDateTime;
  32 
  33 /**
  34  * This is the base class of all date/time datatype validators.
  35  * It implements common code for parsing, validating and comparing datatypes.
  36  * Classes that extend this class, must implement parse() method.
  37  *
  38  * REVISIT: There are many instance variables, which would cause problems
  39  *          when we support grammar caching. A grammar is possibly used by
  40  *          two parser instances at the same time, then the same simple type
  41  *          decl object can be used to validate two strings at the same time.
  42  *          -SG
  43  *
  44  * @xerces.internal
  45  *
  46  * @author Elena Litani
  47  * @author Len Berman
  48  * @author Gopal Sharma, SUN Microsystems Inc.
  49  *
  50  * @version $Id: AbstractDateTimeDV.java,v 1.7 2010-11-01 04:39:46 joehw Exp $
  51  */
  52 public abstract class AbstractDateTimeDV extends TypeValidator {
  53 
  54     //debugging
  55     private static final boolean DEBUG = false;
  56     //define shared variables for date/time
  57     //define constants to be used in assigning default values for
  58     //all date/time excluding duration
  59     protected final static int YEAR = 2000;
  60     protected final static int MONTH = 01;
  61     protected final static int DAY = 01;
  62     protected static final DatatypeFactory datatypeFactory = new DatatypeFactoryImpl();
  63 
  64     @Override
  65     public short getAllowedFacets() {
  66         return (XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_MAXINCLUSIVE | XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE | XSSimpleTypeDecl.FACET_MINEXCLUSIVE);
  67     }//getAllowedFacets()
  68 
  69     // distinguishes between identity and equality for date/time values
  70     // ie: two values representing the same "moment in time" but with different




  30 import com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl;
  31 import com.sun.org.apache.xerces.internal.xs.datatypes.XSDateTime;
  32 
  33 /**
  34  * This is the base class of all date/time datatype validators.
  35  * It implements common code for parsing, validating and comparing datatypes.
  36  * Classes that extend this class, must implement parse() method.
  37  *
  38  * REVISIT: There are many instance variables, which would cause problems
  39  *          when we support grammar caching. A grammar is possibly used by
  40  *          two parser instances at the same time, then the same simple type
  41  *          decl object can be used to validate two strings at the same time.
  42  *          -SG
  43  *
  44  * @xerces.internal
  45  *
  46  * @author Elena Litani
  47  * @author Len Berman
  48  * @author Gopal Sharma, SUN Microsystems Inc.
  49  *

  50  */
  51 public abstract class AbstractDateTimeDV extends TypeValidator {
  52 
  53     //debugging
  54     private static final boolean DEBUG = false;
  55     //define shared variables for date/time
  56     //define constants to be used in assigning default values for
  57     //all date/time excluding duration
  58     protected final static int YEAR = 2000;
  59     protected final static int MONTH = 01;
  60     protected final static int DAY = 01;
  61     protected static final DatatypeFactory datatypeFactory = new DatatypeFactoryImpl();
  62 
  63     @Override
  64     public short getAllowedFacets() {
  65         return (XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_MAXINCLUSIVE | XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE | XSSimpleTypeDecl.FACET_MINEXCLUSIVE);
  66     }//getAllowedFacets()
  67 
  68     // distinguishes between identity and equality for date/time values
  69     // ie: two values representing the same "moment in time" but with different


< prev index next >