Class YearDV


  • public class YearDV
    extends AbstractDateTimeDV
    Validator for <gYear> datatype (W3C Schema Datatypes)
    Version:
    $Id$
    Author:
    Elena Litani, Gopal Sharma, SUN Microsystem Inc.
    • Constructor Detail

      • YearDV

        public YearDV()
    • Method Detail

      • parse

        protected org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData parse​(String str)
                                                                                                                throws SchemaDateTimeException
        Parses, validates and computes normalized version of gYear object
        Parameters:
        str - The lexical representation of year object CCYY with possible time zone Z or (-),(+)hh:mm
        Returns:
        normalized date representation
        Throws:
        SchemaDateTimeException - Invalid lexical representation
      • dateToString

        protected String dateToString​(org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.DateTimeData date)
        Converts year object representation to String
        Overrides:
        dateToString in class AbstractDateTimeDV
        Parameters:
        date - year object
        Returns:
        lexical representation of month: CCYY with optional time zone sign