1 package net.sf.saxon.pattern; 2 import net.sf.saxon.expr.XPathContext; 3 import net.sf.saxon.om.NodeInfo; 4 5 9 10 public class NodeTestPattern extends Pattern { 11 12 private NodeTest nodeTest; 13 14 public NodeTestPattern() {} 15 16 public NodeTestPattern(NodeTest test) { 17 nodeTest = test; 18 } 19 20 public void setNodeTest(NodeTest test) { 21 nodeTest = test; 22 } 23 24 33 34 public boolean matches(NodeInfo node, XPathContext context) { 35 return nodeTest.matches(node); 36 } 37 38 41 42 public NodeTest getNodeTest() { 43 return nodeTest; 44 } 45 46 49 50 public final double getDefaultPriority() { 51 return nodeTest.getDefaultPriority(); 52 } 53 54 60 61 public int getNodeKind() { 62 return nodeTest.getPrimitiveType(); 63 } 64 65 71 72 public int getFingerprint() { 73 return nodeTest.getFingerprint(); 74 } 75 76 79 80 public String toString() { 81 return nodeTest.toString(); 82 } 83 84 85 } 86 87 | Popular Tags |