1
2
3
4
5
6
7
8
9
10
11
12 package sk.uniba.euromath.document;
13 import sk.baka.xml.gene.ICoordinator;
14 import sk.baka.xml.gene.InstanceProvider;
15 import sk.uniba.euromath.document.DocumentView;
16 /***
17 * Handles export of the document to various formats. For querying various export information please use
18 * <code>InstanceProvider</code>.
19 * @author Martin Vysny
20 */
21 public final class ExportManager {
22 /***
23 * The document instance.
24 */
25 private final XMLAccess xmlAccess;
26 /***
27 * Constructor.
28 * @param xmlAccess the document instance.
29 */
30 ExportManager(XMLAccess xmlAccess) {
31 super();
32 this.xmlAccess = xmlAccess;
33 }
34 /***
35 * Returns the coordinator for given output class and prepares it for
36 * export.
37 * @param outputClass the document class that shall be produced.
38 * @param defaultView the default view on the document. Exporters from this view should have higher priority when
39 * constructing the export graph.
40 * @return the coordinator instance
41 */
42 public ICoordinator getCoordinator(String outputClass,
43 DocumentView defaultView) {
44 return InstanceProvider.getInstance().newCoordinator(outputClass);
45 }
46 }