JavaTM 2 Platform
Std. Ed. v1.3

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

java.lang.Object
  |
  +--javax.swing.text.html.parser.DTD
すべての実装インタフェース:
DTDConstants

public class DTD
extends Object
implements DTDConstants

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

関連項目:
Element, AttributeList, ContentModel, 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
           
 
インタフェース javax.swing.text.html.parser.DTDConstants から継承したフィールド
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
 
コンストラクタの概要
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
クラス java.lang.Object からコピーされたタグ:
戻り値:
このオブジェクトの文字列表現

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

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.