Series<Header> responseHeaders = (Series<Header>) getResponse().getAttributes().get("org.restlet.http.headers");
if (responseHeaders == null) {
responseHeaders = new Series(Header.class);
getResponse().getAttributes().put("org.restlet.http.headers", responseHeaders);
}
responseHeaders.add(new Header("Location", pipelineUri(id)));
TreeWriter tree = new TreeWriter(getGlobalRuntime());
tree.startDocument(URI.create("http://example.com/"));
tree.addStartElement(pr_response);