
Package org.hl7.fhir.r4.profilemodel.gen
Class PECodeGenerator
java.lang.Object
org.hl7.fhir.r4.profilemodel.gen.PECodeGenerator
The easiest way to generate code is to use the FHIR Validator, which can generate java classes for profiles
using this code. Parameters:
-codegen -version r4 -ig hl7.fhir.dk.core#3.2.0 -profiles http://hl7.dk/fhir/core/StructureDefinition/dk-core-gln-identifier,http://hl7.dk/fhir/core/StructureDefinition/dk-core-patient -output /Users/grahamegrieve/temp/codegen -package-name org.hl7.fhir.test
Parameter Documentation:
-codegen: tells the validator to generate code
-version {r4|5}: which version to generate for
-ig {name}: loads an IG (and it's dependencies) - see -ig documentation for the validator
-profiles {list}: a comma separated list of profile URLs to generate code for
-output {folder}: the folder where to generate the output java class source code
-package-name {name}: the name of the java package to generate in
options
-option {name}: a code generation option, one of:
narrative: generate code for the resource narrative (recommended: don't - leave that for the native resource level)
meta: generate code the what's in meta
contained: generate code for contained resources
all-elements: generate code for all elements, not just the key elements (makes the code verbose)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final Stringexecute()booleanbooleanbooleanisMeta()booleanvoidjdoc(StringBuilder b, String doco, int indent, boolean jdoc) voidsetCanonical(String canonical) voidsetContained(boolean contained) voidsetExtensionPolicy(PECodeGenerator.ExtensionPolicy extensionPolicy) voidvoidsetGenDate(String genDate) voidsetKeyElementsOnly(boolean keyElementsOnly) voidsetLanguage(String language) voidsetMeta(boolean meta) voidsetNarrative(boolean narrative) voidsetPkgName(String pkgName) voidsetVersion(String version)
-
Constructor Details
-
PECodeGenerator
-
-
Method Details
-
DEFAULT_DATE
-
getFolder
-
setFolder
-
getVersion
-
setVersion
-
getCanonical
-
setCanonical
-
getPkgName
-
setPkgName
-
getExtensionPolicy
-
setExtensionPolicy
-
isNarrative
-
setNarrative
-
isMeta
-
setMeta
-
getLanguage
-
setLanguage
-
isKeyElementsOnly
-
setKeyElementsOnly
-
isContained
-
setContained
-
getGenDate
-
setGenDate
-
execute
- Throws:
IOException
-
jdoc
-