/*
(non-Javadoc)

@see
com.microsoft.windowsazure.services.media.entities.EntityDeleteOperation
#getUri()
518266
@Override
    public String getUri() {
        String escapedEntityId;
        try {
            escapedEntityId = URLEncoder.encode(primaryEntityId, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new InvalidParameterException(
                    "UTF-8 encoding is not supported.");
        }
        return String.format("%s('%s')/$links/%s", primaryEntitySet,
                escapedEntityId, secondaryEntitySet);
    }
424446
public String getUri() {
        final Object requestUri = getHeader(HttpMessageHeaders.HTTP_REQUEST_URI);

        if (requestUri != null) {
            return requestUri.toString();
        }

        return null;
    }
945263
private URI extractURI(RequestElements intuitRequest) throws FMSException
    {
        URI uri = null;

        try {
            uri = new URI(intuitRequest.getRequestParameters().get(RequestElements.REQ_PARAM_RESOURCE_URL));
        } catch (URISyntaxException e) {
            throw new FMSException("URISyntaxException", e);
        }
        return uri;
    }
1061695
public Optional<URI> getURI(String key) {
        Optional<String> property = getString(key);
        if (property.isPresent()) {
            return Optional.of(URIUtils.create(property.get()));
        } else {
            return Optional.empty();
        }
    }
336158
private URI getBaseURI(URI configKey) throws URISyntaxException {
    return new URI(configKey.getScheme(), configKey.getAuthority(), null, configKey.getQuery(), configKey.getFragment());
  }
1049865
public static Observable<String> getPathFromUriForFileDocument(final Context context,
      final Uri contentUri) {
    return Observable.fromCallable(new Func0<String>() {
      @Override
      public String call() {
        String pathFound = null;
        Cursor cursor = context.getContentResolver().query(contentUri, null, null, null, null);
        if (cursor != null) {
          if (cursor.moveToFirst()) {
            pathFound =
                cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Files.FileColumns.DATA));
          }
          cursor.close();
          logDebug("Path found:" + pathFound);
        }
        return pathFound;
      }
    });
  }
153358
public List<URI> getURIs() {
        List<URI> uris = new ArrayList<URI>();

        lock.lock();
        try {
            List<URI> result = new ArrayList<URI>(uriIndex.keySet());
            result.remove(null);
            return Collections.unmodifiableList(result);
        } finally {
            uris.addAll(uriIndex.keySet());
            lock.unlock();
        }
    }
564614
public static URI getUri(ServiceInstance instance) {
		String scheme = (instance.isSecure()) ? "https" : "http";
		String uri = String.format("%s://%s:%s", scheme, instance.getHost(),
				instance.getPort());
		return URI.create(uri);
	}
199090
public String resolveRelativeUri(String uri) {
        // sometimes we get uri's massaged from File(String), so check for
        // a root directory separator char
        if (uri.startsWith("/") || uri.startsWith(File.separator)) {
            return uri;
        } else {
            return baseURI + uri;
        }
    }
928044
def resolveURI(self, URI):
        
        ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
        return ret
339534
@Override
	public <T extends Resource> T get(final String uri) {
		return doRequest(uri).get();
	}
330704
@Override
    public URI getURI() throws URIException {
        StringBuffer buffer = new StringBuffer();
        if (this.httphost != null) {
            buffer.append(this.httphost.getProtocol().getScheme());
            buffer.append("://");
            buffer.append(this.httphost.getHostName());
            int port = this.httphost.getPort();
            if (port != -1 && port != this.httphost.getProtocol().getDefaultPort()) {
                buffer.append(":");
                buffer.append(port);
            }
        }
        buffer.append(this.path);
        if (this.queryString != null) {
            buffer.append('?');
            buffer.append(this.queryString);
        }
        String charset = getParams().getUriCharset();
        return new URI(buffer.toString(), true, charset);
    }
670313
public String getEncodedRequestURI()
    {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        // 321485
        String uri = null;
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getEncodedRequestURI", "");
        }
        if (getDispatchContext() == null)
            uri = _request.getRequestURI();
        else
            uri = getDispatchContext().getRequestURI();
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getEncodedRequestURI", " uri --> " + uri);
        }

        return uri;
    }
1008971
public URI rewriteURI(RequestContext rc) throws URISyntaxException {
        Request request = rc.request();
        String path = request.path();
        if (!path.startsWith(prefix)) {
            return null;
        }

        return computeDestinationURI(request, path, proxyTo, prefix);
    }
272429
public EntityAnnotation getEntityAnnotation(final String entityUri) {
        return Iterables.find(getEntityAnnotations(),
                new Predicate<EntityAnnotation>() {

                    @Override
                    public boolean apply(EntityAnnotation ea) {
                        return ea.getEntityReference().getUri()
                                .equals(entityUri);
                    }

                }
        );
    }
682059
public String getRequestURI()
    {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        // Begin PK06988, strip session id of when url rewriting is enabled
        SRTServletRequestThreadData reqData = SRTServletRequestThreadData.getInstance();
        if (reqData != null && reqData.getRequestURI() == null)
        {
            String aURI = getEncodedRequestURI();
            if (aURI == null)
                return null;
            else
                reqData.setRequestURI(WebGroup.stripURL(aURI));
        }
        // 321485
        String uri = null;
        if (reqData != null)
            uri = reqData.getRequestURI();
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getRequestURI", " uri --> " + uri);
        }
        return uri;
        // End PK06988, strip session id of when url rewriting is enabled
    }
115511
private String getRealPathFromURI(String contentURI) {
        Uri contentUri = Uri.parse(contentURI);
        Cursor cursor = mContext.getContentResolver().query(contentUri, null, null, null, null);
        if (cursor == null) {
            return contentUri.getPath();
        } else {
            cursor.moveToFirst();
            int index = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);
            Log.e(LOG_TAG, String.format("%d", index));

            String str = cursor.getString(index);
            cursor.close();
            return str;
        }


    }