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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
RegexNodeScanner.RegexMatcherVisitor
-
Field Summary
Fields Modifier and Type Field Description protected boolean
matchEntireNodeText
protected Pattern[]
patterns
-
Constructor Summary
Constructors Constructor Description RegexNodeScanner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
List<org.dom4j.Node>
scan(org.dom4j.Document document)
Scans the specified document for nodes that fit a certain condition.void
setMatchEntireNodeText(boolean matchEntireNodeText)
void
setPatterns(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:NodeScanner
Scans the specified document for nodes that fit a certain condition.- Specified by:
scan
in interfaceNodeScanner
- Returns:
- the list of nodes that fit the condition
-
-