class DimensionDescriptor {

    public static String getDimensionIdentifierFor( final String dimension,
        final List<DimensionDescriptor> dimensionDescriptors )
    {
        if ( isNotEmpty( dimensionDescriptors ) )
        {
            // For each dimension descriptor
            for ( final DimensionDescriptor dimensionDescriptor : dimensionDescriptors )
            {
                if ( dimensionDescriptor.hasDimension( dimension ) )
                {
                    // Returns the string/value associated with the dimension type.
                    return dimensionDescriptor.getDimensionIdentifier();
                }
            }
        }

        return dimension;
    }

}