Class RegexNodeScanner

java.lang.Object
org.craftercms.core.util.xml.impl.RegexNodeScanner
All Implemented Interfaces:
NodeScanner

public class RegexNodeScanner extends Object implements NodeScanner
NodeScanner implementation that scans the document to find nodes that match certain regex patterns.
Author:
Alfonso Vásquez
  • Field Details

    • patterns

      protected Pattern[] patterns
    • matchEntireNodeText

      protected boolean matchEntireNodeText
  • Constructor Details

    • RegexNodeScanner

      public RegexNodeScanner()
  • Method Details

    • setPatterns

      public void setPatterns(Pattern... patterns)
    • setMatchEntireNodeText

      public void setMatchEntireNodeText(boolean matchEntireNodeText)
    • scan

      public List<org.dom4j.Node> scan(org.dom4j.Document document)
      Description copied from interface: NodeScanner
      Scans the specified document for nodes that fit a certain condition.
      Specified by:
      scan in interface NodeScanner
      Returns:
      the list of nodes that fit the condition
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object