/* (non-Javadoc)
@see org.archive.wayback.core.Capture#getOriginalUrl()
482208
@Override
	public String getOriginalUrl() {
		String url = get(CAPTURE_ORIGINAL_URL);
		if (url == null) {
			// convert from ORIG_HOST to ORIG_URL here:
			url = getUrlKey();
			String host = get(CAPTURE_ORIGINAL_HOST);
			if (url != null && host != null) {
				StringBuilder sb = new StringBuilder(url.length());
				sb.append(UrlOperations.DEFAULT_SCHEME);
				sb.append(host);
				sb.append(UrlOperations.getURLPath(url));
				url = sb.toString();
				// cache it for next time...?
				setOriginalUrl(url);
			}
		}
		return url;
	}
946266
public String getSrcUrl() {

        String imageSrc = getCmsObject().getSitePath(getResource());
        if ((getScaler() != null) && getScaler().isValid()) {
            // now append the scaler parameters if required
            imageSrc += getScaler().toRequestParam();
        }
        return OpenCms.getLinkManager().substituteLink(getCmsObject(), imageSrc);
    }
205543
def geturl(self):
        
        if self.retries is not None and len(self.retries.history):
            return self.retries.history[-1].redirect_location
        else:
            return self._request_url
57007
public String getUrl() {
        String frontUrl = this.url;
        if (frontUrl != null && !frontUrl.isEmpty() && !frontUrl.endsWith("/")) {
            frontUrl += '/';
        }
        return frontUrl;
    }
352978
@Nullable
  public static String getUnifiedURL (@Nullable final String sURL)
  {
    return sURL == null ? null : sURL.trim ().toLowerCase (Locale.US);
  }
527288
@Override
    public String getURL() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getURL();
        return null;
    }
726690
private URL getRedirectURL(String location) throws IOException {
        HttpInputStream in = get(location, false, false);
        try {
            if (in.getStatusCode() == 302) {
                Header h = in.getResponseHeader("location");
                if (h != null) {
                    return new URL(h.getValue());
                }
            }
            return null;
        } finally {
            try {
                in.close();
            } catch (Exception e) {
            }
        }
    }
280482
@Nullable
    public String getUrl() {
        if (getRepositoryUrl() == null)
            return null;
        return getRepositoryUrl() + "/" + getGroupId().replace('.', '/') + "/" + getArtifactId() + "/" + getVersion() + "/" + getFileNameWithBaseVersion();
    }
402879
public String getUrl() {
        if (url == null) {
            RequestHandle request = getRequest();
            url = LinkUtil.getUrl(request, getPath(), request.getSelectors(), null);
        }
        return url;
    }
334910
@Override
	public String getWebInterfaceURL() {
		try {
			return getWebMonitorBaseUrl().get().toString();
		} catch (InterruptedException | ExecutionException e) {
			ExceptionUtils.checkInterrupted(e);

			log.warn("Could not retrieve the web interface URL for the cluster.", e);
			return "Unknown address.";
		}
	}
1257887
private String getURLInfo() {
        try {
            if (hasProperty(PROXY_FOR)) {
                return getNode().getProperty(PROXY_FOR).getValue().getString();
            } else if (hasProperty(REDIRECTS_TO)) {
                return getNode().getProperty(REDIRECTS_TO).getValue().getString();
            }
        } catch (RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }

        return null;
    }
617
@JsonProperty("relative_url")
	public String getRelativeURL() {
		StringBuilder bld = new StringBuilder();
		bld.append(this.object);
		
		Param[] params = this.getParams();
		
		if (params != null && params.length > 0) {
			bld.append('?');
			boolean afterFirst = false;
			
			for (Param param: params) {
				if (afterFirst)
					bld.append('&');
				else
					afterFirst = true;
				
				if (param instanceof BinaryParam) {
					//call.addParam(param.name, (InputStream)param.value, ((BinaryParam)param).contentType, "irrelevant");
					throw new UnsupportedOperationException("Not quite sure what to do with BinaryParam yet");
				} else {
					String paramValue = StringUtils.stringifyValue(param, this.mapper);
					bld.append(StringUtils.urlEncode(param.name));
					bld.append('=');
					bld.append(StringUtils.urlEncode(paramValue));
				}
			}
		}
		
		return bld.toString();
	}
1322557
@Override
    public URL getPersistenceUnitRootUrl() {
        // Make one that is OSGi based, it relies on the 'location' property
        String loc = location;
        int n = loc.lastIndexOf('/');
        if (n > 0) {
            loc = loc.substring(0, n);
        }
        if (loc.isEmpty()) {
            loc = "/";
        }
        return sourceBundle.bundle.getResource(loc);
    }
866722
private URI getOriginalUri(HttpServletRequest request) {
    String requestUrl = request.getRequestURL().toString();
    String incomingScheme = URI.create(requestUrl).getScheme();
    String originalScheme = request.getHeader("X-Forwarded-Proto");
    if (originalScheme != null && !incomingScheme.equals(originalScheme)) {
      return URI.create(requestUrl.replaceFirst("^" + incomingScheme, originalScheme));
    } else {
      return URI.create(requestUrl);
    }
  }
292709
private String buildNativeMediaUrl() {
    String path = null;

    Resource parentResource = this.resource.getParent();
    if (JcrBinary.isNtFile(parentResource)) {
      // if parent resource is nt:file and its node name equals the detected filename, directly use the nt:file node path
      if (StringUtils.equals(parentResource.getName(), getFileName())) {
        path = parentResource.getPath();
      }
      // otherwise use nt:file node path with custom filename
      else {
        path = parentResource.getPath() + "./" + getFileName();
      }
    }
    else {
      // nt:resource node does not have a nt:file parent, use its path directly
      path = this.resource.getPath() + "./" + getFileName();
    }

    // build externalized URL
    UrlHandler urlHandler = AdaptTo.notNull(this.adaptable, UrlHandler.class);
    return urlHandler.get(path).urlMode(this.mediaArgs.getUrlMode()).buildExternalResourceUrl(this.resource);
  }
715313
public static URL getSourceUrl(SourceUnit source) {
        URL url = null;
        final String filename = source.getName();
        if(filename==null) {
            return null;
        }

        Resource resource = new FileSystemResource(filename);
        if (resource.exists()) {
            try {
                url = resource.getURL();
            } catch (IOException e) {
                // ignore
            }
        }
        return url;
    }
298692
@Trivial
    private String getNextURL(String currentURL) {
        List<String> urlList = getEnvURLList();
        int urlIndex = getURLIndex(currentURL, urlList);
        return urlList.get((urlIndex + 1) % urlList.size());
    }