for( Segment segment : model.getSegmentation().getSegments() )
{
if( !segment.getPredicate().getClass().equals( True.class ) )
throw new PatternException( "segment predicates currently not supported, got: " + segment.getPredicate() );
Model segmentModel = segment.getModel();
if( segmentModel instanceof TreeModel )
models.add( new TreeSpec( modelSchema, createTree( (TreeModel) segmentModel, modelSchema ) ) );
else
throw new PatternException( "ensemble model currently not supported, got: " + segmentModel );