xdoclet.sdk.xgg.binding
Class Attribute

java.lang.Object
  |
  +--xdoclet.sdk.xgg.binding.Binding
        |
        +--xdoclet.sdk.xgg.binding.Attribute
All Implemented Interfaces:
Child

public class Attribute
extends Binding
implements Child

Holder object for a XML attribute

Version:
$Revision: 1.7 $
Author:
Aslak Hellesøy, Laurent Etiemble

Constructor Summary
Attribute(String xmlName, Element container)
          Constructor for an Attribute object
 
Method Summary
 boolean equals(Object o)
           
 Cardinality getCardinality()
          Gets the cardinality related to the associated attribute
 Element getContainer()
          Gets the container element
 String getId()
          Returns an id based on the class name and the xml name.
 String getJavaName()
          Gets the Java name of the child
 String getJavaType()
          Gets the Java type of the child
 boolean isAttribute()
          Returns whether or not this sub element is an attribute
 boolean isMany()
          Returns whether or not this sub element has a many cardinality
 String toString()
          Implementation of the toString method
 
Methods inherited from class xdoclet.sdk.xgg.binding.Binding
getRegexp, getVersion, getXmlName, setRegexp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface xdoclet.sdk.xgg.binding.Child
getVersion, getXmlName
 

Constructor Detail

Attribute

public Attribute(String xmlName,
                 Element container)
Constructor for an Attribute object

Parameters:
xmlName - XML name of the attribute
container - Element whose has this attribute
Method Detail

getCardinality

public Cardinality getCardinality()
Gets the cardinality related to the associated attribute

Specified by:
getCardinality in interface Child
Returns:
The cardinality holder

getContainer

public Element getContainer()
Gets the container element

Specified by:
getContainer in interface Child
Returns:
The container element

getJavaName

public String getJavaName()
Gets the Java name of the child

Specified by:
getJavaName in interface Child
Overrides:
getJavaName in class Binding
Returns:
The Java name

getJavaType

public String getJavaType()
Gets the Java type of the child

Specified by:
getJavaType in interface Child
Specified by:
getJavaType in class Binding
Returns:
The Java type

isAttribute

public boolean isAttribute()
Returns whether or not this sub element is an attribute

Specified by:
isAttribute in interface Child
Returns:
True if it is an attribute

isMany

public boolean isMany()
Returns whether or not this sub element has a many cardinality

Specified by:
isMany in interface Child
Returns:
True if it has a many cardinality

getId

public String getId()
Description copied from interface: Child
Returns an id based on the class name and the xml name. Used to distinguish SubElement and Attribute with same xml name.

Specified by:
getId in interface Child
Returns:

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Implementation of the toString method

Overrides:
toString in class Object
Returns:
String representation


Copyright © 2000-2003 XDoclet Team. All Rights Reserved.