|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface to hold the Attribute definition.
Field Summary | |
static short |
OPTIONALITY_DEFAULT
Identifies a Required attribute. |
static short |
OPTIONALITY_FIXED
Identifies a Fixed attribute. |
static short |
OPTIONALITY_IMPLIED
Identifies a Implied attribute. |
static short |
OPTIONALITY_REQUIRED
Identifies a Required attribute. |
static short |
TYPE_ENUM_ENUMERATION
Identifies an Attribute defined as an Enumeration. |
static short |
TYPE_ENUM_NOTATION
Identifies an Attribute defined as a Notation. |
static short |
TYPE_ENUMERATED
Identifies an Attribute defined as a Enumerated type. |
static short |
TYPE_NOT_TOKENIZED
Identifies an non-Tokenized type attribute. |
static short |
TYPE_STRING
Identifies an Attribute defined as a String type. |
static short |
TYPE_TOKENIZED
Identifies an Attribute defined as a Tokenized type. |
static short |
TYPE_TOKENIZED_ENTITIES
Identifies the Tokenized type "ENTITIES". |
static short |
TYPE_TOKENIZED_ENTITY
Identifies the Tokenized type "ENTITY". |
static short |
TYPE_TOKENIZED_ID
Identifies the Tokenized type "ID". |
static short |
TYPE_TOKENIZED_IDREF
Identifies the Tokenized type "IDREF". |
static short |
TYPE_TOKENIZED_IDREFS
Identifies the Tokenized type "IDREFS". |
static short |
TYPE_TOKENIZED_INVALID
Identifies an invalid Tokenized type specification. |
static short |
TYPE_TOKENIZED_NMTOKEN
Identifies the Tokenized type "NMTOKEN". |
static short |
TYPE_TOKENIZED_NMTOKENS
Identifies the Tokenized type "NMTOKENS". |
Method Summary | |
java.lang.String |
getAttributeName()
Returns the name of the attribute. |
short |
getAttType()
Returns the attribute type. |
short |
getDefaultDeclType()
Returns the default declartion type for this attribute. |
java.lang.String |
getDefaultValue()
Returns the default value for the attribute - this will be either the default or fixed value for the attribute. |
java.util.Collection |
getEnumeratedValues()
Returns the possible values defined for an Enumerated Type attribute - note that this is for both Notation as well as Enumerations. |
short |
getTokenizedType()
Returns the type of the Tokenized type for this attribute; can have one of these values - TYPE_TOKENIZED_ID, TYPE_TOKENIZED_IDREF, TYPE_TOKENIZED_IDREFS, TYPE_TOKENIZED_ENTITY, TYPE_TOKENIZED_ENTITIES, TYPE_TOKENIZED_NMTOKEN or TYPE_TOKENIZED_NMTOKENS. |
boolean |
hasDefaultValue()
Returns true if the attribute
has a fixed or default value. |
boolean |
isEnumeratedType()
Returns true if the attribute
is a Enumerated type. |
boolean |
isEnumeration()
Returns true if the attribute is
an Enumeration. |
boolean |
isNotationType()
Returns true if the attribute is
of Notation type. |
boolean |
isStringType()
Returns true if the attribute
is a String type - i.e., the type of the
attribute is declared as "CDATA". |
boolean |
isTokenizedType()
Returns true if the attribute
is a Tokenized type - i.e., the type of the
attribute is declared as "ID", "IDREF",
"IDREFS", "ENTITY", "ENTITIES", "NMTOKEN"
or "NMTOKENS". |
void |
setAttributeName(java.lang.String attName)
Set the attribute name for this attribute definition. |
void |
setAttType(short attType)
Sets the attribute type for this attribute definition. |
void |
setDefaultDeclType(short defDeclType)
Set the default declaration type for this attribute definition. |
void |
setDefaultValue(java.lang.String defValue)
Set the default value for the attribute definition. |
void |
setEnumeratedValues(java.util.Collection enumVals)
Sets the enumerated values for this attribute definition. |
Field Detail |
public static final short TYPE_STRING
public static final short TYPE_TOKENIZED
public static final short TYPE_ENUMERATED
public static final short TYPE_ENUM_ENUMERATION
public static final short TYPE_ENUM_NOTATION
public static final short TYPE_TOKENIZED_ID
public static final short TYPE_TOKENIZED_IDREF
public static final short TYPE_TOKENIZED_IDREFS
public static final short TYPE_TOKENIZED_ENTITY
public static final short TYPE_TOKENIZED_ENTITIES
public static final short TYPE_TOKENIZED_NMTOKEN
public static final short TYPE_TOKENIZED_NMTOKENS
public static final short TYPE_TOKENIZED_INVALID
public static final short TYPE_NOT_TOKENIZED
public static final short OPTIONALITY_REQUIRED
public static final short OPTIONALITY_IMPLIED
public static final short OPTIONALITY_FIXED
public static final short OPTIONALITY_DEFAULT
Method Detail |
public java.lang.String getAttributeName()
public void setAttributeName(java.lang.String attName)
attName
- The attribute name.public short getAttType()
TYPE_STRING
,
TYPE_TOKENIZED
or
TYPE_ENUMERATED
.public void setAttType(short attType)
attType
- The attribute type.public boolean isStringType()
true
if the attribute
is a String type - i.e., the type of the
attribute is declared as "CDATA".true
if the attribute
is a String type; false
otherwise.public boolean isTokenizedType()
true
if the attribute
is a Tokenized type - i.e., the type of the
attribute is declared as "ID", "IDREF",
"IDREFS", "ENTITY", "ENTITIES", "NMTOKEN"
or "NMTOKENS".true
if the attribute
is a Tokenized type; false
otherwise.public boolean isEnumeratedType()
true
if the attribute
is a Enumerated type.
From the XML Specifications -
[Definition: Enumerated attributes can take
one of a list of values provided in the
declaration].true
if the attribute
is a Enumerated type; false
otherwise.public short getTokenizedType()
public boolean isNotationType()
true
if the attribute is
of Notation type.true
if the attribute is a
Notation type; false
otherwise.public boolean isEnumeration()
true
if the attribute is
an Enumeration.true
if the attribute is
an Enumeration; false
otherwise.public java.util.Collection getEnumeratedValues()
public void setEnumeratedValues(java.util.Collection enumVals)
enumVals
- The enumerated values as a
Collection of String objects.public short getDefaultDeclType()
public void setDefaultDeclType(short defDeclType)
defDeclType
- The default declaration
type.public boolean hasDefaultValue()
true
if the attribute
has a fixed or default value.true
if the attribute
has a fixed or default value; false
otherwise.public java.lang.String getDefaultValue()
public void setDefaultValue(java.lang.String defValue)
defValue
- The default value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |