org.apache.xml.serializer
Class ElemDesc

java.lang.Object
  extended by org.apache.xml.serializer.ElemDesc

public final class ElemDesc
extends java.lang.Object

This class has a series of flags (bit values) that describe an HTML element

This class is not a public API. It is public because it is used outside of this package.


Field Summary
(package private) static int ASPECIAL
          Bit position if this element type is ???.
static int ATTREMPTY
          Bit position if this attribute type is an empty type.
static int ATTRURL
          Bit position if this attribute type is a URL.
(package private) static int BLOCK
          Bit position if this element type is a block.
(package private) static int BLOCKFORM
          Bit position if this element type is a block form.
(package private) static int BLOCKFORMFIELDSET
          Bit position if this element type is a block form field set.
private static int CDATA
          Bit position if this element type is CDATA.
(package private) static int EMPTY
          Bit position if this element type is empty.
private static int FLOW
          Bit position if this element type is a flow.
(package private) static int FONTSTYLE
          Bit position if this element type is a font style.
(package private) static int FORMCTRL
          Bit position if this element type is a form control.
(package private) static int HEAD
          Bit position if this element type is a head element (i.e.
(package private) static int HEADELEM
          Bit position if this element type is a header element (i.e.
(package private) static int HEADMISC
          Bit position if this element type is an odd header element.
(package private) static int HTMLELEM
          Bit position if this element is the "HTML" element
private static int INLINE
          Bit position if this element type should be inlined.
private static int INLINEA
          Bit position if this element type is INLINEA.
(package private) static int INLINELABEL
          Bit position if this element type is an inline label.
(package private) static int LIST
          Bit position if this element type is a list.
private  StringToIntTable m_attrs
          Table of attribute names to integers, which contain bit flags telling about the attributes.
private  int m_flags
          Bit flags to tell about this element type.
private static int PCDATA
          Bit position if this element type is PCDATA.
(package private) static int PHRASE
          Bit position if this element type is a phrase.
(package private) static int PREFORMATTED
          Bit position if this element type is a preformatted type.
(package private) static int RAW
          Bit position if this element type is should be raw characters.
(package private) static int SPECIAL
          Bit position if this element type is ???.
(package private) static int WHITESPACESENSITIVE
          Bit position if this element type is whitespace sensitive.
 
Constructor Summary
ElemDesc(int flags)
          Construct an ElemDesc from a set of bit flags.
 
Method Summary
(package private)  int getFlags()
           
private  boolean is(int flags)
          Tell if this element type has the basic bit properties that are passed as an argument.
 boolean isAttrFlagSet(java.lang.String name, int flags)
          Tell if any of the bits of interest are set for a named attribute type.
(package private)  void setAttr(java.lang.String name, int flags)
          Set an attribute name and it's bit properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_flags

private int m_flags
Bit flags to tell about this element type.


m_attrs

private StringToIntTable m_attrs
Table of attribute names to integers, which contain bit flags telling about the attributes.


EMPTY

static final int EMPTY
Bit position if this element type is empty.

See Also:
Constant Field Values

FLOW

private static final int FLOW
Bit position if this element type is a flow.

See Also:
Constant Field Values

BLOCK

static final int BLOCK
Bit position if this element type is a block.

See Also:
Constant Field Values

BLOCKFORM

static final int BLOCKFORM
Bit position if this element type is a block form.

See Also:
Constant Field Values

BLOCKFORMFIELDSET

static final int BLOCKFORMFIELDSET
Bit position if this element type is a block form field set.

See Also:
Constant Field Values

CDATA

private static final int CDATA
Bit position if this element type is CDATA.

See Also:
Constant Field Values

PCDATA

private static final int PCDATA
Bit position if this element type is PCDATA.

See Also:
Constant Field Values

RAW

static final int RAW
Bit position if this element type is should be raw characters.

See Also:
Constant Field Values

INLINE

private static final int INLINE
Bit position if this element type should be inlined.

See Also:
Constant Field Values

INLINEA

private static final int INLINEA
Bit position if this element type is INLINEA.

See Also:
Constant Field Values

INLINELABEL

static final int INLINELABEL
Bit position if this element type is an inline label.

See Also:
Constant Field Values

FONTSTYLE

static final int FONTSTYLE
Bit position if this element type is a font style.

See Also:
Constant Field Values

PHRASE

static final int PHRASE
Bit position if this element type is a phrase.

See Also:
Constant Field Values

FORMCTRL

static final int FORMCTRL
Bit position if this element type is a form control.

See Also:
Constant Field Values

SPECIAL

static final int SPECIAL
Bit position if this element type is ???.

See Also:
Constant Field Values

ASPECIAL

static final int ASPECIAL
Bit position if this element type is ???.

See Also:
Constant Field Values

HEADMISC

static final int HEADMISC
Bit position if this element type is an odd header element.

See Also:
Constant Field Values

HEAD

static final int HEAD
Bit position if this element type is a head element (i.e. H1, H2, etc.)

See Also:
Constant Field Values

LIST

static final int LIST
Bit position if this element type is a list.

See Also:
Constant Field Values

PREFORMATTED

static final int PREFORMATTED
Bit position if this element type is a preformatted type.

See Also:
Constant Field Values

WHITESPACESENSITIVE

static final int WHITESPACESENSITIVE
Bit position if this element type is whitespace sensitive.

See Also:
Constant Field Values

HEADELEM

static final int HEADELEM
Bit position if this element type is a header element (i.e. HEAD).

See Also:
Constant Field Values

HTMLELEM

static final int HTMLELEM
Bit position if this element is the "HTML" element

See Also:
Constant Field Values

ATTRURL

public static final int ATTRURL
Bit position if this attribute type is a URL.

See Also:
Constant Field Values

ATTREMPTY

public static final int ATTREMPTY
Bit position if this attribute type is an empty type.

See Also:
Constant Field Values
Constructor Detail

ElemDesc

ElemDesc(int flags)
Construct an ElemDesc from a set of bit flags.

Parameters:
flags - Bit flags that describe the basic properties of this element type.
Method Detail

is

private boolean is(int flags)
Tell if this element type has the basic bit properties that are passed as an argument.

Parameters:
flags - Bit flags that describe the basic properties of interest.
Returns:
true if any of the flag bits are true.

getFlags

int getFlags()

setAttr

void setAttr(java.lang.String name,
             int flags)
Set an attribute name and it's bit properties.

Parameters:
name - non-null name of attribute, in upper case.
flags - flag bits.

isAttrFlagSet

public boolean isAttrFlagSet(java.lang.String name,
                             int flags)
Tell if any of the bits of interest are set for a named attribute type.

Parameters:
name - non-null reference to attribute name, in any case.
flags - flag mask.
Returns:
true if any of the flags are set for the named attribute.