Retrieve the URI with Cache database provider authority.

@param string ends of the URI.
@return full build URI.
332180
private Uri getUri(String string) {
        return Uri.parse(OfflinerProvider.CONTENT + OfflinerProvider.getAuthority(mPackageName)
                + OfflinerProvider.SLASH + string);
    }
231378
public static boolean uriEndsWith( String uri, String ending )
    {
        int queryStart = uri.indexOf( '?' );
        
        if ( queryStart == -1 )
        {
            return uri.endsWith( ending );
        }
        else
        {
            return uri.length() - queryStart >= ending.length()
                   && uri.substring( queryStart - ending.length(), queryStart ).equals( ending );
        }
    }
338748
protected function detectResourcesBaseUri()
    {
        $uri = '';
        $request = $this->getHttpRequest();
        if ($request instanceof HttpRequest) {
            $uri = $request->getBaseUri();
        }
        return (string)$uri;
    }
1335477
public URI getOwnCallbackUri()
	{
		String localEndpointStr = (oauthSelfEndpoint != null) ? oauthSelfEndpoint : localEndpoint.toString();

		if (!localEndpointStr.endsWith("/"))
			localEndpointStr += "/";

		return URI.create(localEndpointStr + "oauth2/client/cb");
	}
1222902
public static function getUriFromGlobals() {
        $uri = new Uri('');

        $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');

        $hasPort = false;
        if (isset($_SERVER['HTTP_HOST'])) {
            $hostHeaderParts = explode(':', $_SERVER['HTTP_HOST']);
            $uri = $uri->withHost($hostHeaderParts[0]);
            if (isset($hostHeaderParts[1])) {
                $hasPort = true;
                $uri = $uri->withPort($hostHeaderParts[1]);
            }
        } elseif (isset($_SERVER['SERVER_NAME'])) {
            $uri = $uri->withHost($_SERVER['SERVER_NAME']);
        } elseif (isset($_SERVER['SERVER_ADDR'])) {
            $uri = $uri->withHost($_SERVER['SERVER_ADDR']);
        }

        if (!$hasPort && isset($_SERVER['SERVER_PORT'])) {
            $uri = $uri->withPort($_SERVER['SERVER_PORT']);
        }

        $hasQuery = false;
        if (isset($_SERVER['REQUEST_URI'])) {
            $requestUriParts = explode('?', $_SERVER['REQUEST_URI']);
            $uri = $uri->withPath($requestUriParts[0]);
            if (isset($requestUriParts[1])) {
                $hasQuery = true;
                $uri = $uri->withQuery($requestUriParts[1]);
            }
        }

        if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) {
            $uri = $uri->withQuery($_SERVER['QUERY_STRING']);
        }

        return $uri;
    }
1327068
@Override
  public String getQueryBaseRoute() {
    final String[] parts = explodePath();
    if (parts.length < 2) { // Must be at least something like: /plugin/blah
      throw new BadRequestException("Invalid plugin request path: " + getQueryPath());
    }
    return parts[1];
  }
808363
public function buildUriWithQuery($uri, array $params = [])
    {
        $uri = uri_for($uri);

        if (!Uri::isAbsolute($uri)) {
            $uri = $uri->withScheme($this->baseURL->getScheme())
                ->withUserInfo($this->baseURL->getUserInfo())
                ->withHost($this->baseURL->getHost())
                ->withPort($this->baseURL->getPort());
        }

        $default = [
            'username' => $this->username,
            'password' => $this->password,
        ];

        return $uri->withQuery(build_query(array_merge($default, $params)));
    }
27893
public function getBaseURI()
    {
        $hostUri = $this->getHostURI();
        $apiName = ezpRestPrefixFilterInterface::getApiProviderName();
        $apiPrefix = eZINI::instance( 'rest.ini' )->variable( 'System', 'ApiPrefix');
        $uri = str_replace( $apiPrefix, $apiPrefix.'/'.$apiName, $this->uri );
        $baseUri = $hostUri.$uri;

        return $baseUri;
    }
789999
@Override
	public HttpClient.RequestSender uri(String uri) {
		return new HttpClientFinalizer(cachedConfiguration.bootstrap(b -> HttpClientConfiguration.uri(b, uri)));
	}
911160
public String getUri() {

        String uri = m_context.addSiteRoot(m_context.getUri());
        if (m_detailViewId != null) {
            uri += m_detailViewId.toString() + "/";
        }
        return uri;
    }
442762
public function getRawUri($farExpires = true, $debug = false)
    {
        $path = rtrim($this->minAppUri, '/') . '/';
        if (! $this->rewriteWorks) {
            $path .= '?';
        }
        if (null === $this->_groupKey) {
            // @todo: implement shortest uri
            $path = self::_getShortestUri($this->_filePaths, $path);
        } else {
            $path .= "g=" . $this->_groupKey;
        }
        if ($debug) {
            $path .= "&debug";
        } elseif ($farExpires && $this->_lastModified) {
            $path .= "&" . $this->_lastModified;
        }

        return $path;
    }
595051
String getURI (String prefix)
    {
        if ("".equals(prefix)) {
            return defaultNS;
        } else if (prefixTable == null) {
            return null;
        } else {
            return (String)prefixTable.get(prefix);
        }
    }
972323
public function getEndpointForUrl($url)
    {
        $cacheKey = sha1($url . $this->preferredFormat . json_encode($this->supportedFormats));

        if (!isset($this->cachedEndpoints[$url])) {
            $this->cachedEndpoints[$url] = $this->fetchEndpointForUrl($url);
            if (trim($this->cachedEndpoints[$url]) === '') {
                throw new Exception('Empty url endpoints', 1360175845);
            }
            $this->endPointCache->set($cacheKey, $this->cachedEndpoints[$url]);
        } elseif ($this->endPointCache->has($cacheKey) === true) {
            $this->cachedEndpoints[$url] = $this->endPointCache->get($cacheKey);
        }

        return $this->cachedEndpoints[$url];
    }
623407
public function getResourceUri()
    {
        $extensionLength = strlen($this->getExtension());
        $pathInfo = $this->getPathInfo();
        if ($extensionLength > 0) {
            return substr($pathInfo, 0, -($extensionLength + 1));
        }

        return $pathInfo;
    }
1159202
private URI addEndPoint(String endPoint) throws URISyntaxException {

        if (StringUtils.isEmpty(endPoint) || endPoint.equals("/")) {
            return this.baseUri;
        }

        if (this.baseUri.getPath().endsWith("/") || endPoint.startsWith("/")) {
            endPoint = this.baseUri.getPath() + endPoint;
        } else {
            endPoint = this.baseUri.getPath() + "/" + endPoint;
        }

        URI uri = null;

        URIBuilder builder = new URIBuilder();

        builder.setScheme(this.baseUri.getScheme());
        builder.setHost(this.baseUri.getHost());
        builder.setPort(this.baseUri.getPort());
        builder.setPath(endPoint);

        uri = builder.build();
        return uri;
    }
173859
private String downloadCertWithRetries(URI certUrl) {
        try {
            return downloadCert(certUrl);
        } catch (SdkBaseException e) {
            if (isRetryable(e)) {
                return downloadCert(certUrl);
            } else {
                throw e;
            }
        }
    }
318532
private static URI buildAzureStorageEndpointURI(String storageEndPoint, String storageAccount)
  throws URISyntaxException
  {
    URI storageEndpoint = new URI(
        "https", storageAccount + "." + storageEndPoint + "/",
        null, null);

    return storageEndpoint;
  }