oais-structure-drb notes

This module bridges GAEL Consultant's Java DRB ("Data Request Broker", fr.gael.drb) onto the common StructureNode model, like oais-structure-dfdl does for Apache Daffodil. It is written and tested against DRB 2.5.13, which is licensed under the GNU LGPL v3 and is served from this repository's own third-party/maven-repo (DRB is not on Maven Central) - see third-party/README.md for the licence, the sources jar, and which of DRB's own dependencies are and aren't used.

What DRB is used for

DRB was developed by GAEL Systems for ESA as a federated "virtual filesystem": one navigable tree over heterogeneous Earth Observation data products, used in Sentinel ground-segment tooling. It is typically used for:

This module uses DRB 2.5.13's SDF schemas and its built-in XML support; the format implementations for most of the products above were separate DRB packages and are not included here. This project's own examples (a binary "point" record and a CSV table, the same as in the DFDL and Kaitai modules) are in src/test/resources.

Galleries of examples

There is no public gallery of DRB SDF schemas for the Java DRB used here; this project's own are in src/test/resources. For drb-python, GAEL's Python successor, format support comes as driver packages:

Two ways to interpret a Digital Object

DrbFormatSpecification selects one:

How the adapter works

Writing SDF schemas DRB will accept

These came up while generating schemas from archive-manager's descriptions:

Writing data back

DrbStructureRepInfo is a WritableStructureRepInfo when it has an SDF schema: DRB's SDF blocks support setValue, which writes a value back where it was read from, into a copy of the data (the temporary file is writable, so DRB opens it read-write). write(dataObject, changes) writes every value again - its new value, or the one just read - so writing back unchanged (roundTrip(dataObject)) tests that DRB encodes every value the way it's stored. Bytes the schema doesn't describe are kept as they were, so an identical round trip here doesn't show that the schema covers every byte (decoding reports trailing bytes for that). A delimited value can change length - DRB moves what follows - but one of fixed length can't: DRB pads a short text value and cuts a long one without complaint, so the adapter reads the written data back and refuses a change that didn't come out as asked.

DRB 2.5.13 writes a 4-byte float big-endian even when the schema says LSB (it swaps integers and doubles, but not floats); the adapter notes each float whose stored bytes read as little-endian and writes it little-endian itself once DRB has finished.

Known DRB limitations