in taverna-server-webapp/src/main/java/org/apache/taverna/server/master/ContentsDescriptorBuilder.java [209:230]
private AbstractValue constructValue(
Collection<DirectoryEntry> parentContents, UriBuilder ub,
String name) throws FilesystemAccessException {
String error = name + ".error";
String prefix = name + ".";
for (DirectoryEntry entry : parentContents) {
AbstractValue av;
if (entry.getName().equals(error) && entry instanceof File) {
av = constructErrorValue((File) entry);
} else if (!entry.getName().equals(name)
&& !entry.getName().startsWith(prefix))
continue;
else if (entry instanceof File)
av = constructLeafValue((File) entry);
else
av = constructListValue((Directory) entry, ub);
String fullPath = entry.getFullName().replaceFirst("^/", "");
av.href = ub.clone().path(fullPath).build();
return av;
}
return new AbsentValue();
}