-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #50 - Add the possibility to generate an Allotrope from a singl…
…e .ch file - ChemStationToAllotropeMapper is now more customizable - In addition to the time-zone, users can now customize the date-time format and the names of the necessary files for conversion - More metadata is read from .ch files - Add a merge strategy option if metadata read from .ch and other files differ Fix ChemStationToAllotropeMapper
- Loading branch information
1 parent
6cb5c6e
commit 45c2635
Showing
22 changed files
with
757 additions
and
1,782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,67 @@ | ||
# GC2ASM | ||
|
||
[][maven-central] | ||
[][license] | ||
[![Maven Central Version][maven-central-badge]][maven-central] | ||
[![License CeCILL 2.1][license-badge]][cecill-2.1] | ||
|
||
A Java converter from GC proprietary data to Allotrope's ASM data. | ||
|
||
|
||
A Java converter from GC proprietary data to Allotrope's ASM data | ||
|
||
A project from [IFP Energies Nouvelles](https://www.ifpenergiesnouvelles.com/), a public research, innovation and training organization in the fields of energy, transport and the environment | ||
A project from [IFP Energies Nouvelles][ifpen], a public research, innovation and | ||
training organization in the fields of energy, transport and the environment. | ||
|
||
## Usage | ||
|
||
```java | ||
String filePath = pathToGCFile; | ||
GcToAllotropeJsonConverter converter = new GcToAllotropeJsonConverter(); | ||
ObjectNode result = converter.convertFile(filePath); | ||
import fr.ifpen.allotropeconverters.gc.GcToAllotropeJsonConverter; | ||
import fr.ifpen.allotropeconverters.gc.chemstation.ChemStationToAllotropeMapper; | ||
import fr.ifpen.allotropeconverters.gc.chemstation.ChemStationToAllotropeMapperBuilder; | ||
|
||
String folderPath = "path to folder containing .ch, .xml and .txt files"; | ||
String filePath = "path to .ch file"; | ||
|
||
// Using default mapper | ||
GcToAllotropeJsonConverter converter = new GcToAllotropeJsonConverter(); | ||
|
||
// Conversion from folder to Allotrope JSON | ||
ObjectNode allotropeFromFolder = converter.convertFolderToAllotrope(folderPath); | ||
|
||
// Conversion from .ch file to Allotrope JSON | ||
ObjectNode allotropeFromFile = converter.convertChFileToAllotrope(filePath); | ||
|
||
|
||
// ChemStation to Allotrope mapper can be customized | ||
ChemStationToAllotropeMapperBuilder builder = new ChemStationToAllotropeMapperBuilder(); | ||
ChemStationToAllotropeMapper mapper = builder.withZoneId(ZoneId.of("Europe/Paris")) | ||
.withChFileName("file.ch") | ||
.withXmlFileName("file.xml") | ||
.build(); | ||
GcToAllotropeJsonConverter customizedConverter = new GcToAllotropeJsonConverter(mapper); | ||
|
||
// Convert folders and files | ||
// [...] | ||
``` | ||
|
||
## Supported files | ||
|
||
- Chemstation V179 | ||
- Chemstation V181 | ||
|
||
## Roadmap | ||
|
||
Support for Thermo's Chromeleon data. | ||
|
||
## License | ||
The code is available under the [CeCILL 2.1](https://cecill.info/licences/Licence_CeCILL_V2.1-fr.txt) licence, which is compatible with GNU GPL, GNU Affero GPL and EUPL. | ||
The [ASM JSON schemas](https://www.allotrope.org/asm) are available under [CC-BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) terms. | ||
|
||
The code is available under the [CeCILL 2.1][cecill-2.1] license, | ||
which is compatible with GNU GPL, GNU Affero GPL and EUPL. | ||
The [ASM JSON schemas][asm] are available under [CC-BY-NC 4.0][cc-by-nc-4.0] terms. | ||
|
||
[//]: # (@formatter:off) | ||
|
||
[maven-central-badge]: https://img.shields.io/maven-central/v/fr.ifpen.allotropeconverters/gc2asm | ||
[license-badge]: https://img.shields.io/badge/License-CeCILL_2.1-green | ||
|
||
[maven-central]: https://central.sonatype.com/artifact/fr.ifpen.allotropeconverters/gc2asm | ||
[license]: https://opensource.org/license/cecill-2-1 | ||
[cecill-2.1]: https://opensource.org/license/cecill-2-1 | ||
[ifpen]: https://www.ifpenergiesnouvelles.com/ | ||
[asm]: https://www.allotrope.org/asm | ||
[cc-by-nc-4.0]: https://creativecommons.org/licenses/by-nc/4.0/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.