Package org.hl7.fhir.r5.profilemodel.gen
Class PECodeGenerator
java.lang.Object
org.hl7.fhir.r5.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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final String
execute()
boolean
boolean
boolean
isMeta()
boolean
void
jdoc
(StringBuilder b, String doco, int indent, boolean jdoc) void
setCanonical
(String canonical) void
setContained
(boolean contained) void
setExtensionPolicy
(PECodeGenerator.ExtensionPolicy extensionPolicy) void
void
setGenDate
(String genDate) void
setKeyElementsOnly
(boolean keyElementsOnly) void
setLanguage
(String language) void
setMeta
(boolean meta) void
setNarrative
(boolean narrative) void
setPkgName
(String pkgName) void
setVersion
(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
-