org.apache.xml.utils
Class ElemDesc

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

 class ElemDesc
extends java.lang.Object

This class is in support of SerializerToHTML, and acts as a sort of element representative for HTML elements.


Field Summary
(package private) static int ASPECIAL
          Defines mnemonic and bit-value for the ASPECIAL flag
(package private) static int ATTREMPTY
          Defines mnemonic and bit-value for the ATTREMPTY flag
(package private) static int ATTRURL
          Defines mnemonic and bit-value for the ATTRURL flag
(package private) static int BLOCK
          Defines mnemonic and bit-value for the BLOCK flag
(package private) static int BLOCKFORM
          Defines mnemonic and bit-value for the BLOCKFORM flag
(package private) static int BLOCKFORMFIELDSET
          Defines mnemonic and bit-value for the BLOCKFORMFIELDSET flag
(package private) static int CDATA
          Defines mnemonic and bit-value for the CDATA flag
(package private) static int EMPTY
          Defines mnemonic and bit-value for the EMPTY flag
(package private) static int FLOW
          Defines mnemonic and bit-value for the FLOW flag
(package private) static int FONTSTYLE
          Defines mnemonic and bit-value for the FONTSTYLE flag
(package private) static int FORMCTRL
          Defines mnemonic and bit-value for the FORMCTRL flag
(package private) static int HEAD
          Defines mnemonic and bit-value for the HEAD flag
(package private) static int HEADMISC
          Defines mnemonic and bit-value for the HEADMISC flag
(package private) static int INLINE
          Defines mnemonic and bit-value for the INLINE flag
(package private) static int INLINEA
          Defines mnemonic and bit-value for the INLINEA flag
(package private) static int INLINELABEL
          Defines mnemonic and bit-value for the INLINELABEL flag
(package private) static int LIST
          Defines mnemonic and bit-value for the LIST flag
(package private)  java.util.Hashtable m_attrs
          Table of attributes for the element
(package private)  int m_flags
          Element's flags, describing the role this element plays during formatting of the document.
(package private) static int PCDATA
          Defines mnemonic and bit-value for the PCDATA flag
(package private) static int PHRASE
          Defines mnemonic and bit-value for the PHRASE flag
(package private) static int PREFORMATTED
          Defines mnemonic and bit-value for the PREFORMATTED flag
(package private) static int RAW
          Defines mnemonic and bit-value for the RAW flag
(package private) static int SPECIAL
          Defines mnemonic and bit-value for the SPECIAL flag
(package private) static int WHITESPACESENSITIVE
          Defines mnemonic and bit-value for the WHITESPACESENSITIVE flag
 
Constructor Summary
ElemDesc(int flags)
          Construct an ElementDescription with an initial set of flags.
 
Method Summary
(package private)  boolean is(int flags)
          "is (this element described by these flags)".
(package private)  boolean isAttrFlagSet(java.lang.String name, int flags)
          Find out if a flag is set in a given attribute of this element
(package private)  void setAttr(java.lang.String name, int flags)
          Set a new attribute for this element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_attrs

java.util.Hashtable m_attrs
Table of attributes for the element


m_flags

int m_flags
Element's flags, describing the role this element plays during formatting of the document. This is used as a bitvector; more than one flag may be set at a time, bitwise-ORed together. Mnemonic and bits have been assigned to the flag values. NOTE: Some bits are currently assigned multiple mnemonics; it is the caller's responsibility to disambiguate these if necessary.


EMPTY

static final int EMPTY
Defines mnemonic and bit-value for the EMPTY flag

See Also:
Constant Field Values

FLOW

static final int FLOW
Defines mnemonic and bit-value for the FLOW flag

See Also:
Constant Field Values

BLOCK

static final int BLOCK
Defines mnemonic and bit-value for the BLOCK flag

See Also:
Constant Field Values

BLOCKFORM

static final int BLOCKFORM
Defines mnemonic and bit-value for the BLOCKFORM flag

See Also:
Constant Field Values

BLOCKFORMFIELDSET

static final int BLOCKFORMFIELDSET
Defines mnemonic and bit-value for the BLOCKFORMFIELDSET flag

See Also:
Constant Field Values

CDATA

static final int CDATA
Defines mnemonic and bit-value for the CDATA flag

See Also:
Constant Field Values

PCDATA

static final int PCDATA
Defines mnemonic and bit-value for the PCDATA flag

See Also:
Constant Field Values

RAW

static final int RAW
Defines mnemonic and bit-value for the RAW flag

See Also:
Constant Field Values

INLINE

static final int INLINE
Defines mnemonic and bit-value for the INLINE flag

See Also:
Constant Field Values

INLINEA

static final int INLINEA
Defines mnemonic and bit-value for the INLINEA flag

See Also:
Constant Field Values

INLINELABEL

static final int INLINELABEL
Defines mnemonic and bit-value for the INLINELABEL flag

See Also:
Constant Field Values

FONTSTYLE

static final int FONTSTYLE
Defines mnemonic and bit-value for the FONTSTYLE flag

See Also:
Constant Field Values

PHRASE

static final int PHRASE
Defines mnemonic and bit-value for the PHRASE flag

See Also:
Constant Field Values

FORMCTRL

static final int FORMCTRL
Defines mnemonic and bit-value for the FORMCTRL flag

See Also:
Constant Field Values

SPECIAL

static final int SPECIAL
Defines mnemonic and bit-value for the SPECIAL flag

See Also:
Constant Field Values

ASPECIAL

static final int ASPECIAL
Defines mnemonic and bit-value for the ASPECIAL flag

See Also:
Constant Field Values

HEADMISC

static final int HEADMISC
Defines mnemonic and bit-value for the HEADMISC flag

See Also:
Constant Field Values

HEAD

static final int HEAD
Defines mnemonic and bit-value for the HEAD flag

See Also:
Constant Field Values

LIST

static final int LIST
Defines mnemonic and bit-value for the LIST flag

See Also:
Constant Field Values

PREFORMATTED

static final int PREFORMATTED
Defines mnemonic and bit-value for the PREFORMATTED flag

See Also:
Constant Field Values

WHITESPACESENSITIVE

static final int WHITESPACESENSITIVE
Defines mnemonic and bit-value for the WHITESPACESENSITIVE flag

See Also:
Constant Field Values

ATTRURL

static final int ATTRURL
Defines mnemonic and bit-value for the ATTRURL flag

See Also:
Constant Field Values

ATTREMPTY

static final int ATTREMPTY
Defines mnemonic and bit-value for the ATTREMPTY flag

See Also:
Constant Field Values
Constructor Detail

ElemDesc

ElemDesc(int flags)
Construct an ElementDescription with an initial set of flags.

Parameters:
flags - Element flags
See Also:
m_flags
Method Detail

is

boolean is(int flags)
"is (this element described by these flags)". This might more properly be called areFlagsSet(). It accepts an integer (being used as a bitvector) and checks whether all the corresponding bits are set in our internal flags. Note that this test is performed as a bitwise AND, not an equality test, so a 0 bit in the input means "don't test", not "must be set false".

Parameters:
flags - Vector of flags to compare against this element's flags
Returns:
true if the flags set in the parameter are also set in the element's stored flags.
See Also:
m_flags, isAttrFlagSet

setAttr

void setAttr(java.lang.String name,
             int flags)
Set a new attribute for this element

Parameters:
name - Attribute name
flags - Attibute flags

isAttrFlagSet

boolean isAttrFlagSet(java.lang.String name,
                      int flags)
Find out if a flag is set in a given attribute of this element

Parameters:
name - Attribute name
flags - Flag to check
Returns:
True if the flag is set in the attribute. Returns false if the attribute is not found
See Also:
m_flags