class RepositoryResourcePathUtil {

	public static List<Map<String, String>> combinePathes(List<RepositoryResource> resources) {
		List<Map<String, String>> stripedParentGroups = new ArrayList<Map<String, String>>();
		String relativePath = "";
		for(RepositoryResource each : resources) {
			relativePath = relativePath + "/" + each.getKey();
			String name = "";
			if(StringUtils.isBlank(each.getName())) {
				name = each.getKey();
			} else {
				name = each.getName();
			}
			
			Map<String, String> map = new HashMap<String, String>();
			map.put("name", name);
			map.put("path", relativePath);
			stripedParentGroups.add(map);
		}
		return stripedParentGroups;
	}

}