Examples of DurationValue


Examples of com.enernoc.open.oadr2.model.DurationValue

                    new MarketContext("http://enernoc.com")))
                .withCreatedDateTime(new DateTime(startDttm)))
            .withEiActivePeriod(new EiActivePeriod()
                .withProperties(new Properties()
                    .withDtstart(new Dtstart(new DateTime(startDttm)))
                    .withDuration(new DurationPropType(new DurationValue("PT1M")))
                    .withTolerance( new Tolerance(new Tolerate(new DurationValue("PT5S"))))
                    .withXEiNotification(new DurationPropType(new DurationValue("PT5S")))
                ))
            .withEiEventSignals( new EiEventSignals()
                .withEiEventSignals( new EiEventSignal()
                    .withSignalID("hi there")
                    .withCurrentValue(new CurrentValue(new PayloadFloat(1.0f)))
                    .withSignalName("simple")
                    .withSignalType(SignalTypeEnumeratedType.LEVEL)
                    .withIntervals( new Intervals()
                        .withIntervals( new Interval()
                          .withStreamPayloadBase( oadrTypes.createSignalPayload(
                              new SignalPayload(new PayloadFloat(1.0f))))
                          .withDuration( new DurationPropType(new DurationValue("PT1M")))
                          .withUid(new Uid("abc"))
                        )
                    )
                )
            )
View Full Code Here

Examples of com.enernoc.open.oadr2.model.v20b.xcal.DurationValue

                .withSchemaVersion( "2.0b" )
                .withOadrReportRequests( new OadrReportRequest()
                        .withReportRequestID( "request-1234" )
                        .withReportSpecifier( new ReportSpecifier()
                                .withReportSpecifierID( "1234" )
                                .withGranularity( new DurationPropType( new DurationValue( duration.toString() ) ) )
                                .withReportBackDuration( new DurationPropType( new DurationValue( duration.toString() ) ) )
                                .withSpecifierPayloads( new SpecifierPayload()
                                        .withRID( "report 1234" )
                                        .withReadingType( ReadingTypeEnumeratedType.DIRECT_READ.value() )
                                        .withItemBase( of.createPulseCount( new PulseCountType()
                                                .withItemDescription( "pulse count" )
View Full Code Here

Examples of com.enernoc.open.oadr2.model.v20b.xcal.DurationValue

                        new MarketContext("http://enernoc.com")))
                    .withCreatedDateTime(new DateTime(startDttm)))
                .withEiActivePeriod(new EiActivePeriod()
                    .withProperties(new Properties()
                        .withDtstart(new Dtstart(new DateTime(startDttm)))
                        .withDuration(new DurationPropType(new DurationValue("PT1M")))
                        .withTolerance( new Tolerance(new Tolerate(new DurationValue("PT5S"))))
                        .withXEiNotification(new DurationPropType(new DurationValue("PT5S")))
                    ))
                .withEiEventSignals( new EiEventSignals()
                    .withEiEventSignals( new EiEventSignal()
                        .withSignalID("hi there")
                        .withCurrentValue(new CurrentValue(new PayloadFloatType(1.0f)))
                        .withSignalName("simple")
                        .withSignalType(SignalTypeEnumeratedType.LEVEL)
                        .withIntervals( new Intervals()
                            .withIntervals( new Interval()
                              .withStreamPayloadBases( eiObjectFactory.createSignalPayload(
                                      new SignalPayload( eiObjectFactory.createPayloadFloat(
                                              new PayloadFloatType( 1.0f) ) ) ) )
                              .withDuration( new DurationPropType( new DurationValue( "PT1M" )) )
                              .withDtstart( new Dtstart(new DateTime( startDttm )) )
                            )
                        )
                    )
                )
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.DurationValue

            } else if ((left instanceof IntValue) && (right instanceof IntValue)) {
                result = operator.compute((IntValue)left, (IntValue)right);
            } else if ((right instanceof DurationValue) &&
                    (operator instanceof TemporalOperator)) {
                TemporalOperator temporalOperator = (TemporalOperator)operator;
                DurationValue durationValue = (DurationValue)right;
                if (left instanceof DateTimeValue) {
                    result = temporalOperator.compute((DateTimeValue)left, durationValue);
                } else if (left instanceof DurationValue) {
                    result = temporalOperator.compute((DurationValue)left, durationValue);
                } else if (left instanceof DateValue) {
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.DurationValue

     *
     * @throws Exception thrown by tested function
     */
    public void testYearsFromDuration() throws Exception {
        final Function function = new YearsFromDurationFunction();
        DurationValue duration;
        Value result;

        duration =
                factory.createDurationValue(true, 20, 15, 0, 0, 0, 0, 0);
        result = function.invoke(
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.DurationValue

     *
     * @throws Exception thrown by tested function
     */
    public void testMonthsFromDuration() throws Exception {
        final Function function = new MonthsFromDurationFunction();
        DurationValue duration;
        Value result;

        duration =
                factory.createDurationValue(true, 20, 15, 0, 0, 0, 0, 0);
        result = function.invoke(
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.DurationValue

     *
     * @throws Exception thrown by tested function
     */
    public void testDaysFromDuration() throws Exception {
        final Function function = new DaysFromDurationFunction();
        DurationValue duration;
        Value result;

        duration =
                factory.createDurationValue(true, 0, 0, 3, 10, 0, 0, 0);
        result = function.invoke(
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.DurationValue

     *
     * @throws Exception thrown by tested function
     */
    public void testHoursFromDuration() throws Exception {
        final Function function = new HoursFromDurationFunction();
        DurationValue duration;
        Value result;

        duration =
                factory.createDurationValue(true, 0, 0, 3, 10, 0, 0, 0);
        result = function.invoke(
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.DurationValue

     *
     * @throws Exception thrown by tested function
     */
    public void testMinutesFromDuration() throws Exception {
        final Function function = new MinutesFromDurationFunction();
        DurationValue duration;
        Value result;

        duration =
                factory.createDurationValue(true, 0, 0, 3, 10, 0, 0, 0);
        result = function.invoke(
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.DurationValue

     *
     * @throws Exception thrown by tested function
     */
    public void testSecondsFromDuration() throws Exception {
        final Function function = new SecondsFromDurationFunction();
        DurationValue duration;
        Value result;

        duration =
                factory.createDurationValue(true, 0, 0, 3, 10, 0, 12, 5);
        result = function.invoke(
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.