public class AttrProp extends Object implements BaseAttribute
| Modifier and Type | Field and Description |
|---|---|
static int |
CDATA |
static int |
ENTITIES |
static int |
ENTITY |
static int |
ENUM |
static int |
FIXED |
static int |
ID |
static int |
IDREF |
static int |
IDREFS |
static int |
IMPLIED |
static int |
MASK_KIND |
static int |
MASK_OPTION |
static int |
NMTOKEN |
static int |
NOTATION |
static int |
REQUIRED |
static int |
TRANSIENT |
OPTION_FIXED, OPTION_IMPLIED, OPTION_REQUIRED, TYPE_CDATA, TYPE_ENTITIES, TYPE_ENTITY, TYPE_ENUM, TYPE_ID, TYPE_IDREF, TYPE_IDREFS, TYPE_NMTOKEN, TYPE_NOTATION| Constructor and Description |
|---|
AttrProp() |
AttrProp(String propName) |
AttrProp(String propName,
String dtdName,
String name,
int type,
String[] values,
String defValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtraData(Object data) |
void |
addValue(String value) |
void |
addValue(String value,
String namespace) |
void |
checkEnum() |
String |
getDefaultValue()
Default value used when creating this attribute
|
String |
getDtdName()
Return the dtd name of the attribute, as it appears in the DTD file.
|
List |
getExtraData() |
int |
getInstance() |
String |
getJavaType() |
String |
getName()
Return the name of the attribute as it is used in the bean class.
|
String |
getNamespace() |
int |
getOption()
Returns one of the following constants:
OPTION_REQUIRED
OPTION_IMPLIED
OPTION_FIXED
|
String |
getPropertyName() |
int |
getType()
Returns one of the following constants:
TYPE_CDATA
TYPE_ENUM
TYPE_NMTOKEN
TYPE_ID
TYPE_IDREF
TYPE_IDREFS
TYPE_ENTITY
TYPE_ENTITIES
TYPE_NOTATION
|
String[] |
getValues()
If the attribute is Enum, returns the list of possible values
|
boolean |
hasName(String name)
Return true if the name is either equals to getName() or getDtdName()
|
boolean |
isComplete() |
boolean |
isEnum()
True if the attribute is Enum
|
boolean |
isFixed()
True if the attribute has a fixed value
|
boolean |
isTransient()
In general the attributes are defined in the DTD file,
like the properties, and are therefore part of the bean structure,
because part of the generated beans.
|
void |
setDefaultValue(String d) |
void |
setEnum(boolean enume) |
void |
setJavaType(String jt) |
void |
setName(String n) |
String |
toString() |
String |
typeAsString() |
void |
validate() |
public static final int MASK_KIND
public static final int CDATA
public static final int ENUM
public static final int NMTOKEN
public static final int ID
public static final int IDREF
public static final int IDREFS
public static final int ENTITY
public static final int ENTITIES
public static final int NOTATION
public static final int MASK_OPTION
public static final int REQUIRED
public static final int IMPLIED
public static final int FIXED
public static final int TRANSIENT
public AttrProp()
public AttrProp(String propName)
public int getInstance()
public void setEnum(boolean enume)
public void addValue(String value)
public boolean isTransient()
BaseAttributeisTransient in interface BaseAttributepublic boolean isComplete()
public boolean hasName(String name)
BaseAttributehasName in interface BaseAttributepublic String[] getValues()
BaseAttributegetValues in interface BaseAttributepublic void setDefaultValue(String d)
public String getDefaultValue()
BaseAttributegetDefaultValue in interface BaseAttributepublic String getPropertyName()
public String getName()
BaseAttributegetName in interface BaseAttributepublic void setName(String n)
public String getDtdName()
BaseAttributegetDtdName in interface BaseAttributepublic String getNamespace()
public String typeAsString()
public void validate()
public void checkEnum()
public boolean isEnum()
BaseAttributeisEnum in interface BaseAttributepublic boolean isFixed()
BaseAttributeisFixed in interface BaseAttributepublic int getType()
BaseAttributegetType in interface BaseAttributepublic int getOption()
BaseAttributegetOption in interface BaseAttributepublic String getJavaType()
public void setJavaType(String jt)
public void addExtraData(Object data)
public List getExtraData()
Copyright © 2017. All Rights Reserved.