Class Main
- java.lang.Object
-
- org.linuxforhealth.fhir.path.tool.Main
-
public final class Main extends java.lang.Object
Processes the resource from one of the entry points, into an in memory resource a FHIR Path is executed over it, and the output is put out to the screen. The types of entry points are:- a file
- a string (raw command line arg); or
- stdin (so we can pipe to it)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
determineTypeAndSetProperties(java.lang.String[] argsInc)
processes the command line parameters into objects.void
footer()
print the footer.void
header(java.lang.String fhirPath, int count)
output the headervoid
help()
print the help information.static void
main(java.lang.String[] args)
executes a fhir path expression over a given resource.protected void
processFhirPath()
process the fhir path and output the nodes with each node separated by a newlinejava.lang.Boolean
shouldPrintError()
print the error message.void
verifyResource()
verifies we have a fhir resource
-
-
-
Method Detail
-
determineTypeAndSetProperties
protected void determineTypeAndSetProperties(java.lang.String[] argsInc)
processes the command line parameters into objects.- Parameters:
argsInc
-
-
shouldPrintError
public java.lang.Boolean shouldPrintError()
print the error message.- Returns:
-
verifyResource
public void verifyResource()
verifies we have a fhir resource
-
processFhirPath
protected void processFhirPath()
process the fhir path and output the nodes with each node separated by a newlineif
pretty
is set to true, each node is additionally prefixed by its index in the collected result of the FHIRPath evaluation.
-
header
public void header(java.lang.String fhirPath, int count)
output the header- Parameters:
fhirPath
-count
-
-
footer
public void footer()
print the footer.
-
help
public void help()
print the help information.
-
main
public static void main(java.lang.String[] args)
executes a fhir path expression over a given resource.- Parameters:
args
-
-
-