class CategoryOptionGroupResolver implements
    ExpressionResolver {

    @Override
    @Transactional( readOnly = true )
    public String resolve( String expression )
    {
        // Get a DimensionalItemId from the expression. The expression is parsed and
        // each element placed in the DimensionalItemId
        Set<DimensionalItemId> dimItemIds = expressionService.getExpressionDimensionalItemIds( expression, INDICATOR_EXPRESSION );
        List<String> resolvedOperands = new ArrayList<>();
        if ( isDataElementOperand( dimItemIds ) )
        {
            DimensionalItemId dimensionalItemId = dimItemIds.stream().findFirst().get();
            // First element is always the Data Element Id
            String dataElementUid = dimensionalItemId.getId0();

            resolvedOperands
                .addAll( evaluate( dataElementUid, dimensionalItemId.getId1(), dimensionalItemId.getId2() ) );

            resolvedOperands.addAll( evaluate( dataElementUid, dimensionalItemId.getId2(), null ) );
        }
        if ( resolvedOperands.isEmpty() )
        {
            // nothing to resolve, add the expression as it is
            resolvedOperands.add( expression );
        }
        return Joiner.on( "+" ).join( resolvedOperands );
    }

    public  CategoryOptionGroupResolver( CategoryOptionGroupStore categoryOptionGroupStore, CategoryOptionComboStore categoryOptionComboStore,
        ExpressionService expressionService );

}