Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / org / xml / sax / helpers / NamespaceSupport.js
index dfc3f1f..715127e 100644 (file)
-Clazz.declarePackage ("org.xml.sax.helpers");\r
-Clazz.load (["java.util.Vector"], "org.xml.sax.helpers.NamespaceSupport", ["java.lang.IllegalStateException", "java.util.EmptyStackException", "$.Hashtable"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.contexts = null;\r
-this.currentContext = null;\r
-this.contextPos = 0;\r
-this.namespaceDeclUris = false;\r
-if (!Clazz.isClassDefined ("org.xml.sax.helpers.NamespaceSupport.Context")) {\r
-org.xml.sax.helpers.NamespaceSupport.$NamespaceSupport$Context$ ();\r
-}\r
-Clazz.instantialize (this, arguments);\r
-}, org.xml.sax.helpers, "NamespaceSupport");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.reset ();\r
-});\r
-Clazz.defineMethod (c$, "reset", \r
-function () {\r
-this.contexts =  new Array (32);\r
-this.namespaceDeclUris = false;\r
-this.contextPos = 0;\r
-this.contexts[this.contextPos] = this.currentContext = Clazz.innerTypeInstance (org.xml.sax.helpers.NamespaceSupport.Context, this, null);\r
-this.currentContext.declarePrefix ("xml", "http://www.w3.org/XML/1998/namespace");\r
-});\r
-Clazz.defineMethod (c$, "pushContext", \r
-function () {\r
-var max = this.contexts.length;\r
-this.contexts[this.contextPos].declsOK = false;\r
-this.contextPos++;\r
-if (this.contextPos >= max) {\r
-var newContexts =  new Array (max * 2);\r
-System.arraycopy (this.contexts, 0, newContexts, 0, max);\r
-max *= 2;\r
-this.contexts = newContexts;\r
-}this.currentContext = this.contexts[this.contextPos];\r
-if (this.currentContext == null) {\r
-this.contexts[this.contextPos] = this.currentContext = Clazz.innerTypeInstance (org.xml.sax.helpers.NamespaceSupport.Context, this, null);\r
-}if (this.contextPos > 0) {\r
-this.currentContext.setParent (this.contexts[this.contextPos - 1]);\r
-}});\r
-Clazz.defineMethod (c$, "popContext", \r
-function () {\r
-this.contexts[this.contextPos].clear ();\r
-this.contextPos--;\r
-if (this.contextPos < 0) {\r
-throw  new java.util.EmptyStackException ();\r
-}this.currentContext = this.contexts[this.contextPos];\r
-});\r
-Clazz.defineMethod (c$, "declarePrefix", \r
-function (prefix, uri) {\r
-if (prefix.equals ("xml") || prefix.equals ("xmlns")) {\r
-return false;\r
-} else {\r
-this.currentContext.declarePrefix (prefix, uri);\r
-return true;\r
-}}, "~S,~S");\r
-Clazz.defineMethod (c$, "processName", \r
-function (qName, parts, isAttribute) {\r
-var myParts = this.currentContext.processName (qName, isAttribute);\r
-if (myParts == null) {\r
-return null;\r
-} else {\r
-parts[0] = myParts[0];\r
-parts[1] = myParts[1];\r
-parts[2] = myParts[2];\r
-return parts;\r
-}}, "~S,~A,~B");\r
-Clazz.defineMethod (c$, "getURI", \r
-function (prefix) {\r
-return this.currentContext.getURI (prefix);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getPrefixes", \r
-function () {\r
-return this.currentContext.getPrefixes ();\r
-});\r
-Clazz.defineMethod (c$, "getPrefix", \r
-function (uri) {\r
-return this.currentContext.getPrefix (uri);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getPrefixes", \r
-function (uri) {\r
-var prefixes =  new java.util.Vector ();\r
-var allPrefixes = this.getPrefixes ();\r
-while (allPrefixes.hasMoreElements ()) {\r
-var prefix = allPrefixes.nextElement ();\r
-if (uri.equals (this.getURI (prefix))) {\r
-prefixes.addElement (prefix);\r
-}}\r
-return prefixes.elements ();\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getDeclaredPrefixes", \r
-function () {\r
-return this.currentContext.getDeclaredPrefixes ();\r
-});\r
-Clazz.defineMethod (c$, "setNamespaceDeclUris", \r
-function (value) {\r
-if (this.contextPos != 0) throw  new IllegalStateException ();\r
-if (value == this.namespaceDeclUris) return;\r
-this.namespaceDeclUris = value;\r
-if (value) this.currentContext.declarePrefix ("xmlns", "http://www.w3.org/xmlns/2000/");\r
- else {\r
-this.contexts[this.contextPos] = this.currentContext = Clazz.innerTypeInstance (org.xml.sax.helpers.NamespaceSupport.Context, this, null);\r
-this.currentContext.declarePrefix ("xml", "http://www.w3.org/XML/1998/namespace");\r
-}}, "~B");\r
-Clazz.defineMethod (c$, "isNamespaceDeclUris", \r
-function () {\r
-return this.namespaceDeclUris;\r
-});\r
-c$.$NamespaceSupport$Context$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.prefixTable = null;\r
-this.uriTable = null;\r
-this.elementNameTable = null;\r
-this.attributeNameTable = null;\r
-this.defaultNS = null;\r
-this.declsOK = true;\r
-this.declarations = null;\r
-this.declSeen = false;\r
-this.parent = null;\r
-Clazz.instantialize (this, arguments);\r
-}, org.xml.sax.helpers.NamespaceSupport, "Context");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.copyTables ();\r
-});\r
-Clazz.defineMethod (c$, "setParent", \r
-function (a) {\r
-this.parent = a;\r
-this.declarations = null;\r
-this.prefixTable = a.prefixTable;\r
-this.uriTable = a.uriTable;\r
-this.elementNameTable = a.elementNameTable;\r
-this.attributeNameTable = a.attributeNameTable;\r
-this.defaultNS = a.defaultNS;\r
-this.declSeen = false;\r
-this.declsOK = true;\r
-}, "org.xml.sax.helpers.NamespaceSupport.Context");\r
-Clazz.defineMethod (c$, "clear", \r
-function () {\r
-this.parent = null;\r
-this.prefixTable = null;\r
-this.uriTable = null;\r
-this.elementNameTable = null;\r
-this.attributeNameTable = null;\r
-this.defaultNS = null;\r
-});\r
-Clazz.defineMethod (c$, "declarePrefix", \r
-function (a, b) {\r
-if (!this.declsOK) throw  new IllegalStateException ("can't declare any more prefixes in this context");\r
-if (!this.declSeen) {\r
-this.copyTables ();\r
-}if (this.declarations == null) {\r
-this.declarations =  new java.util.Vector ();\r
-}a = a.intern ();\r
-b = b.intern ();\r
-if ("".equals (a)) {\r
-if ("".equals (b)) {\r
-this.defaultNS = null;\r
-} else {\r
-this.defaultNS = b;\r
-}} else {\r
-this.prefixTable.put (a, b);\r
-this.uriTable.put (b, a);\r
-}this.declarations.addElement (a);\r
-}, "~S,~S");\r
-Clazz.defineMethod (c$, "processName", \r
-function (a, b) {\r
-var c;\r
-var d;\r
-this.declsOK = false;\r
-if (b) {\r
-d = this.attributeNameTable;\r
-} else {\r
-d = this.elementNameTable;\r
-}c = d.get (a);\r
-if (c != null) {\r
-return c;\r
-}c =  new Array (3);\r
-c[2] = a.intern ();\r
-var e = a.indexOf (':');\r
-if (e == -1) {\r
-if (b) {\r
-if (a === "xmlns" && this.b$["org.xml.sax.helpers.NamespaceSupport"].namespaceDeclUris) c[0] = "http://www.w3.org/xmlns/2000/";\r
- else c[0] = "";\r
-} else if (this.defaultNS == null) {\r
-c[0] = "";\r
-} else {\r
-c[0] = this.defaultNS;\r
-}c[1] = c[2];\r
-} else {\r
-var f = a.substring (0, e);\r
-var g = a.substring (e + 1);\r
-var h;\r
-if ("".equals (f)) {\r
-h = this.defaultNS;\r
-} else {\r
-h = this.prefixTable.get (f);\r
-}if (h == null || (!b && "xmlns".equals (f))) {\r
-return null;\r
-}c[0] = h;\r
-c[1] = g.intern ();\r
-}d.put (c[2], c);\r
-return c;\r
-}, "~S,~B");\r
-Clazz.defineMethod (c$, "getURI", \r
-function (a) {\r
-if ("".equals (a)) {\r
-return this.defaultNS;\r
-} else if (this.prefixTable == null) {\r
-return null;\r
-} else {\r
-return this.prefixTable.get (a);\r
-}}, "~S");\r
-Clazz.defineMethod (c$, "getPrefix", \r
-function (a) {\r
-if (this.uriTable == null) {\r
-return null;\r
-} else {\r
-return this.uriTable.get (a);\r
-}}, "~S");\r
-Clazz.defineMethod (c$, "getDeclaredPrefixes", \r
-function () {\r
-if (this.declarations == null) {\r
-return org.xml.sax.helpers.NamespaceSupport.EMPTY_ENUMERATION;\r
-} else {\r
-return this.declarations.elements ();\r
-}});\r
-Clazz.defineMethod (c$, "getPrefixes", \r
-function () {\r
-if (this.prefixTable == null) {\r
-return org.xml.sax.helpers.NamespaceSupport.EMPTY_ENUMERATION;\r
-} else {\r
-return this.prefixTable.keys ();\r
-}});\r
-Clazz.defineMethod (c$, "copyTables", \r
- function () {\r
-if (this.prefixTable != null) {\r
-this.prefixTable = this.prefixTable.clone ();\r
-} else {\r
-this.prefixTable =  new java.util.Hashtable ();\r
-}if (this.uriTable != null) {\r
-this.uriTable = this.uriTable.clone ();\r
-} else {\r
-this.uriTable =  new java.util.Hashtable ();\r
-}this.elementNameTable =  new java.util.Hashtable ();\r
-this.attributeNameTable =  new java.util.Hashtable ();\r
-this.declSeen = true;\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-Clazz.defineStatics (c$,\r
-"XMLNS", "http://www.w3.org/XML/1998/namespace",\r
-"NSDECL", "http://www.w3.org/xmlns/2000/");\r
-c$.EMPTY_ENUMERATION = c$.prototype.EMPTY_ENUMERATION =  new java.util.Vector ().elements ();\r
-});\r
+Clazz.declarePackage ("org.xml.sax.helpers");
+Clazz.load (["java.util.Vector"], "org.xml.sax.helpers.NamespaceSupport", ["java.lang.IllegalStateException", "java.util.EmptyStackException", "$.Hashtable"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.contexts = null;
+this.currentContext = null;
+this.contextPos = 0;
+this.namespaceDeclUris = false;
+if (!Clazz.isClassDefined ("org.xml.sax.helpers.NamespaceSupport.Context")) {
+org.xml.sax.helpers.NamespaceSupport.$NamespaceSupport$Context$ ();
+}
+Clazz.instantialize (this, arguments);
+}, org.xml.sax.helpers, "NamespaceSupport");
+Clazz.makeConstructor (c$, 
+function () {
+this.reset ();
+});
+Clazz.defineMethod (c$, "reset", 
+function () {
+this.contexts =  new Array (32);
+this.namespaceDeclUris = false;
+this.contextPos = 0;
+this.contexts[this.contextPos] = this.currentContext = Clazz.innerTypeInstance (org.xml.sax.helpers.NamespaceSupport.Context, this, null);
+this.currentContext.declarePrefix ("xml", "http://www.w3.org/XML/1998/namespace");
+});
+Clazz.defineMethod (c$, "pushContext", 
+function () {
+var max = this.contexts.length;
+this.contexts[this.contextPos].declsOK = false;
+this.contextPos++;
+if (this.contextPos >= max) {
+var newContexts =  new Array (max * 2);
+System.arraycopy (this.contexts, 0, newContexts, 0, max);
+max *= 2;
+this.contexts = newContexts;
+}this.currentContext = this.contexts[this.contextPos];
+if (this.currentContext == null) {
+this.contexts[this.contextPos] = this.currentContext = Clazz.innerTypeInstance (org.xml.sax.helpers.NamespaceSupport.Context, this, null);
+}if (this.contextPos > 0) {
+this.currentContext.setParent (this.contexts[this.contextPos - 1]);
+}});
+Clazz.defineMethod (c$, "popContext", 
+function () {
+this.contexts[this.contextPos].clear ();
+this.contextPos--;
+if (this.contextPos < 0) {
+throw  new java.util.EmptyStackException ();
+}this.currentContext = this.contexts[this.contextPos];
+});
+Clazz.defineMethod (c$, "declarePrefix", 
+function (prefix, uri) {
+if (prefix.equals ("xml") || prefix.equals ("xmlns")) {
+return false;
+} else {
+this.currentContext.declarePrefix (prefix, uri);
+return true;
+}}, "~S,~S");
+Clazz.defineMethod (c$, "processName", 
+function (qName, parts, isAttribute) {
+var myParts = this.currentContext.processName (qName, isAttribute);
+if (myParts == null) {
+return null;
+} else {
+parts[0] = myParts[0];
+parts[1] = myParts[1];
+parts[2] = myParts[2];
+return parts;
+}}, "~S,~A,~B");
+Clazz.defineMethod (c$, "getURI", 
+function (prefix) {
+return this.currentContext.getURI (prefix);
+}, "~S");
+Clazz.defineMethod (c$, "getPrefixes", 
+function () {
+return this.currentContext.getPrefixes ();
+});
+Clazz.defineMethod (c$, "getPrefix", 
+function (uri) {
+return this.currentContext.getPrefix (uri);
+}, "~S");
+Clazz.defineMethod (c$, "getPrefixes", 
+function (uri) {
+var prefixes =  new java.util.Vector ();
+var allPrefixes = this.getPrefixes ();
+while (allPrefixes.hasMoreElements ()) {
+var prefix = allPrefixes.nextElement ();
+if (uri.equals (this.getURI (prefix))) {
+prefixes.addElement (prefix);
+}}
+return prefixes.elements ();
+}, "~S");
+Clazz.defineMethod (c$, "getDeclaredPrefixes", 
+function () {
+return this.currentContext.getDeclaredPrefixes ();
+});
+Clazz.defineMethod (c$, "setNamespaceDeclUris", 
+function (value) {
+if (this.contextPos != 0) throw  new IllegalStateException ();
+if (value == this.namespaceDeclUris) return;
+this.namespaceDeclUris = value;
+if (value) this.currentContext.declarePrefix ("xmlns", "http://www.w3.org/xmlns/2000/");
+ else {
+this.contexts[this.contextPos] = this.currentContext = Clazz.innerTypeInstance (org.xml.sax.helpers.NamespaceSupport.Context, this, null);
+this.currentContext.declarePrefix ("xml", "http://www.w3.org/XML/1998/namespace");
+}}, "~B");
+Clazz.defineMethod (c$, "isNamespaceDeclUris", 
+function () {
+return this.namespaceDeclUris;
+});
+c$.$NamespaceSupport$Context$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.prefixTable = null;
+this.uriTable = null;
+this.elementNameTable = null;
+this.attributeNameTable = null;
+this.defaultNS = null;
+this.declsOK = true;
+this.declarations = null;
+this.declSeen = false;
+this.parent = null;
+Clazz.instantialize (this, arguments);
+}, org.xml.sax.helpers.NamespaceSupport, "Context");
+Clazz.makeConstructor (c$, 
+function () {
+this.copyTables ();
+});
+Clazz.defineMethod (c$, "setParent", 
+function (a) {
+this.parent = a;
+this.declarations = null;
+this.prefixTable = a.prefixTable;
+this.uriTable = a.uriTable;
+this.elementNameTable = a.elementNameTable;
+this.attributeNameTable = a.attributeNameTable;
+this.defaultNS = a.defaultNS;
+this.declSeen = false;
+this.declsOK = true;
+}, "org.xml.sax.helpers.NamespaceSupport.Context");
+Clazz.defineMethod (c$, "clear", 
+function () {
+this.parent = null;
+this.prefixTable = null;
+this.uriTable = null;
+this.elementNameTable = null;
+this.attributeNameTable = null;
+this.defaultNS = null;
+});
+Clazz.defineMethod (c$, "declarePrefix", 
+function (a, b) {
+if (!this.declsOK) throw  new IllegalStateException ("can't declare any more prefixes in this context");
+if (!this.declSeen) {
+this.copyTables ();
+}if (this.declarations == null) {
+this.declarations =  new java.util.Vector ();
+}a = a.intern ();
+b = b.intern ();
+if ("".equals (a)) {
+if ("".equals (b)) {
+this.defaultNS = null;
+} else {
+this.defaultNS = b;
+}} else {
+this.prefixTable.put (a, b);
+this.uriTable.put (b, a);
+}this.declarations.addElement (a);
+}, "~S,~S");
+Clazz.defineMethod (c$, "processName", 
+function (a, b) {
+var c;
+var d;
+this.declsOK = false;
+if (b) {
+d = this.attributeNameTable;
+} else {
+d = this.elementNameTable;
+}c = d.get (a);
+if (c != null) {
+return c;
+}c =  new Array (3);
+c[2] = a.intern ();
+var e = a.indexOf (':');
+if (e == -1) {
+if (b) {
+if (a === "xmlns" && this.b$["org.xml.sax.helpers.NamespaceSupport"].namespaceDeclUris) c[0] = "http://www.w3.org/xmlns/2000/";
+ else c[0] = "";
+} else if (this.defaultNS == null) {
+c[0] = "";
+} else {
+c[0] = this.defaultNS;
+}c[1] = c[2];
+} else {
+var f = a.substring (0, e);
+var g = a.substring (e + 1);
+var h;
+if ("".equals (f)) {
+h = this.defaultNS;
+} else {
+h = this.prefixTable.get (f);
+}if (h == null || (!b && "xmlns".equals (f))) {
+return null;
+}c[0] = h;
+c[1] = g.intern ();
+}d.put (c[2], c);
+return c;
+}, "~S,~B");
+Clazz.defineMethod (c$, "getURI", 
+function (a) {
+if ("".equals (a)) {
+return this.defaultNS;
+} else if (this.prefixTable == null) {
+return null;
+} else {
+return this.prefixTable.get (a);
+}}, "~S");
+Clazz.defineMethod (c$, "getPrefix", 
+function (a) {
+if (this.uriTable == null) {
+return null;
+} else {
+return this.uriTable.get (a);
+}}, "~S");
+Clazz.defineMethod (c$, "getDeclaredPrefixes", 
+function () {
+if (this.declarations == null) {
+return org.xml.sax.helpers.NamespaceSupport.EMPTY_ENUMERATION;
+} else {
+return this.declarations.elements ();
+}});
+Clazz.defineMethod (c$, "getPrefixes", 
+function () {
+if (this.prefixTable == null) {
+return org.xml.sax.helpers.NamespaceSupport.EMPTY_ENUMERATION;
+} else {
+return this.prefixTable.keys ();
+}});
+Clazz.defineMethod (c$, "copyTables", 
+ function () {
+if (this.prefixTable != null) {
+this.prefixTable = this.prefixTable.clone ();
+} else {
+this.prefixTable =  new java.util.Hashtable ();
+}if (this.uriTable != null) {
+this.uriTable = this.uriTable.clone ();
+} else {
+this.uriTable =  new java.util.Hashtable ();
+}this.elementNameTable =  new java.util.Hashtable ();
+this.attributeNameTable =  new java.util.Hashtable ();
+this.declSeen = true;
+});
+c$ = Clazz.p0p ();
+};
+Clazz.defineStatics (c$,
+"XMLNS", "http://www.w3.org/XML/1998/namespace",
+"NSDECL", "http://www.w3.org/xmlns/2000/");
+c$.EMPTY_ENUMERATION = c$.prototype.EMPTY_ENUMERATION =  new java.util.Vector ().elements ();
+});