linkStarted = writeAtomLink(eventWriter, "previous", theBundle.getLinkPrevious(), linkStarted);
linkStarted = writeAtomLink(eventWriter, "next", theBundle.getLinkNext(), linkStarted);
linkStarted = writeAtomLink(eventWriter, "last", theBundle.getLinkLast(), linkStarted);
linkStarted = writeAtomLink(eventWriter, "fhir-base", theBundle.getLinkBase(), linkStarted);
if (linkStarted) {
eventWriter.writeEnd();
}
writeCategories(eventWriter, theBundle.getCategories());
writeOptionalTagWithTextNode(eventWriter, "totalResults", theBundle.getTotalResults());