The majority of the Store implementations available in the LuciadRIA API allow you to specify a custom Codec instance. The Codec is responsible for the conversion from a server-specific or file-specific data format to the LuciadRIA Feature interface, and the other way around. See the Introduction to feature (vector) models tutorial for more information.

The structure of a Store that uses a Codec for the interpretation of the data ensures a clean separation between the actual client-server communication and the server-specific format logic. Supporting multiple formats becomes a matter of writing new codecs without the need to re-implement the communication protocol with the server.

For example, if you want to support a WFS server that serves data in different formats, it is sufficient to create a codec for each of those formats and setting such a custom codec on a WFS store. There is no need to implement the WFS communication protocol again as you can re-use the existing WFS store WFSFeatureStore.

The samples contain a custom Codec implementation: see the samples/createedit/CustomJsonCodec.js file.