this.targetFile = new File(target);
this.plainFileName = IOUtils.getInstance().stripFileExtension(this.targetFile.getName());
this.extension = IOUtils.getInstance().getFileExtension(target);
// split into classDescriptionByPackage ...
this.classDescriptionByPackage = new HashNMap();
for (int i = 0; i < model.size(); i++) {
final ClassDescription cd = model.get(i);
if (cd.getSource() == null) {
final String packageName = getPackage(cd.getObjectClass());
final String includeFileName = this.plainFileName + "-" + packageName
+ this.extension;
this.classDescriptionByPackage.add(includeFileName, cd);
}
else {
this.classDescriptionByPackage.add(cd.getSource(), cd);
}
}
final MappingModel mappingModel = model.getMappingModel();
// split manual mappings into packages ...
final ManualMappingInfo[] manualMappings = mappingModel.getManualMapping();
this.manualMappingByPackage = new HashNMap();
for (int i = 0; i < manualMappings.length; i++) {
final ManualMappingInfo mapping = manualMappings[i];
if (mapping.getSource() == null) {
this.manualMappingByPackage.add("", mapping);
}
else {
this.manualMappingByPackage.add(mapping.getSource(), mapping);
}
}
// split manual mappings into packages ...
final MultiplexMappingInfo[] multiplexMappings = mappingModel.getMultiplexMapping();
this.multiplexMappingByPackage = new HashNMap();
for (int i = 0; i < multiplexMappings.length; i++) {
final MultiplexMappingInfo mapping = multiplexMappings[i];
if (mapping.getSource() == null) {
this.multiplexMappingByPackage.add("", mapping);
}