@Test public void testPrintSearchParameter() throws IOException { try (ByteArrayOutputStream outBA = new ByteArrayOutputStream(); PrintStream out = new PrintStream(outBA, true);) { SearchParameter.Builder builder = SearchParameter.builder().url(Uri.of("test")).name(string("test")).status(PublicationStatus.DRAFT).description(Markdown.of("test")).code(Code.of("test")).base(Arrays.asList(ResourceType.ACCOUNT)).type(SearchParamType.NUMBER); builder.expression(string("test")); ParametersUtil.printSearchParameter(builder.build(), out); assertNotNull(outBA.toByteArray()); if (DEBUG) { System.out.println(outBA.toString("UTF-8")); } } }
public static void printSearchParameter(SearchParameter parameter, PrintStream out) { String code = parameter.getCode().getValue(); List<ResourceType> types = parameter.getBase(); StringBuilder builder = new StringBuilder(); builder.append(code); builder.append(EQUALS); builder.append(LEFT); for (ResourceType type : types) { builder.append(type.getValue()); builder.append(COMMA); } builder.append(RIGHT); out.println(builder.toString()); }
ParametersUtil { public static void printSearchParameter(SearchParameter parameter, PrintStream out) { String code = parameter.getCode().getValue(); List<ResourceType> types = parameter.getBase(); StringBuilder builder = new StringBuilder(); builder.append(code); builder.append(EQUALS); builder.append(LEFT); for (ResourceType type : types) { builder.append(type.getValue()); builder.append(COMMA); } builder.append(RIGHT); out.println(builder.toString()); } }
ParametersUtil { public static void printSearchParameter(SearchParameter parameter, PrintStream out) { String code = parameter.getCode().getValue(); List<ResourceType> types = parameter.getBase(); StringBuilder builder = new StringBuilder(); builder.append(code); builder.append(EQUALS); builder.append(LEFT); for (ResourceType type : types) { builder.append(type.getValue()); builder.append(COMMA); } builder.append(RIGHT); out.println(builder.toString()); } private  ParametersUtil(); }
ParametersUtil { public static void printSearchParameter(SearchParameter parameter, PrintStream out) { String code = parameter.getCode().getValue(); List<ResourceType> types = parameter.getBase(); StringBuilder builder = new StringBuilder(); builder.append(code); builder.append(EQUALS); builder.append(LEFT); for (ResourceType type : types) { builder.append(type.getValue()); builder.append(COMMA); } builder.append(RIGHT); out.println(builder.toString()); } private  ParametersUtil(); static void init(); static Map<String, ParametersMap> buildSearchParametersMapFromBundle(Bundle bundle); static Map<String, ParametersMap> getBuiltInSearchParametersMap(); static void print(PrintStream out); static void printSearchParameter(SearchParameter parameter, PrintStream out); }
ParametersUtil { public static void printSearchParameter(SearchParameter parameter, PrintStream out) { String code = parameter.getCode().getValue(); List<ResourceType> types = parameter.getBase(); StringBuilder builder = new StringBuilder(); builder.append(code); builder.append(EQUALS); builder.append(LEFT); for (ResourceType type : types) { builder.append(type.getValue()); builder.append(COMMA); } builder.append(RIGHT); out.println(builder.toString()); } private  ParametersUtil(); static void init(); static Map<String, ParametersMap> buildSearchParametersMapFromBundle(Bundle bundle); static Map<String, ParametersMap> getBuiltInSearchParametersMap(); static void print(PrintStream out); static void printSearchParameter(SearchParameter parameter, PrintStream out); static final String FHIR_PATH_BUNDLE_ENTRY; static final String FHIR_DEFAULT_SEARCH_PARAMETERS_FILE; static final String FROM_STEAM; static final String ERROR_EXCEPTION; static final String BUILTIN_ERROR_EXCEPTION; static final String STREAM_ERROR_EXCEPTION; static final String LOG_PARAMETERS; static final String MISSING_EXPRESSION_WARNING; static final String LOG_HEADER; static final String LOG_SIZE; }