javax.swing.text.html.parser
Class Entity

java.lang.Object
  extended by javax.swing.text.html.parser.Entity
All Implemented Interfaces:
DTDConstants

public final class Entity
extends Object
implements DTDConstants

Disabled: no SafeJ information.

An entity is described in a DTD using the ENTITY construct. It defines the type and value of the the entity.

See Also:
DTD

Field Summary
 char[] data
           
 String name
           
 int type
           
 
Fields inherited from interface 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
 
Constructor Summary
Entity(String name, int type, char[] data)
          Creates an entity.
 
Method Summary
 char[] getData()
          Returns the data.
 String getName()
          Gets the name of the entity.
 String getString()
          Returns the data as a String.
 int getType()
          Gets the type of the entity.
 boolean isGeneral()
          Returns true if it is a general entity.
 boolean isParameter()
          Returns true if it is a parameter entity.
static int name2type(String nm)
          Converts nm string to the corresponding entity type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name
Class is disabled.


type

public int type
Class is disabled.


data

public char[] data
Class is disabled.

Constructor Detail

Entity

public Entity(String name,
              int type,
              char[] data)
Class is disabled.

Creates an entity.

Parameters:
name - the name of the entity
type - the type of the entity
data - the char array of data
Method Detail

getName

public String getName()
Class is disabled.

Gets the name of the entity.

Returns:
the name of the entity, as a String

getType

public int getType()
Class is disabled.

Gets the type of the entity.

Returns:
the type of the entity

isParameter

public boolean isParameter()
Class is disabled.

Returns true if it is a parameter entity.

Returns:
true if it is a parameter entity

isGeneral

public boolean isGeneral()
Class is disabled.

Returns true if it is a general entity.

Returns:
true if it is a general entity

getData

public char[] getData()
Class is disabled.

Returns the data.

Returns:
the data

getString

public String getString()
Class is disabled.

Returns the data as a String.

Returns:
the data as a String

name2type

public static int name2type(String nm)
Class is disabled.

Converts nm string to the corresponding entity type. If the string does not have a corresponding entity type, returns the type corresponding to "CDATA". Valid entity types are: "PUBLIC", "CDATA", "SDATA", "PI", "STARTTAG", "ENDTAG", "MS", "MD", "SYSTEM".

Parameters:
nm - the string to be converted
Returns:
the corresponding entity type, or the type corresponding to "CDATA", if none exists