<code>optional string ufsUri = 1;</code>
179256
public java.lang.String getUfsUri() {
    java.lang.Object ref = ufsUri_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        ufsUri_ = s;
      }
      return s;
    }
  }
987231
public java.lang.String getUfsPath() {
    java.lang.Object ref = ufsPath_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        ufsPath_ = s;
      }
      return s;
    }
  }
857311
public Optional<String> getCurrent() {
        final LinkedList<String> uuids = context.get();
        return uuids.isEmpty()
                ? Optional.empty()
                : Optional.of(uuids.getFirst());
    }
1035508
public static String encodeString(String uri)
  {
    CharBuffer cb = CharBuffer.allocate();

    for (int i = 0; i < uri.length(); i++) {
      char ch = uri.charAt(i);

      switch (ch) {
      case '<':
        cb.append("&lt;");
        break;
      case '>':
        cb.append("&gt;");
        break;
      case '&':
        cb.append("&amp;");
        break;
      default:
        cb.append(ch);
      }
    }

    return cb.close();
  }
11213
private static String getPath(String uri) {
        int offset = 0;
        if (uri.startsWith("http://")) {
            offset = "http://".length();
        } else if (uri.startsWith("https://")) {
            offset = "https://".length();
        }

        if (offset == 0) {
            return uri;
        } else {
            int firstSlash = uri.indexOf('/', offset);
            return -1 != firstSlash? uri.substring(firstSlash) : uri;
        }
    }
464460
public Optional<String> getString(String key) {
        Objects.requireNonNull(key, Required.KEY.toString());

        String value = this.values.get(key);
        if (StringUtils.isNotBlank(value)) {
            return Optional.of(value);
        }

        return Optional.empty();
    }
353666
static Path uncCompatibleUriToPath(URI uri) {
		String in = uri.toString();
		Matcher m = UNC_URI_PATTERN.matcher(in);
		if (m.find() && (m.group(1) != null || m.group(2) != null)) { // this is an UNC path!
			String out = in.substring("file:".length()).replace('/', '\\');
			return Paths.get(out);
		} else {
			return Paths.get(uri);
		}
	}
140491
@Override
    public void setRequestURI(byte[] uri) {

        if (null == uri || 0 == uri.length) {
            throw new IllegalArgumentException("setRequestURI: null input");
        }
        super.setFirstLineChanged();

        if ('*' == uri[0]) {
            // URI of "*" can only be one character long to be valid
            if (1 != uri.length && '?' != uri[1]) {
                String value = GenericUtils.getEnglishString(uri);
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "setRequestURI: invalid uri [" + value + "]");
                }
                throw new IllegalArgumentException("Invalid uri: " + value);
            }
        } else if ('/' != uri[0]) {
            String value = GenericUtils.getEnglishString(uri);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "setRequestURI: invalid uri [" + value + "]");
            }
            throw new IllegalArgumentException("Invalid uri: " + value);
        }

        initScheme();
        this.myURIString = null;
        this.sUrlHost = null;
        this.iUrlPort = HeaderStorage.NOTSET;
        this.myQueryBytes = null;
        this.queryParams = null;
        parseURI(uri, 0);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setRequestURI: set URI to " + getRequestURI());
        }
    }
660418
private synchronized String getMatchingURI(String incomingURI) {
        String[] incomingURIParts = incomingURI.split("/");

        ArrayList<String[]> tockenizedEndpoints = new ArrayList<String[]>();
        for (String endpointURI : serverEndpointConfigMap.keySet()) {
            // Since the endpoint paths are either relative URIs or URI templates level 1, the paths do not match if they 
            // do not have the same number of segments, using ’/’ as the separator.
            if (incomingURIParts.length == endpointURI.split("/").length) {
                tockenizedEndpoints.add(endpointURI.split("/"));
            }
        }

        /**
         * For each segment of the incoming uri, compare the corresponding segment of every endpoint uri. If matched (exact match or variable {} match)
         * add that endpoint to the list of matchedURI. Move to next segment of the incoming uri and do the same match. At the end of this loop
         * we have list of possible matched endpoints for the incoming URI
         * For e.g if the incoming uri = a/b/d and endpoints are /{var}/b/d, /a/x/y, {var}/b/{var}, /a/{var}/{var}, /{var}/{var}/{var} then
         * possible matchedURIs are /{var}/b/d, {var}/b/{var}, /a/{var}/{var}, /{var}/{var}/{var}
         */
        for (int i = 1; i < incomingURIParts.length; i++) { // start with i=1 skipping the first part because first part of split("/") for /../../.. is always an empty string 
            ArrayList<String[]> matchedURIs = new ArrayList<String[]>();
            // for a each segment in incomingURI, check the corresponding segment of every endpoint.
            for (int j = 0; j < tockenizedEndpoints.size(); j++) {
                String[] tockens = tockenizedEndpoints.get(j);
                if (incomingURIParts[i].equals(tockens[i])) {
                    matchedURIs.add(tockenizedEndpoints.get(j));
                }
                if (tockens[i].startsWith("{") && (tockens[i].endsWith("}"))) {
                    matchedURIs.add(tockenizedEndpoints.get(j));
                }
            }
            tockenizedEndpoints.clear();
            tockenizedEndpoints.addAll(matchedURIs);
        }

        //sort matched endpoints in order of preference from left to right for exact match at each segment giving a higher precedence 
        if (tockenizedEndpoints.size() > 1) {
            Collections.sort(tockenizedEndpoints, COMPARATOR);
        }

        String[] tockenizedEndpoint = null;
        if (!tockenizedEndpoints.isEmpty()) {
            tockenizedEndpoint = tockenizedEndpoints.get(0); //best match is always the top element in the sorted list
        }

        if (tockenizedEndpoint != null) {
            return unTockenizeEp(tockenizedEndpoint);
        } else {
            return null;
        }
    }
181002
private String encodeUri( String uri )
	{
		StringBuilder newUri = new StringBuilder();
		StringTokenizer st = new StringTokenizer( uri, "/ ", true );
		while ( st.hasMoreTokens())
		{
			String tok = st.nextToken();
			if ( tok.equals( "/" )) {
				newUri.append('/');
			} else if ( tok.equals( " " )) {
				newUri.append("%20");
			} else {
				try {
					newUri.append(URLEncoder.encode( tok, "UTF-8" ));
				} catch ( UnsupportedEncodingException uee ) { // NOPMD - imported code
					// imported code
				}
			}
		}
		return newUri.toString();
	}
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;";
    }
819874
private Optional<String> getNonRDFSourceDescribedByUri(final String resourceUri) throws IOException {
        Optional<String> nonRdfSourceDescUri = Optional.empty();
        final Header[] links = getLinkHeaders(resourceUri);
        if ( links != null ) {
            String descriptionUri = null;
            boolean isNonRDFSource = false;
            for ( final Header h : links ) {
                final FcrepoLink link = new FcrepoLink(h.getValue());
                if ( link.getRel().equals("describedby") ) {
                    descriptionUri = link.getUri().toString();
                } else if ( link.getUri().toString().contains(NON_RDF_SOURCE_URI)) {
                    isNonRDFSource = true;
                }
            }
            LOGGER.debug("isNonRDFSource: " + isNonRDFSource);
            if (isNonRDFSource && descriptionUri != null) {
                nonRdfSourceDescUri = Optional.of(descriptionUri);
            }
        }
        return nonRdfSourceDescUri;
    }
1148526
function Uri(str) {
    this.uriParts = parseUri(str);
    this.queryPairs = parseQuery(this.uriParts.query);
    this.hasAuthorityPrefixUserPref = null;
  }
1234106
public Optional<String> getValueAsString(final String name)
    {
        return Optional.ofNullable((String) representation.getValue(name, null));
    }
63186
function(baseURI) {
      var hash = baseURI.indexOf("#");
      if (hash>=0) {
        baseURI = baseURI.substring(0,hash);
      }
      if (options && options.baseURIMap) {
        baseURI = options.baseURIMap(baseURI);
      }
      return baseURI;
    }
251949
public com.google.protobuf.ByteString
      getUfsTypeBytes() {
    java.lang.Object ref = ufsType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      ufsType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
133814
@javax.annotation.Nonnull
    public java.util.Optional<java.util.List<String>> optionalIncludes() {
        return java.util.Optional.ofNullable(mIncludes);
    }