/**
   * @see org.argouml.persistence.MemberFilePersister#load(org.argouml.kernel.Project,
   *     java.io.InputStream)
   */
  public void load(Project project, InputStream inputStream) throws OpenException {

    // If the model repository doesn't manage a DI model
    // then we must generate our Figs by inspecting PGML
    try {
      // Give the parser a map of model elements
      // keyed by their UUID. This is used to allocate
      // figs to their owner using the "href" attribute
      // in PGML.
      PGMLStackParser parser = new PGMLStackParser(project.getUUIDRefs());
      Diagram d = parser.readDiagram(inputStream, false);
      inputStream.close();
      project.addMember(d);
    } catch (Exception e) {
      if (e instanceof OpenException) {
        throw (OpenException) e;
      }
      throw new OpenException(e);
    }
  }