for (String elemName : elemUsage.keySet()) {
ElementUsage elementUsage = elemUsage.get(elemName);
for (XSTypeDefinition type : elementUsage.getTypes()) {
if (!map.containsKey(type)) {
map.put(type, String.valueOf(i++));
stateMachineMap.put(type, new StateMachineBuilder().build(type));
}
}
}
return map;
}