- java.lang.Object
-
- javax.swing.text.html.parser.Element
-
- すべての実装されたインタフェース:
Serializable,DTDConstants
public final class Element extends Object implements DTDConstants, Serializable
ELEMENT構成要素を使ってDTDに記述されたとおりの要素です。 これは、タグに不可欠な記述です。 タイプ、コンテンツ・モデル、属性、属性の型などを記述しています。この記述は、ドキュメントを正しく解析するためにParserによって使用されます。- 関連項目:
DTD、AttributeList、直列化された形式
-
-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 AttributeListatts属性を指定しますContentModelcontentコンテンツ・モデルObjectdataユーザー・データを格納するフィールドです。BitSetexclusionsエレメント内で発生してはならないエレメントのセットBitSetinclusionsエレメント内で発生する可能性のあるエレメントのセットintindex要素の索引Stringname要素の名前ですbooleanoEnd終了タグを省略できる場合はtruebooleanoStart開始タグを省略できる場合はtrueinttype要素タイプ。-
インタフェース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
-
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 AttributeListgetAttribute(String name)属性を名前で取得します。AttributeListgetAttributeByValue(String value)属性を値で取得します。AttributeListgetAttributes()属性を取得します。ContentModelgetContent()コンテンツ・モデルを返します。intgetIndex()インデックスを取得します。StringgetName()要素の名前を取得します。intgetType()型を取得します。booleanisEmpty()空かどうかを判定します。static intname2type(String nm)nmを型に変換します。booleanomitEnd()終了タグを省略できる場合にtrueを返します。booleanomitStart()開始タグを省略できる場合にtrueを返します。StringtoString()文字列に変換します。
-
-
-
フィールドの詳細
-
index
public int index
要素の索引
-
name
public String name
要素の名前です
-
oStart
public boolean oStart
開始タグを省略できる場合はtrue
-
oEnd
public boolean oEnd
終了タグを省略できる場合はtrue
-
inclusions
public BitSet inclusions
エレメント内で発生する可能性のあるエレメントのセット
-
exclusions
public BitSet exclusions
エレメント内で発生してはならないエレメントのセット
-
type
public int type
要素タイプ。
-
content
public ContentModel content
コンテンツ・モデル
-
atts
public AttributeList atts
属性を指定します
-
data
public Object data
ユーザー・データを格納するフィールドです。 ほとんどの場合、スタイル・シートの格納に使われます。
-
-
メソッドの詳細
-
getName
public String getName()
要素の名前を取得します。- 戻り値:
- 要素の名前
-
omitStart
public boolean omitStart()
開始タグを省略できる場合にtrueを返します。- 戻り値:
- 開始タグを省略できる場合は
true
-
omitEnd
public boolean omitEnd()
終了タグを省略できる場合にtrueを返します。- 戻り値:
- 終了タグを省略できる場合は
true
-
getType
public int getType()
型を取得します。- 戻り値:
- 要素の型
-
getContent
public ContentModel getContent()
コンテンツ・モデルを返します。- 戻り値:
- コンテンツ・モデル
-
getAttributes
public AttributeList getAttributes()
属性を取得します。- 戻り値:
- 要素を指定する
AttributeList
-
getIndex
public int getIndex()
インデックスを取得します。- 戻り値:
- 要素の索引
-
isEmpty
public boolean isEmpty()
空かどうかを判定します。- 戻り値:
- 現在の要素が空の場合はtrue
-
toString
public String toString()
文字列に変換します。
-
getAttribute
public AttributeList getAttribute(String name)
属性を名前で取得します。- パラメータ:
name- 属性名- 戻り値:
- 指定された
nameのAttributeList
-
getAttributeByValue
public AttributeList getAttributeByValue(String value)
属性を値で取得します。- パラメータ:
value- 値の文字列表現- 戻り値:
- 指定された
valueのAttributeList
-
name2type
public static int name2type(String nm)
nmを型に変換します。nmがCDATA、RCDATA、EMPTYまたはANYと等しい場合、適切なDTDConstantsを返します。それ以外の場合は0を返します。- パラメータ:
nm- 名前- 戻り値:
nmがCDATA、RCDATA、EMPTYまたはANYと等しい場合は適切なDTDConstants、それ以外の場合は0。
-
-