if (collections != null) {
for (CollectionInfo ci : collections) {
sw.startCollection(ci.getHref(request)).writeTitle(ci.getTitle(request));
if (ci instanceof MultipartRelatedCollectionInfo) {
MultipartRelatedCollectionInfo multipartCi = (MultipartRelatedCollectionInfo) ci;
for (Map.Entry<String, String> accept : multipartCi.getAlternateAccepts(request).entrySet()) {
sw.startElement(Constants.ACCEPT);
if (accept.getValue() != null && accept.getValue().length() > 0) {
sw.writeAttribute(Constants.LN_ALTERNATE, accept.getValue());
}
sw.writeElementText(accept.getKey()).endElement();