connection_set.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /**
  2. * @licstart The following is the entire license notice for the
  3. * JavaScript code in this page
  4. *
  5. * Copyright 2022 Mozilla Foundation
  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
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  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. *
  19. * @licend The above is the entire license notice for the
  20. * JavaScript code in this page
  21. */
  22. "use strict";
  23. Object.defineProperty(exports, "__esModule", {
  24. value: true
  25. });
  26. exports.ConnectionSetNamespace = void 0;
  27. var _namespaces = require("./namespaces.js");
  28. var _xfa_object = require("./xfa_object.js");
  29. const CONNECTION_SET_NS_ID = _namespaces.NamespaceIds.connectionSet.id;
  30. class ConnectionSet extends _xfa_object.XFAObject {
  31. constructor(attributes) {
  32. super(CONNECTION_SET_NS_ID, "connectionSet", true);
  33. this.wsdlConnection = new _xfa_object.XFAObjectArray();
  34. this.xmlConnection = new _xfa_object.XFAObjectArray();
  35. this.xsdConnection = new _xfa_object.XFAObjectArray();
  36. }
  37. }
  38. class EffectiveInputPolicy extends _xfa_object.XFAObject {
  39. constructor(attributes) {
  40. super(CONNECTION_SET_NS_ID, "effectiveInputPolicy");
  41. this.id = attributes.id || "";
  42. this.name = attributes.name || "";
  43. this.use = attributes.use || "";
  44. this.usehref = attributes.usehref || "";
  45. }
  46. }
  47. class EffectiveOutputPolicy extends _xfa_object.XFAObject {
  48. constructor(attributes) {
  49. super(CONNECTION_SET_NS_ID, "effectiveOutputPolicy");
  50. this.id = attributes.id || "";
  51. this.name = attributes.name || "";
  52. this.use = attributes.use || "";
  53. this.usehref = attributes.usehref || "";
  54. }
  55. }
  56. class Operation extends _xfa_object.StringObject {
  57. constructor(attributes) {
  58. super(CONNECTION_SET_NS_ID, "operation");
  59. this.id = attributes.id || "";
  60. this.input = attributes.input || "";
  61. this.name = attributes.name || "";
  62. this.output = attributes.output || "";
  63. this.use = attributes.use || "";
  64. this.usehref = attributes.usehref || "";
  65. }
  66. }
  67. class RootElement extends _xfa_object.StringObject {
  68. constructor(attributes) {
  69. super(CONNECTION_SET_NS_ID, "rootElement");
  70. this.id = attributes.id || "";
  71. this.name = attributes.name || "";
  72. this.use = attributes.use || "";
  73. this.usehref = attributes.usehref || "";
  74. }
  75. }
  76. class SoapAction extends _xfa_object.StringObject {
  77. constructor(attributes) {
  78. super(CONNECTION_SET_NS_ID, "soapAction");
  79. this.id = attributes.id || "";
  80. this.name = attributes.name || "";
  81. this.use = attributes.use || "";
  82. this.usehref = attributes.usehref || "";
  83. }
  84. }
  85. class SoapAddress extends _xfa_object.StringObject {
  86. constructor(attributes) {
  87. super(CONNECTION_SET_NS_ID, "soapAddress");
  88. this.id = attributes.id || "";
  89. this.name = attributes.name || "";
  90. this.use = attributes.use || "";
  91. this.usehref = attributes.usehref || "";
  92. }
  93. }
  94. class Uri extends _xfa_object.StringObject {
  95. constructor(attributes) {
  96. super(CONNECTION_SET_NS_ID, "uri");
  97. this.id = attributes.id || "";
  98. this.name = attributes.name || "";
  99. this.use = attributes.use || "";
  100. this.usehref = attributes.usehref || "";
  101. }
  102. }
  103. class WsdlAddress extends _xfa_object.StringObject {
  104. constructor(attributes) {
  105. super(CONNECTION_SET_NS_ID, "wsdlAddress");
  106. this.id = attributes.id || "";
  107. this.name = attributes.name || "";
  108. this.use = attributes.use || "";
  109. this.usehref = attributes.usehref || "";
  110. }
  111. }
  112. class WsdlConnection extends _xfa_object.XFAObject {
  113. constructor(attributes) {
  114. super(CONNECTION_SET_NS_ID, "wsdlConnection", true);
  115. this.dataDescription = attributes.dataDescription || "";
  116. this.name = attributes.name || "";
  117. this.effectiveInputPolicy = null;
  118. this.effectiveOutputPolicy = null;
  119. this.operation = null;
  120. this.soapAction = null;
  121. this.soapAddress = null;
  122. this.wsdlAddress = null;
  123. }
  124. }
  125. class XmlConnection extends _xfa_object.XFAObject {
  126. constructor(attributes) {
  127. super(CONNECTION_SET_NS_ID, "xmlConnection", true);
  128. this.dataDescription = attributes.dataDescription || "";
  129. this.name = attributes.name || "";
  130. this.uri = null;
  131. }
  132. }
  133. class XsdConnection extends _xfa_object.XFAObject {
  134. constructor(attributes) {
  135. super(CONNECTION_SET_NS_ID, "xsdConnection", true);
  136. this.dataDescription = attributes.dataDescription || "";
  137. this.name = attributes.name || "";
  138. this.rootElement = null;
  139. this.uri = null;
  140. }
  141. }
  142. class ConnectionSetNamespace {
  143. static [_namespaces.$buildXFAObject](name, attributes) {
  144. if (ConnectionSetNamespace.hasOwnProperty(name)) {
  145. return ConnectionSetNamespace[name](attributes);
  146. }
  147. return undefined;
  148. }
  149. static connectionSet(attrs) {
  150. return new ConnectionSet(attrs);
  151. }
  152. static effectiveInputPolicy(attrs) {
  153. return new EffectiveInputPolicy(attrs);
  154. }
  155. static effectiveOutputPolicy(attrs) {
  156. return new EffectiveOutputPolicy(attrs);
  157. }
  158. static operation(attrs) {
  159. return new Operation(attrs);
  160. }
  161. static rootElement(attrs) {
  162. return new RootElement(attrs);
  163. }
  164. static soapAction(attrs) {
  165. return new SoapAction(attrs);
  166. }
  167. static soapAddress(attrs) {
  168. return new SoapAddress(attrs);
  169. }
  170. static uri(attrs) {
  171. return new Uri(attrs);
  172. }
  173. static wsdlAddress(attrs) {
  174. return new WsdlAddress(attrs);
  175. }
  176. static wsdlConnection(attrs) {
  177. return new WsdlConnection(attrs);
  178. }
  179. static xmlConnection(attrs) {
  180. return new XmlConnection(attrs);
  181. }
  182. static xsdConnection(attrs) {
  183. return new XsdConnection(attrs);
  184. }
  185. }
  186. exports.ConnectionSetNamespace = ConnectionSetNamespace;