code: private Map<String, String> namespaces(Kam kam) {
          Map<String, String> nsmap = new HashMap<String, String>();
  
          // find namespaces in resource index
          List<NamespaceDescriptor> ns = nsrsvc.getAllNamespaceDescriptors();
          for (NamespaceDescriptor n : ns) {
              Namespace the_ns = n.getNamespace();
              nsmap.put(the_ns.getPrefix(), the_ns.getResourceLocation());
          }
  
          // then find namespaces identified by the KAM
          List<org.openbel.framework.api.internal.KAMStoreDaoImpl.Namespace> nsl =
                  kAMStore.getNamespaces(kam);
          for (org.openbel.framework.api.internal.KAMStoreDaoImpl.Namespace kam_ns : nsl) {
              nsmap.put(kam_ns.getPrefix(), kam_ns.getResourceLocation());
          }
          return nsmap;
      }
docs: Assemble all known namespaces from the resource index and {@link Kam}.
  
  @param kam
  {@link Kam}
  @return {@link Map} of namespace {@link String prefix} to {@link String
  resource location}