Package javax.xml.datatype

Examples of javax.xml.datatype.XMLGregorianCalendar.toGregorianCalendar()


    }
    if (retType.isAssignableFrom(javax.xml.datatype.XMLGregorianCalendar.class)) {
        if( value!=null){
          XMLGregorianCalendar d = (XMLGregorianCalendar) value; // NOPMD by wim on
                                                             // 9/20/10 3:00 PM
          prop.setDate(i, d.toGregorianCalendar());
        }
        return;
    }
    if (retType.isAssignableFrom(java.util.GregorianCalendar.class)) {
      if( value!=null){
View Full Code Here


             }else{
                 throw XMLConversionException.incorrectTimestampDateTimeFormat(sourceString);
             }
        }

        GregorianCalendar cal = xmlGregorianCalender.toGregorianCalendar();
        cal.setTimeZone(getTimeZone());

        QName  calendarQName = xmlGregorianCalender.getXMLSchemaType();
        if(!calendarQName.equals(schemaType)){
            if (XMLConstants.DATE_QNAME.equals(schemaType)){
View Full Code Here

    }
    if (this.date != null) {
      try {
        final XMLGregorianCalendar date = DatatypeFactory.newInstance()
            .newXMLGregorianCalendar();
        if (!this.date.equals(date.toGregorianCalendar().getTime())) {
          return true; // NOPMD by wim on 9/20/10 2:28 PM
        }
      } catch (DatatypeConfigurationException e) {
        return false; // fatal // NOPMD by wim on 9/20/10 2:28 PM
      }
View Full Code Here

    }
    if (this.date != null) {
      try {
        final XMLGregorianCalendar date = DatatypeFactory.newInstance()
            .newXMLGregorianCalendar();
        if (!this.date.equals(date.toGregorianCalendar().getTime())) {
          return date; // NOPMD by wim on 9/20/10 2:28 PM
        }
      } catch (DatatypeConfigurationException e) {
        return null; // fatal // NOPMD by wim on 9/20/10 2:28 PM
      }
View Full Code Here

             }
        }
        if(xmlGregorianCalender == null) {
            return null;
        }
        GregorianCalendar cal = xmlGregorianCalender.toGregorianCalendar();
        if(xmlGregorianCalender.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {
            cal.setTimeZone(getTimeZone());
        }
        QName  calendarQName = xmlGregorianCalender.getXMLSchemaType();
        if(!calendarQName.equals(schemaType)){
View Full Code Here

                bspEnforcer.handleBSPRule(BSPRule.R3213);
            }
            if (createdCalendar.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {
                bspEnforcer.handleBSPRule(BSPRule.R3217);
            }
            createdDate = createdCalendar.toGregorianCalendar().getTime();
        }
       
        if (strExpires != null) {
            XMLGregorianCalendar expiresCalendar = null;
            try {
View Full Code Here

                bspEnforcer.handleBSPRule(BSPRule.R3215);
            }
            if (expiresCalendar.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {
                bspEnforcer.handleBSPRule(BSPRule.R3223);
            }
            expiresDate = expiresCalendar.toGregorianCalendar().getTime();
        }
    }


    /**
 
View Full Code Here

                        WSSecurityException.ErrorCode.INVALID_SECURITY_TOKEN,
                        "badUsernameToken", e,
                        "Error parsing UsernameToken Created value"
                    );
                }
                createdDate = createdCalendar.toGregorianCalendar().getTime();
            }
        }
    }

    /**
 
View Full Code Here

        }
        // An XMLGregorianCalendar will be used to parse the date string
        XMLGregorianCalendar xgc = getXMLConversionManager().convertStringToXMLGregorianCalendar(dateString);
        Calendar cal;
        if (xgc.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {
            cal = xgc.toGregorianCalendar(getXMLConversionManager().getTimeZone(), locale, null);
            cal.clear(Calendar.ZONE_OFFSET);
        } else {
            cal = xgc.toGregorianCalendar(xgc.getTimeZone(xgc.getTimezone()), locale, null);
        }
        return cal;
View Full Code Here

        Calendar cal;
        if (xgc.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {
            cal = xgc.toGregorianCalendar(getXMLConversionManager().getTimeZone(), locale, null);
            cal.clear(Calendar.ZONE_OFFSET);
        } else {
            cal = xgc.toGregorianCalendar(xgc.getTimeZone(xgc.getTimezone()), locale, null);
        }
        return cal;
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.