Package com.ibm.fhir.search.parameters
Class ParametersUtil
- java.lang.Object
-
- com.ibm.fhir.search.parameters.ParametersUtil
-
public final class ParametersUtil extends Object
Refactored the PopulateSearchParameterMap code, and marked class as final so there are no 'children' and inheritance which overwrites the behaviors of the buildInSearchParameters.
Callinit()
before using the class in order to avoid a slight performance hit on first use.
-
-
Field Summary
Fields Modifier and Type Field Description static String
BUILTIN_ERROR_EXCEPTION
static String
ERROR_EXCEPTION
static String
FHIR_DEFAULT_SEARCH_PARAMETERS_FILE
static String
FHIR_PATH_BUNDLE_ENTRY
static String
FROM_STEAM
static String
LOG_HEADER
static String
LOG_PARAMETERS
static String
LOG_SIZE
static String
STREAM_ERROR_EXCEPTION
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static void
checkAndWarnForIssueWithCodeAndName(String code, String name)
checks and warns if name and code are not equivalent.static Set<SearchParameter>
getAllSearchParameters()
Get all search parameters of all types from the registry.static String
getCanonicalUrl(SearchParameter sp)
Construct the canonical URL from the SearchParameter's url and versionstatic Map<String,ParametersMap>
getTenantSPs(String tenantId)
Get the applicable SearchParameter objects for a particular tenant.static void
init()
Loads the class in the classloader to initialize static members.static void
print(PrintStream out)
convenience method to print the output of the Search Parameters.static void
printSearchParameter(SearchParameter parameter, PrintStream out)
outputs the search parameter.
-
-
-
Field Detail
-
FHIR_PATH_BUNDLE_ENTRY
public static final String FHIR_PATH_BUNDLE_ENTRY
- See Also:
- Constant Field Values
-
FHIR_DEFAULT_SEARCH_PARAMETERS_FILE
public static final String FHIR_DEFAULT_SEARCH_PARAMETERS_FILE
- See Also:
- Constant Field Values
-
FROM_STEAM
public static final String FROM_STEAM
- See Also:
- Constant Field Values
-
ERROR_EXCEPTION
public static final String ERROR_EXCEPTION
- See Also:
- Constant Field Values
-
BUILTIN_ERROR_EXCEPTION
public static final String BUILTIN_ERROR_EXCEPTION
-
STREAM_ERROR_EXCEPTION
public static final String STREAM_ERROR_EXCEPTION
-
LOG_PARAMETERS
public static final String LOG_PARAMETERS
- See Also:
- Constant Field Values
-
LOG_HEADER
public static final String LOG_HEADER
- See Also:
- Constant Field Values
-
LOG_SIZE
public static final String LOG_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public static void init()
Loads the class in the classloader to initialize static members. Call this before using the class in order to avoid a slight performance hit on first use.
-
getCanonicalUrl
public static 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 static Map<String,ParametersMap> getTenantSPs(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 Set<SearchParameter> getAllSearchParameters()
Get all search parameters of all types from the registry.- Returns:
-
checkAndWarnForIssueWithCodeAndName
static void checkAndWarnForIssueWithCodeAndName(String code, String name)
checks and warns if name and code are not equivalent.- Parameters:
code
-name
-
-
print
public static void print(PrintStream out)
convenience method to print the output of the Search Parameters.- Parameters:
out
-
-
printSearchParameter
public static void printSearchParameter(SearchParameter parameter, PrintStream out)
outputs the search parameter.- Parameters:
parameter
-out
-
-
-