1 19 package org.netbeans.tax; 20 21 import java.util.Iterator ; 22 import java.util.Collection ; 23 import java.util.LinkedList ; 24 25 31 public abstract class AbstractTreeDTD extends TreeParentNode { 32 33 37 38 protected AbstractTreeDTD () { 39 super (); 40 } 41 42 43 protected AbstractTreeDTD (AbstractTreeDTD abstractDTD, boolean deep) { 44 super (abstractDTD, deep); 45 } 46 47 48 52 54 public final Collection getElementDeclarations () { 55 return getChildNodes (TreeElementDecl.class, true); 56 } 57 58 60 public final Collection getAttlistDeclarations () { 61 return getChildNodes (TreeAttlistDecl.class, true); 62 } 63 64 66 public final Collection getAttributeDeclarations (String elementName) { 67 Collection attrDefs = new LinkedList (); 68 Iterator it = getAttlistDeclarations ().iterator (); 69 while (it.hasNext ()) { 70 TreeAttlistDecl attlist = (TreeAttlistDecl)it.next (); 71 if ( attlist.getElementName ().equals (elementName) ) { 72 attrDefs.addAll ((Collection )attlist.getAttributeDefs ()); 73 } 74 } 75 return attrDefs; 76 } 77 78 80 public final Collection getEntityDeclarations () { 81 return getChildNodes (TreeEntityDecl.class, true); 82 } 83 84 86 public final Collection getNotationDeclarations () { 87 return getChildNodes (TreeNotationDecl.class, true); 88 } 89 90 91 95 98 protected abstract class ChildListContentManager extends TreeParentNode.ChildListContentManager { 99 } 101 } 102 | Popular Tags |