use of com.b2international.snowowl.snomed.cis.SnomedIdentifier in project snow-owl by b2ihealthcare.
the class SnomedIdentifierReservationServiceImpl method isReserved.
@Override
public Set<String> isReserved(Set<String> componentIdsToCheck) {
final ImmutableSet.Builder<String> reservedIds = ImmutableSet.builder();
final Set<SnomedIdentifier> identifiersToCheck = componentIdsToCheck.stream().map(SnomedIdentifiers::create).collect(Collectors.toSet());
for (Reservation reservation : getReservations()) {
reservation.intersection(identifiersToCheck).stream().map(SnomedIdentifier::toString).forEach(reservedIds::add);
}
return reservedIds.build();
}
Aggregations