2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.onap.aai.schemagen.genxsd;
22 import com.google.common.base.Joiner;
23 import org.apache.commons.lang3.StringUtils;
24 import org.onap.aai.setup.SchemaVersion;
27 import java.util.ArrayList;
28 import java.util.List;
29 import java.util.StringTokenizer;
30 import java.util.Vector;
32 public class XSDElement implements Element {
33 Element xmlElementElement;
35 private static final int VALUE_NONE = 0;
36 private static final int VALUE_DESCRIPTION = 1;
37 private static final int VALUE_INDEXED_PROPS = 2;
38 private static final int VALUE_CONTAINER = 3;
39 private static final int VALUE_REQUIRES = 4;
40 private static final int VALUE_DSLSTARTNODE = 5;
42 public XSDElement(Element xmlElementElement, String maxOccurs) {
44 this.xmlElementElement = xmlElementElement;
45 this.maxOccurs = maxOccurs;
48 public XSDElement(Element xmlElementElement) {
50 this.xmlElementElement = xmlElementElement;
51 this.maxOccurs = null;
54 public String name() {
55 return this.getAttribute("name");
58 public Vector<String> getAddTypes(String version) {
59 String apiVersionFmt = "." + version + ".";
60 NamedNodeMap attributes = this.getAttributes();
61 Vector<String> addTypeV = new Vector<String>(); // vector of 1
62 String addType = null;
64 for ( int j = 0; j < attributes.getLength(); ++j ) {
65 Attr attr = (Attr) attributes.item(j);
66 String attrName = attr.getNodeName();
68 String attrValue = attr.getNodeValue();
69 if ( attrName.equals("type")) {
70 if ( attrValue.contains(apiVersionFmt) ) {
71 addType = attrValue.substring(attrValue.lastIndexOf('.')+1);
72 if ( addTypeV == null )
73 addTypeV = new Vector<String>();
74 addTypeV.add(addType);
82 public String getRequiresProperty() {
83 String elementAlsoRequiresProperty = null;
84 NodeList xmlPropNodes = this.getElementsByTagName("xml-properties");
86 for ( int i = 0; i < xmlPropNodes.getLength(); ++i ) {
87 Element xmlPropElement = (Element)xmlPropNodes.item(i);
88 if (! xmlPropElement.getParentNode().getAttributes().getNamedItem("name").getNodeValue().equals(this.xmlElementElement.getAttribute("name"))){
91 NodeList childNodes = xmlPropElement.getElementsByTagName("xml-property");
93 for ( int j = 0; j < childNodes.getLength(); ++j ) {
94 Element childElement = (Element)childNodes.item(j);
96 int useValue = VALUE_NONE;
97 NamedNodeMap attributes = childElement.getAttributes();
98 for ( int k = 0; k < attributes.getLength(); ++k ) {
99 Attr attr = (Attr) attributes.item(k);
100 String attrName = attr.getNodeName();
101 String attrValue = attr.getNodeValue();
102 if ( attrName == null || attrValue == null )
104 if ( attrName.equals("name") && attrValue.equals("requires")) {
105 useValue = VALUE_REQUIRES;
107 if ( useValue == VALUE_REQUIRES && attrName.equals("value")) {
108 elementAlsoRequiresProperty = attrValue;
113 return elementAlsoRequiresProperty;
116 public String getPathDescriptionProperty() {
117 String pathDescriptionProperty = null;
118 NodeList xmlPropNodes = this.getElementsByTagName("xml-properties");
120 for ( int i = 0; i < xmlPropNodes.getLength(); ++i ) {
121 Element xmlPropElement = (Element)xmlPropNodes.item(i);
122 if (! xmlPropElement.getParentNode().getAttributes().getNamedItem("name").getNodeValue().equals(this.xmlElementElement.getAttribute("name"))){
125 // This stopped working, replaced with above - should figure out why...
126 // if ( !xmlPropElement.getParentNode().isSameNode(this.xmlElementElement))
128 NodeList childNodes = xmlPropElement.getElementsByTagName("xml-property");
130 for ( int j = 0; j < childNodes.getLength(); ++j ) {
131 Element childElement = (Element)childNodes.item(j);
133 int useValue = VALUE_NONE;
134 NamedNodeMap attributes = childElement.getAttributes();
135 for ( int k = 0; k < attributes.getLength(); ++k ) {
136 Attr attr = (Attr) attributes.item(k);
137 String attrName = attr.getNodeName();
138 String attrValue = attr.getNodeValue();
139 if ( attrName == null || attrValue == null )
141 if ( attrName.equals("name") && attrValue.equals("description")) {
142 useValue = VALUE_DESCRIPTION;
144 if ( useValue == VALUE_DESCRIPTION && attrName.equals("value")) {
145 pathDescriptionProperty = attrValue;
150 if ( pathDescriptionProperty != null ) {
151 //suppress non-printable characters in a description
152 String replaceDescription = pathDescriptionProperty.replaceAll("[^\\p{ASCII}]", "");
153 return replaceDescription;
155 return pathDescriptionProperty;
158 public Vector<String> getProps(int needValue) {
159 Vector<String> props = new Vector<String>();
160 NodeList xmlPropNodes = this.getElementsByTagName("xml-properties");
162 for ( int i = 0; i < xmlPropNodes.getLength(); ++i ) {
163 Element xmlPropElement = (Element)xmlPropNodes.item(i);
164 if ( !xmlPropElement.getParentNode().isSameNode(this.xmlElementElement))
166 NodeList childNodes = xmlPropElement.getElementsByTagName("xml-property");
167 for ( int j = 0; j < childNodes.getLength(); ++j ) {
168 Element childElement = (Element)childNodes.item(j);
170 int useValue = VALUE_NONE;
171 NamedNodeMap attributes = childElement.getAttributes();
172 for ( int k = 0; k < attributes.getLength(); ++k ) {
173 Attr attr = (Attr) attributes.item(k);
174 String attrName = attr.getNodeName();
175 String attrValue = attr.getNodeValue();
176 if ( attrName == null || attrValue == null )
178 if ( needValue == VALUE_INDEXED_PROPS && attrValue.equals("indexedProps")) {
179 useValue = VALUE_INDEXED_PROPS;
180 } else if ( needValue == VALUE_DSLSTARTNODE && attrValue.equals("dslStartNodeProps")) {
181 useValue = VALUE_DSLSTARTNODE;
183 if ( useValue != VALUE_NONE && attrName.equals("value")) {
184 props = getProps( attrValue );
192 private static Vector<String> getProps( String attrValue )
194 if ( attrValue == null )
196 StringTokenizer st = new StringTokenizer( attrValue, ",");
197 if ( st.countTokens() == 0 )
199 Vector<String> result = new Vector<String>();
200 while ( st.hasMoreTokens()) {
201 result.add(st.nextToken());
206 public Vector<String> getIndexedProps() {
207 return getProps(VALUE_INDEXED_PROPS);
210 public Vector<String> getDslStartNodeProps() {
211 return getProps(VALUE_DSLSTARTNODE);
214 public String getContainerProperty() {
215 NodeList xmlPropNodes = this.getElementsByTagName("xml-properties");
216 String container = null;
217 for ( int i = 0; i < xmlPropNodes.getLength(); ++i ) {
218 Element xmlPropElement = (Element)xmlPropNodes.item(i);
219 if ( !xmlPropElement.getParentNode().isSameNode(this.xmlElementElement))
221 NodeList childNodes = xmlPropElement.getElementsByTagName("xml-property");
222 for ( int j = 0; j < childNodes.getLength(); ++j ) {
223 Element childElement = (Element)childNodes.item(j);
225 int useValue = VALUE_NONE;
226 NamedNodeMap attributes = childElement.getAttributes();
227 for ( int k = 0; k < attributes.getLength(); ++k ) {
228 Attr attr = (Attr) attributes.item(k);
229 String attrName = attr.getNodeName();
230 String attrValue = attr.getNodeValue();
231 if ( attrName == null || attrValue == null )
233 if ( useValue == VALUE_CONTAINER && attrName.equals("value")) {
234 container = attrValue;
236 if ( attrValue.equals("container")) {
237 useValue = VALUE_CONTAINER;
245 public String getQueryParamYAML() {
246 StringBuffer sbParameter = new StringBuffer();
247 sbParameter.append((" - name: " + this.getAttribute("name") + "\n"));
248 sbParameter.append((" in: query\n"));
249 if ( this.getAttribute("description") != null && this.getAttribute("description").length() > 0 )
250 sbParameter.append((" description: " + this.getAttribute("description") + "\n"));
252 sbParameter.append((" description: n/a\n"));
253 sbParameter.append((" required: false\n"));
254 if ( ("java.lang.String").equals(this.getAttribute("type")))
255 sbParameter.append(" type: string\n");
256 if ( ("java.lang.Long").equals(this.getAttribute("type"))) {
257 sbParameter.append(" type: integer\n");
258 sbParameter.append(" format: int64\n");
260 if ( ("java.lang.Integer").equals(this.getAttribute("type"))) {
261 sbParameter.append(" type: integer\n");
262 sbParameter.append(" format: int32\n");
264 if ( ("java.lang.Boolean").equals(this.getAttribute("type"))) {
265 sbParameter.append(" type: boolean\n");
267 return sbParameter.toString();
270 public String getPathParamYAML(String elementDescription) {
271 return getPathParamYAML(elementDescription, null);
274 public String getPathParamYAML(String elementDescription, String overrideName) {
275 // updated to allow caller to provide parameter name to use in API
276 StringBuffer sbParameter = new StringBuffer();
277 if ( overrideName == null ) {
278 overrideName = this.getAttribute("name");
280 sbParameter.append((" - name: " + overrideName + "\n"));
281 sbParameter.append((" in: path\n"));
282 if ( elementDescription != null && elementDescription.length() > 0 )
283 sbParameter.append((" description: " + elementDescription + "\n"));
284 sbParameter.append((" required: true\n"));
285 if ( ("java.lang.String").equals(this.getAttribute("type")))
286 sbParameter.append(" type: string\n");
287 if ( ("java.lang.Long").equals(this.getAttribute("type"))) {
288 sbParameter.append(" type: integer\n");
289 sbParameter.append(" format: int64\n");
291 if ( ("java.lang.Integer").equals(this.getAttribute("type"))) {
292 sbParameter.append(" type: integer\n");
293 sbParameter.append(" format: int32\n");
295 if ( ("java.lang.Boolean").equals(this.getAttribute("type"))) {
296 sbParameter.append(" type: boolean\n");
298 if(StringUtils.isNotBlank(this.getAttribute("name"))) {
299 sbParameter.append(" example: "+"__"+this.getAttribute("name").toUpperCase()+"__"+"\n");
301 return sbParameter.toString();
304 public String getHTMLElement(SchemaVersion v, boolean useAnnotation, HTMLfromOXM driver) {
305 StringBuffer sbElement = new StringBuffer();
306 String elementName = this.getAttribute("name");
307 String elementType = this.getAttribute("type");
308 String elementContainerType = this.getAttribute("container-type");
309 String elementIsRequired = this.getAttribute("required");
310 String addType = elementType.contains("." + v.toString() + ".") ? elementType.substring(elementType.lastIndexOf('.')+1) : null;
312 if ( addType != null ) {
313 sbElement.append(" <xs:element ref=\"tns:" + driver.getXmlRootElementName(addType)+"\"");
315 sbElement.append(" <xs:element name=\"" + elementName +"\"");
317 if ( elementType.equals("java.lang.String"))
318 sbElement.append(" type=\"xs:string\"");
319 if ( elementType.equals("java.lang.Long"))
320 sbElement.append(" type=\"xs:unsignedInt\"");
321 if ( elementType.equals("java.lang.Integer"))
322 sbElement.append(" type=\"xs:int\"");
323 if ( elementType.equals("java.lang.Boolean"))
324 sbElement.append(" type=\"xs:boolean\"");
325 if ( addType != null || elementType.startsWith("java.lang.") ) {
326 sbElement.append(" minOccurs=\"0\"");
328 if ( elementContainerType != null && elementContainerType.equals("java.util.ArrayList")) {
329 sbElement.append(" maxOccurs=\"" + maxOccurs + "\"");
332 String annotation = new XSDElement(xmlElementElement, maxOccurs).getHTMLAnnotation("field", " ");
333 sbElement.append(StringUtils.isNotEmpty(annotation) ? ">" + OxmFileProcessor.LINE_SEPARATOR : "");
334 sbElement.append(annotation);
335 sbElement.append(StringUtils.isNotEmpty(annotation) ? " </xs:element>" + OxmFileProcessor.LINE_SEPARATOR : "/>" + OxmFileProcessor.LINE_SEPARATOR );
337 sbElement.append("/>" + OxmFileProcessor.LINE_SEPARATOR);
339 return this.getHTMLElementWrapper(sbElement.toString(), v, useAnnotation);
340 // return sbElement.toString();
343 public String getHTMLElementWrapper(String unwrappedElement, SchemaVersion v, boolean useAnnotation) {
345 NodeList childNodes = this.getElementsByTagName("xml-element-wrapper");
347 String xmlElementWrapper = null;
348 if ( childNodes.getLength() > 0 ) {
349 Element childElement = (Element)childNodes.item(0);
351 xmlElementWrapper = childElement == null ? null : childElement.getAttribute("name");
353 if(xmlElementWrapper == null)
354 return unwrappedElement;
356 StringBuffer sbElement = new StringBuffer();
357 sbElement.append(" <xs:element name=\"" + xmlElementWrapper +"\"");
358 String elementType = xmlElementElement.getAttribute("type");
359 String elementIsRequired = this.getAttribute("required");
360 String addType = elementType.contains("." + v.toString() + ".") ? elementType.substring(elementType.lastIndexOf('.')+1) : null;
362 if ( elementIsRequired == null || !elementIsRequired.equals("true")||addType != null) {
363 sbElement.append(" minOccurs=\"0\"");
365 sbElement.append(">" + OxmFileProcessor.LINE_SEPARATOR);
366 sbElement.append(" <xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
368 XSDElement javaTypeElement = new XSDElement((Element)this.getParentNode(), maxOccurs);
369 sbElement.append(javaTypeElement.getHTMLAnnotation("class", " "));
371 sbElement.append(" <xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
372 sbElement.append(" ");
373 sbElement.append(unwrappedElement);
374 sbElement.append(" </xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
375 sbElement.append(" </xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
376 sbElement.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
377 return sbElement.toString();
380 public String getHTMLAnnotation(String target, String indentation) {
381 StringBuffer sb = new StringBuffer();
382 List<String> metadata = new ArrayList<>();
383 if("true".equals(this.getAttribute("xml-key")) ) {
384 metadata.add("isKey=true");
387 NodeList xmlPropTags = this.getElementsByTagName("xml-properties");
388 Element xmlPropElement = null;
389 for ( int i = 0; i < xmlPropTags.getLength(); ++i ) {
390 xmlPropElement = (Element)xmlPropTags.item(i);
391 if (! xmlPropElement.getParentNode().getAttributes().getNamedItem("name").getNodeValue().equals(this.xmlElementElement.getAttribute("name")))
396 if(xmlPropElement != null) {
397 NodeList xmlProperties = xmlPropElement.getElementsByTagName("xml-property");
398 for (int i = 0; i < xmlProperties.getLength(); i++) {
399 Element item = (Element)xmlProperties.item(i);
400 String name = item.getAttribute("name");
401 String value = item.getAttribute("value");
402 if (name.equals("abstract")) {
404 } else if (name.equals("extends")) {
405 name = "extendsFrom";
407 metadata.add(name + "=\"" + value.replaceAll("&", "&") + "\"");
410 if(metadata.size() == 0) {
413 sb.append(indentation +"<xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
415 indentation + " <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR +
416 indentation + " <annox:annotate target=\""+target+"\">@org.onap.aai.annotations.Metadata(" + Joiner.on(",").join(metadata) + ")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR +
417 indentation + " </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
418 sb.append(indentation +"</xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
419 return sb.toString();
422 public String getTypePropertyYAML(boolean isDslStartNode) {
423 StringBuffer sbProperties = new StringBuffer();
424 sbProperties.append(" " + this.getAttribute("name") + ":\n");
425 sbProperties.append(" type: ");
427 if ( ("java.lang.String").equals(this.getAttribute("type")))
428 sbProperties.append("string\n");
429 else if ( ("java.lang.Long").equals(this.getAttribute("type"))) {
430 sbProperties.append("integer\n");
431 sbProperties.append(" format: int64\n");
433 else if ( ("java.lang.Integer").equals(this.getAttribute("type"))){
434 sbProperties.append("integer\n");
435 sbProperties.append(" format: int32\n");
437 else if ( ("java.lang.Boolean").equals(this.getAttribute("type")))
438 sbProperties.append("boolean\n");
439 String attrDescription = this.getPathDescriptionProperty();
440 if ( attrDescription != null && attrDescription.length() > 0 ) {
441 if ( !isDslStartNode ) {
442 sbProperties.append(" description: " + attrDescription + "\n");
444 sbProperties.append(" description: |\n");
445 sbProperties.append(" " + attrDescription + "\n");
446 sbProperties.append(" *This property can be used as a filter to find the start node for a dsl query\n");
449 if ( isDslStartNode ) {
450 sbProperties.append(" description: |\n");
451 sbProperties.append(" \n");
452 sbProperties.append(" *This property can be used as a filter to find the start node for a dsl query\n");
455 String elementAlsoRequiresProperty=this.getRequiresProperty();
456 if ( StringUtils.isNotEmpty(elementAlsoRequiresProperty) )
457 sbProperties.append(" also requires: " + elementAlsoRequiresProperty + "\n");
458 return sbProperties.toString();
461 public boolean isStandardType()
463 switch ( this.getAttribute("type") ) {
464 case "java.lang.String":
465 case "java.lang.Long":
466 case "java.lang.Integer":
467 case"java.lang.Boolean":
474 public String getNodeName() {
475 return xmlElementElement.getNodeName();
479 public String getNodeValue() throws DOMException {
480 return xmlElementElement.getNodeValue();
484 public void setNodeValue(String nodeValue) throws DOMException {
485 xmlElementElement.setNodeValue(nodeValue);
489 public short getNodeType() {
490 return xmlElementElement.getNodeType();
494 public Node getParentNode() {
495 return xmlElementElement.getParentNode();
499 public NodeList getChildNodes() {
500 return xmlElementElement.getChildNodes();
504 public Node getFirstChild() {
505 return xmlElementElement.getFirstChild();
509 public Node getLastChild() {
510 return xmlElementElement.getLastChild();
514 public Node getPreviousSibling() {
515 return xmlElementElement.getPreviousSibling();
519 public Node getNextSibling() {
520 return xmlElementElement.getNextSibling();
524 public NamedNodeMap getAttributes() {
525 return xmlElementElement.getAttributes();
529 public Document getOwnerDocument() {
530 return xmlElementElement.getOwnerDocument();
534 public Node insertBefore(Node newChild, Node refChild) throws DOMException {
535 return xmlElementElement.insertBefore(newChild, refChild);
539 public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
540 return xmlElementElement.replaceChild(newChild, oldChild);
544 public Node removeChild(Node oldChild) throws DOMException {
545 return xmlElementElement.removeChild(oldChild);
549 public Node appendChild(Node newChild) throws DOMException {
550 return xmlElementElement.appendChild(newChild);
554 public boolean hasChildNodes() {
555 return xmlElementElement.hasChildNodes();
559 public Node cloneNode(boolean deep) {
560 return xmlElementElement.cloneNode(deep);
564 public void normalize() {
565 xmlElementElement.normalize();
569 public boolean isSupported(String feature, String version) {
570 return xmlElementElement.isSupported(feature, version);
574 public String getNamespaceURI() {
575 return xmlElementElement.getNamespaceURI();
579 public String getPrefix() {
580 return xmlElementElement.getPrefix();
584 public void setPrefix(String prefix) throws DOMException {
585 xmlElementElement.setPrefix(prefix);
589 public String getLocalName() {
591 return xmlElementElement.getLocalName();
595 public boolean hasAttributes() {
596 return xmlElementElement.hasAttributes();
600 public String getBaseURI() {
601 return xmlElementElement.getBaseURI();
605 public short compareDocumentPosition(Node other) throws DOMException {
606 return xmlElementElement.compareDocumentPosition(other);
610 public String getTextContent() throws DOMException {
611 return xmlElementElement.getTextContent();
615 public void setTextContent(String textContent) throws DOMException {
616 xmlElementElement.setTextContent(textContent);
620 public boolean isSameNode(Node other) {
621 return xmlElementElement.isSameNode(other);
625 public String lookupPrefix(String namespaceURI) {
626 return xmlElementElement.lookupPrefix(namespaceURI);
630 public boolean isDefaultNamespace(String namespaceURI) {
631 return xmlElementElement.isDefaultNamespace(namespaceURI);
635 public String lookupNamespaceURI(String prefix) {
636 return xmlElementElement.lookupNamespaceURI(prefix);
640 public boolean isEqualNode(Node arg) {
641 return xmlElementElement.isEqualNode(arg);
645 public Object getFeature(String feature, String version) {
646 return xmlElementElement.getFeature(feature, version);
650 public Object setUserData(String key, Object data, UserDataHandler handler) {
651 return xmlElementElement.setUserData(key, data, handler);
655 public Object getUserData(String key) {
656 return xmlElementElement.getUserData(key);
660 public String getTagName() {
661 return xmlElementElement.getTagName();
665 public String getAttribute(String name) {
666 return xmlElementElement.getAttribute(name);
670 public void setAttribute(String name, String value) throws DOMException {
671 xmlElementElement.setAttribute(name, value);
675 public void removeAttribute(String name) throws DOMException {
676 xmlElementElement.removeAttribute(name);
680 public Attr getAttributeNode(String name) {
681 return xmlElementElement.getAttributeNode(name);
685 public Attr setAttributeNode(Attr newAttr) throws DOMException {
686 return xmlElementElement.setAttributeNode(newAttr);
690 public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
691 return xmlElementElement.removeAttributeNode(oldAttr);
695 public NodeList getElementsByTagName(String name) {
696 return xmlElementElement.getElementsByTagName(name);
700 public String getAttributeNS(String namespaceURI, String localName) throws DOMException {
701 return xmlElementElement.getAttributeNS(namespaceURI, localName);
705 public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException {
706 xmlElementElement.setAttributeNS(namespaceURI, qualifiedName, value);
711 public void removeAttributeNS(String namespaceURI, String localName) throws DOMException {
712 xmlElementElement.removeAttributeNS(namespaceURI, localName);
716 public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException {
717 return xmlElementElement.getAttributeNodeNS(namespaceURI, localName);
721 public Attr setAttributeNodeNS(Attr newAttr) throws DOMException {
722 return xmlElementElement.setAttributeNodeNS(newAttr);
726 public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException {
727 return xmlElementElement.getElementsByTagNameNS(namespaceURI, localName);
731 public boolean hasAttribute(String name) {
732 return xmlElementElement.hasAttribute(name);
736 public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException {
737 return xmlElementElement.hasAttributeNS(namespaceURI, localName);
741 public TypeInfo getSchemaTypeInfo() {
742 return xmlElementElement.getSchemaTypeInfo();
746 public void setIdAttribute(String name, boolean isId) throws DOMException {
747 xmlElementElement.setIdAttribute(name, isId);
752 public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException {
753 xmlElementElement.setIdAttributeNS(namespaceURI, localName, isId);
757 public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException {
758 xmlElementElement.setIdAttributeNode(idAttr, isId);