Minimal Java project that uses jsonschema2pojo to generate Java classes that can write instances of CEDAR templates.
The ./src/main/resources/json-schema
directory contains an example JSON Schema-based CEDAR template.
The ./src/main/resources/json
directory contains an example JSON-based template instance corresponding to that template.
The main class org.metadatacenter.archetype.TemplateInstanceWriter
contains an example of writing a template instance
using a jsonschema2pojo-generated Java class.
To build this library you must have the following items installed:
First build the CEDAR parent project.
Get a copy of the latest code:
git clone https://github.com/metadatacenter/cedar-archetype-instance-writer.git
Change into the cedar-archetype-instance-writer directory:
cd cedar-archetype-instance-writer
Then build it with Maven:
mvn clean install
To run:
mvn exec:java