com.jxml.quick.model.qjml
Class QMAbstract

java.lang.Object
  |
  +--com.jxml.quick.model.qjml.QMCloneable
        |
        +--com.jxml.quick.model.qjml.QMCoin
              |
              +--com.jxml.quick.model.qjml.QMAbstract
All Implemented Interfaces:
Cloneable, QMData, QMElement

public class QMAbstract
extends QMCoin
implements QMElement, QMData

Models an abstract element in QJML. An abstract element has no tag attribute, since it doesn't define a particular XML element. (Similarly, an abstract Java class can't be instantiated.) Abstract coins provide a means of refering to the family of beans which implement them. Abstract coins also provide for inheritance of attributes, enums, and ranges by the coins which extend them.

DTD:

<!ELEMENT abstract (rem*, extends?, implements*, targetClass?,
    attributes, field*, property*, (enum|range)*)>

<!ATTLIST abstract 
    label CDATA #REQUIRED
    generate CDATA "True"
    validInherited CDATA "True"
    ID id #IMPLIED
>


Field Summary
 QMAttributes attributes
          Models an attributes element, which is optional.
 QMExtends extendor
          Models an extends element, which is optional.
 QMCoin extendsCoin
          The QMAbstract, QMText, or QMBean object named by the extends element.
 ArrayList fieldList
          A container for QMField objects, which model field elements.
 ArrayList implementsList
          A container for QMImplements objects, which model implements elements.
 ArrayList propertyList
          A container for QMProperty objects, which model property elements.
 QMTargetClass targetClass
          Models a targetClass element, which is optional.
 boolean validInherited
          Models the validInherited attribute on an abstract element.
 ArrayList validList
           A container for QMEnum and QMRange objects, which model enum and range elements.
 ArrayList valids
          A container for QMEnum and QMRange objects for this element, including enum and range elements defined on abstract and text coins which this abstract coin extends.
 
Fields inherited from class com.jxml.quick.model.qjml.QMCoin
accessors, extensions, generate, implementations, label, remList
 
Constructor Summary
QMAbstract()
           
 
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.
 QMAccess getAccessor(Map coinMap, String name)
           Returns the object which models the named field or property element.
 Map getAtts()
          Returns a table of objects which model attribute item elements.
 String getClassName()
          Returns the fully qualified name of the class described by this coin.
 ArrayList getValidList()
          Returns a list of objects which model valid elements.
 void init(Map coinMap, Map contentMap)
          Resolve references, inheritance.
 
Methods inherited from class com.jxml.quick.model.qjml.QMCoin
getLabel
 
Methods inherited from class com.jxml.quick.model.qjml.QMCloneable
clone, clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

validInherited

public boolean validInherited
Models the validInherited attribute on an abstract element. When false, enums and ranges are not inherited from the coin that this abstract coin extends.

extendor

public QMExtends extendor
Models an extends element, which is optional. An abstract coin can extend a bean coin, a text coin, or another abstract coin, which is named by the extends element.

implementsList

public ArrayList implementsList
A container for QMImplements objects, which model implements elements. The implements elements are optional and repeating. These implements elements name the interface coins which this abstract coin "implements". (An abstract element, like an abstract Java class, can impliment any number of interfaces.)

targetClass

public QMTargetClass targetClass
Models a targetClass element, which is optional. The targetClass element names the abstract Java class which this abstract element describes.

attributes

public QMAttributes 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 abstract Java class used to model those attributes.

fieldList

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

propertyList

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

validList

public ArrayList validList

A container for QMEnum and QMRange objects, which model enum and range elements. The enum and range elements are optional and repeating. These valid elements are used to describe some of the acceptable text content of text coins which extend this abstract coin.

The enum and range elements may not be present when the targetClass is present in the same abstract element.


extendsCoin

public transient QMCoin extendsCoin
The QMAbstract, QMText, or QMBean object named by the extends element. This variable is set when the data model is initialized.

valids

public transient ArrayList valids
A container for QMEnum and QMRange objects for this element, including enum and range elements defined on abstract and text coins which this abstract coin extends. This list is populated when the data model is initialized.
Constructor Detail

QMAbstract

public QMAbstract()
Method Detail

clone

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

buildMaps

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

getAccessor

public QMAccess getAccessor(Map coinMap,
                            String name)
                     throws SAXException
Description copied from class: QMCoin

Returns the object which models the named field or property element. This can be a field or property found within the content of the coin element being modeled, or one found within the content of a coin which this coin extends.

The keys include both the field or property name and a prefix, as follows:

Overrides:
getAccessor in class QMCoin

init

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

getAtts

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

getValidList

public ArrayList getValidList()
                       throws SAXException
Description copied from interface: QMData
Returns a list of objects which model valid elements. This list includes inherited valid elements.
Specified by:
getValidList in interface QMData

getClassName

public String getClassName()
                    throws SAXException
Description copied from class: QMCoin
Returns the fully qualified name of the class described by this coin.
Overrides:
getClassName in class QMCoin