code: private static void parseAuthority(JsonLdUrl parsed) {
          // parse authority for unparsed relative network-path reference
          if (parsed.href.indexOf(":") == -1 && parsed.href.indexOf("//") == 0
                  && "".equals(parsed.host)) {
              // must parse authority from pathname
              parsed.pathname = parsed.pathname.substring(2);
              final int idx = parsed.pathname.indexOf("/");
              if (idx == -1) {
                  parsed.authority = parsed.pathname;
                  parsed.pathname = "";
              } else {
                  parsed.authority = parsed.pathname.substring(0, idx);
                  parsed.pathname = parsed.pathname.substring(idx);
              }
          } else {
              // construct authority
              parsed.authority = parsed.host;
              if (!"".equals(parsed.auth)) {
                  parsed.authority = parsed.auth + "@" + parsed.authority;
              }
          }
      }
docs: Parses the authority for the pre-parsed given JsonLdUrl.
  
  @param parsed
  the pre-parsed JsonLdUrl.