final String[] kamNames = new String[] { kam1Name, kam2Name };
// Get the KAM catalog information for each KAM.
final KamInfo[] kamInfos = new KamInfo[kamNames.length];
for (int i = 0; i < kamNames.length; ++i) {
final KamInfo kamInfo = kAMStore.getKamInfo(kamNames[i]);
if (kamInfo == null) {
reportable.error("No KAM found with name '"
+ kamNames[i] + "'");
bail(ExitCode.GENERAL_FAILURE);
}
kamInfos[i] = kamInfo;
}
// Create the KamComparison that will be displayed and/or written to the
// output file.
final KamComparison cmp = new KamComparison(kamNames);
for (KamInfo kamInfo : kamInfos) {
final String kamName = kamInfo.getName();
final KAMStoreStatisticsDaoImpl dao =
new KAMStoreStatisticsDaoImpl(
kamInfo.getKamDbObject().getSchemaName(),
dbConnection);
cmp.setKamNodeCount(kamName, dao.getKamNodeCount());
cmp.setKamEdgeCount(kamName, dao.getKamEdgeCount());
cmp.setBELDocumentCount(kamName, dao.getBELDocumentCount());