View Javadoc

1   package eu.ehri.project.exporters.eag;
2   
3   import eu.ehri.project.exporters.xml.XmlExporter;
4   import eu.ehri.project.models.Repository;
5   import org.w3c.dom.Document;
6   
7   import javax.xml.transform.TransformerException;
8   import java.io.IOException;
9   import java.io.OutputStream;
10  
11  /**
12   * Encoded Archive Guide (EAD) export.
13   */
14  public interface EagExporter extends XmlExporter<Repository> {
15  
16      /**
17       * Export a repository as an EAG document.
18       *
19       * @param repository   the repository
20       * @param outputStream the output stream to write to.
21       * @param langCode     the preferred language code when multiple
22       *                     descriptions are available
23       */
24      void export(Repository repository,
25              OutputStream outputStream, String langCode) throws IOException, TransformerException;
26  
27      /**
28       * Export a repository as an EAG document.
29       *
30       * @param repository the repository
31       * @param langCode   the preferred language code when multiple
32       *                   descriptions are available
33       * @return a DOM document
34       */
35      Document export(Repository repository, String langCode) throws IOException;
36  }