-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- connectionSet: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=969 - datasets: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=1038 - signature: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=1040 - stylesheet: the same - xhtml: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=1187
- Loading branch information
1 parent
3787bd4
commit 0479dee
Showing
9 changed files
with
623 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
/* Copyright 2021 Mozilla Foundation | ||
* | ||
* 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. | ||
*/ | ||
|
||
import { $buildXFAObject, NamespaceIds } from "./namespaces.js"; | ||
import { StringObject, XFAObject, XFAObjectArray } from "./xfa_object.js"; | ||
|
||
const CONNECTION_SET_NS_ID = NamespaceIds.connectionSet.id; | ||
|
||
class ConnectionSet extends XFAObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "connectionSet", /* hasChildren = */ true); | ||
this.wsdlConnection = new XFAObjectArray(); | ||
this.xmlConnection = new XFAObjectArray(); | ||
this.xsdConnection = new XFAObjectArray(); | ||
} | ||
} | ||
|
||
class EffectiveInputPolicy extends XFAObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "effectiveInputPolicy"); | ||
this.id = attributes.id || ""; | ||
this.name = attributes.name || ""; | ||
this.use = attributes.use || ""; | ||
this.usehref = attributes.usehref || ""; | ||
} | ||
} | ||
|
||
class EffectiveOutputPolicy extends XFAObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "effectiveOutputPolicy"); | ||
this.id = attributes.id || ""; | ||
this.name = attributes.name || ""; | ||
this.use = attributes.use || ""; | ||
this.usehref = attributes.usehref || ""; | ||
} | ||
} | ||
|
||
class Operation extends StringObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "operation"); | ||
this.id = attributes.id || ""; | ||
this.input = attributes.input || ""; | ||
this.name = attributes.name || ""; | ||
this.output = attributes.output || ""; | ||
this.use = attributes.use || ""; | ||
this.usehref = attributes.usehref || ""; | ||
} | ||
} | ||
|
||
class RootElement extends StringObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "rootElement"); | ||
this.id = attributes.id || ""; | ||
this.name = attributes.name || ""; | ||
this.use = attributes.use || ""; | ||
this.usehref = attributes.usehref || ""; | ||
} | ||
} | ||
|
||
class SoapAction extends StringObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "soapAction"); | ||
this.id = attributes.id || ""; | ||
this.name = attributes.name || ""; | ||
this.use = attributes.use || ""; | ||
this.usehref = attributes.usehref || ""; | ||
} | ||
} | ||
|
||
class SoapAddress extends StringObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "soapAddress"); | ||
this.id = attributes.id || ""; | ||
this.name = attributes.name || ""; | ||
this.use = attributes.use || ""; | ||
this.usehref = attributes.usehref || ""; | ||
} | ||
} | ||
|
||
class Uri extends StringObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "uri"); | ||
this.id = attributes.id || ""; | ||
this.name = attributes.name || ""; | ||
this.use = attributes.use || ""; | ||
this.usehref = attributes.usehref || ""; | ||
} | ||
} | ||
|
||
class WsdlAddress extends StringObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "wsdlAddress"); | ||
this.id = attributes.id || ""; | ||
this.name = attributes.name || ""; | ||
this.use = attributes.use || ""; | ||
this.usehref = attributes.usehref || ""; | ||
} | ||
} | ||
|
||
class WsdlConnection extends XFAObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "wsdlConnection", /* hasChildren = */ true); | ||
this.dataDescription = attributes.dataDescription || ""; | ||
this.name = attributes.name || ""; | ||
this.effectiveInputPolicy = null; | ||
this.effectiveOutputPolicy = null; | ||
this.operation = null; | ||
this.soapAction = null; | ||
this.soapAddress = null; | ||
this.wsdlAddress = null; | ||
} | ||
} | ||
|
||
class XmlConnection extends XFAObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "xmlConnection", /* hasChildren = */ true); | ||
this.dataDescription = attributes.dataDescription || ""; | ||
this.name = attributes.name || ""; | ||
this.uri = null; | ||
} | ||
} | ||
|
||
class XsdConnection extends XFAObject { | ||
constructor(attributes) { | ||
super(CONNECTION_SET_NS_ID, "xsdConnection", /* hasChildren = */ true); | ||
this.dataDescription = attributes.dataDescription || ""; | ||
this.name = attributes.name || ""; | ||
this.rootElement = null; | ||
this.uri = null; | ||
} | ||
} | ||
|
||
class ConnectionSetNamespace { | ||
static [$buildXFAObject](name, attributes) { | ||
if (ConnectionSetNamespace.hasOwnProperty(name)) { | ||
return ConnectionSetNamespace[name](attributes); | ||
} | ||
return undefined; | ||
} | ||
|
||
static connectionSet(attrs) { | ||
return new ConnectionSet(attrs); | ||
} | ||
|
||
static effectiveInputPolicy(attrs) { | ||
return new EffectiveInputPolicy(attrs); | ||
} | ||
|
||
static effectiveOutputPolicy(attrs) { | ||
return new EffectiveOutputPolicy(attrs); | ||
} | ||
|
||
static operation(attrs) { | ||
return new Operation(attrs); | ||
} | ||
|
||
static rootElement(attrs) { | ||
return new RootElement(attrs); | ||
} | ||
|
||
static soapAction(attrs) { | ||
return new SoapAction(attrs); | ||
} | ||
|
||
static soapAddress(attrs) { | ||
return new SoapAddress(attrs); | ||
} | ||
|
||
static uri(attrs) { | ||
return new Uri(attrs); | ||
} | ||
|
||
static wsdlAddress(attrs) { | ||
return new WsdlAddress(attrs); | ||
} | ||
|
||
static wsdlConnection(attrs) { | ||
return new WsdlConnection(attrs); | ||
} | ||
|
||
static xmlConnection(attrs) { | ||
return new XmlConnection(attrs); | ||
} | ||
|
||
static xsdConnection(attrs) { | ||
return new XsdConnection(attrs); | ||
} | ||
} | ||
|
||
export { ConnectionSetNamespace }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* Copyright 2021 Mozilla Foundation | ||
* | ||
* 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. | ||
*/ | ||
|
||
import { $buildXFAObject, NamespaceIds } from "./namespaces.js"; | ||
import { | ||
$namespaceId, | ||
$nodeName, | ||
$onChildCheck, | ||
XFAObject, | ||
XmlObject, | ||
} from "./xfa_object.js"; | ||
|
||
const DATASETS_NS_ID = NamespaceIds.datasets.id; | ||
|
||
class Data extends XmlObject { | ||
constructor(attributes) { | ||
super(DATASETS_NS_ID, "data", attributes); | ||
} | ||
} | ||
|
||
class Datasets extends XFAObject { | ||
constructor(attributes) { | ||
super(DATASETS_NS_ID, "datasets", /* hasChildren = */ true); | ||
this.data = null; | ||
this.Signature = null; | ||
} | ||
|
||
[$onChildCheck](child) { | ||
const name = child[$nodeName]; | ||
if (name === "data") { | ||
return child[$namespaceId] === DATASETS_NS_ID; | ||
} | ||
if (name === "Signature") { | ||
return child[$namespaceId] === NamespaceIds.signature.id; | ||
} | ||
return false; | ||
} | ||
} | ||
|
||
class DatasetsNamespace { | ||
static [$buildXFAObject](name, attributes) { | ||
if (DatasetsNamespace.hasOwnProperty(name)) { | ||
return DatasetsNamespace[name](attributes); | ||
} | ||
return undefined; | ||
} | ||
|
||
static datasets(attributes) { | ||
return new Datasets(attributes); | ||
} | ||
|
||
static data(attributes) { | ||
return new Data(attributes); | ||
} | ||
} | ||
|
||
export { DatasetsNamespace }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* Copyright 2021 Mozilla Foundation | ||
* | ||
* 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. | ||
*/ | ||
|
||
import { $buildXFAObject, NamespaceIds } from "./namespaces.js"; | ||
import { XFAObject } from "./xfa_object.js"; | ||
|
||
const SIGNATURE_NS_ID = NamespaceIds.signature.id; | ||
|
||
class Signature extends XFAObject { | ||
constructor(attributes) { | ||
super(SIGNATURE_NS_ID, "signature", /* hasChildren = */ true); | ||
} | ||
} | ||
|
||
class SignatureNamespace { | ||
static [$buildXFAObject](name, attributes) { | ||
if (SignatureNamespace.hasOwnProperty(name)) { | ||
return SignatureNamespace[name](attributes); | ||
} | ||
return undefined; | ||
} | ||
|
||
static signature(attributes) { | ||
return new Signature(attributes); | ||
} | ||
} | ||
|
||
export { SignatureNamespace }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* Copyright 2021 Mozilla Foundation | ||
* | ||
* 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. | ||
*/ | ||
|
||
import { $buildXFAObject, NamespaceIds } from "./namespaces.js"; | ||
import { XFAObject } from "./xfa_object.js"; | ||
|
||
const STYLESHEET_NS_ID = NamespaceIds.stylesheet.id; | ||
|
||
class Stylesheet extends XFAObject { | ||
constructor(attributes) { | ||
super(STYLESHEET_NS_ID, "stylesheet", /* hasChildren = */ true); | ||
} | ||
} | ||
|
||
class StylesheetNamespace { | ||
static [$buildXFAObject](name, attributes) { | ||
if (StylesheetNamespace.hasOwnProperty(name)) { | ||
return StylesheetNamespace[name](attributes); | ||
} | ||
return undefined; | ||
} | ||
|
||
static stylesheet(attributes) { | ||
return new Stylesheet(attributes); | ||
} | ||
} | ||
|
||
export { StylesheetNamespace }; |
Oops, something went wrong.