use of com.b2international.commons.options.Options in project snow-owl by b2ihealthcare.
the class SnomedReferenceSetMemberConverter method expandReferencedComponent.
private void expandReferencedComponent(List<SnomedReferenceSetMember> results) {
if (expand().containsKey(SnomedReferenceSetMember.Expand.REFERENCED_COMPONENT)) {
Options expandOptions = expand().get(SnomedReferenceSetMember.Expand.REFERENCED_COMPONENT, Options.class);
final Multimap<String, SnomedReferenceSetMember> referencedComponentIdToMemberMap = collectReferencedComponentIds(results);
final Multimap<ComponentCategory, String> componentCategoryToIdMap = collectReferencedComponentCategories(referencedComponentIdToMemberMap);
for (ComponentCategory category : componentCategoryToIdMap.keySet()) {
expandComponentCategory(expandOptions, referencedComponentIdToMemberMap, componentCategoryToIdMap, category);
}
}
}
use of com.b2international.commons.options.Options in project snow-owl by b2ihealthcare.
the class SearchResourceRequestTest method specialOptionKeyWithExtraParenthesis.
@Test
public void specialOptionKeyWithExtraParenthesis() throws Exception {
final Options options = Options.builder().put(OptionKey.SPECIAL, "@field(value (extra))").build();
final Options actual = SearchResourceRequest.processSpecialOptionKey(options, OptionKey.SPECIAL);
assertEquals(Options.builder().put("FIELD", "value (extra)").build(), actual);
}
use of com.b2international.commons.options.Options in project snow-owl by b2ihealthcare.
the class SearchResourceRequestTest method specialOptionKeyWithNonExpressionValue.
@Test
public void specialOptionKeyWithNonExpressionValue() throws Exception {
final Options options = Options.builder().put(OptionKey.SPECIAL, "not an expression").build();
final Options actual = SearchResourceRequest.processSpecialOptionKey(options, OptionKey.SPECIAL);
assertTrue(options == actual);
}
use of com.b2international.commons.options.Options in project snow-owl by b2ihealthcare.
the class SearchResourceRequestTest method specialOptionKeyWithNoValue.
@Test
public void specialOptionKeyWithNoValue() throws Exception {
final Options options = Options.builder().build();
final Options actual = SearchResourceRequest.processSpecialOptionKey(options, OptionKey.SPECIAL);
assertTrue(options == actual);
}
use of com.b2international.commons.options.Options in project snow-owl by b2ihealthcare.
the class SearchResourceRequestTest method nullSpecialOptionKey.
@Test
public void nullSpecialOptionKey() throws Exception {
final Options options = Options.builder().build();
final Options actual = SearchResourceRequest.processSpecialOptionKey(options, null);
assertTrue(options == actual);
}
Aggregations