Package org.opencms.site.xmlsitemap
Class CmsPathIncludeExcludeSet
- java.lang.Object
-
- org.opencms.site.xmlsitemap.CmsPathIncludeExcludeSet
-
public class CmsPathIncludeExcludeSet extends java.lang.Object
A helper class used for calculating which paths need to be included or excluded from the XML sitemap generation.
-
-
Constructor Summary
Constructors Constructor Description CmsPathIncludeExcludeSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExclude(java.lang.String exclude)Adds an excluded path.voidaddInclude(java.lang.String include)Adds an included path.java.util.Set<java.lang.String>getIncludeRoots()Gets the root include paths, i.e.booleanisExcluded(java.lang.String path)Checks if the given path is excluded by the include/exclude configuration.protected java.lang.StringnormalizePath(java.lang.String path)Converts a path to a normalized form.
-
-
-
Constructor Detail
-
CmsPathIncludeExcludeSet
public CmsPathIncludeExcludeSet()
-
-
Method Detail
-
addExclude
public void addExclude(java.lang.String exclude)
Adds an excluded path.- Parameters:
exclude- the path to add
-
addInclude
public void addInclude(java.lang.String include)
Adds an included path.- Parameters:
include- the path to add
-
getIncludeRoots
public java.util.Set<java.lang.String> 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(java.lang.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 java.lang.String normalizePath(java.lang.String path)
Converts a path to a normalized form.- Parameters:
path- the path to normalize- Returns:
- the normalized path
-
-