if ( pattern.getObjectType().isEvent() ) {
if ( Behavior.BehaviorType.TIME_WINDOW.matches( behaviorDescr.getSubType() ) ) {
SlidingTimeWindow window = new SlidingTimeWindow( TimeUtils.parseTimeString( behaviorDescr.getParameters().get( 0 ) ) );
pattern.addBehavior( window );
} else if ( Behavior.BehaviorType.LENGTH_WINDOW.matches( behaviorDescr.getSubType() ) ) {
SlidingLengthWindow window = new SlidingLengthWindow( Integer.valueOf( behaviorDescr.getParameters().get( 0 ) ) );
pattern.addBehavior( window );
}
} else {
// Some behaviors can only be assigned to patterns declared as events
context.addError(new DescrBuildError(context.getParentDescr(),