net.sf.vex.dom
Class AttributeDefinition

java.lang.Object
  |
  +--net.sf.vex.dom.AttributeDefinition
All Implemented Interfaces:
java.lang.Comparable

public class AttributeDefinition
extends java.lang.Object
implements java.lang.Comparable

AttributeDefinition represents an attribute definition in a DTD.


Nested Class Summary
static class AttributeDefinition.Type
          Enumeration of attribute types.
 
Constructor Summary
AttributeDefinition(java.lang.String name, AttributeDefinition.Type type, java.lang.String defaultValue, java.lang.String[] values, boolean required, boolean fixed)
          Class constructor.
 
Method Summary
 int compareTo(java.lang.Object other)
          Implements Comparable.compareTo to sort alphabetically by name.
 java.lang.String getDefaultValue()
          Returns the default value of the attribute.
 java.lang.String getName()
          Returns the name of the attribute.
 AttributeDefinition.Type getType()
          Returns the attribute's type.
 java.lang.String[] getValues()
          Returns an array of acceptable values for the attribute.
 boolean isFixed()
          Returns true if the attribute value is fixed.
 boolean isRequired()
          Returns true if the attribute is required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeDefinition

public AttributeDefinition(java.lang.String name,
                           AttributeDefinition.Type type,
                           java.lang.String defaultValue,
                           java.lang.String[] values,
                           boolean required,
                           boolean fixed)
Class constructor.

Method Detail

compareTo

public int compareTo(java.lang.Object other)
Implements Comparable.compareTo to sort alphabetically by name.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
other - The attribute to which this one is to be compared.

getType

public AttributeDefinition.Type getType()
Returns the attribute's type.


getDefaultValue

public java.lang.String getDefaultValue()
Returns the default value of the attribute.


isFixed

public boolean isFixed()
Returns true if the attribute value is fixed.


getName

public java.lang.String getName()
Returns the name of the attribute.


isRequired

public boolean isRequired()
Returns true if the attribute is required.


getValues

public java.lang.String[] getValues()
Returns an array of acceptable values for the attribute. If null is returned, any value is acceptable for the attribute.