com.jxml.quick.model.qdml
Class QDMBean

java.lang.Object
  |
  +--com.jxml.quick.model.qdml.QDMCloneable
        |
        +--com.jxml.quick.model.qdml.QDMCoin
              |
              +--com.jxml.quick.model.qdml.QDMBean
All Implemented Interfaces:
Cloneable, QDMElement

public class QDMBean
extends QDMCoin
implements QDMElement

Models a bean element in QDML. A bean element is used to describe elements.

DTD:

<!ELEMENT bean (rem*, extends?, implements*, attributes?, elements?)> 

<!ATTLIST bean
    label CDATA #IMPLIED
    tag CDATA #IMPLIED
    wild CDATA "False"
    type (MIXED|BIMODAL)#IMPLIED
    inline CDATA "False"
    generate CDATA "True"
    ID id #IMPLIED
>


Field Summary
 QDMAttributes attributes
          Models an attributes element, which is optional.
 QDMElements elements
          Models an elements element, which is optional.
 QDMExtends extendor
          Models an extends element, which is optional.
 QDMCoin extendsCoin
          The QDMAbstract or QDMBean object named by the extends element.
 ArrayList fieldList
          A container for QDMField objects, which model field elements.
 ArrayList implementsList
          A container for QDMImplements objects, which model implements elements.
 boolean inline
          Models the inline attribute on the bean element.
 ArrayList propertyList
          A container for QDMProperty objects, which model property elements.
 String tag
           Models the tag attribute on the bean element.
 String type
           Models the type attribute on the bean coin.
 boolean wild
           Models the wild attribute on the bean coin.
 
Fields inherited from class com.jxml.quick.model.qdml.QDMCoin
extensions, generate, implementations, label, remList
 
Constructor Summary
QDMBean()
           
 
Method Summary
 void buildMaps(Map coinMap, Map contentMap)
          Builds the maps.
 Object clone()
          Returns a deep copy of this object, but in an uninitialized form.
 Map getAtts()
          Returns a table of objects which model attribute item elements.
 String getLabel()
          Returns the unique (within the scope of the QDML document) name of the coin, as specified by the coin's label.
 String getTag()
          Returns the XML tag name assigned to the bean element.
 void init(Map coinMap, Map contentMap)
          Resolve references, inheritance.
 boolean isContainedBy(String label, TreeMap coinMap)
           
 
Methods inherited from class com.jxml.quick.model.qdml.QDMCoin
addDecendants, derivesFromOther, getConcreteDecendants
 
Methods inherited from class com.jxml.quick.model.qdml.QDMCloneable
clone, clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

public String tag

Models the tag attribute on the bean element. The tag attribute holds the XML tag name for the element being defined by the bean element.

When the label attribute is not present, the tag attribute is used to name the bean coin.


wild

public boolean wild

Models the wild attribute on the bean coin. The wild attribute defaults to false. When the wild attribute is true, the bean element can be used to represent an element with any tag name.

When the wild attribute is false, the tag attribute is required, but when the wild attribute is true, the tag attribute must not be present.

When the wild attribute is false, the label attribute is optional, but when the wild attribute is true, the label attribute is required.


type

public String type

Models the type attribute on the bean coin. The type attribute is optional.

The following values are allowed:

  • MIXED -- The element can contain both text and other elements.
  • BIMODAL -- Any given element can contain either text or other elements.
  • When the type attribute is not specified, the element being defined can contain only other elements.


    inline

    public boolean inline
    Models the inline attribute on the bean element. The inline attribute is optional, with a default value of false. When creating an XML document, the element is begun on a new line unless inline is set to true.

    extendor

    public QDMExtends extendor
    Models an extends element, which is optional. A bean coin can extend an abstract coin or another bean coin, which is named by the extends element.

    implementsList

    public ArrayList implementsList
    A container for QDMImplements objects, which model implements elements. The implements elements are optional and repeating. These implements elements name the interface coins which this bean coin "implements". (A bean element can impliment any number of interfaces.)

    attributes

    public QDMAttributes attributes
    Models an attributes element, which is optional. The attributes element defines the attributes associated with this coin, as well as various related variables and property methods on the Java class used to model those attributes.

    elements

    public QDMElements elements
    Models an elements element, which is optional. The elements element specifies the elements which can be contained by the element being defined.

    fieldList

    public ArrayList fieldList
    A container for QDMField objects, which model field elements. The field elements are optional and repeating. These field elements describe the variables of the Java class which this bean element describes.

    propertyList

    public ArrayList propertyList
    A container for QDMProperty objects, which model property elements. The property elements are optional and repeating. These property elements describe the bean property methods of the Java class which this bean element describes.

    extendsCoin

    public transient QDMCoin extendsCoin
    The QDMAbstract or QDMBean object named by the extends element. This variable is set when the data model is initialized.
    Constructor Detail

    QDMBean

    public QDMBean()
    Method Detail

    clone

    public Object clone()
    Description copied from class: QDMCoin
    Returns a deep copy of this object, but in an uninitialized form.
    Overrides:
    clone in class QDMCoin

    getLabel

    public String getLabel()
    Description copied from class: QDMCoin
    Returns the unique (within the scope of the QDML document) name of the coin, as specified by the coin's label.
    Overrides:
    getLabel in class QDMCoin

    getTag

    public String getTag()
    Returns the XML tag name assigned to the bean element. When wild is true, the value of the label attribute is returned.
    Specified by:
    getTag in interface QDMElement

    buildMaps

    public void buildMaps(Map coinMap,
                          Map contentMap)
                   throws SAXException
    Description copied from class: QDMCoin
    Builds the maps. This method is called during initialization of the data model.
    Overrides:
    buildMaps in class QDMCoin

    init

    public void init(Map coinMap,
                     Map contentMap)
              throws SAXException
    Description copied from class: QDMCoin
    Resolve references, inheritance. This method is called during initialization of the data model.
    Overrides:
    init in class QDMCoin

    getAtts

    public Map getAtts()
                throws SAXException
    Description copied from interface: QDMElement
    Returns a table of objects which model attribute item elements. Inherited attribute item elements are included.
    Specified by:
    getAtts in interface QDMElement

    isContainedBy

    public boolean isContainedBy(String label,
                                 TreeMap coinMap)