1 19 20 package org.netbeans.modules.xml.xpath; 21 22 28 public class StepNodeTypeTest extends StepNodeTest { 29 30 31 private int mNodeType; 32 33 34 38 public StepNodeTypeTest(int nodeType) { 39 super(); 40 mNodeType = nodeType; 41 } 42 43 44 48 public int getNodeType() { 49 return mNodeType; 50 } 51 52 53 57 public String getNodeTypeString() { 58 int nodeType = getNodeType(); 59 60 switch (nodeType) { 61 case LocationStep.NODETYPE_NODE: 62 return "node()"; 63 case LocationStep.NODETYPE_TEXT: 64 return "text()"; 65 case LocationStep.NODETYPE_COMMENT: 66 return "comment()"; 67 case LocationStep.NODETYPE_PI: 68 return "processing-instruction()"; 69 } 70 71 return null; 72 } 73 74 public String toString() { 75 return getNodeTypeString(); 76 } 77 } 78 | Popular Tags |