public EquipmentXml getCard(String shelf, String slot) { for (EquipmentXml aCard : getCards()) { if (aCard.getShelf().equals(shelf) && aCard.getSlot().equals(slot)) { return aCard; } } return null; }
public EquipmentXml getPort(String shelf, String slot, String port) { for (EquipmentXml aPort : getPorts()) { if (aPort.getShelf().equals(shelf) && aPort.getSlot().equals(slot) && aPort.getPort().equals(port)) { return aPort; } } return null; }
public boolean slotIsL2SS(String shelf, String slot) { EquipmentXml aCard = getCard(shelf, slot); if (aCard != null) { String componentAid = aCard.getComponentAid(); // Consider aid types of 'L2SS' and '20GL2SS' if (componentAid != null && componentAid.indexOf("L2SS") >= 0) { return true; } } return false; }