private void addNewMap() {
int inputDTD = inputDTDCbx.getSelectedIndex();
int mappingXSLT = mappingCbx.getSelectedIndex();
int outputDTD = outputDTDCbx.getSelectedIndex();
ConfigMapEntry map = new ConfigMapEntry((String) adapterOutputs
.get(inputDTD), (String) configArray.get(outputDTD),
(String) xsltMaps.get(mappingXSLT));
if (isNewMap((String) adapterOutputs.get(inputDTD),
(String) configArray.get(outputDTD))) {
tableModel.addMap(map);
Config.getEditInstance().addMapping(map);
mappingTable.setRowSelectionInterval(tableModel.getRowCount() - 1,
tableModel.getRowCount() - 1);
LogManager.getInstance().logMessage(
LogMessage.INFO,
"Mapping added: " + map.getInputDTD() + " : "
+ map.getXsltFunction() + " : "
+ map.getOutputDTD());
} else {
LogManager.getInstance().logMessage(
LogMessage.INFO,
"Mapping not added - already exists: " + map.getInputDTD()
+ " : " + map.getXsltFunction() + " : "
+ map.getOutputDTD());
JOptionPane.showMessageDialog(this,
"A mapping already exists for the selected schemas",
"Unable to create mapping", JOptionPane.WARNING_MESSAGE,
mapPic);
}