class IRIBuilder {

    public String buildImageServiceContext(final String viewId) {
        final int viewIdInt = parseInt(viewId);
        final String v = format("%010d", viewIdInt);
        final String imageDirPrefix = config.getImageServiceImageDirPrefix();
        final int part1 = parseInt(v.substring(0,4));
        final String first = format("%04d", part1);
        final int part2 = parseInt(v.substring(5,8));
        final String second = format("%04d", part2);
        if (config.getIsUBLImageService()) {
            return config.getImageServiceBaseUrl() + imageDirPrefix + first + separator + second + separator + v;
        } else {
            return config.getImageServiceBaseUrl() + viewId;
        }
    }

    public  IRIBuilder(final Config config);
    private  IRIBuilder();

}