Class CmsPathIncludeExcludeSet

java.lang.Object
org.opencms.site.xmlsitemap.CmsPathIncludeExcludeSet

public class CmsPathIncludeExcludeSet extends Object
A helper class used for calculating which paths need to be included or excluded from the XML sitemap generation.

  • Constructor Details

  • Method Details

    • addExclude

      public void addExclude(String exclude)
      Adds an excluded path.

      Parameters:
      exclude - the path to add
    • addInclude

      public void addInclude(String include)
      Adds an included path.

      Parameters:
      include - the path to add
    • getIncludeRoots

      Gets the root include paths, i.e. those include paths which don't have an ancestor path which is also an include path.

      Returns:
      the list of root include paths
    • isExcluded

      public boolean isExcluded(String path)
      Checks if the given path is excluded by the include/exclude configuration.

      Parameters:
      path - the path to check
      Returns:
      true if the path is excluded
    • normalizePath

      protected String normalizePath(String path)
      Converts a path to a normalized form.

      Parameters:
      path - the path to normalize
      Returns:
      the normalized path