|
Matra DTD Parser 0.8b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.conradroche.matra.decl.Attribute
Class to hold an Attribute declaration.
Field Summary | |
static String |
CDATA
Constant string denoting the token "CDATA". |
static String |
NOTATION
Constant string denoting the token "NOTATION". |
static String |
OPTIONALITY_STR_FIXED
Constant indicating that the attribute is a fixed-value attribute. |
static String |
OPTIONALITY_STR_IMPLIED
Constant indicating that the attribute is an optional attribute. |
static String |
OPTIONALITY_STR_REQUIRED
Constant indicating that the attribute is a mandatory attribute. |
static int |
TYPE_ENUMERATION
Value of getAttType() if the Attribute defined is an Enumeration. |
static int |
TYPE_NOTATION
Value of getAttType() if the Attribute defined is of Notation Type. |
Constructor Summary | |
Attribute()
Attribute constructor. |
|
Attribute(String elementName,
String attrName,
int attributeType,
String dataType,
String defaultDecl)
Attribute constructor. |
|
Attribute(String elementName,
String attrName,
String[] enums,
String defaultDecl)
Attribute Constructor for attributes of type Enumeration. |
Method Summary | |
String |
getAttributeName()
Get the name of the attribute. |
int |
getAttType()
Return the type of the Attribute. |
String |
getDataType()
Get the data type of the Attribute. |
String |
getDefaultValue()
Get the Default declaration of the Attribute. |
String[] |
getEnumeratedValues()
If the Attribute is of Enumerated type, get the list of permitted values. |
String |
getFixedValue()
Returns the fixed value for the attribute. |
int |
getOptionality()
Get the optionality of the attribute. |
String |
getOptionalityString()
Get the optionality of the attribute. |
boolean |
isEnumeration()
Checks if the attribute is of type enumeration. |
boolean |
isIDType()
Returns true if this attribute is of type ID. |
boolean |
isNotationType()
Check if the Attribute is of NOTATION type. |
boolean |
isStringType()
Check if the Attribute is of STRING type (i.e. |
void |
readNextAttribute(DTDData AttDef)
Read the attribute details from the given data. |
void |
setAttributeName(String newName)
Set the name of the attribute. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TYPE_NOTATION
public static final int TYPE_ENUMERATION
public static final String OPTIONALITY_STR_REQUIRED
public static final String OPTIONALITY_STR_IMPLIED
public static final String OPTIONALITY_STR_FIXED
public static final String NOTATION
public static final String CDATA
Constructor Detail |
public Attribute()
public Attribute(String elementName, String attrName, String[] enums, String defaultDecl)
elementName
- The Element name.attrName
- The name of the attribute.enums
- The enumeration for the attribute.defaultDecl
- The default declaration for the attribute.public Attribute(String elementName, String attrName, int attributeType, String dataType, String defaultDecl)
elementName
- The Element name.attrName
- The name of the attribute.attributeType
- The type of the attribute.dataType
- The data type of the attribute.defaultDecl
- The default declaration for the attribute.Method Detail |
public int getAttType()
public String getDataType()
#setDataType
public String getDefaultValue()
#setDefaultValue
public String getFixedValue()
public String[] getEnumeratedValues()
public String getAttributeName()
setAttributeName(java.lang.String)
public int getOptionality()
#setOptionality
public String getOptionalityString()
public boolean isNotationType()
true
if the attribute is a Notation type.
false
if the attribute is not.public boolean isStringType()
true
if the attribute is string type;
false
otherwise.public boolean isEnumeration()
true
the attribute is of type
enumeration; false
otherwise.public void readNextAttribute(DTDData AttDef) throws DTDSyntaxException
AttDef
- The attribute definition to parse.DTDSyntaxException
- If it encounters a
syntax exception.public boolean isIDType()
true
if the attribute is of
type ID; false
otherwise.public void setAttributeName(String newName)
newName
- java.lang.StringgetAttributeName()
|
Matra DTD Parser 0.8b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |