public List<String> getSamples() { List<String> samples = new ArrayList<String>(); for (Inventory inventory : inventories) { samples.addAll(Arrays.asList(inventory.getSamples())); } return samples; }
public Inventory getInventoryByGermplasmId(String germplasmId) { List<Inventory> inventories = getInventories(); for (Inventory inventory : inventories) { if (germplasmId.equals(inventory.getGermplasmId())) { return inventory; } } throw new RuntimeException( "Inventory not found for germplasm " + germplasmId + " in project " + getProjectId()); }
private boolean hasSingleSelectionInventory() { for (Inventory inventory : getInventories()) { if (inventory.isSingleSelection()) { setProjectError( "Project \"" + getProjectId() + "\" has inventory that contains Single Selection , this is not supported\n"); return true; } } return false; }