home *** CD-ROM | disk | FTP | other *** search
- package BsscXML;
-
- public class BsscXMLDocument implements IBsscXMLDocumentBuilder, IBsscXMLDocumentReader {
- BsscXMLElement m_root = null;
- BsscXMLConsumerChain m_ConsumerChain = null;
-
- public void setRoot(IBsscXMLElementBuilder var1) throws BsscXMLException {
- if (this.m_root == null) {
- if (var1 instanceof BsscXMLElement) {
- this.m_root = (BsscXMLElement)var1;
- } else {
- throw new BsscXMLException("Type Mismatch!");
- }
- } else {
- throw new BsscXMLException("Only one Root element is allowed!");
- }
- }
-
- public IBsscXMLElementReader getRoot() {
- return this.m_root;
- }
-
- public void setReady(boolean var1) {
- if (this.m_ConsumerChain != null) {
- this.m_ConsumerChain.consume(this.m_root);
- }
-
- }
-
- public void removeConsumer(IBsscXMLConsumer var1) {
- if (this.m_ConsumerChain != null) {
- this.m_ConsumerChain.remove(var1);
- }
-
- }
-
- public void addConsumer(IBsscXMLConsumer var1) {
- if (this.m_ConsumerChain == null) {
- this.m_ConsumerChain = new BsscXMLConsumerChain();
- }
-
- this.m_ConsumerChain.add(var1);
- }
- }
-