{
SessionProvider sessionProvider = sessionProviderService.getSessionProvider(null);
try
{
regService.getRepositoryService().setCurrentRepositoryName(repository);
RegistryNode registryEntry = regService.getRegistry(sessionProvider);
if (registryEntry != null)
{
Node registryNode = registryEntry.getNode();
NodeIterator registryIterator = registryNode.getNodes();
Document entry = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
String fullURI = uriInfo.getRequestUri().toString();
XlinkHref xlinkHref = new XlinkHref(fullURI);
Element root = entry.createElement(REGISTRY);