Skip to content

Writing Structures

Structures are written using the StructureWriterManager with Module registration used to enable support for specific output formats.

//Register supported formats to write / read
SdmxJsonModule.register();  //Support JSON
SdmxMLModule.register();    //Suport XML

//create beans container with content
SdmxBeans beans = ...

//Create writer manager
StructureWriterManager swm = new StructureWriterManagerImpl();

//Define output format
StructureFormat outFormat = new SdmxStructureFormat(STRUCTURE_OUTPUT_FORMAT.SDMX_V3_STRUCTURE_DOCUMENT);

//Write
swm.writeStructures(beans, outFormat, System.out);