+my @attr = keys %{ $stats->{attr} }; # FIXME replace with real gnerated lookup
+
+# XXX pipe delimit list!
+my $select_attr_operators = << '__ATTR_OPERATORS__';
+Q* | Bilo koja riječ
+BW Q | Početak
+BW Q EW | Točan oblik
+__ATTR_OPERATORS__
+
+my $attr_operator;
+
+foreach ( split(/[\n\r]+/, $select_attr_operators ) ) {
+ my ( $operator,$label ) = split(/\s+\|\s+/,$_,2);
+ push @{ $attr_operator->{ '-values' } }, $operator;
+ $attr_operator->{ '-labels' }->{$operator} = $label;
+}
+
+warn "## attr_operator = ", dump( $attr_operator );
+
+my $only_input;
+
+foreach ( @{ $db->{input} } ) {
+ my $input = $_->{name} || die "no name in ",dump( $_ );
+ if ( ! $only_input->{'-labels'}->{$input} ) {
+ push @{ $only_input->{'-values'} }, $input;
+ $only_input->{'-labels'}->{$input} = $_->{description} || $input;
+ }
+}
+
+warn "## only_input = ", dump( $only_input );