Examples of newXMLGregorianCalendar()


Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

            if (Double.isInfinite(d)) {
                throw new IllegalArgumentException("The passed double cannot be infinite.");
            }
            GregorianCalendar gc = new GregorianCalendar();
            gc.setTimeInMillis((long) d);
            return dateFactory.newXMLGregorianCalendar(gc).toXMLFormat().substring(0, 23);
        } catch (DatatypeConfigurationException ex) {
            Exceptions.printStackTrace(ex);
            return "";
        }
    }
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

    }

    private static XMLGregorianCalendar getXMLGregorianCalendar(GregorianCalendar gregorianCalendar) {
        try {
            DatatypeFactory dtf = DatatypeFactory.newInstance();
            return dtf.newXMLGregorianCalendar(gregorianCalendar);
        } catch (DatatypeConfigurationException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

           
            Element createdElem =
                DOMUtils.getFirstChildWithName(lifetimeElem,
                                                WSConstants.WSU_NS,
                                                WSConstants.CREATED_LN);
            this.created = factory.newXMLGregorianCalendar(DOMUtils.getContent(createdElem))
                .toGregorianCalendar();

            Element expiresElem =
                DOMUtils.getFirstChildWithName(lifetimeElem,
                                                WSConstants.WSU_NS,
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

            Element expiresElem =
                DOMUtils.getFirstChildWithName(lifetimeElem,
                                                WSConstants.WSU_NS,
                                                WSConstants.EXPIRES_LN);
            this.expires = factory.newXMLGregorianCalendar(DOMUtils.getContent(expiresElem))
                .toGregorianCalendar();
        } catch (DatatypeConfigurationException e) {
            //shouldn't happen
        }
    }
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

    private void performTestNewXMLGregorianCalendar(StandardTypesServiceClient serviceClient)
        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
        xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
        xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
        xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));

        for (int i = 0; i < xgcals.length; ++i) {
            XMLGregorianCalendar actual = serviceClient.getNewXMLGregorianCalendarForward(xgcals[i]);
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

    private void performTestNewXMLGregorianCalendar(StandardTypesServiceClient serviceClient)
        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
        xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
        xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
        xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));

        for (int i = 0; i < xgcals.length; ++i) {
            XMLGregorianCalendar actual = serviceClient.getNewXMLGregorianCalendarForward(xgcals[i]);
            xgcals[i].setDay(xgcals[i].getDay() + 5);
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
        xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
        xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
        xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));

        for (int i = 0; i < xgcals.length; ++i) {
            XMLGregorianCalendar actual = serviceClient.getNewXMLGregorianCalendarForward(xgcals[i]);
            xgcals[i].setDay(xgcals[i].getDay() + 5);
            Assert.assertEquals(xgcals[i], actual);
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

    private void performTestNewXMLGregorianCalendarArray(StandardTypesServiceClient serviceClient)
        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
        xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
        xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
        xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));

        XMLGregorianCalendar[] actual = serviceClient.getNewXMLGregorianCalendarArrayForward(xgcals);
        Assert.assertEquals(xgcals.length, actual.length);
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

    private void performTestNewXMLGregorianCalendarArray(StandardTypesServiceClient serviceClient)
        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
        xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
        xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
        xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));

        XMLGregorianCalendar[] actual = serviceClient.getNewXMLGregorianCalendarArrayForward(xgcals);
        Assert.assertEquals(xgcals.length, actual.length);
        for (int i = 0; i < xgcals.length; ++i) {
View Full Code Here

Examples of javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()

        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
        xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
        xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
        xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));

        XMLGregorianCalendar[] actual = serviceClient.getNewXMLGregorianCalendarArrayForward(xgcals);
        Assert.assertEquals(xgcals.length, actual.length);
        for (int i = 0; i < xgcals.length; ++i) {
            xgcals[i].setDay(xgcals[i].getDay() + 5);
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.