File: SOAPDocumentImpl.java

package info (click to toggle)
axis 1.4-12+deb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 51,832 kB
  • ctags: 44,779
  • sloc: java: 129,119; xml: 10,573; jsp: 983; sh: 84; cs: 36; makefile: 29
file content (795 lines) | stat: -rw-r--r-- 25,272 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
/*
 * Copyright 2001-2004 The Apache Software Foundation.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.axis.message;

import javax.xml.namespace.QName;
import org.apache.axis.AxisFault;
import org.apache.axis.Constants;
import org.apache.axis.SOAPPart;
import org.apache.axis.utils.Mapping;
import org.apache.axis.utils.XMLUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
import org.w3c.dom.DOMConfiguration;
import org.w3c.dom.DOMException;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
import org.w3c.dom.EntityReference;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.ProcessingInstruction;
import org.w3c.dom.UserDataHandler;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.soap.SOAPException;

/**
 * SOAPDcoumentImpl implements the Document API for SOAPPART. At the moment, it
 * again delgate the XERCES DOM Implementation Here is my argument on it: I
 * guess that there is 3 way to implement this. - fully implement the DOM API
 * here myself. => This is too much and duplicated work. - extends XERCES
 * Implementation => this makes we are fixed to one Implementation - choose
 * delgate depends on the user's parser preference => This is the practically
 * best solution I have now
 * 
 * @author Heejune Ahn (cityboy@tmax.co.kr)
 *  
 */

public class SOAPDocumentImpl
implements org.w3c.dom.Document, java.io.Serializable {

    // Depending on the user's parser preference
    protected Document delegate = null;
    protected SOAPPart soapPart = null;

    /**
     * Construct the Document
     * 
     * @param sp the soap part
     */
    public SOAPDocumentImpl(SOAPPart sp) {
        try {
            delegate = XMLUtils.newDocument();
        } catch (ParserConfigurationException e) {
            // Do nothing
        }
        soapPart = sp;
    }

    /**
     * @todo : link with SOAP
     * 
     * @return
     */
    public DocumentType getDoctype() {
        return delegate.getDoctype();
    }

    public DOMImplementation getImplementation() {
        return delegate.getImplementation();
    }

    /**
     * should not be called, the method will be handled in SOAPPart
     * 
     * @return
     */
    public Element getDocumentElement() {
        return soapPart.getDocumentElement();
    }

    /**
     * based on the tagName, we will make different kind SOAP Elements Instance
     * Is really we can determine the Type by the Tagname???
     * 
     * @todo : verify this method
     * 
     * @param tagName
     * @return @throws
     *         DOMException
     */

    public org.w3c.dom.Element createElement(String tagName)
    throws DOMException {
        int index = tagName.indexOf(":");
        String prefix, localname;
        if (index < 0) {
            prefix = "";
            localname = tagName;
        } else {
            prefix = tagName.substring(0, index);
            localname = tagName.substring(index + 1);
        }

        try {
            SOAPEnvelope soapenv =
                (org.apache.axis.message.SOAPEnvelope) soapPart.getEnvelope();
            if (soapenv != null) {
                if (tagName.equalsIgnoreCase(Constants.ELEM_ENVELOPE))
                    new SOAPEnvelope();
                if (tagName.equalsIgnoreCase(Constants.ELEM_HEADER))
                    return new SOAPHeader(soapenv, soapenv.getSOAPConstants());
                if (tagName.equalsIgnoreCase(Constants.ELEM_BODY))
                    return new SOAPBody(soapenv, soapenv.getSOAPConstants());
                if (tagName.equalsIgnoreCase(Constants.ELEM_FAULT))
                    return new SOAPEnvelope();
                if (tagName.equalsIgnoreCase(Constants.ELEM_FAULT_DETAIL))
                    return new SOAPFault(new AxisFault(tagName));
                else {
                    return new MessageElement("", prefix, localname);
                }
            } else {
                return new MessageElement("", prefix, localname);
            }

        } catch (SOAPException se) {
            throw new DOMException(DOMException.INVALID_STATE_ERR, "");
        }
    }

    /**
     * 
     * Creates an empty <code>DocumentFragment</code> object. @todo not
     * implemented yet
     * 
     * @return A new <code>DocumentFragment</code>.
     */
    public DocumentFragment createDocumentFragment() {
        return delegate.createDocumentFragment();
    }
    /**
     * Creates a <code>Text</code> node given the specified string.
     * 
     * @param data
     *            The data for the node.
     * @return The new <code>Text</code> object.
     */
    public org.w3c.dom.Text createTextNode(String data) {
        org.apache.axis.message.Text me =
            new org.apache.axis.message.Text(delegate.createTextNode(data));
        me.setOwnerDocument(soapPart);
        return me;

    }

    /**
     * Creates a <code>Comment</code> node given the specified string.
     * 
     * @param data
     *            The data for the node.
     * @return The new <code>Comment</code> object.
     */
    public Comment createComment(String data) {
        return new org.apache.axis.message.CommentImpl(data);
    }

    /**
     * Creates a <code>CDATASection</code> node whose value is the specified
     * string.
     * 
     * @param data
     *            The data for the <code>CDATASection</code> contents.
     * @return The new <code>CDATASection</code> object.
     * @exception DOMException
     *                NOT_SUPPORTED_ERR: Raised if this document is an HTML
     *                document.
     */
    public CDATASection createCDATASection(String data) throws DOMException {
        return new CDATAImpl(data);
    }

    /**
     * Creates a <code>ProcessingInstruction</code> node given the specified
     * name and data strings.
     * 
     * @param target
     *            The target part of the processing instruction.
     * @param data
     *            The data for the node.
     * @return The new <code>ProcessingInstruction</code> object.
     * @exception DOMException
     *                INVALID_CHARACTER_ERR: Raised if the specified target
     *                contains an illegal character. <br>NOT_SUPPORTED_ERR:
     *                Raised if this document is an HTML document.
     */
    public ProcessingInstruction createProcessingInstruction(
            String target,
            String data)
    throws DOMException {
        throw new java.lang.UnsupportedOperationException(
        "createProcessingInstruction");
    }

    /**
     * @todo: How Axis will maintain the Attribute representation ?
     */
    public Attr createAttribute(String name) throws DOMException {
        return delegate.createAttribute(name);
    }

    /**
     * @param name
     * @return @throws
     *         DOMException
     */
    public EntityReference createEntityReference(String name)
    throws DOMException {
        throw new java.lang.UnsupportedOperationException(
        "createEntityReference");
    }

    // implemented by yoonforh 2004-07-30 02:48:50
    public Node importNode(Node importedNode, boolean deep) throws DOMException {
    	Node targetNode = null;
    
    	int type = importedNode.getNodeType();
    	switch (type) {
    	case ELEMENT_NODE :
    	    Element el = (Element) importedNode;
    	    if (deep) {
        		targetNode = new SOAPBodyElement(el);
        		break;
    	    }
    
    	    SOAPBodyElement target = new SOAPBodyElement();
    	    org.w3c.dom.NamedNodeMap attrs = el.getAttributes();
    	    for (int i = 0; i < attrs.getLength(); i++) {
        		org.w3c.dom.Node att = attrs.item(i);
        		if (att.getNamespaceURI() != null &&
        		    att.getPrefix() != null &&
        		    att.getNamespaceURI().equals(Constants.NS_URI_XMLNS) &&
        		    att.getPrefix().equals("xmlns")) {
        		    Mapping map = new Mapping(att.getNodeValue(), att.getLocalName());
        		    target.addMapping(map);
        		}
        		if (att.getLocalName() != null) {
        		    target.addAttribute(att.getPrefix(),
        					att.getNamespaceURI(),
        					att.getLocalName(),
        					att.getNodeValue());
        		} else if (att.getNodeName() != null) {
        		    target.addAttribute(att.getPrefix(),
        					att.getNamespaceURI(),
        					att.getNodeName(),
        					att.getNodeValue());
        		}
    	    }
    
    	    if (el.getLocalName() == null) {
    	        target.setName(el.getNodeName());
    	    } else {
    	        target.setQName(new QName(el.getNamespaceURI(), el.getLocalName()));
    	    }
    	    targetNode = target;
    	    break;
    
    	case ATTRIBUTE_NODE :
    	    if (importedNode.getLocalName() == null) {
    	        targetNode = createAttribute(importedNode.getNodeName());
    	    } else {
    	        targetNode = createAttributeNS(importedNode.getNamespaceURI(),
    					       importedNode.getLocalName());
    	    }
    	    break;
    
    	case TEXT_NODE :
    	    targetNode = createTextNode(importedNode.getNodeValue());
    	    break;
    
    	case CDATA_SECTION_NODE :
    	    targetNode = createCDATASection(importedNode.getNodeValue());
    	    break;
    
    	case COMMENT_NODE :
    	    targetNode = createComment(importedNode.getNodeValue());
    	    break;
    
    	case DOCUMENT_FRAGMENT_NODE :
    	    targetNode = createDocumentFragment();
    	    if (deep) {
        		org.w3c.dom.NodeList children = importedNode.getChildNodes();
        		for (int i = 0; i < children.getLength(); i++){
        		    targetNode.appendChild(importNode(children.item(i), true));
        		}
    	    }
    	    break;
    
    	case ENTITY_REFERENCE_NODE :
    	    targetNode = createEntityReference(importedNode.getNodeName());
    	    break;
    
    	case PROCESSING_INSTRUCTION_NODE :
    	    ProcessingInstruction pi = (ProcessingInstruction) importedNode;
    	    targetNode = createProcessingInstruction(pi.getTarget(), pi.getData());
    	    break;
    
    	case ENTITY_NODE :
    	    // TODO : ...
    	    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Entity nodes are not supported.");
    
    	case NOTATION_NODE :
    	    // TODO : any idea?
    	    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Notation nodes are not supported.");
    
    	case DOCUMENT_TYPE_NODE :
    	    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "DocumentType nodes cannot be imported.");
    
    	case DOCUMENT_NODE :
    	    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Document nodes cannot be imported.");
    
    	default :
    	    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Node type (" + type + ") cannot be imported.");
    	}
    
    	return targetNode;
    }

    /**
     * Return SOAPElements (what if they want SOAPEnvelope or Header/Body?)
     * 
     * @param namespaceURI
     * @param qualifiedName
     * @return @throws
     *         DOMException
     */
    public Element createElementNS(String namespaceURI, String qualifiedName)
    throws DOMException {
        org.apache.axis.soap.SOAPConstants soapConstants = null;
        if (Constants.URI_SOAP11_ENV.equals(namespaceURI)) {
            soapConstants = org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS;
        } else if (Constants.URI_SOAP12_ENV.equals(namespaceURI)) {
            soapConstants = org.apache.axis.soap.SOAPConstants.SOAP12_CONSTANTS;
        }

        // For special SOAP Element
        MessageElement me = null;
        if (soapConstants != null) {
            if (qualifiedName.equals(Constants.ELEM_ENVELOPE)) {
                // TODO: confirm SOAP 1.1!
                me = new SOAPEnvelope(soapConstants); 
            } else if (qualifiedName.equals(Constants.ELEM_HEADER)) {
                me = new SOAPHeader(null, soapConstants);
                // Dummy SOAPEnv required?
            } else if (qualifiedName.equals(Constants.ELEM_BODY)) {
                me = new SOAPBody(null, soapConstants);
            } else if (qualifiedName.equals(Constants.ELEM_FAULT)) {
                me = null;
            } else if (qualifiedName.equals(Constants.ELEM_FAULT_DETAIL)) {
                // TODO:
                me = null;
            } else {
                throw new DOMException(
                        DOMException.INVALID_STATE_ERR,
                "No such Localname for SOAP URI");
            }
            // TODO:
            return null;
            // general Elements
        } else {
            me = new MessageElement(namespaceURI, qualifiedName);
        }

        if (me != null)
            me.setOwnerDocument(soapPart);

        return me;

    }

    /**
     * Attribute is not particularly dealt with in SAAJ.
     *  
     */
    public Attr createAttributeNS(String namespaceURI, String qualifiedName)
    throws DOMException {
        return delegate.createAttributeNS(namespaceURI, qualifiedName);
    }

    /**
     * search the SOAPPart in order of SOAPHeader and SOAPBody for the
     * requested Element name
     *  
     */
    public NodeList getElementsByTagNameNS(
            String namespaceURI,
            String localName) {
        try {
        	NodeListImpl list = new NodeListImpl();
            if (soapPart != null) {
                SOAPEnvelope soapEnv =
                    (org.apache.axis.message.SOAPEnvelope) soapPart
                    .getEnvelope();
                SOAPHeader header =
                    (org.apache.axis.message.SOAPHeader) soapEnv.getHeader();
                if (header != null) {
                	list.addNodeList(header.getElementsByTagNameNS(
                            namespaceURI,
                            localName));
                }
                SOAPBody body =
                    (org.apache.axis.message.SOAPBody) soapEnv.getBody();
                if (body != null) {
                	list.addNodeList(body.getElementsByTagNameNS(
                            namespaceURI,
                            localName));
                }
            }
            return list;
        } catch (SOAPException se) {
            throw new DOMException(DOMException.INVALID_STATE_ERR, "");
        }
    }

    /**
     * search the SOAPPart in order of SOAPHeader and SOAPBody for the
     * requested Element name
     *  
     */
    public NodeList getElementsByTagName(String localName) {

        try {
            NodeListImpl list = new NodeListImpl();
            if (soapPart != null) {
                SOAPEnvelope soapEnv =
                    (org.apache.axis.message.SOAPEnvelope) soapPart
                    .getEnvelope();
                SOAPHeader header =
                    (org.apache.axis.message.SOAPHeader) soapEnv.getHeader();
                if (header != null) {
                    list.addNodeList(header.getElementsByTagName(localName));
                }
                SOAPBody body =
                    (org.apache.axis.message.SOAPBody) soapEnv.getBody();
                if (body != null) {
                    list.addNodeList(body.getElementsByTagName(localName));
                }
            }
            return list;
        } catch (SOAPException se) {
            throw new DOMException(DOMException.INVALID_STATE_ERR, "");
        }
    }
    /**
     * Returns the <code>Element</code> whose <code>ID</code> is given by
     * <code>elementId</code>. If no such element exists, returns <code>null</code>.
     * Behavior is not defined if more than one element has this <code>ID</code>.
     * The DOM implementation must have information that says which attributes
     * are of type ID. Attributes with the name "ID" are not of type ID unless
     * so defined. Implementations that do not know whether attributes are of
     * type ID or not are expected to return <code>null</code>.
     * 
     * @param elementId
     *            The unique <code>id</code> value for an element.
     * @return The matching element.
     * @since DOM Level 2
     */
    public Element getElementById(String elementId) {
        return delegate.getElementById(elementId);
    }

    /**
     * Node Implementation
     *  
     */

    public String getNodeName() {
        return null;
    }

    public String getNodeValue() throws DOMException {
        throw new DOMException(
                DOMException.NO_DATA_ALLOWED_ERR,
                "Cannot use TextNode.get in " + this);
    }

    public void setNodeValue(String nodeValue) throws DOMException {
        throw new DOMException(
                DOMException.NO_DATA_ALLOWED_ERR,
                "Cannot use TextNode.set in " + this);
    }

    /**
     * override it in sub-classes
     * 
     * @return
     */
    public short getNodeType() {
        return Node.DOCUMENT_NODE;
    }

    public Node getParentNode() {
        return null;
    }

    public NodeList getChildNodes() {
        try {
            if (soapPart != null) {
                NodeListImpl children = new NodeListImpl();
                children.addNode(soapPart.getEnvelope());
                return children;
            } else {
                return NodeListImpl.EMPTY_NODELIST;
            }
        } catch (SOAPException se) {
            throw new DOMException(DOMException.INVALID_STATE_ERR, "");
        }

    }

    /**
     * Do we have to count the Attributes as node ????
     * 
     * @return
     */
    public Node getFirstChild() {
        try {
            if (soapPart != null)
                return (org.apache.axis.message.SOAPEnvelope) soapPart
                .getEnvelope();
            else
                return null;
        } catch (SOAPException se) {
            throw new DOMException(DOMException.INVALID_STATE_ERR, "");
        }

    }

    /**
     * @return
     */
    public Node getLastChild() {
        try {
            if (soapPart != null)
                return (org.apache.axis.message.SOAPEnvelope) soapPart
                .getEnvelope();
            else
                return null;
        } catch (SOAPException se) {
            throw new DOMException(DOMException.INVALID_STATE_ERR, "");
        }

    }

    public Node getPreviousSibling() {
        return null;
    }
    public Node getNextSibling() {

        return null;
    }

    public NamedNodeMap getAttributes() {
        return null;
    }

    /**
     * 
     * we have to have a link to them...
     */
    public Document getOwnerDocument() {
        return null;
    }

    /**
     */
    public Node insertBefore(Node newChild, Node refChild)
    throws DOMException {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public Node replaceChild(Node newChild, Node oldChild)
    throws DOMException {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public Node removeChild(Node oldChild) throws DOMException {
        try {
            Node envNode;
            if (soapPart != null) {
                envNode = soapPart.getEnvelope();
                if (envNode.equals(oldChild)) {
                    return envNode;
                }
            }
            throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
        } catch (SOAPException se) {
            throw new DOMException(DOMException.INVALID_STATE_ERR, "");
        }
    }

    public Node appendChild(Node newChild) throws DOMException {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public boolean hasChildNodes() {
        try {
            if (soapPart != null) {
                if (soapPart.getEnvelope() != null) {
                    return true;
                }
            }
            return false;
        } catch (SOAPException se) {
            throw new DOMException(DOMException.INVALID_STATE_ERR, "");
        }

    }

    /**
     * @todo: Study it more.... to implement the deep mode correctly.
     *  
     */
    public Node cloneNode(boolean deep) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    /**
     * @todo: is it OK to simply call the superclass?
     *  
     */
    public void normalize() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    // TODO: fill appropriate features
    private String[] features = { "foo", "bar" };
    private String version = "version 2.0";

    public boolean isSupported(String feature, String version) {
        if (!version.equalsIgnoreCase(version))
            return false;
        else
            return true;
    }

    public String getPrefix() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }
    public void setPrefix(String prefix) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public String getNamespaceURI() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }
    public void setNamespaceURI(String nsURI) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public String getLocalName() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public boolean hasAttributes() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    /**
     *  DOM Level 3 stubs
     */

    public String getBaseURI() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public boolean getXmlStandalone() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public boolean getStrictErrorChecking() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public void setXmlStandalone(boolean xmlStandalone) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public Node renameNode(Node n, String namespaceURI, String qualifiedName) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public void setStrictErrorChecking(boolean strictErrorChecking) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public Object setUserData(
        String key, Object data, UserDataHandler handler) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }
    
    public String getInputEncoding() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }
    
    public String getXmlEncoding() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public void setTextContent(String textContent) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public boolean isSameNode(Node other) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public String getDocumentURI() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public void setDocumentURI(String documentURI) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public Object getFeature(String feature, String version) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public Node adoptNode(Node source) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public boolean isDefaultNamespace(String namespaceURI) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public boolean isEqualNode(Node arg) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public void setXmlVersion(String xmlVersion) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public String getXmlVersion() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public String lookupPrefix(String namespaceURI) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public Object getUserData(String key) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public String getTextContent() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public void normalizeDocument() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public String lookupNamespaceURI(String prefix) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public DOMConfiguration getDomConfig() {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }

    public short compareDocumentPosition(Node other) {
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "");
    }
}