1 28 29 package com.caucho.relaxng.pattern; 30 31 import com.caucho.relaxng.RelaxException; 32 33 36 public class ExcludeNamePattern extends NameClassPattern { 37 private NameClassPattern _pattern; 38 39 42 public ExcludeNamePattern() 43 { 44 } 45 46 49 public NameClassPattern getNameChild() 50 { 51 return _pattern; 52 } 53 54 57 public void addNameChild(NameClassPattern child) 58 throws RelaxException 59 { 60 if (_pattern != null) 61 throw new RelaxException(L.l("<exclude> must have a single child.")); 62 63 _pattern = child; 64 } 65 66 69 public String getTagName() 70 { 71 return "exclude"; 72 } 73 74 public boolean equals(Object o) 75 { 76 if (this == o) 77 return true; 78 79 if (! (o instanceof ExcludeNamePattern)) 80 return false; 81 82 ExcludeNamePattern exclude = (ExcludeNamePattern) o; 83 84 return _pattern.equals(exclude._pattern); 85 } 86 87 90 public String toString() 91 { 92 return "ExcludeNamePattern" + _pattern; 93 } 94 } 95 96 | Popular Tags |