class UriTransformer {

    public String fromEbXML(List<String> slotValues) {
        if (slotValues.size() == 1) {
            String slotValue = slotValues.get(0);
            if (slotValue.indexOf('|') == -1) {
                return slotValue;
            }
        }
        
        String[] uriParts = new String[10];
        for (String slotValue : slotValues) {
            int separatorIdx = slotValue.indexOf('|');
            if (separatorIdx > 0) {
                int uriIdx = Integer.parseInt(slotValue.substring(0, separatorIdx));
                if (uriIdx < 10) {
                    uriParts[uriIdx] = slotValue.substring(separatorIdx + 1);
                }
            }
        }
        
        StringBuilder builder = new StringBuilder();
        for (String uriPart : uriParts) {
            if (uriPart != null) {
                builder.append(uriPart);
            }
        }
        
        String uri = builder.toString();
        return uri.isEmpty() ? null : uri;
    }

}