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
|
/**
* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* 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.
* ============LICENSE_END=========================================================
*/
package org.onap.aai.util.genxsd;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.util.Vector;
import org.apache.commons.lang3.StringUtils;
import org.onap.aai.setup.SchemaVersion;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.TypeInfo;
import org.w3c.dom.UserDataHandler;
import com.google.common.base.Joiner;
public class XSDElement implements Element {
Element xmlElementElement;
String maxOccurs;
private static final int VALUE_NONE = 0;
private static final int VALUE_DESCRIPTION = 1;
private static final int VALUE_INDEXED_PROPS = 2;
private static final int VALUE_CONTAINER = 3;
private static final int VALUE_REQUIRES = 4;
public XSDElement(Element xmlElementElement, String maxOccurs) {
super();
this.xmlElementElement = xmlElementElement;
this.maxOccurs = maxOccurs;
}
public XSDElement(Element xmlElementElement) {
super();
this.xmlElementElement = xmlElementElement;
this.maxOccurs = null;
}
public String name() {
return this.getAttribute("name");
}
public Vector<String> getAddTypes(String version) {
String apiVersionFmt = "." + version + ".";
NamedNodeMap attributes = this.getAttributes();
Vector<String> addTypeV = new Vector<String>(); // vector of 1
String addType = null;
for ( int j = 0; j < attributes.getLength(); ++j ) {
Attr attr = (Attr) attributes.item(j);
String attrName = attr.getNodeName();
String attrValue = attr.getNodeValue();
if ( attrName.equals("type")) {
if ( attrValue.contains(apiVersionFmt) ) {
addType = attrValue.substring(attrValue.lastIndexOf('.')+1);
if ( addTypeV == null )
addTypeV = new Vector<String>();
addTypeV.add(addType);
}
}
}
return addTypeV;
}
public String getRequiresProperty() {
String elementAlsoRequiresProperty = null;
NodeList xmlPropNodes = this.getElementsByTagName("xml-properties");
for ( int i = 0; i < xmlPropNodes.getLength(); ++i ) {
Element xmlPropElement = (Element)xmlPropNodes.item(i);
if (! xmlPropElement.getParentNode().getAttributes().getNamedItem("name").getNodeValue().equals(this.xmlElementElement.getAttribute("name"))){
continue;
}
NodeList childNodes = xmlPropElement.getElementsByTagName("xml-property");
for ( int j = 0; j < childNodes.getLength(); ++j ) {
Element childElement = (Element)childNodes.item(j);
// get name
int useValue = VALUE_NONE;
NamedNodeMap attributes = childElement.getAttributes();
for ( int k = 0; k < attributes.getLength(); ++k ) {
Attr attr = (Attr) attributes.item(k);
String attrName = attr.getNodeName();
String attrValue = attr.getNodeValue();
if ( attrName == null || attrValue == null )
continue;
if ( attrName.equals("name") && attrValue.equals("requires")) {
useValue = VALUE_REQUIRES;
}
if ( useValue == VALUE_REQUIRES && attrName.equals("value")) {
elementAlsoRequiresProperty = attrValue;
}
}
}
}
return elementAlsoRequiresProperty;
}
public String getPathDescriptionProperty() {
String pathDescriptionProperty = null;
NodeList xmlPropNodes = this.getElementsByTagName("xml-properties");
for ( int i = 0; i < xmlPropNodes.getLength(); ++i ) {
Element xmlPropElement = (Element)xmlPropNodes.item(i);
if (! xmlPropElement.getParentNode().getAttributes().getNamedItem("name").getNodeValue().equals(this.xmlElementElement.getAttribute("name"))){
continue;
}
// This stopped working, replaced with above - should figure out why...
// if ( !xmlPropElement.getParentNode().isSameNode(this.xmlElementElement))
// continue;
NodeList childNodes = xmlPropElement.getElementsByTagName("xml-property");
for ( int j = 0; j < childNodes.getLength(); ++j ) {
Element childElement = (Element)childNodes.item(j);
// get name
int useValue = VALUE_NONE;
NamedNodeMap attributes = childElement.getAttributes();
for ( int k = 0; k < attributes.getLength(); ++k ) {
Attr attr = (Attr) attributes.item(k);
String attrName = attr.getNodeName();
String attrValue = attr.getNodeValue();
if ( attrName == null || attrValue == null )
continue;
if ( attrName.equals("name") && attrValue.equals("description")) {
useValue = VALUE_DESCRIPTION;
}
if ( useValue == VALUE_DESCRIPTION && attrName.equals("value")) {
pathDescriptionProperty = attrValue;
}
}
}
}
return pathDescriptionProperty;
}
public Vector<String> getIndexedProps() {
Vector<String> indexedProps = new Vector<String>();
NodeList xmlPropNodes = this.getElementsByTagName("xml-properties");
for ( int i = 0; i < xmlPropNodes.getLength(); ++i ) {
Element xmlPropElement = (Element)xmlPropNodes.item(i);
if ( !xmlPropElement.getParentNode().isSameNode(this.xmlElementElement))
continue;
NodeList childNodes = xmlPropElement.getElementsByTagName("xml-property");
for ( int j = 0; j < childNodes.getLength(); ++j ) {
Element childElement = (Element)childNodes.item(j);
// get name
int useValue = VALUE_NONE;
NamedNodeMap attributes = childElement.getAttributes();
for ( int k = 0; k < attributes.getLength(); ++k ) {
Attr attr = (Attr) attributes.item(k);
String attrName = attr.getNodeName();
String attrValue = attr.getNodeValue();
if ( attrName == null || attrValue == null )
continue;
if ( attrValue.equals("indexedProps")) {
useValue = VALUE_INDEXED_PROPS;
}
if ( useValue == VALUE_INDEXED_PROPS && attrName.equals("value")) {
indexedProps = getIndexedProps( attrValue );
}
}
}
}
return indexedProps;
}
private static Vector<String> getIndexedProps( String attrValue )
{
if ( attrValue == null )
return null;
StringTokenizer st = new StringTokenizer( attrValue, ",");
if ( st.countTokens() == 0 )
return null;
Vector<String> result = new Vector<String>();
while ( st.hasMoreTokens()) {
result.add(st.nextToken());
}
return result;
}
public String getContainerProperty() {
NodeList xmlPropNodes = this.getElementsByTagName("xml-properties");
String container = null;
for ( int i = 0; i < xmlPropNodes.getLength(); ++i ) {
Element xmlPropElement = (Element)xmlPropNodes.item(i);
if ( !xmlPropElement.getParentNode().isSameNode(this.xmlElementElement))
continue;
NodeList childNodes = xmlPropElement.getElementsByTagName("xml-property");
for ( int j = 0; j < childNodes.getLength(); ++j ) {
Element childElement = (Element)childNodes.item(j);
// get name
int useValue = VALUE_NONE;
NamedNodeMap attributes = childElement.getAttributes();
for ( int k = 0; k < attributes.getLength(); ++k ) {
Attr attr = (Attr) attributes.item(k);
String attrName = attr.getNodeName();
String attrValue = attr.getNodeValue();
if ( attrName == null || attrValue == null )
continue;
if ( useValue == VALUE_CONTAINER && attrName.equals("value")) {
container = attrValue;
}
if ( attrValue.equals("container")) {
useValue = VALUE_CONTAINER;
}
}
}
}
return container;
}
public String getQueryParamYAML() {
StringBuffer sbParameter = new StringBuffer();
sbParameter.append((" - name: " + this.getAttribute("name") + "\n"));
sbParameter.append((" in: query\n"));
if ( this.getAttribute("description") != null && this.getAttribute("description").length() > 0 )
sbParameter.append((" description: " + this.getAttribute("description") + "\n"));
else
sbParameter.append((" description:\n"));
sbParameter.append((" required: false\n"));
if ( ("java.lang.String").equals(this.getAttribute("type")))
sbParameter.append(" type: string\n");
if ( ("java.lang.Long").equals(this.getAttribute("type"))) {
sbParameter.append(" type: integer\n");
sbParameter.append(" format: int64\n");
}
if ( ("java.lang.Integer").equals(this.getAttribute("type"))) {
sbParameter.append(" type: integer\n");
sbParameter.append(" format: int32\n");
}
if ( ("java.lang.Boolean").equals(this.getAttribute("type"))) {
sbParameter.append(" type: boolean\n");
}
return sbParameter.toString();
}
public String getPathParamYAML(String elementDescription) {
StringBuffer sbParameter = new StringBuffer();
sbParameter.append((" - name: " + this.getAttribute("name") + "\n"));
sbParameter.append((" in: path\n"));
if ( elementDescription != null && elementDescription.length() > 0 )
sbParameter.append((" description: " + elementDescription + "\n"));
sbParameter.append((" required: true\n"));
if ( ("java.lang.String").equals(this.getAttribute("type")))
sbParameter.append(" type: string\n");
if ( ("java.lang.Long").equals(this.getAttribute("type"))) {
sbParameter.append(" type: integer\n");
sbParameter.append(" format: int64\n");
}
if ( ("java.lang.Integer").equals(this.getAttribute("type"))) {
sbParameter.append(" type: integer\n");
sbParameter.append(" format: int32\n");
}
if ( ("java.lang.Boolean").equals(this.getAttribute("type"))) {
sbParameter.append(" type: boolean\n");
}
if(StringUtils.isNotBlank(this.getAttribute("name"))) {
sbParameter.append(" example: "+"__"+this.getAttribute("name").toUpperCase()+"__"+"\n");
}
return sbParameter.toString();
}
public String getHTMLElement(SchemaVersion v, boolean useAnnotation, HTMLfromOXM driver) {
StringBuffer sbElement = new StringBuffer();
String elementName = this.getAttribute("name");
String elementType = this.getAttribute("type");
String elementContainerType = this.getAttribute("container-type");
String elementIsRequired = this.getAttribute("required");
String addType = elementType.contains("." + v.toString() + ".") ? elementType.substring(elementType.lastIndexOf('.')+1) : null;
if ( addType != null ) {
sbElement.append(" <xs:element ref=\"tns:" + driver.getXmlRootElementName(addType)+"\"");
} else {
sbElement.append(" <xs:element name=\"" + elementName +"\"");
}
if ( elementType.equals("java.lang.String"))
sbElement.append(" type=\"xs:string\"");
if ( elementType.equals("java.lang.Long"))
sbElement.append(" type=\"xs:unsignedInt\"");
if ( elementType.equals("java.lang.Integer"))
sbElement.append(" type=\"xs:int\"");
if ( elementType.equals("java.lang.Boolean"))
sbElement.append(" type=\"xs:boolean\"");
if ( addType != null || elementType.startsWith("java.lang.") ) {
sbElement.append(" minOccurs=\"0\"");
}
if ( elementContainerType != null && elementContainerType.equals("java.util.ArrayList")) {
sbElement.append(" maxOccurs=\"" + maxOccurs + "\"");
}
if(useAnnotation) {
String annotation = new XSDElement(xmlElementElement, maxOccurs).getHTMLAnnotation("field", " ");
sbElement.append(StringUtils.isNotEmpty(annotation) ? ">" + OxmFileProcessor.LINE_SEPARATOR : "");
sbElement.append(annotation);
sbElement.append(StringUtils.isNotEmpty(annotation) ? " </xs:element>" + OxmFileProcessor.LINE_SEPARATOR : "/>" + OxmFileProcessor.LINE_SEPARATOR );
} else {
sbElement.append("/>" + OxmFileProcessor.LINE_SEPARATOR);
}
return this.getHTMLElementWrapper(sbElement.toString(), v, useAnnotation);
// return sbElement.toString();
}
public String getHTMLElementWrapper(String unwrappedElement, SchemaVersion v, boolean useAnnotation) {
NodeList childNodes = this.getElementsByTagName("xml-element-wrapper");
String xmlElementWrapper = null;
if ( childNodes.getLength() > 0 ) {
Element childElement = (Element)childNodes.item(0);
// get name
xmlElementWrapper = childElement == null ? null : childElement.getAttribute("name");
}
if(xmlElementWrapper == null)
return unwrappedElement;
StringBuffer sbElement = new StringBuffer();
sbElement.append(" <xs:element name=\"" + xmlElementWrapper +"\"");
String elementType = xmlElementElement.getAttribute("type");
String elementIsRequired = this.getAttribute("required");
String addType = elementType.contains("." + v.toString() + ".") ? elementType.substring(elementType.lastIndexOf('.')+1) : null;
if ( elementIsRequired == null || !elementIsRequired.equals("true")||addType != null) {
sbElement.append(" minOccurs=\"0\"");
}
sbElement.append(">" + OxmFileProcessor.LINE_SEPARATOR);
sbElement.append(" <xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
if(useAnnotation) {
XSDElement javaTypeElement = new XSDElement((Element)this.getParentNode(), maxOccurs);
sbElement.append(javaTypeElement.getHTMLAnnotation("class", " "));
}
sbElement.append(" <xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
sbElement.append(" ");
sbElement.append(unwrappedElement);
sbElement.append(" </xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
sbElement.append(" </xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
sbElement.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
return sbElement.toString();
}
public String getHTMLAnnotation(String target, String indentation) {
StringBuffer sb = new StringBuffer();
List<String> metadata = new ArrayList<>();
if("true".equals(this.getAttribute("xml-key")) ) {
metadata.add("isKey=true");
}
NodeList xmlPropTags = this.getElementsByTagName("xml-properties");
Element xmlPropElement = null;
for ( int i = 0; i < xmlPropTags.getLength(); ++i ) {
xmlPropElement = (Element)xmlPropTags.item(i);
if (! xmlPropElement.getParentNode().getAttributes().getNamedItem("name").getNodeValue().equals(this.xmlElementElement.getAttribute("name")))
continue;
else
break;
}
if(xmlPropElement != null) {
NodeList xmlProperties = xmlPropElement.getElementsByTagName("xml-property");
for (int i = 0; i < xmlProperties.getLength(); i++) {
Element item = (Element)xmlProperties.item(i);
String name = item.getAttribute("name");
String value = item.getAttribute("value");
if (name.equals("abstract")) {
name = "isAbstract";
} else if (name.equals("extends")) {
name = "extendsFrom";
}
metadata.add(name + "=\"" + value.replaceAll("&", "&") + "\"");
}
}
if(metadata.size() == 0) {
return "";
}
sb.append(indentation +"<xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
sb.append(
indentation + " <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR +
indentation + " <annox:annotate target=\""+target+"\">@org.onap.aai.annotations.Metadata(" + Joiner.on(",").join(metadata) + ")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR +
indentation + " </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
sb.append(indentation +"</xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
return sb.toString();
}
public String getTypePropertyYAML() {
StringBuffer sbProperties = new StringBuffer();
sbProperties.append(" " + this.getAttribute("name") + ":\n");
sbProperties.append(" type: ");
if ( ("java.lang.String").equals(this.getAttribute("type")))
sbProperties.append("string\n");
else if ( ("java.lang.Long").equals(this.getAttribute("type"))) {
sbProperties.append("integer\n");
sbProperties.append(" format: int64\n");
}
else if ( ("java.lang.Integer").equals(this.getAttribute("type"))){
sbProperties.append("integer\n");
sbProperties.append(" format: int32\n");
}
else if ( ("java.lang.Boolean").equals(this.getAttribute("type")))
sbProperties.append("boolean\n");
String attrDescription = this.getPathDescriptionProperty();
if ( attrDescription != null && attrDescription.length() > 0 )
sbProperties.append(" description: " + attrDescription + "\n");
String elementAlsoRequiresProperty=this.getRequiresProperty();
if ( StringUtils.isNotEmpty(elementAlsoRequiresProperty) )
sbProperties.append(" also requires: " + elementAlsoRequiresProperty + "\n");
return sbProperties.toString();
}
public boolean isStandardType()
{
switch ( this.getAttribute("type") ) {
case "java.lang.String":
case "java.lang.Long":
case "java.lang.Integer":
case"java.lang.Boolean":
return true;
}
return false;
}
@Override
public String getNodeName() {
return xmlElementElement.getNodeName();
}
@Override
public String getNodeValue() throws DOMException {
return xmlElementElement.getNodeValue();
}
@Override
public void setNodeValue(String nodeValue) throws DOMException {
xmlElementElement.setNodeValue(nodeValue);
}
@Override
public short getNodeType() {
return xmlElementElement.getNodeType();
}
@Override
public Node getParentNode() {
return xmlElementElement.getParentNode();
}
@Override
public NodeList getChildNodes() {
return xmlElementElement.getChildNodes();
}
@Override
public Node getFirstChild() {
return xmlElementElement.getFirstChild();
}
@Override
public Node getLastChild() {
return xmlElementElement.getLastChild();
}
@Override
public Node getPreviousSibling() {
return xmlElementElement.getPreviousSibling();
}
@Override
public Node getNextSibling() {
return xmlElementElement.getNextSibling();
}
@Override
public NamedNodeMap getAttributes() {
return xmlElementElement.getAttributes();
}
@Override
public Document getOwnerDocument() {
return xmlElementElement.getOwnerDocument();
}
@Override
public Node insertBefore(Node newChild, Node refChild) throws DOMException {
return xmlElementElement.insertBefore(newChild, refChild);
}
@Override
public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
return xmlElementElement.replaceChild(newChild, oldChild);
}
@Override
public Node removeChild(Node oldChild) throws DOMException {
return xmlElementElement.removeChild(oldChild);
}
@Override
public Node appendChild(Node newChild) throws DOMException {
return xmlElementElement.appendChild(newChild);
}
@Override
public boolean hasChildNodes() {
return xmlElementElement.hasChildNodes();
}
@Override
public Node cloneNode(boolean deep) {
return xmlElementElement.cloneNode(deep);
}
@Override
public void normalize() {
xmlElementElement.normalize();
}
@Override
public boolean isSupported(String feature, String version) {
return xmlElementElement.isSupported(feature, version);
}
@Override
public String getNamespaceURI() {
return xmlElementElement.getNamespaceURI();
}
@Override
public String getPrefix() {
return xmlElementElement.getPrefix();
}
@Override
public void setPrefix(String prefix) throws DOMException {
xmlElementElement.setPrefix(prefix);
}
@Override
public String getLocalName() {
return xmlElementElement.getLocalName();
}
@Override
public boolean hasAttributes() {
return xmlElementElement.hasAttributes();
}
@Override
public String getBaseURI() {
return xmlElementElement.getBaseURI();
}
@Override
public short compareDocumentPosition(Node other) throws DOMException {
return xmlElementElement.compareDocumentPosition(other);
}
@Override
public String getTextContent() throws DOMException {
return xmlElementElement.getTextContent();
}
@Override
public void setTextContent(String textContent) throws DOMException {
xmlElementElement.setTextContent(textContent);
}
@Override
public boolean isSameNode(Node other) {
return xmlElementElement.isSameNode(other);
}
@Override
public String lookupPrefix(String namespaceURI) {
return xmlElementElement.lookupPrefix(namespaceURI);
}
@Override
public boolean isDefaultNamespace(String namespaceURI) {
return xmlElementElement.isDefaultNamespace(namespaceURI);
}
@Override
public String lookupNamespaceURI(String prefix) {
return xmlElementElement.lookupNamespaceURI(prefix);
}
@Override
public boolean isEqualNode(Node arg) {
return xmlElementElement.isEqualNode(arg);
}
@Override
public Object getFeature(String feature, String version) {
return xmlElementElement.getFeature(feature, version);
}
@Override
public Object setUserData(String key, Object data, UserDataHandler handler) {
return xmlElementElement.setUserData(key, data, handler);
}
@Override
public Object getUserData(String key) {
return xmlElementElement.getUserData(key);
}
@Override
public String getTagName() {
return xmlElementElement.getTagName();
}
@Override
public String getAttribute(String name) {
return xmlElementElement.getAttribute(name);
}
@Override
public void setAttribute(String name, String value) throws DOMException {
xmlElementElement.setAttribute(name, value);
}
@Override
public void removeAttribute(String name) throws DOMException {
xmlElementElement.removeAttribute(name);
}
@Override
public Attr getAttributeNode(String name) {
return xmlElementElement.getAttributeNode(name);
}
@Override
public Attr setAttributeNode(Attr newAttr) throws DOMException {
return xmlElementElement.setAttributeNode(newAttr);
}
@Override
public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
return xmlElementElement.removeAttributeNode(oldAttr);
}
@Override
public NodeList getElementsByTagName(String name) {
return xmlElementElement.getElementsByTagName(name);
}
@Override
public String getAttributeNS(String namespaceURI, String localName) throws DOMException {
return xmlElementElement.getAttributeNS(namespaceURI, localName);
}
@Override
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException {
xmlElementElement.setAttributeNS(namespaceURI, qualifiedName, value);
return;
}
@Override
public void removeAttributeNS(String namespaceURI, String localName) throws DOMException {
xmlElementElement.removeAttributeNS(namespaceURI, localName);
}
@Override
public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException {
return xmlElementElement.getAttributeNodeNS(namespaceURI, localName);
}
@Override
public Attr setAttributeNodeNS(Attr newAttr) throws DOMException {
return xmlElementElement.setAttributeNodeNS(newAttr);
}
@Override
public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException {
return xmlElementElement.getElementsByTagNameNS(namespaceURI, localName);
}
@Override
public boolean hasAttribute(String name) {
return xmlElementElement.hasAttribute(name);
}
@Override
public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException {
return xmlElementElement.hasAttributeNS(namespaceURI, localName);
}
@Override
public TypeInfo getSchemaTypeInfo() {
return xmlElementElement.getSchemaTypeInfo();
}
@Override
public void setIdAttribute(String name, boolean isId) throws DOMException {
xmlElementElement.setIdAttribute(name, isId);
}
@Override
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException {
xmlElementElement.setIdAttributeNS(namespaceURI, localName, isId);
}
@Override
public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException {
xmlElementElement.setIdAttributeNode(idAttr, isId);
return;
}
}
|