code: public static URL buildHierarchical(final String scheme, final String host) throws GalimatiasParseException {
          if (!URLUtils.isRelativeScheme(scheme)) {
              throw new GalimatiasParseException("Scheme is not relative: " + scheme);
          }
          return new URLParser(scheme + "://" + host).parse();
      }
docs: Gets a URL object from a relative scheme and a host.
  
  @param scheme
  @param host
  @return
  @throws GalimatiasParseException