/**
   * Takes a list of castor generated MibObj objects iterates over them creating corresponding
   * MibObject objects and adding them to the supplied MibObject list.
   *
   * @param groupName TODO
   * @param groupIfType TODO
   * @param objectList List of MibObject objects parsed from 'datacollection-config.xml'
   * @param mibObjectList List of MibObject objects currently being built
   */
  private void processObjectList(
      final String groupName,
      final String groupIfType,
      final List<MibObj> objectList,
      final List<MibObject> mibObjectList) {
    for (final MibObj mibObj : objectList) {
      // Create a MibObject from the castor MibObj
      final MibObject aMibObject = new MibObject();
      aMibObject.setGroupName(groupName);
      aMibObject.setGroupIfType(groupIfType);
      aMibObject.setOid(mibObj.getOid());
      aMibObject.setAlias(mibObj.getAlias());
      aMibObject.setType(mibObj.getType());
      aMibObject.setInstance(mibObj.getInstance());
      aMibObject.setMaxval(mibObj.getMaxval());
      aMibObject.setMinval(mibObj.getMinval());

      final ResourceType resourceType = getConfiguredResourceTypes().get(mibObj.getInstance());
      if (resourceType != null) {
        aMibObject.setResourceType(resourceType);
      }

      // Add the MIB object provided it isn't already in the list
      if (!mibObjectList.contains(aMibObject)) {
        mibObjectList.add(aMibObject);
      }
    }
  }