void load(Connection connection, ValueList list) {
        int count = list.getNextInt();
        types.clear();
        for (int i=0;i<count;i++) {
            String eName = list.getNextString();
            int eType = list.getNextInt();
            ElementType type = new ElementType(eName,eType);
            if ((eType == ElementType.TYPE_EMBEDDED) ||
               (eType == ElementType.TYPE_EMBEDDED_ARRAY)) {
                DocumentType dt = new DocumentType(null);
                ValueList ml = list.getNextList();
                dt.load(connection,ml);
                type.nestedType = dt;
            } else if ((eType == ElementType.TYPE_REFERENCE) ||
                       (eType == ElementType.TYPE_REFERENCE_ARRAY)) {
                type.reference = list.getNextString();
                type.referenceKey = list.getNextString();
                DocumentType dt = new DocumentType(type.reference);
                NodeReference schemaGlobal = connection.createNodeReference("Schema");

                ValueList ml = schemaGlobal.getList(type.reference);
                dt.load(connection,ml);
                type.nestedType = dt;
            // TODO
            } else if (eType == ElementType.TYPE_BACK_REFERENCE) {
                String refName = list.getNextString();
                String bRef = list.getNextString();
            }
            types.put(eName,type);
        }
        NodeReference indexGlobal = connection.createNodeReference("Indices");
        if (name != null) {
            indexGlobal.appendSubscript(name);
            loadIndices(indexGlobal);
        }
     }