public class Attribute extends Object
Constructor and Description |
---|
Attribute(String eName,
String aName,
String type)
Creates a new instance of Attribute
|
Modifier and Type | Method and Description |
---|---|
String |
getDefaultValue()
Default value for attribute if declared; null otherwise
|
Location |
getLocation()
Returns location of the attribute declaration
|
String |
getMode()
Attribute mode (eg, #IMPLIED or #REQUIRED) or null if none declared
|
String |
getName()
Attribute name
|
String |
getParent()
Name of the attribute's parent element.
|
String |
getType()
Type of the attribute, which is essentially the content model (CDATA,
enumerated list, etc).
|
void |
setDefaultValue(String value)
Assign a default value to the attribute
|
void |
setLocation(Location l)
Sets location of the attribute declaration
|
void |
setMode(String m)
Sets the mode (such as #IMPLIED) of the attribute
|
String |
toString()
String value of the attribute will be xpath expression for reaching
the attribute--namely the element name plus the axis step to reach the
attribute.
|
public String getDefaultValue()
public Location getLocation()
public String getMode()
public String getName()
public String getParent()
public String getType()
public void setDefaultValue(String value)
value
- Default valuepublic void setLocation(Location l)
l
- Declaration locationpublic void setMode(String m)
m
- Attribute mode