private void mkOtpStructureMap(final OtpErlangList input) {
for (final OtpErlangObject o : input) {
final OtpErlangTuple t = (OtpErlangTuple) o;
final String lib = ((OtpErlangString) t.elementAt(0)).stringValue();
final OtpErlangList dirs = (OtpErlangList) t.elementAt(1);
final String group = OtpErlang.asString(t.elementAt(2));
final ErlExternalReferenceEntry extLib = new ErlExternalReferenceEntry(this,
getLibName(lib), lib, true, false);
extLib.setGroup(group);
addChild(extLib);
for (final OtpErlangObject dir : dirs.elements()) {
final OtpErlangTuple tdir = (OtpErlangTuple) dir;
final String dname = ((OtpErlangString) tdir.elementAt(0)).stringValue();
final OtpErlangList files = (OtpErlangList) tdir.elementAt(1);
final ErlExternalReferenceEntry subdir = new ErlExternalReferenceEntry(
extLib, getLibName(dname), dname, true, includePath(dname));
extLib.addChild(subdir);
for (final OtpErlangObject fn : files.elements()) {
final String sfn = ((OtpErlangString) fn).stringValue();
final IErlModule ext = new ErlModule(subdir, getModuleName(sfn), sfn,
Charsets.ISO_8859_1.toString(), null);
subdir.addChild(ext);
}