Before this call m_elementContext.m_elementURI is null,
which means it is not yet known. After this call it
is non-null, but possibly "" meaning that it is in the
default namespace.

@return The URI of the element, never null, but possibly "".
10461
private String getElementURI() {
        String uri = null;
        // At this point in processing we have received all the
        // namespace mappings
        // As we still don't know the elements namespace,
        // we now figure it out.

        String prefix = getPrefixPart(m_elemContext.m_elementName);

        if (prefix == null) {
            // no prefix so lookup the URI of the default namespace
            uri = m_prefixMap.lookupNamespace("");
        } else {
            uri = m_prefixMap.lookupNamespace(prefix);
        }
        if (uri == null) {
            // We didn't find the namespace for the
            // prefix ... ouch, that shouldn't happen.
            // This is a hack, we really don't know
            // the namespace
            uri = EMPTYSTRING;
        }

        return uri;
    }
1352227
@Override
	protected URI initURI() {
		try {
			Item item = hman.loc.best();
			if(item!=null) {
				return hman.loc.get(item);
			}
		} catch (LocatorException e) {
			access.log(e, "Error in AAFConHttp obtaining initial URI");
		}
		return null;
	}
1047707
public URI getURI() {
        final URI locationURI = getClasspathElementURI();
        final String resourcePath = getPathRelativeToClasspathElement();
        final String locationURIStr = locationURI.toString();
        // Check if this is a directory-based module (location URI will end in "/")
        final boolean isDir = locationURIStr.endsWith("/");
        try {
            return new URI((isDir || locationURIStr.startsWith("jar:") ? "" : "jar:") + locationURIStr
                    + (isDir ? "" : "!/") + resourcePath);
        } catch (final URISyntaxException e) {
            throw new IllegalArgumentException("Could not form URL for classpath element: " + locationURIStr
                    + " ; path: " + resourcePath + " : " + e);
        }
    }
4149
@Override
    public URI getURI() throws IOException {
        URL url = getURL();
        try {
            return ResourceUtils.toURI(url);
        } catch (URISyntaxException ex) {
            throw new RuntimeException("Invalid URI [" + url + "]", ex);
        }
    }
1038877
public String getHrefResolved(final String relativeUri) {
        if (Atom10Parser.isAbsoluteURI(relativeUri)) {
            return relativeUri;
        } else if (baseURI != null && collectionElement != null) {
            final int lastslash = baseURI.lastIndexOf("/");
            return Atom10Parser.resolveURI(baseURI.substring(0, lastslash), collectionElement, relativeUri);
        }
        return null;
    }
843389
@Override
  public String getNamespaceURI(String prefix) {
    // per javax.xml.namespace.NamespaceContext doc
    if (prefix == null)
      throw new IllegalArgumentException("Cannot get namespace URI for null prefix");
    if (XMLConstants.XML_NS_PREFIX.equals(prefix))
      return XMLConstants.XML_NS_URI;
    if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix))
      return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;

    String namespaceURI = bindings.get(prefix);

    // per javax.xml.namespace.NamespaceContext doc
    return (namespaceURI != null) ? namespaceURI : XMLConstants.NULL_NS_URI;
  }
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;
    }
289099
@Override
    public String[] getPreDeclaredNamespaceUris() {
        LinkedList<String> ll=new LinkedList<String>();
        if (nss!=null) {
            ll.addAll(nss.values());
        }
        ll.add(XSI_NS);
        ll.add(DOMProcessing.XSD_NS_FOR_XML);
        ll.add(XML_NS);
        ll.add(PROV_NS);
        //System.out.println("namespaceprefixmapper " + ll);
        String[] tmp=new String[1];
        return ll.toArray(tmp);
    }
726027
@Override
    URI getURI() {
        final URI uri = moduleRef.getLocation();
        if (uri == null) {
            // Some modules have no known module location (ModuleReference#location() can return null)
            throw new IllegalArgumentException("Module " + getModuleName() + " has a null location");
        }
        return uri;
    }
911160
public String getUri() {

        String uri = m_context.addSiteRoot(m_context.getUri());
        if (m_detailViewId != null) {
            uri += m_detailViewId.toString() + "/";
        }
        return uri;
    }
171710
@Nullable
    public static String shortenURI(@Nullable final URI uri) {
        if (uri == null) {
            return null;
        }
        final String prefix = Data.namespaceToPrefix(uri.getNamespace(), Data.getNamespaceMap());
        if (prefix != null) {
            return prefix + ':' + uri.getLocalName();
        }
        final String ns = uri.getNamespace();
        return "&lt;.." + uri.stringValue().substring(ns.length() - 1) + "&gt;";
        // final int index = uri.stringValue().lastIndexOf('/');
        // if (index >= 0) {
        // return "&lt;.." + uri.stringValue().substring(index) + "&gt;";
        // }
        // return "&lt;" + uri.stringValue() + "&gt;";
    }
390850
def namespace_uri(self):
        
        try:
            return next(
                iter(filter(lambda uri: URI(uri).namespace, self._uri))
            )
        except StopIteration:
            return None
279271
def uri(self, element, namespace=None):
        ''

        if namespace is None:
            namespace = self.namespace

        return URIRef('%s#%s' % (namespace, element))
29855
protected String calculateCurrentUri(HttpServletRequest request)
			throws UnsupportedEncodingException {
		ServletUriComponentsBuilder builder = ServletUriComponentsBuilder
				.fromRequest(request);
		// Now work around SPR-10172...
		String queryString = request.getQueryString();
		boolean legalSpaces = queryString != null && queryString.contains("+");
		if (legalSpaces) {
			builder.replaceQuery(queryString.replace("+", "%20"));
		}
		UriComponents uri = null;
		try {
			uri = builder.replaceQueryParam("code").build(true);
		} catch (IllegalArgumentException ex) {
			// ignore failures to parse the url (including query string). does't
			// make sense for redirection purposes anyway.
			return null;
		}
		String query = uri.getQuery();
		if (legalSpaces) {
			query = query.replace("%20", "+");
		}
		return ServletUriComponentsBuilder.fromUri(uri.toUri())
				.replaceQuery(query).build().toString();
	}
501955
public String getUri() {
        String result = this.uri;

        if (result == null) {
            switch (this.code) {
                case 100:
                    result = BASE_HTTP + "#sec10.1.1";
                    break;
                case 101:
                    result = BASE_HTTP + "#sec10.1.2";
                    break;
                case 102:
                    result = BASE_WEBDAV + "#STATUS_102";
                    break;

                case 200:
                    result = BASE_HTTP + "#sec10.2.1";
                    break;
                case 201:
                    result = BASE_HTTP + "#sec10.2.2";
                    break;
                case 202:
                    result = BASE_HTTP + "#sec10.2.3";
                    break;
                case 203:
                    result = BASE_HTTP + "#sec10.2.4";
                    break;
                case 204:
                    result = BASE_HTTP + "#sec10.2.5";
                    break;
                case 205:
                    result = BASE_HTTP + "#sec10.2.6";
                    break;
                case 206:
                    result = BASE_HTTP + "#sec10.2.7";
                    break;
                case 207:
                    result = BASE_WEBDAV + "#STATUS_207";
                    break;

                case 300:
                    result = BASE_HTTP + "#sec10.3.1";
                    break;
                case 301:
                    result = BASE_HTTP + "#sec10.3.2";
                    break;
                case 302:
                    result = BASE_HTTP + "#sec10.3.3";
                    break;
                case 303:
                    result = BASE_HTTP + "#sec10.3.4";
                    break;
                case 304:
                    result = BASE_HTTP + "#sec10.3.5";
                    break;
                case 305:
                    result = BASE_HTTP + "#sec10.3.6";
                    break;
                case 307:
                    result = BASE_HTTP + "#sec10.3.8";
                    break;

                case 400:
                    result = BASE_HTTP + "#sec10.4.1";
                    break;
                case 401:
                    result = BASE_HTTP + "#sec10.4.2";
                    break;
                case 402:
                    result = BASE_HTTP + "#sec10.4.3";
                    break;
                case 403:
                    result = BASE_HTTP + "#sec10.4.4";
                    break;
                case 404:
                    result = BASE_HTTP + "#sec10.4.5";
                    break;
                case 405:
                    result = BASE_HTTP + "#sec10.4.6";
                    break;
                case 406:
                    result = BASE_HTTP + "#sec10.4.7";
                    break;
                case 407:
                    result = BASE_HTTP + "#sec10.4.8";
                    break;
                case 408:
                    result = BASE_HTTP + "#sec10.4.9";
                    break;
                case 409:
                    result = BASE_HTTP + "#sec10.4.10";
                    break;
                case 410:
                    result = BASE_HTTP + "#sec10.4.11";
                    break;
                case 411:
                    result = BASE_HTTP + "#sec10.4.12";
                    break;
                case 412:
                    result = BASE_HTTP + "#sec10.4.13";
                    break;
                case 413:
                    result = BASE_HTTP + "#sec10.4.14";
                    break;
                case 414:
                    result = BASE_HTTP + "#sec10.4.15";
                    break;
                case 415:
                    result = BASE_HTTP + "#sec10.4.16";
                    break;
                case 416:
                    result = BASE_HTTP + "#sec10.4.17";
                    break;
                case 417:
                    result = BASE_HTTP + "#sec10.4.18";
                    break;
                case 422:
                    result = BASE_WEBDAV + "#STATUS_422";
                    break;
                case 423:
                    result = BASE_WEBDAV + "#STATUS_423";
                    break;
                case 424:
                    result = BASE_WEBDAV + "#STATUS_424";
                    break;

                case 500:
                    result = BASE_HTTP + "#sec10.5.1";
                    break;
                case 501:
                    result = BASE_HTTP + "#sec10.5.2";
                    break;
                case 502:
                    result = BASE_HTTP + "#sec10.5.3";
                    break;
                case 503:
                    result = BASE_HTTP + "#sec10.5.4";
                    break;
                case 504:
                    result = BASE_HTTP + "#sec10.5.5";
                    break;
                case 505:
                    result = BASE_HTTP + "#sec10.5.6";
                    break;
                case 507:
                    result = BASE_WEBDAV + "#STATUS_507";
                    break;

                case 1000:
                    result = BASE_RESTLET
                            + "org/restlet/data/Statuses.html#CONNECTOR_ERROR_CONNECTION";
                    break;
                case 1001:
                    result = BASE_RESTLET
                            + "org/restlet/data/Statuses.html#CONNECTOR_ERROR_COMMUNICATION";
                    break;
                case 1002:
                    result = BASE_RESTLET
                            + "org/restlet/data/Statuses.html#CONNECTOR_ERROR_INTERNAL";
                    break;
            }
        }

        return result;
    }
658200
public String getPrefix(String namespaceURI)
   {
      String prefix = null;
      try
      {
         prefix = namespaceRegistry.getPrefix(namespaceURI);
      }
      catch (NamespaceException exc)
      {
         prefix = prefixes.get(namespaceURI);
      }
      catch (RepositoryException exc)
      {
         log.error(exc.getMessage(), exc);
      }
      return prefix;

   }
233051
public URI getLocation() {
        if (locationURI == null) {
            locationURI = moduleRef != null ? moduleRef.getLocation() : null;
            if (locationURI == null) {
                locationURI = classpathElement.getURI();
            }
        }
        return locationURI;
    }