.withEiMarketContext(new EiMarketContext(
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 )) )
)
)
)
)
)