home *** CD-ROM | disk | FTP | other *** search
- package com.ms.xml.dso;
-
- import com.ms.xml.om.Element;
- import com.ms.xml.om.ElementFactory;
- import com.ms.xml.util.Name;
- import java.util.Hashtable;
-
- class SchemaNode {
- // $FF: renamed from: e com.ms.xml.om.Element
- Element field_0;
- Hashtable rows;
- Name name;
- Element parent;
- ElementFactory factory;
-
- SchemaNode(Element var1, ElementFactory var2, Name var3) {
- this.parent = var1;
- this.name = var3;
- this.factory = var2;
- }
-
- void createElement(boolean var1) {
- if (var1) {
- this.field_0 = this.factory.createElement(this.parent, 0, XMLRowsetProvider.nameROWSET, (String)null);
- } else {
- this.field_0 = this.factory.createElement(this.parent, 0, XMLRowsetProvider.nameCOLUMN, (String)null);
- }
-
- this.field_0.setAttribute(XMLRowsetProvider.nameNAME, this.name.toString());
- }
-
- void addRow(Name var1, SchemaNode var2) {
- if (this.rows == null) {
- this.rows = new Hashtable(13);
- }
-
- this.rows.put(var1, var2);
- }
-
- SchemaNode setRow(Name var1) {
- if (this.field_0 == null) {
- this.createElement(true);
- } else if (this.field_0.getTagName() != XMLRowsetProvider.nameROWSET) {
- this.parent.removeChild(this.field_0);
- this.createElement(true);
- }
-
- SchemaNode var2 = this.getRow(var1);
- if (var2 == null) {
- var2 = new SchemaNode(this.field_0, this.factory, var1);
- this.addRow(var1, var2);
- }
-
- return var2;
- }
-
- SchemaNode getRow(Name var1) {
- return this.rows == null ? null : (SchemaNode)this.rows.get(var1);
- }
- }
-