Java プラットフォーム 1.2

javax.swing.text.html.parser
クラス DTD

java.lang.Object
  |
  +--javax.swing.text.html.parser.DTD

public class DTD
extends Object
implements DTDConstants

SGML DTD の表現です。これは、DTDParser によって生成されます。結果として得られる DTD オブジェクトはドキュメントの構文を記述したものであり、Parser を使って HTML ドキュメントを解析するときに必要です。DTD オブジェクトは、DTD に定義されている要素とその属性のリスト、さらにはエンティティのリストを格納しています。

関連項目:
Element, AttributeList, ContentModel, DTDParser, Parser

フィールドの概要
 Element applet
           
 Element base
           
 Element body
           
 Hashtable elementHash
           
 Vector elements
           
 Hashtable entityHash
           
static int FILE_VERSION
           
 Element head
           
 Element html
           
 Element isindex
           
 Element meta
           
 String name
           
 Element p
           
 Element param
           
 Element pcdata
           
 Element title
           
 
コンストラクタの概要
protected DTD(String name)
          新しい DTD を作成します。
 
メソッドの概要
protected  AttributeList defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts)
          属性リストを定義します。
protected  ContentModel defContentModel(int type, Object obj, ContentModel next)
          コンテンツモデルを定義します。
protected  Element defElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, String[] exclusions, String[] inclusions, AttributeList atts)
          要素を定義します。
 Entity defEntity(String name, int type, int ch)
          文字エンティティを定義します。
protected  Entity defEntity(String name, int type, String str)
          エンティティを定義します。
 void defineAttributes(String name, AttributeList atts)
          要素の属性を定義します。
 Element defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts)
          要素を定義します。
 Entity defineEntity(String name, int type, char[] data)
          エンティティを定義します。
static DTD getDTD(String name)
          DTD を取得します。
 Element getElement(int index)
          要素をインデックスで取得します。
 Element getElement(String name)
          要素を名前で取得します。
 Entity getEntity(int ch)
          文字エンティティを取得します。
 Entity getEntity(String name)
          エンティティを名前で取得します。
 String getName()
          DTD の名前を取得します。
static void putDTDHash(String name, DTD dtd)
           
 void read(DataInputStream in)
           
 String toString()
          文字列表現を返します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

name

public String name

elements

public Vector elements

elementHash

public Hashtable elementHash

entityHash

public Hashtable entityHash

pcdata

public final Element pcdata

html

public final Element html

meta

public final Element meta

base

public final Element base

isindex

public final Element isindex

head

public final Element head

body

public final Element body

applet

public final Element applet

param

public final Element param

p

public final Element p

title

public final Element title

FILE_VERSION

public static int FILE_VERSION
コンストラクタの詳細

DTD

protected DTD(String name)
新しい DTD を作成します。
メソッドの詳細

getName

public String getName()
DTD の名前を取得します。

getEntity

public Entity getEntity(String name)
エンティティを名前で取得します。

getEntity

public Entity getEntity(int ch)
文字エンティティを取得します。

getElement

public Element getElement(String name)
要素を名前で取得します。指定された要素が存在しない場合は、新しく要素が作成されます。

getElement

public Element getElement(int index)
要素をインデックスで取得します。

defineEntity

public Entity defineEntity(String name,
                           int type,
                           char[] data)
エンティティを定義します。

defineElement

public Element defineElement(String name,
                             int type,
                             boolean omitStart,
                             boolean omitEnd,
                             ContentModel content,
                             BitSet exclusions,
                             BitSet inclusions,
                             AttributeList atts)
要素を定義します。

defineAttributes

public void defineAttributes(String name,
                             AttributeList atts)
要素の属性を定義します。

defEntity

public Entity defEntity(String name,
                        int type,
                        int ch)
文字エンティティを定義します。

defEntity

protected Entity defEntity(String name,
                           int type,
                           String str)
エンティティを定義します。

defElement

protected Element defElement(String name,
                             int type,
                             boolean omitStart,
                             boolean omitEnd,
                             ContentModel content,
                             String[] exclusions,
                             String[] inclusions,
                             AttributeList atts)
要素を定義します。

defAttributeList

protected AttributeList defAttributeList(String name,
                                         int type,
                                         int modifier,
                                         String value,
                                         String values,
                                         AttributeList atts)
属性リストを定義します。

defContentModel

protected ContentModel defContentModel(int type,
                                       Object obj,
                                       ContentModel next)
コンテンツモデルを定義します。

toString

public String toString()
文字列表現を返します。
オーバーライド:
クラス Object 内の toString

putDTDHash

public static void putDTDHash(String name,
                              DTD dtd)

getDTD

public static DTD getDTD(String name)
                  throws IOException
DTD を取得します。

read

public void read(DataInputStream in)
          throws IOException

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.