test_class.declarator: itemRegistry
test_class.modifier: private @Mock
test_class.original_string: private @Mock ItemRegistry itemRegistry;
test_class.type: ItemRegistry
test_class.var_name: itemRegistry
test_class.declarator: metadataRegistry
test_class.modifier: private @Mock
test_class.original_string: private @Mock MetadataRegistry metadataRegistry;
test_class.type: MetadataRegistry
test_class.var_name: metadataRegistry
test_class.declarator: locationItem
test_class.modifier: private
test_class.original_string: private GroupItem locationItem;
test_class.type: GroupItem
test_class.var_name: locationItem
test_class.declarator: equipmentItem
test_class.modifier: private
test_class.original_string: private GroupItem equipmentItem;
test_class.type: GroupItem
test_class.var_name: equipmentItem
test_class.declarator: pointItem
test_class.modifier: private
test_class.original_string: private GenericItem pointItem;
test_class.type: GenericItem
test_class.var_name: pointItem
test_class.declarator: service
test_class.modifier: private
test_class.original_string: private SemanticsServiceImpl service;
test_class.type: SemanticsServiceImpl
test_class.var_name: service
test_class.file: bundles/org.openhab.core.semantics/src/test/java/org/openhab/core/semantics/internal/SemanticsServiceImplTest.java
test_class.identifier: SemanticsServiceImplTest
test_case.body: @Test
      public void testGetItemsInLocationByString() throws Exception {
          Set<Item> items = service.getItemsInLocation("joe's room", Locale.ENGLISH);
          assertTrue(items.contains(pointItem));
  
          items = service.getItemsInLocation(LivingRoom.class);
          assertTrue(items.isEmpty());
      }
test_case.class_method_signature: SemanticsServiceImplTest.testGetItemsInLocationByString()
test_case.full_signature: @Test public void testGetItemsInLocationByString()
test_case.identifier: testGetItemsInLocationByString
test_case.invocations: getItemsInLocation assertTrue contains getItemsInLocation assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetItemsInLocationByString()
focal_class.declarator: SYNONYMS_NAMESPACE = "synonyms"
focal_class.modifier: private static final
focal_class.original_string: private static final String SYNONYMS_NAMESPACE = "synonyms";
focal_class.type: String
focal_class.var_name: SYNONYMS_NAMESPACE
focal_class.declarator: itemRegistry
focal_class.modifier: private final
focal_class.original_string: private final ItemRegistry itemRegistry;
focal_class.type: ItemRegistry
focal_class.var_name: itemRegistry
focal_class.declarator: metadataRegistry
focal_class.modifier: private final
focal_class.original_string: private final MetadataRegistry metadataRegistry;
focal_class.type: MetadataRegistry
focal_class.var_name: metadataRegistry
focal_class.file: bundles/org.openhab.core.semantics/src/main/java/org/openhab/core/semantics/internal/SemanticsServiceImpl.java
focal_class.identifier: SemanticsServiceImpl
focal_class.interfaces: implements SemanticsService
focal_class.class_method_signature: SemanticsServiceImpl.SemanticsServiceImpl(final @Reference ItemRegistry itemRegistry,
              final @Reference MetadataRegistry metadataRegistry)
focal_class.full_signature: @Activate public  SemanticsServiceImpl(final @Reference ItemRegistry itemRegistry,
              final @Reference MetadataRegistry metadataRegistry)
focal_class.identifier: SemanticsServiceImpl
focal_class.modifiers: @Activate public
focal_class.parameters: (final @Reference ItemRegistry itemRegistry,
              final @Reference MetadataRegistry metadataRegistry)
focal_class.signature:  SemanticsServiceImpl(final @Reference ItemRegistry itemRegistry,
              final @Reference MetadataRegistry metadataRegistry)
focal_class.class_method_signature: SemanticsServiceImpl.getItemsInLocation(Class<? extends Location> locationType)
focal_class.full_signature: @Override public Set<Item> getItemsInLocation(Class<? extends Location> locationType)
focal_class.identifier: getItemsInLocation
focal_class.modifiers: @Override public
focal_class.parameters: (Class<? extends Location> locationType)
focal_class.return: Set<Item>
focal_class.signature: Set<Item> getItemsInLocation(Class<? extends Location> locationType)
focal_class.class_method_signature: SemanticsServiceImpl.getItemsInLocation(String labelOrSynonym, Locale locale)
focal_class.full_signature: @SuppressWarnings({ "unchecked" }) @Override public Set<Item> getItemsInLocation(String labelOrSynonym, Locale locale)
focal_class.identifier: getItemsInLocation
focal_class.modifiers: @SuppressWarnings({ "unchecked" }) @Override public
focal_class.parameters: (String labelOrSynonym, Locale locale)
focal_class.return: Set<Item>
focal_class.signature: Set<Item> getItemsInLocation(String labelOrSynonym, Locale locale)
focal_class.class_method_signature: SemanticsServiceImpl.hasSynonym(String labelOrSynonym)
focal_class.full_signature: private Predicate<? super Item> hasSynonym(String labelOrSynonym)
focal_class.identifier: hasSynonym
focal_class.modifiers: private
focal_class.parameters: (String labelOrSynonym)
focal_class.return: Predicate<? super Item>
focal_class.signature: Predicate<? super Item> hasSynonym(String labelOrSynonym)
focal_method.body: @Override
      public Set<Item> getItemsInLocation(Class<? extends Location> locationType) {
          Set<Item> items = new HashSet<>();
          Set<Item> locationItems = itemRegistry.stream().filter(SemanticsPredicates.isA(locationType))
                  .collect(Collectors.toSet());
          for (Item locationItem : locationItems) {
              if (locationItem instanceof GroupItem) {
                  GroupItem gItem = (GroupItem) locationItem;
                  items.addAll(gItem
                          .getMembers(SemanticsPredicates.isA(Point.class).or(SemanticsPredicates.isA(Equipment.class))));
              }
          }
          return items;
      }
focal_method.class_method_signature: SemanticsServiceImpl.getItemsInLocation(Class<? extends Location> locationType)
focal_method.full_signature: @Override public Set<Item> getItemsInLocation(Class<? extends Location> locationType)
focal_method.identifier: getItemsInLocation
focal_method.invocations: collect filter stream isA toSet addAll getMembers or isA isA
focal_method.modifiers: @Override public
focal_method.parameters: (Class<? extends Location> locationType)
focal_method.return: Set<Item>
focal_method.signature: Set<Item> getItemsInLocation(Class<? extends Location> locationType)