private String getLeafPart(final List<String> allParts) {
        if (allParts == null || allParts.isEmpty()) {
            return null;
        } else {
            final String leafPart = allParts.get(allParts.size() - 1);
            validatePart(leafPart);
            return leafPart.trim();
        }
    }
Append parts onto the end of this and return a new {@link DocPath}
stroom-util-shared/src/main/java/stroom/util/shared/DocPath.java