Home » openjdk-7 » javax » swing » text » html » parser » [javadoc | source]
javax.swing.text.html.parser
public class: DTD [javadoc | source]
java.lang.Object
   javax.swing.text.html.parser.DTD

All Implemented Interfaces:
    DTDConstants

The representation of an SGML DTD. DTD describes a document syntax and is used in parsing of HTML documents. It contains a list of elements and their attributes as well as a list of entities defined in the DTD.
Field Summary
public  String name     
public  Vector<Element> elements     
public  Hashtable<String, Element> elementHash     
public  Hashtable<Object, Entity> entityHash     
public final  Element pcdata     
public final  Element html     
public final  Element meta     
public final  Element base     
public final  Element isindex     
public final  Element head     
public final  Element body     
public final  Element applet     
public final  Element param     
public final  Element p     
public final  Element title     
final  Element style     
final  Element link     
final  Element script     
public static final  int FILE_VERSION     
Constructor:
 protected DTD(String name) 
    Creates a new DTD with the specified name.
    Parameters:
    name - the name, as a String of the new DTD
Method from javax.swing.text.html.parser.DTD Summary:
defAttributeList,   defContentModel,   defElement,   defEntity,   defEntity,   defineAttributes,   defineElement,   defineEntity,   elementExists,   getDTD,   getElement,   getElement,   getEntity,   getEntity,   getName,   putDTDHash,   read,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.html.parser.DTD Detail:
 protected AttributeList defAttributeList(String name,
    int type,
    int modifier,
    String value,
    String values,
    AttributeList atts) 
    Creates and returns an AttributeList.
 protected ContentModel defContentModel(int type,
    Object obj,
    ContentModel next) 
    Creates and returns a new content model.
 protected Element defElement(String name,
    int type,
    boolean omitStart,
    boolean omitEnd,
    ContentModel content,
    String[] exclusions,
    String[] inclusions,
    AttributeList atts) 
    Creates and returns an Element.
 public Entity defEntity(String name,
    int type,
    int ch) 
    Creates and returns a character Entity.
 protected Entity defEntity(String name,
    int type,
    String str) 
    Creates and returns an Entity.
 public  void defineAttributes(String name,
    AttributeList atts) 
    Defines attributes for an {@code Element}.
 public Element defineElement(String name,
    int type,
    boolean omitStart,
    boolean omitEnd,
    ContentModel content,
    BitSet exclusions,
    BitSet inclusions,
    AttributeList atts) 
    Returns the Element which matches the specified parameters. If one doesn't exist, a new one is created and returned.
 public Entity defineEntity(String name,
    int type,
    char[] data) 
    Defines an entity. If the Entity specified by name, type, and data exists, it is returned; otherwise a new Entity is created and is returned.
 boolean elementExists(String name) 
    Returns true if the element is part of the DTD, otherwise returns false.
 public static DTD getDTD(String name) throws IOException 
    Returns a DTD with the specified name. If a DTD with that name doesn't exist, one is created and returned. Any uppercase characters in the name are converted to lowercase.
 public Element getElement(String name) 
    Gets an element by name. A new element is created if the element doesn't exist.
 public Element getElement(int index) 
    Gets an element by index.
 public Entity getEntity(String name) 
    Gets an entity by name.
 public Entity getEntity(int ch) 
    Gets a character entity.
 public String getName() 
    Gets the name of the DTD.
 public static  void putDTDHash(String name,
    DTD dtd) 
 public  void read(DataInputStream in) throws IOException 
    Recreates a DTD from an archived format.
 public String toString() 
    Returns a string representation of this DTD.