Package com.ibm.fhir.path.tool
Class Main
- java.lang.Object
-
- com.ibm.fhir.path.tool.Main
-
public final class Main extends java.lang.ObjectProcesses 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 voiddetermineTypeAndSetProperties(java.lang.String[] argsInc)processes the command line parameters into objects.voidfooter()print the footer.voidheader(java.lang.String fhirPath, int count)output the headervoidhelp()print the help information.static voidmain(java.lang.String[] args)executes a fhir path expression over a given resource.protected voidprocessFhirPath()process the fhir path and output the nodes with each node separated by a newlinejava.lang.BooleanshouldPrintError()print the error message.voidverifyResource()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
prettyis 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-
-
-