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.
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.
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
);
}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.