JavaTM Platform
Standard Ed. 6

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 의 표현입니다. DTD 는 문서의 구문을 기술한 것이어, HTML 문서의 해석에 사용됩니다. 이 내부에는, 요소와 그 속성의 리스트, 및 DTD 로 정의된 엔티티의 리스트가 포함됩니다.

관련 항목:
Element , AttributeList , ContentModel , Parser

필드의 개요
 Element applet
           
 Element base
           
 Element body
           
 Hashtable <String ,Element > elementHash
           
 Vector <Element > elements
           
 Hashtable <Object ,Entity > 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)
          AttributeList 를 작성해, 돌려줍니다.
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)
          Element 를 작성해, 돌려줍니다.
 Entity defEntity (String  name, int type, int ch)
          문자 Entity 를 작성해, 돌려줍니다.
protected  Entity defEntity (String  name, int type, String  str)
          문자 Entity 를 작성해, 돌려줍니다.
 void defineAttributes (String  name, AttributeList  atts)
          Element 의 속성을 정의합니다.
 Element defineElement (String  name, int type, boolean omitStart, boolean omitEnd, ContentModel  content, BitSet  exclusions, BitSet  inclusions, AttributeList  atts)
          지정한 파라미터에 일치하는 Element 를 돌려줍니다.
 Entity defineEntity (String  name, int type, char[] data)
          엔티티를 정의합니다.
static DTD getDTD (String  name)
          지정한 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)
          어카이브(archive) 된 형식으로부터 DTD 를 재작성합니다.
 String toString ()
          이 DTD 의 캐릭터 라인 표현을 돌려줍니다.
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

필드의 상세

name

public String  name

elements

public Vector <Element > elements

elementHash

public Hashtable <String ,Element > elementHash

entityHash

public Hashtable <Object ,Entity > 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 final int FILE_VERSION
관련 항목:
정수 필드치
생성자 의 상세

DTD

protected DTD(String  name)
지정된 이름을 가지는 새로운 DTD 를 작성합니다.

파라미터:
name - 이름 (새로운 DTD 의 String)
메소드의 상세

getName

public String  getName()
DTD 의 이름을 가져옵니다.

반환값:
DTD 의 이름

getEntity

public Entity  getEntity(String  name)
엔티티를 이름으로 가져옵니다.

반환값:
name String 에 대응한다 Entity

getEntity

public Entity  getEntity(int ch)
문자 엔티티를 가져옵니다.

반환값:
ch 문자에 대응한다 Entity

getElement

public Element  getElement(String  name)
요소를 이름으로 가져옵니다. 지정된 요소가 존재하지 않는 경우는, 새롭게 요소가 작성됩니다.

파라미터:
name - 요구된 String
반환값:
name 에 대응하는 Element. 새롭게 작성되는 일도 있다

getElement

public Element  getElement(int index)
요소를 인덱스로 돌려줍니다.

파라미터:
index - 요구하는 인덱스
반환값:
index 에 대응한다 Element

defineEntity

public Entity  defineEntity(String  name,
                           int type,
                           char[] data)
엔티티를 정의합니다. name,type, 및 data 로 지정되는 Entity 가 존재하는 경우는, 그 엔티티가 돌려주어집니다. 그렇지 않은 경우는, 새로운 Entity 가 작성되어 돌려주어집니다.

파라미터:
name - Entity 의 이름 (String)
type - Entity 의 타입
data - Entity 의 데이터
반환값:
요구된 Entity. 발견되지 않는 경우는, 새로운 Entity

defineElement

public Element  defineElement(String  name,
                             int type,
                             boolean omitStart,
                             boolean omitEnd,
                             ContentModel  content,
                             BitSet  exclusions,
                             BitSet  inclusions,
                             AttributeList  atts)
지정한 파라미터에 일치하는 Element 를 돌려줍니다. 존재하지 않는 경우는, 새로운 Element 가 작성되어 돌려주어집니다.

파라미터:
name - Element 의 이름
type - Element 의 타입
omitStart - 개시를 생략 하는 경우는 true
omitEnd - 종료를 생략 하는 경우는 true
content - ContentModel
atts - Element 를 지정한다 AttributeList
반환값:
지정된 Element

defineAttributes

public void defineAttributes(String  name,
                             AttributeList  atts)
Element 의 속성을 정의합니다.

파라미터:
name - Element 의 이름
atts - Element 를 지정한다 AttributeList

defEntity

public Entity  defEntity(String  name,
                        int type,
                        int ch)
문자 Entity 를 작성해, 돌려줍니다.

파라미터:
name - 엔티티의 이름
반환값:
새로운 문자 Entity

defEntity

protected Entity  defEntity(String  name,
                           int type,
                           String  str)
문자 Entity 를 작성해, 돌려줍니다.

파라미터:
name - 엔티티의 이름
반환값:
새로운 Entity

defElement

protected Element  defElement(String  name,
                             int type,
                             boolean omitStart,
                             boolean omitEnd,
                             ContentModel  content,
                             String [] exclusions,
                             String [] inclusions,
                             AttributeList  atts)
Element 를 작성해, 돌려줍니다.

파라미터:
name - 요소의 이름
반환값:
새로운 Element

defAttributeList

protected AttributeList  defAttributeList(String  name,
                                         int type,
                                         int modifier,
                                         String  value,
                                         String  values,
                                         AttributeList  atts)
AttributeList 를 작성해, 돌려줍니다.

파라미터:
name - 속성 리스트의 이름
반환값:
새로운 AttributeList

defContentModel

protected ContentModel  defContentModel(int type,
                                       Object  obj,
                                       ContentModel  next)
새로운 컨텐츠 모델을 작성해, 돌려줍니다.

파라미터:
type - 새로운 컨텐츠 모델의 타입
반환값:
새로운 ContentModel

toString

public String  toString()
이 DTD 의 캐릭터 라인 표현을 돌려줍니다.

오버라이드(override):
클래스 Object 내의 toString
반환값:
이 DTD 의 캐릭터 라인 표현

putDTDHash

public static void putDTDHash(String  name,
                              DTD  dtd)

getDTD

public static DTD  getDTD(String  name)
                  throws IOException 
지정한 name 를 가지는 DTD 를 돌려줍니다. 그 이름의 DTD 가 존재하지 않는 경우는, 작성해 돌려줍니다. 이름에 포함되는 대문자는 소문자에 변환됩니다.

파라미터:
name - DTD 의 이름
반환값:
name 에 대응하는 DTD
예외:
IOException

read

public void read(DataInputStream  in)
          throws IOException 
어카이브(archive) 된 형식으로부터 DTD 를 재작성합니다.

파라미터:
in - read원의 DataInputStream
예외:
IOException

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.