code: public static String getBaseURL(String protocol) {
          String port;
          if (protocol.equals("http")) {
              port = CONFIG.getParameter(FEDORA_SERVER_PORT,Parameter.class).getValue();
          } else if (protocol.equals("https")) {
              port = CONFIG.getParameter(FEDORA_REDIRECT_PORT,Parameter.class).getValue();
          } else {
              throw new RuntimeException("Unrecogonized protocol: " + protocol);
          }
          return protocol + "://"
                  + CONFIG.getParameter(FEDORA_SERVER_HOST,Parameter.class).getValue() + ":"
                  + port + "/" + CONFIG.getParameter(FEDORA_SERVER_CONTEXT,Parameter.class).getValue();
      }
docs: Get the baseURL of the Fedora server from the host and port configured.
  It will look like http://localhost:8080/fedora