KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > util > dom > SimpleXMLObjectImpl


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Developer of the Enhydra Application Server is Together Austria.
15  * All Rights Reserved.
16  *
17  */

18 package org.enhydra.util.dom;
19
20 import org.enhydra.xml.dom.DOMOps;
21 import org.enhydra.xml.io.DOMFormatter;
22 import org.enhydra.xml.io.DocumentInfo;
23 import org.enhydra.xml.xmlc.XMLCError;
24 import org.enhydra.xml.xmlc.XMLCUtil;
25 import org.enhydra.xml.xmlc.XMLObject;
26 import org.enhydra.xml.xmlc.XMLObjectLink;
27 import org.enhydra.xml.xmlc.dom.XMLCDomFactory;
28 import org.w3c.dom.Attr JavaDoc;
29 import org.w3c.dom.CDATASection JavaDoc;
30 import org.w3c.dom.Comment JavaDoc;
31 import org.w3c.dom.DOMConfiguration JavaDoc;
32 import org.w3c.dom.DOMException JavaDoc;
33 import org.w3c.dom.DOMImplementation JavaDoc;
34 import org.w3c.dom.Document JavaDoc;
35 import org.w3c.dom.DocumentFragment JavaDoc;
36 import org.w3c.dom.DocumentType JavaDoc;
37 import org.w3c.dom.Element JavaDoc;
38 import org.w3c.dom.EntityReference JavaDoc;
39 import org.w3c.dom.NamedNodeMap JavaDoc;
40 import org.w3c.dom.Node JavaDoc;
41 import org.w3c.dom.NodeList JavaDoc;
42 import org.w3c.dom.ProcessingInstruction JavaDoc;
43 import org.w3c.dom.Text JavaDoc;
44 import org.w3c.dom.UserDataHandler JavaDoc;
45
46 /**
47  * <p>Title: SimpleXMLObjectImpl</p>
48  * <p>Description: This class represents implementation of XMLObject interface.
49  * Its main purpose is to provide the way for creation of XMLObject object by
50  * passed org.w3c.dom.Document object implementation. The XMLCObject created by
51  * this manner can be used in already existing writeDOM() method of
52  * ServletHttpPresentationResponse object to perform http response. So, this
53  * class (or extemnsion of this class) may be used as suitable way to process
54  * the http response by using different org.w3c.dom.Document object
55  * implementations (for example Jivan implementation) via already existing
56  * XMLC writeDOM() methods. Note that this class was tested only in in http
57  * response, not in DOM manipulation, and some methods throw an exception
58  * because they are not implemented.</p>
59  * <p>Copyright: Copyright (c) 2004</p>
60  * <p>Company: Together</p>
61  * @author Vladimir Radisic
62  * @version 1.0
63  */

64 public class SimpleXMLObjectImpl implements XMLObject {
65
66   /**
67    * Default XML formatting object for use by toDocument(). Initialized
68    * on first use and shared
69    */

70   private static DOMFormatter fFormatter = null;
71
72   /**
73    * The document the object is associated with.
74    */

75   private Document JavaDoc fDocument;
76
77   /**
78    * The MIME type associated with the document.
79    */

80   private String JavaDoc fMIMEType;
81
82   /**
83    * The encoding associated with the document.
84    */

85   private String JavaDoc encoding;
86
87   /**
88    * The delegate object.
89    */

90   private XMLObject fDelegate;
91
92   /**
93    * Constructor. The setDocument() method must be called to
94    * associate a document with this object.
95    */

96   public SimpleXMLObjectImpl() {
97   }
98
99   /**
100    * Method is not implemented yet.
101    * @param parm1
102    * @return
103    */

104   public Node JavaDoc cloneNode(boolean parm1) {
105     /**@todo Implement this org.w3c.dom.Node abstract method*/
106     throw new java.lang.UnsupportedOperationException JavaDoc("Method cloneNode() not yet implemented.");
107   }
108
109   /**
110    * Method is not implemented yet.
111    * @param node
112    */

113   protected void syncWithDocument(Node JavaDoc node) {
114         /**@todo Implement this org.enhydra.xml.xmlc.XMLObjectImpl abstract method*/
115   }
116
117   /**
118    * Method is not implemented yet.
119    */

120   public void buildDocument() {
121     /**@todo Implement this org.enhydra.xml.xmlc.XMLObject abstract method*/
122     throw new java.lang.UnsupportedOperationException JavaDoc("Method buildDocument() not yet implemented.");
123   }
124
125   /**
126    * Method is not implemented yet.
127    * @return
128    */

129   protected XMLCDomFactory getDomFactory() {
130         /**@todo Implement this org.enhydra.xml.xmlc.XMLObjectImpl abstract method*/
131     throw new java.lang.UnsupportedOperationException JavaDoc("Method getDomFactory() not yet implemented.");
132   }
133
134
135   /**
136    * Set the DOM document associated with this object and optional encoding.
137    * @param document org.w3c.dom.Document implementation which should be
138    * associated with this object
139    * @param mimeType The MIME type associated with the document.
140    * @param encoding The encoding associated with the document.
141    */

142   public void setDocument(Document JavaDoc document, String JavaDoc mimeType, String JavaDoc encoding) {
143     fDocument = document;
144     fMIMEType = mimeType;
145     this.encoding = encoding;
146
147     // Link Document back to this object if it supports XMLObjectLink
148
if (document instanceof XMLObjectLink) {
149       ( (XMLObjectLink) document).setXMLObject(this);
150     }
151   }
152
153   /**
154    * @see XMLObject#getDocument
155    */

156   public Document JavaDoc getDocument() {
157     if (fDelegate != null) {
158       return fDelegate.getDocument();
159     }
160     else {
161       return fDocument;
162     }
163   }
164
165   /**
166    * @see XMLObject#getMIMEType
167    */

168   public String JavaDoc getMIMEType() {
169     if (fDelegate != null) {
170       return fDelegate.getMIMEType();
171     }
172     else {
173       return fMIMEType;
174     }
175   }
176
177   /**
178    * @see XMLObject#setDelegate
179    */

180   public void setDelegate(XMLObject delegate) {
181     fDelegate = delegate;
182   }
183
184   /**
185    * @see XMLObject#getDelegate
186    */

187   public XMLObject getDelegate() {
188     return fDelegate;
189   }
190
191   /**
192    * Check that cloneNode on an entire document is done with the
193    * deep option.
194    */

195   protected void cloneDeepCheck(boolean deep) {
196     if (!deep) {
197       throw new XMLCError("Must use deep clone when cloning entire document");
198     }
199   }
200
201   /**
202    * @see org.w3c.dom.Document#getDoctype
203    */

204   public DocumentType JavaDoc getDoctype() {
205     if (fDelegate != null) {
206       return fDelegate.getDoctype();
207     }
208     else {
209       return fDocument.getDoctype();
210     }
211   }
212
213   /**
214    * @see org.w3c.dom.Document#getImplementation
215    */

216   public DOMImplementation JavaDoc getImplementation() {
217     if (fDelegate != null) {
218       return fDelegate.getImplementation();
219     }
220     else {
221       return fDocument.getImplementation();
222     }
223   }
224
225   /**
226    * @see org.w3c.dom.Document#getDocumentElement
227    */

228   public Element JavaDoc getDocumentElement() {
229     if (fDelegate != null) {
230       return fDelegate.getDocumentElement();
231     }
232     else {
233       return fDocument.getDocumentElement();
234     }
235   }
236
237   /**
238    * @see org.w3c.dom.Document#importNode
239    */

240   public Node JavaDoc importNode(Node JavaDoc importedNode, boolean deep) throws DOMException JavaDoc {
241     if (fDelegate != null) {
242       return fDelegate.importNode(importedNode, deep);
243     }
244     else {
245       return fDocument.importNode(importedNode, deep);
246     }
247   }
248
249   /**
250    * @see org.w3c.dom.Document#createElement
251    */

252   public Element JavaDoc createElement(String JavaDoc tagName) throws DOMException JavaDoc {
253     if (fDelegate != null) {
254       return fDelegate.createElement(tagName);
255     }
256     else {
257       return fDocument.createElement(tagName);
258     }
259   }
260
261   /**
262    * @see org.w3c.dom.Document#createElementNS
263    */

264   public Element JavaDoc createElementNS(String JavaDoc namespaceURI, String JavaDoc qualifiedName) throws DOMException JavaDoc {
265     if (fDelegate != null) {
266       return fDelegate.createElementNS(namespaceURI, qualifiedName);
267     }
268     else {
269       return fDocument.createElementNS(namespaceURI, qualifiedName);
270     }
271   }
272
273   /**
274    * @see org.w3c.dom.Document#createDocumentFragment
275    */

276   public DocumentFragment JavaDoc createDocumentFragment() {
277     if (fDelegate != null) {
278       return fDelegate.createDocumentFragment();
279     }
280     else {
281       return fDocument.createDocumentFragment();
282     }
283   }
284
285   /**
286    * @see org.w3c.dom.Document#createTextNode
287    */

288   public Text JavaDoc createTextNode(String JavaDoc data) {
289     if (fDelegate != null) {
290       return fDelegate.createTextNode(data);
291     }
292     else {
293       return fDocument.createTextNode(data);
294     }
295   }
296
297   /**
298    * @see org.w3c.dom.Document#createComment
299    */

300   public Comment JavaDoc createComment(String JavaDoc data) {
301     if (fDelegate != null) {
302       return fDelegate.createComment(data);
303     }
304     else {
305       return fDocument.createComment(data);
306     }
307   }
308
309   /**
310    * @see org.w3c.dom.Document#createCDATASection
311    */

312   public CDATASection JavaDoc createCDATASection(String JavaDoc data) throws DOMException JavaDoc {
313     if (fDelegate != null) {
314       return fDelegate.createCDATASection(data);
315     }
316     else {
317       return fDocument.createCDATASection(data);
318     }
319   }
320
321   /**
322    * @see org.w3c.dom.Document#createProcessingInstruction
323    */

324   public ProcessingInstruction JavaDoc createProcessingInstruction(String JavaDoc target, String JavaDoc data) throws DOMException JavaDoc {
325     if (fDelegate != null) {
326       return fDelegate.createProcessingInstruction(target, data);
327     }
328     else {
329       return fDocument.createProcessingInstruction(target, data);
330     }
331   }
332
333   /**
334    * @see org.w3c.dom.Document#createAttribute
335    */

336   public Attr JavaDoc createAttribute(String JavaDoc qualifiedName) throws DOMException JavaDoc {
337     if (fDelegate != null) {
338       return fDelegate.createAttribute(qualifiedName);
339     }
340     else {
341       return fDocument.createAttribute(qualifiedName);
342     }
343   }
344
345   /**
346    * @see org.w3c.dom.Document#createAttributeNS
347    */

348   public Attr JavaDoc createAttributeNS(String JavaDoc namespaceURI, String JavaDoc qualifiedName) throws DOMException JavaDoc {
349     if (fDelegate != null) {
350       return fDelegate.createAttributeNS(namespaceURI, qualifiedName);
351     }
352     else {
353       return fDocument.createAttributeNS(namespaceURI, qualifiedName);
354     }
355   }
356
357   /**
358    * @see org.w3c.dom.Document#createEntityReference
359    */

360   public EntityReference JavaDoc createEntityReference(String JavaDoc name) throws DOMException JavaDoc {
361     if (fDelegate != null) {
362       return fDelegate.createEntityReference(name);
363     }
364     else {
365       return fDocument.createEntityReference(name);
366     }
367   }
368
369   /**
370    * @see org.w3c.dom.Document#getElementsByTagName
371    */

372   public NodeList JavaDoc getElementsByTagName(String JavaDoc tagname) {
373     if (fDelegate != null) {
374       return fDelegate.getElementsByTagName(tagname);
375     }
376     else {
377       return fDocument.getElementsByTagName(tagname);
378     }
379   }
380
381   /**
382    * @see org.w3c.dom.Document#getElementsByTagNameNS
383    */

384   public NodeList JavaDoc getElementsByTagNameNS(String JavaDoc namespaceURI, String JavaDoc localName) {
385     if (fDelegate != null) {
386       return fDelegate.getElementsByTagNameNS(namespaceURI, localName);
387     }
388     else {
389       return fDocument.getElementsByTagNameNS(namespaceURI, localName);
390     }
391   }
392
393   /**
394    * @see org.w3c.dom.Document#getElementById
395    */

396   public Element JavaDoc getElementById(String JavaDoc elementId) {
397     if (fDelegate != null) {
398       return fDelegate.getElementById(elementId);
399     }
400     else {
401       return fDocument.getElementById(elementId);
402     }
403   }
404
405   /**
406    * See org.w3c.dom.Document#getEncoding
407    */

408   public String JavaDoc getEncoding() {
409     if (fDelegate != null) {
410       return fDelegate.getEncoding();
411     }
412     else {
413       return this.encoding;
414     }
415   }
416
417   /**
418    * See org.w3c.dom.Document#setEncoding
419    */

420   public void setEncoding(String JavaDoc encoding) {
421     if (fDelegate != null) {
422       fDelegate.setEncoding(encoding);
423     }
424     else {
425       DOMOps.setEncoding(fDocument, encoding);
426     }
427   }
428
429   /**
430    * See org.w3c.dom.Document#getStandalone
431    */

432   public boolean getStandalone() {
433     if (fDelegate != null) {
434       return fDelegate.getStandalone();
435     }
436     else {
437       return DOMOps.getStandalone(fDocument);
438     }
439   }
440
441   /**
442    * See org.w3c.dom.Document#setStandalone
443    */

444   public void setStandalone(boolean standalone) {
445     if (fDelegate != null) {
446       fDelegate.setStandalone(standalone);
447     }
448     else {
449       DOMOps.setStandalone(fDocument, standalone);
450     }
451   }
452
453   /**
454    * See org.w3c.dom.Document#getStrictErrorChecking
455    */

456   public boolean getStrictErrorChecking() {
457     if (fDelegate != null) {
458       return fDelegate.getStrictErrorChecking();
459     }
460     else {
461       return DOMOps.getStrictErrorChecking(fDocument);
462     }
463   }
464
465   /**
466    * See org.w3c.dom.Document#setStrictErrorChecking
467    */

468   public void setStrictErrorChecking(boolean strictErrorChecking) {
469     if (fDelegate != null) {
470       fDelegate.setStrictErrorChecking(strictErrorChecking);
471     }
472     else {
473       DOMOps.setStrictErrorChecking(fDocument, strictErrorChecking);
474     }
475   }
476
477   /**
478    * See org.w3c.dom.Document#getVersion()
479    */

480   public String JavaDoc getVersion() {
481     if (fDelegate != null) {
482       return fDelegate.getVersion();
483     }
484     else {
485       return DOMOps.getVersion(fDocument);
486     }
487   }
488
489   /**
490    * See org.w3c.dom.Document#setVersion
491    */

492   public void setVersion(String JavaDoc version) {
493     if (fDelegate != null) {
494       fDelegate.setVersion(version);
495     }
496     else {
497       DOMOps.setVersion(fDocument, version);
498     }
499   }
500
501   /**
502    * See org.w3c.dom.Document#adoptNode
503    */

504   public Node JavaDoc adoptNode(Node JavaDoc source) throws DOMException JavaDoc {
505     if (fDelegate != null) {
506       return fDelegate.adoptNode(source);
507     }
508     else {
509       return DOMOps.adoptNode(fDocument, source);
510     }
511   }
512
513   /**
514    * @see org.w3c.dom.Node#getNodeName()
515    */

516   public String JavaDoc getNodeName() {
517     if (fDelegate != null) {
518       return fDelegate.getNodeName();
519     }
520     else {
521       return fDocument.getNodeName();
522     }
523   }
524
525   /**
526    * @see org.w3c.dom.Node#getNodeValue()
527    */

528   public String JavaDoc getNodeValue() throws DOMException JavaDoc {
529     if (fDelegate != null) {
530       return fDelegate.getNodeValue();
531     }
532     else {
533       return fDocument.getNodeValue();
534     }
535   }
536
537   /**
538    * @see org.w3c.dom.Node#setNodeValue
539    */

540   public void setNodeValue(String JavaDoc nodeValue) throws DOMException JavaDoc {
541     if (fDelegate != null) {
542       fDelegate.setNodeValue(nodeValue);
543     }
544     else {
545       fDocument.setNodeValue(nodeValue);
546     }
547   }
548
549   /**
550    * @see org.w3c.dom.Node#getNodeType
551    */

552   public short getNodeType() {
553     if (fDelegate != null) {
554       return fDelegate.getNodeType();
555     }
556     else {
557       return fDocument.getNodeType();
558     }
559   }
560
561   /**
562    * @see org.w3c.dom.Node#getParentNode
563    */

564   public Node JavaDoc getParentNode() {
565     if (fDelegate != null) {
566       return fDelegate.getParentNode();
567     }
568     else {
569       return fDocument.getParentNode();
570     }
571   }
572
573   /**
574    * @see org.w3c.dom.Node#getChildNodes
575    */

576   public NodeList JavaDoc getChildNodes() {
577     if (fDelegate != null) {
578       return fDelegate.getChildNodes();
579     }
580     else {
581       return fDocument.getChildNodes();
582     }
583   }
584
585   /**
586    * @see org.w3c.dom.Node#getFirstChild
587    */

588   public Node JavaDoc getFirstChild() {
589     if (fDelegate != null) {
590       return fDelegate.getFirstChild();
591     }
592     else {
593       return fDocument.getFirstChild();
594     }
595   }
596
597   /**
598    * @see org.w3c.dom.Node#getLastChild
599    */

600   public Node JavaDoc getLastChild() {
601     if (fDelegate != null) {
602       return fDelegate.getLastChild();
603     }
604     else {
605       return fDocument.getLastChild();
606     }
607   }
608
609   /**
610    * @see org.w3c.dom.Node#getPreviousSibling
611    */

612   public Node JavaDoc getPreviousSibling() {
613     if (fDelegate != null) {
614       return fDelegate.getPreviousSibling();
615     }
616     else {
617       return fDocument.getPreviousSibling();
618     }
619   }
620
621   /**
622    * @see org.w3c.dom.Node#getNextSibling
623    */

624   public Node JavaDoc getNextSibling() {
625     if (fDelegate != null) {
626       return fDelegate.getNextSibling();
627     }
628     else {
629       return fDocument.getNextSibling();
630     }
631   }
632
633   /**
634    * @see org.w3c.dom.Node#getAttributes
635    */

636   public NamedNodeMap JavaDoc getAttributes() {
637     if (fDelegate != null) {
638       return fDelegate.getAttributes();
639     }
640     else {
641       return fDocument.getAttributes();
642     }
643   }
644
645   /**
646    * @see org.w3c.dom.Node#getOwnerDocument
647    */

648   public Document JavaDoc getOwnerDocument() {
649     if (fDelegate != null) {
650       return fDelegate.getOwnerDocument();
651     }
652     else {
653       return fDocument.getOwnerDocument();
654     }
655   }
656
657   /**
658    * @see org.w3c.dom.Node#insertBefore
659    */

660   public Node JavaDoc insertBefore(Node JavaDoc newChild, Node JavaDoc refChild) throws DOMException JavaDoc {
661     if (fDelegate != null) {
662       return fDelegate.insertBefore(newChild, refChild);
663     }
664     else {
665       return fDocument.insertBefore(newChild, refChild);
666     }
667   }
668
669   /**
670    * @see org.w3c.dom.Node#replaceChild
671    */

672   public Node JavaDoc replaceChild(Node JavaDoc newChild, Node JavaDoc oldChild) throws DOMException JavaDoc {
673     if (fDelegate != null) {
674       return fDelegate.replaceChild(newChild, oldChild);
675     }
676     else {
677       return fDocument.replaceChild(newChild, oldChild);
678     }
679   }
680
681   /**
682    * @see org.w3c.dom.Node#removeChild
683    */

684   public Node JavaDoc removeChild(Node JavaDoc oldChild) throws DOMException JavaDoc {
685     if (fDelegate != null) {
686       return fDelegate.removeChild(oldChild);
687     }
688     else {
689       return fDocument.removeChild(oldChild);
690     }
691   }
692
693   /**
694    * @see org.w3c.dom.Node#appendChild
695    */

696   public Node JavaDoc appendChild(Node JavaDoc newChild) throws DOMException JavaDoc {
697     if (fDelegate != null) {
698       return fDelegate.appendChild(newChild);
699     }
700     else {
701       return fDocument.appendChild(newChild);
702     }
703   }
704
705   /**
706    * @see org.w3c.dom.Node#normalize
707    */

708   public void normalize() {
709     if (fDelegate != null) {
710       fDelegate.normalize();
711     }
712     else {
713       fDocument.normalize();
714     }
715   }
716
717   /**
718    * @see org.w3c.dom.Node#isSupported(String, String)
719    */

720   public boolean isSupported(String JavaDoc feature, String JavaDoc version) {
721     if (fDelegate != null) {
722       return fDelegate.isSupported(feature, version);
723     }
724     else {
725       return fDocument.isSupported(feature, version);
726     }
727   }
728
729   /**
730    * @see org.w3c.dom.Node#getNamespaceURI
731    */

732   public String JavaDoc getNamespaceURI() {
733     if (fDelegate != null) {
734       return fDelegate.getNamespaceURI();
735     }
736     else {
737       return fDocument.getNamespaceURI();
738     }
739   }
740
741   /**
742    * @see org.w3c.dom.Node#getPrefix
743    */

744   public String JavaDoc getPrefix() {
745     if (fDelegate != null) {
746       return fDelegate.getPrefix();
747     }
748     else {
749       return fDocument.getPrefix();
750     }
751   }
752
753   /**
754    * @see org.w3c.dom.Node#setPrefix
755    */

756   public void setPrefix(String JavaDoc prefix) {
757     if (fDelegate != null) {
758       fDelegate.setPrefix(prefix);
759     }
760     else {
761       fDocument.setPrefix(prefix);
762     }
763   }
764
765   /**
766    * @see org.w3c.dom.Node#getLocalName
767    */

768   public String JavaDoc getLocalName() {
769     if (fDelegate != null) {
770       return fDelegate.getLocalName();
771     }
772     else {
773       return fDocument.getLocalName();
774     }
775   }
776
777   /**
778    * @see org.w3c.dom.Node#hasChildNodes
779    */

780   public boolean hasChildNodes() {
781     if (fDelegate != null) {
782       return fDelegate.hasChildNodes();
783     }
784     else {
785       return fDocument.hasChildNodes();
786     }
787   }
788
789   /**
790    * @see org.w3c.dom.Node#hasAttributes
791    */

792   public boolean hasAttributes() {
793     if (fDelegate != null) {
794       return fDelegate.hasAttributes();
795     }
796     else {
797       return fDocument.hasAttributes();
798     }
799   }
800
801   /**
802    * @see XMLObject#toDocument
803    */

804   public String JavaDoc toDocument() {
805     // Create formatter if needed (no synchronization necessary)
806
if (fFormatter == null) {
807       fFormatter = new DOMFormatter(DOMFormatter.getDefaultOutputOptions(
808           getDocument()));
809     }
810
811     if (fDelegate != null) {
812       return fFormatter.toString(fDelegate);
813     }
814     else {
815       return fFormatter.toString(this);
816     }
817   }
818
819   /**
820    * Recursively synchronize access methods.
821    */

822   private void syncAccessMethods(Node JavaDoc node) {
823     syncWithDocument(node);
824     for (Node JavaDoc child = node.getFirstChild(); child != null;
825          child = child.getNextSibling()) {
826       syncAccessMethods(child);
827     }
828   }
829
830   /**
831    * @see XMLObject#syncAccessMethods
832    */

833   public void syncAccessMethods() {
834     if (fDelegate != null) {
835       fDelegate.syncAccessMethods();
836     }
837     else {
838       syncAccessMethods(fDocument);
839     }
840   }
841
842   /**
843    * Old method to initialize the fields used by the generated access
844    * methods from the current state of the document. This method was
845    * poorly named and is deprecated.
846    *
847    * @deprecated Use <CODE>syncAccessMethods()</CODE> instead.
848    * @see #syncAccessMethods
849    */

850   public void initFields() {
851     syncAccessMethods();
852   }
853
854   /**
855    * @see DocumentInfo#isURLAttribute
856    */

857   public boolean isURLAttribute(Element JavaDoc element, String JavaDoc attrName) {
858     return getDomFactory().isURLAttribute(element, attrName);
859   }
860
861   /**
862    * Used internally to implement a setTextXXX() method. Adds check for
863    * for null value and helps to minimizes the amount of generated code.
864    */

865   protected final void doSetText(Element JavaDoc element, String JavaDoc text) {
866     if (text == null) {
867       throw new IllegalArgumentException JavaDoc( "attempt to set a DOM text node value to null");
868     }
869     XMLCUtil.getFirstText(element).setData(text);
870   }
871
872 /* (non-Javadoc)
873  * @see org.w3c.dom.Document#getInputEncoding()
874  */

875 public String JavaDoc getInputEncoding() {
876     // TODO Auto-generated method stub
877
return null;
878 }
879
880 /* (non-Javadoc)
881  * @see org.w3c.dom.Document#getXmlEncoding()
882  */

883 public String JavaDoc getXmlEncoding() {
884     // TODO Auto-generated method stub
885
return null;
886 }
887
888 /* (non-Javadoc)
889  * @see org.w3c.dom.Document#getXmlStandalone()
890  */

891 public boolean getXmlStandalone() {
892     // TODO Auto-generated method stub
893
return false;
894 }
895
896 /* (non-Javadoc)
897  * @see org.w3c.dom.Document#setXmlStandalone(boolean)
898  */

899 public void setXmlStandalone(boolean arg0) throws DOMException JavaDoc {
900     // TODO Auto-generated method stub
901

902 }
903
904 /* (non-Javadoc)
905  * @see org.w3c.dom.Document#getXmlVersion()
906  */

907 public String JavaDoc getXmlVersion() {
908     // TODO Auto-generated method stub
909
return null;
910 }
911
912 /* (non-Javadoc)
913  * @see org.w3c.dom.Document#setXmlVersion(java.lang.String)
914  */

915 public void setXmlVersion(String JavaDoc arg0) throws DOMException JavaDoc {
916     // TODO Auto-generated method stub
917

918 }
919
920 /* (non-Javadoc)
921  * @see org.w3c.dom.Document#getDocumentURI()
922  */

923 public String JavaDoc getDocumentURI() {
924     // TODO Auto-generated method stub
925
return null;
926 }
927
928 /* (non-Javadoc)
929  * @see org.w3c.dom.Document#setDocumentURI(java.lang.String)
930  */

931 public void setDocumentURI(String JavaDoc arg0) {
932     // TODO Auto-generated method stub
933

934 }
935
936 /* (non-Javadoc)
937  * @see org.w3c.dom.Document#getDomConfig()
938  */

939 public DOMConfiguration JavaDoc getDomConfig() {
940     // TODO Auto-generated method stub
941
return null;
942 }
943
944 /* (non-Javadoc)
945  * @see org.w3c.dom.Document#normalizeDocument()
946  */

947 public void normalizeDocument() {
948     // TODO Auto-generated method stub
949

950 }
951
952 /* (non-Javadoc)
953  * @see org.w3c.dom.Document#renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String)
954  */

955 public Node JavaDoc renameNode(Node JavaDoc arg0, String JavaDoc arg1, String JavaDoc arg2) throws DOMException JavaDoc {
956     // TODO Auto-generated method stub
957
return null;
958 }
959
960 /* (non-Javadoc)
961  * @see org.w3c.dom.Node#getBaseURI()
962  */

963 public String JavaDoc getBaseURI() {
964     // TODO Auto-generated method stub
965
return null;
966 }
967
968 /* (non-Javadoc)
969  * @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)
970  */

971 public short compareDocumentPosition(Node JavaDoc arg0) throws DOMException JavaDoc {
972     // TODO Auto-generated method stub
973
return 0;
974 }
975
976 /* (non-Javadoc)
977  * @see org.w3c.dom.Node#getTextContent()
978  */

979 public String JavaDoc getTextContent() throws DOMException JavaDoc {
980     // TODO Auto-generated method stub
981
return null;
982 }
983
984 /* (non-Javadoc)
985  * @see org.w3c.dom.Node#setTextContent(java.lang.String)
986  */

987 public void setTextContent(String JavaDoc arg0) throws DOMException JavaDoc {
988     // TODO Auto-generated method stub
989

990 }
991
992 /* (non-Javadoc)
993  * @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node)
994  */

995 public boolean isSameNode(Node JavaDoc arg0) {
996     // TODO Auto-generated method stub
997
return false;
998 }
999
1000/* (non-Javadoc)
1001 * @see org.w3c.dom.Node#lookupPrefix(java.lang.String)
1002 */

1003public String JavaDoc lookupPrefix(String JavaDoc arg0) {
1004    // TODO Auto-generated method stub
1005
return null;
1006}
1007
1008/* (non-Javadoc)
1009 * @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String)
1010 */

1011public boolean isDefaultNamespace(String JavaDoc arg0) {
1012    // TODO Auto-generated method stub
1013
return false;
1014}
1015
1016/* (non-Javadoc)
1017 * @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String)
1018 */

1019public String JavaDoc lookupNamespaceURI(String JavaDoc arg0) {
1020    // TODO Auto-generated method stub
1021
return null;
1022}
1023
1024/* (non-Javadoc)
1025 * @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)
1026 */

1027public boolean isEqualNode(Node JavaDoc arg0) {
1028    // TODO Auto-generated method stub
1029
return false;
1030}
1031
1032/* (non-Javadoc)
1033 * @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String)
1034 */

1035public Object JavaDoc getFeature(String JavaDoc arg0, String JavaDoc arg1) {
1036    // TODO Auto-generated method stub
1037
return null;
1038}
1039
1040/* (non-Javadoc)
1041 * @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
1042 */

1043public Object JavaDoc setUserData(String JavaDoc arg0, Object JavaDoc arg1, UserDataHandler JavaDoc arg2) {
1044    // TODO Auto-generated method stub
1045
return null;
1046}
1047
1048/* (non-Javadoc)
1049 * @see org.w3c.dom.Node#getUserData(java.lang.String)
1050 */

1051public Object JavaDoc getUserData(String JavaDoc arg0) {
1052    // TODO Auto-generated method stub
1053
return null;
1054}
1055}
Popular Tags