1 19 package org.netbeans.editor.ext.html.dtd; 20 21 22 import java.util.*; 23 24 32 public interface DTD { 33 34 37 public String getIdentifier(); 38 39 46 public List getElementList( String prefix ); 47 48 52 public DTD.Element getElement( String name ); 53 54 60 public List getCharRefList( String prefix ); 61 62 66 public DTD.CharRef getCharRef( String name ); 67 68 69 72 public static interface Element { 73 74 76 public String getName(); 77 78 81 public boolean isEmpty(); 82 83 84 public boolean hasOptionalStart(); 85 86 87 public boolean hasOptionalEnd(); 88 89 96 public List getAttributeList( String prefix ); 97 98 102 public DTD.Attribute getAttribute( String name ); 103 104 105 public DTD.ContentModel getContentModel(); 106 107 } 108 109 110 115 public static interface Attribute { 116 117 118 public static final int TYPE_BOOLEAN = 0; 119 120 public static final int TYPE_SET = 1; 121 122 public static final int TYPE_BASE = 2; 123 124 public static final String MODE_IMPLIED = "#IMPLIED"; public static final String MODE_REQUIRED = "#REQUIRED"; public static final String MODE_FIXED = "#FIXED"; 128 129 130 public String getName(); 131 132 135 public int getType(); 136 137 142 public String getBaseType(); 143 144 150 public String getTypeHelper(); 151 152 156 public String getDefaultMode(); 157 158 159 public boolean isRequired(); 160 161 168 public List getValueList( String prefix ); 169 170 172 public Value getValue( String name ); 173 174 } 175 176 178 public static interface Value { 179 public String getName(); 180 } 181 182 185 public static interface CharRef { 186 187 public String getName(); 188 189 190 public char getValue(); 191 } 192 193 194 200 public static interface ContentModel { 201 202 203 public Content getContent(); 204 205 210 public Set getIncludes(); 211 212 216 public Set getExcludes(); 217 218 } 219 220 223 public static interface Content { 224 static class EmptyContent implements Content { 225 public boolean isDiscardable() { return true; } 226 public Content reduce( String name ) { return null; } 227 public Set getPossibleElements() { return new TreeSet(); } 228 } 229 230 public static Content EMPTY_CONTENT = new EmptyContent(); 231 232 238 241 public boolean isDiscardable(); 242 243 251 public Content reduce( String elementName ); 252 253 254 public Set getPossibleElements(); 255 } 256 257 258 public static interface ContentLeaf extends Content { 259 260 public Element getElement(); 261 } 262 263 266 public static interface ContentNode extends Content { 267 268 271 public char getType(); 272 } 273 } 274 | Popular Tags |