private static Map<String, NamespaceSet> initNameSpace() {
// configure the name space mapping. This does not need to be all the elments in the
// namespace, just the point of translation from one namespace to another.
// It would have been good to use a standard parser/serializer approach, but
// the xstream namespace implementation does not work exactly how we need it to.
NamespaceSet atom = new NamespaceSet();
atom.addNamespace("xmlns", ATOM_NS);
atom.addNamespace("xmlns:osearch", OSEARCH_NS);
atom.addPrefixedElement("totalResults", "osearch:totalResults");
atom.addPrefixedElement("startIndex", "osearch:startIndex");
atom.addPrefixedElement("itemsPerPage", "osearch:itemsPerPage");
NamespaceSet os = new NamespaceSet();
os.addNamespace("xmlns", OS_NS);
return ImmutableMap.<String, NamespaceSet>builder()
.put("feed", atom)
.put("person", os)
.put("activity", os)