Package com.hp.hpl.jena.datatypes.xsd

Examples of com.hp.hpl.jena.datatypes.xsd.XSDDuration


                return new NodeValueGDay(time, node) ;
            }
           
            if ( XSDDatatype.XSDduration.isValidLiteral(lit) )
            {
                XSDDuration duration = (XSDDuration)lit.getValue() ;
                return new NodeValueDuration(duration, node) ;
            }
           
            if ( XSDDatatype.XSDboolean.isValidLiteral(lit) )
            {
View Full Code Here


        // Duration equality bug
        Literal d1 = m.createTypedLiteral("PT1H1M1S", XSDDatatype.XSDduration);
        Literal d2 = m.createTypedLiteral("PT1H1M1.1S", XSDDatatype.XSDduration);
        assertTrue("duration compare", !d1.sameValueAs(d2));
        XSDDuration dur1 = (XSDDuration)d1.getValue() ;
        XSDDuration dur2 = (XSDDuration)d2.getValue() ;
        assertEquals("duration compare order", 1, dur2.compare(dur1)) ;
       
        // dateTime
        l1 = m.createTypedLiteral("1999-05-31T02:09:32Z", XSDDatatype.XSDdateTime);
        XSDDateTime xdt = (XSDDateTime)l1.getValue();
        assertEquals("dateTime data type", XSDDatatype.XSDdateTime, l1.getDatatype());
View Full Code Here

        // Duration equality bug
        Literal d1 = m.createTypedLiteral("PT1H1M1S", XSDDatatype.XSDduration);
        Literal d2 = m.createTypedLiteral("PT1H1M1.1S", XSDDatatype.XSDduration);
        assertTrue("duration compare", !d1.sameValueAs(d2));
        XSDDuration dur1 = (XSDDuration)d1.getValue() ;
        XSDDuration dur2 = (XSDDuration)d2.getValue() ;
        assertEquals("duration compare order", 1, dur2.compare(dur1)) ;
       
        // dateTime
        l1 = m.createTypedLiteral("1999-05-31T02:09:32Z", XSDDatatype.XSDdateTime);
        XSDDateTime xdt = (XSDDateTime)l1.getValue();
        assertEquals("dateTime data type", XSDDatatype.XSDdateTime, l1.getDatatype());
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.datatypes.xsd.XSDDuration

Copyright © 2018 www.massapicom. 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.