com.jxml.quick.model.qdml
Class QDMQDML

java.lang.Object
  |
  +--com.jxml.quick.model.qdml.QDMCloneable
        |
        +--com.jxml.quick.model.qdml.QDMQDML
All Implemented Interfaces:
Cloneable

public class QDMQDML
extends QDMCloneable

A model for the qdml element, which is the root element of the QDML binding schema. Every QDML document contains exactly one qdml element, which is the top-level (or outer-most) element of the document.

DTD:

<!ELEMENT qdml (include*, excludes*, (interface|abstract|text|bean|link)*)>
<!ATTLIST qdml
root CDATA #REQUIRED
SYSTEM CDATA #IMPLIED
PUBLIC CDATA #IMPLIED
ID id #IMPLIED
>


Field Summary
 TreeMap coinMap
           A table of all the coins in the document, along with the coins of all included documents.
 ArrayList coins
           A container for the objects which model the coins elements, which are optional and repeating.
 TreeMap contentMap
           A table of all the contentModels.
 ArrayList excludeses
           A container for the objects which model excludes elements, which are optional and repeating.
 ArrayList includes
           A container for the Strings which model include elements, which are optional and repeating.
 String PUBLIC
           Models the attribute PUBLIC, an optional attribute on the qdml element.
 String root
           Models the attribute root, a required attribute on the qdml element.
 String SYSTEM
           Models the attribute SYSTEM, an optional attribute on the qdml element.
 
Constructor Summary
QDMQDML()
           
 
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.
 void init()
           Initializes the data model.
 
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

root

public String root

Models the attribute root, a required attribute on the qdml element. The root attribute must uniquely name the coin which specifies the top-level element (or elements) of the document type being defined by this QDML document.

Note that any coin which implements or extends the coin named by root can be used as a root element.


SYSTEM

public String SYSTEM

Models the attribute SYSTEM, an optional attribute on the qdml element. The SYSTEM attribute is a fully qualified URL, typically the URL of the DTD for the type of document which this QDML document implements.


PUBLIC

public String PUBLIC

Models the attribute PUBLIC, an optional attribute on the qdml element. The PUBLIC attribute is a URI naming the document type being defined.


includes

public ArrayList includes

A container for the Strings which model include elements, which are optional and repeating. During initialization of the model, the coins found in the QDML documents named by these Strings are included in the effective content of this QDML document. When coins with the same (otherwise) unique label or tag are found in more than one document, the last coin included is used. And when an included coin has the same name as a coin in this document, the coin in this document is chosen.

Inclusion is a recursive process, allowing for indirect inclusion to any depth.


excludeses

public ArrayList excludeses

A container for the objects which model excludes elements, which are optional and repeating. During initialization of the model, any coins that have been included which are named by an excludes element are dropped.

The coins in a QDML document are not effected by the excludes elements in that, or any included, document.


coins

public ArrayList coins

A container for the objects which model the coins elements, which are optional and repeating. (Coin elements are interface, abstract, text, bean, and link.)

This container is uneffected by the initialization process--it contains only coins defined in the current document.


coinMap

public transient TreeMap coinMap

A table of all the coins in the document, along with the coins of all included documents. Entries are ordered/keyed by each coin's unique label or tag name. This table is populated when the data model is initialized.


contentMap

public transient TreeMap contentMap

A table of all the contentModels. Entries are ordered/keyed by each contentModel's unique label. (ContentModel elements are item, sequence, and selection.) This table is populated when the data model is initialized.

Constructor Detail

QDMQDML

public QDMQDML()
Method Detail

clone

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

init

public void init()
          throws SAXException,
                 IOException

Initializes the data model. The init method on the QDMQDML object must be called explicitly by the application which uses this data model. The init and buildMaps on the subordinate objects are called in turn.

This is a thread-safe method, allowing multiple applications to share the same data model. This is also a recursive method, calling init on all included QDML documents in turn.


buildMaps

public void buildMaps(Map coinMap,
                      Map contentMap)
               throws SAXException

Builds the maps. This method is called during initialization of the data model.