
Package ca.uhn.fhir.jpa.patch
Class FhirPatch.ParsedPath
java.lang.Object
ca.uhn.fhir.jpa.patch.FhirPatch.ParsedPath
- Enclosing class:
FhirPatch
This class helps parse a FHIR path into its component parts for easier patch operation processing.
It has 3 components:
- The last element name, which is the last element in the path (not including any list index or filter)
- The containing path, which is the prefix of the path up to the last element
- A flag indicating whether the path has a filter or index on the last element of the path, which indicates
that the path we are dealing is probably for a list element.
Examples:
1. For path "Patient.identifier[2].system",
- the lastElementName is "system",
- the containingPath is "Patient.identifier[2]",
- and endsWithAFilterOrIndex flag is false
2. For path "Patient.identifier[2]" or for path "Patient.identifier.where('system'='sys1')"
- the lastElementName is "identifier",
- the containingPath is "Patient",
- and the endsWithAFilterOrIndex is true
-
Constructor Summary
ConstructorsConstructorDescriptionParsedPath
(String theLastElementName, String theContainingPath, boolean theEndsWithAFilterOrIndex) -
Method Summary
Modifier and TypeMethodDescriptionReturns the prefix of the path up to the last FHIR resource elementboolean
Returns whether the path has a filter or index on the last element of the path, which indicates that the path we are dealing is probably a list element.returns the last element of the pathstatic FhirPatch.ParsedPath
-
Constructor Details
-
ParsedPath
public ParsedPath(String theLastElementName, String theContainingPath, boolean theEndsWithAFilterOrIndex)
-
-
Method Details
-
getLastElementName
returns the last element of the path -
getContainingPath
Returns the prefix of the path up to the last FHIR resource element -
getEndsWithAFilterOrIndex
Returns whether the path has a filter or index on the last element of the path, which indicates that the path we are dealing is probably a list element. -
parse
-