Class ParametersHelper
- java.lang.Object
-
- org.linuxforhealth.fhir.search.parameters.ParametersHelper
-
public class ParametersHelper extends java.lang.Object
A helper class with methods for working with HL7 FHIR search parameters.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BUILTIN_ERROR_EXCEPTION
static java.lang.String
ERROR_EXCEPTION
static java.lang.String
FHIR_DEFAULT_SEARCH_PARAMETERS_FILE
static java.lang.String
FHIR_PATH_BUNDLE_ENTRY
static java.lang.String
FROM_STEAM
static java.lang.String
LOG_HEADER
static java.lang.String
LOG_PARAMETERS
static java.lang.String
LOG_SIZE
static java.lang.String
STREAM_ERROR_EXCEPTION
-
Constructor Summary
Constructors Constructor Description ParametersHelper(CompartmentHelper compartmentHelper)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static void
checkAndWarnForIssueWithCodeAndName(java.lang.String code, java.lang.String name)
checks and warns if name and code are not equivalent.static java.util.Set<SearchParameter>
getAllSearchParameters()
Get all search parameters of all types from the registry.static java.lang.String
getCanonicalUrl(SearchParameter sp)
Construct the canonical URL from the SearchParameter's url and versionjava.util.Map<java.lang.String,ParametersMap>
getTenantSPs(java.lang.String tenantId)
Get the applicable SearchParameter objects for a particular tenant.void
print(java.io.PrintStream out)
convenience method to print the output of the Search Parameters.static void
printSearchParameter(SearchParameter parameter, java.io.PrintStream out)
outputs the search parameter.
-
-
-
Field Detail
-
FHIR_PATH_BUNDLE_ENTRY
public static final java.lang.String FHIR_PATH_BUNDLE_ENTRY
- See Also:
- Constant Field Values
-
FHIR_DEFAULT_SEARCH_PARAMETERS_FILE
public static final java.lang.String FHIR_DEFAULT_SEARCH_PARAMETERS_FILE
- See Also:
- Constant Field Values
-
FROM_STEAM
public static final java.lang.String FROM_STEAM
- See Also:
- Constant Field Values
-
ERROR_EXCEPTION
public static final java.lang.String ERROR_EXCEPTION
- See Also:
- Constant Field Values
-
BUILTIN_ERROR_EXCEPTION
public static final java.lang.String BUILTIN_ERROR_EXCEPTION
-
STREAM_ERROR_EXCEPTION
public static final java.lang.String STREAM_ERROR_EXCEPTION
-
LOG_PARAMETERS
public static final java.lang.String LOG_PARAMETERS
- See Also:
- Constant Field Values
-
LOG_HEADER
public static final java.lang.String LOG_HEADER
- See Also:
- Constant Field Values
-
LOG_SIZE
public static final java.lang.String LOG_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ParametersHelper
public ParametersHelper(CompartmentHelper compartmentHelper)
-
-
Method Detail
-
getCanonicalUrl
public static java.lang.String getCanonicalUrl(SearchParameter sp)
Construct the canonical URL from the SearchParameter's url and version- Returns:
- the url of this search parameter with a version postfix (if version is non-null)
-
getTenantSPs
public java.util.Map<java.lang.String,ParametersMap> getTenantSPs(java.lang.String tenantId)
Get the applicable SearchParameter objects for a particular tenant.- Parameters:
tenantId
-- Returns:
- a set of ParametersMaps, organized by resource type; never null
-
getAllSearchParameters
public static java.util.Set<SearchParameter> getAllSearchParameters()
Get all search parameters of all types from the registry.- Returns:
-
checkAndWarnForIssueWithCodeAndName
static void checkAndWarnForIssueWithCodeAndName(java.lang.String code, java.lang.String name)
checks and warns if name and code are not equivalent.- Parameters:
code
-name
-
-
print
public void print(java.io.PrintStream out)
convenience method to print the output of the Search Parameters.- Parameters:
out
-
-
printSearchParameter
public static void printSearchParameter(SearchParameter parameter, java.io.PrintStream out)
outputs the search parameter.- Parameters:
parameter
-out
-
-
-