Transforms root paths to site paths.

@return lazy map from root paths to site paths.

@see CmsRequestContext#removeSiteRoot(String)
328382
public Map<String, String> getSitePath() {

        if (m_sitePaths == null) {
            m_sitePaths = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {

                public Object transform(Object rootPath) {

                    if (rootPath instanceof String) {
                        return getRequestContext().removeSiteRoot((String)rootPath);
                    }
                    return null;
                }
            });
        }
        return m_sitePaths;
    }
816515
public static String pathOnly(String path)
   {
      String curPath = path;
      curPath = curPath.substring(curPath.indexOf("/"));
      curPath = curPath.substring(0, curPath.lastIndexOf("/"));
      if ("".equals(curPath))
      {
         curPath = "/";
      }
      return curPath;
   }
754386
@Nullable
  public UnixPath getParent() {
    if (path.isEmpty() || isRoot()) {
      return null;
    }
    int index =
        hasTrailingSeparator()
            ? path.lastIndexOf(SEPARATOR, path.length() - 2)
            : path.lastIndexOf(SEPARATOR);
    if (index == -1) {
      return isAbsolute() ? ROOT_PATH : null;
    } else {
      return new UnixPath(permitEmptyComponents, path.substring(0, index + 1));
    }
  }
568714
public ConfigurationUpdate removePath(String path) {
		if (path == null || !path.startsWith("/")) {
			throw new IllegalArgumentException("Path must start with \"/\".");
		}
		paths.put(path, null);
		return this;
	}
428154
public java.util.List<String> getRemoveRouteTableIds() {
        if (removeRouteTableIds == null) {
            removeRouteTableIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return removeRouteTableIds;
    }
79608
@Nonnull
  @ReturnsMutableCopy
  public static ICommonsList <String> getCleanPathParts (@Nonnull final String sPath)
  {
    // Remove leading and trailing whitespaces and slashes
    String sRealPath = StringHelper.trimStartAndEnd (sPath.trim (), "/", "/");

    // Remove obscure path parts
    sRealPath = FilenameHelper.getCleanPath (sRealPath);

    // Split into pieces
    final ICommonsList <String> aPathParts = StringHelper.getExploded ('/', sRealPath);
    return aPathParts;
  }
1246831
private String getRootPath(String path, int rootLevel, ResourceResolver resourceResolver) {
    String rootPath = Path.getAbsoluteParent(path, rootLevel, resourceResolver);

    // strip off everything after first "." - root path may be passed with selectors/extension which is not relevant
    if (StringUtils.contains(rootPath, ".")) {
      rootPath = StringUtils.substringBefore(rootPath, ".");
    }

    return rootPath;
  }
883647
public String path() {
    /* build the fully qualified url with all query parameters */
    StringBuilder path = new StringBuilder();
    if (this.target != null) {
      path.append(this.target);
    }
    if (this.uriTemplate != null) {
      path.append(this.uriTemplate.toString());
    }
    if (path.length() == 0) {
      /* no path indicates the root uri */
      path.append("/");
    }
    return path.toString();

  }
1182057
protected List<String> getSiteConfigPaths(String path) {

        String normalizedPath = CmsStringUtil.joinPaths("/", path, "/");
        List<String> prefixes = new ArrayList<String>();

        List<String> parents = new ArrayList<String>();
        String currentPath = normalizedPath;
        while (currentPath != null) {
            parents.add(currentPath);
            currentPath = CmsResource.getParentFolder(currentPath);
        }

        for (String parent : parents) {
            if (m_siteConfigurationsByPath.containsKey(parent)) {
                prefixes.add(parent);
            }
        }
        Collections.sort(prefixes);
        return prefixes;
    }
544122
Path getRootDirectory()
  {
    Path rawRoot = config().get("baratine.root", Path.class, 
                                Paths.get("/tmp/baratine"));

    return rawRoot;
  }
527021
public static String[] removePathTemplate(List<MappedEndpoint> mappedEndpoints) {

        return mappedEndpoints.stream()
                .filter(me -> !me.type.equals(MappedEndpoint.Type.STATIC))
                .map(me -> {
                    int idx = me.url.indexOf("/{");
                    return idx >= 0 ? me.url.substring(0, idx) : me.url;
                })
                .distinct().toArray(String[]::new);
    }
534749
public Set<String> getIncludeRoots() {

        List<String> pathList = new ArrayList<String>(m_includes);
        Set<String> includeRoots = new HashSet<String>();
        Collections.sort(pathList);
        while (!pathList.isEmpty()) {
            Iterator<String> iterator = pathList.iterator();
            String firstPath = iterator.next();
            includeRoots.add(firstPath);
            iterator.remove();
            while (iterator.hasNext()) {
                String currentPath = iterator.next();
                if (CmsStringUtil.isPrefixPath(firstPath, currentPath)) {
                    iterator.remove();
                }
            }
        }
        return includeRoots;
    }
454040
public Optional<DataType> remove( Object tree, List<String> keys ) {

        if ( keys.size() != traversalLength ) {
            throw new TraversrException( "Traversal Path and number of keys mismatch, traversalLength:" + traversalLength + " numKeys:" + keys.size() );
        }

        if ( tree == null ) {
            return Optional.empty();
        }

        return root.traverse( tree, TraversalStep.Operation.REMOVE, keys.iterator(), null );
    }
1357338
public static String getRootRelativePath(String url) {

		Matcher matcher = URL_SEPARATOR_PATTERN.matcher(url);
		StringBuffer result = new StringBuffer();
		boolean first = true;
		while (matcher.find()) {
			if (first) {
				matcher.appendReplacement(result, "");
				first = false;
			} else {
				matcher.appendReplacement(result, ROOT_REPLACE_PATTERN);
			}
		}

		return result.toString();
	}
663368
function () {
        var rootURL = this._getRootURL();
        var path = rootURL;
        var historyPath = this._getHistoryPath();
        var routePath = historyPath.substr(rootURL.length);

        if (routePath !== '') {
          if (routePath.charAt(0) !== '/') {
            routePath = '/' + routePath;
          }

          path += '#' + routePath;
        }

        return path;
      }
891799
public String popNestedPath() {
        
        if(nestedPathStack.isEmpty()) {
            throw new IllegalStateException("Cannot pop nested path: no nested path on stack");
        }
        
        final String subPath = nestedPathStack.pop();
        this.currentPath = buildPath();
        return subPath;
    }
364664
function() {
      var path = this.decodeFragment(this.location.pathname);
      var rootPath = path.slice(0, this.root.length - 1) + '/';
      return rootPath === this.root;
    }