use of org.hl7.fhir.core.generator.codegen.JavaResourceGenerator in project org.hl7.fhir.core by hapifhir.
the class JavaCoreGenerator method genClass.
public void genClass(String version, String dest, Date date, Configuration config, String jid, NpmPackage npm, Definitions master, JavaParserJsonGenerator jgen, JavaParserXmlGenerator xgen, JavaParserRdfGenerator rgen, StructureDefinition sd) throws Exception, IOException, UnsupportedEncodingException, FileNotFoundException {
String name = javaName(sd.getName());
System.out.println(" .. " + name);
Analyser jca = new Analyser(master, config, version);
Analysis analysis = jca.analyse(sd);
String fn = Utilities.path(dest, "src", "main", "java", "org", "hl7", "fhir", jid, "model", name + ".java");
JavaResourceGenerator gen = new JavaResourceGenerator(new FileOutputStream(fn), master, config, date, npm.version(), jid);
gen.generate(analysis);
gen.close();
jgen.seeClass(analysis);
xgen.seeClass(analysis);
rgen.seeClass(analysis);
}
Aggregations