[ows.js] Update on Jsonix status and OGC Schemas

Aleksei Valikov valikov at gmx.net
Wed Sep 3 00:21:15 PDT 2014


Hi,

here's a short update on the Jsonix progress in the last days.

We've started the OGC Schema project on GitHub (
https://github.com/highsource/ogc-schemas). OGC Schemas compiles (as you
guess) OGC Schemas producing JAXB schema-derived classes as well as Jsonix
mappings:

https://github.com/highsource/ogc-schemas/tree/master/scripts

With this project, there will be no need to compile the schemas on your
own. Just take the already compiled mappings. In code it looks as follows:

var XLink_1_0 = require('W3C-Schemas').XLink_1_0;var OWS_1_1_0 =
require('OGC-Schemas').OWS_1_1_0;var WPS_1_0_0 =
require('OGC-Schemas').WPS_1_0_0;
var context =  new Jsonix.Context([XLink_1_0, OWS_1_1_0,
WPS_1_0_0]);var unmarshaller =
context.createUnmarshaller();unmarshaller.unmarshalFile("tests/WPS/1.0.0/execute-01.xml",
function(result) {
    test.equal("geom", result.value.dataInputs.input[0].title.value);
    test.done();});



This is code above a node.js version, will look similar in browser. Just
include OGC-Schemas/OWS_1_1_0.js.
RequireJS/AMD is supported out of the box.

See the Jsonix tests for OGC Schemas here:
https://github.com/highsource/ogc-schemas/tree/master/scripts/tests

The first version (2.0.0 due to historic reasons) already published to NPM:

https://www.npmjs.org/package/ogc-schemas

Bower registration will come in one of the next versions.

Last days I\ve been adding more and more schemas, here's what is currently
supported:

* Filter_1_0_0
* Filter_1_1_0
* Filter_2_0
* GML_2_1_2
* GML_3_1_1
* SMIL_2_0
* SMIL_2_0_Language
* OWS_1_0_0
* OWS_1_1_0
* OWS_2_0
* WCS_1_0_0
* WCS_1_1
* WFS_1_0_0
* WFS_1_1_0
* WFS_2_0
* WMS_1_0_0
* WMS_1_1_0
* WMS_1_1_1
* WMS_1_3_0
* WPS_1_0_0

So I think in a couple of days we'll support everything the Python OWSLib
supports. I takes ca. 15-30 min to add a new schema/version.

I have to admit that there were a couple of problems compiling these
schemas, however everything was very well resolveable. Jsonix 2.0.12 and
Jsonix Schema Compiler 2.1.0 are published now (NPM, Bower, Maven Central).


I would like to thank Bart van den Eijnden for his great help a lot with
the project.


Now I'd like to addres a few points from Éric Lemoine's mail:

* Jsonix creates plain JavaScript objects with almost no own types. Few
exceptions are QNames and DateTime/Calendar types (both can be avoided).
* Jsonix only addresses XML parsing/serializing (unmarshalling/marshalling)
XML into JavaScript and vice versa. Jsonix on its own will not create
instances of OL or Leaflet classes, this is not in scope. The purpose of
Jsonix is to releave you from the XML parsing/serializing peculiarities so
that you can concentrate on the pure JavaScript payload in a predictable
form.
* Jsonix works with OL2 in any case and will be able to work in OL 3. Not
tested yet but I don't expect problems there. Leaflet should also be no
problem. In fact, should work basically with anything since I'm extremely
cautious about globals pollution and such things.
* Jsonix is not yet Closure-ready but I think this is an important feature
and this will be implemented. So you should be able to use a fraction of
formats then.

Best wishes,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/owsjs/attachments/20140903/4fa77edc/attachment.html>


More information about the owsjs mailing list