/** * Get the basename of an URI. It's possibly an empty string. * * @param uri a string regarded an URI * @return the basename string; an empty string if the path ends with slash */ public static String getName(String uri) { if (uri == null || uri.length() == 0) { return uri; } String path = URIUtil.getPath(uri); int at = path.lastIndexOf("/"); int to = path.length(); return (at >= 0) ? path.substring(at + 1, to) : path; }
/** * Get the basename of an URI. It's possibly an empty string. * * @param uri a string regarded an URI * @return the basename string; an empty string if the path ends with slash */ public static String getName(String uri) { if (uri == null || uri.length() == 0) { return uri; } String path = URIUtil.getPath(uri); int at = path.lastIndexOf("/"); int to = path.length(); return (at >= 0) ? path.substring(at + 1, to) : path; }
/** * Get the basename of an URI. It's possibly an empty string. * * @param uri a string regarded an URI * @return the basename string; an empty string if the path ends with slash */ public static String getName(String uri) { if (uri == null || uri.length() == 0) { return uri; } String path = URIUtil.getPath(uri); int at = path.lastIndexOf("/"); int to = path.length(); return (at >= 0) ? path.substring(at + 1, to) : path; }
/** * Get the basename of an URI. It's possibly an empty string. * * @param uri a string regarded an URI * @return the basename string; an empty string if the path ends with slash */ public static String getName(String uri) { if (uri == null || uri.length() == 0) { return uri; } String path = URIUtil.getPath(uri); int at = path.lastIndexOf("/"); int to = path.length(); return (at >= 0) ? path.substring(at + 1, to) : path; }
/** * Get the basename of an URI. It's possibly an empty string. * * @param uri a string regarded an URI * @return the basename string; an empty string if the path ends with slash */ public static String getName(String uri) { if (uri == null || uri.length() == 0) { return uri; } String path = URIUtil.getPath(uri); int at = path.lastIndexOf("/"); int to = path.length(); return (at >= 0) ? path.substring(at + 1, to) : path; }
/** * Returns the (not substituted) URI to the page that called the form.<p> * * Removes all request parameters from the page URI, if specified.<p> * * @param removeParams if true, all request parameters will be removed from the URI * @return the (not substituted) URI to the page that called the form */ public String getPageUri(boolean removeParams) { if (removeParams) { // remove eventual request parameters String uri = m_pageUri; if (CmsStringUtil.isNotEmpty(uri)) { uri = URIUtil.getPath(uri); } return uri; } else { return m_pageUri; } }
element.setAttribute("begin", Long.toString(startTime) + "ms"); element.setAttribute("dur", Long.toString(duration) + "ms"); element.setAttribute("src", URIUtil.getPath(uri.toString())); if (trackId != null) { element.setAttribute("xml:id", trackId);
String href = response.getHref(); if (!href.startsWith("/")) href = URIUtil.getPath(href); href = decodeMarks(href);