org.apache.xml.serializer

Class ElemDesc


public final class ElemDesc
extends 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 (?
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 (?
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(String name, int flags)
Tell if any of the bits of interest are set for a named attribute type.
void
setAttr(String name, int flags)
Set an attribute name and it's bit properties.

Field Details

ASPECIAL

public static final int ASPECIAL
Bit position if this element type is ???.
Field Value:
65536

ATTREMPTY

public static final int ATTREMPTY
Bit position if this attribute type is an empty type.
Field Value:
4

ATTRURL

public static final int ATTRURL
Bit position if this attribute type is a URL.
Field Value:
2

BLOCK

public static final int BLOCK
Bit position if this element type is a block.
Field Value:
8

BLOCKFORM

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

BLOCKFORMFIELDSET

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

CDATA

public static final int CDATA
Bit position if this element type is CDATA.
Field Value:
64

EMPTY

public static final int EMPTY
Bit position if this element type is empty.
Field Value:
2

FLOW

public static final int FLOW
Bit position if this element type is a flow.
Field Value:
4

FONTSTYLE

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

FORMCTRL

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

HEAD

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

HEADELEM

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

HEADMISC

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

INLINE

public static final int INLINE
Bit position if this element type should be inlined.
Field Value:
512

INLINEA

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

INLINELABEL

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

LIST

public static final int LIST
Bit position if this element type is a list.
Field Value:
524288

PCDATA

public static final int PCDATA
Bit position if this element type is PCDATA.
Field Value:
128

PHRASE

public static final int PHRASE
Bit position if this element type is a phrase.
Field Value:
8192

PREFORMATTED

public static final int PREFORMATTED
Bit position if this element type is a preformatted type.
Field Value:
1048576

RAW

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

SPECIAL

public static final int SPECIAL
Bit position if this element type is ???.
Field Value:
32768

WHITESPACESENSITIVE

public static final int WHITESPACESENSITIVE
Bit position if this element type is whitespace sensitive.
Field Value:
2097152

Constructor Details

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 Details

getFlags

public int getFlags()

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.

isAttrFlagSet

public boolean isAttrFlagSet(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.

setAttr

public void setAttr(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.

Copyright B) 2004 Apache XML Project. All Rights Reserved.