Skip to content

Latest commit

 

History

History
61 lines (37 loc) · 2.12 KB

File metadata and controls

61 lines (37 loc) · 2.12 KB

Allotrope Simple Models Class Generation

Maven Central Version

NPM Version

License CeCILL 2.1

A set of libraries compatible with the Allotrope Simple Models.

A project from IFP Energies Nouvelles, a public research, innovation and training organization in the fields of energy, transport and the environment.

Documentation

Complete API documentation for all supported languages is available here: https://ifpen.github.io/AllotropeSimpleModelsClassGeneration/

Philosophy

This project aims to create libraries of classes that are compatible with the ASM JSON files (ie. a compliant JSON file can be deserialized into one of the classes)

Neither the project nor the libraries are endorsed by the Allotrope Foundation.

Usage

import fr.ifpen.allotropeconverters.allotrope_models.GasChromatographySimpleModel;

public static GasChromatographySimpleModel readAllotropeFromInputStream(InputStream inputStream) throws IOException {
    ObjectMapper objectMapper = JsonMapper.builder().addModule(new JavaTimeModule()).build();
    objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
    return objectMapper.readValue(
            inputStream,
            GasChromatographySimpleModel.class
    );
}

License

The code is available under the CeCILL 2.1 license, which is compatible with GNU GPL, GNU Affero GPL and EUPL.
The ASM JSON schemas are available under CC-BY-NC 4.0 terms.