Class RegexNodeScanner
- java.lang.Object
-
- org.craftercms.core.util.xml.impl.RegexNodeScanner
-
- All Implemented Interfaces:
NodeScanner
public class RegexNodeScanner extends Object implements NodeScanner
NodeScannerimplementation that scans the document to find nodes that match certain regex patterns.- Author:
- Alfonso Vásquez
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classRegexNodeScanner.RegexMatcherVisitor
-
Field Summary
Fields Modifier and Type Field Description protected booleanmatchEntireNodeTextprotected Pattern[]patterns
-
Constructor Summary
Constructors Constructor Description RegexNodeScanner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()List<org.dom4j.Node>scan(org.dom4j.Document document)Scans the specified document for nodes that fit a certain condition.voidsetMatchEntireNodeText(boolean matchEntireNodeText)voidsetPatterns(Pattern... patterns)
-
-
-
Field Detail
-
patterns
protected Pattern[] patterns
-
matchEntireNodeText
protected boolean matchEntireNodeText
-
-
Method Detail
-
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:NodeScannerScans the specified document for nodes that fit a certain condition.- Specified by:
scanin interfaceNodeScanner- Returns:
- the list of nodes that fit the condition
-
-