public EdiDirectory getEdiDirectory(String... includeMessages) throws IOException {
if(ediDirectory == null) {
Set<String> includeMessageSet = null;
String commonMessageName = getCommmonMessageName();
Set<String> messages = getMessageNames();
Edimap commonModel = null;
List<Edimap> models = new ArrayList<Edimap>();
if(includeMessages != null && includeMessages.length > 0) {
includeMessageSet = new HashSet<String>(Arrays.asList(includeMessages));
}
for(String message : messages) {
if (includeMessageSet != null && !message.equals(commonMessageName)) {
if (!includeMessageSet.contains(message)) {
// Skip this message...
continue;
}
}
Edimap model = getMappingModel(message);
EdiConvertionTool.removeDuplicateSegments(model.getSegments());
if(message.equals(commonMessageName)) {
if(commonModel == null) {
commonModel = model;
} else {