Package xbird.xquery.dm.value.xsi

Examples of xbird.xquery.dm.value.xsi.DurationValue


                Type secType = sec.getType();
                if(!TypeUtil.subtypeOf(secType, DayTimeDurationType.DAYTIME_DURATION)) {
                    throw new IllegalStateException("second argument is expected to be xdt:dayTimeDuration, but was "
                            + secType);
                }
                DurationValue dv = (DurationValue) sec;
                utcOffsetInMillis = dv.getTimeInMillis();
            }
        } else {
            throw new IllegalStateException("Illegal argument length: " + arglen);
        }
        final int offsetInMinutes = (int) (utcOffsetInMillis / 60000);
View Full Code Here


        Item first = argv.getItem(0);
        if(first.isEmpty()) {
            return ValueSequence.EMPTY_SEQUENCE;
        }
        assert (first instanceof DurationValue);
        DurationValue arg = (DurationValue) first;
        return extract(arg);
    }
View Full Code Here

            op.staticAnalysis(dynEnv.getStaticContext(), sum, divby);
            return op.eval(dynEnv, sum, divby);
        } else if(firstItem instanceof DurationValue) {
            // Duration values must either all be xdt:yearMonthDuration values
            // or must all be xdt:dayTimeDuration values.
            DurationValue sum = (DurationValue) firstItem;
            Type firstType = firstItem.getType();
            assert (firstType != null);
            int size;
            for(size = 1; argItor.hasNext(); size++) {
                Item toadd = argItor.next();
View Full Code Here

            }
            return sum;
        } else if(firstItem instanceof DurationValue) {
            // Duration values must either all be xdt:yearMonthDuration values
            // or must all be xdt:dayTimeDuration values.
            DurationValue sum = (DurationValue) firstItem;
            Type firstType = firstItem.getType();
            assert (firstType != null);
            while(argItor.hasNext()) {
                Item toadd = argItor.next();
                if(toadd instanceof DurationValue) {
View Full Code Here

            }
            return min;
        } else if(firstItem instanceof DurationValue) {
            // Duration values must either all be xdt:yearMonthDuration values
            // or must all be xdt:dayTimeDuration values.
            DurationValue min = (DurationValue) firstItem;
            assert (firstType != null);
            while(argItor.hasNext()) {
                Item it = argItor.next();
                if(it instanceof DurationValue) {
                    throw new DynamicError("err:FORG0006", "Duration values must all be `"
                            + firstType + "`, but found `" + it.getType() + "`");
                }
                DurationValue cmp = (DurationValue) it;
                if(cmp.compareTo(min) < 0) {
                    min = cmp;
                }
            }
            return min;
        } else if(TypeUtil.subtypeOf(firstType, StringType.STRING)) {
View Full Code Here

            }
            return max;
        } else if(firstItem instanceof DurationValue) {
            // Duration values must either all be xdt:yearMonthDuration values
            // or must all be xdt:dayTimeDuration values.
            DurationValue max = (DurationValue) firstItem;
            while(argItor.hasNext()) {
                Item it = argItor.next();
                if(it instanceof DurationValue) {
                    throw new DynamicError("err:FORG0006", "Duration values must all be `"
                            + firstType + "`, but found `" + it.getType() + "`");
                }
                DurationValue cmp = (DurationValue) it;
                if(cmp.compareTo(max) > 0) {
                    max = cmp;
                }
            }
            return max;
        } else if(TypeUtil.subtypeOf(firstType, StringType.STRING)) {
View Full Code Here

TOP

Related Classes of xbird.xquery.dm.value.xsi.DurationValue

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.