org.apache.xml.serializer
Class ElemDesc

java.lang.Object
  |
  +--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


Field Summary
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.
static int BLOCK
          Bit position if this element type is a block.
static int BLOCKFORM
          Bit position if this element type is a block form.
static int BLOCKFORMFIELDSET
          Bit position if this element type is a block form field set (?? -sb).
static int CDATA
          Bit position if this element type is CDATA.
static int EMPTY
          Bit position if this element type is empty.
static int FLOW
          Bit position if this element type is a flow.
static int FONTSTYLE
          Bit position if this element type is a font style.
static int FORMCTRL
          Bit position if this element type is a form control.
static int HEAD
          Bit position if this element type is a head element (i.e.
static int HEADELEM
          Bit position if this element type is a header element (i.e.
static int HEADMISC
          Bit position if this element type is an odd header element.
static int INLINE
          Bit position if this element type should be inlined.
static int INLINEA
          Bit position if this element type is INLINEA (?? -sb).
static int INLINELABEL
          Bit position if this element type is an inline label.
static int LIST
          Bit position if this element type is a list.
static int PCDATA
          Bit position if this element type is PCDATA.
static int PHRASE
          Bit position if this element type is a phrase.
static int PREFORMATTED
          Bit position if this element type is a preformatted type.
static int RAW
          Bit position if this element type is should be raw characters.
static int SPECIAL
          Bit position if this element type is ???.
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
 int getFlags()
           
 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.
 void setAttr(java.lang.String name, int flags)
          Set an attribute name and it's bit properties.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

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

FLOW

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

BLOCK

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

BLOCKFORM

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

BLOCKFORMFIELDSET

public static final int BLOCKFORMFIELDSET
Bit position if this element type is a block form field set (?? -sb).

CDATA

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

PCDATA

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

RAW

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

INLINE

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

INLINEA

public static final int INLINEA
Bit position if this element type is INLINEA (?? -sb).

INLINELABEL

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

FONTSTYLE

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

PHRASE

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

FORMCTRL

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

SPECIAL

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

ASPECIAL

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

HEADMISC

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

HEAD

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

LIST

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

PREFORMATTED

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

WHITESPACESENSITIVE

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

HEADELEM

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

ATTRURL

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

ATTREMPTY

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

ElemDesc

public 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

public 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

public int getFlags()

setAttr

public 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.


Copyright © 2004 Apache XML Project. All Rights Reserved.